id
stringlengths 1
6
| tokens
sequence | labels
sequence |
---|---|---|
661700 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Dropdown",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"type",
"{",
"Application",
",",
"ILoadBalancer",
",",
"ILoadBalancerDeleteCommand",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ConfirmationModalService",
",",
"LoadBalancerWriter",
",",
"ReactInjector",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"ICloudFoundryLoadBalancerActionsProps",
"{",
"application",
":",
"Application",
";",
"loadBalancer",
":",
"ILoadBalancer",
";",
"}",
"export",
"class",
"CloudFoundryLoadBalancerActions",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerActionsProps",
">",
"{",
"private",
"deleteLoadBalancer",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"application",
",",
"loadBalancer",
"}",
"=",
"this",
".",
"props",
";",
"const",
"taskMonitor",
"=",
"{",
"application",
":",
"application",
",",
"title",
":",
"'Deleting '",
"+",
"loadBalancer",
".",
"name",
",",
"onTaskComplete",
"(",
")",
"{",
"if",
"(",
"ReactInjector",
".",
"$state",
".",
"includes",
"(",
"'**.serverGroup'",
",",
"{",
"instanceId",
":",
"loadBalancer",
".",
"name",
"}",
")",
")",
"{",
"ReactInjector",
".",
"$state",
".",
"go",
"(",
"'^'",
")",
";",
"}",
"}",
",",
"}",
";",
"const",
"submitMethod",
"=",
"(",
")",
"=>",
"{",
"const",
"loadBalancerDeleteCommand",
"=",
"{",
"cloudProvider",
":",
"loadBalancer",
".",
"cloudProvider",
",",
"credentials",
":",
"loadBalancer",
".",
"account",
",",
"regions",
":",
"[",
"loadBalancer",
".",
"region",
"]",
",",
"loadBalancerName",
":",
"loadBalancer",
".",
"name",
",",
"}",
";",
"return",
"LoadBalancerWriter",
".",
"deleteLoadBalancer",
"(",
"loadBalancerDeleteCommand",
",",
"application",
")",
";",
"}",
";",
"ConfirmationModalService",
".",
"confirm",
"(",
"{",
"header",
":",
"'Really delete '",
"+",
"loadBalancer",
".",
"name",
"+",
"'?'",
",",
"buttonText",
":",
"'Delete '",
"+",
"loadBalancer",
".",
"name",
",",
"account",
":",
"loadBalancer",
".",
"account",
",",
"taskMonitorConfig",
":",
"taskMonitor",
",",
"submitMethod",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"return",
"(",
"<",
"div",
"className",
"=",
"\"actions\"",
">",
"<",
"Dropdown",
"className",
"=",
"\"dropdown\"",
"id",
"=",
"\"instance-actions-dropdown\"",
">",
"<",
"Dropdown",
".",
"Toggle",
"className",
"=",
"\"btn btn-sm btn-primary dropdown-toggle\"",
">",
"Load",
"Balancer",
"Actions",
"<",
"/Dropdown.Toggle>",
"<",
"Dropdown",
".",
"Menu",
"className",
"=",
"\"dropdown-menu\"",
">",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"deleteLoadBalancer",
"}",
">",
"Delete",
"Load",
"Balancer",
"<",
"/a>",
"<",
"/li>",
"<",
"/Dropdown.Menu>",
"<",
"/Dropdown>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661701 | [
"import",
"{",
"UISref",
"}",
"from",
"'@uirouter/react'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"AccountTag",
",",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryLoadBalancer",
"}",
"from",
"'../../../domain'",
";",
"export",
"interface",
"ICloudFoundryLoadBalancerDetailsSectionProps",
"{",
"loadBalancer",
":",
"ICloudFoundryLoadBalancer",
";",
"}",
"export",
"class",
"CloudFoundryLoadBalancerDetailsSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"loadBalancer",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Load Balancer Details\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"<",
"dt",
">",
"In",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"AccountTag",
"account",
"=",
"{",
"loadBalancer",
".",
"account",
"}",
"/>",
"<",
"/dd>",
"<",
"dt",
">",
"Organization",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"loadBalancer",
".",
"space",
".",
"organization",
".",
"name",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Space",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"loadBalancer",
".",
"space",
".",
"name",
"}",
"<",
"/dd>",
"{",
"loadBalancer",
".",
"serverGroups",
"&&",
"(",
"<",
">",
"<",
"dt",
">",
"Server",
"Groups",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"ul",
">",
"{",
"loadBalancer",
".",
"serverGroups",
".",
"map",
"(",
"(",
"serverGroup",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"li",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"UISref",
"to",
"=",
"\"^.serverGroup\"",
"params",
"=",
"{",
"{",
"region",
":",
"serverGroup",
".",
"region",
",",
"accountId",
":",
"serverGroup",
".",
"account",
",",
"serverGroup",
":",
"serverGroup",
".",
"name",
",",
"provider",
":",
"'cloudfoundry'",
",",
"}",
"}",
">",
"<",
"a",
">",
"{",
"serverGroup",
".",
"name",
"}",
"<",
"/a>",
"<",
"/UISref>",
"<",
"/li>);",
"}",
")",
"}",
"<",
"/ul>",
"<",
"/dd>",
"<",
"/>)}",
"<",
"/dl>",
"<",
"/CollapsibleSection>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661702 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
",",
"HealthCounts",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryLoadBalancer",
"}",
"from",
"'../../../domain'",
";",
"export",
"interface",
"ICloudFoundryLoadBalancerStatusSectionProps",
"{",
"loadBalancer",
":",
"ICloudFoundryLoadBalancer",
";",
"}",
"export",
"class",
"CloudFoundryLoadBalancerStatusSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerStatusSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"loadBalancer",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Status\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"HealthCounts",
"className",
"=",
"\"pull-left\"",
"container",
"=",
"{",
"loadBalancer",
".",
"instanceCounts",
"}",
"/",
">",
"<",
"/CollapsibleSection>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661703 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryLoadBalancer",
"}",
"from",
"'../../../domain'",
";",
"export",
"interface",
"ICloudFoundryLoadBalancerLinksSectionProps",
"{",
"loadBalancer",
":",
"ICloudFoundryLoadBalancer",
";",
"}",
"export",
"class",
"CloudFoundryLoadBalancerLinksSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerLinksSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"loadBalancer",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Application links\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"<",
"dt",
">",
"HTTP",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"a",
"href",
"=",
"{",
"'http://'",
"+",
"loadBalancer",
".",
"name",
"}",
">",
"{",
"'http://'",
"+",
"loadBalancer",
".",
"name",
"}",
"<",
"/a>",
"<",
"/dd>",
"<",
"dt",
">",
"HTTPS",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"a",
"href",
"=",
"{",
"'https://'",
"+",
"loadBalancer",
".",
"name",
"}",
">",
"{",
"'https://'",
"+",
"loadBalancer",
".",
"name",
"}",
"<",
"/a>",
"<",
"/dd>",
"<",
"/dl>",
"<",
"/CollapsibleSection>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661704 | [
"import",
"{",
"UISref",
"}",
"from",
"'@uirouter/react'",
";",
"import",
"{",
"UIRouterContext",
"}",
"from",
"'@uirouter/react-hybrid'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Application",
",",
"LoadBalancerWriter",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"Spinner",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryLoadBalancerActions",
"}",
"from",
"'./CloudFoundryLoadBalancerActions'",
";",
"import",
"type",
"{",
"ICloudFoundryLoadBalancer",
"}",
"from",
"'../../domain'",
";",
"import",
"{",
"CloudFoundryLoadBalancerDetailsSection",
"}",
"from",
"'./sections'",
";",
"import",
"{",
"CloudFoundryLoadBalancerLinksSection",
"}",
"from",
"'./sections/CloudFoundryLoadBalancerLinksSection'",
";",
"import",
"{",
"CloudFoundryLoadBalancerStatusSection",
"}",
"from",
"'./sections/CloudFoundryLoadBalancerStatusSection'",
";",
"interface",
"ILoadBalancer",
"{",
"name",
":",
"string",
";",
"accountId",
":",
"string",
";",
"region",
":",
"string",
";",
"}",
"interface",
"ICloudFoundryLoadBalancerDetailsState",
"{",
"loadBalancer",
":",
"ICloudFoundryLoadBalancer",
";",
"loadBalancerNotFound",
"?",
":",
"string",
";",
"loading",
":",
"boolean",
";",
"refreshListenerUnsubscribe",
":",
"(",
")",
"=>",
"void",
";",
"}",
"export",
"interface",
"ICloudFoundryLoadBalancerDetailsProps",
"{",
"app",
":",
"Application",
";",
"loadBalancer",
":",
"ILoadBalancer",
";",
"loadBalancerWriter",
":",
"LoadBalancerWriter",
";",
"}",
"@",
"UIRouterContext",
"export",
"class",
"CloudFoundryLoadBalancerDetails",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerDetailsProps",
",",
"ICloudFoundryLoadBalancerDetailsState",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"state",
"=",
"{",
"loading",
":",
"true",
",",
"loadBalancer",
":",
"undefined",
",",
"refreshListenerUnsubscribe",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
";",
"props",
".",
"app",
".",
"getDataSource",
"(",
"'loadBalancers'",
")",
".",
"ready",
"(",
")",
".",
"then",
"(",
"(",
")",
"=>",
"this",
".",
"extractLoadBalancer",
"(",
")",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"state",
".",
"refreshListenerUnsubscribe",
"(",
")",
";",
"}",
"private",
"extractLoadBalancer",
"(",
")",
"{",
"const",
"{",
"name",
"}",
"=",
"this",
".",
"props",
".",
"loadBalancer",
";",
"const",
"loadBalancer",
"=",
"this",
".",
"props",
".",
"app",
".",
"getDataSource",
"(",
"'loadBalancers'",
")",
".",
"data",
".",
"find",
"(",
"(",
"test",
")",
"=>",
"{",
"return",
"test",
".",
"name",
"===",
"name",
"&&",
"test",
".",
"account",
"===",
"this",
".",
"props",
".",
"loadBalancer",
".",
"accountId",
";",
"}",
")",
";",
"this",
".",
"setState",
"(",
"{",
"loading",
":",
"false",
",",
"loadBalancer",
",",
"}",
")",
";",
"this",
".",
"state",
".",
"refreshListenerUnsubscribe",
"(",
")",
";",
"if",
"(",
"loadBalancer",
")",
"{",
"this",
".",
"setState",
"(",
"{",
"refreshListenerUnsubscribe",
":",
"this",
".",
"props",
".",
"app",
".",
"getDataSource",
"(",
"'loadBalancers'",
")",
".",
"onRefresh",
"(",
"null",
",",
"(",
")",
"=>",
"this",
".",
"extractLoadBalancer",
"(",
")",
")",
",",
"}",
")",
";",
"}",
"else",
"{",
"this",
".",
"setState",
"(",
"{",
"refreshListenerUnsubscribe",
":",
"(",
")",
"=>",
"{",
"}",
",",
"}",
")",
";",
"}",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"app",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"loadBalancer",
",",
"loadBalancerNotFound",
",",
"loading",
"}",
"=",
"this",
".",
"state",
";",
"const",
"CloseButton",
"=",
"(",
"<",
"div",
"className",
"=",
"\"close-button\"",
">",
"<",
"UISref",
"to",
"=",
"\"^\"",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-remove\"",
"/",
">",
"<",
"/UISref>",
"<",
"/div>);",
"const",
"loadingHeader",
"=",
"(",
")",
"=>",
"(",
"<",
"div",
"className",
"=",
"\"header\"",
">",
"{",
"CloseButton",
"}",
"<",
"div",
"className",
"=",
"\"horizontal center middle\"",
">",
"<",
"Spinner",
"size",
"=",
"\"small\"",
"/",
">",
"<",
"/div>",
"<",
"/div>);",
"const",
"notFoundHeader",
"=",
"(",
")",
"=>",
"(",
"<",
"div",
"className",
"=",
"\"header\"",
">",
"{",
"CloseButton",
"}",
"<",
"div",
"className",
"=",
"\"header-text horizontal middle\"",
">",
"<",
"h3",
"className",
"=",
"\"horizontal middle space-between flex-1\"",
">",
"{",
"loadBalancerNotFound",
"}",
"<",
"/h3>",
"<",
"/div>",
"<",
"/div>);",
"const",
"loadBalancerHeader",
"=",
"(",
")",
"=>",
"(",
"<",
"div",
"className",
"=",
"\"header\"",
">",
"{",
"CloseButton",
"}",
"<",
"div",
"className",
"=",
"\"header-text horizontal middle\"",
">",
"<",
"i",
"className",
"=",
"\"fa icon-sitemap\"",
"/",
">",
"<",
"h3",
"className",
"=",
"\"horizontal middle space-between flex-1\"",
">",
"{",
"loadBalancer",
".",
"name",
"}",
"<",
"/h3>",
"<",
"/div>",
"<",
"CloudFoundryLoadBalancerActions",
"application",
"=",
"{",
"app",
"}",
"loadBalancer",
"=",
"{",
"loadBalancer",
"}",
"/",
">",
"<",
"/div>);",
"const",
"notFoundContent",
"=",
"(",
")",
"=>",
"(",
"<",
"div",
"className",
"=",
"\"content\"",
">",
"<",
"div",
"className",
"=",
"\"content-section\"",
">",
"<",
"div",
"className",
"=",
"\"content-body text-center\"",
">",
"<",
"h3",
">",
"Instance",
"not",
"found",
".",
"<",
"/h3>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"const",
"loadBalancerContent",
"=",
"(",
")",
"=>",
"(",
"<",
"div",
"className",
"=",
"\"content\"",
">",
"<",
"CloudFoundryLoadBalancerDetailsSection",
"loadBalancer",
"=",
"{",
"loadBalancer",
"}",
"/>",
"<",
"CloudFoundryLoadBalancerStatusSection",
"loadBalancer",
"=",
"{",
"loadBalancer",
"}",
"/",
">",
"<",
"CloudFoundryLoadBalancerLinksSection",
"loadBalancer",
"=",
"{",
"loadBalancer",
"}",
"/>",
"<",
"/div>);",
"return",
"(",
"<",
"div",
"className",
"=",
"\"details-panel\"",
">",
"{",
"loading",
"&&",
"loadingHeader",
"(",
")",
"}",
"{",
"!",
"loading",
"&&",
"!",
"!",
"loadBalancer",
"&&",
"loadBalancerHeader",
"(",
")",
"}",
"{",
"!",
"loading",
"&&",
"!",
"!",
"loadBalancer",
"&&",
"loadBalancerContent",
"(",
")",
"}",
"{",
"!",
"loading",
"&&",
"!",
"loadBalancer",
"&&",
"notFoundHeader",
"(",
")",
"}",
"{",
"!",
"loading",
"&&",
"!",
"loadBalancer",
"&&",
"notFoundContent",
"(",
")",
"}",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661705 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"HelpField",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"IFormikConfigFieldProps",
"{",
"label",
":",
"string",
";",
"helpKey",
"?",
":",
"string",
";",
"children",
"?",
":",
"React",
".",
"ReactNode",
";",
"}",
"export",
"class",
"FormikConfigField",
"extends",
"React",
".",
"Component",
"<",
"IFormikConfigFieldProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"label",
",",
"helpKey",
",",
"children",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"{",
"'StandardFieldLayout flex-container-h baseline margin-between-lg'",
"}",
">",
"<",
"label",
"className",
"=",
"{",
"`sm-label-right`",
"}",
">",
"<",
"span",
"className",
"=",
"\"label-text\"",
">",
"{",
"label",
"}",
"<",
"/span>",
"{",
"helpKey",
"&&",
"<",
"HelpField",
"id",
"=",
"{",
"helpKey",
"}",
"/>}",
"<",
"/label>",
"<",
"div",
"className",
"=",
"{",
"`flex-grow`",
"}",
">",
"{",
"children",
"}",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661706 | [
"import",
"{",
"FieldArray",
",",
"getIn",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"FormikFormField",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryEnvVar",
"}",
"from",
"'../../../domain'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../../../serverGroup/configure/serverGroupConfigurationModel.cf'",
";",
"export",
"interface",
"IEnvironmentVariablesProps",
"{",
"fieldName",
":",
"string",
";",
"onChange",
"?",
":",
"(",
"value",
":",
"string",
"[",
"]",
")",
"=>",
"void",
";",
"}",
"export",
"class",
"EnvironmentVariables",
"extends",
"React",
".",
"Component",
"<",
"IEnvironmentVariablesProps",
">",
"{",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"fieldName",
",",
"onChange",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-12\"",
">",
"<",
"b",
">",
"Environment",
"Variables",
"<",
"/b>",
"<",
"FieldArray",
"name",
"=",
"{",
"fieldName",
"}",
"render",
"=",
"{",
"(",
"arrayHelpers",
")",
"=>",
"{",
"const",
"serverGroupCommand",
"=",
"arrayHelpers",
".",
"form",
".",
"values",
";",
"const",
"environmentVariables",
"=",
"getIn",
"(",
"serverGroupCommand",
",",
"fieldName",
")",
"||",
"[",
"]",
";",
"return",
"(",
"<",
"table",
"className",
"=",
"\"table table-condensed packed tags\"",
">",
"<",
"thead",
">",
"<",
"tr",
">",
"<",
"th",
">",
"Name",
"<",
"/th>",
"<",
"th",
">",
"Value",
"<",
"/th>",
"<",
"/tr>",
"<",
"/thead>",
"<",
"tbody",
">",
"{",
"environmentVariables",
".",
"map",
"(",
"(",
"_",
",",
"index",
")",
"=>",
"{",
"const",
"envPath",
"=",
"`${",
"fieldName",
"}[${",
"index",
"}]`",
";",
"return",
"(",
"<",
"tr",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"td",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"`${",
"envPath",
"}.key`",
"}",
"onChange",
"=",
"{",
"(",
")",
"=>",
"{",
"onChange",
"&&",
"onChange",
"(",
"getIn",
"(",
"serverGroupCommand",
",",
"fieldName",
")",
"||",
"[",
"]",
")",
";",
"}",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/td>",
"<",
"td",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"`${",
"envPath",
"}.value`",
"}",
"onChange",
"=",
"{",
"(",
")",
"=>",
"{",
"onChange",
"&&",
"onChange",
"(",
"getIn",
"(",
"serverGroupCommand",
",",
"fieldName",
")",
"||",
"[",
"]",
")",
";",
"}",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/td>",
"<",
"td",
">",
"<",
"a",
"className",
"=",
"\"btn btn-link sm-label\"",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-trash\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"arrayHelpers",
".",
"remove",
"(",
"index",
")",
"}",
"/>",
"<",
"/a>",
"<",
"/td>",
"<",
"/tr>);",
"}",
")",
"}",
"<",
"/tbody>",
"<",
"tfoot",
">",
"<",
"tr",
">",
"<",
"td",
"colSpan",
"=",
"{",
"3",
"}",
">",
"<",
"button",
"type",
"=",
"\"button\"",
"className",
"=",
"\"add-new col-md-12\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"arrayHelpers",
".",
"push",
"(",
"{",
"key",
":",
"''",
",",
"value",
":",
"''",
"}",
"as",
"ICloudFoundryEnvVar",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"Add",
"New",
"Environment",
"Variable",
"<",
"/button>",
"<",
"/td>",
"<",
"/tr>",
"<",
"/tfoot>",
"<",
"/table>);",
"}",
"}",
"/>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30023,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661707 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"FormikFormField",
",",
"RadioButtonInput",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"IHealthCheckProps",
"{",
"healthCheckHttpEndpointFieldName",
":",
"string",
";",
"healthCheckType",
":",
"string",
";",
"healthCheckTypeFieldName",
":",
"string",
";",
"onHealthCheckHttpEndpointChange",
"?",
":",
"(",
"value",
":",
"string",
")",
"=>",
"void",
";",
"onHealthCheckTypeChange",
"?",
":",
"(",
"value",
":",
"string",
")",
"=>",
"void",
";",
"}",
"export",
"class",
"HealthCheck",
"extends",
"React",
".",
"Component",
"<",
"IHealthCheckProps",
">",
"{",
"private",
"HEALTH_CHECK_TYPE_OPTIONS",
"=",
"[",
"{",
"label",
":",
"'port'",
",",
"value",
":",
"'port'",
"}",
",",
"{",
"label",
":",
"'HTTP'",
",",
"value",
":",
"'http'",
"}",
",",
"{",
"label",
":",
"'process'",
",",
"value",
":",
"'process'",
"}",
",",
"]",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"healthCheckTypeFieldName",
",",
"healthCheckType",
",",
"healthCheckHttpEndpointFieldName",
",",
"onHealthCheckTypeChange",
",",
"onHealthCheckHttpEndpointChange",
",",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"col-md-9\"",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"healthCheckTypeFieldName",
"}",
"label",
"=",
"\"Health Check Type\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"RadioButtonInput",
"{",
"...",
"props",
"}",
"inline",
"=",
"{",
"true",
"}",
"options",
"=",
"{",
"this",
".",
"HEALTH_CHECK_TYPE_OPTIONS",
"}",
"/",
">",
"}",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"{",
"onHealthCheckTypeChange",
"&&",
"onHealthCheckTypeChange",
"(",
"value",
")",
";",
"}",
"}",
"/>",
"<",
"/div>",
"{",
"healthCheckType",
"===",
"'http'",
"&&",
"(",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"healthCheckHttpEndpointFieldName",
"}",
"label",
"=",
"\"Endpoint\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"}",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"{",
"onHealthCheckHttpEndpointChange",
"&&",
"onHealthCheckHttpEndpointChange",
"(",
"value",
")",
";",
"}",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>)}",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661708 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"FormikFormField",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"IInstanceParametersProps",
"{",
"diskQuotaFieldName",
":",
"string",
";",
"instancesFieldName",
":",
"string",
";",
"memoryFieldName",
":",
"string",
";",
"onDiskQuotaChange",
"?",
":",
"(",
"value",
":",
"string",
")",
"=>",
"void",
";",
"onInstancesChange",
"?",
":",
"(",
"value",
":",
"string",
")",
"=>",
"void",
";",
"onMemoryChange",
"?",
":",
"(",
"value",
":",
"string",
")",
"=>",
"void",
";",
"}",
"export",
"class",
"InstanceParameters",
"extends",
"React",
".",
"Component",
"<",
"IInstanceParametersProps",
">",
"{",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"diskQuotaFieldName",
",",
"instancesFieldName",
",",
"memoryFieldName",
",",
"onDiskQuotaChange",
",",
"onInstancesChange",
",",
"onMemoryChange",
",",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"col-md-9\"",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"memoryFieldName",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"label",
"=",
"\"Memory\"",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"{",
"onMemoryChange",
"&&",
"onMemoryChange",
"(",
"value",
")",
";",
"}",
"}",
"/>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"diskQuotaFieldName",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"label",
"=",
"\"Disk Quota\"",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"{",
"onDiskQuotaChange",
"&&",
"onDiskQuotaChange",
"(",
"value",
")",
";",
"}",
"}",
"/>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"instancesFieldName",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"type",
"=",
"\"number\"",
"{",
"...",
"props",
"}",
"/>} label=\"Instances\" onChange={(value) => {",
"onInstancesChange",
"&&",
"onInstancesChange",
"(",
"value",
")",
";",
"}",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661709 | [
"import",
"{",
"FieldArray",
",",
"getIn",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"FormikFormField",
",",
"HelpField",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../../../serverGroup/configure/serverGroupConfigurationModel.cf'",
";",
"export",
"interface",
"IRoutesProps",
"{",
"fieldName",
":",
"string",
";",
"onChange",
"?",
":",
"(",
"value",
":",
"string",
"[",
"]",
")",
"=>",
"void",
";",
"isRequired",
"?",
":",
"boolean",
";",
"singleRouteOnly",
"?",
":",
"boolean",
";",
"}",
"export",
"class",
"Routes",
"extends",
"React",
".",
"Component",
"<",
"IRoutesProps",
">",
"{",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"fieldName",
",",
"isRequired",
",",
"onChange",
",",
"singleRouteOnly",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-12\"",
">",
"<",
"b",
">",
"{",
"singleRouteOnly",
"?",
"'Route'",
":",
"'Routes'",
"}",
"<",
"/b>",
"&",
"nbsp",
";",
"{",
"!",
"isRequired",
"&&",
"<",
"HelpField",
"id",
"=",
"\"cf.serverGroup.routes\"",
"/",
">",
"}",
"{",
"!",
"!",
"isRequired",
"&&",
"<",
"HelpField",
"id",
"=",
"\"cf.serverGroup.requiredRoutes\"",
"/",
">",
"}",
"<",
"FieldArray",
"name",
"=",
"{",
"fieldName",
"}",
"render",
"=",
"{",
"(",
"arrayHelpers",
")",
"=>",
"{",
"const",
"serverGroupCommand",
"=",
"arrayHelpers",
".",
"form",
".",
"values",
";",
"const",
"routes",
"=",
"getIn",
"(",
"serverGroupCommand",
",",
"fieldName",
")",
"||",
"[",
"]",
";",
"return",
"(",
"<",
"table",
"className",
"=",
"\"table table-condensed packed metadata\"",
">",
"<",
"tbody",
">",
"{",
"routes",
".",
"map",
"(",
"(",
"_",
",",
"index",
")",
"=>",
"(",
"<",
"tr",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"td",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"`${",
"fieldName",
"}[${",
"index",
"}]`",
"}",
"onChange",
"=",
"{",
"(",
")",
"=>",
"{",
"onChange",
"&&",
"onChange",
"(",
"getIn",
"(",
"serverGroupCommand",
",",
"fieldName",
")",
"||",
"[",
"]",
")",
";",
"}",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/td>",
"<",
"td",
"hidden",
"=",
"{",
"singleRouteOnly",
"}",
">",
"<",
"a",
"className",
"=",
"\"btn btn-link sm-label\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"arrayHelpers",
".",
"remove",
"(",
"index",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-trash\"",
"/",
">",
"<",
"/a>",
"<",
"/td>",
"<",
"/tr>))}",
"<",
"/tbody>",
"<",
"tfoot",
">",
"<",
"tr",
"hidden",
"=",
"{",
"singleRouteOnly",
"}",
">",
"<",
"td",
"colSpan",
"=",
"{",
"2",
"}",
">",
"<",
"button",
"type",
"=",
"\"button\"",
"className",
"=",
"\"add-new col-md-12\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"arrayHelpers",
".",
"push",
"(",
"''",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"Add",
"New",
"Route",
"<",
"/button>",
"<",
"/td>",
"<",
"/tr>",
"<",
"/tfoot>",
"<",
"/table>);",
"}",
"}",
"/>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30023,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661710 | [
"import",
"{",
"first",
",",
"isNil",
",",
"uniq",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"Select",
",",
"{",
"Creatable",
"}",
"from",
"'react-select'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IMoniker",
",",
"IServerGroup",
",",
"IServerGroupFilter",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AppListExtractor",
",",
"StageConfigField",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"IAccountRegionClusterSelectorProps",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"application",
":",
"Application",
";",
"cloudProvider",
":",
"string",
";",
"clusterField",
"?",
":",
"string",
";",
"component",
":",
"any",
";",
"componentName",
"?",
":",
"string",
";",
"isSingleRegion",
"?",
":",
"boolean",
";",
"onComponentUpdate",
"?",
":",
"(",
"component",
":",
"any",
")",
"=>",
"void",
";",
"}",
"export",
"interface",
"IAccountRegionClusterSelectorState",
"{",
"[",
"k",
"]",
":",
"any",
";",
"availableRegions",
":",
"string",
"[",
"]",
";",
"clusterField",
":",
"string",
";",
"clusters",
":",
"string",
"[",
"]",
";",
"componentName",
":",
"string",
";",
"}",
"export",
"class",
"AccountRegionClusterSelector",
"extends",
"React",
".",
"Component",
"<",
"IAccountRegionClusterSelectorProps",
",",
"IAccountRegionClusterSelectorState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"clusterField",
"=",
"props",
".",
"clusterField",
"||",
"'cluster'",
";",
"this",
".",
"state",
"=",
"{",
"availableRegions",
":",
"[",
"]",
",",
"cloudProvider",
":",
"props",
".",
"cloudProvider",
",",
"clusterField",
":",
"clusterField",
",",
"clusters",
":",
"[",
"]",
",",
"componentName",
":",
"props",
".",
"componentName",
"||",
"''",
",",
"[",
"clusterField",
"]",
":",
"props",
".",
"component",
"[",
"clusterField",
"]",
",",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"this",
".",
"setRegionList",
"(",
"this",
".",
"props",
".",
"component",
".",
"credentials",
")",
";",
"this",
".",
"setClusterList",
"(",
"this",
".",
"props",
".",
"component",
".",
"credentials",
",",
"this",
".",
"props",
".",
"isSingleRegion",
"?",
"[",
"this",
".",
"props",
".",
"component",
".",
"region",
"]",
":",
"this",
".",
"props",
".",
"component",
".",
"regions",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"setRegionList",
"=",
"(",
"credentials",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"application",
"}",
"=",
"this",
".",
"props",
";",
"const",
"accountFilter",
"=",
"(",
"serverGroup",
")",
"=>",
"serverGroup",
"?",
"serverGroup",
".",
"account",
"===",
"credentials",
":",
"true",
";",
"observableFrom",
"(",
"application",
".",
"ready",
"(",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
")",
"=>",
"{",
"const",
"availableRegions",
"=",
"AppListExtractor",
".",
"getRegions",
"(",
"[",
"application",
"]",
",",
"accountFilter",
")",
";",
"availableRegions",
".",
"sort",
"(",
")",
";",
"this",
".",
"setState",
"(",
"{",
"availableRegions",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"setClusterList",
"=",
"(",
"credentials",
",",
"regions",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"application",
"}",
"=",
"this",
".",
"props",
";",
"observableFrom",
"(",
"application",
".",
"ready",
"(",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
")",
"=>",
"{",
"const",
"clusterFilter",
"=",
"AppListExtractor",
".",
"clusterFilterForCredentialsAndRegion",
"(",
"credentials",
",",
"regions",
")",
";",
"const",
"clusters",
"=",
"AppListExtractor",
".",
"getClusters",
"(",
"[",
"application",
"]",
",",
"clusterFilter",
")",
";",
"const",
"clusterField",
"=",
"this",
".",
"props",
".",
"component",
"[",
"this",
".",
"state",
".",
"clusterField",
"]",
";",
"if",
"(",
"clusterField",
"&&",
"!",
"clusters",
".",
"includes",
"(",
"clusterField",
")",
")",
"{",
"clusters",
".",
"push",
"(",
"clusterField",
")",
";",
"}",
"this",
".",
"setState",
"(",
"{",
"clusters",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"public",
"onAccountUpdate",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"credentials",
"=",
"option",
".",
"value",
";",
"this",
".",
"setRegionList",
"(",
"credentials",
")",
";",
"this",
".",
"setClusterList",
"(",
"credentials",
",",
"[",
"]",
")",
";",
"this",
".",
"props",
".",
"onComponentUpdate",
"&&",
"this",
".",
"props",
".",
"onComponentUpdate",
"(",
"{",
"...",
"this",
".",
"props",
".",
"component",
",",
"credentials",
",",
"region",
":",
"''",
",",
"regions",
":",
"[",
"]",
",",
"[",
"this",
".",
"state",
".",
"clusterField",
"]",
":",
"undefined",
",",
"}",
")",
";",
"}",
";",
"public",
"onRegionsUpdate",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"regions",
"=",
"option",
".",
"map",
"(",
"(",
"o",
")",
"=>",
"o",
".",
"value",
")",
";",
"this",
".",
"setClusterList",
"(",
"this",
".",
"props",
".",
"component",
".",
"credentials",
",",
"regions",
")",
";",
"this",
".",
"props",
".",
"onComponentUpdate",
"&&",
"this",
".",
"props",
".",
"onComponentUpdate",
"(",
"{",
"...",
"this",
".",
"props",
".",
"component",
",",
"regions",
",",
"[",
"this",
".",
"state",
".",
"clusterField",
"]",
":",
"undefined",
",",
"}",
")",
";",
"}",
";",
"public",
"onRegionUpdate",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"region",
"=",
"option",
".",
"value",
";",
"this",
".",
"setClusterList",
"(",
"this",
".",
"props",
".",
"component",
".",
"credentials",
",",
"[",
"region",
"]",
")",
";",
"this",
".",
"props",
".",
"onComponentUpdate",
"&&",
"this",
".",
"props",
".",
"onComponentUpdate",
"(",
"{",
"...",
"this",
".",
"props",
".",
"component",
",",
"region",
",",
"[",
"this",
".",
"state",
".",
"clusterField",
"]",
":",
"undefined",
",",
"}",
")",
";",
"}",
";",
"public",
"onClusterUpdate",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"clusterName",
"=",
"option",
".",
"value",
";",
"const",
"filterByCluster",
"=",
"AppListExtractor",
".",
"monikerClusterNameFilter",
"(",
"clusterName",
")",
";",
"const",
"clusterMoniker",
"=",
"first",
"(",
"uniq",
"(",
"AppListExtractor",
".",
"getMonikers",
"(",
"[",
"this",
".",
"props",
".",
"application",
"]",
",",
"filterByCluster",
")",
")",
")",
";",
"let",
"moniker",
";",
"if",
"(",
"isNil",
"(",
"clusterMoniker",
")",
")",
"{",
"moniker",
"=",
"undefined",
";",
"}",
"else",
"{",
"clusterMoniker",
".",
"sequence",
"=",
"null",
";",
"moniker",
"=",
"clusterMoniker",
";",
"}",
"if",
"(",
"option",
".",
"className",
")",
"{",
"const",
"clusters",
"=",
"this",
".",
"state",
".",
"clusters",
";",
"clusters",
".",
"push",
"(",
"clusterName",
")",
";",
"this",
".",
"setState",
"(",
"clusters",
")",
";",
"}",
"this",
".",
"props",
".",
"onComponentUpdate",
"&&",
"this",
".",
"props",
".",
"onComponentUpdate",
"(",
"{",
"...",
"this",
".",
"props",
".",
"component",
",",
"[",
"this",
".",
"state",
".",
"clusterField",
"]",
":",
"clusterName",
",",
"moniker",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"accounts",
",",
"isSingleRegion",
",",
"component",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"availableRegions",
",",
"clusters",
",",
"clusterField",
",",
"componentName",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Account\"",
">",
"<",
"Select",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.credentials`",
":",
"'credentials'",
"}",
"options",
"=",
"{",
"accounts",
"&&",
"accounts",
".",
"map",
"(",
"(",
"acc",
")",
"=>",
"(",
"{",
"label",
":",
"acc",
".",
"name",
",",
"value",
":",
"acc",
".",
"name",
",",
"}",
")",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"component",
".",
"credentials",
"}",
"onChange",
"=",
"{",
"this",
".",
"onAccountUpdate",
"}",
"/",
">",
"<",
"/StageConfigField>",
"{",
"!",
"isSingleRegion",
"&&",
"(",
"<",
"StageConfigField",
"label",
"=",
"\"Region\"",
">",
"<",
"Select",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.regions`",
":",
"'regions'",
"}",
"options",
"=",
"{",
"availableRegions",
"&&",
"availableRegions",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"(",
"{",
"label",
":",
"r",
",",
"value",
":",
"r",
",",
"}",
")",
")",
"}",
"multi",
"=",
"{",
"true",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"component",
".",
"regions",
"}",
"onChange",
"=",
"{",
"this",
".",
"onRegionsUpdate",
"}",
"/",
">",
"<",
"/StageConfigField>)}",
"{",
"isSingleRegion",
"&&",
"(",
"<",
"StageConfigField",
"label",
"=",
"\"Region\"",
">",
"<",
"Select",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.region`",
":",
"'region'",
"}",
"options",
"=",
"{",
"availableRegions",
"&&",
"availableRegions",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"(",
"{",
"label",
":",
"r",
",",
"value",
":",
"r",
",",
"}",
")",
")",
"}",
"multi",
"=",
"{",
"false",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"component",
".",
"region",
"}",
"onChange",
"=",
"{",
"this",
".",
"onRegionUpdate",
"}",
"/",
">",
"<",
"/StageConfigField>)}",
"<",
"StageConfigField",
"label",
"=",
"\"Cluster\"",
"helpKey",
"=",
"{",
"'pipeline.config.findAmi.cluster'",
"}",
">",
"<",
"Creatable",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.${",
"clusterField",
"}`",
":",
"`${",
"clusterField",
"}`",
"}",
"options",
"=",
"{",
"clusters",
"&&",
"clusters",
".",
"map",
"(",
"(",
"c",
")",
"=>",
"(",
"{",
"label",
":",
"c",
",",
"value",
":",
"c",
",",
"}",
")",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"component",
"[",
"clusterField",
"]",
"}",
"onChange",
"=",
"{",
"this",
".",
"onClusterUpdate",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
9812,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2222,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661711 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"AccountTag",
",",
"CollapsibleSection",
",",
"timestamp",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"import",
"type",
"{",
"ICloudFoundryBuildpack",
"}",
"from",
"'../../../domain'",
";",
"export",
"class",
"ServerGroupInformationSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Server Group Information\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"<",
"dt",
">",
"Created",
"<",
"/dt>",
"{",
"serverGroup",
".",
"pipelineId",
"?",
"(",
"<",
"dd",
">",
"<",
"a",
"target",
"=",
"\"_blank\"",
"href",
"=",
"{",
"'/#/applications/'",
"+",
"serverGroup",
".",
"app",
"+",
"'/executions/'",
"+",
"serverGroup",
".",
"pipelineId",
"}",
">",
"{",
"timestamp",
"(",
"serverGroup",
".",
"createdTime",
")",
"}",
"<",
"/a>",
"<",
"/dd>) : (<dd>{timestamp(serverGroup.createdTime)}</dd",
">",
")",
"}",
"<",
"dt",
">",
"Account",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"AccountTag",
"account",
"=",
"{",
"serverGroup",
".",
"account",
"}",
"/>",
"<",
"/dd>",
"<",
"dt",
">",
"Organization",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"space",
".",
"organization",
".",
"name",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Space",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"space",
".",
"name",
"}",
"<",
"/dd>",
"{",
"serverGroup",
".",
"droplet",
"&&",
"(",
"<",
"div",
">",
"<",
"dt",
">",
"Rootfs",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"droplet",
".",
"stack",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Buildpack",
"<",
"/dt>",
"{",
"serverGroup",
".",
"droplet",
".",
"buildpacks",
"?",
"(",
"serverGroup",
".",
"droplet",
".",
"buildpacks",
".",
"map",
"(",
"function",
"(",
"buildpack",
",",
"index",
")",
"{",
"return",
"(",
"<",
"dd",
"key",
"=",
"{",
"index",
"}",
">",
"{",
"buildpack",
".",
"name",
"}",
"{",
"buildpack",
".",
"version",
"}",
"<",
"/dd>);",
"}",
")",
")",
":",
"(",
"<",
"dd",
">",
"n",
"/",
"a",
"<",
"/dd>)}",
"<",
"/div>)}",
"<",
"/dl>",
"<",
"/CollapsibleSection>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661712 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"export",
"class",
"ApplicationManagerSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"appsManagerUri",
"}",
"=",
"serverGroup",
";",
"return",
"(",
"<",
">",
"{",
"appsManagerUri",
"&&",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Apps Manager\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"div",
">",
"<",
"a",
"href",
"=",
"{",
"appsManagerUri",
"}",
"target",
"=",
"\"_blank\"",
">",
"Apps",
"Manager",
"<",
"/a>",
"<",
"/div>",
"<",
"/CollapsibleSection>)}",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661713 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"export",
"class",
"ServerGroupSizingSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Server Group Sizing\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"<",
"dt",
">",
"Instances",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"instances",
".",
"length",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Disk",
"(",
"MB",
")",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"diskQuota",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Memory",
"(",
"MB",
")",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"memory",
"}",
"<",
"/dd>",
"<",
"/dl>",
"<",
"/CollapsibleSection>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661714 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"export",
"class",
"HealthCheckSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Health Check\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"<",
"dt",
">",
"Type",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"healthCheckType",
"===",
"undefined",
"?",
"'port'",
":",
"serverGroup",
".",
"healthCheckType",
"}",
"<",
"/dd>",
"{",
"serverGroup",
".",
"healthCheckType",
"===",
"'http'",
"&&",
"(",
"<",
"div",
">",
"<",
"dt",
">",
"Endpoint",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"healthCheckHttpEndpoint",
"}",
"<",
"/dd>",
"<",
"/div>)}",
"<",
"/dl>",
"<",
"/CollapsibleSection>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661715 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"export",
"class",
"PackageSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"{",
"serverGroup",
".",
"droplet",
"&&",
"serverGroup",
".",
"droplet",
".",
"sourcePackage",
"&&",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Package\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"<",
"dt",
">",
"Checksum",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"droplet",
".",
"sourcePackage",
".",
"checksum",
"}",
"<",
"/dd>",
"<",
"/dl>",
"<",
"/CollapsibleSection>)}",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661716 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"export",
"class",
"BuildSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Build\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"{",
"serverGroup",
".",
"ciBuild",
"&&",
"serverGroup",
".",
"ciBuild",
".",
"jobName",
"&&",
"(",
"<",
"div",
">",
"<",
"dt",
">",
"Job",
"Name",
"<",
"/",
"dt",
">",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"ciBuild",
".",
"jobName",
"}",
"<",
"/dd>",
"<",
"/div>)}",
"{",
"serverGroup",
".",
"ciBuild",
"&&",
"serverGroup",
".",
"ciBuild",
".",
"jobNumber",
"&&",
"(",
"<",
"div",
">",
"<",
"dt",
">",
"Job",
"Number",
"<",
"/dt>",
"{",
"serverGroup",
".",
"ciBuild",
".",
"jobUrl",
"?",
"(",
"<",
"dd",
">",
"<",
"a",
"target",
"=",
"\"_blank\"",
"href",
"=",
"{",
"serverGroup",
".",
"ciBuild",
".",
"jobUrl",
"}",
">",
"{",
"serverGroup",
".",
"ciBuild",
".",
"jobNumber",
"}",
"<",
"/a>",
"<",
"/dd>) : (<dd>{serverGroup.ciBuild.jobNumber}</dd",
">",
")",
"}",
"<",
"/div>)}",
"{",
"serverGroup",
".",
"appArtifact",
"&&",
"serverGroup",
".",
"appArtifact",
".",
"name",
"&&",
"(",
"<",
"div",
">",
"<",
"dt",
">",
"Artifact",
"Name",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroup",
".",
"appArtifact",
".",
"name",
"}",
"<",
"/dd>",
"<",
"/div>)}",
"{",
"serverGroup",
".",
"appArtifact",
"&&",
"serverGroup",
".",
"appArtifact",
".",
"version",
"&&",
"(",
"<",
"div",
">",
"<",
"dt",
">",
"Version",
"<",
"/dt>",
"{",
"serverGroup",
".",
"appArtifact",
".",
"url",
"?",
"(",
"<",
"dd",
">",
"<",
"a",
"target",
"=",
"\"_blank\"",
"href",
"=",
"{",
"serverGroup",
".",
"appArtifact",
".",
"url",
"}",
">",
"{",
"serverGroup",
".",
"appArtifact",
".",
"version",
"}",
"<",
"/a>",
"<",
"/dd>) : (<dd>{serverGroup.appArtifact.version}</dd",
">",
")",
"}",
"<",
"/div>)}",
"<",
"/dl>",
"<",
"/CollapsibleSection>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661717 | [
"import",
"{",
"isEmpty",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"import",
"type",
"{",
"ICloudFoundryServiceInstance",
"}",
"from",
"'../../../domain'",
";",
"export",
"class",
"BoundServicesSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"{",
"!",
"isEmpty",
"(",
"serverGroup",
".",
"serviceInstances",
")",
"&&",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Bound Services\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"{",
"serverGroup",
".",
"serviceInstances",
".",
"map",
"(",
"function",
"(",
"service",
",",
"index",
")",
"{",
"return",
"(",
"<",
"div",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"dt",
">",
"Name",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"service",
".",
"name",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Plan",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"service",
".",
"plan",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Tags",
"<",
"/dt>",
"{",
"service",
".",
"tags",
"&&",
"<",
"dd",
">",
"{",
"service",
".",
"tags",
".",
"join",
"(",
"', '",
")",
"}",
"<",
"/dd>}",
"<",
"/div>);",
"}",
")",
"}",
"<",
"/dl>",
"<",
"/CollapsibleSection>)}",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661718 | [
"import",
"{",
"isEmpty",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"CollapsibleSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroupDetailsSectionProps",
"}",
"from",
"'./ICloudFoundryServerGroupDetailsSectionProps'",
";",
"export",
"class",
"EnvironmentVariablesSection",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupDetailsSectionProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"{",
"!",
"isEmpty",
"(",
"serverGroup",
".",
"env",
")",
"&&",
"(",
"<",
"CollapsibleSection",
"heading",
"=",
"\"Environment Variables\"",
"defaultExpanded",
"=",
"{",
"true",
"}",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal dl-narrow\"",
">",
"{",
"Object",
".",
"entries",
"(",
"serverGroup",
".",
"env",
")",
".",
"map",
"(",
"(",
"[",
"k",
",",
"v",
"]",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"div",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"dt",
">",
"{",
"k",
"}",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"v",
"}",
"<",
"/dd>",
"<",
"/div>);",
"}",
")",
"}",
"<",
"/dl>",
"<",
"/CollapsibleSection>)}",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661719 | [
"import",
"type",
"{",
"Application",
",",
"IPipeline",
",",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryApplication",
",",
"ICloudFoundryEnvVar",
",",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../domain'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
",",
"ICloudFoundryDeployConfiguration",
",",
"}",
"from",
"'./serverGroupConfigurationModel.cf'",
";",
"export",
"class",
"CloudFoundryServerGroupCommandBuilder",
"{",
"private",
"static",
"envVarsFromObject",
"(",
"someObject",
")",
"{",
"const",
"envVars",
"=",
"[",
"]",
";",
"for",
"(",
"const",
"property",
"in",
"someObject",
")",
"{",
"if",
"(",
"someObject",
".",
"hasOwnProperty",
"(",
"property",
")",
")",
"{",
"const",
"envVar",
"=",
"{",
"key",
":",
"property",
",",
"value",
":",
"someObject",
"[",
"property",
"]",
"}",
";",
"envVars",
".",
"push",
"(",
"envVar",
")",
";",
"}",
"}",
"return",
"envVars",
";",
"}",
"private",
"static",
"getSubmitButtonLabel",
"(",
"mode",
")",
"{",
"switch",
"(",
"mode",
")",
"{",
"case",
"'createPipeline'",
":",
"return",
"'Add'",
";",
"case",
"'editPipeline'",
":",
"case",
"'editClonePipeline'",
":",
"return",
"'Done'",
";",
"case",
"'clone'",
":",
"return",
"'Clone'",
";",
"default",
":",
"return",
"'Create'",
";",
"}",
"}",
"public",
"static",
"buildNewServerGroupCommand",
"(",
"app",
",",
"defaults",
")",
"{",
"defaults",
"=",
"defaults",
"||",
"{",
"}",
";",
"return",
"{",
"application",
":",
"app",
".",
"name",
",",
"stack",
":",
"''",
",",
"freeFormDetails",
":",
"''",
",",
"region",
":",
"''",
",",
"strategy",
":",
"''",
",",
"credentials",
":",
"''",
",",
"viewState",
":",
"{",
"mode",
":",
"defaults",
".",
"mode",
"||",
"'create'",
",",
"submitButtonLabel",
":",
"CloudFoundryServerGroupCommandBuilder",
".",
"getSubmitButtonLabel",
"(",
"defaults",
".",
"mode",
"||",
"'create'",
")",
",",
"}",
",",
"selectedProvider",
":",
"'cloudfoundry'",
",",
"startApplication",
":",
"true",
",",
"}",
"as",
"ICloudFoundryCreateServerGroupCommand",
";",
"}",
"public",
"static",
"buildServerGroupCommandFromExisting",
"(",
"app",
",",
"serverGroup",
",",
"mode",
"=",
"'clone'",
")",
"{",
"const",
"command",
"=",
"this",
".",
"buildNewServerGroupCommand",
"(",
"app",
",",
"{",
"mode",
"}",
")",
";",
"command",
".",
"credentials",
"=",
"''",
";",
"command",
".",
"manifest",
"=",
"{",
"direct",
":",
"{",
"memory",
":",
"serverGroup",
".",
"memory",
"?",
"serverGroup",
".",
"memory",
"+",
"'M'",
":",
"'1024M'",
",",
"diskQuota",
":",
"serverGroup",
".",
"diskQuota",
"?",
"serverGroup",
".",
"diskQuota",
"+",
"'M'",
":",
"'1024M'",
",",
"buildpacks",
":",
"serverGroup",
".",
"droplet",
"&&",
"serverGroup",
".",
"droplet",
".",
"buildpacks",
"?",
"serverGroup",
".",
"droplet",
".",
"buildpacks",
".",
"map",
"(",
"(",
"item",
")",
"=>",
"item",
".",
"name",
")",
":",
"[",
"]",
",",
"instances",
":",
"serverGroup",
".",
"instances",
"?",
"serverGroup",
".",
"instances",
".",
"length",
":",
"1",
",",
"routes",
":",
"serverGroup",
".",
"loadBalancers",
"||",
"[",
"]",
",",
"environment",
":",
"CloudFoundryServerGroupCommandBuilder",
".",
"envVarsFromObject",
"(",
"serverGroup",
".",
"env",
")",
",",
"services",
":",
"(",
"serverGroup",
".",
"serviceInstances",
"||",
"[",
"]",
")",
".",
"map",
"(",
"(",
"serviceInstance",
")",
"=>",
"serviceInstance",
".",
"name",
")",
",",
"healthCheckType",
":",
"'port'",
",",
"}",
",",
"}",
";",
"command",
".",
"region",
"=",
"''",
";",
"command",
".",
"stack",
"=",
"serverGroup",
".",
"stack",
";",
"command",
".",
"freeFormDetails",
"=",
"serverGroup",
".",
"detail",
";",
"command",
".",
"source",
"=",
"{",
"asgName",
":",
"serverGroup",
".",
"name",
",",
"region",
":",
"serverGroup",
".",
"region",
",",
"account",
":",
"serverGroup",
".",
"account",
",",
"}",
";",
"return",
"command",
";",
"}",
"public",
"static",
"buildNewServerGroupCommandForPipeline",
"(",
"stage",
",",
"pipeline",
")",
"{",
"const",
"command",
"=",
"this",
".",
"buildNewServerGroupCommand",
"(",
"{",
"name",
":",
"pipeline",
".",
"application",
"}",
"as",
"Application",
",",
"{",
"mode",
":",
"'editPipeline'",
"}",
")",
";",
"command",
".",
"viewState",
"=",
"{",
"...",
"command",
".",
"viewState",
",",
"pipeline",
",",
"requiresTemplateSelection",
":",
"true",
",",
"stage",
",",
"}",
";",
"return",
"command",
";",
"}",
"public",
"static",
"buildServerGroupCommandFromPipeline",
"(",
"application",
",",
"originalCluster",
",",
"stage",
",",
"pipeline",
")",
"{",
"const",
"command",
"=",
"this",
".",
"buildNewServerGroupCommand",
"(",
"application",
",",
"{",
"mode",
":",
"'editPipeline'",
"}",
")",
";",
"command",
".",
"credentials",
"=",
"originalCluster",
".",
"account",
";",
"command",
".",
"applicationArtifact",
"=",
"originalCluster",
".",
"applicationArtifact",
";",
"command",
".",
"delayBeforeDisableSec",
"=",
"originalCluster",
".",
"delayBeforeDisableSec",
";",
"command",
".",
"manifest",
"=",
"originalCluster",
".",
"manifest",
";",
"command",
".",
"maxRemainingAsgs",
"=",
"originalCluster",
".",
"maxRemainingAsgs",
";",
"command",
".",
"region",
"=",
"originalCluster",
".",
"region",
";",
"command",
".",
"rollback",
"=",
"originalCluster",
".",
"rollback",
";",
"command",
".",
"strategy",
"=",
"originalCluster",
".",
"strategy",
";",
"command",
".",
"startApplication",
"=",
"originalCluster",
".",
"startApplication",
";",
"command",
".",
"targetPercentages",
"=",
"originalCluster",
".",
"targetPercentages",
";",
"command",
".",
"delayBeforeScaleDownSec",
"=",
"originalCluster",
".",
"delayBeforeScaleDownSec",
";",
"if",
"(",
"originalCluster",
".",
"stack",
")",
"{",
"command",
".",
"stack",
"=",
"originalCluster",
".",
"stack",
";",
"}",
"if",
"(",
"originalCluster",
".",
"freeFormDetails",
")",
"{",
"command",
".",
"freeFormDetails",
"=",
"originalCluster",
".",
"freeFormDetails",
";",
"}",
"command",
".",
"viewState",
"=",
"{",
"...",
"command",
".",
"viewState",
",",
"pipeline",
",",
"stage",
",",
"}",
";",
"return",
"command",
";",
"}",
"public",
"static",
"buildCloneServerGroupCommandFromPipeline",
"(",
"stage",
",",
"pipeline",
")",
"{",
"const",
"command",
"=",
"this",
".",
"buildNewServerGroupCommand",
"(",
"{",
"name",
":",
"pipeline",
".",
"application",
"}",
"as",
"Application",
",",
"{",
"mode",
":",
"'editClonePipeline'",
",",
"}",
")",
";",
"command",
".",
"credentials",
"=",
"stage",
".",
"credentials",
";",
"command",
".",
"capacity",
"=",
"stage",
".",
"capacity",
";",
"command",
".",
"account",
"=",
"stage",
".",
"account",
";",
"command",
".",
"delayBeforeDisableSec",
"=",
"stage",
".",
"delayBeforeDisableSec",
";",
"command",
".",
"freeFormDetails",
"=",
"stage",
".",
"freeFormDetails",
"||",
"command",
".",
"freeFormDetails",
";",
"command",
".",
"maxRemainingAsgs",
"=",
"stage",
".",
"maxRemainingAsgs",
";",
"command",
".",
"region",
"=",
"stage",
".",
"region",
";",
"command",
".",
"startApplication",
"=",
"stage",
".",
"startApplication",
"===",
"undefined",
"||",
"stage",
".",
"startApplication",
";",
"command",
".",
"stack",
"=",
"stage",
".",
"stack",
"||",
"command",
".",
"stack",
";",
"command",
".",
"strategy",
"=",
"stage",
".",
"strategy",
";",
"command",
".",
"target",
"=",
"stage",
".",
"target",
";",
"command",
".",
"targetCluster",
"=",
"stage",
".",
"targetCluster",
";",
"command",
".",
"manifest",
"=",
"stage",
".",
"manifest",
"||",
"command",
".",
"manifest",
";",
"command",
".",
"source",
"=",
"stage",
".",
"source",
";",
"command",
".",
"viewState",
"=",
"{",
"...",
"command",
".",
"viewState",
",",
"pipeline",
",",
"stage",
",",
"}",
";",
"return",
"command",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
261,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
261,
null,
17339,
null,
2,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
3649,
null,
15666,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
0,
null,
0,
null,
3649,
null,
15666,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
3649,
null,
15666,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661720 | [
"import",
"type",
"{",
"IQService",
"}",
"from",
"'angular'",
";",
"import",
"type",
"{",
"Application",
",",
"IPipeline",
",",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryApplication",
",",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../domain'",
";",
"import",
"{",
"CloudFoundryServerGroupCommandBuilder",
"}",
"from",
"'./serverGroupCommandBuilder.service.cf'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
",",
"ICloudFoundryDeployConfiguration",
",",
"}",
"from",
"'./serverGroupConfigurationModel.cf'",
";",
"export",
"class",
"CloudFoundryServerGroupCommandBuilderShim",
"{",
"public",
"static",
"$inject",
"=",
"[",
"'$q'",
"]",
";",
"constructor",
"(",
"private",
"$q",
")",
"{",
"}",
"public",
"buildNewServerGroupCommand",
"(",
"app",
",",
"defaults",
")",
"{",
"return",
"this",
".",
"$q",
".",
"when",
"(",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildNewServerGroupCommand",
"(",
"app",
",",
"defaults",
")",
")",
";",
"}",
"public",
"buildServerGroupCommandFromExisting",
"(",
"app",
",",
"serverGroup",
",",
"mode",
"=",
"'clone'",
")",
"{",
"return",
"this",
".",
"$q",
".",
"when",
"(",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildServerGroupCommandFromExisting",
"(",
"app",
",",
"serverGroup",
",",
"mode",
")",
")",
";",
"}",
"public",
"buildNewServerGroupCommandForPipeline",
"(",
"stage",
",",
"pipeline",
")",
"{",
"return",
"this",
".",
"$q",
".",
"when",
"(",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildNewServerGroupCommandForPipeline",
"(",
"stage",
",",
"pipeline",
")",
")",
";",
"}",
"public",
"buildServerGroupCommandFromPipeline",
"(",
"application",
",",
"originalCluster",
",",
"stage",
",",
"pipeline",
")",
"{",
"return",
"this",
".",
"$q",
".",
"when",
"(",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildServerGroupCommandFromPipeline",
"(",
"application",
",",
"originalCluster",
",",
"stage",
",",
"pipeline",
")",
")",
";",
"}",
"public",
"buildCloneServerGroupCommandFromPipeline",
"(",
"stage",
",",
"pipeline",
")",
"{",
"return",
"this",
".",
"$q",
".",
"when",
"(",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildCloneServerGroupCommandFromPipeline",
"(",
"stage",
",",
"pipeline",
")",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23490,
null,
null,
null,
null,
580,
null,
261,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
261,
null,
17339,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
3649,
null,
15666,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
0,
null,
0,
null,
3649,
null,
15666,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
3649,
null,
15666,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661721 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Application",
",",
"ITemplateSelectionText",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"DeployInitializer",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../serverGroupConfigurationModel.cf'",
";",
"export",
"interface",
"IServerGroupTemplateSelectionProps",
"{",
"app",
":",
"Application",
";",
"command",
":",
"ICloudFoundryCreateServerGroupCommand",
";",
"onDismiss",
":",
"(",
")",
"=>",
"void",
";",
"onTemplateSelected",
":",
"(",
")",
"=>",
"void",
";",
"}",
"export",
"interface",
"IServerGroupTemplateSelectionState",
"{",
"templateSelectionText",
":",
"ITemplateSelectionText",
";",
"}",
"export",
"class",
"ServerGroupTemplateSelection",
"extends",
"React",
".",
"Component",
"<",
"IServerGroupTemplateSelectionProps",
",",
"IServerGroupTemplateSelectionState",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"state",
"=",
"{",
"templateSelectionText",
":",
"{",
"copied",
":",
"[",
"'account, region, cluster name (stack, details)'",
",",
"'routes'",
",",
"'service instances'",
",",
"'instance settings'",
",",
"'environment variables'",
",",
"]",
",",
"notCopied",
":",
"[",
"'artifacts'",
"]",
",",
"additionalCopyText",
":",
"''",
",",
"}",
",",
"}",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"app",
",",
"command",
",",
"onDismiss",
",",
"onTemplateSelected",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"templateSelectionText",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
"DeployInitializer",
"cloudProvider",
"=",
"\"cloudfoundry\"",
"application",
"=",
"{",
"app",
"}",
"command",
"=",
"{",
"command",
"}",
"onDismiss",
"=",
"{",
"onDismiss",
"}",
"onTemplateSelected",
"=",
"{",
"onTemplateSelected",
"}",
"templateSelectionText",
"=",
"{",
"templateSelectionText",
"}",
"/",
">",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661722 | [
"import",
"type",
"{",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IArtifact",
",",
"IExpectedArtifact",
",",
"IPipeline",
",",
"IStage",
",",
"IWizardPageComponent",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ArtifactTypePatterns",
",",
"StageArtifactSelector",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikConfigField",
"}",
"from",
"'../../../../../presentation'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../../../serverGroupConfigurationModel.cf'",
";",
"export",
"interface",
"ICloudFoundryCreateServerGroupArtifactSettingsProps",
"{",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"stage",
":",
"IStage",
";",
"pipeline",
":",
"IPipeline",
";",
"}",
"export",
"class",
"CloudFoundryServerGroupArtifactSettings",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryCreateServerGroupArtifactSettingsProps",
">",
"implements",
"IWizardPageComponent",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
"{",
"public",
"static",
"get",
"LABEL",
"(",
")",
"{",
"return",
"'Artifact'",
";",
"}",
"private",
"excludedArtifactTypePatterns",
"=",
"[",
"ArtifactTypePatterns",
".",
"KUBERNETES",
",",
"ArtifactTypePatterns",
".",
"FRONT50_PIPELINE_TEMPLATE",
",",
"]",
";",
"private",
"onExpectedArtifactSelected",
"=",
"(",
"expectedArtifact",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'applicationArtifact'",
",",
"{",
"artifactId",
":",
"expectedArtifact",
".",
"id",
"}",
")",
";",
"}",
";",
"private",
"onArtifactChanged",
"=",
"(",
"artifact",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'applicationArtifact'",
",",
"{",
"artifact",
":",
"artifact",
"}",
")",
";",
"}",
";",
"public",
"validate",
"(",
"_values",
")",
"{",
"const",
"{",
"applicationArtifact",
"}",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"errors",
"=",
"{",
"}",
"as",
"any",
";",
"if",
"(",
"!",
"applicationArtifact",
"||",
"!",
"(",
"(",
"applicationArtifact",
".",
"artifact",
"&&",
"applicationArtifact",
".",
"artifact",
".",
"type",
"&&",
"applicationArtifact",
".",
"artifact",
".",
"reference",
")",
"||",
"applicationArtifact",
".",
"artifactId",
")",
")",
"{",
"errors",
".",
"applicationArtifact",
"=",
"'Application artifact information is required'",
";",
"}",
"return",
"errors",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"formik",
",",
"stage",
",",
"pipeline",
"}",
"=",
"this",
".",
"props",
";",
"const",
"applicationArtifact",
"=",
"formik",
".",
"values",
".",
"applicationArtifact",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-11\"",
">",
"<",
"div",
"className",
"=",
"\"StandardFieldLayout flex-container-h margin-between-lg\"",
">",
"<",
"div",
"className",
"=",
"\"flex-grow\"",
">",
"<",
"StageArtifactSelector",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"expectedArtifactId",
"=",
"{",
"applicationArtifact",
"&&",
"applicationArtifact",
".",
"artifactId",
"}",
"artifact",
"=",
"{",
"applicationArtifact",
"&&",
"applicationArtifact",
".",
"artifact",
"}",
"onExpectedArtifactSelected",
"=",
"{",
"this",
".",
"onExpectedArtifactSelected",
"}",
"onArtifactEdited",
"=",
"{",
"this",
".",
"onArtifactChanged",
"}",
"excludedArtifactTypePatterns",
"=",
"{",
"this",
".",
"excludedArtifactTypePatterns",
"}",
"renderLabel",
"=",
"{",
"(",
"field",
")",
"=>",
"{",
"return",
"<",
"FormikConfigField",
"label",
"=",
"{",
"'Artifact'",
"}",
">",
"{",
"field",
"}",
"<",
"/FormikConfigField>;",
"}",
"}",
"/>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30697,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661723 | [
"import",
"type",
"{",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
",",
"ICloudFoundrySource",
",",
"}",
"from",
"'../../../serverGroupConfigurationModel.cf'",
";",
"export",
"interface",
"ICloudFoundryCloneServerGroupProps",
"{",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"source",
":",
"ICloudFoundrySource",
";",
"}",
"export",
"class",
"CloudFoundryServerGroupConstantArtifactSettings",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryCloneServerGroupProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"{",
"source",
"}",
"=",
"props",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'source'",
",",
"source",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"source",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"form-group row\"",
">",
"<",
"label",
"className",
"=",
"\"col-md-3 col-form-label sm-label-right\"",
">",
"Account",
"<",
"/label>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"input",
"className",
"=",
"\"form-control\"",
"type",
"=",
"\"text\"",
"id",
"=",
"\"cluster\"",
"value",
"=",
"{",
"source",
".",
"account",
"}",
"readOnly",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group row\"",
">",
"<",
"label",
"className",
"=",
"\"col-md-3 col-form-label sm-label-right\"",
">",
"Region",
"<",
"/label>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"input",
"className",
"=",
"\"form-control\"",
"type",
"=",
"\"text\"",
"id",
"=",
"\"cluster\"",
"value",
"=",
"{",
"source",
".",
"region",
"}",
"readOnly",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group row\"",
">",
"<",
"label",
"className",
"=",
"\"col-md-3 col-form-label sm-label-right\"",
">",
"Server",
"Group",
"<",
"/label>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"input",
"className",
"=",
"\"form-control\"",
"type",
"=",
"\"text\"",
"id",
"=",
"\"cluster\"",
"value",
"=",
"{",
"source",
".",
"asgName",
"}",
"readOnly",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661724 | [
"import",
"{",
"set",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IDeploymentStrategyAdditionalFieldsProps",
",",
"IServerGroupCommand",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"HelpField",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"IRollingRedBlackCommand",
"extends",
"IServerGroupCommand",
"{",
"targetPercentages",
":",
"number",
"[",
"]",
";",
"delayBeforeDisableSec",
":",
"number",
";",
"delayBeforeScaleDownSec",
":",
"number",
";",
"maxRemainingAsgs",
":",
"number",
";",
"rollback",
":",
"{",
"onFailure",
":",
"boolean",
";",
"}",
";",
"scaleDown",
":",
"boolean",
";",
"}",
"export",
"interface",
"IRollingRedBlackStrategyAdditionalFieldsProps",
"extends",
"IDeploymentStrategyAdditionalFieldsProps",
"{",
"command",
":",
"IRollingRedBlackCommand",
";",
"}",
"export",
"class",
"AdditionalFields",
"extends",
"React",
".",
"Component",
"<",
"IRollingRedBlackStrategyAdditionalFieldsProps",
">",
"{",
"private",
"handlePercentChange",
"=",
"(",
"key",
",",
"value",
",",
"index",
")",
"=>",
"{",
"const",
"percentages",
"=",
"this",
".",
"props",
".",
"command",
".",
"targetPercentages",
";",
"percentages",
"[",
"index",
"]",
"=",
"value",
";",
"set",
"(",
"this",
".",
"props",
".",
"command",
",",
"key",
",",
"percentages",
")",
";",
"this",
".",
"forceUpdate",
"(",
")",
";",
"}",
";",
"private",
"onDelete",
"=",
"(",
"index",
")",
"=>",
"{",
"const",
"percentages",
"=",
"this",
".",
"props",
".",
"command",
".",
"targetPercentages",
";",
"percentages",
".",
"splice",
"(",
"index",
",",
"1",
")",
";",
"set",
"(",
"this",
".",
"props",
".",
"command",
",",
"'targetPercentages'",
",",
"percentages",
")",
";",
"this",
".",
"forceUpdate",
"(",
")",
";",
"}",
";",
"private",
"addPercent",
"=",
"(",
")",
"=>",
"{",
"const",
"percentages",
"=",
"this",
".",
"props",
".",
"command",
".",
"targetPercentages",
";",
"percentages",
".",
"push",
"(",
"100",
")",
";",
"set",
"(",
"this",
".",
"props",
".",
"command",
",",
"'targetPercentages'",
",",
"percentages",
")",
";",
"this",
".",
"forceUpdate",
"(",
")",
";",
"}",
";",
"private",
"handleChange",
"=",
"(",
"key",
",",
"value",
")",
"=>",
"{",
"set",
"(",
"this",
".",
"props",
".",
"command",
",",
"key",
",",
"value",
")",
";",
"this",
".",
"forceUpdate",
"(",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"command",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-12\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-12 checkbox\"",
">",
"<",
"label",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"checked",
"=",
"{",
"command",
".",
"rollback",
".",
"onFailure",
"}",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"handleChange",
"(",
"'rollback.onFailure'",
",",
"e",
".",
"target",
".",
"checked",
")",
"}",
"/>",
"Rollback",
"to",
"previous",
"server",
"group",
"if",
"deployment",
"fails",
"<",
"HelpField",
"id",
"=",
"\"strategy.rollingRedBlack.rollback\"",
"/",
">",
"<",
"/label>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-12 form-inline sp-margin-m-bottom sp-margin-m-top\"",
">",
"<",
"label",
">",
"Wait",
"Before",
"Scale",
"Down",
"&",
"nbsp",
";",
"<",
"HelpField",
"content",
"=",
"\"Time to wait before scaling down source server group\"",
"/",
">",
"<",
"/label>",
"<",
"div",
">",
"<",
"input",
"className",
"=",
"\"form-control input-sm\"",
"style",
"=",
"{",
"{",
"width",
":",
"'60px'",
"}",
"}",
"min",
"=",
"\"0\"",
"type",
"=",
"\"number\"",
"value",
"=",
"{",
"command",
".",
"delayBeforeDisableSec",
"}",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"handleChange",
"(",
"'delayBeforeDisableSec'",
",",
"e",
".",
"target",
".",
"value",
")",
"}",
"placeholder",
"=",
"\"0\"",
"/",
">",
"&",
"nbsp",
";",
"seconds",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-12 form-inline sp-margin-m-bottom\"",
">",
"<",
"label",
">",
"Maximum",
"number",
"of",
"server",
"groups",
"to",
"leave",
"&",
"nbsp",
";",
"<",
"HelpField",
"id",
"=",
"\"strategy.redblack.maxRemainingAsgs\"",
"/",
">",
"<",
"/label>",
"<",
"div",
">",
"<",
"input",
"className",
"=",
"\"form-control input-sm\"",
"style",
"=",
"{",
"{",
"width",
":",
"'60px'",
"}",
"}",
"min",
"=",
"\"2\"",
"type",
"=",
"\"number\"",
"value",
"=",
"{",
"command",
".",
"maxRemainingAsgs",
"}",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"handleChange",
"(",
"'maxRemainingAsgs'",
",",
"e",
".",
"target",
".",
"value",
")",
"}",
"/>",
"&",
"nbsp",
";",
"server",
"groups",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-12 form-inline sp-margin-m-bottom\"",
">",
"<",
"label",
">",
"Wait",
"Before",
"Cluster",
"Scale",
"Down",
"&",
"nbsp",
";",
"<",
"HelpField",
"content",
"=",
"\"Time to wait before scaling down the cluster after deployment\"",
"/",
">",
"<",
"/label>",
"<",
"div",
">",
"<",
"input",
"className",
"=",
"\"form-control input-sm\"",
"style",
"=",
"{",
"{",
"width",
":",
"'60px'",
"}",
"}",
"min",
"=",
"\"0\"",
"type",
"=",
"\"number\"",
"value",
"=",
"{",
"command",
".",
"delayBeforeScaleDownSec",
"}",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"handleChange",
"(",
"'delayBeforeScaleDownSec'",
",",
"e",
".",
"target",
".",
"value",
")",
"}",
"placeholder",
"=",
"\"0\"",
"/",
">",
"&",
"nbsp",
";",
"seconds",
"<",
"/div>",
"<",
"/div>",
"<",
"label",
">",
"Scale",
"by",
"percentages",
"&",
"nbsp",
";",
"<",
"HelpField",
"content",
"=",
"\"Steps to get to full capacity in percent\"",
"/",
">",
"<",
"/label>",
"<",
"table",
"className",
"=",
"\"table table-condensed packed metadata\"",
">",
"<",
"tbody",
">",
"{",
"command",
".",
"targetPercentages",
".",
"map",
"(",
"(",
"percentage",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"tr",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"td",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"input",
"className",
"=",
"\"form-control\"",
"min",
"=",
"\"0\"",
"type",
"=",
"\"number\"",
"value",
"=",
"{",
"percentage",
"}",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"handlePercentChange",
"(",
"'targetPercentages'",
",",
"e",
".",
"target",
".",
"value",
",",
"index",
")",
"}",
"placeholder",
"=",
"\"100\"",
"/",
">",
"<",
"/div>",
"<",
"/td>",
"<",
"td",
">",
"<",
"a",
"className",
"=",
"\"btn btn-link sm-label\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"onDelete",
"(",
"index",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-trash\"",
"/",
">",
"<",
"/a>",
"<",
"/td>",
"<",
"/tr>);",
"}",
")",
"}",
"<",
"/tbody>",
"<",
"tfoot",
">",
"<",
"tr",
">",
"<",
"td",
"colSpan",
"=",
"{",
"2",
"}",
">",
"<",
"button",
"type",
"=",
"\"button\"",
"className",
"=",
"\"add-new col-md-12\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"addPercent",
"(",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"Add",
"percentage",
"<",
"/button>",
"<",
"/td>",
"<",
"/tr>",
"<",
"/tfoot>",
"<",
"/table>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
3,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661725 | [
"import",
"{",
"defaultsDeep",
",",
"unset",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"Select",
"from",
"'react-select'",
";",
"import",
"type",
"{",
"IDeploymentStrategy",
",",
"IDeploymentStrategyAdditionalFieldsProps",
",",
"IServerGroupCommand",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CoreRedBlackAdditionalFields",
",",
"HelpField",
",",
"Markdown",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"IRedBlackCommand",
"}",
"from",
"'./strategies/redblack/redblack.strategy'",
";",
"import",
"type",
"{",
"IRollingRedBlackCommand",
"}",
"from",
"'./strategies/rollingredblack/AdditionalFields'",
";",
"import",
"{",
"AdditionalFields",
"as",
"AdditionalRollingRedBlackFields",
"}",
"from",
"'./strategies/rollingredblack/AdditionalFields'",
";",
"export",
"interface",
"ICloudFoundryDeploymentStrategySelectorProps",
"{",
"command",
":",
"IServerGroupCommand",
";",
"onFieldChange",
":",
"(",
"key",
":",
"string",
",",
"value",
":",
"any",
")",
"=>",
"void",
";",
"onStrategyChange",
":",
"(",
"command",
":",
"IServerGroupCommand",
",",
"strategy",
":",
"IDeploymentStrategy",
")",
"=>",
"void",
";",
"}",
"export",
"interface",
"ICloudFoundryDeploymentStrategySelectorState",
"{",
"strategies",
":",
"IDeploymentStrategy",
"[",
"]",
";",
"currentStrategy",
":",
"string",
";",
"AdditionalFieldsComponent",
":",
"React",
".",
"ComponentType",
"<",
"IDeploymentStrategyAdditionalFieldsProps",
">",
";",
"}",
"export",
"class",
"CloudFoundryDeploymentStrategySelector",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryDeploymentStrategySelectorProps",
",",
"ICloudFoundryDeploymentStrategySelectorState",
">",
"{",
"public",
"state",
":",
"ICloudFoundryDeploymentStrategySelectorState",
"=",
"{",
"strategies",
":",
"[",
"{",
"label",
":",
"'None'",
",",
"description",
":",
"'Creates the next server group with no impact on existing server groups'",
",",
"key",
":",
"''",
",",
"}",
",",
"{",
"label",
":",
"'Highlander'",
",",
"description",
":",
"'Destroys <i>all</i> previous server groups in the cluster as soon as new server group passes health checks'",
",",
"key",
":",
"'highlander'",
",",
"}",
",",
"{",
"label",
":",
"'Red/Black'",
",",
"description",
":",
"'Disables <i>all</i> previous server groups in the cluster as soon as new server group passes health checks'",
",",
"key",
":",
"'redblack'",
",",
"additionalFields",
":",
"[",
"'maxRemainingAsgs'",
"]",
",",
"AdditionalFieldsComponent",
":",
"CoreRedBlackAdditionalFields",
",",
"initializationMethod",
":",
"(",
"command",
")",
"=>",
"{",
"defaultsDeep",
"(",
"command",
",",
"{",
"rollback",
":",
"{",
"onFailure",
":",
"false",
",",
"}",
",",
"maxRemainingAsgs",
":",
"2",
",",
"delayBeforeDisableSec",
":",
"0",
",",
"delayBeforeScaleDownSec",
":",
"0",
",",
"scaleDown",
":",
"false",
",",
"}",
")",
";",
"}",
",",
"}",
",",
"{",
"label",
":",
"'Rolling Red/Black'",
",",
"description",
":",
"'Gradually replaces <i>all</i> previous server group instances in the cluster as soon as new server group instances pass health checks'",
",",
"key",
":",
"'cfrollingredblack'",
",",
"additionalFields",
":",
"[",
"'targetPercentages'",
"]",
",",
"AdditionalFieldsComponent",
":",
"AdditionalRollingRedBlackFields",
",",
"initializationMethod",
":",
"(",
"command",
")",
"=>",
"{",
"defaultsDeep",
"(",
"command",
",",
"{",
"rollback",
":",
"{",
"onFailure",
":",
"false",
",",
"}",
",",
"targetPercentages",
":",
"command",
".",
"targetPercentages",
"?",
"command",
".",
"targetPercentages",
":",
"[",
"50",
",",
"100",
"]",
",",
"delayBeforeDisableSec",
":",
"0",
",",
"delayBeforeScaleDownSec",
":",
"0",
",",
"maxRemainingAsgs",
":",
"2",
",",
"scaleDown",
":",
"false",
",",
"}",
")",
";",
"}",
",",
"}",
",",
"]",
",",
"currentStrategy",
":",
"null",
",",
"AdditionalFieldsComponent",
":",
"undefined",
",",
"}",
";",
"public",
"selectStrategy",
"(",
"strategy",
")",
"{",
"const",
"{",
"command",
",",
"onStrategyChange",
"}",
"=",
"this",
".",
"props",
";",
"const",
"oldStrategy",
"=",
"this",
".",
"state",
".",
"strategies",
".",
"find",
"(",
"(",
"s",
")",
"=>",
"s",
".",
"key",
"===",
"this",
".",
"state",
".",
"currentStrategy",
")",
";",
"const",
"newStrategy",
"=",
"this",
".",
"state",
".",
"strategies",
".",
"find",
"(",
"(",
"s",
")",
"=>",
"s",
".",
"key",
"===",
"strategy",
")",
";",
"if",
"(",
"oldStrategy",
"&&",
"oldStrategy",
".",
"additionalFields",
")",
"{",
"oldStrategy",
".",
"additionalFields",
".",
"forEach",
"(",
"(",
"field",
")",
"=>",
"{",
"if",
"(",
"!",
"newStrategy",
"||",
"!",
"newStrategy",
".",
"additionalFields",
"||",
"!",
"newStrategy",
".",
"additionalFields",
".",
"includes",
"(",
"field",
")",
")",
"{",
"unset",
"(",
"command",
",",
"field",
")",
";",
"}",
"}",
")",
";",
"}",
"let",
"AdditionalFieldsComponent",
";",
"if",
"(",
"newStrategy",
")",
"{",
"AdditionalFieldsComponent",
"=",
"newStrategy",
".",
"AdditionalFieldsComponent",
";",
"if",
"(",
"newStrategy",
".",
"initializationMethod",
")",
"{",
"newStrategy",
".",
"initializationMethod",
"(",
"command",
")",
";",
"}",
"}",
"command",
".",
"strategy",
"=",
"strategy",
";",
"if",
"(",
"onStrategyChange",
"&&",
"newStrategy",
")",
"{",
"onStrategyChange",
"(",
"command",
",",
"newStrategy",
")",
";",
"}",
"this",
".",
"setState",
"(",
"{",
"currentStrategy",
":",
"strategy",
",",
"AdditionalFieldsComponent",
"}",
")",
";",
"}",
"public",
"strategyChanged",
"=",
"(",
"option",
")",
"=>",
"{",
"this",
".",
"selectStrategy",
"(",
"option",
".",
"key",
")",
";",
"}",
";",
"public",
"componentDidMount",
"(",
")",
"{",
"this",
".",
"selectStrategy",
"(",
"this",
".",
"props",
".",
"command",
".",
"strategy",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"command",
",",
"onFieldChange",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"AdditionalFieldsComponent",
",",
"currentStrategy",
",",
"strategies",
"}",
"=",
"this",
".",
"state",
";",
"const",
"hasAdditionalFields",
"=",
"Boolean",
"(",
"AdditionalFieldsComponent",
")",
";",
"if",
"(",
"strategies",
"&&",
"strategies",
".",
"length",
")",
"{",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"StandardFieldLayout flex-container-h baseline margin-between-lg\"",
">",
"<",
"div",
"className",
"=",
"{",
"`sm-label-right`",
"}",
"style",
"=",
"{",
"{",
"paddingLeft",
":",
"'13px'",
"}",
"}",
">",
"Strategy",
"&",
"nbsp",
";",
"<",
"HelpField",
"id",
"=",
"\"core.serverGroup.strategy\"",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"flex-grow\"",
">",
"<",
"Select",
"clearable",
"=",
"{",
"false",
"}",
"required",
"=",
"{",
"true",
"}",
"options",
"=",
"{",
"strategies",
"}",
"placeholder",
"=",
"\"None\"",
"valueKey",
"=",
"\"key\"",
"value",
"=",
"{",
"currentStrategy",
"}",
"optionRenderer",
"=",
"{",
"this",
".",
"strategyOptionRenderer",
"}",
"valueRenderer",
"=",
"{",
"(",
"o",
")",
"=>",
"<",
">",
"{",
"o",
".",
"label",
"}",
"<",
"/>} onChange={this.strategyChanged}/",
">",
"<",
"/div>",
"<",
"/div>",
"{",
"hasAdditionalFields",
"&&",
"(",
"<",
"div",
"className",
"=",
"\"form-group col-md-9 col-md-offset-3\"",
"style",
"=",
"{",
"{",
"marginTop",
":",
"'5px'",
",",
"float",
":",
"'right'",
"}",
"}",
">",
"<",
"AdditionalFieldsComponent",
"command",
"=",
"{",
"command",
"}",
"onChange",
"=",
"{",
"onFieldChange",
"}",
"/",
">",
"<",
"/div>)}",
"<",
"/div>);",
"}",
"return",
"null",
";",
"}",
"private",
"strategyOptionRenderer",
"=",
"(",
"option",
")",
"=>",
"{",
"return",
"(",
"<",
"div",
"className",
"=",
"\"body-regular\"",
">",
"<",
"strong",
">",
"<",
"Markdown",
"tag",
"=",
"\"span\"",
"message",
"=",
"{",
"option",
".",
"label",
"}",
"/",
">",
"<",
"/strong>",
"<",
"div",
">",
"<",
"Markdown",
"tag",
"=",
"\"span\"",
"message",
"=",
"{",
"option",
".",
"description",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>);",
"}",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28644,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28644,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28644,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28644,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661726 | [
"import",
"type",
"{",
"FormikErrors",
",",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IRegion",
",",
"IWizardPageComponent",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"CheckboxInput",
",",
"FormikFormField",
",",
"HelpField",
",",
"ReactSelectInput",
",",
"TextInput",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryDeploymentStrategySelector",
"}",
"from",
"'../../../../../deploymentStrategy/CloudFoundryDeploymentStrategySelector'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../../../serverGroupConfigurationModel.cf'",
";",
"import",
"'../../../../../common/cloudFoundry.less'",
";",
"export",
"interface",
"ICloudFoundryServerGroupBasicSettingsProps",
"{",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"}",
"export",
"interface",
"ICloudFoundryServerGroupLocationSettingsState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"regions",
":",
"IRegion",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryServerGroupBasicSettings",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupBasicSettingsProps",
",",
"ICloudFoundryServerGroupLocationSettingsState",
">",
"implements",
"IWizardPageComponent",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"public",
"state",
":",
"ICloudFoundryServerGroupLocationSettingsState",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"}",
";",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
";",
"this",
".",
"updateRegionList",
"(",
")",
";",
"}",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"accountChanged",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"this",
".",
"updateRegionList",
"(",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'region'",
",",
"''",
")",
";",
"}",
";",
"private",
"updateRegionList",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"credentials",
"=",
"get",
"(",
"this",
".",
"props",
".",
"formik",
".",
"values",
",",
"'credentials'",
",",
"undefined",
")",
";",
"if",
"(",
"credentials",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"credentials",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regions",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"regions",
"}",
")",
")",
";",
"}",
"}",
";",
"private",
"strategyChanged",
"=",
"(",
"_values",
",",
"strategy",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'strategy'",
",",
"strategy",
".",
"key",
")",
";",
"}",
";",
"private",
"onStrategyFieldChange",
"=",
"(",
"key",
",",
"value",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"key",
",",
"value",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"formik",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"accounts",
",",
"regions",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"values",
"}",
"=",
"formik",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-11\"",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"credentials\"",
"label",
"=",
"\"Account\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"inputClassName",
"=",
"\"cloudfoundry-react-select\"",
"{",
"...",
"props",
"}",
"stringOptions",
"=",
"{",
"accounts",
"&&",
"accounts",
".",
"map",
"(",
"(",
"acc",
")",
"=>",
"acc",
".",
"name",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"onChange",
"=",
"{",
"this",
".",
"accountChanged",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"region\"",
"label",
"=",
"\"Region\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"{",
"...",
"props",
"}",
"stringOptions",
"=",
"{",
"regions",
"&&",
"regions",
".",
"map",
"(",
"(",
"region",
")",
"=>",
"region",
".",
"name",
")",
"}",
"inputClassName",
"=",
"{",
"'cloudfoundry-react-select'",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"stack\"",
"label",
"=",
"\"Stack\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"help",
"=",
"{",
"<",
"HelpField",
"id",
"=",
"\"cf.serverGroup.stack\"",
"/",
">",
"}",
"/>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"freeFormDetails\"",
"label",
"=",
"\"Detail\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"TextInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"help",
"=",
"{",
"<",
"HelpField",
"id",
"=",
"\"cf.serverGroup.detail\"",
"/",
">",
"}",
"/>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom cloud-foundry-checkbox\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"startApplication\"",
"label",
"=",
"\"Start on creation\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"CheckboxInput",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"help",
"=",
"{",
"<",
"HelpField",
"id",
"=",
"\"cf.serverGroup.startApplication\"",
"/",
">",
"}",
"/>",
"<",
"/div>",
"{",
"(",
"values",
".",
"viewState",
".",
"mode",
"===",
"'editPipeline'",
"||",
"values",
".",
"viewState",
".",
"mode",
"===",
"'createPipeline'",
"||",
"values",
".",
"viewState",
".",
"mode",
"===",
"'editClonePipeline'",
")",
"&&",
"(",
"<",
"CloudFoundryDeploymentStrategySelector",
"onFieldChange",
"=",
"{",
"this",
".",
"onStrategyFieldChange",
"}",
"onStrategyChange",
"=",
"{",
"this",
".",
"strategyChanged",
"}",
"command",
"=",
"{",
"values",
"}",
"/",
">",
")",
"}",
"<",
"/div>",
"<",
"/div>);",
"}",
"public",
"validate",
"(",
"values",
")",
"{",
"const",
"errors",
"=",
"{",
"}",
"as",
"FormikErrors",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"if",
"(",
"values",
".",
"stack",
"&&",
"!",
"values",
".",
"stack",
".",
"match",
"(",
"/^[a-zA-Z0-9]*$/",
")",
")",
"{",
"errors",
".",
"stack",
"=",
"'Stack can only contain letters and numbers.'",
";",
"}",
"if",
"(",
"values",
".",
"freeFormDetails",
"&&",
"!",
"values",
".",
"freeFormDetails",
".",
"match",
"(",
"/^[a-zA-Z0-9-]*$/",
")",
")",
"{",
"errors",
".",
"freeFormDetails",
"=",
"'Detail can only contain letters, numbers, and dashes.'",
";",
"}",
"return",
"errors",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
44,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661727 | [
"import",
"type",
"{",
"FormikErrors",
",",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IDeploymentStrategy",
",",
"IWizardPageComponent",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"FormikFormField",
",",
"Markdown",
",",
"ReactSelectInput",
",",
"StageConstants",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikAccountRegionClusterSelector",
"}",
"from",
"'../../../../../presentation'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../../../serverGroupConfigurationModel.cf'",
";",
"import",
"'../../../../../common/cloudFoundry.less'",
";",
"export",
"interface",
"ICloudFoundryCloneSettingsProps",
"{",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"application",
":",
"Application",
";",
"}",
"export",
"interface",
"ICloudFoundryCloneSettingsState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryServerGroupCloneSettings",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryCloneSettingsProps",
",",
"ICloudFoundryCloneSettingsState",
">",
"implements",
"IWizardPageComponent",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"public",
"state",
":",
"ICloudFoundryCloneSettingsState",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"}",
";",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"strategyOptionRenderer",
"=",
"(",
"option",
")",
"=>",
"{",
"return",
"(",
"<",
"div",
"className",
"=",
"\"body-regular\"",
">",
"<",
"strong",
">",
"<",
"Markdown",
"tag",
"=",
"\"span\"",
"message",
"=",
"{",
"option",
".",
"label",
"}",
"/",
">",
"<",
"/strong>",
"<",
"div",
">",
"<",
"Markdown",
"tag",
"=",
"\"span\"",
"message",
"=",
"{",
"option",
".",
"description",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>);",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"application",
",",
"formik",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"accounts",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"FormikAccountRegionClusterSelector",
"componentName",
"=",
"{",
"'source'",
"}",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"clusterField",
"=",
"{",
"'clusterName'",
"}",
"credentialsField",
"=",
"{",
"'account'",
"}",
"formik",
"=",
"{",
"formik",
"}",
"/",
">",
"<",
"div",
"className",
"=",
"\"col-md-9\"",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"'target'",
"}",
"label",
"=",
"\"Target\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"inputClassName",
"=",
"\"cloudfoundry-react-select\"",
"{",
"...",
"props",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
".",
"map",
"(",
"(",
"t",
")",
"=>",
"{",
"return",
"{",
"label",
":",
"t",
".",
"label",
",",
"value",
":",
"t",
".",
"val",
",",
"description",
":",
"t",
".",
"description",
",",
"}",
";",
"}",
")",
"}",
"optionRenderer",
"=",
"{",
"this",
".",
"strategyOptionRenderer",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"public",
"validate",
"(",
"_values",
")",
"{",
"const",
"errors",
"=",
"{",
"}",
"as",
"FormikErrors",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"return",
"errors",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28644,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661728 | [
"import",
"type",
"{",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IArtifact",
",",
"IExpectedArtifact",
",",
"IPipeline",
",",
"IStage",
",",
"IWizardPageComponent",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ArtifactTypePatterns",
",",
"RadioButtonInput",
",",
"StageArtifactSelector",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryEnvVar",
"}",
"from",
"'../../../../../domain'",
";",
"import",
"{",
"Buildpacks",
",",
"EnvironmentVariables",
",",
"FormikConfigField",
",",
"HealthCheck",
",",
"InstanceParameters",
",",
"Routes",
",",
"Services",
",",
"}",
"from",
"'../../../../../presentation'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
",",
"ICloudFoundryManifest",
",",
"}",
"from",
"'../../../serverGroupConfigurationModel.cf'",
";",
"export",
"interface",
"ICloudFoundryServerGroupConfigurationSettingsProps",
"{",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"stage",
":",
"IStage",
";",
"pipeline",
":",
"IPipeline",
";",
"}",
"export",
"class",
"CloudFoundryServerGroupConfigurationSettings",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupConfigurationSettingsProps",
">",
"implements",
"IWizardPageComponent",
"<",
"ICloudFoundryServerGroupConfigurationSettingsProps",
">",
"{",
"public",
"static",
"LABEL",
"=",
"'Configuration'",
";",
"private",
"defaultDirectManifest",
":",
"ICloudFoundryManifest",
"=",
"{",
"direct",
":",
"{",
"memory",
":",
"'1024M'",
",",
"diskQuota",
":",
"'1024M'",
",",
"instances",
":",
"1",
",",
"buildpacks",
":",
"[",
"]",
",",
"healthCheckType",
":",
"'port'",
",",
"routes",
":",
"[",
"]",
",",
"environment",
":",
"[",
"]",
",",
"services",
":",
"[",
"]",
",",
"}",
",",
"}",
";",
"private",
"excludedArtifactTypePatterns",
"=",
"[",
"ArtifactTypePatterns",
".",
"KUBERNETES",
",",
"ArtifactTypePatterns",
".",
"DOCKER_IMAGE",
",",
"ArtifactTypePatterns",
".",
"FRONT50_PIPELINE_TEMPLATE",
",",
"]",
";",
"private",
"manifestSourceUpdated",
"=",
"(",
"source",
")",
":",
"void",
"=>",
"{",
"switch",
"(",
"source",
")",
"{",
"case",
"'artifact'",
":",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'manifest'",
",",
"{",
"}",
")",
";",
"this",
".",
"capacityUpdated",
"(",
"'1'",
")",
";",
"break",
";",
"case",
"'direct'",
":",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'manifest'",
",",
"this",
".",
"defaultDirectManifest",
")",
";",
"break",
";",
"}",
"}",
";",
"private",
"capacityUpdated",
"=",
"(",
"capacity",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'capacity.min'",
",",
"capacity",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'capacity.max'",
",",
"capacity",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'capacity.desired'",
",",
"capacity",
")",
";",
"}",
";",
"private",
"getArtifactInput",
"=",
"(",
")",
":",
"JSX",
".",
"Element",
"=>",
"{",
"const",
"{",
"formik",
",",
"stage",
",",
"pipeline",
"}",
"=",
"this",
".",
"props",
";",
"const",
"manifest",
"=",
"formik",
".",
"values",
".",
"manifest",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-11\"",
">",
"<",
"div",
"className",
"=",
"\"StandardFieldLayout flex-container-h margin-between-lg\"",
">",
"<",
"div",
"className",
"=",
"\"flex-grow\"",
">",
"<",
"StageArtifactSelector",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"expectedArtifactId",
"=",
"{",
"manifest",
"&&",
"manifest",
".",
"artifactId",
"}",
"artifact",
"=",
"{",
"manifest",
"&&",
"manifest",
".",
"artifact",
"}",
"onExpectedArtifactSelected",
"=",
"{",
"this",
".",
"onExpectedArtifactSelected",
"}",
"onArtifactEdited",
"=",
"{",
"this",
".",
"onArtifactChanged",
"}",
"excludedArtifactTypePatterns",
"=",
"{",
"this",
".",
"excludedArtifactTypePatterns",
"}",
"renderLabel",
"=",
"{",
"(",
"field",
")",
"=>",
"{",
"return",
"<",
"FormikConfigField",
"label",
"=",
"{",
"'Artifact'",
"}",
">",
"{",
"field",
"}",
"<",
"/FormikConfigField>;",
"}",
"}",
"/>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
";",
"private",
"onExpectedArtifactSelected",
"=",
"(",
"expectedArtifact",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'manifest'",
",",
"{",
"artifactId",
":",
"expectedArtifact",
".",
"id",
"}",
")",
";",
"}",
";",
"private",
"onArtifactChanged",
"=",
"(",
"artifact",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'manifest'",
",",
"{",
"artifact",
":",
"artifact",
"}",
")",
";",
"}",
";",
"private",
"getDirectInput",
"=",
"(",
")",
":",
"JSX",
".",
"Element",
"=>",
"{",
"const",
"m",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"manifest",
".",
"direct",
";",
"return",
"(",
"<",
"div",
">",
"{",
"<",
"InstanceParameters",
"diskQuotaFieldName",
"=",
"{",
"'manifest.direct.diskQuota'",
"}",
"instancesFieldName",
"=",
"{",
"'manifest.direct.instances'",
"}",
"memoryFieldName",
"=",
"{",
"'manifest.direct.memory'",
"}",
"/",
">",
"}",
"{",
"<",
"Buildpacks",
"fieldName",
"=",
"\"manifest.direct.buildpacks\"",
"/",
">",
"}",
"{",
"<",
"HealthCheck",
"healthCheckHttpEndpointFieldName",
"=",
"{",
"'manifest.direct.healthCheckHttpEndpoint'",
"}",
"healthCheckType",
"=",
"{",
"m",
".",
"healthCheckType",
"}",
"healthCheckTypeFieldName",
"=",
"{",
"'manifest.direct.healthCheckType'",
"}",
"/",
">",
"}",
"{",
"<",
"Routes",
"fieldName",
"=",
"\"manifest.direct.routes\"",
"/",
">",
"}",
"{",
"<",
"EnvironmentVariables",
"fieldName",
"=",
"\"manifest.direct.environment\"",
"/",
">",
"}",
"{",
"<",
"Services",
"fieldName",
"=",
"\"manifest.direct.services\"",
"/",
">",
"}",
"<",
"/div>);",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"manifest",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"manifest",
";",
"const",
"direct",
"=",
"manifest",
"&&",
"!",
"!",
"manifest",
".",
"direct",
";",
"return",
"(",
"<",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-11\"",
">",
"<",
"div",
"className",
"=",
"\"StandardFieldLayout flex-container-h baseline margin-between-lg\"",
">",
"<",
"div",
"className",
"=",
"\"sm-label-right\"",
">",
"Source",
"Type",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"flex-grow\"",
">",
"<",
"RadioButtonInput",
"inline",
"=",
"{",
"true",
"}",
"value",
"=",
"{",
"direct",
"?",
"'direct'",
":",
"'artifact'",
"}",
"options",
"=",
"{",
"[",
"{",
"label",
":",
"'Artifact'",
",",
"value",
":",
"'artifact'",
"}",
",",
"{",
"label",
":",
"'Form'",
",",
"value",
":",
"'direct'",
"}",
",",
"]",
"}",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"manifestSourceUpdated",
"(",
"e",
".",
"target",
".",
"value",
")",
"}",
"/>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"{",
"direct",
"?",
"this",
".",
"getDirectInput",
"(",
")",
":",
"this",
".",
"getArtifactInput",
"(",
")",
"}",
"<",
"/>);",
"}",
"public",
"validate",
"(",
"_props",
")",
"{",
"const",
"errors",
"=",
"{",
"}",
"as",
"any",
";",
"const",
"isStorageSize",
"=",
"(",
"value",
")",
"=>",
"/\\d+[MG]/",
".",
"test",
"(",
"value",
")",
";",
"if",
"(",
"!",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"manifest",
")",
"{",
"errors",
".",
"manifest",
"=",
"'No manifest information provided'",
";",
"return",
"errors",
";",
"}",
"const",
"direct",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"manifest",
".",
"direct",
";",
"if",
"(",
"direct",
")",
"{",
"if",
"(",
"!",
"isStorageSize",
"(",
"direct",
".",
"memory",
")",
")",
"{",
"errors",
".",
"manifest",
"=",
"errors",
".",
"manifest",
"||",
"{",
"}",
";",
"errors",
".",
"manifest",
".",
"memory",
"=",
"`Provide a size (e.g.: 256M, 1G)`",
";",
"}",
"if",
"(",
"!",
"isStorageSize",
"(",
"direct",
".",
"diskQuota",
")",
")",
"{",
"errors",
".",
"manifest",
"=",
"errors",
".",
"manifest",
"||",
"{",
"}",
";",
"errors",
".",
"manifest",
".",
"diskQuota",
"=",
"`Provide a size (e.g.: 256M, 1G)`",
";",
"}",
"if",
"(",
"direct",
".",
"routes",
")",
"{",
"const",
"routeErrors",
"=",
"direct",
".",
"routes",
".",
"map",
"(",
"(",
"route",
")",
"=>",
"{",
"const",
"regex",
"=",
"/^([-\\w]+)\\.([-.\\w]+)(:\\d+)?([-/\\w]+)?$/gm",
";",
"if",
"(",
"route",
"&&",
"regex",
".",
"exec",
"(",
"route",
")",
"===",
"null",
")",
"{",
"return",
"`A route did not match the expected format \"host.some.domain[:9999][/some/path]\"`",
";",
"}",
"return",
"null",
";",
"}",
")",
";",
"if",
"(",
"routeErrors",
".",
"some",
"(",
"(",
"val",
")",
"=>",
"!",
"!",
"val",
")",
")",
"{",
"errors",
".",
"manifest",
"=",
"errors",
".",
"manifest",
"||",
"{",
"}",
";",
"errors",
".",
"manifest",
".",
"routes",
"=",
"routeErrors",
";",
"}",
"}",
"if",
"(",
"direct",
".",
"environment",
")",
"{",
"const",
"existingKeys",
"=",
"[",
"]",
";",
"const",
"envErrors",
"=",
"direct",
".",
"environment",
".",
"map",
"(",
"(",
"e",
")",
"=>",
"{",
"let",
"myErrors",
";",
"if",
"(",
"e",
".",
"key",
")",
"{",
"const",
"validKeyRegex",
"=",
"/^\\w+$/g",
";",
"if",
"(",
"!",
"validKeyRegex",
".",
"exec",
"(",
"e",
".",
"key",
")",
")",
"{",
"myErrors",
"=",
"{",
"key",
":",
"`This field must be alphanumeric`",
",",
"}",
";",
"}",
"else",
"{",
"if",
"(",
"existingKeys",
".",
"filter",
"(",
"(",
"key",
")",
"=>",
"key",
"===",
"e",
".",
"key",
")",
".",
"length",
">",
"0",
")",
"{",
"myErrors",
"=",
"{",
"key",
":",
"`Duplicate variable name`",
",",
"}",
";",
"}",
"else",
"{",
"existingKeys",
".",
"push",
"(",
"e",
".",
"key",
")",
";",
"}",
"}",
"}",
"return",
"myErrors",
";",
"}",
")",
";",
"if",
"(",
"envErrors",
".",
"some",
"(",
"(",
"val",
")",
"=>",
"!",
"!",
"val",
")",
")",
"{",
"errors",
".",
"manifest",
"=",
"errors",
".",
"manifest",
"||",
"{",
"}",
";",
"errors",
".",
"manifest",
".",
"environment",
"=",
"envErrors",
";",
"}",
"}",
"}",
"else",
"{",
"const",
"{",
"manifest",
"}",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"if",
"(",
"!",
"manifest",
"||",
"!",
"(",
"(",
"manifest",
".",
"artifact",
"&&",
"manifest",
".",
"artifact",
".",
"type",
"&&",
"manifest",
".",
"artifact",
".",
"reference",
")",
"||",
"manifest",
".",
"artifactId",
")",
")",
"{",
"errors",
".",
"manifest",
"=",
"'Manifest artifact information is required'",
";",
"}",
"}",
"return",
"errors",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661729 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Application",
",",
"IModalComponentProps",
",",
"IPipeline",
",",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"noop",
",",
"ReactInjector",
",",
"ReactModal",
",",
"TaskMonitor",
",",
"WizardModal",
",",
"WizardPage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ServerGroupTemplateSelection",
"}",
"from",
"'./ServerGroupTemplateSelection'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../../domain'",
";",
"import",
"{",
"CloudFoundryServerGroupArtifactSettings",
"}",
"from",
"'./sections/artifactSettings/ArtifactSettings.cf'",
";",
"import",
"{",
"CloudFoundryServerGroupConstantArtifactSettings",
"}",
"from",
"'./sections/artifactSettings/ConstantArtifactSettings.cf'",
";",
"import",
"{",
"CloudFoundryServerGroupBasicSettings",
"}",
"from",
"'./sections/basicSettings/BasicSettings.cf'",
";",
"import",
"{",
"CloudFoundryServerGroupCloneSettings",
"}",
"from",
"'./sections/cloneSettings/CloneSettings.cf'",
";",
"import",
"{",
"CloudFoundryServerGroupConfigurationSettings",
"}",
"from",
"'./sections/configurationSettings/ConfigurationSettings.cf'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../serverGroupConfigurationModel.cf'",
";",
"import",
"'./serverGroup.less'",
";",
"export",
"interface",
"ICloudFoundryCreateServerGroupProps",
"extends",
"IModalComponentProps",
"{",
"application",
":",
"Application",
";",
"command",
":",
"ICloudFoundryCreateServerGroupCommand",
";",
"isSourceConstant",
"?",
":",
"boolean",
";",
"serverGroup",
"?",
":",
"ICloudFoundryServerGroup",
";",
"title",
":",
"string",
";",
"}",
"export",
"interface",
"ICloudFoundryCreateServerGroupState",
"{",
"pipeline",
":",
"IPipeline",
";",
"isClone",
":",
"boolean",
";",
"loading",
":",
"boolean",
";",
"requiresTemplateSelection",
":",
"boolean",
";",
"stage",
"?",
":",
"IStage",
";",
"taskMonitor",
":",
"TaskMonitor",
";",
"}",
"export",
"class",
"CloudFoundryCreateServerGroupModal",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryCreateServerGroupProps",
",",
"ICloudFoundryCreateServerGroupState",
">",
"{",
"public",
"static",
"defaultProps",
":",
"Partial",
"<",
"ICloudFoundryCreateServerGroupProps",
">",
"=",
"{",
"closeModal",
":",
"noop",
",",
"dismissModal",
":",
"noop",
",",
"}",
";",
"public",
"static",
"show",
"(",
"props",
")",
"{",
"const",
"modalProps",
"=",
"{",
"dialogClassName",
":",
"'wizard-modal modal-lg'",
"}",
";",
"return",
"ReactModal",
".",
"show",
"(",
"CloudFoundryCreateServerGroupModal",
",",
"props",
",",
"modalProps",
")",
";",
"}",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"pipeline",
"=",
"get",
"(",
"props",
",",
"'command.viewState.pipeline'",
",",
"undefined",
")",
";",
"const",
"stage",
"=",
"get",
"(",
"props",
",",
"'command.viewState.stage'",
",",
"undefined",
")",
";",
"const",
"mode",
"=",
"get",
"(",
"props",
",",
"'command.viewState.mode'",
",",
"undefined",
")",
";",
"this",
".",
"state",
"=",
"{",
"pipeline",
":",
"pipeline",
",",
"isClone",
":",
"!",
"!",
"props",
".",
"isSourceConstant",
"||",
"mode",
"===",
"'editClonePipeline'",
",",
"loading",
":",
"false",
",",
"requiresTemplateSelection",
":",
"get",
"(",
"props",
",",
"'command.viewState.requiresTemplateSelection'",
",",
"false",
")",
",",
"stage",
",",
"taskMonitor",
":",
"new",
"TaskMonitor",
"(",
"{",
"application",
":",
"props",
".",
"application",
",",
"title",
":",
"'Creating your server group'",
",",
"modalInstance",
":",
"TaskMonitor",
".",
"modalInstanceEmulation",
"(",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
")",
",",
"onTaskComplete",
":",
"this",
".",
"onTaskComplete",
",",
"}",
")",
",",
"}",
";",
"}",
"private",
"templateSelected",
"=",
"(",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"requiresTemplateSelection",
":",
"false",
"}",
")",
";",
"this",
".",
"initialize",
"(",
")",
";",
"}",
";",
"private",
"initialize",
"=",
"(",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"loading",
":",
"false",
"}",
")",
";",
"}",
";",
"private",
"onTaskComplete",
"=",
"(",
")",
"=>",
"{",
"this",
".",
"props",
".",
"application",
".",
"serverGroups",
".",
"refresh",
"(",
")",
";",
"}",
";",
"private",
"submit",
"=",
"(",
"command",
")",
":",
"void",
"=>",
"{",
"command",
".",
"selectedProvider",
"=",
"'cloudfoundry'",
";",
"if",
"(",
"command",
".",
"viewState",
".",
"mode",
"===",
"'createPipeline'",
"||",
"command",
".",
"viewState",
".",
"mode",
"===",
"'editPipeline'",
"||",
"command",
".",
"viewState",
".",
"mode",
"===",
"'editClonePipeline'",
")",
"{",
"this",
".",
"props",
".",
"closeModal",
"&&",
"this",
".",
"props",
".",
"closeModal",
"(",
"command",
")",
";",
"}",
"else",
"if",
"(",
"command",
".",
"viewState",
".",
"mode",
"===",
"'clone'",
")",
"{",
"this",
".",
"state",
".",
"taskMonitor",
".",
"submit",
"(",
"(",
")",
"=>",
"ReactInjector",
".",
"serverGroupWriter",
".",
"cloneServerGroup",
"(",
"command",
",",
"this",
".",
"props",
".",
"application",
")",
")",
";",
"}",
"else",
"{",
"this",
".",
"state",
".",
"taskMonitor",
".",
"submit",
"(",
"(",
")",
"=>",
"ReactInjector",
".",
"serverGroupWriter",
".",
"cloneServerGroup",
"(",
"command",
",",
"this",
".",
"props",
".",
"application",
")",
")",
";",
"}",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"loading",
",",
"pipeline",
",",
"isClone",
",",
"requiresTemplateSelection",
",",
"stage",
",",
"taskMonitor",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"application",
",",
"command",
",",
"dismissModal",
",",
"title",
",",
"isSourceConstant",
"}",
"=",
"this",
".",
"props",
";",
"if",
"(",
"requiresTemplateSelection",
")",
"{",
"return",
"(",
"<",
"ServerGroupTemplateSelection",
"app",
"=",
"{",
"application",
"}",
"command",
"=",
"{",
"command",
"}",
"onDismiss",
"=",
"{",
"dismissModal",
"}",
"onTemplateSelected",
"=",
"{",
"this",
".",
"templateSelected",
"}",
"/",
">",
")",
";",
"}",
"return",
"(",
"<",
"WizardModal",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
"heading",
"=",
"{",
"title",
"}",
"initialValues",
"=",
"{",
"command",
"}",
"loading",
"=",
"{",
"loading",
"}",
"taskMonitor",
"=",
"{",
"taskMonitor",
"}",
"dismissModal",
"=",
"{",
"dismissModal",
"}",
"closeModal",
"=",
"{",
"this",
".",
"submit",
"}",
"submitButtonLabel",
"=",
"{",
"command",
".",
"viewState",
".",
"submitButtonLabel",
"}",
"render",
"=",
"{",
"(",
"{",
"formik",
",",
"nextIdx",
",",
"wizard",
"}",
")",
"=>",
"(",
"<",
">",
"<",
"WizardPage",
"label",
"=",
"\"Basic Settings\"",
"wizard",
"=",
"{",
"wizard",
"}",
"order",
"=",
"{",
"nextIdx",
"(",
")",
"}",
"render",
"=",
"{",
"(",
"{",
"innerRef",
"}",
")",
"=>",
"<",
"CloudFoundryServerGroupBasicSettings",
"ref",
"=",
"{",
"innerRef",
"}",
"formik",
"=",
"{",
"formik",
"}",
"/",
">",
"}",
"/>",
"{",
"isClone",
"&&",
"isSourceConstant",
"&&",
"(",
"<",
"WizardPage",
"label",
"=",
"\"Application\"",
"wizard",
"=",
"{",
"wizard",
"}",
"order",
"=",
"{",
"nextIdx",
"(",
")",
"}",
"render",
"=",
"{",
"(",
"{",
"innerRef",
"}",
")",
"=>",
"(",
"<",
"CloudFoundryServerGroupConstantArtifactSettings",
"ref",
"=",
"{",
"innerRef",
"}",
"formik",
"=",
"{",
"formik",
"}",
"source",
"=",
"{",
"command",
".",
"source",
"}",
"/",
">",
")",
"}",
"/>)}",
"{",
"isClone",
"&&",
"!",
"isSourceConstant",
"&&",
"(",
"<",
"WizardPage",
"label",
"=",
"\"Source\"",
"wizard",
"=",
"{",
"wizard",
"}",
"order",
"=",
"{",
"nextIdx",
"(",
")",
"}",
"render",
"=",
"{",
"(",
"{",
"innerRef",
"}",
")",
"=>",
"(",
"<",
"CloudFoundryServerGroupCloneSettings",
"application",
"=",
"{",
"application",
"}",
"ref",
"=",
"{",
"innerRef",
"}",
"formik",
"=",
"{",
"formik",
"}",
"/",
">",
")",
"}",
"/>)}",
"{",
"!",
"isClone",
"&&",
"(",
"<",
"WizardPage",
"label",
"=",
"\"Application\"",
"wizard",
"=",
"{",
"wizard",
"}",
"order",
"=",
"{",
"nextIdx",
"(",
")",
"}",
"render",
"=",
"{",
"(",
"{",
"innerRef",
"}",
")",
"=>",
"(",
"<",
"CloudFoundryServerGroupArtifactSettings",
"ref",
"=",
"{",
"innerRef",
"}",
"formik",
"=",
"{",
"formik",
"}",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"/",
">",
")",
"}",
"/>)}",
"<",
"WizardPage",
"label",
"=",
"\"Manifest\"",
"wizard",
"=",
"{",
"wizard",
"}",
"order",
"=",
"{",
"nextIdx",
"(",
")",
"}",
"render",
"=",
"{",
"(",
"{",
"innerRef",
"}",
")",
"=>",
"(",
"<",
"CloudFoundryServerGroupConfigurationSettings",
"ref",
"=",
"{",
"innerRef",
"}",
"formik",
"=",
"{",
"formik",
"}",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"/",
">",
")",
"}",
"/>",
"<",
"/>)}/",
">",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
0,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
180,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661730 | [
"import",
"{",
"defaults",
"}",
"from",
"'lodash'",
";",
"import",
"type",
"{",
"ICloudFoundryEnvVar",
",",
"ICloudFoundryServerGroup",
"}",
"from",
"'../domain'",
";",
"export",
"class",
"CloudFoundryServerGroupTransformer",
"{",
"public",
"static",
"$inject",
"=",
"[",
"'$q'",
"]",
";",
"public",
"constructor",
"(",
"private",
"$q",
")",
"{",
"}",
"public",
"normalizeServerGroupDetails",
"(",
"serverGroup",
")",
"{",
"return",
"serverGroup",
";",
"}",
"public",
"normalizeServerGroup",
"(",
"serverGroup",
")",
"{",
"return",
"this",
".",
"$q",
".",
"resolve",
"(",
"serverGroup",
")",
";",
"}",
"public",
"convertServerGroupCommandToDeployConfiguration",
"(",
"base",
")",
"{",
"const",
"command",
"=",
"defaults",
"(",
"{",
"viewState",
":",
"[",
"]",
"}",
",",
"base",
")",
";",
"command",
".",
"cloudProvider",
"=",
"'cloudfoundry'",
";",
"command",
".",
"provider",
"=",
"'cloudfoundry'",
";",
"command",
".",
"account",
"=",
"command",
".",
"credentials",
";",
"delete",
"command",
".",
"viewState",
";",
"delete",
"command",
".",
"selectedProvider",
";",
"if",
"(",
"command",
".",
"manifest",
".",
"type",
"===",
"'direct'",
")",
"{",
"command",
".",
"manifest",
".",
"env",
"=",
"this",
".",
"convertManifestEnv",
"(",
"command",
".",
"manifest",
".",
"environment",
")",
";",
"}",
"else",
"{",
"command",
".",
"manifest",
".",
"env",
"=",
"command",
".",
"manifest",
".",
"environment",
";",
"}",
"return",
"command",
";",
"}",
"private",
"convertManifestEnv",
"(",
"envVars",
")",
"{",
"const",
"newEnv",
"=",
"Object",
".",
"create",
"(",
"null",
")",
";",
"for",
"(",
"const",
"envVar",
"of",
"envVars",
")",
"{",
"newEnv",
"[",
"envVar",
".",
"key",
"]",
"=",
"envVar",
".",
"value",
";",
"}",
"return",
"newEnv",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4289,
null,
null,
null,
null,
17339,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
580,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661731 | [
"import",
"type",
"{",
"Formik",
"}",
"from",
"'formik'",
";",
"import",
"{",
"Form",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Modal",
",",
"ModalFooter",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"type",
"{",
"Application",
",",
"IModalComponentProps",
",",
"IServerGroup",
",",
"IServerGroupJob",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ModalClose",
",",
"noop",
",",
"ReactInjector",
",",
"ReactModal",
",",
"SpinFormik",
",",
"TaskMonitor",
",",
"TaskMonitorWrapper",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../../domain'",
";",
"import",
"{",
"Routes",
"}",
"from",
"'../../../presentation/forms/serverGroup'",
";",
"export",
"interface",
"ICloudFoundryLoadBalancerLinksModalProps",
"extends",
"IModalComponentProps",
"{",
"application",
":",
"Application",
";",
"serverGroup",
":",
"ICloudFoundryServerGroup",
";",
"}",
"export",
"interface",
"ICloudFoundryLoadBalancerLinksModalState",
"{",
"initialValues",
":",
"ICloudFoundryLoadBalancerLinksModalValues",
";",
"taskMonitor",
":",
"TaskMonitor",
";",
"}",
"export",
"interface",
"ICloudFoundryLoadBalancerLinksModalValues",
"{",
"routes",
":",
"string",
"[",
"]",
";",
"}",
"export",
"interface",
"ICloudFoundryLoadBalancerLinkJob",
"extends",
"IServerGroupJob",
"{",
"routes",
":",
"string",
"[",
"]",
";",
"serverGroupName",
":",
"string",
";",
"}",
"export",
"class",
"CloudFoundryUnmapLoadBalancersModal",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerLinksModalProps",
",",
"ICloudFoundryLoadBalancerLinksModalState",
">",
"{",
"public",
"static",
"defaultProps",
":",
"Partial",
"<",
"ICloudFoundryLoadBalancerLinksModalProps",
">",
"=",
"{",
"closeModal",
":",
"noop",
",",
"dismissModal",
":",
"noop",
",",
"}",
";",
"private",
"formikRef",
"=",
"React",
".",
"createRef",
"<",
"Formik",
"<",
"ICloudFoundryLoadBalancerLinksModalValues",
">",
">",
"(",
")",
";",
"public",
"static",
"show",
"(",
"props",
")",
"{",
"return",
"ReactModal",
".",
"show",
"(",
"CloudFoundryUnmapLoadBalancersModal",
",",
"props",
",",
"{",
"}",
")",
";",
"}",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"state",
"=",
"{",
"initialValues",
":",
"{",
"routes",
":",
"[",
"''",
"]",
",",
"}",
",",
"taskMonitor",
":",
"new",
"TaskMonitor",
"(",
"{",
"application",
":",
"props",
".",
"application",
",",
"title",
":",
"'Unmapping a route from your server group'",
",",
"modalInstance",
":",
"TaskMonitor",
".",
"modalInstanceEmulation",
"(",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
")",
",",
"onTaskComplete",
":",
"(",
")",
"=>",
"this",
".",
"props",
".",
"application",
".",
"serverGroups",
".",
"refresh",
"(",
")",
",",
"}",
")",
",",
"}",
";",
"}",
"private",
"close",
"=",
"(",
"args",
"?",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"dismissModal",
".",
"apply",
"(",
"null",
",",
"args",
")",
";",
"}",
";",
"private",
"submit",
"=",
"(",
"values",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"routes",
"}",
"=",
"values",
";",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"coreServerGroup",
"=",
"{",
"account",
":",
"serverGroup",
".",
"account",
",",
"cloudProvider",
":",
"serverGroup",
".",
"cloudProvider",
",",
"cluster",
":",
"serverGroup",
".",
"cluster",
",",
"instanceCounts",
":",
"serverGroup",
".",
"instanceCounts",
",",
"instances",
":",
"serverGroup",
".",
"instances",
",",
"loadBalancers",
":",
"routes",
",",
"name",
":",
"serverGroup",
".",
"name",
",",
"region",
":",
"serverGroup",
".",
"region",
",",
"type",
":",
"serverGroup",
".",
"type",
",",
"}",
";",
"this",
".",
"state",
".",
"taskMonitor",
".",
"submit",
"(",
"(",
")",
"=>",
"{",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"unmapLoadBalancers",
"(",
"coreServerGroup",
",",
"this",
".",
"props",
".",
"application",
",",
"{",
"serverGroupName",
":",
"serverGroup",
".",
"name",
",",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"initialValues",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
">",
"<",
"TaskMonitorWrapper",
"monitor",
"=",
"{",
"this",
".",
"state",
".",
"taskMonitor",
"}",
"/",
">",
"<",
"SpinFormik",
"<",
"ICloudFoundryLoadBalancerLinksModalValues",
">",
"ref",
"=",
"{",
"this",
".",
"formikRef",
"}",
"initialValues",
"=",
"{",
"initialValues",
"}",
"onSubmit",
"=",
"{",
"this",
".",
"submit",
"}",
"render",
"=",
"{",
"(",
"formik",
")",
"=>",
"{",
"return",
"(",
"<",
">",
"<",
"ModalClose",
"dismiss",
"=",
"{",
"this",
".",
"close",
"}",
"/",
">",
"<",
"Modal",
".",
"Header",
">",
"<",
"Modal",
".",
"Title",
">",
"Unmap",
"route",
"from",
"{",
"serverGroup",
".",
"name",
"}",
"<",
"/Modal.Title>",
"<",
"/Modal.Header>",
"<",
"Modal",
".",
"Body",
">",
"<",
"Form",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"Routes",
"fieldName",
"=",
"\"routes\"",
"isRequired",
"=",
"{",
"true",
"}",
"singleRouteOnly",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/Form>",
"<",
"/Modal.Body>",
"<",
"ModalFooter",
">",
"<",
"button",
"className",
"=",
"\"btn btn-default\"",
"onClick",
"=",
"{",
"this",
".",
"close",
"}",
">",
"Cancel",
"<",
"/button>",
"<",
"button",
"type",
"=",
"\"submit\"",
"className",
"=",
"\"btn btn-primary\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"submit",
"(",
"formik",
".",
"values",
")",
"}",
"disabled",
"=",
"{",
"!",
"formik",
".",
"isValid",
"}",
">",
"Submit",
"<",
"/button>",
"<",
"/ModalFooter>",
"<",
"/>);",
"}",
"}",
"/>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9812,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661732 | [
"import",
"type",
"{",
"Formik",
",",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"{",
"Form",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Modal",
",",
"ModalFooter",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"type",
"{",
"Application",
",",
"ICapacity",
",",
"IModalComponentProps",
",",
"IServerGroupJob",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikFormField",
",",
"ModalClose",
",",
"noop",
",",
"NumberInput",
",",
"ReactInjector",
",",
"ReactModal",
",",
"SpinFormik",
",",
"TaskMonitor",
",",
"TaskMonitorWrapper",
",",
"TaskReason",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../../domain'",
";",
"export",
"interface",
"ICloudFoundryResizeServerGroupModalProps",
"extends",
"IModalComponentProps",
"{",
"application",
":",
"Application",
";",
"serverGroup",
":",
"ICloudFoundryServerGroup",
";",
"}",
"export",
"interface",
"ICloudFoundryResizeServerGroupModalState",
"{",
"initialValues",
":",
"ICloudFoundryResizeServerGroupValues",
";",
"taskMonitor",
":",
"TaskMonitor",
";",
"}",
"export",
"interface",
"ICloudFoundryResizeServerGroupValues",
"{",
"desired",
":",
"number",
"|",
"string",
";",
"diskQuota",
"?",
":",
"number",
";",
"memory",
"?",
":",
"number",
";",
"reason",
"?",
":",
"string",
";",
"}",
"export",
"interface",
"ICloudFoundryResizeJob",
"extends",
"IServerGroupJob",
"{",
"capacity",
"?",
":",
"Partial",
"<",
"ICapacity",
">",
";",
"diskQuota",
"?",
":",
"number",
";",
"instanceCount",
"?",
":",
"number",
";",
"memory",
"?",
":",
"number",
";",
"serverGroupName",
":",
"string",
";",
"reason",
"?",
":",
"string",
";",
"}",
"export",
"class",
"CloudFoundryResizeServerGroupModal",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryResizeServerGroupModalProps",
",",
"ICloudFoundryResizeServerGroupModalState",
">",
"{",
"public",
"static",
"defaultProps",
":",
"Partial",
"<",
"ICloudFoundryResizeServerGroupModalProps",
">",
"=",
"{",
"closeModal",
":",
"noop",
",",
"dismissModal",
":",
"noop",
",",
"}",
";",
"private",
"formikRef",
"=",
"React",
".",
"createRef",
"<",
"Formik",
"<",
"ICloudFoundryResizeServerGroupValues",
">",
">",
"(",
")",
";",
"public",
"static",
"show",
"(",
"props",
")",
"{",
"const",
"modalProps",
"=",
"{",
"}",
";",
"return",
"ReactModal",
".",
"show",
"(",
"CloudFoundryResizeServerGroupModal",
",",
"props",
",",
"modalProps",
")",
";",
"}",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"{",
"capacity",
",",
"diskQuota",
",",
"memory",
"}",
"=",
"props",
".",
"serverGroup",
";",
"const",
"{",
"desired",
"}",
"=",
"capacity",
";",
"this",
".",
"state",
"=",
"{",
"initialValues",
":",
"{",
"desired",
",",
"diskQuota",
":",
"diskQuota",
",",
"memory",
":",
"memory",
",",
"}",
",",
"taskMonitor",
":",
"new",
"TaskMonitor",
"(",
"{",
"application",
":",
"props",
".",
"application",
",",
"title",
":",
"'Resizing your server group'",
",",
"modalInstance",
":",
"TaskMonitor",
".",
"modalInstanceEmulation",
"(",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
")",
",",
"onTaskComplete",
":",
"(",
")",
"=>",
"this",
".",
"props",
".",
"application",
".",
"serverGroups",
".",
"refresh",
"(",
")",
",",
"}",
")",
",",
"}",
";",
"}",
"private",
"close",
"=",
"(",
"args",
"?",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"dismissModal",
".",
"apply",
"(",
"null",
",",
"args",
")",
";",
"}",
";",
"private",
"submit",
"=",
"(",
"values",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"desired",
",",
"diskQuota",
",",
"memory",
",",
"reason",
"}",
"=",
"values",
";",
"const",
"{",
"serverGroup",
",",
"application",
"}",
"=",
"this",
".",
"props",
";",
"const",
"capacity",
"=",
"{",
"min",
":",
"desired",
",",
"max",
":",
"desired",
",",
"desired",
",",
"}",
";",
"const",
"command",
"=",
"{",
"capacity",
",",
"diskQuota",
",",
"memory",
",",
"reason",
",",
"serverGroupName",
":",
"serverGroup",
".",
"name",
",",
"}",
";",
"this",
".",
"state",
".",
"taskMonitor",
".",
"submit",
"(",
"(",
")",
"=>",
"{",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"resizeServerGroup",
"(",
"serverGroup",
",",
"application",
",",
"command",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"renderDesired",
"(",
"formik",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"capacity",
"}",
"=",
"serverGroup",
";",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Current",
"size",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-4\"",
">",
"<",
"div",
"className",
"=",
"\"horizontal middle\"",
">",
"<",
"input",
"type",
"=",
"\"number\"",
"className",
"=",
"\"NumberInput form-control\"",
"value",
"=",
"{",
"capacity",
".",
"desired",
"}",
"disabled",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"div",
"className",
"=",
"\"sp-padding-xs-xaxis\"",
">",
"instances",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Resize",
"to",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-4\"",
">",
"<",
"div",
"className",
"=",
"\"horizontal middle\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"desired\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"NumberInput",
"{",
"...",
"props",
"}",
"min",
"=",
"{",
"0",
"}",
"/",
">",
"}",
"touched",
"=",
"{",
"true",
"}",
"required",
"=",
"{",
"true",
"}",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"{",
"formik",
".",
"setFieldValue",
"(",
"'min'",
",",
"value",
")",
";",
"formik",
".",
"setFieldValue",
"(",
"'max'",
",",
"value",
")",
";",
"}",
"}",
"/>",
"<",
"div",
"className",
"=",
"\"sp-padding-xs-xaxis\"",
">",
"instances",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"private",
"renderQuota",
"(",
"formik",
",",
"field",
",",
"fieldLabel",
",",
"initialValue",
")",
"{",
"return",
"(",
"<",
"div",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Current",
"size",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-5\"",
">",
"<",
"div",
"className",
"=",
"\"horizontal middle\"",
">",
"<",
"div",
"className",
"=",
"\"StandardFieldLayout flex-container-h baseline margin-between-lg\"",
">",
"<",
"input",
"type",
"=",
"\"number\"",
"className",
"=",
"\"NumberInput form-control\"",
"value",
"=",
"{",
"initialValue",
"}",
"disabled",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-padding-xs-xaxis\"",
">",
"{",
"fieldLabel",
"}",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Resize",
"to",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-5\"",
">",
"<",
"div",
"className",
"=",
"\"horizontal middle\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"field",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"NumberInput",
"{",
"...",
"props",
"}",
"min",
"=",
"{",
"64",
"}",
"/",
">",
"}",
"touched",
"=",
"{",
"true",
"}",
"required",
"=",
"{",
"true",
"}",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"{",
"formik",
".",
"setFieldValue",
"(",
"'min'",
",",
"value",
")",
";",
"formik",
".",
"setFieldValue",
"(",
"'max'",
",",
"value",
")",
";",
"}",
"}",
"/>",
"<",
"div",
"className",
"=",
"\"sp-padding-xs-xaxis\"",
">",
"{",
"fieldLabel",
"}",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"diskQuota",
",",
"memory",
"}",
"=",
"serverGroup",
";",
"const",
"{",
"initialValues",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
">",
"<",
"TaskMonitorWrapper",
"monitor",
"=",
"{",
"this",
".",
"state",
".",
"taskMonitor",
"}",
"/",
">",
"<",
"SpinFormik",
"<",
"ICloudFoundryResizeServerGroupValues",
">",
"ref",
"=",
"{",
"this",
".",
"formikRef",
"}",
"initialValues",
"=",
"{",
"initialValues",
"}",
"onSubmit",
"=",
"{",
"this",
".",
"submit",
"}",
"render",
"=",
"{",
"(",
"formik",
")",
"=>",
"{",
"return",
"(",
"<",
">",
"<",
"ModalClose",
"dismiss",
"=",
"{",
"this",
".",
"close",
"}",
"/",
">",
"<",
"Modal",
".",
"Header",
">",
"<",
"Modal",
".",
"Title",
">",
"Resize",
"{",
"serverGroup",
".",
"name",
"}",
"<",
"/Modal.Title>",
"<",
"/Modal.Header>",
"<",
"Modal",
".",
"Body",
">",
"<",
"Form",
"className",
"=",
"\"form-horizontal\"",
">",
"{",
"this",
".",
"renderDesired",
"(",
"formik",
")",
"}",
"{",
"this",
".",
"renderQuota",
"(",
"formik",
",",
"'diskQuota'",
",",
"'Disk (MB)'",
",",
"diskQuota",
")",
"}",
"{",
"this",
".",
"renderQuota",
"(",
"formik",
",",
"'memory'",
",",
"'Mem (MB)'",
",",
"memory",
")",
"}",
"<",
"TaskReason",
"reason",
"=",
"{",
"formik",
".",
"values",
".",
"reason",
"}",
"onChange",
"=",
"{",
"(",
"val",
")",
"=>",
"formik",
".",
"setFieldValue",
"(",
"'reason'",
",",
"val",
")",
"}",
"/>",
"<",
"/Form>",
"<",
"/Modal.Body>",
"<",
"ModalFooter",
">",
"<",
"button",
"className",
"=",
"\"btn btn-default\"",
"onClick",
"=",
"{",
"this",
".",
"close",
"}",
">",
"Cancel",
"<",
"/button>",
"<",
"button",
"type",
"=",
"\"submit\"",
"className",
"=",
"\"btn btn-primary\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"submit",
"(",
"formik",
".",
"values",
")",
"}",
"disabled",
"=",
"{",
"!",
"formik",
".",
"isValid",
"}",
">",
"Submit",
"<",
"/button>",
"<",
"/ModalFooter>",
"<",
"/>);",
"}",
"}",
"/>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
0,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
2846,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
44,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661733 | [
"import",
"type",
"{",
"Formik",
"}",
"from",
"'formik'",
";",
"import",
"{",
"Form",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Modal",
",",
"ModalFooter",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"type",
"{",
"Application",
",",
"IModalComponentProps",
",",
"IServerGroupJob",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikFormField",
",",
"ModalClose",
",",
"noop",
",",
"ReactInjector",
",",
"ReactModal",
",",
"ReactSelectInput",
",",
"SpinFormik",
",",
"TaskMonitor",
",",
"TaskMonitorWrapper",
",",
"TaskReason",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../../domain'",
";",
"export",
"interface",
"ICloudFoundryRollbackServerGroupModalProps",
"extends",
"IModalComponentProps",
"{",
"application",
":",
"Application",
";",
"serverGroup",
":",
"ICloudFoundryServerGroup",
";",
"previousServerGroup",
":",
"ICloudFoundryServerGroup",
";",
"allServerGroups",
":",
"ICloudFoundryServerGroup",
"[",
"]",
";",
"disabledServerGroups",
":",
"ICloudFoundryServerGroup",
"[",
"]",
";",
"}",
"export",
"interface",
"ICloudFoundryRollbackServerGroupModalState",
"{",
"initialValues",
":",
"ICloudFoundryRollbackServerGroupValues",
";",
"taskMonitor",
":",
"TaskMonitor",
";",
"}",
"export",
"interface",
"ICloudFoundryRollbackServerGroupValues",
"{",
"restoreServerGroupName",
":",
"string",
";",
"reason",
"?",
":",
"string",
";",
"}",
"export",
"interface",
"ICloudFoundryRollbackJob",
"extends",
"IServerGroupJob",
"{",
"rollbackType",
":",
"string",
";",
"rollbackContext",
":",
"{",
"rollbackServerGroupName",
":",
"string",
";",
"restoreServerGroupName",
":",
"string",
";",
"targetHealthyRollbackPercentage",
":",
"number",
";",
"}",
";",
"}",
"export",
"class",
"CloudFoundryRollbackServerGroupModal",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryRollbackServerGroupModalProps",
",",
"ICloudFoundryRollbackServerGroupModalState",
">",
"{",
"public",
"static",
"defaultProps",
":",
"Partial",
"<",
"ICloudFoundryRollbackServerGroupModalProps",
">",
"=",
"{",
"closeModal",
":",
"noop",
",",
"dismissModal",
":",
"noop",
",",
"}",
";",
"private",
"formikRef",
"=",
"React",
".",
"createRef",
"<",
"Formik",
"<",
"ICloudFoundryRollbackServerGroupValues",
">",
">",
"(",
")",
";",
"public",
"static",
"show",
"(",
"props",
")",
"{",
"const",
"modalProps",
"=",
"{",
"}",
";",
"return",
"ReactModal",
".",
"show",
"(",
"CloudFoundryRollbackServerGroupModal",
",",
"props",
",",
"modalProps",
")",
";",
"}",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"{",
"previousServerGroup",
",",
"serverGroup",
"}",
"=",
"props",
";",
"const",
"{",
"name",
"}",
"=",
"serverGroup",
";",
"this",
".",
"state",
"=",
"{",
"initialValues",
":",
"{",
"restoreServerGroupName",
":",
"previousServerGroup",
"?",
"previousServerGroup",
".",
"name",
":",
"undefined",
",",
"}",
",",
"taskMonitor",
":",
"new",
"TaskMonitor",
"(",
"{",
"application",
":",
"props",
".",
"application",
",",
"title",
":",
"'Rollback '",
"+",
"name",
",",
"modalInstance",
":",
"TaskMonitor",
".",
"modalInstanceEmulation",
"(",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
")",
",",
"onTaskComplete",
":",
"(",
")",
"=>",
"this",
".",
"props",
".",
"application",
".",
"serverGroups",
".",
"refresh",
"(",
")",
",",
"}",
")",
",",
"}",
";",
"}",
"private",
"close",
"=",
"(",
"args",
"?",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"dismissModal",
".",
"apply",
"(",
"null",
",",
"args",
")",
";",
"}",
";",
"private",
"submit",
"=",
"(",
"values",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"reason",
",",
"restoreServerGroupName",
"}",
"=",
"values",
";",
"const",
"{",
"serverGroup",
",",
"application",
"}",
"=",
"this",
".",
"props",
";",
"const",
"command",
"=",
"{",
"rollbackType",
":",
"'EXPLICIT'",
",",
"rollbackContext",
":",
"{",
"rollbackServerGroupName",
":",
"serverGroup",
".",
"name",
",",
"restoreServerGroupName",
",",
"targetHealthyRollbackPercentage",
":",
"100",
",",
"}",
",",
"reason",
",",
"}",
";",
"this",
".",
"state",
".",
"taskMonitor",
".",
"submit",
"(",
"(",
")",
"=>",
"{",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"rollbackServerGroup",
"(",
"serverGroup",
",",
"application",
",",
"command",
")",
";",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"allServerGroups",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"initialValues",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
">",
"<",
"TaskMonitorWrapper",
"monitor",
"=",
"{",
"this",
".",
"state",
".",
"taskMonitor",
"}",
"/",
">",
"<",
"SpinFormik",
"<",
"ICloudFoundryRollbackServerGroupValues",
">",
"ref",
"=",
"{",
"this",
".",
"formikRef",
"}",
"initialValues",
"=",
"{",
"initialValues",
"}",
"onSubmit",
"=",
"{",
"this",
".",
"submit",
"}",
"render",
"=",
"{",
"(",
"formik",
")",
"=>",
"{",
"return",
"(",
"<",
">",
"<",
"ModalClose",
"dismiss",
"=",
"{",
"this",
".",
"close",
"}",
"/",
">",
"<",
"Modal",
".",
"Header",
">",
"<",
"Modal",
".",
"Title",
">",
"Rollback",
"{",
"serverGroup",
".",
"name",
"}",
"<",
"/Modal.Title>",
"<",
"/Modal.Header>",
"<",
"Modal",
".",
"Body",
">",
"<",
"Form",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"div",
"className",
"=",
"\"row\"",
"style",
"=",
"{",
"{",
"marginTop",
":",
"'10px'",
",",
"marginBottom",
":",
"'10px'",
"}",
"}",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Restore",
"to",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"FormikFormField",
"name",
"=",
"\"restoreServerGroupName\"",
"fastField",
"=",
"{",
"true",
"}",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"inputClassName",
"=",
"\"cloudfoundry-react-select\"",
"{",
"...",
"props",
"}",
"stringOptions",
"=",
"{",
"allServerGroups",
"&&",
"allServerGroups",
".",
"map",
"(",
"(",
"sg",
")",
"=>",
"sg",
".",
"name",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"TaskReason",
"reason",
"=",
"{",
"formik",
".",
"values",
".",
"reason",
"}",
"onChange",
"=",
"{",
"(",
"val",
")",
"=>",
"formik",
".",
"setFieldValue",
"(",
"'reason'",
",",
"val",
")",
"}",
"/>",
"<",
"/Form>",
"<",
"div",
"className",
"=",
"\"row\"",
">",
"<",
"div",
"className",
"=",
"\"col-sm-4 sm-label-right\"",
">",
"Rollback",
"Operations",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"row\"",
">",
"<",
"div",
"className",
"=",
"\"col-sm-11 col-sm-offset-1\"",
">",
"<",
"ol",
">",
"<",
"li",
">",
"Enable",
"<",
"em",
">",
"{",
"formik",
".",
"values",
".",
"restoreServerGroupName",
"||",
"'previous server group'",
"}",
"<",
"/em>",
"<",
"/li>",
"<",
"li",
">",
"Disable",
"{",
"serverGroup",
".",
"name",
"}",
"<",
"/li>",
"<",
"/ol>",
"<",
"p",
">",
"This",
"rollback",
"will",
"affect",
"server",
"groups",
"in",
"{",
"serverGroup",
".",
"account",
"}",
"(",
"{",
"serverGroup",
".",
"region",
"}",
")",
".",
"<",
"/p>",
"<",
"/div>",
"<",
"/div>",
"<",
"/Modal.Body>",
"<",
"ModalFooter",
">",
"<",
"button",
"className",
"=",
"\"btn btn-default\"",
"onClick",
"=",
"{",
"this",
".",
"close",
"}",
">",
"Cancel",
"<",
"/button>",
"<",
"button",
"type",
"=",
"\"submit\"",
"className",
"=",
"\"btn btn-primary\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"submit",
"(",
"formik",
".",
"values",
")",
"}",
">",
"Submit",
"<",
"/button>",
"<",
"/ModalFooter>",
"<",
"/>);",
"}",
"}",
"/>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
0,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2846,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661734 | [
"import",
"{",
"filter",
",",
"find",
",",
"get",
",",
"orderBy",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Dropdown",
",",
"Tooltip",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"type",
"{",
"IOwnerOption",
",",
"IServerGroupActionsProps",
",",
"IServerGroupJob",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AddEntityTagLinks",
",",
"ClusterTargetBuilder",
",",
"ConfirmationModalService",
",",
"ReactInjector",
",",
"ServerGroupWarningMessageService",
",",
"SETTINGS",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryServerGroupCommandBuilder",
"}",
"from",
"'../configure'",
";",
"import",
"{",
"CloudFoundryCreateServerGroupModal",
"}",
"from",
"'../configure/wizard/CreateServerGroupModal'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../domain'",
";",
"import",
"{",
"CloudFoundryMapLoadBalancersModal",
"}",
"from",
"'./mapLoadBalancers/CloudFoundryMapLoadBalancersModal'",
";",
"import",
"{",
"CloudFoundryUnmapLoadBalancersModal",
"}",
"from",
"'./mapLoadBalancers/CloudFoundryUnmapLoadBalancersModal'",
";",
"import",
"{",
"CloudFoundryResizeServerGroupModal",
"}",
"from",
"'./resize/CloudFoundryResizeServerGroupModal'",
";",
"import",
"{",
"CloudFoundryRollbackServerGroupModal",
"}",
"from",
"'./rollback/CloudFoundryRollbackServerGroupModal'",
";",
"export",
"interface",
"ICloudFoundryServerGroupActionsProps",
"extends",
"IServerGroupActionsProps",
"{",
"serverGroup",
":",
"ICloudFoundryServerGroup",
";",
"}",
"export",
"interface",
"ICloudFoundryServerGroupJob",
"extends",
"IServerGroupJob",
"{",
"serverGroupId",
":",
"string",
";",
"}",
"export",
"class",
"CloudFoundryServerGroupActions",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryServerGroupActionsProps",
">",
"{",
"private",
"isEnableLocked",
"(",
")",
"{",
"if",
"(",
"this",
".",
"props",
".",
"serverGroup",
".",
"isDisabled",
")",
"{",
"const",
"resizeTasks",
"=",
"(",
"this",
".",
"props",
".",
"serverGroup",
".",
"runningTasks",
"||",
"[",
"]",
")",
".",
"filter",
"(",
"(",
"task",
")",
"=>",
"get",
"(",
"task",
",",
"'execution.stages'",
",",
"[",
"]",
")",
".",
"some",
"(",
"(",
"stage",
")",
"=>",
"stage",
".",
"type",
"===",
"'resizeServerGroup'",
")",
")",
";",
"if",
"(",
"resizeTasks",
".",
"length",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"isRollbackEnabled",
"(",
")",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"if",
"(",
"!",
"serverGroup",
".",
"isDisabled",
")",
"{",
"return",
"true",
";",
"}",
"return",
"app",
".",
"getDataSource",
"(",
"'serverGroups'",
")",
".",
"data",
".",
"some",
"(",
"(",
"g",
")",
"=>",
"g",
".",
"cluster",
"===",
"serverGroup",
".",
"cluster",
"&&",
"g",
".",
"region",
"===",
"serverGroup",
".",
"region",
"&&",
"g",
".",
"account",
"===",
"serverGroup",
".",
"account",
"&&",
"!",
"g",
".",
"isDisabled",
")",
";",
"}",
"private",
"hasDisabledInstances",
"(",
")",
"{",
"return",
"this",
".",
"props",
".",
"serverGroup",
".",
"isDisabled",
"||",
"get",
"(",
"this",
".",
"props",
".",
"serverGroup",
",",
"'instanceCounts.outOfService'",
",",
"0",
")",
">",
"0",
";",
"}",
"private",
"destroyServerGroup",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"stateParams",
"=",
"{",
"name",
":",
"serverGroup",
".",
"name",
",",
"accountId",
":",
"serverGroup",
".",
"account",
",",
"region",
":",
"serverGroup",
".",
"region",
",",
"}",
";",
"const",
"taskMonitor",
"=",
"{",
"application",
":",
"app",
",",
"title",
":",
"'Destroying '",
"+",
"serverGroup",
".",
"name",
",",
"onTaskComplete",
":",
"(",
")",
"=>",
"{",
"if",
"(",
"ReactInjector",
".",
"$state",
".",
"includes",
"(",
"'**.serverGroup'",
",",
"stateParams",
")",
")",
"{",
"ReactInjector",
".",
"$state",
".",
"go",
"(",
"'^'",
")",
";",
"}",
"}",
",",
"}",
";",
"const",
"submitMethod",
"=",
"(",
"params",
")",
"=>",
"{",
"params",
".",
"serverGroupName",
"=",
"serverGroup",
".",
"name",
";",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"destroyServerGroup",
"(",
"serverGroup",
",",
"app",
",",
"params",
")",
";",
"}",
";",
"const",
"confirmationModalParams",
"=",
"{",
"header",
":",
"'Really destroy '",
"+",
"serverGroup",
".",
"name",
"+",
"'?'",
",",
"buttonText",
":",
"'Destroy '",
"+",
"serverGroup",
".",
"name",
",",
"account",
":",
"serverGroup",
".",
"account",
",",
"taskMonitorConfig",
":",
"taskMonitor",
",",
"interestingHealthProviderNames",
":",
"undefined",
"as",
"string",
"[",
"]",
",",
"submitMethod",
",",
"askForReason",
":",
"true",
",",
"platformHealthOnlyShowOverride",
":",
"app",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
",",
"platformHealthType",
":",
"'Cloud Foundry'",
",",
"}",
";",
"ServerGroupWarningMessageService",
".",
"addDestroyWarningMessage",
"(",
"app",
",",
"serverGroup",
",",
"confirmationModalParams",
")",
";",
"if",
"(",
"app",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
"&&",
"app",
".",
"attributes",
".",
"platformHealthOnly",
")",
"{",
"confirmationModalParams",
".",
"interestingHealthProviderNames",
"=",
"[",
"'Cloud Foundry'",
"]",
";",
"}",
"ConfirmationModalService",
".",
"confirm",
"(",
"confirmationModalParams",
")",
";",
"}",
";",
"private",
"disableServerGroup",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"taskMonitor",
"=",
"{",
"application",
":",
"app",
",",
"title",
":",
"'Disabling '",
"+",
"serverGroup",
".",
"name",
",",
"}",
";",
"const",
"submitMethod",
"=",
"(",
"params",
")",
"=>",
"{",
"params",
".",
"serverGroupName",
"=",
"serverGroup",
".",
"name",
";",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"disableServerGroup",
"(",
"serverGroup",
",",
"app",
".",
"name",
",",
"params",
")",
";",
"}",
";",
"const",
"confirmationModalParams",
"=",
"{",
"header",
":",
"'Really disable '",
"+",
"serverGroup",
".",
"name",
"+",
"'?'",
",",
"buttonText",
":",
"'Disable '",
"+",
"serverGroup",
".",
"name",
",",
"account",
":",
"serverGroup",
".",
"account",
",",
"interestingHealthProviderNames",
":",
"undefined",
"as",
"string",
"[",
"]",
",",
"taskMonitorConfig",
":",
"taskMonitor",
",",
"platformHealthOnlyShowOverride",
":",
"app",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
",",
"platformHealthType",
":",
"'Cloud Foundry'",
",",
"submitMethod",
",",
"askForReason",
":",
"true",
",",
"}",
";",
"ServerGroupWarningMessageService",
".",
"addDisableWarningMessage",
"(",
"app",
",",
"serverGroup",
",",
"confirmationModalParams",
")",
";",
"if",
"(",
"app",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
"&&",
"app",
".",
"attributes",
".",
"platformHealthOnly",
")",
"{",
"confirmationModalParams",
".",
"interestingHealthProviderNames",
"=",
"[",
"'Cloud Foundry'",
"]",
";",
"}",
"ConfirmationModalService",
".",
"confirm",
"(",
"confirmationModalParams",
")",
";",
"}",
";",
"private",
"enableServerGroup",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"if",
"(",
"!",
"this",
".",
"isRollbackEnabled",
"(",
")",
")",
"{",
"this",
".",
"showEnableServerGroupModal",
"(",
")",
";",
"return",
";",
"}",
"const",
"confirmationModalParams",
"=",
"{",
"header",
":",
"'Rolling back?'",
",",
"body",
":",
"`Spinnaker provides an orchestrated rollback feature to carefully restore a different version of this\n server group. Do you want to use the orchestrated rollback?`",
",",
"buttonText",
":",
"`Yes, let's start the orchestrated rollback`",
",",
"cancelButtonText",
":",
"'No, I just want to enable the server group'",
",",
"}",
";",
"ConfirmationModalService",
".",
"confirm",
"(",
"confirmationModalParams",
")",
".",
"then",
"(",
"(",
")",
"=>",
"this",
".",
"rollbackServerGroup",
"(",
")",
")",
".",
"catch",
"(",
"(",
"{",
"source",
"}",
")",
"=>",
"{",
"if",
"(",
"source",
"===",
"'footer'",
")",
"{",
"this",
".",
"showEnableServerGroupModal",
"(",
")",
";",
"}",
"}",
")",
";",
"}",
";",
"private",
"showEnableServerGroupModal",
"(",
")",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"taskMonitor",
"=",
"{",
"application",
":",
"app",
",",
"title",
":",
"'Enabling '",
"+",
"serverGroup",
".",
"name",
",",
"}",
";",
"const",
"submitMethod",
"=",
"(",
"params",
")",
"=>",
"{",
"params",
".",
"serverGroupName",
"=",
"serverGroup",
".",
"name",
";",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"enableServerGroup",
"(",
"serverGroup",
",",
"app",
",",
"params",
")",
";",
"}",
";",
"const",
"confirmationModalParams",
"=",
"{",
"header",
":",
"'Really enable '",
"+",
"serverGroup",
".",
"name",
"+",
"'?'",
",",
"buttonText",
":",
"'Enable '",
"+",
"serverGroup",
".",
"name",
",",
"account",
":",
"serverGroup",
".",
"account",
",",
"interestingHealthProviderNames",
":",
"undefined",
"as",
"string",
"[",
"]",
",",
"taskMonitorConfig",
":",
"taskMonitor",
",",
"platformHealthOnlyShowOverride",
":",
"app",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
",",
"platformHealthType",
":",
"'Cloud Foundry'",
",",
"submitMethod",
",",
"askForReason",
":",
"true",
",",
"}",
";",
"if",
"(",
"app",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
"&&",
"app",
".",
"attributes",
".",
"platformHealthOnly",
")",
"{",
"confirmationModalParams",
".",
"interestingHealthProviderNames",
"=",
"[",
"'Cloud Foundry'",
"]",
";",
"}",
"ConfirmationModalService",
".",
"confirm",
"(",
"confirmationModalParams",
")",
";",
"}",
"private",
"rollbackServerGroup",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
"}",
"=",
"this",
".",
"props",
";",
"let",
"serverGroup",
"=",
"this",
".",
"props",
".",
"serverGroup",
";",
"let",
"previousServerGroup",
";",
"let",
"allServerGroups",
"=",
"(",
"app",
".",
"serverGroups",
".",
"data",
"as",
"ICloudFoundryServerGroup",
"[",
"]",
")",
".",
"filter",
"(",
"(",
"g",
")",
"=>",
"g",
".",
"cluster",
"===",
"serverGroup",
".",
"cluster",
"&&",
"g",
".",
"region",
"===",
"serverGroup",
".",
"region",
"&&",
"g",
".",
"account",
"===",
"serverGroup",
".",
"account",
")",
";",
"if",
"(",
"serverGroup",
".",
"isDisabled",
")",
"{",
"previousServerGroup",
"=",
"serverGroup",
";",
"serverGroup",
"=",
"orderBy",
"(",
"allServerGroups",
".",
"filter",
"(",
"(",
"g",
")",
"=>",
"g",
".",
"name",
"!==",
"previousServerGroup",
".",
"name",
"&&",
"!",
"g",
".",
"isDisabled",
")",
",",
"[",
"'instanceCounts.total'",
",",
"'createdTime'",
"]",
",",
"[",
"'desc'",
",",
"'desc'",
"]",
")",
"[",
"0",
"]",
"as",
"ICloudFoundryServerGroup",
";",
"}",
"allServerGroups",
"=",
"allServerGroups",
".",
"filter",
"(",
"(",
"g",
")",
"=>",
"g",
".",
"name",
"!==",
"serverGroup",
".",
"name",
")",
";",
"if",
"(",
"allServerGroups",
".",
"length",
"===",
"1",
"&&",
"!",
"previousServerGroup",
")",
"{",
"previousServerGroup",
"=",
"allServerGroups",
"[",
"0",
"]",
";",
"}",
"const",
"cluster",
"=",
"find",
"(",
"app",
".",
"clusters",
",",
"{",
"name",
":",
"serverGroup",
".",
"cluster",
",",
"account",
":",
"serverGroup",
".",
"account",
",",
"serverGroups",
":",
"[",
"]",
",",
"}",
")",
";",
"const",
"disabledServerGroups",
"=",
"filter",
"(",
"cluster",
".",
"serverGroups",
",",
"{",
"isDisabled",
":",
"true",
",",
"region",
":",
"serverGroup",
".",
"region",
",",
"}",
")",
"as",
"ICloudFoundryServerGroup",
"[",
"]",
";",
"CloudFoundryRollbackServerGroupModal",
".",
"show",
"(",
"{",
"serverGroup",
",",
"previousServerGroup",
",",
"disabledServerGroups",
":",
"disabledServerGroups",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"b",
".",
"name",
".",
"localeCompare",
"(",
"a",
".",
"name",
")",
")",
",",
"allServerGroups",
":",
"allServerGroups",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"b",
".",
"name",
".",
"localeCompare",
"(",
"a",
".",
"name",
")",
")",
",",
"application",
":",
"app",
",",
"}",
")",
";",
"}",
";",
"private",
"resizeServerGroup",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"CloudFoundryResizeServerGroupModal",
".",
"show",
"(",
"{",
"application",
":",
"app",
",",
"serverGroup",
"}",
")",
";",
"}",
";",
"private",
"mapServerGroupToLoadBalancers",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"CloudFoundryMapLoadBalancersModal",
".",
"show",
"(",
"{",
"application",
":",
"app",
",",
"serverGroup",
"}",
")",
";",
"}",
";",
"private",
"unmapServerGroupFromLoadBalancers",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"CloudFoundryUnmapLoadBalancersModal",
".",
"show",
"(",
"{",
"application",
":",
"app",
",",
"serverGroup",
"}",
")",
";",
"}",
";",
"private",
"cloneServerGroup",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"command",
"=",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildServerGroupCommandFromExisting",
"(",
"app",
",",
"serverGroup",
")",
";",
"const",
"title",
"=",
"`Clone ${",
"serverGroup",
".",
"name",
"}`",
";",
"CloudFoundryCreateServerGroupModal",
".",
"show",
"(",
"{",
"application",
":",
"app",
",",
"command",
",",
"isSourceConstant",
":",
"true",
",",
"serverGroup",
",",
"title",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"loadBalancers",
"}",
"=",
"serverGroup",
";",
"const",
"showEntityTags",
"=",
"SETTINGS",
".",
"feature",
"&&",
"SETTINGS",
".",
"feature",
".",
"entityTags",
";",
"const",
"entityTagTargets",
"=",
"ClusterTargetBuilder",
".",
"buildClusterTargets",
"(",
"serverGroup",
")",
";",
"return",
"(",
"<",
"Dropdown",
"className",
"=",
"\"dropdown\"",
"id",
"=",
"\"server-group-actions-dropdown\"",
">",
"<",
"Dropdown",
".",
"Toggle",
"className",
"=",
"\"btn btn-sm btn-primary dropdown-toggle\"",
">",
"Server",
"Group",
"Actions",
"<",
"/Dropdown.Toggle>",
"<",
"Dropdown",
".",
"Menu",
"className",
"=",
"\"dropdown-menu\"",
">",
"{",
"this",
".",
"isRollbackEnabled",
"(",
")",
"&&",
"(",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"rollbackServerGroup",
"}",
">",
"Rollback",
"<",
"/a>",
"<",
"/li>)}",
"{",
"this",
".",
"isRollbackEnabled",
"(",
")",
"&&",
"<",
"li",
"role",
"=",
"\"presentation\"",
"className",
"=",
"\"divider\"",
"/",
">",
"}",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"resizeServerGroup",
"}",
">",
"Resize",
"<",
"/a>",
"<",
"/li>",
"{",
"!",
"serverGroup",
".",
"isDisabled",
"&&",
"(",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"disableServerGroup",
"}",
">",
"Disable",
"<",
"/a>",
"<",
"/li>)}",
"{",
"this",
".",
"hasDisabledInstances",
"(",
")",
"&&",
"!",
"this",
".",
"isEnableLocked",
"(",
")",
"&&",
"(",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"enableServerGroup",
"}",
">",
"Enable",
"<",
"/a>",
"<",
"/li>)}",
"{",
"this",
".",
"isEnableLocked",
"(",
")",
"&&",
"(",
"<",
"li",
"className",
"=",
"\"disabled\"",
">",
"<",
"Tooltip",
"value",
"=",
"\"Cannot enable this server group until resize operation completes\"",
"placement",
"=",
"\"left\"",
">",
"<",
"a",
">",
"<",
"span",
"className",
"=",
"\"small glyphicon glyphicon-lock\"",
"/",
">",
"Enable",
"<",
"/a>",
"<",
"/Tooltip>",
"<",
"/li>)}",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"destroyServerGroup",
"}",
">",
"Destroy",
"<",
"/a>",
"<",
"/li>",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"cloneServerGroup",
"}",
">",
"Clone",
"<",
"/a>",
"<",
"/li>",
"{",
"!",
"serverGroup",
".",
"isDisabled",
"&&",
"(",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"mapServerGroupToLoadBalancers",
"}",
">",
"Map",
"Load",
"Balancer",
"<",
"/a>",
"<",
"/li>)}",
"{",
"!",
"serverGroup",
".",
"isDisabled",
"&&",
"loadBalancers",
"&&",
"!",
"!",
"loadBalancers",
".",
"length",
"&&",
"(",
"<",
"li",
">",
"<",
"a",
"className",
"=",
"\"clickable\"",
"onClick",
"=",
"{",
"this",
".",
"unmapServerGroupFromLoadBalancers",
"}",
">",
"Unmap",
"Load",
"Balancer",
"<",
"/a>",
"<",
"/li>)}",
"{",
"showEntityTags",
"&&",
"(",
"<",
"AddEntityTagLinks",
"component",
"=",
"{",
"serverGroup",
"}",
"application",
"=",
"{",
"app",
"}",
"entityType",
"=",
"\"serverGroup\"",
"ownerOptions",
"=",
"{",
"entityTagTargets",
"}",
"onUpdate",
"=",
"{",
"(",
")",
"=>",
"app",
".",
"serverGroups",
".",
"refresh",
"(",
")",
"}",
"/>)}",
"<",
"/Dropdown.Menu>",
"<",
"/Dropdown>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1896,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5575,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
61,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661735 | [
"import",
"{",
"isEmpty",
"}",
"from",
"'lodash'",
";",
"import",
"{",
"Observable",
"}",
"from",
"'rxjs'",
";",
"import",
"type",
"{",
"IServerGroupDetailsProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ServerGroupReader",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryLoadBalancer",
",",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../domain'",
";",
"function",
"extractServerGroupSummary",
"(",
"props",
")",
"{",
"const",
"{",
"app",
",",
"serverGroup",
"}",
"=",
"props",
";",
"return",
"app",
".",
"ready",
"(",
")",
".",
"then",
"(",
"(",
")",
"=>",
"{",
"let",
"summary",
"=",
"app",
".",
"serverGroups",
".",
"data",
".",
"find",
"(",
"(",
"toCheck",
")",
"=>",
"{",
"return",
"(",
"toCheck",
".",
"name",
"===",
"serverGroup",
".",
"name",
"&&",
"toCheck",
".",
"account",
"===",
"serverGroup",
".",
"accountId",
"&&",
"toCheck",
".",
"region",
"===",
"serverGroup",
".",
"region",
")",
";",
"}",
")",
";",
"if",
"(",
"!",
"summary",
")",
"{",
"app",
".",
"loadBalancers",
".",
"data",
".",
"some",
"(",
"(",
"loadBalancer",
")",
"=>",
"{",
"if",
"(",
"loadBalancer",
".",
"account",
"===",
"serverGroup",
".",
"accountId",
"&&",
"loadBalancer",
".",
"region",
"===",
"serverGroup",
".",
"region",
")",
"{",
"return",
"loadBalancer",
".",
"serverGroups",
".",
"some",
"(",
"(",
"possibleServerGroup",
")",
"=>",
"{",
"if",
"(",
"possibleServerGroup",
".",
"name",
"===",
"serverGroup",
".",
"name",
")",
"{",
"summary",
"=",
"possibleServerGroup",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
")",
";",
"}",
"return",
"false",
";",
"}",
")",
";",
"}",
"return",
"summary",
";",
"}",
")",
";",
"}",
"export",
"function",
"cfServerGroupDetailsGetter",
"(",
"props",
",",
"autoClose",
")",
"{",
"const",
"{",
"app",
",",
"serverGroup",
":",
"serverGroupInfo",
"}",
"=",
"props",
";",
"return",
"new",
"Observable",
"<",
"ICloudFoundryServerGroup",
">",
"(",
"(",
"observer",
")",
"=>",
"{",
"extractServerGroupSummary",
"(",
"props",
")",
".",
"then",
"(",
"(",
"summary",
")",
"=>",
"{",
"ServerGroupReader",
".",
"getServerGroup",
"(",
"app",
".",
"name",
",",
"serverGroupInfo",
".",
"accountId",
",",
"serverGroupInfo",
".",
"region",
",",
"serverGroupInfo",
".",
"name",
")",
".",
"then",
"(",
"(",
"serverGroup",
")",
"=>",
"{",
"Object",
".",
"assign",
"(",
"serverGroup",
",",
"summary",
",",
"{",
"account",
":",
"serverGroupInfo",
".",
"accountId",
"}",
")",
";",
"if",
"(",
"!",
"isEmpty",
"(",
"serverGroup",
")",
")",
"{",
"observer",
".",
"next",
"(",
"serverGroup",
")",
";",
"}",
"else",
"{",
"autoClose",
"(",
")",
";",
"}",
"}",
",",
"autoClose",
")",
";",
"}",
",",
"autoClose",
")",
";",
"}",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
18,
null,
0,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
396,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661736 | [
"import",
"type",
"{",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IServerGroup",
",",
"IServerGroupFilter",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AppListExtractor",
",",
"FormikFormField",
",",
"ReactSelectInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryCreateServerGroupCommand",
"}",
"from",
"'../../../serverGroup'",
";",
"export",
"interface",
"IFormikAccountRegionClusterSelectorProps",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"application",
":",
"Application",
";",
"cloudProvider",
":",
"string",
";",
"clusterField",
"?",
":",
"string",
";",
"componentName",
"?",
":",
"string",
";",
"credentialsField",
"?",
":",
"string",
";",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryCreateServerGroupCommand",
">",
";",
"}",
"export",
"interface",
"IFormikAccountRegionClusterSelectorState",
"{",
"availableRegions",
":",
"string",
"[",
"]",
";",
"cloudProvider",
":",
"string",
";",
"clusterField",
":",
"string",
";",
"clusters",
":",
"string",
"[",
"]",
";",
"componentName",
":",
"string",
";",
"credentialsField",
":",
"string",
";",
"}",
"export",
"class",
"FormikAccountRegionClusterSelector",
"extends",
"React",
".",
"Component",
"<",
"IFormikAccountRegionClusterSelectorProps",
",",
"IFormikAccountRegionClusterSelectorState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"credentialsField",
"=",
"props",
".",
"credentialsField",
"||",
"'credentials'",
";",
"const",
"clusterField",
"=",
"props",
".",
"clusterField",
"||",
"'cluster'",
";",
"this",
".",
"state",
"=",
"{",
"availableRegions",
":",
"[",
"]",
",",
"cloudProvider",
":",
"props",
".",
"cloudProvider",
",",
"clusterField",
",",
"clusters",
":",
"[",
"]",
",",
"componentName",
":",
"props",
".",
"componentName",
"||",
"''",
",",
"credentialsField",
",",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"const",
"{",
"componentName",
",",
"formik",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"credentialsField",
"}",
"=",
"this",
".",
"state",
";",
"const",
"credentials",
"=",
"get",
"(",
"formik",
".",
"values",
",",
"componentName",
"?",
"`${",
"componentName",
"}.${",
"credentialsField",
"}`",
":",
"`${",
"credentialsField",
"}`",
",",
"undefined",
")",
";",
"const",
"region",
"=",
"get",
"(",
"formik",
".",
"values",
",",
"componentName",
"?",
"`${",
"componentName",
"}.region`",
":",
"'region'",
",",
"undefined",
")",
";",
"this",
".",
"setRegionList",
"(",
"credentials",
")",
";",
"this",
".",
"setClusterList",
"(",
"credentials",
",",
"[",
"region",
"]",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"setRegionList",
"=",
"(",
"credentials",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"application",
"}",
"=",
"this",
".",
"props",
";",
"const",
"accountFilter",
"=",
"(",
"serverGroup",
")",
"=>",
"serverGroup",
"?",
"serverGroup",
".",
"account",
"===",
"credentials",
":",
"true",
";",
"observableFrom",
"(",
"application",
".",
"ready",
"(",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
")",
"=>",
"{",
"const",
"availableRegions",
"=",
"AppListExtractor",
".",
"getRegions",
"(",
"[",
"application",
"]",
",",
"accountFilter",
")",
";",
"availableRegions",
".",
"sort",
"(",
")",
";",
"this",
".",
"setState",
"(",
"{",
"availableRegions",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"setClusterList",
"=",
"(",
"credentials",
",",
"regions",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"application",
"}",
"=",
"this",
".",
"props",
";",
"observableFrom",
"(",
"application",
".",
"ready",
"(",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
")",
"=>",
"{",
"const",
"clusterFilter",
"=",
"AppListExtractor",
".",
"clusterFilterForCredentialsAndRegion",
"(",
"credentials",
",",
"regions",
")",
";",
"const",
"clusters",
"=",
"AppListExtractor",
".",
"getClusters",
"(",
"[",
"application",
"]",
",",
"clusterFilter",
")",
";",
"this",
".",
"setState",
"(",
"{",
"clusters",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"public",
"accountChanged",
"=",
"(",
"credentials",
")",
":",
"void",
"=>",
"{",
"this",
".",
"setRegionList",
"(",
"credentials",
")",
";",
"this",
".",
"setClusterList",
"(",
"credentials",
",",
"[",
"]",
")",
";",
"}",
";",
"public",
"regionChanged",
"=",
"(",
"region",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"componentName",
",",
"formik",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"credentialsField",
"}",
"=",
"this",
".",
"state",
";",
"const",
"credentials",
"=",
"get",
"(",
"formik",
".",
"values",
",",
"componentName",
"?",
"`${",
"componentName",
"}.${",
"credentialsField",
"}`",
":",
"`${",
"credentialsField",
"}`",
",",
"undefined",
")",
";",
"this",
".",
"setClusterList",
"(",
"credentials",
",",
"[",
"region",
"]",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"accounts",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"credentialsField",
",",
"availableRegions",
",",
"clusters",
",",
"clusterField",
",",
"componentName",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"col-md-9\"",
">",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.${",
"credentialsField",
"}`",
":",
"`${",
"credentialsField",
"}`",
"}",
"label",
"=",
"\"Account\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"inputClassName",
"=",
"\"cloudfoundry-react-select\"",
"{",
"...",
"props",
"}",
"stringOptions",
"=",
"{",
"accounts",
"&&",
"accounts",
".",
"map",
"(",
"(",
"acc",
")",
"=>",
"acc",
".",
"name",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"onChange",
"=",
"{",
"this",
".",
"accountChanged",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.region`",
":",
"'region'",
"}",
"label",
"=",
"\"Region\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"inputClassName",
"=",
"\"cloudfoundry-react-select\"",
"{",
"...",
"props",
"}",
"stringOptions",
"=",
"{",
"availableRegions",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"onChange",
"=",
"{",
"this",
".",
"regionChanged",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"sp-margin-m-bottom\"",
">",
"<",
"FormikFormField",
"name",
"=",
"{",
"componentName",
"?",
"`${",
"componentName",
"}.${",
"clusterField",
"}`",
":",
"`${",
"clusterField",
"}`",
"}",
"label",
"=",
"\"Cluster\"",
"input",
"=",
"{",
"(",
"props",
")",
"=>",
"(",
"<",
"ReactSelectInput",
"inputClassName",
"=",
"\"cloudfoundry-react-select\"",
"{",
"...",
"props",
"}",
"stringOptions",
"=",
"{",
"clusters",
"}",
"clearable",
"=",
"{",
"false",
"}",
"/",
">",
")",
"}",
"required",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
9812,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
44,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661737 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"NgReact",
",",
"StageConfigField",
",",
"StageConstants",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../widgets/accountRegionClusterSelector'",
";",
"export",
"interface",
"ICloudFoundryAsgStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryAsgStageConfig",
"extends",
"React",
".",
"Component",
"<",
"IStageConfigProps",
",",
"ICloudFoundryAsgStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"cloudProvider",
":",
"'cloudfoundry'",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"targetUpdated",
"=",
"(",
"target",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"target",
"}",
")",
";",
"}",
";",
"private",
"componentUpdated",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
":",
"stage",
".",
"credentials",
",",
"regions",
":",
"stage",
".",
"regions",
",",
"cluster",
":",
"stage",
".",
"cluster",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"application",
",",
"pipeline",
",",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"target",
"}",
"=",
"stage",
";",
"const",
"{",
"accounts",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"TargetSelect",
"}",
"=",
"NgReact",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"{",
"!",
"pipeline",
".",
"strategy",
"&&",
"(",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"componentUpdated",
"}",
"component",
"=",
"{",
"stage",
"}",
"/",
">",
")",
"}",
"<",
"StageConfigField",
"label",
"=",
"\"Target\"",
">",
"<",
"TargetSelect",
"model",
"=",
"{",
"{",
"target",
"}",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
"}",
"onChange",
"=",
"{",
"this",
".",
"targetUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28165,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661738 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IExecutionDetailsSectionProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountTag",
",",
"ExecutionDetailsSection",
",",
"StageExecutionLogs",
",",
"StageFailureMessage",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"function",
"CloudFoundryLoadBalancersExecutionDetails",
"(",
"props",
")",
"{",
"const",
"{",
"stage",
"}",
"=",
"props",
";",
"const",
"{",
"context",
"}",
"=",
"stage",
";",
"const",
"account",
"=",
"get",
"(",
"context",
",",
"'credentials'",
",",
"undefined",
")",
";",
"const",
"region",
"=",
"get",
"(",
"context",
",",
"'region'",
",",
"undefined",
")",
";",
"const",
"loadBalancerNames",
"=",
"get",
"(",
"context",
",",
"'loadBalancerNames'",
",",
"undefined",
")",
";",
"const",
"serverGroupName",
"=",
"get",
"(",
"context",
",",
"'serverGroupName'",
",",
"undefined",
")",
";",
"return",
"(",
"<",
"ExecutionDetailsSection",
"name",
"=",
"{",
"props",
".",
"name",
"}",
"current",
"=",
"{",
"props",
".",
"current",
"}",
">",
"<",
"div",
"className",
"=",
"\"step-section-details\"",
">",
"<",
"div",
"className",
"=",
"\"row\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-12\"",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal\"",
">",
"<",
"dt",
">",
"Account",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"AccountTag",
"account",
"=",
"{",
"account",
"}",
"/>",
"<",
"/dd>",
"<",
"dt",
">",
"Region",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"region",
"}",
"<",
"br",
"/",
">",
"<",
"/dd>",
"<",
"dt",
">",
"Server",
"Group",
"Name",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serverGroupName",
"}",
"<",
"br",
"/",
">",
"<",
"/dd>",
"<",
"dt",
">",
"Load",
"Balancers",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"loadBalancerNames",
".",
"join",
"(",
"', '",
")",
"}",
"<",
"br",
"/",
">",
"<",
"/dd>",
"<",
"/dl>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"StageFailureMessage",
"stage",
"=",
"{",
"props",
".",
"stage",
"}",
"message",
"=",
"{",
"props",
".",
"stage",
".",
"failureMessage",
"}",
"/",
">",
"<",
"StageExecutionLogs",
"stage",
"=",
"{",
"props",
".",
"stage",
"}",
"/>",
"<",
"/ExecutionDetailsSection>);",
"}",
"export",
"namespace",
"CloudFoundryLoadBalancersExecutionDetails",
"{",
"export",
"const",
"title",
"=",
"'cloudfoundryLoadBalancersConfig'",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null
] |
661739 | [
"import",
"type",
"{",
"Formik",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IPipeline",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"NgReact",
",",
"SpinFormik",
",",
"StageConfigField",
",",
"StageConstants",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"Routes",
"}",
"from",
"'../../forms/serverGroup'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../widgets/accountRegionClusterSelector'",
";",
"interface",
"ICloudFoundryLoadBalancerStageConfigProps",
"extends",
"IStageConfigProps",
"{",
"pipeline",
":",
"IPipeline",
";",
"}",
"interface",
"ICloudFoundryLoadBalancersValues",
"{",
"routes",
":",
"string",
"[",
"]",
";",
"}",
"interface",
"ICloudFoundryLoadBalancersStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"application",
":",
"Application",
";",
"initialValues",
":",
"ICloudFoundryLoadBalancersValues",
";",
"pipeline",
":",
"IPipeline",
";",
"}",
"export",
"class",
"CloudFoundryLoadBalancersStageConfig",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerStageConfigProps",
",",
"ICloudFoundryLoadBalancersStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"private",
"formikRef",
"=",
"React",
".",
"createRef",
"<",
"Formik",
"<",
"ICloudFoundryLoadBalancersValues",
">",
">",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"{",
"loadBalancerNames",
"}",
"=",
"props",
".",
"stage",
";",
"const",
"routes",
"=",
"loadBalancerNames",
"&&",
"loadBalancerNames",
".",
"length",
"?",
"loadBalancerNames",
":",
"[",
"''",
"]",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"loadBalancerNames",
":",
"routes",
",",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"application",
":",
"props",
".",
"application",
",",
"initialValues",
":",
"{",
"routes",
",",
"}",
",",
"pipeline",
":",
"props",
".",
"pipeline",
",",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"targetUpdated",
"=",
"(",
"target",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"target",
"}",
")",
";",
"}",
";",
"private",
"componentUpdated",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
":",
"stage",
".",
"credentials",
",",
"region",
":",
"stage",
".",
"region",
",",
"cluster",
":",
"stage",
".",
"cluster",
",",
"loadBalancerNames",
":",
"stage",
".",
"loadBalancerNames",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"accounts",
",",
"application",
",",
"initialValues",
",",
"pipeline",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"target",
"}",
"=",
"stage",
";",
"const",
"{",
"TargetSelect",
"}",
"=",
"NgReact",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"{",
"!",
"pipeline",
".",
"strategy",
"&&",
"(",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"isSingleRegion",
"=",
"{",
"true",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"componentUpdated",
"}",
"component",
"=",
"{",
"stage",
"}",
"/",
">",
")",
"}",
"<",
"StageConfigField",
"label",
"=",
"\"Target\"",
">",
"<",
"TargetSelect",
"model",
"=",
"{",
"{",
"target",
"}",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
"}",
"onChange",
"=",
"{",
"this",
".",
"targetUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"SpinFormik",
"<",
"ICloudFoundryLoadBalancersValues",
">",
"ref",
"=",
"{",
"this",
".",
"formikRef",
"}",
"initialValues",
"=",
"{",
"initialValues",
"}",
"onSubmit",
"=",
"{",
"null",
"}",
"render",
"=",
"{",
"(",
")",
"=>",
"{",
"return",
"(",
"<",
"Routes",
"fieldName",
"=",
"{",
"'routes'",
"}",
"isRequired",
"=",
"{",
"true",
"}",
"singleRouteOnly",
"=",
"{",
"true",
"}",
"onChange",
"=",
"{",
"(",
"routes",
")",
"=>",
"{",
"stage",
".",
"loadBalancerNames",
"=",
"routes",
";",
"this",
".",
"componentUpdated",
"(",
"stage",
")",
";",
"}",
"}",
"/>);",
"}",
"}",
"/>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661740 | [
"import",
"type",
"{",
"IDeferred",
"}",
"from",
"'angular'",
";",
"import",
"type",
"{",
"IModalServiceInstance",
"}",
"from",
"'angular-ui-bootstrap'",
";",
"import",
"type",
"{",
"Formik",
"}",
"from",
"'formik'",
";",
"import",
"{",
"Form",
"}",
"from",
"'formik'",
";",
"import",
"{",
"$q",
"}",
"from",
"'ngimport'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Modal",
",",
"ModalFooter",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"ILoadBalancerModalProps",
",",
"IModalComponentProps",
",",
"IServerGroup",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"ModalClose",
",",
"noop",
",",
"ReactInjector",
",",
"ReactModal",
",",
"SpinFormik",
",",
"TaskMonitor",
",",
"TaskMonitorWrapper",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServerGroup",
"}",
"from",
"'../../domain'",
";",
"import",
"{",
"AccountRegionClusterSelector",
",",
"Routes",
"}",
"from",
"'../../presentation'",
";",
"export",
"interface",
"ICreateCloudFoundryMapLoadBalancerState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"regions",
":",
"string",
"[",
"]",
";",
"application",
":",
"Application",
";",
"selectedValues",
":",
"ICloudFoundryLoadBalancerModalValues",
";",
"taskMonitor",
":",
"TaskMonitor",
";",
"}",
"export",
"interface",
"ICloudFoundryLoadBalancerModalProps",
"extends",
"IModalComponentProps",
"{",
"application",
":",
"Application",
";",
"}",
"export",
"interface",
"ICloudFoundryLoadBalancerModalValues",
"{",
"credentials",
":",
"string",
";",
"region",
":",
"string",
";",
"cluster",
":",
"string",
";",
"routes",
":",
"string",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryMapLoadBalancerModal",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryLoadBalancerModalProps",
",",
"ICreateCloudFoundryMapLoadBalancerState",
">",
"{",
"public",
"static",
"defaultProps",
":",
"Partial",
"<",
"ICloudFoundryLoadBalancerModalProps",
">",
"=",
"{",
"closeModal",
":",
"noop",
",",
"dismissModal",
":",
"noop",
",",
"}",
";",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"private",
"formikRef",
"=",
"React",
".",
"createRef",
"<",
"Formik",
"<",
"ICloudFoundryLoadBalancerModalValues",
">",
">",
"(",
")",
";",
"private",
"$uibModalInstanceEmulation",
":",
"IModalServiceInstance",
"&",
"{",
"deferred",
"?",
":",
"IDeferred",
"<",
"any",
">",
";",
"}",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"deferred",
"=",
"$q",
".",
"defer",
"(",
")",
";",
"const",
"promise",
"=",
"deferred",
".",
"promise",
";",
"this",
".",
"$uibModalInstanceEmulation",
"=",
"{",
"result",
":",
"promise",
",",
"close",
":",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
",",
"dismiss",
":",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
",",
"}",
"as",
"IModalServiceInstance",
";",
"Object",
".",
"assign",
"(",
"this",
".",
"$uibModalInstanceEmulation",
",",
"{",
"deferred",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"application",
":",
"props",
".",
"application",
",",
"selectedValues",
":",
"{",
"credentials",
":",
"''",
",",
"region",
":",
"''",
",",
"cluster",
":",
"''",
",",
"routes",
":",
"[",
"''",
"]",
",",
"}",
",",
"taskMonitor",
":",
"new",
"TaskMonitor",
"(",
"{",
"application",
":",
"props",
".",
"application",
",",
"title",
":",
"'Mapping a route to your server group'",
",",
"modalInstance",
":",
"TaskMonitor",
".",
"modalInstanceEmulation",
"(",
"(",
")",
"=>",
"this",
".",
"props",
".",
"dismissModal",
"(",
")",
")",
",",
"onTaskComplete",
":",
"(",
")",
"=>",
"this",
".",
"props",
".",
"application",
".",
"serverGroups",
".",
"refresh",
"(",
")",
",",
"}",
")",
",",
"}",
";",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"rawAccounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
":",
"rawAccounts",
"}",
")",
")",
";",
"}",
"public",
"static",
"show",
"(",
"props",
")",
"{",
"const",
"modalProps",
"=",
"{",
"dialogClassName",
":",
"'wizard-modal modal-lg'",
"}",
";",
"return",
"ReactModal",
".",
"show",
"(",
"CloudFoundryMapLoadBalancerModal",
",",
"{",
"application",
":",
"props",
".",
"app",
",",
"}",
",",
"modalProps",
")",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"submit",
"=",
"(",
"values",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"routes",
"}",
"=",
"values",
";",
"const",
"serverGroup",
"=",
"this",
".",
"props",
".",
"application",
".",
"serverGroups",
"?.",
"data",
"?.",
"find",
"(",
"(",
"sg",
")",
"=>",
"sg",
".",
"cluster",
"===",
"this",
".",
"state",
".",
"selectedValues",
".",
"cluster",
"&&",
"sg",
".",
"account",
"===",
"this",
".",
"state",
".",
"selectedValues",
".",
"credentials",
"&&",
"sg",
".",
"region",
"===",
"this",
".",
"state",
".",
"selectedValues",
".",
"region",
")",
";",
"const",
"coreServerGroup",
"=",
"{",
"account",
":",
"serverGroup",
".",
"account",
",",
"cloudProvider",
":",
"serverGroup",
".",
"cloudProvider",
",",
"cluster",
":",
"serverGroup",
".",
"cluster",
",",
"instanceCounts",
":",
"serverGroup",
".",
"instanceCounts",
",",
"instances",
":",
"serverGroup",
".",
"instances",
",",
"loadBalancers",
":",
"routes",
",",
"name",
":",
"serverGroup",
".",
"name",
",",
"region",
":",
"serverGroup",
".",
"region",
",",
"type",
":",
"serverGroup",
".",
"type",
",",
"}",
";",
"this",
".",
"state",
".",
"taskMonitor",
".",
"submit",
"(",
"(",
")",
"=>",
"{",
"return",
"ReactInjector",
".",
"serverGroupWriter",
".",
"mapLoadBalancers",
"(",
"coreServerGroup",
",",
"this",
".",
"props",
".",
"application",
",",
"{",
"serverGroupName",
":",
"serverGroup",
".",
"name",
",",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"close",
"=",
"(",
"args",
"?",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"dismissModal",
".",
"apply",
"(",
"null",
",",
"args",
")",
";",
"}",
";",
"private",
"accountRegionClusterUpdated",
"=",
"(",
"values",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"selectedValues",
":",
"{",
"cluster",
":",
"values",
".",
"cluster",
",",
"credentials",
":",
"values",
".",
"credentials",
",",
"region",
":",
"values",
".",
"region",
",",
"routes",
":",
"[",
"''",
"]",
",",
"}",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"accounts",
",",
"application",
",",
"selectedValues",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
">",
"<",
"TaskMonitorWrapper",
"monitor",
"=",
"{",
"this",
".",
"state",
".",
"taskMonitor",
"}",
"/",
">",
"<",
"SpinFormik",
"<",
"ICloudFoundryLoadBalancerModalValues",
">",
"ref",
"=",
"{",
"this",
".",
"formikRef",
"}",
"initialValues",
"=",
"{",
"selectedValues",
"}",
"onSubmit",
"=",
"{",
"this",
".",
"submit",
"}",
"render",
"=",
"{",
"(",
"formik",
")",
"=>",
"{",
"return",
"(",
"<",
">",
"<",
"ModalClose",
"dismiss",
"=",
"{",
"this",
".",
"close",
"}",
"/",
">",
"<",
"Modal",
".",
"Header",
">",
"<",
"Modal",
".",
"Title",
">",
"Map",
"route",
"<",
"/Modal.Title>",
"<",
"/Modal.Header>",
"<",
"Modal",
".",
"Body",
">",
"<",
"Form",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"isSingleRegion",
"=",
"{",
"true",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"accountRegionClusterUpdated",
"}",
"component",
"=",
"{",
"selectedValues",
"}",
"/",
">",
"<",
"Routes",
"fieldName",
"=",
"\"routes\"",
"isRequired",
"=",
"{",
"true",
"}",
"singleRouteOnly",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"/Form>",
"<",
"/Modal.Body>",
"<",
"ModalFooter",
">",
"<",
"button",
"className",
"=",
"\"btn btn-default\"",
"onClick",
"=",
"{",
"this",
".",
"close",
"}",
">",
"Cancel",
"<",
"/button>",
"<",
"button",
"type",
"=",
"\"submit\"",
"className",
"=",
"\"btn btn-primary\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"submit",
"(",
"formik",
".",
"values",
")",
"}",
"disabled",
"=",
"{",
"!",
"formik",
".",
"isValid",
"}",
">",
"Submit",
"<",
"/button>",
"<",
"/ModalFooter>",
"<",
"/>);",
"}",
"}",
"/>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
7890,
null,
null,
null,
null,
null,
null,
null,
null,
3068,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
0,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
17339,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9812,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661741 | [
"import",
"type",
"{",
"IPipeline",
",",
"IStage",
",",
"IStageOrTriggerTypeConfig",
",",
"IStageOrTriggerValidator",
",",
"IValidatorConfig",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"NameUtils",
",",
"PipelineConfigService",
",",
"PipelineConfigValidator",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"ITargetImpedanceValidationConfig",
"extends",
"IValidatorConfig",
"{",
"stageTypes",
"?",
":",
"string",
"[",
"]",
";",
"stageType",
"?",
":",
"string",
";",
"message",
":",
"string",
";",
"}",
"export",
"class",
"CfTargetImpedanceValidator",
"implements",
"IStageOrTriggerValidator",
"{",
"public",
"validate",
"(",
"pipeline",
",",
"stage",
",",
"validator",
",",
"_config",
")",
"{",
"const",
"stagesToTest",
"=",
"PipelineConfigService",
".",
"getAllUpstreamDependencies",
"(",
"pipeline",
",",
"stage",
")",
";",
"const",
"regions",
"=",
"stage",
".",
"regions",
"||",
"[",
"]",
";",
"let",
"allRegionsFound",
"=",
"true",
";",
"regions",
".",
"forEach",
"(",
"(",
"region",
")",
"=>",
"{",
"let",
"regionFound",
"=",
"false",
";",
"stagesToTest",
".",
"forEach",
"(",
"(",
"toTest",
")",
"=>",
"{",
"if",
"(",
"toTest",
".",
"type",
"===",
"'deploy'",
"&&",
"toTest",
".",
"clusters",
"&&",
"toTest",
".",
"clusters",
".",
"length",
")",
"{",
"toTest",
".",
"clusters",
".",
"forEach",
"(",
"(",
"cluster",
")",
"=>",
"{",
"const",
"clusterName",
"=",
"NameUtils",
".",
"getClusterName",
"(",
"cluster",
".",
"application",
",",
"cluster",
".",
"stack",
",",
"cluster",
".",
"freeFormDetails",
")",
";",
"if",
"(",
"clusterName",
"===",
"stage",
".",
"cluster",
"&&",
"cluster",
".",
"account",
"===",
"stage",
".",
"credentials",
"&&",
"cluster",
".",
"region",
"===",
"region",
")",
"{",
"regionFound",
"=",
"true",
";",
"}",
"}",
")",
";",
"}",
"else",
"if",
"(",
"toTest",
".",
"type",
"===",
"'cloneServerGroup'",
"&&",
"NameUtils",
".",
"getClusterName",
"(",
"toTest",
".",
"application",
",",
"toTest",
".",
"stack",
",",
"toTest",
".",
"freeFormDetails",
")",
"===",
"stage",
".",
"cluster",
"&&",
"toTest",
".",
"region",
"===",
"region",
")",
"{",
"regionFound",
"=",
"true",
";",
"}",
"}",
")",
";",
"if",
"(",
"!",
"regionFound",
")",
"{",
"allRegionsFound",
"=",
"false",
";",
"}",
"}",
")",
";",
"if",
"(",
"!",
"allRegionsFound",
")",
"{",
"return",
"validator",
".",
"message",
";",
"}",
"return",
"null",
";",
"}",
"}",
"PipelineConfigValidator",
".",
"registerValidator",
"(",
"'cfTargetImpedance'",
",",
"new",
"CfTargetImpedanceValidator",
"(",
")",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
15666,
null,
3649,
null,
0,
null,
0,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661742 | [
"import",
"{",
"get",
",",
"has",
",",
"upperFirst",
"}",
"from",
"'lodash'",
";",
"import",
"type",
"{",
"IPipeline",
",",
"IStage",
",",
"IStageOrTriggerValidator",
",",
"ITrigger",
",",
"IValidatorConfig",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"PipelineConfigValidator",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"IInstanceFieldSizeValidationConfig",
"extends",
"IValidatorConfig",
"{",
"fieldName",
":",
"string",
";",
"fieldLabel",
"?",
":",
"string",
";",
"min",
"?",
":",
"number",
";",
"max",
"?",
":",
"number",
";",
"message",
"?",
":",
"string",
";",
"}",
"export",
"class",
"CfInstanceSizeFieldValidator",
"implements",
"IStageOrTriggerValidator",
"{",
"public",
"validate",
"(",
"pipeline",
",",
"stage",
",",
"validationConfig",
")",
"{",
"if",
"(",
"!",
"this",
".",
"passesValidation",
"(",
"stage",
",",
"validationConfig",
")",
")",
"{",
"return",
"this",
".",
"validationMessage",
"(",
"validationConfig",
",",
"pipeline",
")",
";",
"}",
"return",
"null",
";",
"}",
"protected",
"passesValidation",
"(",
"stage",
",",
"validationConfig",
")",
"{",
"return",
"this",
".",
"fieldIsValid",
"(",
"stage",
",",
"validationConfig",
")",
";",
"}",
"protected",
"validationMessage",
"(",
"validationConfig",
",",
"pipeline",
")",
"{",
"const",
"fieldLabel",
"=",
"this",
".",
"printableFieldLabel",
"(",
"validationConfig",
")",
";",
"const",
"hasMin",
"=",
"has",
"(",
"validationConfig",
",",
"'min'",
")",
";",
"const",
"min",
"=",
"hasMin",
"?",
"get",
"(",
"validationConfig",
",",
"'min'",
")",
":",
"'NA'",
";",
"const",
"hasMax",
"=",
"has",
"(",
"validationConfig",
",",
"'max'",
")",
";",
"const",
"max",
"=",
"hasMax",
"?",
"get",
"(",
"validationConfig",
",",
"'max'",
")",
":",
"'NA'",
";",
"let",
"message",
"=",
"``",
";",
"if",
"(",
"hasMin",
")",
"{",
"if",
"(",
"hasMax",
")",
"{",
"message",
"=",
"`<strong>${",
"fieldLabel",
"}</strong> should be from ${",
"min",
"} to ${",
"max",
"} in ${",
"pipeline",
".",
"name",
"}.`",
";",
"}",
"else",
"{",
"message",
"=",
"`<strong>${",
"fieldLabel",
"}</strong> should be at least ${",
"min",
"} in ${",
"pipeline",
".",
"name",
"}.`",
";",
"}",
"}",
"else",
"if",
"(",
"hasMax",
")",
"{",
"message",
"=",
"`<strong>${",
"fieldLabel",
"}</strong> should be no more than ${",
"max",
"} in ${",
"pipeline",
".",
"name",
"}.`",
";",
"}",
"return",
"validationConfig",
".",
"message",
"||",
"message",
";",
"}",
"protected",
"printableFieldLabel",
"(",
"config",
")",
"{",
"const",
"fieldLabel",
"=",
"config",
".",
"fieldLabel",
"||",
"config",
".",
"fieldName",
";",
"return",
"upperFirst",
"(",
"fieldLabel",
")",
";",
"}",
"protected",
"fieldIsValid",
"(",
"stage",
",",
"config",
")",
"{",
"const",
"fieldExists",
"=",
"has",
"(",
"stage",
",",
"config",
".",
"fieldName",
")",
";",
"const",
"field",
"=",
"get",
"(",
"stage",
",",
"config",
".",
"fieldName",
")",
";",
"const",
"hasMax",
"=",
"has",
"(",
"config",
",",
"'max'",
")",
";",
"const",
"hasMin",
"=",
"has",
"(",
"config",
",",
"'min'",
")",
";",
"const",
"max",
"=",
"get",
"(",
"config",
",",
"'max'",
")",
";",
"const",
"min",
"=",
"get",
"(",
"config",
",",
"'min'",
")",
";",
"return",
"fieldExists",
"&&",
"(",
"!",
"hasMax",
"||",
"(",
"hasMax",
"&&",
"field",
"<=",
"max",
")",
")",
"&&",
"(",
"!",
"hasMin",
"||",
"(",
"hasMin",
"&&",
"field",
">=",
"min",
")",
")",
";",
"}",
"}",
"PipelineConfigValidator",
".",
"registerValidator",
"(",
"'cfInstanceSizeField'",
",",
"new",
"CfInstanceSizeFieldValidator",
"(",
")",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
15666,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
0,
null,
15666,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
0,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
0,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661743 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"type",
"{",
"IPipeline",
",",
"IStage",
",",
"IStageOrTriggerValidator",
",",
"ITrigger",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"PipelineConfigValidator",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"class",
"CfRequiredRoutesFieldValidator",
"implements",
"IStageOrTriggerValidator",
"{",
"public",
"validate",
"(",
"_pipeline",
",",
"stage",
",",
"validationConfig",
")",
"{",
"const",
"routes",
"=",
"get",
"(",
"stage",
",",
"validationConfig",
".",
"fieldName",
")",
";",
"const",
"routeErrors",
"=",
"routes",
".",
"map",
"(",
"(",
"route",
")",
"=>",
"{",
"const",
"regex",
"=",
"/^([-\\w]+)\\.([-.\\w]+)(:\\d+)?([-/\\w]+)?$/gm",
";",
"route",
"=",
"route",
"||",
"''",
";",
"if",
"(",
"regex",
".",
"exec",
"(",
"route",
")",
"===",
"null",
")",
"{",
"const",
"spelRegex",
"=",
"/^\\${.*}$/g",
";",
"if",
"(",
"spelRegex",
".",
"exec",
"(",
"route",
")",
"===",
"null",
")",
"{",
"return",
"`\"${",
"route",
"}\" did not match the expected format \"host.some.domain[:9999][/some/path]\"`",
";",
"}",
"}",
"return",
"null",
";",
"}",
")",
".",
"filter",
"(",
"(",
"err",
")",
"=>",
"err",
"!=",
"null",
")",
";",
"return",
"(",
"routeErrors",
"&&",
"routeErrors",
".",
"length",
"&&",
"routeErrors",
"[",
"0",
"]",
")",
"||",
"null",
";",
"}",
"}",
"PipelineConfigValidator",
".",
"registerValidator",
"(",
"'cfRequiredRoutesField'",
",",
"new",
"CfRequiredRoutesFieldValidator",
"(",
")",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
15666,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
27,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
27,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661744 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IArtifact",
",",
"IExpectedArtifact",
",",
"IFormikStageConfigInjectedProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ArtifactTypePatterns",
",",
"excludeAllTypesExcept",
",",
"StageArtifactSelectorDelegate",
",",
"StageConfigField",
",",
"TextInput",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"class",
"BakeCloudFoundryManifestConfigForm",
"extends",
"React",
".",
"Component",
"<",
"IFormikStageConfigInjectedProps",
">",
"{",
"private",
"static",
"readonly",
"excludedArtifactTypes",
"=",
"excludeAllTypesExcept",
"(",
"ArtifactTypePatterns",
".",
"BITBUCKET_FILE",
",",
"ArtifactTypePatterns",
".",
"CUSTOM_OBJECT",
",",
"ArtifactTypePatterns",
".",
"EMBEDDED_BASE64",
",",
"ArtifactTypePatterns",
".",
"GCS_OBJECT",
",",
"ArtifactTypePatterns",
".",
"GITHUB_FILE",
",",
"ArtifactTypePatterns",
".",
"GITLAB_FILE",
",",
"ArtifactTypePatterns",
".",
"S3_OBJECT",
",",
"ArtifactTypePatterns",
".",
"HTTP_FILE",
")",
";",
"public",
"componentDidMount",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"if",
"(",
"stage",
".",
"inputArtifacts",
"&&",
"stage",
".",
"inputArtifacts",
".",
"length",
"===",
"0",
")",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'inputArtifacts'",
",",
"[",
"{",
"account",
":",
"''",
",",
"id",
":",
"''",
",",
"}",
",",
"]",
")",
";",
"}",
"}",
"private",
"onTemplateArtifactEdited",
"=",
"(",
"artifact",
",",
"index",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`inputArtifacts[${",
"index",
"}].id`",
",",
"null",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`inputArtifacts[${",
"index",
"}].artifact`",
",",
"artifact",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`inputArtifacts[${",
"index",
"}].account`",
",",
"artifact",
".",
"artifactAccount",
")",
";",
"}",
";",
"private",
"onTemplateArtifactSelected",
"=",
"(",
"id",
",",
"index",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`inputArtifacts[${",
"index",
"}].id`",
",",
"id",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`inputArtifacts[${",
"index",
"}].artifact`",
",",
"null",
")",
";",
"}",
";",
"private",
"addInputArtifact",
"=",
"(",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"newInputArtifacts",
"=",
"[",
"...",
"stage",
".",
"inputArtifacts",
",",
"{",
"account",
":",
"''",
",",
"id",
":",
"''",
",",
"}",
",",
"]",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'inputArtifacts'",
",",
"newInputArtifacts",
")",
";",
"}",
";",
"private",
"removeInputArtifact",
"=",
"(",
"index",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"newInputArtifacts",
"=",
"[",
"...",
"stage",
".",
"inputArtifacts",
"]",
";",
"newInputArtifacts",
".",
"splice",
"(",
"index",
",",
"1",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'inputArtifacts'",
",",
"newInputArtifacts",
")",
";",
"}",
";",
"private",
"getInputArtifact",
"=",
"(",
"stage",
",",
"index",
")",
"=>",
"{",
"if",
"(",
"!",
"stage",
".",
"inputArtifacts",
"||",
"stage",
".",
"inputArtifacts",
".",
"length",
"===",
"0",
")",
"{",
"return",
"{",
"account",
":",
"''",
",",
"id",
":",
"''",
",",
"}",
";",
"}",
"else",
"{",
"return",
"stage",
".",
"inputArtifacts",
"[",
"index",
"]",
";",
"}",
"}",
";",
"private",
"outputNameChange",
"=",
"(",
"outputName",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"expectedArtifacts",
"=",
"stage",
".",
"expectedArtifacts",
";",
"if",
"(",
"expectedArtifacts",
"&&",
"expectedArtifacts",
".",
"length",
"===",
"1",
"&&",
"expectedArtifacts",
"[",
"0",
"]",
".",
"matchArtifact",
"&&",
"expectedArtifacts",
"[",
"0",
"]",
".",
"matchArtifact",
".",
"type",
"===",
"'embedded/base64'",
")",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'expectedArtifacts'",
",",
"[",
"{",
"...",
"expectedArtifacts",
"[",
"0",
"]",
",",
"matchArtifact",
":",
"{",
"...",
"expectedArtifacts",
"[",
"0",
"]",
".",
"matchArtifact",
",",
"name",
":",
"outputName",
",",
"}",
",",
"}",
",",
"]",
")",
";",
"}",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"return",
"(",
"<",
">",
"<",
"h4",
">",
"Manifest",
"Options",
"<",
"/h4>",
"<",
"StageConfigField",
"fieldColumns",
"=",
"{",
"3",
"}",
"label",
"=",
"{",
"'Name'",
"}",
"helpKey",
"=",
"{",
"'pipeline.config.bake.cf.manifest.name'",
"}",
">",
"<",
"TextInput",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'outputName'",
",",
"e",
".",
"target",
".",
"value",
")",
";",
"this",
".",
"outputNameChange",
"(",
"e",
".",
"target",
".",
"value",
")",
";",
"}",
"}",
"value",
"=",
"{",
"stage",
".",
"outputName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"h4",
">",
"Manifest",
"Template",
"<",
"/h4>",
"<",
"StageArtifactSelectorDelegate",
"artifact",
"=",
"{",
"this",
".",
"getInputArtifact",
"(",
"stage",
",",
"0",
")",
".",
"artifact",
"}",
"excludedArtifactTypePatterns",
"=",
"{",
"BakeCloudFoundryManifestConfigForm",
".",
"excludedArtifactTypes",
"}",
"expectedArtifactId",
"=",
"{",
"this",
".",
"getInputArtifact",
"(",
"stage",
",",
"0",
")",
".",
"id",
"}",
"label",
"=",
"\"Template Artifact\"",
"onArtifactEdited",
"=",
"{",
"(",
"artifact",
")",
"=>",
"{",
"this",
".",
"onTemplateArtifactEdited",
"(",
"artifact",
",",
"0",
")",
";",
"}",
"}",
"helpKey",
"=",
"{",
"'pipeline.config.bake.cf.manifest.templateArtifact'",
"}",
"onExpectedArtifactSelected",
"=",
"{",
"(",
"artifact",
")",
"=>",
"this",
".",
"onTemplateArtifactSelected",
"(",
"artifact",
".",
"id",
",",
"0",
")",
"}",
"pipeline",
"=",
"{",
"this",
".",
"props",
".",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"/",
">",
"<",
"h4",
">",
"Manifest",
"Variables",
"<",
"/h4>",
"{",
"stage",
".",
"inputArtifacts",
"&&",
"stage",
".",
"inputArtifacts",
".",
"length",
">",
"1",
"&&",
"(",
"<",
"div",
"className",
"=",
"\"row form-group\"",
">",
"{",
"stage",
".",
"inputArtifacts",
".",
"slice",
"(",
"1",
")",
".",
"map",
"(",
"(",
"a",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"div",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"div",
"className",
"=",
"\"col-md-offset-1 col-md-9\"",
">",
"<",
"StageArtifactSelectorDelegate",
"artifact",
"=",
"{",
"a",
".",
"artifact",
"}",
"excludedArtifactTypePatterns",
"=",
"{",
"[",
"]",
"}",
"expectedArtifactId",
"=",
"{",
"a",
".",
"id",
"}",
"label",
"=",
"\"Variables Artifact\"",
"onArtifactEdited",
"=",
"{",
"(",
"artifact",
")",
"=>",
"{",
"this",
".",
"onTemplateArtifactEdited",
"(",
"artifact",
",",
"index",
"+",
"1",
")",
";",
"}",
"}",
"onExpectedArtifactSelected",
"=",
"{",
"(",
"artifact",
")",
"=>",
"this",
".",
"onTemplateArtifactSelected",
"(",
"artifact",
".",
"id",
",",
"index",
"+",
"1",
")",
"}",
"helpKey",
"=",
"{",
"'pipeline.config.bake.cf.manifest.varsArtifact'",
"}",
"pipeline",
"=",
"{",
"this",
".",
"props",
".",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-1\"",
">",
"<",
"div",
"className",
"=",
"\"form-control-static\"",
">",
"<",
"button",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"removeInputArtifact",
"(",
"index",
"+",
"1",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-trash\"",
"/",
">",
"<",
"span",
"className",
"=",
"\"sr-only\"",
">",
"Remove",
"field",
"<",
"/span>",
"<",
"/button>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
")",
"}",
"<",
"/div>)}",
"<",
"StageConfigField",
"fieldColumns",
"=",
"{",
"8",
"}",
"label",
"=",
"{",
"''",
"}",
">",
"<",
"button",
"className",
"=",
"\"btn btn-block btn-sm add-new\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"addInputArtifact",
"(",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"Add",
"variables",
"artifact",
"<",
"/button>",
"<",
"/StageConfigField>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661745 | [
"import",
"type",
"{",
"FormikErrors",
"}",
"from",
"'formik'",
";",
"import",
"{",
"cloneDeep",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IArtifact",
",",
"IExpectedArtifact",
",",
"IStage",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikStageConfig",
",",
"FormValidator",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"BakeCloudFoundryManifestConfigForm",
"}",
"from",
"'./BakeCloudFoundryManifestConfigForm'",
";",
"export",
"function",
"BakeCloudFoundryManifestConfig",
"(",
"{",
"application",
",",
"pipeline",
",",
"stage",
",",
"updateStage",
"}",
")",
"{",
"const",
"stageWithDefaults",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"{",
"return",
"{",
"inputArtifacts",
":",
"[",
"]",
",",
"...",
"cloneDeep",
"(",
"stage",
")",
",",
"}",
";",
"}",
",",
"[",
"]",
")",
";",
"return",
"(",
"<",
"FormikStageConfig",
"application",
"=",
"{",
"application",
"}",
"onChange",
"=",
"{",
"updateStage",
"}",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stageWithDefaults",
"}",
"validate",
"=",
"{",
"validateBakeCloudFoundryManifestStage",
"}",
"render",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"BakeCloudFoundryManifestConfigForm",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"/>);",
"}",
"export",
"function",
"validateBakeCloudFoundryManifestStage",
"(",
"stage",
")",
"{",
"const",
"formValidator",
"=",
"new",
"FormValidator",
"(",
"stage",
")",
";",
"formValidator",
".",
"field",
"(",
"'expectedArtifacts'",
",",
"'Produced artifacts'",
")",
".",
"required",
"(",
")",
".",
"withValidators",
"(",
"(",
"artifacts",
")",
"=>",
"{",
"if",
"(",
"validateProducedArtifacts",
"(",
"artifacts",
")",
")",
"{",
"return",
"undefined",
";",
"}",
"return",
"'Exactly one expected artifact of type embedded/base64 must be configured in the Produces Artifacts section'",
";",
"}",
")",
";",
"formValidator",
".",
"field",
"(",
"'outputName'",
",",
"'Name'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'inputArtifacts'",
",",
"'Template and Variables Artifacts'",
")",
".",
"required",
"(",
")",
".",
"withValidators",
"(",
"(",
"artifacts",
")",
"=>",
"{",
"if",
"(",
"validateInputArtifacts",
"(",
"artifacts",
")",
")",
"{",
"return",
"undefined",
";",
"}",
"return",
"'There should be one manifest template and at least one variables artifact'",
";",
"}",
")",
";",
"return",
"formValidator",
".",
"validateForm",
"(",
")",
";",
"}",
"export",
"function",
"validateProducedArtifacts",
"(",
"artifacts",
")",
"{",
"return",
"artifacts",
"?.",
"length",
"===",
"1",
"&&",
"artifacts",
"[",
"0",
"]",
"?.",
"matchArtifact",
"?.",
"type",
"===",
"'embedded/base64'",
";",
"}",
"export",
"function",
"validateInputArtifacts",
"(",
"artifacts",
")",
"{",
"return",
"artifacts",
"?.",
"length",
">=",
"2",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661746 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IArtifact",
",",
"IExecutionDetailsSectionProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"decodeUnicodeBase64",
",",
"ExecutionDetailsSection",
",",
"ManifestYaml",
",",
"Overridable",
",",
"StageFailureMessage",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"@",
"Overridable",
"(",
"'bakeManifest.bakeManifestDetailsTab'",
")",
"export",
"class",
"BakeCloudFoundryManifestDetailsTab",
"extends",
"React",
".",
"Component",
"<",
"IExecutionDetailsSectionProps",
">",
"{",
"public",
"static",
"title",
"=",
"'bakedManifest'",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"current",
",",
"name",
",",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"bakedArtifacts",
"=",
"(",
"stage",
".",
"context",
".",
"artifacts",
"||",
"[",
"]",
")",
".",
"filter",
"(",
"(",
"a",
")",
"=>",
"a",
".",
"type",
"===",
"'embedded/base64'",
")",
";",
"return",
"(",
"<",
"ExecutionDetailsSection",
"name",
"=",
"{",
"name",
"}",
"current",
"=",
"{",
"current",
"}",
">",
"<",
"StageFailureMessage",
"stage",
"=",
"{",
"stage",
"}",
"message",
"=",
"{",
"stage",
".",
"failureMessage",
"}",
"/",
">",
"{",
"bakedArtifacts",
".",
"map",
"(",
"(",
"artifact",
",",
"i",
")",
"=>",
"(",
"<",
"ManifestYaml",
"key",
"=",
"{",
"i",
"}",
"linkName",
"=",
"{",
"bakedArtifacts",
".",
"length",
">",
"1",
"?",
"`Baked Manifest ${",
"i",
"} YAML`",
":",
"'Baked Manifest YAML'",
"}",
"manifestText",
"=",
"{",
"decodeUnicodeBase64",
"(",
"artifact",
".",
"reference",
")",
"}",
"modalTitle",
"=",
"\"Baked Manifest\"",
"/",
">",
")",
")",
"}",
"<",
"/ExecutionDetailsSection>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661747 | [
"import",
"type",
"{",
"IArtifact",
",",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ArtifactReferenceService",
",",
"ExecutionArtifactTab",
",",
"ExecutionDetailsTasks",
",",
"ExpectedArtifactService",
",",
"Registry",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"BakeCloudFoundryManifestConfig",
",",
"validateBakeCloudFoundryManifestStage",
",",
"}",
"from",
"'./BakeCloudFoundryManifestConfig'",
";",
"import",
"{",
"BakeCloudFoundryManifestDetailsTab",
"}",
"from",
"'./BakeCloudFoundryManifestDetailsTab'",
";",
"export",
"const",
"BAKE_CF_MANIFEST_STAGE_KEY",
"=",
"'bakeCloudFoundryManifest'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"label",
":",
"'Bake CloudFoundry Manifest'",
",",
"description",
":",
"'Bake a CF manifest using external variables files.'",
",",
"key",
":",
"BAKE_CF_MANIFEST_STAGE_KEY",
",",
"component",
":",
"BakeCloudFoundryManifestConfig",
",",
"producesArtifacts",
":",
"true",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"executionDetailsSections",
":",
"[",
"BakeCloudFoundryManifestDetailsTab",
",",
"ExecutionDetailsTasks",
",",
"ExecutionArtifactTab",
"]",
",",
"artifactExtractor",
":",
"(",
"fields",
")",
"=>",
"ExpectedArtifactService",
".",
"accumulateArtifacts",
"<",
"IArtifact",
">",
"(",
"[",
"'inputArtifacts'",
"]",
")",
"(",
"fields",
")",
".",
"map",
"(",
"(",
"a",
")",
"=>",
"a",
".",
"id",
")",
",",
"artifactRemover",
":",
"(",
"stage",
",",
"artifactId",
")",
"=>",
"{",
"ArtifactReferenceService",
".",
"removeArtifactFromFields",
"(",
"[",
"'expectedArtifactId'",
"]",
")",
"(",
"stage",
",",
"artifactId",
")",
";",
"const",
"artifactDoesNotMatch",
"=",
"(",
"artifact",
")",
"=>",
"artifact",
".",
"id",
"!==",
"artifactId",
";",
"stage",
".",
"expectedArtifacts",
"=",
"(",
"stage",
".",
"expectedArtifacts",
"??",
"[",
"]",
")",
".",
"filter",
"(",
"artifactDoesNotMatch",
")",
";",
"stage",
".",
"inputArtifacts",
"=",
"(",
"stage",
".",
"inputArtifacts",
"??",
"[",
"]",
")",
".",
"filter",
"(",
"artifactDoesNotMatch",
")",
";",
"}",
",",
"validateFn",
":",
"validateBakeCloudFoundryManifestStage",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
19157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661748 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"StageConstants",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryServerGroupCommandBuilder",
"}",
"from",
"'../../../serverGroup/configure'",
";",
"import",
"{",
"CloudFoundryCreateServerGroupModal",
"}",
"from",
"'../../../serverGroup/configure/wizard/CreateServerGroupModal'",
";",
"export",
"interface",
"ICloudFoundryCloneServerGroupStageConfigState",
"{",
"buttonText",
":",
"string",
";",
"}",
"export",
"class",
"CloudFoundryCloneServerGroupStageConfig",
"extends",
"React",
".",
"Component",
"<",
"IStageConfigProps",
",",
"ICloudFoundryCloneServerGroupStageConfigState",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"application",
":",
"props",
".",
"application",
".",
"name",
",",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"buttonText",
":",
"props",
".",
"stage",
".",
"destination",
"?",
"'Edit clone configuration'",
":",
"'Add clone configuration'",
",",
"}",
";",
"}",
"private",
"handleResult",
"=",
"(",
"command",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
":",
"command",
".",
"credentials",
",",
"capacity",
":",
"command",
".",
"capacity",
",",
"account",
":",
"command",
".",
"account",
",",
"delayBeforeDisableSec",
":",
"command",
".",
"delayBeforeDisableSec",
",",
"freeFormDetails",
":",
"command",
".",
"freeFormDetails",
",",
"maxRemainingAsgs",
":",
"command",
".",
"maxRemainingAsgs",
",",
"region",
":",
"command",
".",
"region",
",",
"startApplication",
":",
"command",
".",
"startApplication",
",",
"stack",
":",
"command",
".",
"stack",
",",
"strategy",
":",
"command",
".",
"strategy",
",",
"target",
":",
"command",
".",
"target",
",",
"targetCluster",
":",
"command",
".",
"targetCluster",
",",
"manifest",
":",
"command",
".",
"manifest",
",",
"source",
":",
"command",
".",
"source",
",",
"}",
")",
";",
"this",
".",
"setState",
"(",
"{",
"buttonText",
":",
"'Edit clone configuration'",
"}",
")",
";",
"}",
";",
"private",
"addCluster",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"application",
",",
"stage",
",",
"pipeline",
"}",
"=",
"this",
".",
"props",
";",
"const",
"title",
"=",
"'Clone Cluster'",
";",
"const",
"command",
"=",
"CloudFoundryServerGroupCommandBuilder",
".",
"buildCloneServerGroupCommandFromPipeline",
"(",
"stage",
",",
"pipeline",
")",
";",
"CloudFoundryCreateServerGroupModal",
".",
"show",
"(",
"{",
"application",
",",
"command",
",",
"isSourceConstant",
":",
"false",
",",
"title",
",",
"}",
")",
".",
"then",
"(",
"this",
".",
"handleResult",
")",
".",
"catch",
"(",
"(",
")",
"=>",
"{",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"buttonText",
"}",
"=",
"this",
".",
"state",
";",
"const",
"cloneTargets",
"=",
"StageConstants",
".",
"TARGET_LIST",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"div",
">",
"<",
"h4",
">",
"Clone",
"Source",
"<",
"/h4>",
"<",
"table",
"className",
"=",
"\"table table-condensed table-deployStage\"",
">",
"<",
"thead",
">",
"<",
"tr",
">",
"<",
"th",
">",
"Account",
"<",
"/th>",
"<",
"th",
">",
"Region",
"<",
"/th>",
"<",
"th",
">",
"Cluster",
"<",
"/th>",
"<",
"th",
">",
"Target",
"<",
"/th>",
"<",
"/tr>",
"<",
"/thead>",
"<",
"tbody",
">",
"<",
"tr",
">",
"<",
"td",
">",
"{",
"stage",
".",
"source",
"?",
"stage",
".",
"source",
".",
"account",
":",
"''",
"}",
"<",
"/td>",
"<",
"td",
">",
"{",
"stage",
".",
"source",
"?",
"stage",
".",
"source",
".",
"region",
":",
"''",
"}",
"<",
"/td>",
"<",
"td",
">",
"{",
"stage",
".",
"source",
"?",
"stage",
".",
"source",
".",
"clusterName",
":",
"''",
"}",
"<",
"/td>",
"<",
"td",
">",
"{",
"stage",
".",
"source",
"?",
"cloneTargets",
".",
"filter",
"(",
"(",
"t",
")",
"=>",
"t",
".",
"val",
"===",
"stage",
".",
"source",
".",
"target",
")",
".",
"map",
"(",
"(",
"t",
")",
"=>",
"t",
".",
"label",
")",
":",
"''",
"}",
"<",
"/td>",
"<",
"/tr>",
"<",
"/tbody>",
"<",
"/table>",
"<",
"/div>",
"<",
"div",
">",
"<",
"h4",
">",
"Clone",
"Destination",
"<",
"/h4>",
"<",
"table",
"className",
"=",
"\"table table-condensed table-deployStage\"",
">",
"<",
"thead",
">",
"<",
"tr",
">",
"<",
"th",
">",
"Account",
"<",
"/th>",
"<",
"th",
">",
"Region",
"<",
"/th>",
"<",
"/tr>",
"<",
"/thead>",
"<",
"tbody",
">",
"<",
"tr",
">",
"<",
"td",
">",
"{",
"stage",
".",
"credentials",
"}",
"<",
"/td>",
"<",
"td",
">",
"{",
"stage",
".",
"region",
"}",
"<",
"/td>",
"<",
"/tr>",
"<",
"/tbody>",
"<",
"/table>",
"<",
"/div>",
"<",
"button",
"className",
"=",
"\"btn btn-block btn-sm add-new\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"addCluster",
"(",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"{",
"buttonText",
"}",
"<",
"/button>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28165,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
23111,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661749 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryCloneServerGroupStageConfig",
"}",
"from",
"'./CloudFoundryCloneServerGroupStageConfig'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryCloneServerGroupStageConfig",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"key",
":",
"'cloneServerGroup'",
",",
"provides",
":",
"'cloneServerGroup'",
",",
"validators",
":",
"[",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661750 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IArtifact",
",",
"IFormikStageConfigInjectedProps",
",",
"IRegion",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"ArtifactTypePatterns",
",",
"excludeAllTypesExcept",
",",
"NgReact",
",",
"StageArtifactSelectorDelegate",
",",
"StageConfigField",
",",
"StageConstants",
",",
"TextInput",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../../presentation/widgets/accountRegionClusterSelector'",
";",
"interface",
"ICloudFoundryCreateServiceBindingsStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"regions",
":",
"string",
"[",
"]",
";",
"application",
":",
"Application",
";",
"}",
"export",
"class",
"CloudFoundryCreateServiceBindingsStageConfigForm",
"extends",
"React",
".",
"Component",
"<",
"IFormikStageConfigInjectedProps",
",",
"ICloudFoundryCreateServiceBindingsStageConfigState",
">",
"{",
"private",
"static",
"readonly",
"excludedArtifactTypes",
"=",
"excludeAllTypesExcept",
"(",
"ArtifactTypePatterns",
".",
"BITBUCKET_FILE",
",",
"ArtifactTypePatterns",
".",
"CUSTOM_OBJECT",
",",
"ArtifactTypePatterns",
".",
"EMBEDDED_BASE64",
",",
"ArtifactTypePatterns",
".",
"GCS_OBJECT",
",",
"ArtifactTypePatterns",
".",
"GITHUB_FILE",
",",
"ArtifactTypePatterns",
".",
"GITLAB_FILE",
",",
"ArtifactTypePatterns",
".",
"S3_OBJECT",
",",
"ArtifactTypePatterns",
".",
"HTTP_FILE",
")",
";",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
",",
"context",
")",
"{",
"super",
"(",
"props",
",",
"context",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"application",
":",
"props",
".",
"application",
",",
"}",
";",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"rawAccounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
":",
"rawAccounts",
"}",
")",
")",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'cloudProvider'",
",",
"'cloudfoundry'",
")",
";",
"if",
"(",
"stage",
".",
"serviceBindingRequests",
"&&",
"stage",
".",
"serviceBindingRequests",
".",
"length",
"===",
"0",
")",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceBindingRequests'",
",",
"[",
"{",
"serviceInstanceName",
":",
"''",
",",
"updatable",
":",
"false",
",",
"}",
",",
"]",
")",
";",
"}",
"if",
"(",
"stage",
".",
"credentials",
")",
"{",
"this",
".",
"loadRegions",
"(",
"stage",
".",
"credentials",
")",
";",
"}",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"loadRegions",
"=",
"(",
"creds",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"[",
"]",
"}",
")",
";",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"creds",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regionList",
")",
"=>",
"{",
"const",
"regions",
"=",
"regionList",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"r",
".",
"name",
")",
";",
"regions",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"a",
".",
"localeCompare",
"(",
"b",
")",
")",
";",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"regions",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"onTemplateArtifactEdited",
"=",
"(",
"artifact",
",",
"index",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceBindingRequests[${",
"index",
"}].id`",
",",
"null",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceBindingRequests[${",
"index",
"}].artifact`",
",",
"artifact",
")",
";",
"}",
";",
"private",
"onTemplateArtifactSelected",
"=",
"(",
"id",
",",
"index",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceBindingRequests[${",
"index",
"}].id`",
",",
"id",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceBindingRequests[${",
"index",
"}].artifact`",
",",
"null",
")",
";",
"}",
";",
"private",
"addInputArtifact",
"=",
"(",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"newServiceBindingRequests",
"=",
"[",
"...",
"stage",
".",
"serviceBindingRequests",
",",
"{",
"serviceInstanceName",
":",
"''",
",",
"updatable",
":",
"false",
",",
"}",
",",
"]",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceBindingRequests'",
",",
"newServiceBindingRequests",
")",
";",
"}",
";",
"private",
"removeInputArtifact",
"=",
"(",
"index",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"newServiceBindingRequests",
"=",
"[",
"...",
"stage",
".",
"serviceBindingRequests",
"]",
";",
"newServiceBindingRequests",
".",
"splice",
"(",
"index",
",",
"1",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceBindingRequests'",
",",
"newServiceBindingRequests",
")",
";",
"}",
";",
"private",
"targetUpdated",
"=",
"(",
"target",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'target'",
",",
"target",
")",
";",
"}",
";",
"private",
"restageRequiredUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'restageRequired'",
",",
"event",
".",
"target",
".",
"checked",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'restartRequired'",
",",
"!",
"event",
".",
"target",
".",
"checked",
")",
";",
"}",
";",
"private",
"restartRequiredUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'restartRequired'",
",",
"event",
".",
"target",
".",
"checked",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'restageRequired'",
",",
"!",
"event",
".",
"target",
".",
"checked",
")",
";",
"}",
";",
"private",
"updatableBindingUpdated",
"=",
"(",
"event",
",",
"index",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceBindingRequests[${",
"index",
"}].updatable`",
",",
"event",
".",
"target",
".",
"checked",
")",
";",
"}",
";",
"private",
"accountRegionClusterUpdated",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`cluster`",
",",
"stage",
".",
"cluster",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`credentials`",
",",
"stage",
".",
"credentials",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`region`",
",",
"stage",
".",
"region",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"{",
"accounts",
",",
"application",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"target",
"}",
"=",
"stage",
";",
"const",
"{",
"TargetSelect",
"}",
"=",
"NgReact",
";",
"return",
"(",
"<",
">",
"<",
"h4",
">",
"Basic",
"Settings",
"<",
"/h4>",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"isSingleRegion",
"=",
"{",
"true",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"accountRegionClusterUpdated",
"}",
"component",
"=",
"{",
"stage",
"}",
"/",
">",
"<",
"/div>",
"<",
"StageConfigField",
"label",
"=",
"\"Target\"",
">",
"<",
"TargetSelect",
"model",
"=",
"{",
"{",
"target",
"}",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
"}",
"onChange",
"=",
"{",
"this",
".",
"targetUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Restage Required\"",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"checked",
"=",
"{",
"stage",
".",
"restageRequired",
"}",
"onChange",
"=",
"{",
"this",
".",
"restageRequiredUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Restart Required\"",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"checked",
"=",
"{",
"stage",
".",
"restartRequired",
"}",
"onChange",
"=",
"{",
"this",
".",
"restartRequiredUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"h4",
">",
"Service",
"Bindings",
"<",
"/h4>",
"{",
"stage",
".",
"serviceBindingRequests",
"&&",
"stage",
".",
"serviceBindingRequests",
".",
"length",
">",
"0",
"&&",
"(",
"<",
"div",
"className",
"=",
"\"row form-group\"",
">",
"{",
"stage",
".",
"serviceBindingRequests",
".",
"map",
"(",
"(",
"a",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"div",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"div",
"className",
"=",
"\"col-md-offset-1 col-md-8\"",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Service Instance Name\"",
">",
"<",
"TextInput",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceBindingRequests[${",
"index",
"}].serviceInstanceName`",
",",
"e",
".",
"target",
".",
"value",
")",
";",
"}",
"}",
"value",
"=",
"{",
"a",
".",
"serviceInstanceName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageArtifactSelectorDelegate",
"artifact",
"=",
"{",
"a",
".",
"artifact",
"}",
"excludedArtifactTypePatterns",
"=",
"{",
"CloudFoundryCreateServiceBindingsStageConfigForm",
".",
"excludedArtifactTypes",
"}",
"expectedArtifactId",
"=",
"{",
"a",
".",
"id",
"}",
"label",
"=",
"\"Service Binding Parameters\"",
"onArtifactEdited",
"=",
"{",
"(",
"artifact",
")",
"=>",
"{",
"this",
".",
"onTemplateArtifactEdited",
"(",
"artifact",
",",
"index",
")",
";",
"}",
"}",
"onExpectedArtifactSelected",
"=",
"{",
"(",
"artifact",
")",
"=>",
"this",
".",
"onTemplateArtifactSelected",
"(",
"artifact",
".",
"id",
",",
"index",
")",
"}",
"pipeline",
"=",
"{",
"this",
".",
"props",
".",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"/",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Updatable Binding\"",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"checked",
"=",
"{",
"a",
".",
"updatable",
"}",
"onChange",
"=",
"{",
"(",
"event",
")",
"=>",
"this",
".",
"updatableBindingUpdated",
"(",
"event",
",",
"index",
")",
"}",
"/>",
"<",
"/StageConfigField>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-1\"",
">",
"<",
"div",
"className",
"=",
"\"form-control-static\"",
">",
"<",
"button",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"removeInputArtifact",
"(",
"index",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-trash\"",
"/",
">",
"<",
"span",
"className",
"=",
"\"sr-only\"",
">",
"Remove",
"field",
"<",
"/span>",
"<",
"/button>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
")",
"}",
"<",
"/div>)}",
"<",
"StageConfigField",
"fieldColumns",
"=",
"{",
"8",
"}",
"label",
"=",
"{",
"''",
"}",
">",
"<",
"button",
"className",
"=",
"\"btn btn-block btn-sm add-new\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"addInputArtifact",
"(",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"Add",
"Service",
"Binding",
"<",
"/button>",
"<",
"/StageConfigField>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
35308,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
1823,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661751 | [
"import",
"type",
"{",
"FormikErrors",
"}",
"from",
"'formik'",
";",
"import",
"{",
"cloneDeep",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IStage",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikStageConfig",
",",
"FormValidator",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryCreateServiceBindingsStageConfigForm",
"}",
"from",
"'./CloudFoundryCreateServiceBindingsStageConfigForm'",
";",
"export",
"interface",
"ServiceBindingRequests",
"{",
"serviceInstanceName",
":",
"String",
";",
"}",
"export",
"function",
"CloudFoundryCreateServiceBindingsConfig",
"(",
"{",
"application",
",",
"pipeline",
",",
"stage",
",",
"updateStage",
",",
"}",
")",
"{",
"const",
"stageWithDefaults",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"{",
"return",
"{",
"serviceBindingRequests",
":",
"[",
"]",
",",
"restageRequired",
":",
"true",
",",
"restartRequired",
":",
"false",
",",
"credentials",
":",
"''",
",",
"region",
":",
"''",
",",
"...",
"cloneDeep",
"(",
"stage",
")",
",",
"}",
";",
"}",
",",
"[",
"]",
")",
";",
"return",
"(",
"<",
"FormikStageConfig",
"application",
"=",
"{",
"application",
"}",
"onChange",
"=",
"{",
"updateStage",
"}",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stageWithDefaults",
"}",
"validate",
"=",
"{",
"validateCloudFoundryCreateServiceBindingsStage",
"}",
"render",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"CloudFoundryCreateServiceBindingsStageConfigForm",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"/>);",
"}",
"export",
"function",
"validateCloudFoundryCreateServiceBindingsStage",
"(",
"stage",
")",
"{",
"const",
"formValidator",
"=",
"new",
"FormValidator",
"(",
"stage",
")",
";",
"formValidator",
".",
"field",
"(",
"'credentials'",
",",
"'Account'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'region'",
",",
"'Region'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'cluster'",
",",
"'Cluster'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'target'",
",",
"'Target'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'serviceBindingRequests'",
",",
"'Service Binding Requests'",
")",
".",
"required",
"(",
")",
".",
"withValidators",
"(",
"(",
"serviceBindingRequests",
")",
"=>",
"{",
"if",
"(",
"validateServiceBindingRequests",
"(",
"serviceBindingRequests",
")",
")",
"{",
"return",
"undefined",
";",
"}",
"return",
"'There should be at least one service binding request. At a minimum, each request must have a service instance name.'",
";",
"}",
")",
";",
"return",
"formValidator",
".",
"validateForm",
"(",
")",
";",
"}",
"export",
"function",
"validateServiceBindingRequests",
"(",
"serviceBindingRequests",
")",
"{",
"if",
"(",
"serviceBindingRequests",
"?.",
"length",
"<",
"1",
")",
"{",
"return",
"false",
";",
"}",
"return",
"serviceBindingRequests",
".",
"every",
"(",
"(",
"req",
")",
"=>",
"req",
"?.",
"serviceInstanceName",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661752 | [
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryCreateServiceBindingsConfig",
",",
"validateCloudFoundryCreateServiceBindingsStage",
",",
"}",
"from",
"'./CloudFoundryCreateServiceBindingsConfig'",
";",
"export",
"const",
"CF_CREATE_SERVICE_BINDINGS_STAGE_KEY",
"=",
"'cloudFoundryCreateServiceBindings'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"label",
":",
"'Create Service Bindings'",
",",
"description",
":",
"'Create CF service bindings with optional parameters.'",
",",
"key",
":",
"CF_CREATE_SERVICE_BINDINGS_STAGE_KEY",
",",
"component",
":",
"CloudFoundryCreateServiceBindingsConfig",
",",
"producesArtifacts",
":",
"false",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"executionDetailsSections",
":",
"[",
"ExecutionDetailsTasks",
"]",
",",
"validateFn",
":",
"validateCloudFoundryCreateServiceBindingsStage",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661753 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IFormikStageConfigInjectedProps",
",",
"IRegion",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"NgReact",
",",
"StageConfigField",
",",
"StageConstants",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../../presentation/widgets/accountRegionClusterSelector'",
";",
"interface",
"ICloudFoundryDeleteServiceBindingsStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"regions",
":",
"string",
"[",
"]",
";",
"application",
":",
"Application",
";",
"}",
"export",
"class",
"CloudFoundryDeleteServiceBindingsStageConfigForm",
"extends",
"React",
".",
"Component",
"<",
"IFormikStageConfigInjectedProps",
",",
"ICloudFoundryDeleteServiceBindingsStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
",",
"context",
")",
"{",
"super",
"(",
"props",
",",
"context",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"application",
":",
"props",
".",
"application",
",",
"}",
";",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"rawAccounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
":",
"rawAccounts",
"}",
")",
")",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'cloudProvider'",
",",
"'cloudfoundry'",
")",
";",
"if",
"(",
"stage",
".",
"serviceUnbindingRequests",
"&&",
"stage",
".",
"serviceUnbindingRequests",
".",
"length",
"===",
"0",
")",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceUnbindingRequests'",
",",
"[",
"{",
"serviceInstanceName",
":",
"''",
",",
"updatable",
":",
"false",
",",
"}",
",",
"]",
")",
";",
"}",
"if",
"(",
"stage",
".",
"credentials",
")",
"{",
"this",
".",
"loadRegions",
"(",
"stage",
".",
"credentials",
")",
";",
"}",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"loadRegions",
"=",
"(",
"creds",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"[",
"]",
"}",
")",
";",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"creds",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regionList",
")",
"=>",
"{",
"const",
"regions",
"=",
"regionList",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"r",
".",
"name",
")",
";",
"regions",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"a",
".",
"localeCompare",
"(",
"b",
")",
")",
";",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"regions",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"addInputArtifact",
"=",
"(",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"newServiceUnbindingRequests",
"=",
"[",
"...",
"stage",
".",
"serviceUnbindingRequests",
",",
"{",
"serviceInstanceName",
":",
"''",
",",
"updatable",
":",
"false",
",",
"}",
",",
"]",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceUnbindingRequests'",
",",
"newServiceUnbindingRequests",
")",
";",
"}",
";",
"private",
"removeInputArtifact",
"=",
"(",
"index",
")",
"=>",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"newServiceUnbindingRequests",
"=",
"[",
"...",
"stage",
".",
"serviceUnbindingRequests",
"]",
";",
"newServiceUnbindingRequests",
".",
"splice",
"(",
"index",
",",
"1",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceUnbindingRequests'",
",",
"newServiceUnbindingRequests",
")",
";",
"}",
";",
"private",
"targetUpdated",
"=",
"(",
"target",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'target'",
",",
"target",
")",
";",
"}",
";",
"private",
"accountRegionClusterUpdated",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`cluster`",
",",
"stage",
".",
"cluster",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`credentials`",
",",
"stage",
".",
"credentials",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`region`",
",",
"stage",
".",
"region",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"{",
"accounts",
",",
"application",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"target",
"}",
"=",
"stage",
";",
"const",
"{",
"TargetSelect",
"}",
"=",
"NgReact",
";",
"return",
"(",
"<",
">",
"<",
"h4",
">",
"Basic",
"Settings",
"<",
"/h4>",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"isSingleRegion",
"=",
"{",
"true",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"accountRegionClusterUpdated",
"}",
"component",
"=",
"{",
"stage",
"}",
"/",
">",
"<",
"/div>",
"<",
"StageConfigField",
"label",
"=",
"\"Target\"",
">",
"<",
"TargetSelect",
"model",
"=",
"{",
"{",
"target",
"}",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
"}",
"onChange",
"=",
"{",
"this",
".",
"targetUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"h4",
">",
"Service",
"Unbindings",
"<",
"/h4>",
"{",
"stage",
".",
"serviceUnbindingRequests",
"&&",
"stage",
".",
"serviceUnbindingRequests",
".",
"length",
">",
"0",
"&&",
"(",
"<",
"div",
"className",
"=",
"\"row form-group\"",
">",
"{",
"stage",
".",
"serviceUnbindingRequests",
".",
"map",
"(",
"(",
"a",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"div",
"key",
"=",
"{",
"index",
"}",
">",
"<",
"div",
"className",
"=",
"\"col-md-offset-1 col-md-8\"",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Service Instance Name\"",
">",
"<",
"TextInput",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"`serviceUnbindingRequests[${",
"index",
"}].serviceInstanceName`",
",",
"e",
".",
"target",
".",
"value",
")",
";",
"}",
"}",
"value",
"=",
"{",
"a",
".",
"serviceInstanceName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-1\"",
">",
"<",
"div",
"className",
"=",
"\"form-control-static\"",
">",
"<",
"button",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"removeInputArtifact",
"(",
"index",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-trash\"",
"/",
">",
"<",
"span",
"className",
"=",
"\"sr-only\"",
">",
"Remove",
"field",
"<",
"/span>",
"<",
"/button>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
")",
"}",
"<",
"/div>)}",
"<",
"StageConfigField",
"fieldColumns",
"=",
"{",
"8",
"}",
"label",
"=",
"{",
"''",
"}",
">",
"<",
"button",
"className",
"=",
"\"btn btn-block btn-sm add-new\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"addInputArtifact",
"(",
")",
"}",
">",
"<",
"span",
"className",
"=",
"\"glyphicon glyphicon-plus-sign\"",
"/",
">",
"Add",
"Service",
"Unbinding",
"<",
"/button>",
"<",
"/StageConfigField>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
35308,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
1823,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661754 | [
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryDeleteServiceBindingsConfig",
",",
"validateCloudFoundryDeleteServiceBindingsStage",
",",
"}",
"from",
"'./CloudFoundryDeleteServiceBindingsConfig'",
";",
"export",
"const",
"CF_DELETE_SERVICE_BINDINGS_STAGE_KEY",
"=",
"'cloudFoundryDeleteServiceBindings'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"label",
":",
"'Delete Service Bindings'",
",",
"description",
":",
"'Delete CF service bindings with optional parameters.'",
",",
"key",
":",
"CF_DELETE_SERVICE_BINDINGS_STAGE_KEY",
",",
"component",
":",
"CloudFoundryDeleteServiceBindingsConfig",
",",
"producesArtifacts",
":",
"false",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"executionDetailsSections",
":",
"[",
"ExecutionDetailsTasks",
"]",
",",
"validateFn",
":",
"validateCloudFoundryDeleteServiceBindingsStage",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661755 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryDeleteServiceKeyStageConfig",
"}",
"from",
"'./CloudFoundryDeleteServiceKeyStageConfig'",
";",
"import",
"{",
"CloudFoundryServiceKeyExecutionDetails",
"}",
"from",
"'../../../presentation'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryDeleteServiceKeyStageConfig",
",",
"description",
":",
"'Delete a service key'",
",",
"executionDetailsSections",
":",
"[",
"CloudFoundryServiceKeyExecutionDetails",
",",
"ExecutionDetailsTasks",
"]",
",",
"key",
":",
"'deleteServiceKey'",
",",
"label",
":",
"'Delete Service Key'",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'region'",
",",
"preventSave",
":",
"true",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'serviceInstanceName'",
",",
"preventSave",
":",
"true",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'serviceKeyName'",
",",
"preventSave",
":",
"true",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661756 | [
"import",
"{",
"includes",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"interface",
"IServiceTagsInputProps",
"{",
"tags",
":",
"string",
"[",
"]",
";",
"onChange",
":",
"(",
"e",
":",
"string",
"[",
"]",
")",
"=>",
"void",
";",
"}",
"interface",
"IServiceTagsInputState",
"{",
"newTag",
":",
"string",
";",
"tags",
":",
"string",
"[",
"]",
";",
"}",
"export",
"class",
"ServiceTagsInput",
"extends",
"React",
".",
"Component",
"<",
"IServiceTagsInputProps",
",",
"IServiceTagsInputState",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"state",
"=",
"{",
"newTag",
":",
"''",
",",
"tags",
":",
"this",
".",
"props",
".",
"tags",
"||",
"[",
"]",
",",
"}",
";",
"}",
"private",
"newTagUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"newTag",
":",
"event",
".",
"target",
".",
"value",
"}",
")",
";",
"}",
";",
"private",
"addTag",
"=",
"(",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"onChange",
",",
"tags",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"newTag",
"}",
"=",
"this",
".",
"state",
";",
"const",
"currentTags",
"=",
"tags",
"||",
"[",
"]",
";",
"if",
"(",
"!",
"includes",
"(",
"currentTags",
",",
"newTag",
".",
"trim",
"(",
")",
")",
")",
"{",
"const",
"newTags",
"=",
"[",
"...",
"currentTags",
",",
"newTag",
".",
"trim",
"(",
")",
"]",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"a",
".",
"localeCompare",
"(",
"b",
")",
")",
";",
"this",
".",
"setState",
"(",
"{",
"tags",
":",
"newTags",
",",
"newTag",
":",
"''",
",",
"}",
")",
";",
"onChange",
"(",
"newTags",
")",
";",
"}",
"}",
";",
"private",
"deleteTag",
"=",
"(",
"index",
")",
":",
"void",
"=>",
"{",
"const",
"{",
"onChange",
",",
"tags",
"}",
"=",
"this",
".",
"props",
";",
"const",
"newTags",
"=",
"tags",
".",
"slice",
"(",
")",
";",
"newTags",
".",
"splice",
"(",
"index",
",",
"1",
")",
";",
"this",
".",
"setState",
"(",
"{",
"tags",
":",
"newTags",
"}",
")",
";",
"onChange",
"(",
"newTags",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"tags",
",",
"newTag",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
">",
"<",
"div",
"className",
"=",
"\"row\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-4\"",
">",
"<",
"input",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"name",
"=",
"\"newTag\"",
"onChange",
"=",
"{",
"this",
".",
"newTagUpdated",
"}",
"value",
"=",
"{",
"newTag",
"}",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-2\"",
">",
"<",
"button",
"disabled",
"=",
"{",
"!",
"newTag",
".",
"trim",
"(",
")",
"}",
"className",
"=",
"\"btn btn-default btn-sm btn-add-tag\"",
"onClick",
"=",
"{",
"this",
".",
"addTag",
"}",
">",
"Add",
"Tag",
"<",
"/button>",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
">",
"<",
"div",
">",
"{",
"tags",
"&&",
"tags",
".",
"map",
"(",
"(",
"tag",
",",
"index",
")",
"=>",
"{",
"return",
"(",
"<",
"span",
"className",
"=",
"\"badge badge-pill\"",
"key",
"=",
"{",
"index",
"}",
">",
"&",
"nbsp",
";",
"{",
"tag",
"}",
"&",
"nbsp",
";",
"<",
"button",
"type",
"=",
"\"button\"",
"className",
"=",
"\"close small\"",
"aria",
"-",
"label",
"=",
"\"Close\"",
"onClick",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"deleteTag",
"(",
"index",
")",
"}",
">",
"<",
"span",
"aria",
"-",
"hidden",
"=",
"\"true\"",
">",
"&",
"times",
";",
"<",
"/span>",
"<",
"/button>",
"<",
"/span>);",
"}",
")",
"}",
"<",
"/div>",
"<",
"/div>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661757 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IService",
",",
"IServicePlan",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ReactSelectInput",
",",
"ServicesReader",
",",
"StageConfigField",
",",
"TextAreaInput",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServiceManifestDirectSource",
"}",
"from",
"'./ICloudFoundryServiceManifestSource'",
";",
"import",
"{",
"ServiceTagsInput",
"}",
"from",
"'./ServiceTagsInput'",
";",
"interface",
"ICreateServiceInstanceDirectInputProps",
"{",
"credentials",
":",
"string",
";",
"region",
":",
"string",
";",
"service",
":",
"ICloudFoundryServiceManifestDirectSource",
";",
"onServiceChanged",
":",
"(",
"_",
":",
"ICloudFoundryServiceManifestDirectSource",
")",
"=>",
"void",
";",
"}",
"interface",
"ICreateServiceInstanceDirectInputState",
"{",
"serviceNamesAndPlans",
":",
"IService",
"[",
"]",
";",
"}",
"export",
"class",
"CreateServiceInstanceDirectInput",
"extends",
"React",
".",
"Component",
"<",
"ICreateServiceInstanceDirectInputProps",
",",
"ICreateServiceInstanceDirectInputState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"state",
"=",
"{",
"serviceNamesAndPlans",
":",
"[",
"]",
"}",
";",
"}",
"public",
"componentDidUpdate",
"(",
"prevProps",
")",
"{",
"const",
"{",
"credentials",
",",
"region",
"}",
"=",
"this",
".",
"props",
";",
"if",
"(",
"(",
"credentials",
"&&",
"credentials",
"!==",
"prevProps",
".",
"credentials",
")",
"||",
"region",
"!==",
"prevProps",
".",
"region",
")",
"{",
"this",
".",
"loadServices",
"(",
"credentials",
",",
"region",
")",
";",
"}",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"this",
".",
"loadServices",
"(",
"this",
".",
"props",
".",
"credentials",
",",
"this",
".",
"props",
".",
"region",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"loadServices",
"(",
"credentials",
",",
"region",
")",
"{",
"if",
"(",
"credentials",
"&&",
"region",
")",
"{",
"observableFrom",
"(",
"ServicesReader",
".",
"getServices",
"(",
"credentials",
",",
"region",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"serviceNamesAndPlans",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"serviceNamesAndPlans",
"}",
")",
")",
";",
"}",
"}",
"private",
"serviceInstanceNameUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"serviceInstanceName",
":",
"event",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"serviceUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"service",
":",
"option",
".",
"target",
".",
"value",
",",
"servicePlan",
":",
"''",
",",
"}",
")",
";",
"}",
";",
"private",
"servicePlanUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"servicePlan",
":",
"option",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"parametersUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"parameters",
":",
"event",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"tagsUpdated",
"=",
"(",
"tags",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"tags",
":",
"tags",
",",
"}",
")",
";",
"}",
";",
"private",
"updatableUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"updatable",
":",
"event",
".",
"target",
".",
"checked",
",",
"versioned",
":",
"false",
",",
"}",
")",
";",
"}",
";",
"private",
"versionedUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"versioned",
":",
"event",
".",
"target",
".",
"checked",
",",
"updatable",
":",
"false",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"service",
"}",
"=",
"this",
".",
"props",
";",
"const",
"services",
"=",
"this",
".",
"state",
".",
"serviceNamesAndPlans",
".",
"map",
"(",
"(",
"item",
")",
"=>",
"item",
".",
"name",
")",
";",
"const",
"serviceWithPlans",
"=",
"this",
".",
"state",
".",
"serviceNamesAndPlans",
".",
"find",
"(",
"(",
"it",
")",
"=>",
"it",
".",
"name",
"===",
"service",
".",
"service",
")",
";",
"const",
"servicePlans",
"=",
"serviceWithPlans",
"?",
"serviceWithPlans",
".",
"servicePlans",
".",
"map",
"(",
"(",
"it",
")",
"=>",
"it",
".",
"name",
")",
":",
"[",
"]",
";",
"return",
"(",
"<",
"div",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Service Instance Name\"",
">",
"<",
"TextInput",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"onChange",
"=",
"{",
"this",
".",
"serviceInstanceNameUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"serviceInstanceName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Service\"",
">",
"<",
"ReactSelectInput",
"clearable",
"=",
"{",
"false",
"}",
"onChange",
"=",
"{",
"this",
".",
"serviceUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"service",
"}",
"stringOptions",
"=",
"{",
"services",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Service Plan\"",
">",
"<",
"ReactSelectInput",
"clearable",
"=",
"{",
"false",
"}",
"onChange",
"=",
"{",
"this",
".",
"servicePlanUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"servicePlan",
"}",
"stringOptions",
"=",
"{",
"servicePlans",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Tags\"",
">",
"<",
"ServiceTagsInput",
"tags",
"=",
"{",
"service",
".",
"tags",
"||",
"[",
"]",
"}",
"onChange",
"=",
"{",
"this",
".",
"tagsUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Parameters\"",
">",
"<",
"TextAreaInput",
"className",
"=",
"\"form-control\"",
"onChange",
"=",
"{",
"this",
".",
"parametersUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"parameters",
"||",
"''",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Updatable\"",
"helpKey",
"=",
"{",
"'pipeline.config.cf.createservice.updatable'",
"}",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"disabled",
"=",
"{",
"!",
"!",
"service",
".",
"versioned",
"}",
"checked",
"=",
"{",
"!",
"!",
"service",
".",
"updatable",
"}",
"onChange",
"=",
"{",
"this",
".",
"updatableUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Versioned\"",
"helpKey",
"=",
"{",
"'pipeline.config.cf.createservice.versioned'",
"}",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"disabled",
"=",
"{",
"!",
"!",
"service",
".",
"updatable",
"}",
"checked",
"=",
"{",
"!",
"!",
"service",
".",
"versioned",
"}",
"onChange",
"=",
"{",
"this",
".",
"versionedUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
51,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13042,
null,
null,
null,
null,
null,
null,
null,
null,
13042,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
13042,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661758 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"StageConfigField",
",",
"TextAreaInput",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryServiceManifestSource",
",",
"ICloudFoundryServiceUserProvidedSource",
",",
"}",
"from",
"'./ICloudFoundryServiceManifestSource'",
";",
"import",
"{",
"ServiceTagsInput",
"}",
"from",
"'./ServiceTagsInput'",
";",
"interface",
"ICreateServiceInstanceUserProvidedInputProps",
"{",
"onChange",
":",
"(",
"serviceInput",
":",
"ICloudFoundryServiceManifestSource",
")",
"=>",
"void",
";",
"service",
":",
"ICloudFoundryServiceUserProvidedSource",
";",
"onServiceChanged",
":",
"(",
"_",
":",
"ICloudFoundryServiceUserProvidedSource",
")",
"=>",
"void",
";",
"}",
"export",
"class",
"CreateUserProvidedInput",
"extends",
"React",
".",
"Component",
"<",
"ICreateServiceInstanceUserProvidedInputProps",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"}",
"private",
"serviceInstanceNameUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"serviceInstanceName",
":",
"event",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"syslogDrainUrlUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"syslogDrainUrl",
":",
"event",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"routeServiceUrlUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"routeServiceUrl",
":",
"event",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"credentialsUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"credentials",
":",
"event",
".",
"target",
".",
"value",
",",
"}",
")",
";",
"}",
";",
"private",
"tagsUpdated",
"=",
"(",
"tags",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"tags",
":",
"tags",
",",
"}",
")",
";",
"}",
";",
"private",
"updatableUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"updatable",
":",
"event",
".",
"target",
".",
"checked",
",",
"versioned",
":",
"false",
",",
"}",
")",
";",
"}",
";",
"private",
"versionedUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"onServiceChanged",
"(",
"{",
"...",
"this",
".",
"props",
".",
"service",
",",
"versioned",
":",
"event",
".",
"target",
".",
"checked",
",",
"updatable",
":",
"false",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"service",
"}",
"=",
"this",
".",
"props",
";",
"return",
"(",
"<",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Service Instance Name\"",
">",
"<",
"TextInput",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"onChange",
"=",
"{",
"this",
".",
"serviceInstanceNameUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"serviceInstanceName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Syslog Drain URL\"",
">",
"<",
"TextInput",
"onChange",
"=",
"{",
"this",
".",
"syslogDrainUrlUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"syslogDrainUrl",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Route Service URL\"",
">",
"<",
"TextInput",
"onChange",
"=",
"{",
"this",
".",
"routeServiceUrlUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"routeServiceUrl",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Credentials\"",
">",
"<",
"TextAreaInput",
"onChange",
"=",
"{",
"this",
".",
"credentialsUpdated",
"}",
"value",
"=",
"{",
"service",
".",
"credentials",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Tags\"",
">",
"<",
"ServiceTagsInput",
"tags",
"=",
"{",
"service",
".",
"tags",
"||",
"[",
"]",
"}",
"onChange",
"=",
"{",
"this",
".",
"tagsUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Updatable\"",
"helpKey",
"=",
"{",
"'pipeline.config.cf.createservice.updatable'",
"}",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"disabled",
"=",
"{",
"!",
"!",
"service",
".",
"versioned",
"}",
"checked",
"=",
"{",
"!",
"!",
"service",
".",
"updatable",
"}",
"onChange",
"=",
"{",
"this",
".",
"updatableUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Versioned\"",
"helpKey",
"=",
"{",
"'pipeline.config.cf.createservice.versioned'",
"}",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"disabled",
"=",
"{",
"!",
"!",
"service",
".",
"updatable",
"}",
"checked",
"=",
"{",
"!",
"!",
"service",
".",
"versioned",
"}",
"onChange",
"=",
"{",
"this",
".",
"versionedUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661759 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IArtifact",
",",
"IExpectedArtifact",
",",
"IRegion",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"ArtifactTypePatterns",
",",
"ReactSelectInput",
",",
"StageArtifactSelector",
",",
"StageConfigField",
",",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CreateServiceInstanceDirectInput",
"}",
"from",
"'./CreateServiceInstanceDirectInput'",
";",
"import",
"{",
"CreateUserProvidedInput",
"}",
"from",
"'./CreateUserProvidedInput'",
";",
"import",
"type",
"{",
"ICloudFoundryServiceManifestSource",
"}",
"from",
"'./ICloudFoundryServiceManifestSource'",
";",
"import",
"'./cloudfoundryDeployServiceStage.less'",
";",
"interface",
"ICloudFoundryDeployServiceStageConfigState",
"{",
"regions",
":",
"IRegion",
"[",
"]",
";",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryDeployServiceStageConfig",
"extends",
"React",
".",
"Component",
"<",
"IStageConfigProps",
",",
"ICloudFoundryDeployServiceStageConfigState",
">",
"{",
"private",
"defaultDirectManifest",
"=",
"{",
"direct",
":",
"{",
"parameters",
":",
"''",
",",
"service",
":",
"''",
",",
"serviceInstanceName",
":",
"''",
",",
"servicePlan",
":",
"''",
",",
"updatable",
":",
"false",
",",
"versioned",
":",
"false",
",",
"}",
",",
"}",
";",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"cloudProvider",
":",
"'cloudfoundry'",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"}",
";",
"}",
"private",
"accountUpdated",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"credentials",
"=",
"option",
".",
"target",
".",
"value",
";",
"const",
"updates",
"=",
"{",
"credentials",
":",
"credentials",
",",
"region",
":",
"''",
"}",
";",
"if",
"(",
"!",
"this",
".",
"props",
".",
"stage",
".",
"manifest",
"||",
"this",
".",
"props",
".",
"stage",
".",
"manifest",
".",
"direct",
")",
"{",
"updates",
".",
"manifest",
"=",
"this",
".",
"defaultDirectManifest",
";",
"}",
"this",
".",
"props",
".",
"updateStageField",
"(",
"updates",
")",
";",
"this",
".",
"reloadRegions",
"(",
")",
";",
"}",
";",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"this",
".",
"reloadRegions",
"(",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"reloadRegions",
"=",
"(",
")",
"=>",
"{",
"const",
"{",
"credentials",
"}",
"=",
"this",
".",
"props",
".",
"stage",
";",
"if",
"(",
"credentials",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"credentials",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regions",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"regions",
"}",
")",
")",
";",
"}",
"}",
";",
"private",
"manifestSourceUpdated",
"=",
"(",
"source",
")",
":",
"void",
"=>",
"{",
"switch",
"(",
"source",
")",
"{",
"case",
"'direct'",
":",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"manifest",
":",
"this",
".",
"defaultDirectManifest",
"}",
")",
";",
"break",
";",
"case",
"'artifact'",
":",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"manifest",
":",
"{",
"}",
"}",
")",
";",
"break",
";",
"}",
"}",
";",
"private",
"onExpectedArtifactSelected",
"=",
"(",
"expectedArtifact",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"manifest",
":",
"{",
"artifactId",
":",
"expectedArtifact",
".",
"id",
"}",
"}",
")",
";",
"}",
";",
"private",
"onArtifactChanged",
"=",
"(",
"artifact",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"manifest",
":",
"{",
"artifact",
"}",
"}",
")",
";",
"}",
";",
"private",
"regionUpdated",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"updates",
"=",
"{",
"region",
":",
"option",
".",
"target",
".",
"value",
"}",
";",
"const",
"direct",
"=",
"this",
".",
"props",
".",
"stage",
".",
"manifest",
".",
"direct",
";",
"if",
"(",
"direct",
")",
"{",
"updates",
".",
"manifest",
"=",
"this",
".",
"defaultDirectManifest",
";",
"}",
"this",
".",
"props",
".",
"updateStageField",
"(",
"updates",
")",
";",
"}",
";",
"private",
"serviceManifestSourceUpdated",
"=",
"(",
"manifest",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"manifest",
"}",
")",
";",
"}",
";",
"private",
"userProvidedUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"userProvided",
":",
"event",
".",
"target",
".",
"checked",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"pipeline",
",",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"credentials",
",",
"region",
",",
"userProvided",
",",
"manifest",
"}",
"=",
"this",
".",
"props",
".",
"stage",
";",
"const",
"{",
"accounts",
",",
"regions",
"}",
"=",
"this",
".",
"state",
";",
"const",
"directInput",
"=",
"!",
"manifest",
"||",
"!",
"!",
"manifest",
".",
"direct",
";",
"let",
"manifestInput",
";",
"if",
"(",
"directInput",
")",
"{",
"const",
"directManifest",
"=",
"(",
"manifest",
"&&",
"manifest",
".",
"direct",
")",
"||",
"this",
".",
"defaultDirectManifest",
";",
"manifestInput",
"=",
"userProvided",
"?",
"(",
"<",
"CreateUserProvidedInput",
"onChange",
"=",
"{",
"this",
".",
"serviceManifestSourceUpdated",
"}",
"service",
"=",
"{",
"directManifest",
"}",
"onServiceChanged",
"=",
"{",
"(",
"direct",
")",
"=>",
"this",
".",
"serviceManifestSourceUpdated",
"(",
"{",
"direct",
"}",
")",
"}",
"/>) : (<CreateServiceInstanceDirectInput credentials={credentials} region={region} service={directManifest} onServiceChanged={(direct) => this.serviceManifestSourceUpdated({ direct })}/",
">",
")",
";",
"}",
"else",
"{",
"manifestInput",
"=",
"(",
"<",
"StageConfigField",
"label",
"=",
"\"Artifact\"",
">",
"<",
"StageArtifactSelector",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stage",
"}",
"expectedArtifactId",
"=",
"{",
"manifest",
".",
"artifactId",
"}",
"excludedArtifactTypePatterns",
"=",
"{",
"[",
"ArtifactTypePatterns",
".",
"KUBERNETES",
",",
"ArtifactTypePatterns",
".",
"FRONT50_PIPELINE_TEMPLATE",
",",
"ArtifactTypePatterns",
".",
"DOCKER_IMAGE",
",",
"]",
"}",
"artifact",
"=",
"{",
"manifest",
".",
"artifact",
"}",
"onExpectedArtifactSelected",
"=",
"{",
"this",
".",
"onExpectedArtifactSelected",
"}",
"onArtifactEdited",
"=",
"{",
"this",
".",
"onArtifactChanged",
"}",
"/",
">",
"<",
"/StageConfigField>);",
"}",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal cloudfoundry-deploy-service-stage\"",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Account\"",
">",
"<",
"ReactSelectInput",
"clearable",
"=",
"{",
"false",
"}",
"onChange",
"=",
"{",
"this",
".",
"accountUpdated",
"}",
"value",
"=",
"{",
"credentials",
"}",
"stringOptions",
"=",
"{",
"accounts",
".",
"map",
"(",
"(",
"it",
")",
"=>",
"it",
".",
"name",
")",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Region\"",
">",
"<",
"ReactSelectInput",
"clearable",
"=",
"{",
"false",
"}",
"onChange",
"=",
"{",
"this",
".",
"regionUpdated",
"}",
"value",
"=",
"{",
"region",
"}",
"stringOptions",
"=",
"{",
"regions",
".",
"map",
"(",
"(",
"it",
")",
"=>",
"it",
".",
"name",
")",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"User-provided\"",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"checked",
"=",
"{",
"!",
"!",
"userProvided",
"}",
"onChange",
"=",
"{",
"this",
".",
"userProvidedUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Configuration Source\"",
">",
"<",
"div",
"className",
"=",
"\"radio radio-inline\"",
">",
"<",
"label",
">",
"<",
"input",
"type",
"=",
"\"radio\"",
"checked",
"=",
"{",
"!",
"directInput",
"}",
"onChange",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"manifestSourceUpdated",
"(",
"'artifact'",
")",
"}",
"/>{' '}",
"Manifest",
"<",
"/label>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"radio radio-inline\"",
">",
"<",
"label",
">",
"<",
"input",
"type",
"=",
"\"radio\"",
"checked",
"=",
"{",
"directInput",
"}",
"onChange",
"=",
"{",
"(",
")",
"=>",
"this",
".",
"manifestSourceUpdated",
"(",
"'direct'",
")",
"}",
"/> Form",
"<",
"/label>",
"<",
"/div>",
"<",
"/StageConfigField>",
"{",
"manifestInput",
"}",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28165,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
30697,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
19157,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661760 | [
"import",
"{",
"safeLoad",
"}",
"from",
"'js-yaml'",
";",
"import",
"{",
"get",
",",
"upperFirst",
"}",
"from",
"'lodash'",
";",
"import",
"type",
"{",
"IPipeline",
",",
"IStage",
",",
"IStageOrTriggerValidator",
",",
"ITrigger",
",",
"IValidatorConfig",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"PipelineConfigValidator",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryDeployServiceStageConfig",
"}",
"from",
"'./CloudFoundryDeployServiceStageConfig'",
";",
"import",
"type",
"{",
"ICloudFoundryServiceManifestSource",
"}",
"from",
"'./ICloudFoundryServiceManifestSource'",
";",
"import",
"{",
"CloudFoundryServiceExecutionDetails",
"}",
"from",
"'../../../presentation'",
";",
"interface",
"IServiceFieldValidatorConfig",
"extends",
"IValidatorConfig",
"{",
"manifestSource",
":",
"string",
";",
"}",
"const",
"sourceType",
"=",
"(",
"manifest",
",",
"userProvided",
")",
"=>",
"{",
"if",
"(",
"manifest",
"&&",
"manifest",
".",
"direct",
")",
"{",
"return",
"userProvided",
"?",
"'userProvided'",
":",
"'direct'",
";",
"}",
"else",
"{",
"return",
"'artifact'",
";",
"}",
"}",
";",
"const",
"sourceStruct",
"=",
"(",
"manifest",
")",
"=>",
"{",
"return",
"manifest",
"&&",
"manifest",
".",
"direct",
"?",
"'direct'",
":",
"'artifact'",
";",
"}",
";",
"PipelineConfigValidator",
".",
"registerValidator",
"(",
"'requiredDeployServiceField'",
",",
"new",
"(",
"class",
"implements",
"IStageOrTriggerValidator",
"{",
"public",
"validate",
"(",
"_pipeline",
",",
"stage",
",",
"validationConfig",
")",
"{",
"const",
"serviceInput",
"=",
"get",
"(",
"stage",
",",
"'manifest'",
")",
";",
"if",
"(",
"sourceType",
"(",
"serviceInput",
",",
"get",
"(",
"stage",
",",
"'userProvided'",
")",
")",
"!==",
"validationConfig",
".",
"manifestSource",
")",
"{",
"return",
"null",
";",
"}",
"const",
"manifestSource",
"=",
"get",
"(",
"serviceInput",
",",
"sourceStruct",
"(",
"serviceInput",
")",
")",
";",
"const",
"content",
"=",
"get",
"(",
"manifestSource",
",",
"validationConfig",
".",
"fieldName",
")",
";",
"const",
"fieldLabel",
"=",
"validationConfig",
".",
"fieldLabel",
"||",
"upperFirst",
"(",
"validationConfig",
".",
"fieldName",
")",
";",
"return",
"content",
"?",
"null",
":",
"`<strong>${",
"fieldLabel",
"}</strong> is a required field for the Deploy Service stage.`",
";",
"}",
"}",
")",
"(",
")",
")",
";",
"PipelineConfigValidator",
".",
"registerValidator",
"(",
"'validDeployServiceParameterJsonOrYaml'",
",",
"new",
"(",
"class",
"implements",
"IStageOrTriggerValidator",
"{",
"private",
"isJson",
"(",
"value",
")",
"{",
"try",
"{",
"JSON",
".",
"parse",
"(",
"value",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"return",
"false",
";",
"}",
"}",
"private",
"isYaml",
"(",
"value",
")",
"{",
"try",
"{",
"safeLoad",
"(",
"value",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"validate",
"(",
"_pipeline",
",",
"stage",
",",
"validationConfig",
")",
"{",
"const",
"manifest",
"=",
"get",
"(",
"stage",
",",
"'manifest'",
")",
";",
"if",
"(",
"sourceType",
"(",
"manifest",
",",
"get",
"(",
"stage",
",",
"'userProvided'",
")",
")",
"!==",
"validationConfig",
".",
"manifestSource",
")",
"{",
"return",
"null",
";",
"}",
"const",
"manifestSource",
"=",
"get",
"(",
"manifest",
",",
"sourceStruct",
"(",
"manifest",
")",
")",
";",
"const",
"fieldContent",
"=",
"get",
"(",
"manifestSource",
",",
"validationConfig",
".",
"fieldName",
")",
";",
"if",
"(",
"fieldContent",
")",
"{",
"if",
"(",
"!",
"this",
".",
"isJson",
"(",
"fieldContent",
")",
"&&",
"!",
"this",
".",
"isYaml",
"(",
"fieldContent",
")",
")",
"{",
"const",
"fieldLabel",
"=",
"upperFirst",
"(",
"validationConfig",
".",
"fieldLabel",
"||",
"validationConfig",
".",
"fieldName",
")",
";",
"return",
"validationConfig",
".",
"message",
"||",
"`<strong>${",
"fieldLabel",
"}</strong> should be a valid JSON or YAML string.`",
";",
"}",
"}",
"return",
"null",
";",
"}",
"}",
")",
"(",
")",
")",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryDeployServiceStageConfig",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"supportsCustomTimeout",
":",
"true",
",",
"description",
":",
"'Deploys services using Open Service Broker and deploys user-provided services'",
",",
"executionDetailsSections",
":",
"[",
"CloudFoundryServiceExecutionDetails",
",",
"ExecutionDetailsTasks",
"]",
",",
"key",
":",
"'deployService'",
",",
"label",
":",
"'Deploy Service'",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'region'",
"}",
",",
"{",
"type",
":",
"'requiredDeployServiceField'",
",",
"manifestSource",
":",
"'direct'",
",",
"fieldName",
":",
"'serviceInstanceName'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'requiredDeployServiceField'",
",",
"manifestSource",
":",
"'direct'",
",",
"fieldName",
":",
"'service'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'requiredDeployServiceField'",
",",
"manifestSource",
":",
"'direct'",
",",
"fieldName",
":",
"'servicePlan'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'requiredDeployServiceField'",
",",
"manifestSource",
":",
"'artifact'",
",",
"fieldName",
":",
"'artifactAccount'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'requiredDeployServiceField'",
",",
"manifestSource",
":",
"'artifact'",
",",
"fieldName",
":",
"'reference'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'requiredDeployServiceField'",
",",
"manifestSource",
":",
"'userProvided'",
",",
"fieldName",
":",
"'serviceInstanceName'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'validDeployServiceParameterJsonOrYaml'",
",",
"manifestSource",
":",
"'direct'",
",",
"fieldName",
":",
"'parameters'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"{",
"type",
":",
"'validDeployServiceParameterJsonOrYaml'",
",",
"manifestSource",
":",
"'userProvided'",
",",
"fieldName",
":",
"'credentials'",
",",
"preventSave",
":",
"true",
",",
"}",
"as",
"IServiceFieldValidatorConfig",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
0,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
15666,
null,
null,
null,
0,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
15666,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661761 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"Select",
"from",
"'react-select'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IFormikStageConfigInjectedProps",
",",
"IRegion",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"StageConfigField",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"ICloudFoundryDestroyServiceStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"regions",
":",
"string",
"[",
"]",
";",
"application",
":",
"Application",
";",
"}",
"export",
"class",
"CloudFoundryDestroyServiceStageConfigForm",
"extends",
"React",
".",
"Component",
"<",
"IFormikStageConfigInjectedProps",
",",
"ICloudFoundryDestroyServiceStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
",",
"context",
")",
"{",
"super",
"(",
"props",
",",
"context",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'cloudProvider'",
",",
"'cloudfoundry'",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"application",
":",
"props",
".",
"application",
",",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'application'",
",",
"this",
".",
"state",
".",
"application",
".",
"name",
")",
";",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"rawAccounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
":",
"rawAccounts",
"}",
")",
")",
";",
"if",
"(",
"stage",
".",
"credentials",
")",
"{",
"this",
".",
"loadRegions",
"(",
"stage",
".",
"credentials",
")",
";",
"}",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"loadRegions",
"=",
"(",
"creds",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"[",
"]",
"}",
")",
";",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"creds",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regionList",
")",
"=>",
"{",
"const",
"regions",
"=",
"regionList",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"r",
".",
"name",
")",
";",
"regions",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"a",
".",
"localeCompare",
"(",
"b",
")",
")",
";",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"regions",
"}",
")",
";",
"}",
")",
";",
"}",
";",
"private",
"accountUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"const",
"creds",
"=",
"option",
".",
"value",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'credentials'",
",",
"creds",
")",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'region'",
",",
"''",
")",
";",
"if",
"(",
"creds",
")",
"{",
"this",
".",
"loadRegions",
"(",
"creds",
")",
";",
"}",
"}",
";",
"private",
"regionUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'region'",
",",
"option",
".",
"value",
")",
";",
"}",
";",
"private",
"serviceInstanceNameUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'serviceInstanceName'",
",",
"event",
".",
"target",
".",
"value",
")",
";",
"}",
";",
"private",
"removeBindingsUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'removeBindings'",
",",
"event",
".",
"target",
".",
"checked",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"stage",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"const",
"{",
"accounts",
",",
"regions",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"credentials",
",",
"region",
",",
"serviceInstanceName",
"}",
"=",
"stage",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Account\"",
">",
"<",
"Select",
"options",
"=",
"{",
"accounts",
"&&",
"accounts",
".",
"map",
"(",
"(",
"acc",
")",
"=>",
"(",
"{",
"label",
":",
"acc",
".",
"name",
",",
"value",
":",
"acc",
".",
"name",
",",
"}",
")",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"credentials",
"}",
"onChange",
"=",
"{",
"this",
".",
"accountUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Region\"",
">",
"<",
"Select",
"options",
"=",
"{",
"regions",
"&&",
"regions",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"(",
"{",
"label",
":",
"r",
",",
"value",
":",
"r",
",",
"}",
")",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"region",
"}",
"onChange",
"=",
"{",
"this",
".",
"regionUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Service Instance Name\"",
">",
"<",
"input",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"required",
"=",
"{",
"true",
"}",
"onChange",
"=",
"{",
"this",
".",
"serviceInstanceNameUpdated",
"}",
"value",
"=",
"{",
"serviceInstanceName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Remove Bindings\"",
">",
"<",
"input",
"type",
"=",
"\"checkbox\"",
"checked",
"=",
"{",
"stage",
".",
"removeBindings",
"}",
"onChange",
"=",
"{",
"this",
".",
"removeBindingsUpdated",
"}",
"/",
">",
"{",
"stage",
".",
"removeBindings",
"&&",
"(",
"<",
"div",
">",
"Warning",
":",
"Prior",
"to",
"destroying",
",",
"this",
"will",
"attempt",
"to",
"unbind",
"any",
"server",
"groups",
"that",
"are",
"bound",
"to",
"this",
"service",
".",
"This",
"stage",
"will",
"fail",
"if",
"any",
"server",
"groups",
"don",
"'t belong to the spinnaker application.",
"<",
"/",
"div",
">",
")",
"}",
"<",
"/StageConfigField>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
35308,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
1823,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2222,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661762 | [
"import",
"type",
"{",
"FormikErrors",
"}",
"from",
"'formik'",
";",
"import",
"{",
"cloneDeep",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IStage",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"FormikStageConfig",
",",
"FormValidator",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryDestroyServiceStageConfigForm",
"}",
"from",
"'./CloudFoundryDestroyServiceStageConfigForm'",
";",
"export",
"function",
"CloudFoundryDestroyServiceStageConfig",
"(",
"{",
"application",
",",
"pipeline",
",",
"stage",
",",
"updateStage",
",",
"}",
")",
"{",
"const",
"stageWithDefaults",
"=",
"React",
".",
"useMemo",
"(",
"(",
")",
"=>",
"{",
"return",
"{",
"credentials",
":",
"''",
",",
"serviceInstanceName",
":",
"''",
",",
"removeBindings",
":",
"false",
",",
"...",
"cloneDeep",
"(",
"stage",
")",
",",
"}",
";",
"}",
",",
"[",
"]",
")",
";",
"return",
"(",
"<",
"FormikStageConfig",
"application",
"=",
"{",
"application",
"}",
"onChange",
"=",
"{",
"updateStage",
"}",
"pipeline",
"=",
"{",
"pipeline",
"}",
"stage",
"=",
"{",
"stageWithDefaults",
"}",
"validate",
"=",
"{",
"validateCloudFoundryDestroyServiceStage",
"}",
"render",
"=",
"{",
"(",
"props",
")",
"=>",
"<",
"CloudFoundryDestroyServiceStageConfigForm",
"{",
"...",
"props",
"}",
"/",
">",
"}",
"/>);",
"}",
"export",
"function",
"validateCloudFoundryDestroyServiceStage",
"(",
"stage",
")",
"{",
"const",
"formValidator",
"=",
"new",
"FormValidator",
"(",
"stage",
")",
";",
"formValidator",
".",
"field",
"(",
"'credentials'",
",",
"'Account'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'region'",
",",
"'Region'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'serviceInstanceName'",
",",
"'Service Instance Name'",
")",
".",
"required",
"(",
")",
";",
"formValidator",
".",
"field",
"(",
"'application'",
",",
"'Application'",
")",
".",
"required",
"(",
")",
";",
"return",
"formValidator",
".",
"validateForm",
"(",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661763 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryDestroyServiceStageConfig",
",",
"validateCloudFoundryDestroyServiceStage",
",",
"}",
"from",
"'./CloudFoundryDestroyServiceStageConfig'",
";",
"import",
"{",
"CloudFoundryServiceExecutionDetails",
"}",
"from",
"'../../../presentation'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryDestroyServiceStageConfig",
",",
"supportsCustomTimeout",
":",
"true",
",",
"executionDetailsSections",
":",
"[",
"CloudFoundryServiceExecutionDetails",
",",
"ExecutionDetailsTasks",
"]",
",",
"key",
":",
"'destroyService'",
",",
"provides",
":",
"'destroyService'",
",",
"validateFn",
":",
"validateCloudFoundryDestroyServiceStage",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661764 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryAsgStageConfig",
"}",
"from",
"'../../../presentation'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryAsgStageConfig",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"key",
":",
"'enableServerGroup'",
",",
"provides",
":",
"'enableServerGroup'",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'cluster'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'target'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'regions'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661765 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryLoadBalancersExecutionDetails",
",",
"CloudFoundryLoadBalancersStageConfig",
"}",
"from",
"'../../../presentation'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryLoadBalancersStageConfig",
",",
"description",
":",
"'Map a load balancer'",
",",
"executionDetailsSections",
":",
"[",
"CloudFoundryLoadBalancersExecutionDetails",
",",
"ExecutionDetailsTasks",
"]",
",",
"key",
":",
"'mapLoadBalancers'",
",",
"label",
":",
"'Map Load Balancer'",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'cluster'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'region'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'target'",
"}",
",",
"{",
"type",
":",
"'cfRequiredRoutesField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'loadBalancerNames'",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661766 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"NgReact",
",",
"StageConfigField",
",",
"StageConstants",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../../presentation'",
";",
"export",
"interface",
"ICloudFoundryResizeAsgStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryResizeAsgStageConfig",
"extends",
"React",
".",
"Component",
"<",
"IStageConfigProps",
",",
"ICloudFoundryResizeAsgStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"const",
"{",
"stage",
"}",
"=",
"props",
";",
"let",
"interestingHealthProviderNames",
";",
"if",
"(",
"stage",
".",
"isNew",
"&&",
"props",
".",
"application",
".",
"attributes",
".",
"platformHealthOnlyShowOverride",
"&&",
"props",
".",
"application",
".",
"attributes",
".",
"platformHealthOnly",
")",
"{",
"interestingHealthProviderNames",
"=",
"[",
"'Cloud Foundry'",
"]",
";",
"}",
"const",
"{",
"capacity",
"}",
"=",
"stage",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"action",
":",
"'scale_exact'",
",",
"capacity",
":",
"capacity",
"&&",
"capacity",
".",
"desired",
"?",
"capacity",
":",
"{",
"desired",
":",
"1",
",",
"min",
":",
"1",
",",
"max",
":",
"1",
"}",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"diskQuota",
":",
"stage",
".",
"diskQuota",
"||",
"1024",
",",
"interestingHealthProviderNames",
":",
"interestingHealthProviderNames",
",",
"memory",
":",
"stage",
".",
"memory",
"||",
"1024",
",",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"this",
".",
"props",
".",
"stageFieldUpdated",
"(",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"instanceCountUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"const",
"instanceCount",
"=",
"parseInt",
"(",
"event",
".",
"target",
".",
"value",
",",
"10",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"capacity",
":",
"{",
"desired",
":",
"instanceCount",
",",
"min",
":",
"instanceCount",
",",
"max",
":",
"instanceCount",
",",
"}",
",",
"}",
")",
";",
"}",
";",
"private",
"memoryUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"memory",
":",
"parseInt",
"(",
"event",
".",
"target",
".",
"value",
",",
"10",
")",
"}",
")",
";",
"}",
";",
"private",
"diskQuotaUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"diskQuota",
":",
"parseInt",
"(",
"event",
".",
"target",
".",
"value",
",",
"10",
")",
"}",
")",
";",
"}",
";",
"private",
"targetUpdated",
"=",
"(",
"target",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"target",
"}",
")",
";",
"}",
";",
"private",
"componentUpdated",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
":",
"stage",
".",
"credentials",
",",
"regions",
":",
"stage",
".",
"regions",
",",
"cluster",
":",
"stage",
".",
"cluster",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"accounts",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"application",
",",
"pipeline",
",",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"capacity",
",",
"diskQuota",
",",
"memory",
",",
"target",
"}",
"=",
"stage",
";",
"const",
"instanceCount",
"=",
"capacity",
".",
"desired",
";",
"const",
"{",
"TargetSelect",
"}",
"=",
"NgReact",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"cloudfoundry-resize-asg-stage form-horizontal\"",
">",
"{",
"!",
"pipeline",
".",
"strategy",
"&&",
"(",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"componentUpdated",
"}",
"component",
"=",
"{",
"stage",
"}",
"/",
">",
")",
"}",
"<",
"StageConfigField",
"label",
"=",
"\"Target\"",
">",
"<",
"TargetSelect",
"model",
"=",
"{",
"{",
"target",
"}",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
"}",
"onChange",
"=",
"{",
"this",
".",
"targetUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"span",
"className",
"=",
"\"col-md-3 sm-label-right\"",
"/",
">",
"<",
"div",
"className",
"=",
"\"col-md-9\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-left\"",
">",
"Instances",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-left\"",
">",
"Mem",
"(",
"MB",
")",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-left\"",
">",
"Disk",
"(",
"MB",
")",
"<",
"/div>",
"<",
"/div>",
"<",
"StageConfigField",
"label",
"=",
"\"Match capacity\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3\"",
">",
"<",
"input",
"type",
"=",
"\"number\"",
"key",
"=",
"\"instanceCount\"",
"onChange",
"=",
"{",
"this",
".",
"instanceCountUpdated",
"}",
"value",
"=",
"{",
"instanceCount",
"}",
"className",
"=",
"\"form-control input-sm\"",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-3\"",
">",
"<",
"input",
"type",
"=",
"\"number\"",
"key",
"=",
"\"memory\"",
"onChange",
"=",
"{",
"this",
".",
"memoryUpdated",
"}",
"value",
"=",
"{",
"memory",
"}",
"className",
"=",
"\"form-control input-sm\"",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-3\"",
">",
"<",
"input",
"type",
"=",
"\"number\"",
"key",
"=",
"\"diskQuota\"",
"onChange",
"=",
"{",
"this",
".",
"diskQuotaUpdated",
"}",
"value",
"=",
"{",
"diskQuota",
"}",
"className",
"=",
"\"form-control input-sm\"",
"/",
">",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-9 col-md-offset-3\"",
">",
"<",
"em",
"className",
"=",
"\"subinput-note\"",
">",
"Scaled",
"capacity",
"will",
"match",
"the",
"numbers",
"entered",
"<",
"/em>",
"<",
"/div>",
"<",
"/StageConfigField>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28165,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661767 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryResizeAsgStageConfig",
"}",
"from",
"'./CloudFoundryResizeAsgStageConfig'",
";",
"import",
"type",
"{",
"IInstanceFieldSizeValidationConfig",
"}",
"from",
"'../../config/validation/instanceSize.validator'",
";",
"const",
"diskValidator",
"=",
"{",
"type",
":",
"'cfInstanceSizeField'",
",",
"fieldName",
":",
"'diskQuota'",
",",
"fieldLabel",
":",
"'Disk Mb'",
",",
"min",
":",
"256",
",",
"preventSave",
":",
"true",
",",
"}",
";",
"const",
"instanceCountValidator",
"=",
"{",
"type",
":",
"'cfInstanceSizeField'",
",",
"fieldName",
":",
"'capacity.desired'",
",",
"fieldLabel",
":",
"'Instances'",
",",
"min",
":",
"0",
",",
"preventSave",
":",
"true",
",",
"}",
";",
"const",
"memoryValidator",
"=",
"{",
"type",
":",
"'cfInstanceSizeField'",
",",
"fieldName",
":",
"'memory'",
",",
"fieldLabel",
":",
"'Mem Mb'",
",",
"min",
":",
"256",
",",
"preventSave",
":",
"true",
",",
"}",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryResizeAsgStageConfig",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"key",
":",
"'resizeServerGroup'",
",",
"provides",
":",
"'resizeServerGroup'",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'cfTargetImpedance'",
",",
"message",
":",
"'This pipeline will attempt to resize a server group without deploying a new version into the same cluster.'",
",",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'cluster'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'target'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'regions'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"instanceCountValidator",
",",
"memoryValidator",
",",
"diskValidator",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661768 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IPipeline",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"StageConfigField",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../../presentation'",
";",
"export",
"interface",
"ICloudFoundryRollbackClusterStageProps",
"extends",
"IStageConfigProps",
"{",
"pipeline",
":",
"IPipeline",
";",
"}",
"export",
"interface",
"ICloudFoundryRollbackClusterStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryRollbackClusterStageConfig",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryRollbackClusterStageProps",
",",
"ICloudFoundryRollbackClusterStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"regions",
":",
"this",
".",
"props",
".",
"stage",
".",
"regions",
"||",
"[",
"]",
",",
"targetHealthyRollbackPercentage",
":",
"100",
",",
"}",
")",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"waitTimeBetweenRegionsUpdated",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"const",
"time",
"=",
"parseInt",
"(",
"event",
".",
"target",
".",
"value",
"||",
"'0'",
",",
"10",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"waitTimeBetweenRegions",
":",
"time",
"}",
")",
";",
"}",
";",
"private",
"componentUpdate",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
":",
"stage",
".",
"credentials",
",",
"regions",
":",
"stage",
".",
"regions",
",",
"cluster",
":",
"stage",
".",
"cluster",
",",
"moniker",
":",
"stage",
".",
"moniker",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"application",
",",
"pipeline",
",",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"waitTimeBetweenRegions",
"}",
"=",
"stage",
";",
"const",
"{",
"accounts",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"{",
"!",
"pipeline",
".",
"strategy",
"&&",
"(",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"componentUpdate",
"}",
"component",
"=",
"{",
"stage",
"}",
"/",
">",
")",
"}",
"{",
"stage",
".",
"regions",
".",
"length",
">",
"1",
"&&",
"(",
"<",
"StageConfigField",
"label",
"=",
"\"Wait\"",
">",
"<",
"input",
"type",
"=",
"\"number\"",
"min",
"=",
"\"0\"",
"value",
"=",
"{",
"waitTimeBetweenRegions",
"}",
"onChange",
"=",
"{",
"this",
".",
"waitTimeBetweenRegionsUpdated",
"}",
"className",
"=",
"\"form-control input-sm inline-number\"",
"/",
">",
"&",
"nbsp",
";",
"seconds",
"between",
"regional",
"rollbacks",
".",
"<",
"/StageConfigField>)}",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661769 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryRollbackClusterStageConfig",
"}",
"from",
"'./CloudFoundryRollbackClusterStageConfig'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"provides",
":",
"'rollbackCluster'",
",",
"key",
":",
"'rollbackCluster'",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryRollbackClusterStageConfig",
",",
"controller",
":",
"'cfRollbackClusterStageCtrl'",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'cluster'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'regions'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"preventSave",
":",
"true",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661770 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"NgReact",
",",
"SpelText",
",",
"StageConfigField",
",",
"StageConstants",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountRegionClusterSelector",
"}",
"from",
"'../../../presentation'",
";",
"export",
"interface",
"ICloudFoundryRunTaskStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"region",
":",
"string",
";",
"}",
"export",
"class",
"CloudFoundryRunJobStageConfig",
"extends",
"React",
".",
"Component",
"<",
"IStageConfigProps",
",",
"ICloudFoundryRunTaskStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"props",
".",
"stage",
".",
"cloudProvider",
"=",
"'cloudfoundry'",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"region",
":",
"''",
",",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"this",
".",
"props",
".",
"stageFieldUpdated",
"(",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"componentUpdated",
"=",
"(",
"stage",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
":",
"stage",
".",
"credentials",
",",
"region",
":",
"stage",
".",
"region",
",",
"cluster",
":",
"stage",
".",
"cluster",
",",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"application",
",",
"stage",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"target",
",",
"jobName",
",",
"command",
",",
"logsUrl",
"}",
"=",
"stage",
";",
"const",
"{",
"accounts",
"}",
"=",
"this",
".",
"state",
";",
"const",
"{",
"TargetSelect",
"}",
"=",
"NgReact",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"cloudfoundry-resize-asg-stage form-horizontal\"",
">",
"<",
"AccountRegionClusterSelector",
"accounts",
"=",
"{",
"accounts",
"}",
"application",
"=",
"{",
"application",
"}",
"cloudProvider",
"=",
"{",
"'cloudfoundry'",
"}",
"onComponentUpdate",
"=",
"{",
"this",
".",
"componentUpdated",
"}",
"component",
"=",
"{",
"stage",
"}",
"isSingleRegion",
"=",
"{",
"true",
"}",
"/",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Target\"",
">",
"<",
"TargetSelect",
"model",
"=",
"{",
"{",
"target",
"}",
"}",
"options",
"=",
"{",
"StageConstants",
".",
"TARGET_LIST",
"}",
"onChange",
"=",
"{",
"(",
"t",
")",
"=>",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"target",
":",
"t",
"}",
")",
"}",
"/>",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Job Name\"",
"helpKey",
"=",
"{",
"'cf.runJob.jobName'",
"}",
">",
"<",
"TextInput",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"jobName",
":",
"e",
".",
"target",
".",
"value",
"}",
")",
"}",
"value",
"=",
"{",
"jobName",
"}",
"maxLength",
"=",
"{",
"238",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Command\"",
">",
"<",
"TextInput",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"onChange",
"=",
"{",
"(",
"e",
")",
"=>",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"command",
":",
"e",
".",
"target",
".",
"value",
"}",
")",
"}",
"value",
"=",
"{",
"command",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Logs URL\"",
"helpKey",
"=",
"{",
"'cf.runJob.logsUrl'",
"}",
">",
"<",
"SpelText",
"placeholder",
"=",
"\"\"",
"onChange",
"=",
"{",
"(",
"value",
")",
"=>",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"logsUrl",
":",
"value",
"}",
")",
"}",
"value",
"=",
"{",
"logsUrl",
"}",
"pipeline",
"=",
"{",
"this",
".",
"props",
".",
"pipeline",
"}",
"docLink",
"=",
"{",
"false",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28165,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661771 | [
"import",
"{",
"bindAll",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"{",
"Button",
",",
"Modal",
"}",
"from",
"'react-bootstrap'",
";",
"import",
"type",
"{",
"IInstanceConsoleOutput",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"InstanceReader",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"enum",
"CloudFoundryRecentLogsType",
"{",
"APP",
"=",
"'app'",
",",
"TASK",
"=",
"'task'",
"}",
"export",
"interface",
"ICloudFoundryRecentLogsProps",
"{",
"account",
":",
"string",
";",
"region",
":",
"string",
";",
"resourceDisplayName",
":",
"string",
";",
"resourceGuid",
":",
"string",
";",
"logsType",
":",
"CloudFoundryRecentLogsType",
";",
"resourceInstanceIndex",
"?",
":",
"number",
";",
"}",
"export",
"interface",
"ICloudFoundryRecentLogsState",
"{",
"logs",
":",
"string",
";",
"showModal",
":",
"boolean",
";",
"errorMessage",
":",
"string",
";",
"}",
"export",
"class",
"CloudFoundryRecentLogs",
"extends",
"React",
".",
"Component",
"<",
"ICloudFoundryRecentLogsProps",
",",
"ICloudFoundryRecentLogsState",
">",
"{",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"this",
".",
"state",
"=",
"{",
"logs",
":",
"''",
",",
"showModal",
":",
"false",
",",
"errorMessage",
":",
"null",
",",
"}",
";",
"bindAll",
"(",
"this",
",",
"[",
"'open'",
",",
"'close'",
",",
"'onClick'",
"]",
")",
";",
"}",
"private",
"canShow",
"(",
")",
"{",
"const",
"{",
"resourceGuid",
"}",
"=",
"this",
".",
"props",
";",
"return",
"resourceGuid",
"!==",
"''",
";",
"}",
"private",
"generateResourceId",
"(",
")",
"{",
"const",
"{",
"resourceGuid",
",",
"logsType",
",",
"resourceInstanceIndex",
"}",
"=",
"this",
".",
"props",
";",
"const",
"optionalInstanceIndex",
"=",
"logsType",
"===",
"CloudFoundryRecentLogsType",
".",
"APP",
"?",
"`:${",
"resourceInstanceIndex",
"}`",
":",
"''",
";",
"return",
"`${",
"logsType",
"}:${",
"resourceGuid",
"}${",
"optionalInstanceIndex",
"}`",
";",
"}",
"public",
"close",
"(",
")",
"{",
"this",
".",
"setState",
"(",
"{",
"showModal",
":",
"false",
"}",
")",
";",
"}",
"public",
"open",
"(",
")",
"{",
"this",
".",
"setState",
"(",
"{",
"showModal",
":",
"true",
"}",
")",
";",
"}",
"public",
"onClick",
"(",
")",
"{",
"const",
"{",
"account",
",",
"region",
"}",
"=",
"this",
".",
"props",
";",
"InstanceReader",
".",
"getConsoleOutput",
"(",
"account",
",",
"region",
",",
"this",
".",
"generateResourceId",
"(",
")",
",",
"'cloudfoundry'",
")",
".",
"then",
"(",
"(",
"response",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"logs",
":",
"response",
".",
"output",
"as",
"string",
",",
"}",
")",
";",
"this",
".",
"open",
"(",
")",
";",
"}",
")",
".",
"catch",
"(",
"(",
"exception",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"errorMessage",
":",
"exception",
".",
"data",
".",
"message",
"}",
")",
";",
"this",
".",
"open",
"(",
")",
";",
"}",
")",
";",
"}",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"showModal",
",",
"logs",
",",
"errorMessage",
"}",
"=",
"this",
".",
"state",
";",
"if",
"(",
"this",
".",
"canShow",
"(",
")",
")",
"{",
"return",
"(",
"<",
"div",
">",
"<",
"a",
"onClick",
"=",
"{",
"this",
".",
"onClick",
"}",
"className",
"=",
"\"clickable\"",
">",
"Recent",
"<",
"/a>",
"<",
"Modal",
"show",
"=",
"{",
"showModal",
"}",
"onHide",
"=",
"{",
"this",
".",
"close",
"}",
"dialogClassName",
"=",
"\"modal-lg modal-fullscreen\"",
">",
"<",
"Modal",
".",
"Header",
"closeButton",
"=",
"{",
"true",
"}",
">",
"<",
"Modal",
".",
"Title",
">",
"Recent",
"logs",
"<",
"/Modal.Title>",
"<",
"h5",
">",
"CloudFoundry",
"{",
"this",
".",
"props",
".",
"logsType",
".",
"valueOf",
"(",
")",
"}",
"name",
":",
"{",
"this",
".",
"props",
".",
"resourceDisplayName",
"}",
"<",
"/h5>",
"<",
"/Modal.Header>",
"<",
"Modal",
".",
"Body",
">",
"{",
"logs",
".",
"length",
">",
"0",
"&&",
"(",
"<",
">",
"<",
"pre",
"className",
"=",
"\"body-small\"",
">",
"{",
"logs",
"}",
"<",
"/pre>",
"<",
"/>)}",
"{",
"logs",
".",
"length",
"===",
"0",
"&&",
"<",
">",
"No",
"logs",
"returned",
".",
"<",
"/>}",
"{",
"errorMessage",
"&&",
"<",
"pre",
"className",
"=",
"\"body-small\"",
">",
"{",
"errorMessage",
"}",
"<",
"/pre>}",
"<",
"/Modal.Body>",
"<",
"Modal",
".",
"Footer",
">",
"<",
"Button",
"onClick",
"=",
"{",
"this",
".",
"close",
"}",
">",
"Close",
"<",
"/Button>",
"<",
"/Modal.Footer>",
"<",
"/Modal>",
"<",
"/div>);",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661772 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IExecutionDetailsSectionProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountTag",
",",
"ExecutionDetailsSection",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryRecentLogs",
",",
"CloudFoundryRecentLogsType",
",",
"}",
"from",
"'../../../presentation/widgets/recentLogs/CloudFoundryRecentLogs'",
";",
"export",
"class",
"RunJobExecutionDetails",
"extends",
"React",
".",
"Component",
"<",
"IExecutionDetailsSectionProps",
">",
"{",
"public",
"static",
"title",
"=",
"'runJobDetails'",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"stage",
",",
"name",
",",
"current",
"}",
"=",
"this",
".",
"props",
";",
"const",
"{",
"context",
"}",
"=",
"stage",
";",
"const",
"account",
"=",
"context",
"[",
"'deploy.account.name'",
"]",
";",
"const",
"region",
"=",
"get",
"(",
"stage",
",",
"[",
"'context'",
",",
"'jobStatus'",
",",
"'location'",
"]",
",",
"''",
")",
";",
"const",
"taskId",
"=",
"get",
"(",
"stage",
",",
"[",
"'context'",
",",
"'jobStatus'",
",",
"'id'",
"]",
",",
"''",
")",
";",
"const",
"taskName",
"=",
"get",
"(",
"stage",
",",
"[",
"'context'",
",",
"'jobStatus'",
",",
"'name'",
"]",
",",
"''",
")",
";",
"const",
"logsUrl",
"=",
"get",
"(",
"stage",
",",
"[",
"'context'",
",",
"'logsUrl'",
"]",
")",
";",
"return",
"(",
"<",
"ExecutionDetailsSection",
"name",
"=",
"{",
"name",
"}",
"current",
"=",
"{",
"current",
"}",
">",
"<",
"div",
"className",
"=",
"\"row\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-9\"",
">",
"<",
"dl",
"className",
"=",
"\"dl-narrow dl-horizontal\"",
">",
"<",
"dt",
">",
"Account",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"AccountTag",
"account",
"=",
"{",
"account",
"}",
"/>",
"<",
"/dd>",
"{",
"region",
"&&",
"(",
"<",
">",
"<",
"dt",
">",
"Region",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"region",
"}",
"<",
"/dd>",
"<",
"dt",
">",
"Logs",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"CloudFoundryRecentLogs",
"account",
"=",
"{",
"account",
"}",
"region",
"=",
"{",
"region",
"}",
"resourceDisplayName",
"=",
"{",
"taskName",
"}",
"resourceGuid",
"=",
"{",
"taskId",
"}",
"logsType",
"=",
"{",
"CloudFoundryRecentLogsType",
".",
"TASK",
"}",
"/",
">",
"<",
"/dd>",
"{",
"logsUrl",
"&&",
"(",
"<",
"dd",
">",
"<",
"a",
"target",
"=",
"\"_blank\"",
"href",
"=",
"{",
"logsUrl",
"}",
">",
"External",
"<",
"/a>",
"<",
"/dd>)}",
"<",
"/>)}",
"{",
"!",
"region",
"&&",
"<",
"div",
"className",
"=",
"\"well\"",
">",
"Collecting",
"additional",
"details",
"...",
"<",
"/div>}",
"<",
"/dl>",
"<",
"/div>",
"<",
"/div>",
"<",
"/ExecutionDetailsSection>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661773 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryRunJobStageConfig",
"}",
"from",
"'./CloudFoundryRunJobStageConfig'",
";",
"import",
"{",
"RunJobExecutionDetails",
"}",
"from",
"'./RunJobExecutionDetails'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"stage",
".",
"context",
".",
"credentials",
",",
"component",
":",
"CloudFoundryRunJobStageConfig",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"key",
":",
"'runJob'",
",",
"provides",
":",
"'runJob'",
",",
"restartable",
":",
"true",
",",
"executionDetailsSections",
":",
"[",
"ExecutionDetailsTasks",
",",
"RunJobExecutionDetails",
"]",
",",
"supportsCustomTimeout",
":",
"true",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'region'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'cluster'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'target'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'command'",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661774 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"Select",
"from",
"'react-select'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"IAccount",
",",
"IRegion",
",",
"IStageConfigProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
",",
"ReactSelectInput",
",",
"StageConfigField",
",",
"TextInput",
"}",
"from",
"'@spinnaker/core'",
";",
"interface",
"ICloudFoundryShareServiceStageConfigState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"regions",
":",
"string",
"[",
"]",
";",
"shareToRegionsList",
":",
"string",
"[",
"]",
";",
"}",
"export",
"class",
"CloudFoundryShareServiceStageConfig",
"extends",
"React",
".",
"Component",
"<",
"IStageConfigProps",
",",
"ICloudFoundryShareServiceStageConfigState",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"constructor",
"(",
"props",
")",
"{",
"super",
"(",
"props",
")",
";",
"props",
".",
"stage",
".",
"cloudProvider",
"=",
"'cloudfoundry'",
";",
"this",
".",
"state",
"=",
"{",
"accounts",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"shareToRegionsList",
":",
"[",
"]",
",",
"}",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
")",
";",
"if",
"(",
"this",
".",
"props",
".",
"stage",
".",
"credentials",
")",
"{",
"this",
".",
"clearAndReloadRegions",
"(",
")",
";",
"}",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"clearAndReloadRegions",
"=",
"(",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"[",
"]",
"}",
")",
";",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"this",
".",
"props",
".",
"stage",
".",
"credentials",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regionList",
")",
"=>",
"{",
"const",
"{",
"region",
"}",
"=",
"this",
".",
"props",
".",
"stage",
";",
"const",
"regions",
"=",
"regionList",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"r",
".",
"name",
")",
";",
"regions",
".",
"sort",
"(",
"(",
"a",
",",
"b",
")",
"=>",
"a",
".",
"localeCompare",
"(",
"b",
")",
")",
";",
"this",
".",
"setState",
"(",
"{",
"regions",
"}",
")",
";",
"if",
"(",
"region",
")",
"{",
"this",
".",
"clearAndResetShareToRegionList",
"(",
"region",
",",
"regions",
")",
";",
"}",
"}",
")",
";",
"}",
";",
"private",
"serviceInstanceNameUpdated",
"=",
"(",
"event",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"serviceInstanceName",
":",
"event",
".",
"target",
".",
"value",
"}",
")",
";",
"}",
";",
"private",
"clearAndResetShareToRegionList",
"=",
"(",
"region",
",",
"regions",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"shareToRegionsList",
":",
"regions",
".",
"filter",
"(",
"(",
"r",
")",
"=>",
"r",
"!==",
"region",
")",
"}",
")",
";",
"}",
";",
"private",
"accountUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"const",
"credentials",
"=",
"option",
".",
"target",
".",
"value",
";",
"this",
".",
"setState",
"(",
"{",
"regions",
":",
"[",
"]",
",",
"shareToRegionsList",
":",
"[",
"]",
",",
"}",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"credentials",
",",
"region",
":",
"''",
",",
"shareToRegions",
":",
"[",
"]",
",",
"}",
")",
";",
"if",
"(",
"credentials",
")",
"{",
"this",
".",
"clearAndReloadRegions",
"(",
")",
";",
"}",
"}",
";",
"private",
"regionUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"const",
"region",
"=",
"option",
".",
"target",
".",
"value",
";",
"this",
".",
"setState",
"(",
"{",
"shareToRegionsList",
":",
"[",
"]",
"}",
")",
";",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"region",
",",
"shareToRegions",
":",
"[",
"]",
",",
"}",
")",
";",
"this",
".",
"clearAndResetShareToRegionList",
"(",
"region",
",",
"this",
".",
"state",
".",
"regions",
")",
";",
"}",
";",
"private",
"shareToRegionsUpdated",
"=",
"(",
"option",
")",
"=>",
"{",
"this",
".",
"props",
".",
"updateStageField",
"(",
"{",
"shareToRegions",
":",
"option",
".",
"map",
"(",
"(",
"o",
")",
"=>",
"o",
".",
"value",
")",
"}",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"credentials",
",",
"region",
",",
"serviceInstanceName",
",",
"shareToRegions",
"}",
"=",
"this",
".",
"props",
".",
"stage",
";",
"const",
"{",
"accounts",
",",
"regions",
",",
"shareToRegionsList",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-horizontal\"",
">",
"<",
"StageConfigField",
"label",
"=",
"\"Account\"",
">",
"<",
"ReactSelectInput",
"clearable",
"=",
"{",
"false",
"}",
"onChange",
"=",
"{",
"this",
".",
"accountUpdated",
"}",
"value",
"=",
"{",
"credentials",
"}",
"stringOptions",
"=",
"{",
"accounts",
".",
"map",
"(",
"(",
"it",
")",
"=>",
"it",
".",
"name",
")",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Region\"",
">",
"<",
"ReactSelectInput",
"clearable",
"=",
"{",
"false",
"}",
"onChange",
"=",
"{",
"this",
".",
"regionUpdated",
"}",
"value",
"=",
"{",
"region",
"}",
"stringOptions",
"=",
"{",
"regions",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Service Instance Name\"",
">",
"<",
"TextInput",
"type",
"=",
"\"text\"",
"className",
"=",
"\"form-control\"",
"onChange",
"=",
"{",
"this",
".",
"serviceInstanceNameUpdated",
"}",
"value",
"=",
"{",
"serviceInstanceName",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"StageConfigField",
"label",
"=",
"\"Share To Regions\"",
">",
"<",
"Select",
"options",
"=",
"{",
"shareToRegionsList",
"&&",
"shareToRegionsList",
".",
"map",
"(",
"(",
"r",
")",
"=>",
"(",
"{",
"label",
":",
"r",
",",
"value",
":",
"r",
",",
"}",
")",
")",
"}",
"multi",
"=",
"{",
"true",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"shareToRegions",
"}",
"onChange",
"=",
"{",
"this",
".",
"shareToRegionsUpdated",
"}",
"/",
">",
"<",
"/StageConfigField>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
28165,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
1823,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2222,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661775 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryShareServiceExecutionDetails",
"}",
"from",
"'./CloudFoundryShareServiceExecutionDetails'",
";",
"import",
"{",
"CloudFoundryShareServiceStageConfig",
"}",
"from",
"'./CloudFoundryShareServiceStageConfig'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"provides",
":",
"'shareService'",
",",
"key",
":",
"'shareService'",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryShareServiceStageConfig",
",",
"executionDetailsSections",
":",
"[",
"CloudFoundryShareServiceExecutionDetails",
",",
"ExecutionDetailsTasks",
"]",
",",
"supportsCustomTimeout",
":",
"true",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'region'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'serviceInstanceName'",
",",
"preventSave",
":",
"true",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661776 | [
"import",
"{",
"get",
"}",
"from",
"'lodash'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"IExecutionDetailsSectionProps",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountTag",
",",
"ExecutionDetailsSection",
",",
"StageExecutionLogs",
",",
"StageFailureMessage",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"function",
"CloudFoundryUnshareServiceExecutionDetails",
"(",
"props",
")",
"{",
"const",
"{",
"stage",
"}",
"=",
"props",
";",
"const",
"{",
"context",
"}",
"=",
"stage",
";",
"const",
"account",
"=",
"get",
"(",
"context",
",",
"'service.account'",
",",
"undefined",
")",
";",
"const",
"serviceInstanceName",
"=",
"get",
"(",
"context",
",",
"'serviceInstanceName'",
",",
"undefined",
")",
";",
"const",
"unshareFromRegions",
"=",
"get",
"(",
"context",
",",
"'unshareFromRegions'",
",",
"undefined",
")",
";",
"return",
"(",
"<",
"ExecutionDetailsSection",
"name",
"=",
"{",
"props",
".",
"name",
"}",
"current",
"=",
"{",
"props",
".",
"current",
"}",
">",
"<",
"div",
"className",
"=",
"\"step-section-details\"",
">",
"<",
"div",
"className",
"=",
"\"row\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-12\"",
">",
"<",
"dl",
"className",
"=",
"\"dl-horizontal\"",
">",
"<",
"dt",
">",
"Account",
"<",
"/dt>",
"<",
"dd",
">",
"<",
"AccountTag",
"account",
"=",
"{",
"account",
"}",
"/>",
"<",
"/dd>",
"<",
"dt",
">",
"Service",
"Instance",
"Name",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"serviceInstanceName",
"}",
"<",
"br",
"/",
">",
"<",
"/dd>",
"<",
"dt",
">",
"Unsharing",
"Regions",
"<",
"/dt>",
"<",
"dd",
">",
"{",
"unshareFromRegions",
".",
"join",
"(",
"', '",
")",
"}",
"<",
"br",
"/",
">",
"<",
"/dd>",
"<",
"/dl>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"StageFailureMessage",
"stage",
"=",
"{",
"stage",
"}",
"message",
"=",
"{",
"stage",
".",
"failureMessage",
"}",
"/",
">",
"<",
"StageExecutionLogs",
"stage",
"=",
"{",
"stage",
"}",
"/>",
"<",
"/ExecutionDetailsSection>);",
"}",
"export",
"namespace",
"CloudFoundryUnshareServiceExecutionDetails",
"{",
"export",
"const",
"title",
"=",
"'cloudfoundryUnshareServiceConfig'",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null
] |
661777 | [
"import",
"type",
"{",
"IStage",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"ExecutionDetailsTasks",
",",
"Registry",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"CloudFoundryUnshareServiceExecutionDetails",
"}",
"from",
"'./CloudFoundryUnshareServiceExecutionDetails'",
";",
"import",
"{",
"CloudFoundryUnshareServiceStageConfig",
"}",
"from",
"'./CloudFoundryUnshareServiceStageConfig'",
";",
"Registry",
".",
"pipeline",
".",
"registerStage",
"(",
"{",
"accountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"context",
".",
"credentials",
"]",
",",
"configAccountExtractor",
":",
"(",
"stage",
")",
"=>",
"[",
"stage",
".",
"credentials",
"]",
",",
"provides",
":",
"'unshareService'",
",",
"key",
":",
"'unshareService'",
",",
"cloudProvider",
":",
"'cloudfoundry'",
",",
"component",
":",
"CloudFoundryUnshareServiceStageConfig",
",",
"controller",
":",
"'cfUnshareServiceStageCtrl'",
",",
"executionDetailsSections",
":",
"[",
"CloudFoundryUnshareServiceExecutionDetails",
",",
"ExecutionDetailsTasks",
"]",
",",
"supportsCustomTimeout",
":",
"true",
",",
"validators",
":",
"[",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'credentials'",
",",
"fieldLabel",
":",
"'account'",
"}",
",",
"{",
"type",
":",
"'requiredField'",
",",
"fieldName",
":",
"'serviceInstanceName'",
",",
"preventSave",
":",
"true",
"}",
",",
"]",
",",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3649,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661778 | [
"import",
"type",
"{",
"IProviderSettings",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"SETTINGS",
"}",
"from",
"'@spinnaker/core'",
";",
"export",
"interface",
"ICloudFoundryProviderSettings",
"extends",
"IProviderSettings",
"{",
"defaults",
":",
"{",
"account",
"?",
":",
"string",
";",
"}",
";",
"}",
"export",
"const",
"CloudFoundryProviderSettings",
"=",
"(",
"SETTINGS",
".",
"providers",
".",
"cloudfoundry",
"as",
"ICloudFoundryProviderSettings",
")",
"||",
"{",
"defaults",
":",
"{",
"}",
"}",
";",
"if",
"(",
"CloudFoundryProviderSettings",
")",
"{",
"CloudFoundryProviderSettings",
".",
"resetToOriginal",
"=",
"SETTINGS",
".",
"resetProvider",
"(",
"'cloudfoundry'",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661779 | [
"import",
"{",
"REST",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryCluster",
"}",
"from",
"'../domain'",
";",
"export",
"class",
"CloudFoundryImageReader",
"{",
"public",
"static",
"findImages",
"(",
"account",
")",
"{",
"return",
"REST",
"(",
"'/images/find'",
")",
".",
"query",
"(",
"{",
"account",
",",
"provider",
":",
"'cloudfoundry'",
",",
"}",
")",
".",
"get",
"(",
")",
".",
"then",
"(",
"function",
"(",
"results",
")",
"{",
"return",
"results",
";",
"}",
")",
".",
"catch",
"(",
"(",
")",
":",
"any",
"[",
"]",
"=>",
"[",
"]",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
580,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661780 | [
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"ICloudFoundryDomain",
"}",
"from",
"'../domain'",
";",
"export",
"interface",
"IRouteDomainSelectFieldProps",
"{",
"account",
":",
"string",
";",
"component",
":",
"{",
"[",
"key",
"]",
":",
"any",
";",
"}",
";",
"field",
":",
"string",
";",
"fieldColumns",
"?",
":",
"number",
";",
"labelColumns",
":",
"number",
";",
"onChange",
":",
"(",
"domain",
":",
"string",
")",
"=>",
"void",
";",
"readOnly",
"?",
":",
"boolean",
";",
"domains",
":",
"ICloudFoundryDomain",
"[",
"]",
";",
"}",
"export",
"function",
"RouteDomainSelectField",
"(",
"props",
")",
"{",
"return",
"(",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"{",
"`col-md-${",
"props",
".",
"labelColumns",
"} sm-label-right`",
"}",
">",
"Domain",
"<",
"/div>",
"{",
"!",
"props",
".",
"account",
"&&",
"<",
"div",
"className",
"=",
"{",
"`col-md-${",
"props",
".",
"fieldColumns",
"||",
"7",
"}`",
"}",
">",
"(",
"Select",
"an",
"account",
")",
"<",
"/div>}",
"<",
"div",
"className",
"=",
"{",
"`col-md-${",
"props",
".",
"fieldColumns",
"||",
"7",
"}`",
"}",
">",
"{",
"props",
".",
"account",
"&&",
"!",
"props",
".",
"readOnly",
"&&",
"(",
"<",
"select",
"className",
"=",
"\"form-control input-sm\"",
"value",
"=",
"{",
"props",
".",
"component",
"[",
"props",
".",
"field",
"]",
"}",
"onChange",
"=",
"{",
"(",
"event",
")",
"=>",
"{",
"props",
".",
"component",
"[",
"props",
".",
"field",
"]",
"=",
"event",
".",
"target",
".",
"value",
";",
"props",
".",
"onChange",
"(",
"event",
".",
"target",
".",
"value",
")",
";",
"}",
"}",
"required",
"=",
"{",
"true",
"}",
">",
"<",
"option",
"value",
"=",
"\"\"",
"disabled",
"=",
"{",
"true",
"}",
">",
"Select",
"...",
"<",
"/option>",
"{",
"props",
".",
"domains",
".",
"map",
"(",
"(",
"domain",
")",
"=>",
"{",
"return",
"(",
"<",
"option",
"key",
"=",
"{",
"domain",
".",
"name",
"}",
"value",
"=",
"{",
"domain",
".",
"name",
"}",
">",
"{",
"domain",
".",
"name",
"}",
"<",
"/option>);",
"}",
")",
"}",
"<",
"/select>)}",
"{",
"props",
".",
"readOnly",
"&&",
"<",
"p",
"className",
"=",
"\"form-control-static\"",
">",
"{",
"props",
".",
"component",
"[",
"props",
".",
"field",
"]",
"}",
"<",
"/p>}",
"<",
"/div>",
"<",
"/div>);",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661781 | [
"import",
"type",
"{",
"FormikErrors",
",",
"FormikProps",
"}",
"from",
"'formik'",
";",
"import",
"React",
"from",
"'react'",
";",
"import",
"type",
"{",
"Option",
"}",
"from",
"'react-select'",
";",
"import",
"Select",
"from",
"'react-select'",
";",
"import",
"{",
"from",
"as",
"observableFrom",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"takeUntil",
"}",
"from",
"'rxjs/operators'",
";",
"import",
"type",
"{",
"Application",
",",
"IAccount",
",",
"IRegion",
",",
"IWizardPageComponent",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"{",
"AccountService",
"}",
"from",
"'@spinnaker/core'",
";",
"import",
"type",
"{",
"ICloudFoundryAccount",
",",
"ICloudFoundryDomain",
",",
"ICloudFoundryLoadBalancerUpsertCommand",
"}",
"from",
"'../../domain'",
";",
"import",
"{",
"RouteDomainSelectField",
"}",
"from",
"'../../routeDomains'",
";",
"export",
"interface",
"ILoadBalancerDetailsProps",
"{",
"app",
":",
"Application",
";",
"formik",
":",
"FormikProps",
"<",
"ICloudFoundryLoadBalancerUpsertCommand",
">",
";",
"isNew",
"?",
":",
"boolean",
";",
"}",
"export",
"interface",
"ILoadBalancerDetailsState",
"{",
"accounts",
":",
"IAccount",
"[",
"]",
";",
"availabilityZones",
":",
"string",
"[",
"]",
";",
"existingLoadBalancerNames",
":",
"string",
"[",
"]",
";",
"domains",
":",
"ICloudFoundryDomain",
"[",
"]",
";",
"regions",
":",
"IRegion",
"[",
"]",
";",
"}",
"export",
"class",
"LoadBalancerDetails",
"extends",
"React",
".",
"Component",
"<",
"ILoadBalancerDetailsProps",
",",
"ILoadBalancerDetailsState",
">",
"implements",
"IWizardPageComponent",
"<",
"ICloudFoundryLoadBalancerUpsertCommand",
">",
"{",
"private",
"destroy$",
"=",
"new",
"Subject",
"(",
")",
";",
"public",
"state",
":",
"ILoadBalancerDetailsState",
"=",
"{",
"accounts",
":",
"undefined",
",",
"availabilityZones",
":",
"[",
"]",
",",
"existingLoadBalancerNames",
":",
"[",
"]",
",",
"domains",
":",
"[",
"]",
",",
"regions",
":",
"[",
"]",
",",
"}",
";",
"public",
"validate",
"(",
"values",
")",
"{",
"const",
"errors",
"=",
"{",
"}",
"as",
"FormikErrors",
"<",
"ICloudFoundryLoadBalancerUpsertCommand",
">",
";",
"if",
"(",
"!",
"values",
".",
"host",
"||",
"!",
"values",
".",
"host",
".",
"match",
"(",
"/^[a-zA-Z0-9-]*$/",
")",
")",
"{",
"errors",
".",
"host",
"=",
"'Host name can only contain letters, numbers, and dashes'",
";",
"}",
"if",
"(",
"!",
"values",
".",
"credentials",
")",
"{",
"errors",
".",
"credentials",
"=",
"'Account must be selected'",
";",
"}",
"if",
"(",
"!",
"values",
".",
"region",
")",
"{",
"errors",
".",
"region",
"=",
"'Region must be selected'",
";",
"}",
"if",
"(",
"!",
"values",
".",
"domain",
")",
"{",
"errors",
".",
"domain",
"=",
"'Domain must be selected'",
";",
"}",
"if",
"(",
"values",
".",
"port",
"&&",
"!",
"values",
".",
"port",
".",
"match",
"(",
"/^[0-9]*$/",
")",
")",
"{",
"errors",
".",
"port",
"=",
"'Port can only be a numeric value'",
";",
"}",
"if",
"(",
"values",
".",
"path",
"&&",
"!",
"values",
".",
"path",
".",
"match",
"(",
"/^[a-zA-Z0-9-\\\\]*$/",
")",
")",
"{",
"errors",
".",
"path",
"=",
"'Path must be in the format of \"abcd/bcef/xyz\"'",
";",
"}",
"return",
"errors",
";",
"}",
"public",
"componentDidMount",
"(",
")",
"{",
"this",
".",
"loadAccounts",
"(",
")",
";",
"}",
"public",
"componentWillUnmount",
"(",
")",
"{",
"this",
".",
"destroy$",
".",
"next",
"(",
")",
";",
"}",
"private",
"loadAccounts",
"(",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"listAccounts",
"(",
"'cloudfoundry'",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accounts",
")",
"=>",
"{",
"this",
".",
"setState",
"(",
"{",
"accounts",
"}",
")",
";",
"this",
".",
"loadDomainsAndRegions",
"(",
")",
";",
"}",
")",
";",
"}",
"private",
"accountUpdated",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"account",
"=",
"option",
".",
"value",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'credentials'",
",",
"account",
")",
";",
"this",
".",
"loadDomainsAndRegions",
"(",
")",
";",
"}",
";",
"private",
"loadDomainsAndRegions",
"(",
")",
"{",
"const",
"account",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"credentials",
";",
"if",
"(",
"account",
")",
"{",
"observableFrom",
"(",
"AccountService",
".",
"getAccountDetails",
"(",
"account",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accountDetails",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"domains",
":",
"accountDetails",
".",
"domains",
"}",
")",
")",
";",
"observableFrom",
"(",
"AccountService",
".",
"getRegionsForAccount",
"(",
"account",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"regions",
")",
"=>",
"this",
".",
"setState",
"(",
"{",
"regions",
"}",
")",
")",
";",
"}",
"}",
"private",
"regionUpdated",
"=",
"(",
"option",
")",
":",
"void",
"=>",
"{",
"const",
"region",
"=",
"option",
".",
"value",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'region'",
",",
"region",
")",
";",
"if",
"(",
"region",
")",
"{",
"const",
"{",
"credentials",
"}",
"=",
"this",
".",
"props",
".",
"formik",
".",
"values",
";",
"observableFrom",
"(",
"AccountService",
".",
"getAccountDetails",
"(",
"credentials",
")",
")",
".",
"pipe",
"(",
"takeUntil",
"(",
"this",
".",
"destroy$",
")",
")",
".",
"subscribe",
"(",
"(",
"accountDetails",
")",
"=>",
"{",
"const",
"{",
"domains",
"}",
"=",
"accountDetails",
";",
"this",
".",
"setState",
"(",
"{",
"domains",
":",
"domains",
".",
"filter",
"(",
"(",
"domain",
")",
"=>",
"domain",
".",
"organization",
"===",
"undefined",
"||",
"region",
".",
"match",
"(",
"'^'",
"+",
"domain",
".",
"organization",
".",
"name",
")",
")",
",",
"}",
")",
";",
"}",
")",
";",
"}",
"}",
";",
"private",
"domainUpdated",
"=",
"(",
"domainName",
")",
":",
"void",
"=>",
"{",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'domainName'",
",",
"domainName",
")",
";",
"}",
";",
"private",
"hostChanged",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"const",
"host",
"=",
"event",
".",
"target",
".",
"value",
";",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"host",
"=",
"host",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'host'",
",",
"host",
")",
";",
"}",
";",
"private",
"portChanged",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"const",
"port",
"=",
"event",
".",
"target",
".",
"value",
";",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"port",
"=",
"port",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'port'",
",",
"port",
")",
";",
"}",
";",
"private",
"pathChanged",
"=",
"(",
"event",
")",
":",
"void",
"=>",
"{",
"const",
"path",
"=",
"event",
".",
"target",
".",
"value",
";",
"this",
".",
"props",
".",
"formik",
".",
"values",
".",
"path",
"=",
"path",
";",
"this",
".",
"props",
".",
"formik",
".",
"setFieldValue",
"(",
"'path'",
",",
"path",
")",
";",
"}",
";",
"public",
"render",
"(",
")",
"{",
"const",
"{",
"values",
"}",
"=",
"this",
".",
"props",
".",
"formik",
";",
"const",
"{",
"accounts",
",",
"domains",
",",
"regions",
"}",
"=",
"this",
".",
"state",
";",
"return",
"(",
"<",
"div",
"className",
"=",
"\"container-fluid form-horizontal\"",
">",
"<",
"div",
"className",
"=",
"\"modal-body\"",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Account",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"Select",
"options",
"=",
"{",
"accounts",
"&&",
"accounts",
".",
"map",
"(",
"(",
"acc",
")",
"=>",
"(",
"{",
"label",
":",
"acc",
".",
"name",
",",
"value",
":",
"acc",
".",
"name",
",",
"}",
")",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"values",
".",
"credentials",
"}",
"onChange",
"=",
"{",
"this",
".",
"accountUpdated",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Region",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"Select",
"options",
"=",
"{",
"regions",
"&&",
"regions",
".",
"map",
"(",
"(",
"region",
")",
"=>",
"(",
"{",
"label",
":",
"region",
".",
"name",
",",
"value",
":",
"region",
".",
"name",
",",
"}",
")",
")",
"}",
"clearable",
"=",
"{",
"false",
"}",
"value",
"=",
"{",
"values",
".",
"region",
"}",
"onChange",
"=",
"{",
"this",
".",
"regionUpdated",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"RouteDomainSelectField",
"labelColumns",
"=",
"{",
"3",
"}",
"component",
"=",
"{",
"values",
"}",
"field",
"=",
"\"domain\"",
"account",
"=",
"{",
"values",
".",
"credentials",
"}",
"onChange",
"=",
"{",
"this",
".",
"domainUpdated",
"}",
"domains",
"=",
"{",
"domains",
"}",
"/",
">",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Host",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"input",
"className",
"=",
"\"form-control input-sm target-group-name\"",
"type",
"=",
"\"text\"",
"value",
"=",
"{",
"values",
".",
"host",
"}",
"name",
"=",
"\"host\"",
"required",
"=",
"{",
"true",
"}",
"onChange",
"=",
"{",
"this",
".",
"hostChanged",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Port",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-3\"",
">",
"<",
"input",
"className",
"=",
"\"form-control input-sm target-group-name\"",
"type",
"=",
"\"text\"",
"value",
"=",
"{",
"values",
".",
"port",
"}",
"required",
"=",
"{",
"false",
"}",
"name",
"=",
"\"port\"",
"onChange",
"=",
"{",
"this",
".",
"portChanged",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"form-group\"",
">",
"<",
"div",
"className",
"=",
"\"col-md-3 sm-label-right\"",
">",
"Path",
"<",
"/div>",
"<",
"div",
"className",
"=",
"\"col-md-7\"",
">",
"<",
"input",
"className",
"=",
"\"form-control input-sm target-group-name\"",
"type",
"=",
"\"text\"",
"value",
"=",
"{",
"values",
".",
"path",
"}",
"required",
"=",
"{",
"false",
"}",
"name",
"=",
"\"path\"",
"onChange",
"=",
"{",
"this",
".",
"pathChanged",
"}",
"/",
">",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>",
"<",
"/div>);",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3776,
null,
0,
null,
null,
null,
3776,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
183,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
105,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
9,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2222,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1823,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661782 | [
"export",
"const",
"MAC_ENTER",
"=",
"3",
";",
"export",
"const",
"BACKSPACE",
"=",
"8",
";",
"export",
"const",
"TAB",
"=",
"9",
";",
"export",
"const",
"NUM_CENTER",
"=",
"12",
";",
"export",
"const",
"ENTER",
"=",
"13",
";",
"export",
"const",
"SHIFT",
"=",
"16",
";",
"export",
"const",
"CONTROL",
"=",
"17",
";",
"export",
"const",
"ALT",
"=",
"18",
";",
"export",
"const",
"PAUSE",
"=",
"19",
";",
"export",
"const",
"CAPS_LOCK",
"=",
"20",
";",
"export",
"const",
"ESCAPE",
"=",
"27",
";",
"export",
"const",
"SPACE",
"=",
"32",
";",
"export",
"const",
"PAGE_UP",
"=",
"33",
";",
"export",
"const",
"PAGE_DOWN",
"=",
"34",
";",
"export",
"const",
"END",
"=",
"35",
";",
"export",
"const",
"HOME",
"=",
"36",
";",
"export",
"const",
"LEFT_ARROW",
"=",
"37",
";",
"export",
"const",
"UP_ARROW",
"=",
"38",
";",
"export",
"const",
"RIGHT_ARROW",
"=",
"39",
";",
"export",
"const",
"DOWN_ARROW",
"=",
"40",
";",
"export",
"const",
"PLUS_SIGN",
"=",
"43",
";",
"export",
"const",
"PRINT_SCREEN",
"=",
"44",
";",
"export",
"const",
"INSERT",
"=",
"45",
";",
"export",
"const",
"DELETE",
"=",
"46",
";",
"export",
"const",
"ZERO",
"=",
"48",
";",
"export",
"const",
"ONE",
"=",
"49",
";",
"export",
"const",
"TWO",
"=",
"50",
";",
"export",
"const",
"THREE",
"=",
"51",
";",
"export",
"const",
"FOUR",
"=",
"52",
";",
"export",
"const",
"FIVE",
"=",
"53",
";",
"export",
"const",
"SIX",
"=",
"54",
";",
"export",
"const",
"SEVEN",
"=",
"55",
";",
"export",
"const",
"EIGHT",
"=",
"56",
";",
"export",
"const",
"NINE",
"=",
"57",
";",
"export",
"const",
"FF_SEMICOLON",
"=",
"59",
";",
"export",
"const",
"FF_EQUALS",
"=",
"61",
";",
"export",
"const",
"QUESTION_MARK",
"=",
"63",
";",
"export",
"const",
"AT_SIGN",
"=",
"64",
";",
"export",
"const",
"A",
"=",
"65",
";",
"export",
"const",
"B",
"=",
"66",
";",
"export",
"const",
"C",
"=",
"67",
";",
"export",
"const",
"D",
"=",
"68",
";",
"export",
"const",
"E",
"=",
"69",
";",
"export",
"const",
"F",
"=",
"70",
";",
"export",
"const",
"G",
"=",
"71",
";",
"export",
"const",
"H",
"=",
"72",
";",
"export",
"const",
"I",
"=",
"73",
";",
"export",
"const",
"J",
"=",
"74",
";",
"export",
"const",
"K",
"=",
"75",
";",
"export",
"const",
"L",
"=",
"76",
";",
"export",
"const",
"M",
"=",
"77",
";",
"export",
"const",
"N",
"=",
"78",
";",
"export",
"const",
"O",
"=",
"79",
";",
"export",
"const",
"P",
"=",
"80",
";",
"export",
"const",
"Q",
"=",
"81",
";",
"export",
"const",
"R",
"=",
"82",
";",
"export",
"const",
"S",
"=",
"83",
";",
"export",
"const",
"T",
"=",
"84",
";",
"export",
"const",
"U",
"=",
"85",
";",
"export",
"const",
"V",
"=",
"86",
";",
"export",
"const",
"W",
"=",
"87",
";",
"export",
"const",
"X",
"=",
"88",
";",
"export",
"const",
"Y",
"=",
"89",
";",
"export",
"const",
"Z",
"=",
"90",
";",
"export",
"const",
"META",
"=",
"91",
";",
"export",
"const",
"MAC_WK_CMD_LEFT",
"=",
"91",
";",
"export",
"const",
"MAC_WK_CMD_RIGHT",
"=",
"93",
";",
"export",
"const",
"CONTEXT_MENU",
"=",
"93",
";",
"export",
"const",
"NUMPAD_ZERO",
"=",
"96",
";",
"export",
"const",
"NUMPAD_ONE",
"=",
"97",
";",
"export",
"const",
"NUMPAD_TWO",
"=",
"98",
";",
"export",
"const",
"NUMPAD_THREE",
"=",
"99",
";",
"export",
"const",
"NUMPAD_FOUR",
"=",
"100",
";",
"export",
"const",
"NUMPAD_FIVE",
"=",
"101",
";",
"export",
"const",
"NUMPAD_SIX",
"=",
"102",
";",
"export",
"const",
"NUMPAD_SEVEN",
"=",
"103",
";",
"export",
"const",
"NUMPAD_EIGHT",
"=",
"104",
";",
"export",
"const",
"NUMPAD_NINE",
"=",
"105",
";",
"export",
"const",
"NUMPAD_MULTIPLY",
"=",
"106",
";",
"export",
"const",
"NUMPAD_PLUS",
"=",
"107",
";",
"export",
"const",
"NUMPAD_MINUS",
"=",
"109",
";",
"export",
"const",
"NUMPAD_PERIOD",
"=",
"110",
";",
"export",
"const",
"NUMPAD_DIVIDE",
"=",
"111",
";",
"export",
"const",
"F1",
"=",
"112",
";",
"export",
"const",
"F2",
"=",
"113",
";",
"export",
"const",
"F3",
"=",
"114",
";",
"export",
"const",
"F4",
"=",
"115",
";",
"export",
"const",
"F5",
"=",
"116",
";",
"export",
"const",
"F6",
"=",
"117",
";",
"export",
"const",
"F7",
"=",
"118",
";",
"export",
"const",
"F8",
"=",
"119",
";",
"export",
"const",
"F9",
"=",
"120",
";",
"export",
"const",
"F10",
"=",
"121",
";",
"export",
"const",
"F11",
"=",
"122",
";",
"export",
"const",
"F12",
"=",
"123",
";",
"export",
"const",
"NUM_LOCK",
"=",
"144",
";",
"export",
"const",
"SCROLL_LOCK",
"=",
"145",
";",
"export",
"const",
"FIRST_MEDIA",
"=",
"166",
";",
"export",
"const",
"FF_MINUS",
"=",
"173",
";",
"export",
"const",
"MUTE",
"=",
"173",
";",
"export",
"const",
"VOLUME_DOWN",
"=",
"174",
";",
"export",
"const",
"VOLUME_UP",
"=",
"175",
";",
"export",
"const",
"FF_MUTE",
"=",
"181",
";",
"export",
"const",
"FF_VOLUME_DOWN",
"=",
"182",
";",
"export",
"const",
"LAST_MEDIA",
"=",
"183",
";",
"export",
"const",
"FF_VOLUME_UP",
"=",
"183",
";",
"export",
"const",
"SEMICOLON",
"=",
"186",
";",
"export",
"const",
"EQUALS",
"=",
"187",
";",
"export",
"const",
"COMMA",
"=",
"188",
";",
"export",
"const",
"DASH",
"=",
"189",
";",
"export",
"const",
"PERIOD",
"=",
"190",
";",
"export",
"const",
"SLASH",
"=",
"191",
";",
"export",
"const",
"APOSTROPHE",
"=",
"192",
";",
"export",
"const",
"TILDE",
"=",
"192",
";",
"export",
"const",
"OPEN_SQUARE_BRACKET",
"=",
"219",
";",
"export",
"const",
"BACKSLASH",
"=",
"220",
";",
"export",
"const",
"CLOSE_SQUARE_BRACKET",
"=",
"221",
";",
"export",
"const",
"SINGLE_QUOTE",
"=",
"222",
";",
"export",
"const",
"MAC_META",
"=",
"224",
";",
"type",
"ModifierKey",
"=",
"'altKey'",
"|",
"'shiftKey'",
"|",
"'ctrlKey'",
"|",
"'metaKey'",
";",
"export",
"function",
"hasModifierKey",
"(",
"event",
",",
"...",
"modifiers",
")",
"{",
"if",
"(",
"modifiers",
".",
"length",
")",
"{",
"return",
"modifiers",
".",
"some",
"(",
"(",
"modifier",
")",
"=>",
"event",
"[",
"modifier",
"]",
")",
";",
"}",
"return",
"event",
".",
"altKey",
"||",
"event",
".",
"shiftKey",
"||",
"event",
".",
"ctrlKey",
"||",
"event",
".",
"metaKey",
";",
"}",
"export",
"function",
"isControl",
"(",
"event",
")",
"{",
"const",
"keyCode",
"=",
"event",
".",
"keyCode",
";",
"switch",
"(",
"keyCode",
")",
"{",
"case",
"SHIFT",
":",
"case",
"CONTROL",
":",
"case",
"ALT",
":",
"return",
"true",
";",
"default",
":",
"return",
"event",
".",
"metaKey",
";",
"}",
"}",
"export",
"function",
"isNumberKey",
"(",
"{",
"keyCode",
"}",
")",
"{",
"return",
"keyCode",
">=",
"ZERO",
"&&",
"keyCode",
"<=",
"NINE",
";",
"}",
"export",
"function",
"isLetterKey",
"(",
"{",
"keyCode",
"}",
")",
"{",
"return",
"keyCode",
">=",
"A",
"&&",
"keyCode",
"<=",
"Z",
";",
"}",
"export",
"function",
"isFunctionKey",
"(",
"{",
"keyCode",
"}",
")",
"{",
"return",
"keyCode",
">=",
"F1",
"&&",
"keyCode",
"<=",
"F12",
";",
"}",
"export",
"function",
"isVerticalMovement",
"(",
"{",
"keyCode",
"}",
")",
"{",
"return",
"[",
"UP_ARROW",
",",
"DOWN_ARROW",
",",
"PAGE_DOWN",
",",
"PAGE_UP",
",",
"HOME",
",",
"END",
"]",
".",
"includes",
"(",
"keyCode",
")",
";",
"}",
"export",
"function",
"isHorizontalMovement",
"(",
"{",
"keyCode",
"}",
")",
"{",
"return",
"[",
"LEFT_ARROW",
",",
"RIGHT_ARROW",
",",
"BACKSPACE",
",",
"DELETE",
"]",
".",
"includes",
"(",
"keyCode",
")",
";",
"}",
"export",
"function",
"isSelectAll",
"(",
"event",
")",
"{",
"return",
"event",
".",
"ctrlKey",
"&&",
"event",
".",
"keyCode",
"===",
"A",
";",
"}",
"export",
"function",
"isCopy",
"(",
"event",
")",
"{",
"return",
"(",
"event",
".",
"ctrlKey",
"||",
"event",
".",
"metaKey",
")",
"&&",
"event",
".",
"keyCode",
"===",
"C",
";",
"}",
"export",
"function",
"isInput",
"(",
"event",
")",
"{",
"return",
"event",
".",
"target",
".",
"tagName",
"===",
"'INPUT'",
"||",
"event",
".",
"target",
".",
"tagName",
"===",
"'TEXTAREA'",
";",
"}",
"export",
"function",
"isLeftBracket",
"(",
"event",
")",
"{",
"return",
"event",
".",
"code",
"===",
"'BracketLeft'",
";",
"}",
"export",
"function",
"isRightBracket",
"(",
"event",
")",
"{",
"return",
"event",
".",
"code",
"===",
"'BracketRight'",
";",
"}",
"export",
"function",
"isDigit",
"(",
"{",
"keyCode",
"}",
")",
"{",
"return",
"[",
"ZERO",
",",
"ONE",
",",
"TWO",
",",
"THREE",
",",
"FOUR",
",",
"FIVE",
",",
"SIX",
",",
"SEVEN",
",",
"EIGHT",
",",
"NINE",
"]",
".",
"includes",
"(",
"keyCode",
")",
";",
"}"
] | [
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
69,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661783 | [
"import",
"{",
"QueryList",
"}",
"from",
"'@angular/core'",
";",
"import",
"{",
"UP_ARROW",
",",
"DOWN_ARROW",
",",
"LEFT_ARROW",
",",
"RIGHT_ARROW",
",",
"TAB",
",",
"A",
",",
"Z",
",",
"ZERO",
",",
"NINE",
",",
"HOME",
",",
"END",
"}",
"from",
"'@ptsecurity/cdk/keycodes'",
";",
"import",
"{",
"Subject",
",",
"Subscription",
"}",
"from",
"'rxjs'",
";",
"import",
"{",
"debounceTime",
",",
"filter",
",",
"map",
",",
"tap",
"}",
"from",
"'rxjs/operators'",
";",
"export",
"interface",
"ListKeyManagerOption",
"{",
"disabled",
"?",
":",
"boolean",
";",
"getLabel",
"?",
"(",
")",
":",
"string",
";",
"}",
"/** Modifier keys handled by the ListKeyManager. */",
"export",
"type",
"ListKeyManagerModifierKey",
"=",
"'altKey'",
"|",
"'ctrlKey'",
"|",
"'metaKey'",
"|",
"'shiftKey'",
";",
"/**\n * This class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */",
"export",
"class",
"ListKeyManager",
"<",
"T",
"extends",
"ListKeyManagerOption",
">",
"{",
"/**\n * Stream that emits any time the TAB key is pressed, so components can react\n * when focus is shifted off of the list.\n */",
"tabOut",
":",
"Subject",
"<",
"void",
">",
"=",
"new",
"Subject",
"<",
"void",
">",
"(",
")",
";",
"/** Stream that emits whenever the active item of the list manager changes. */",
"change",
"=",
"new",
"Subject",
"<",
"number",
">",
"(",
")",
";",
"previousActiveItemIndex",
"=",
"-",
"1",
";",
"get",
"activeItemIndex",
"(",
")",
":",
"number",
"{",
"return",
"this",
".",
"_activeItemIndex",
";",
"}",
"private",
"_activeItemIndex",
"=",
"-",
"1",
";",
"get",
"activeItem",
"(",
")",
":",
"T",
"|",
"null",
"{",
"return",
"this",
".",
"_activeItem",
";",
"}",
"private",
"_activeItem",
":",
"T",
";",
"private",
"wrap",
":",
"boolean",
"=",
"false",
";",
"private",
"letterKeyStream",
"=",
"new",
"Subject",
"<",
"string",
">",
"(",
")",
";",
"private",
"typeaheadSubscription",
"=",
"Subscription",
".",
"EMPTY",
";",
"private",
"vertical",
"=",
"true",
";",
"private",
"horizontal",
":",
"'ltr'",
"|",
"'rtl'",
"|",
"null",
";",
"private",
"scrollSize",
":",
"number",
"=",
"0",
";",
"private",
"pressedLetters",
":",
"string",
"[",
"]",
"=",
"[",
"]",
";",
"private",
"homeAndEnd",
"=",
"false",
";",
"private",
"allowedModifierKeys",
":",
"ListKeyManagerModifierKey",
"[",
"]",
"=",
"[",
"]",
";",
"constructor",
"(",
"private",
"_items",
")",
"{",
"if",
"(",
"_items",
"instanceof",
"QueryList",
")",
"{",
"_items",
".",
"changes",
".",
"subscribe",
"(",
"(",
"newItems",
")",
"=>",
"{",
"if",
"(",
"this",
".",
"_activeItem",
")",
"{",
"const",
"itemArray",
"=",
"newItems",
".",
"toArray",
"(",
")",
";",
"const",
"newIndex",
"=",
"itemArray",
".",
"indexOf",
"(",
"this",
".",
"_activeItem",
")",
";",
"if",
"(",
"newIndex",
">",
"-",
"1",
"&&",
"newIndex",
"!==",
"this",
".",
"_activeItemIndex",
")",
"{",
"this",
".",
"_activeItemIndex",
"=",
"newIndex",
";",
"}",
"}",
"}",
")",
";",
"}",
"}",
"/** Gets whether the user is currently typing into the manager using the typeahead feature. */",
"isTyping",
"(",
")",
"{",
"return",
"this",
".",
"pressedLetters",
".",
"length",
">",
"0",
";",
"}",
"withScrollSize",
"(",
"scrollSize",
")",
"{",
"this",
".",
"scrollSize",
"=",
"scrollSize",
";",
"return",
"this",
";",
"}",
"/**\n * Modifier keys which are allowed to be held down and whose default actions will be prevented\n * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n */",
"withAllowedModifierKeys",
"(",
"keys",
")",
"{",
"this",
".",
"allowedModifierKeys",
"=",
"keys",
";",
"return",
"this",
";",
"}",
"/**\n * Turns on wrapping mode, which ensures that the active item will wrap to\n * the other end of list when there are no more items in the given direction.\n */",
"withWrap",
"(",
"shouldWrap",
"=",
"true",
")",
"{",
"this",
".",
"wrap",
"=",
"shouldWrap",
";",
"return",
"this",
";",
"}",
"param",
"predicate",
"skipPredicate",
"(",
"predicate",
")",
"{",
"this",
".",
"skipPredicateFn",
"=",
"predicate",
";",
"return",
"this",
";",
"}",
"param",
"enabled",
"withVerticalOrientation",
"(",
"enabled",
"=",
"true",
")",
"{",
"this",
".",
"vertical",
"=",
"enabled",
";",
"return",
"this",
";",
"}",
"param",
"direction",
"withHorizontalOrientation",
"(",
"direction",
")",
"{",
"this",
".",
"horizontal",
"=",
"direction",
";",
"return",
"this",
";",
"}",
"param",
"searchLetterIndex",
"param",
"debounceInterval",
"withTypeAhead",
"(",
"debounceInterval",
"=",
"200",
",",
"searchLetterIndex",
"=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"_items",
".",
"length",
"&&",
"this",
".",
"_items",
".",
"some",
"(",
"(",
"item",
")",
"=>",
"typeof",
"item",
".",
"getLabel",
"!==",
"'function'",
")",
")",
"{",
"throw",
"Error",
"(",
"'ListKeyManager items in typeahead mode must implement the `getLabel` method.'",
")",
";",
"}",
"this",
".",
"typeaheadSubscription",
".",
"unsubscribe",
"(",
")",
";",
"this",
".",
"typeaheadSubscription",
"=",
"this",
".",
"letterKeyStream",
".",
"pipe",
"(",
"tap",
"(",
"(",
"keyCode",
")",
"=>",
"this",
".",
"pressedLetters",
".",
"push",
"(",
"keyCode",
")",
")",
",",
"debounceTime",
"(",
"debounceInterval",
")",
",",
"filter",
"(",
"(",
")",
"=>",
"this",
".",
"pressedLetters",
".",
"length",
">",
"0",
")",
",",
"map",
"(",
"(",
")",
"=>",
"this",
".",
"pressedLetters",
".",
"join",
"(",
"''",
")",
")",
")",
".",
"subscribe",
"(",
"(",
"inputString",
")",
"=>",
"{",
"if",
"(",
"searchLetterIndex",
"===",
"-",
"1",
")",
"{",
"this",
".",
"pressedLetters",
"=",
"[",
"]",
";",
"return",
";",
"}",
"const",
"items",
"=",
"this",
".",
"_items",
".",
"toArray",
"(",
")",
";",
"for",
"(",
"let",
"i",
"=",
"1",
";",
"i",
"<",
"items",
".",
"length",
"+",
"1",
";",
"i",
"++",
")",
"{",
"const",
"index",
"=",
"(",
"this",
".",
"_activeItemIndex",
"+",
"i",
")",
"%",
"items",
".",
"length",
";",
"const",
"item",
"=",
"items",
"[",
"index",
"]",
";",
"if",
"(",
"!",
"item",
".",
"disabled",
"&&",
"item",
".",
"getLabel",
"!",
"(",
")",
".",
"toUpperCase",
"(",
")",
".",
"trim",
"(",
")",
".",
"indexOf",
"(",
"inputString",
")",
"===",
"searchLetterIndex",
")",
"{",
"this",
".",
"setActiveItem",
"(",
"index",
")",
";",
"break",
";",
"}",
"}",
"this",
".",
"pressedLetters",
"=",
"[",
"]",
";",
"}",
")",
";",
"return",
"this",
";",
"}",
"param",
"enabled",
"withHomeAndEnd",
"(",
"enabled",
"=",
"true",
")",
"{",
"this",
".",
"homeAndEnd",
"=",
"enabled",
";",
"return",
"this",
";",
"}",
"param",
"index",
"setActiveItem",
"(",
"index",
")",
";",
"param",
"item",
"setActiveItem",
"(",
"item",
")",
"{",
"this",
".",
"previousActiveItemIndex",
"=",
"this",
".",
"_activeItemIndex",
";",
"this",
".",
"updateActiveItem",
"(",
"item",
")",
";",
"if",
"(",
"this",
".",
"_activeItemIndex",
"!==",
"this",
".",
"previousActiveItemIndex",
")",
"{",
"this",
".",
"change",
".",
"next",
"(",
"this",
".",
"_activeItemIndex",
")",
";",
"}",
"}",
"param",
"event",
"onKeydown",
"(",
"event",
")",
"{",
"const",
"keyCode",
"=",
"event",
".",
"keyCode",
";",
"const",
"modifiers",
"=",
"[",
"'altKey'",
",",
"'ctrlKey'",
",",
"'metaKey'",
",",
"'shiftKey'",
"]",
";",
"const",
"isModifierAllowed",
"=",
"modifiers",
".",
"every",
"(",
"(",
"modifier",
")",
"=>",
"{",
"return",
"!",
"event",
"[",
"modifier",
"]",
"||",
"this",
".",
"allowedModifierKeys",
".",
"indexOf",
"(",
"modifier",
")",
">",
"-",
"1",
";",
"}",
")",
";",
"switch",
"(",
"keyCode",
")",
"{",
"case",
"TAB",
":",
"this",
".",
"tabOut",
".",
"next",
"(",
")",
";",
"return",
";",
"case",
"DOWN_ARROW",
":",
"if",
"(",
"this",
".",
"vertical",
")",
"{",
"this",
".",
"setNextItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"{",
"return",
";",
"}",
"case",
"UP_ARROW",
":",
"if",
"(",
"this",
".",
"vertical",
")",
"{",
"this",
".",
"setPreviousItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"{",
"return",
";",
"}",
"case",
"RIGHT_ARROW",
":",
"if",
"(",
"this",
".",
"horizontal",
"===",
"'ltr'",
")",
"{",
"this",
".",
"setNextItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"if",
"(",
"this",
".",
"horizontal",
"===",
"'rtl'",
")",
"{",
"this",
".",
"setPreviousItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"{",
"return",
";",
"}",
"case",
"LEFT_ARROW",
":",
"if",
"(",
"this",
".",
"horizontal",
"===",
"'ltr'",
")",
"{",
"this",
".",
"setPreviousItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"if",
"(",
"this",
".",
"horizontal",
"===",
"'rtl'",
")",
"{",
"this",
".",
"setNextItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"{",
"return",
";",
"}",
"case",
"HOME",
":",
"if",
"(",
"this",
".",
"homeAndEnd",
"&&",
"isModifierAllowed",
")",
"{",
"this",
".",
"setFirstItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"{",
"return",
";",
"}",
"case",
"END",
":",
"if",
"(",
"this",
".",
"homeAndEnd",
"&&",
"isModifierAllowed",
")",
"{",
"this",
".",
"setLastItemActive",
"(",
")",
";",
"break",
";",
"}",
"else",
"{",
"return",
";",
"}",
"default",
":",
"if",
"(",
"event",
".",
"key",
"&&",
"event",
".",
"key",
".",
"length",
"===",
"1",
")",
"{",
"this",
".",
"letterKeyStream",
".",
"next",
"(",
"event",
".",
"key",
".",
"toLocaleUpperCase",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"(",
"keyCode",
">=",
"A",
"&&",
"keyCode",
"<=",
"Z",
")",
"||",
"(",
"keyCode",
">=",
"ZERO",
"&&",
"keyCode",
"<=",
"NINE",
")",
")",
"{",
"this",
".",
"letterKeyStream",
".",
"next",
"(",
"String",
".",
"fromCharCode",
"(",
"keyCode",
")",
")",
";",
"}",
"return",
";",
"}",
"this",
".",
"pressedLetters",
"=",
"[",
"]",
";",
"event",
".",
"preventDefault",
"(",
")",
";",
"}",
"setFirstItemActive",
"(",
")",
"{",
"this",
".",
"setActiveItemByIndex",
"(",
"0",
",",
"1",
")",
";",
"}",
"setLastItemActive",
"(",
")",
"{",
"this",
".",
"setActiveItemByIndex",
"(",
"this",
".",
"_items",
".",
"length",
"-",
"1",
",",
"-",
"1",
")",
";",
"}",
"setNextItemActive",
"(",
")",
"{",
"this",
".",
"_activeItemIndex",
"<",
"0",
"?",
"this",
".",
"setFirstItemActive",
"(",
")",
":",
"this",
".",
"setActiveItemByDelta",
"(",
"1",
")",
";",
"}",
"setPreviousItemActive",
"(",
")",
"{",
"this",
".",
"_activeItemIndex",
"<",
"0",
"&&",
"this",
".",
"wrap",
"?",
"this",
".",
"setLastItemActive",
"(",
")",
":",
"this",
".",
"setActiveItemByDelta",
"(",
"-",
"1",
")",
";",
"}",
"setNextPageItemActive",
"(",
"delta",
"=",
"this",
".",
"scrollSize",
")",
"{",
"const",
"nextItemIndex",
"=",
"this",
".",
"_activeItemIndex",
"+",
"delta",
";",
"if",
"(",
"nextItemIndex",
">=",
"this",
".",
"_items",
".",
"length",
")",
"{",
"this",
".",
"setLastItemActive",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"setActiveItemByDelta",
"(",
"delta",
")",
";",
"}",
"}",
"setPreviousPageItemActive",
"(",
"delta",
"=",
"this",
".",
"scrollSize",
")",
"{",
"const",
"nextItemIndex",
"=",
"this",
".",
"_activeItemIndex",
"-",
"delta",
";",
"if",
"(",
"nextItemIndex",
"<=",
"0",
")",
"{",
"this",
".",
"setFirstItemActive",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"setActiveItemByDelta",
"(",
"-",
"delta",
")",
";",
"}",
"}",
"param",
"index",
"updateActiveItem",
"(",
"index",
")",
";",
"param",
"item",
"updateActiveItem",
"(",
"item",
")",
";",
"updateActiveItem",
"(",
"item",
")",
"{",
"const",
"itemArray",
"=",
"this",
".",
"_items",
".",
"toArray",
"(",
")",
";",
"const",
"index",
"=",
"typeof",
"item",
"===",
"'number'",
"?",
"item",
":",
"itemArray",
".",
"indexOf",
"(",
"item",
")",
";",
"this",
".",
"_activeItemIndex",
"=",
"index",
";",
"this",
".",
"_activeItem",
"=",
"itemArray",
"[",
"index",
"]",
";",
"}",
"/**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager. By default, disabled items are skipped.\n */",
"private",
"skipPredicateFn",
"=",
"(",
"item",
")",
"=>",
"item",
".",
"disabled",
";",
"/**\n * This method sets the active item, given a list of items and the delta between the\n * currently active item and the new active item. It will calculate differently\n * depending on whether wrap mode is turned on.\n */",
"private",
"setActiveItemByDelta",
"(",
"delta",
")",
"{",
"this",
".",
"wrap",
"?",
"this",
".",
"setActiveInWrapMode",
"(",
"delta",
")",
":",
"this",
".",
"setActiveInDefaultMode",
"(",
"delta",
")",
";",
"}",
"/**\n * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n * down the list until it finds an item that is not disabled, and it will wrap if it\n * encounters either end of the list.\n */",
"private",
"setActiveInWrapMode",
"(",
"delta",
")",
"{",
"const",
"items",
"=",
"this",
".",
"getItemsArray",
"(",
")",
";",
"for",
"(",
"let",
"i",
"=",
"1",
";",
"i",
"<=",
"items",
".",
"length",
";",
"i",
"++",
")",
"{",
"const",
"index",
"=",
"(",
"this",
".",
"_activeItemIndex",
"+",
"(",
"delta",
"*",
"i",
")",
"+",
"items",
".",
"length",
")",
"%",
"items",
".",
"length",
";",
"const",
"item",
"=",
"items",
"[",
"index",
"]",
";",
"if",
"(",
"!",
"this",
".",
"skipPredicateFn",
"(",
"item",
")",
")",
"{",
"this",
".",
"setActiveItem",
"(",
"index",
")",
";",
"return",
";",
"}",
"}",
"}",
"/**\n * Sets the active item properly given the default mode. In other words, it will\n * continue to move down the list until it finds an item that is not disabled. If\n * it encounters either end of the list, it will stop and not wrap.\n */",
"private",
"setActiveInDefaultMode",
"(",
"delta",
")",
"{",
"this",
".",
"setActiveItemByIndex",
"(",
"this",
".",
"_activeItemIndex",
"+",
"delta",
",",
"delta",
")",
";",
"}",
"/**\n * Sets the active item to the first enabled item starting at the index specified. If the\n * item is disabled, it will move in the fallbackDelta direction until it either\n * finds an enabled item or encounters the end of the list.\n */",
"private",
"setActiveItemByIndex",
"(",
"index",
",",
"fallbackDelta",
")",
"{",
"const",
"items",
"=",
"this",
".",
"getItemsArray",
"(",
")",
";",
"if",
"(",
"!",
"items",
"[",
"index",
"]",
")",
"{",
"return",
";",
"}",
"let",
"curIndex",
"=",
"index",
";",
"while",
"(",
"this",
".",
"skipPredicateFn",
"(",
"items",
"[",
"curIndex",
"]",
")",
")",
"{",
"curIndex",
"+=",
"fallbackDelta",
";",
"if",
"(",
"!",
"items",
"[",
"curIndex",
"]",
")",
"{",
"return",
";",
"}",
"}",
"this",
".",
"setActiveItem",
"(",
"curIndex",
")",
";",
"}",
"/** Returns the items as an array. */",
"private",
"getItemsArray",
"(",
")",
"{",
"return",
"this",
".",
"_items",
"instanceof",
"QueryList",
"?",
"this",
".",
"_items",
".",
"toArray",
"(",
")",
":",
"this",
".",
"_items",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1892,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1892,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
69,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
49621,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
null,
null,
null,
4,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3,
null,
3,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661784 | [
"import",
"{",
"FocusOrigin",
"}",
"from",
"'@angular/cdk/a11y'",
";",
"import",
"{",
"ListKeyManager",
",",
"ListKeyManagerOption",
"}",
"from",
"'./list-key-manager'",
";",
"/**\n * This is the interface for focusable items (used by the FocusKeyManager).\n * Each item must know how to focus itself, whether or not it is currently disabled\n * and be able to supply it's label.\n */",
"export",
"interface",
"IFocusableOption",
"extends",
"ListKeyManagerOption",
"{",
"focus",
"(",
"origin",
"?",
")",
":",
"void",
";",
"}",
"export",
"class",
"FocusKeyManager",
"<",
"T",
">",
"extends",
"ListKeyManager",
"<",
"IFocusableOption",
"&",
"T",
">",
"{",
"private",
"origin",
":",
"FocusOrigin",
"=",
"'program'",
";",
"param",
"origin",
"setFocusOrigin",
"(",
"origin",
")",
"{",
"this",
".",
"origin",
"=",
"origin",
";",
"return",
"this",
";",
"}",
"getFocusOrigin",
"(",
")",
"{",
"return",
"this",
".",
"origin",
";",
"}",
"param",
"item",
"setActiveItem",
"(",
"item",
")",
";",
"setActiveItem",
"(",
"item",
")",
"{",
"super",
".",
"setActiveItem",
"(",
"item",
")",
";",
"if",
"(",
"this",
".",
"activeItem",
")",
"{",
"this",
".",
"activeItem",
".",
"focus",
"(",
"this",
".",
"origin",
")",
";",
"}",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2189,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2189,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2189,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661785 | [
"import",
"{",
"dispatchFakeEvent",
"}",
"from",
"'./dispatch-events'",
";",
"/**\n * Patches an elements focus and blur methods to emit events consistently and predictably.\n * This is necessary, because some browsers, like IE11, will call the focus handlers asynchronously,\n * while others won't fire them at all if the browser window is not focused.\n */",
"export",
"function",
"patchElementFocus",
"(",
"element",
")",
"{",
"element",
".",
"focus",
"=",
"(",
")",
"=>",
"dispatchFakeEvent",
"(",
"element",
",",
"'focus'",
")",
";",
"element",
".",
"blur",
"=",
"(",
")",
"=>",
"dispatchFakeEvent",
"(",
"element",
",",
"'blur'",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
15,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661786 | [
"import",
"{",
"EventEmitter",
",",
"Injectable",
",",
"NgZone",
"}",
"from",
"'@angular/core'",
";",
"docs-private",
"@",
"Injectable",
"(",
")",
"export",
"class",
"MockNgZone",
"extends",
"NgZone",
"{",
"onStable",
":",
"EventEmitter",
"<",
"any",
">",
"=",
"new",
"EventEmitter",
"(",
"false",
")",
";",
"constructor",
"(",
")",
"{",
"super",
"(",
"{",
"enableLongStackTrace",
":",
"false",
"}",
")",
";",
"}",
"run",
"(",
"fn",
")",
"{",
"return",
"fn",
"(",
")",
";",
"}",
"runOutsideAngular",
"(",
"fn",
")",
"{",
"return",
"fn",
"(",
")",
";",
"}",
"simulateZoneExit",
"(",
")",
"{",
"this",
".",
"onStable",
".",
"emit",
"(",
"null",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661787 | [
"import",
"{",
"FocusOrigin",
",",
"ListKeyManagerModifierKey",
"}",
"from",
"'@angular/cdk/a11y'",
";",
"import",
"{",
"DOWN_ARROW",
",",
"END",
",",
"HOME",
",",
"LEFT_ARROW",
",",
"RIGHT_ARROW",
",",
"TAB",
",",
"UP_ARROW",
"}",
"from",
"'@angular/cdk/keycodes'",
";",
"import",
"{",
"QueryList",
"}",
"from",
"'@angular/core'",
";",
"import",
"{",
"FocusKeyManager",
",",
"ListKeyManager",
"}",
"from",
"'@ptsecurity/cdk/a11y'",
";",
"import",
"{",
"createKeyboardEvent",
"}",
"from",
"'@ptsecurity/cdk/testing'",
";",
"import",
"{",
"take",
"}",
"from",
"'rxjs/operators'",
";",
"class",
"FakeFocusable",
"{",
"/** Whether the item is disabled or not. */",
"disabled",
"=",
"false",
";",
"/** Test property that can be used to test the `skipPredicate` functionality. */",
"skipItem",
"=",
"false",
";",
"constructor",
"(",
"private",
"_label",
"=",
"''",
")",
"{",
"}",
"focus",
"(",
"_origin",
"?",
")",
"{",
"}",
"getLabel",
"(",
")",
"{",
"return",
"this",
".",
"_label",
";",
"}",
"}",
"interface",
"KeyEventTestContext",
"{",
"nextKeyEvent",
":",
"KeyboardEvent",
";",
"prevKeyEvent",
":",
"KeyboardEvent",
";",
"}",
"describe",
"(",
"'Key managers'",
",",
"(",
")",
"=>",
"{",
"let",
"itemList",
";",
"let",
"fakeKeyEvents",
";",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"itemList",
"=",
"new",
"QueryList",
"<",
"any",
">",
"(",
")",
";",
"fakeKeyEvents",
"=",
"{",
"downArrow",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"DOWN_ARROW",
")",
",",
"upArrow",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"UP_ARROW",
")",
",",
"leftArrow",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"LEFT_ARROW",
")",
",",
"rightArrow",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"RIGHT_ARROW",
")",
",",
"tab",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"TAB",
")",
",",
"home",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"HOME",
")",
",",
"end",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"END",
")",
",",
"unsupported",
":",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"192",
")",
"}",
";",
"}",
")",
";",
"describe",
"(",
"'ListKeyManager'",
",",
"(",
")",
"=>",
"{",
"let",
"keyManager",
";",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"itemList",
".",
"reset",
"(",
"[",
"new",
"FakeFocusable",
"(",
"'one'",
")",
",",
"new",
"FakeFocusable",
"(",
"'two'",
")",
",",
"new",
"FakeFocusable",
"(",
"'three'",
")",
"]",
")",
";",
"keyManager",
"=",
"new",
"ListKeyManager",
"<",
"FakeFocusable",
">",
"(",
"itemList",
")",
";",
"keyManager",
".",
"setFirstItemActive",
"(",
")",
";",
"spyOn",
"(",
"keyManager",
",",
"'setActiveItem'",
")",
".",
"and",
".",
"callThrough",
"(",
")",
";",
"}",
")",
";",
"it",
"(",
"'should maintain the active item if the amount of items changes'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItem",
"!",
".",
"getLabel",
"(",
")",
")",
".",
"toBe",
"(",
"'one'",
")",
";",
"itemList",
".",
"reset",
"(",
"[",
"new",
"FakeFocusable",
"(",
"'zero'",
")",
",",
"...",
"itemList",
".",
"toArray",
"(",
")",
"]",
")",
";",
"itemList",
".",
"notifyOnChanges",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItem",
"!",
".",
"getLabel",
"(",
")",
")",
".",
"toBe",
"(",
"'one'",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should start off the activeItem as null'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"new",
"ListKeyManager",
"(",
"[",
"]",
"as",
"any",
")",
".",
"activeItem",
")",
".",
"toBeNull",
"(",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should set the activeItem to null if an invalid index is passed in'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setActiveItem",
"(",
"1337",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItem",
")",
".",
"toBeNull",
"(",
")",
";",
"}",
")",
";",
"describe",
"(",
"'Key events'",
",",
"(",
")",
"=>",
"{",
"it",
"(",
"'should emit tabOut when the tab key is pressed'",
",",
"(",
")",
"=>",
"{",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'tabOut spy'",
")",
";",
"keyManager",
".",
"tabOut",
".",
"pipe",
"(",
"take",
"(",
"1",
")",
")",
".",
"subscribe",
"(",
"spy",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"tab",
")",
";",
"expect",
"(",
"spy",
")",
".",
"toHaveBeenCalled",
"(",
")",
";",
"}",
")",
";",
"it",
"(",
"'should emit tabOut when the tab key is pressed with a modifier'",
",",
"(",
")",
"=>",
"{",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'tabOut spy'",
")",
";",
"keyManager",
".",
"tabOut",
".",
"pipe",
"(",
"take",
"(",
"1",
")",
")",
".",
"subscribe",
"(",
"spy",
")",
";",
"Object",
".",
"defineProperty",
"(",
"fakeKeyEvents",
".",
"tab",
",",
"'shiftKey'",
",",
"{",
"get",
":",
"(",
")",
"=>",
"true",
"}",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"tab",
")",
";",
"expect",
"(",
"spy",
")",
".",
"toHaveBeenCalled",
"(",
")",
";",
"}",
")",
";",
"it",
"(",
"'should emit an event whenever the active item changes'",
",",
"(",
")",
"=>",
"{",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'change spy'",
")",
";",
"const",
"subscription",
"=",
"keyManager",
".",
"change",
".",
"subscribe",
"(",
"spy",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"spy",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"spy",
")",
".",
"toHaveBeenCalledTimes",
"(",
"2",
")",
";",
"subscription",
".",
"unsubscribe",
"(",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should emit if the active item changed, but not the active index'",
",",
"(",
")",
"=>",
"{",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'change spy'",
")",
";",
"const",
"subscription",
"=",
"keyManager",
".",
"change",
".",
"subscribe",
"(",
"spy",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"0",
")",
";",
"itemList",
".",
"reset",
"(",
"[",
"new",
"FakeFocusable",
"(",
"'zero'",
")",
",",
"...",
"itemList",
".",
"toArray",
"(",
")",
"]",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"0",
")",
";",
"expect",
"(",
"spy",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"subscription",
".",
"unsubscribe",
"(",
")",
";",
"}",
")",
";",
"it",
"(",
"'should activate the first item when pressing down on a clean key manager'",
",",
"(",
")",
"=>",
"{",
"keyManager",
"=",
"new",
"ListKeyManager",
"<",
"FakeFocusable",
">",
"(",
"itemList",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active index to default to -1.'",
")",
".",
"toBe",
"(",
"-",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected first item to become active.'",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should not prevent the default keyboard action when pressing tab'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"fakeKeyEvents",
".",
"tab",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"tab",
")",
";",
"expect",
"(",
"fakeKeyEvents",
".",
"tab",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"}",
")",
";",
"it",
"(",
"'should not do anything for unsupported key presses'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setActiveItem",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"fakeKeyEvents",
".",
"unsupported",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"unsupported",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"fakeKeyEvents",
".",
"unsupported",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"}",
")",
";",
"it",
"(",
"'should ignore the horizontal keys when only in vertical mode'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withVerticalOrientation",
"(",
")",
".",
"withHorizontalOrientation",
"(",
"null",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"rightArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"fakeKeyEvents",
".",
"rightArrow",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"}",
")",
";",
"it",
"(",
"'should ignore the vertical keys when only in horizontal mode'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withVerticalOrientation",
"(",
"false",
")",
".",
"withHorizontalOrientation",
"(",
"'ltr'",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"fakeKeyEvents",
".",
"downArrow",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"}",
")",
";",
"describe",
"(",
"'withHomeAndEnd'",
",",
"(",
")",
"=>",
"{",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withHomeAndEnd",
"(",
")",
";",
"}",
")",
";",
"it",
"(",
"'should focus the first item when Home is pressed'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setActiveItem",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"home",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should focus the last item when End is pressed'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setActiveItem",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"end",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"itemList",
".",
"length",
"-",
"1",
")",
";",
"}",
")",
";",
"}",
")",
";",
"describe",
"(",
"'with `vertical` direction'",
",",
"function",
"(",
"this",
")",
"{",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withVerticalOrientation",
"(",
")",
";",
"this",
".",
"nextKeyEvent",
"=",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"DOWN_ARROW",
")",
";",
"this",
".",
"prevKeyEvent",
"=",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"UP_ARROW",
")",
";",
"}",
")",
";",
"runDirectionalKeyTests",
".",
"call",
"(",
"this",
")",
";",
"}",
")",
";",
"describe",
"(",
"'with `ltr` direction'",
",",
"function",
"(",
"this",
")",
"{",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withHorizontalOrientation",
"(",
"'ltr'",
")",
";",
"this",
".",
"nextKeyEvent",
"=",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"RIGHT_ARROW",
")",
";",
"this",
".",
"prevKeyEvent",
"=",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"LEFT_ARROW",
")",
";",
"}",
")",
";",
"runDirectionalKeyTests",
".",
"call",
"(",
"this",
")",
";",
"}",
")",
";",
"describe",
"(",
"'with `rtl` direction'",
",",
"function",
"(",
"this",
")",
"{",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withHorizontalOrientation",
"(",
"'rtl'",
")",
";",
"this",
".",
"nextKeyEvent",
"=",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"LEFT_ARROW",
")",
";",
"this",
".",
"prevKeyEvent",
"=",
"createKeyboardEvent",
"(",
"'keydown'",
",",
"RIGHT_ARROW",
")",
";",
"}",
")",
";",
"runDirectionalKeyTests",
".",
"call",
"(",
"this",
")",
";",
"}",
")",
";",
"/**\n * Defines the directional key tests that should be run in a particular context. Note that\n * parameters have to be passed in via Jasmine's context object (`this` inside a `beforeEach`)\n * because this function has to run before any `beforeEach`, `beforeAll` etc. hooks.\n */",
"function",
"runDirectionalKeyTests",
"(",
"this",
")",
"{",
"it",
"(",
"'should set subsequent items as active when the next key is pressed'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 1 after one next key event.'",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 2 after two next key events.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should set first item active when the next key is pressed if no active item'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setActiveItem",
"(",
"-",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 0 after next key if active item was null.'",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should set previous items as active when the previous key is pressed'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 1 after one next key event.'",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 0 after one next and one previous key event.'",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should do nothing when the prev key is pressed if no active item and not wrap'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setActiveItem",
"(",
"-",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected nothing to happen if prev event occurs and no active item.'",
")",
".",
"toBe",
"(",
"-",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should skip disabled items'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"1",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to skip past disabled item on next event.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to skip past disabled item on up arrow.'",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should work normally when disabled property does not exist'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"0",
"]",
".",
"disabled",
"=",
"undefined",
";",
"items",
"[",
"1",
"]",
".",
"disabled",
"=",
"undefined",
";",
"items",
"[",
"2",
"]",
".",
"disabled",
"=",
"undefined",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 1 after one next event when disabled not set.'",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 2 after two next events when '",
"+",
"'disabled not set.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should not move active item past either end of the list'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected last item of the list to be active.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected active item to remain at the end of the list.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected active item to remain at the beginning of the list.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should not move active item to end when the last item is disabled'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"2",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected second item of the list to be active.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected the second item to remain active.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should prevent the default keyboard action of handled events'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"this",
".",
"nextKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"this",
".",
"nextKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"true",
")",
";",
"expect",
"(",
"this",
".",
"prevKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"this",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"this",
".",
"prevKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"true",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should not do anything for arrow keys if the alt key is held down'",
",",
"(",
")",
"=>",
"{",
"runModifierKeyTest",
"(",
"this",
",",
"'altKey'",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should not do anything for arrow keys if the control key is held down'",
",",
"(",
")",
"=>",
"{",
"runModifierKeyTest",
"(",
"this",
",",
"'ctrlKey'",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should not do anything for arrow keys if the meta key is held down'",
",",
"(",
")",
"=>",
"{",
"runModifierKeyTest",
"(",
"this",
",",
"'metaKey'",
")",
";",
"}",
")",
";",
"xit",
"(",
"'should not do anything for arrow keys if the shift key is held down'",
",",
"(",
")",
"=>",
"{",
"runModifierKeyTest",
"(",
"this",
",",
"'shiftKey'",
")",
";",
"}",
")",
";",
"}",
"/** Runs the test that asserts that we handle modifier keys correctly. */",
"function",
"runModifierKeyTest",
"(",
"context",
",",
"modifier",
")",
"{",
"const",
"initialActiveIndex",
"=",
"keyManager",
".",
"activeItemIndex",
";",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'change spy'",
")",
";",
"const",
"subscription",
"=",
"keyManager",
".",
"change",
".",
"subscribe",
"(",
"spy",
")",
";",
"expect",
"(",
"context",
".",
"nextKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"expect",
"(",
"context",
".",
"prevKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"Object",
".",
"defineProperty",
"(",
"context",
".",
"nextKeyEvent",
",",
"modifier",
",",
"{",
"get",
":",
"(",
")",
"=>",
"true",
"}",
")",
";",
"Object",
".",
"defineProperty",
"(",
"context",
".",
"prevKeyEvent",
",",
"modifier",
",",
"{",
"get",
":",
"(",
")",
"=>",
"true",
"}",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"context",
".",
"nextKeyEvent",
")",
";",
"expect",
"(",
"context",
".",
"nextKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"initialActiveIndex",
")",
";",
"expect",
"(",
"spy",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"context",
".",
"prevKeyEvent",
")",
";",
"expect",
"(",
"context",
".",
"prevKeyEvent",
".",
"defaultPrevented",
")",
".",
"toBe",
"(",
"false",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"initialActiveIndex",
")",
";",
"expect",
"(",
"spy",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"subscription",
".",
"unsubscribe",
"(",
")",
";",
"}",
"}",
")",
";",
"describe",
"(",
"'programmatic focus'",
",",
"(",
")",
"=>",
"{",
"it",
"(",
"'should setActiveItem()'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected activeItemIndex to be updated when setActiveItem() was called.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should be able to set the active item by reference'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected activeItemIndex to be updated.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should be able to set the active item without emitting an event'",
",",
"(",
")",
"=>",
"{",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'change spy'",
")",
";",
"const",
"subscription",
"=",
"keyManager",
".",
"change",
".",
"subscribe",
"(",
"spy",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"updateActiveItem",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"2",
")",
";",
"expect",
"(",
"spy",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"subscription",
".",
"unsubscribe",
"(",
")",
";",
"}",
")",
";",
"it",
"(",
"'should expose the active item correctly'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be the second option.'",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItem",
")",
".",
"withContext",
"(",
"'Expected the active item to match the second option.'",
")",
".",
"toBe",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be the third option.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItem",
")",
".",
"withContext",
"(",
"'Expected the active item ID to match the third option.'",
")",
".",
"toBe",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
")",
";",
"}",
")",
";",
"it",
"(",
"'should setFirstItemActive()'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected last item of the list to be active.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"keyManager",
".",
"setFirstItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected setFirstItemActive() to set the active item to the first item.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should set the active item to the second item if the first one is disabled'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"0",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"setFirstItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected the second item to be active if the first was disabled.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should setLastItemActive()'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"setLastItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected setLastItemActive() to set the active item to the last item.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should set the active item to the second to last item if the last is disabled'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"2",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"setLastItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected the second to last item to be active if the last was disabled.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should setNextItemActive()'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"setNextItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected setNextItemActive() to set the active item to the next item.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should set the active item to the next enabled item if next is disabled'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"1",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"setNextItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected setNextItemActive() to only set enabled items as active.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should setPreviousItemActive()'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected second item of the list to be active.`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"keyManager",
".",
"setPreviousItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected setPreviousItemActive() to set the active item to the previous.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should skip disabled items when setPreviousItemActive() is called'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"1",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected third item of the list to be active.`",
")",
".",
"toBe",
"(",
"2",
")",
";",
"keyManager",
".",
"setPreviousItemActive",
"(",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected setPreviousItemActive() to skip the disabled item.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should not emit an event if the item did not change'",
",",
"(",
")",
"=>",
"{",
"const",
"spy",
"=",
"jasmine",
".",
"createSpy",
"(",
"'change spy'",
")",
";",
"const",
"subscription",
"=",
"keyManager",
".",
"change",
".",
"subscribe",
"(",
"spy",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"2",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"2",
")",
";",
"expect",
"(",
"spy",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"subscription",
".",
"unsubscribe",
"(",
")",
";",
"}",
")",
";",
"}",
")",
";",
"describe",
"(",
"'wrap mode'",
",",
"(",
")",
"=>",
"{",
"it",
"(",
"'should return itself to allow chaining'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"withWrap",
"(",
")",
")",
".",
"withContext",
"(",
"`Expected withWrap() to return an instance of ListKeyManager.`",
")",
".",
"toEqual",
"(",
"keyManager",
")",
";",
"}",
")",
";",
"it",
"(",
"'should wrap focus when arrow keying past items while in wrap mode'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withWrap",
"(",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected last item to be active.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to wrap to beginning.'",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to wrap to end.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should set last item active when up arrow is pressed if no active item'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withWrap",
"(",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"-",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected last item to be active on up arrow if no active item.'",
")",
".",
"toBe",
"(",
"2",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"not",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"2",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"'Expected active item to be 0 after wrapping back to beginning.'",
")",
".",
"toBe",
"(",
"0",
")",
";",
"expect",
"(",
"keyManager",
".",
"setActiveItem",
")",
".",
"toHaveBeenCalledWith",
"(",
"0",
")",
";",
"}",
")",
";",
"it",
"(",
"'should not get into an infinite loop if all items are disabled'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withWrap",
"(",
")",
";",
"keyManager",
".",
"setActiveItem",
"(",
"0",
")",
";",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
".",
"forEach",
"(",
"(",
"item",
")",
"=>",
"item",
".",
"disabled",
"=",
"true",
")",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"}",
")",
";",
"it",
"(",
"'should be able to disable wrapping'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"withWrap",
"(",
")",
";",
"keyManager",
".",
"setFirstItemActive",
"(",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"itemList",
".",
"length",
"-",
"1",
")",
";",
"keyManager",
".",
"withWrap",
"(",
"false",
")",
";",
"keyManager",
".",
"setFirstItemActive",
"(",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"}",
")",
";",
"}",
")",
";",
"describe",
"(",
"'skip predicate'",
",",
"(",
")",
"=>",
"{",
"it",
"(",
"'should skip disabled items by default'",
",",
"(",
")",
"=>",
"{",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"1",
"]",
".",
"disabled",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"2",
")",
";",
"}",
")",
";",
"it",
"(",
"'should be able to skip items with a custom predicate'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"skipPredicate",
"(",
"(",
"item",
")",
"=>",
"item",
".",
"skipItem",
")",
";",
"const",
"items",
"=",
"itemList",
".",
"toArray",
"(",
")",
";",
"items",
"[",
"1",
"]",
".",
"skipItem",
"=",
"true",
";",
"itemList",
".",
"reset",
"(",
"items",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"toBe",
"(",
"2",
")",
";",
"}",
")",
";",
"}",
")",
";",
"}",
")",
";",
"describe",
"(",
"'FocusKeyManager'",
",",
"(",
")",
"=>",
"{",
"let",
"keyManager",
";",
"beforeEach",
"(",
"(",
")",
"=>",
"{",
"itemList",
".",
"reset",
"(",
"[",
"new",
"FakeFocusable",
"(",
")",
",",
"new",
"FakeFocusable",
"(",
")",
",",
"new",
"FakeFocusable",
"(",
")",
"]",
")",
";",
"keyManager",
"=",
"new",
"FocusKeyManager",
"<",
"FakeFocusable",
">",
"(",
"itemList",
")",
";",
"keyManager",
".",
"setFirstItemActive",
"(",
")",
";",
"spyOn",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"0",
"]",
",",
"'focus'",
")",
";",
"spyOn",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
",",
"'focus'",
")",
";",
"spyOn",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
",",
"'focus'",
")",
";",
"}",
")",
";",
"it",
"(",
"'should focus subsequent items when down arrow is pressed'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"0",
"]",
".",
"focus",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
".",
"focus",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"0",
"]",
".",
"focus",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should focus previous items when up arrow is pressed'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"0",
"]",
".",
"focus",
")",
".",
"not",
".",
"toHaveBeenCalled",
"(",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"0",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should allow setting the focused item without calling focus'",
",",
"(",
")",
"=>",
"{",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected first item of the list to be active.`",
")",
".",
"toBe",
"(",
"0",
")",
";",
"keyManager",
".",
"updateActiveItem",
"(",
"1",
")",
";",
"expect",
"(",
"keyManager",
".",
"activeItemIndex",
")",
".",
"withContext",
"(",
"`Expected activeItemIndex to update after calling updateActiveItem().`",
")",
".",
"toBe",
"(",
"1",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"not",
".",
"toHaveBeenCalledTimes",
"(",
"1",
")",
";",
"}",
")",
";",
"it",
"(",
"'should be able to set the focus origin'",
",",
"(",
")",
"=>",
"{",
"keyManager",
".",
"setFocusOrigin",
"(",
"'mouse'",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledWith",
"(",
"'mouse'",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"downArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"2",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledWith",
"(",
"'mouse'",
")",
";",
"keyManager",
".",
"setFocusOrigin",
"(",
"'keyboard'",
")",
";",
"keyManager",
".",
"onKeydown",
"(",
"fakeKeyEvents",
".",
"upArrow",
")",
";",
"expect",
"(",
"itemList",
".",
"toArray",
"(",
")",
"[",
"1",
"]",
".",
"focus",
")",
".",
"toHaveBeenCalledWith",
"(",
"'keyboard'",
")",
";",
"}",
")",
";",
"}",
")",
";",
"}",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
4,
null,
2189,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1892,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661788 | [
"import",
"{",
"inject",
",",
"InjectionToken",
",",
"LOCALE_ID",
"}",
"from",
"'@angular/core'",
";",
"import",
"{",
"Observable",
",",
"Subject",
"}",
"from",
"'rxjs'",
";",
"/** InjectionToken for datepicker that can be used to override default locale code. */",
"export",
"const",
"MC_DATE_LOCALE",
"=",
"new",
"InjectionToken",
"<",
"string",
">",
"(",
"'MC_DATE_LOCALE'",
",",
"{",
"providedIn",
":",
"'root'",
",",
"factory",
":",
"MC_DATE_LOCALE_FACTORY",
"}",
")",
";",
"docs-private",
"export",
"function",
"MC_DATE_LOCALE_FACTORY",
"(",
")",
"{",
"return",
"inject",
"(",
"LOCALE_ID",
")",
";",
"}",
"export",
"interface",
"DateAdapterConfig",
"{",
"variables",
":",
"{",
"[",
"name",
"]",
":",
"string",
";",
"}",
";",
"monthNames",
":",
"{",
"long",
":",
"string",
"[",
"]",
";",
"short",
":",
"{",
"standalone",
":",
"string",
"[",
"]",
";",
"formatted",
":",
"string",
"[",
"]",
";",
"}",
";",
"narrow",
":",
"string",
"[",
"]",
";",
"}",
";",
"dayOfWeekNames",
":",
"{",
"long",
":",
"string",
"[",
"]",
";",
"short",
":",
"string",
"[",
"]",
";",
"narrow",
":",
"string",
"[",
"]",
";",
"}",
";",
"firstDayOfWeek",
":",
"number",
";",
"}",
"/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */",
"export",
"abstract",
"class",
"DateAdapter",
"<",
"D",
">",
"{",
"config",
":",
"DateAdapterConfig",
";",
"/** The locale to use for all dates. */",
"protected",
"locale",
":",
"any",
";",
"/** A stream that emits when the locale changes. */",
"get",
"localeChanges",
"(",
")",
":",
"Observable",
"<",
"any",
">",
"{",
"return",
"this",
".",
"_localeChanges",
";",
"}",
"private",
"_localeChanges",
"=",
"new",
"Subject",
"<",
"void",
">",
"(",
")",
";",
"param",
"date",
"returns",
"abstract",
"getYear",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getMonth",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getDate",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getDayOfWeek",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getHours",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getMinutes",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getSeconds",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getMilliseconds",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"getTime",
"(",
"date",
")",
";",
"param",
"style",
"returns",
"abstract",
"getMonthNames",
"(",
"style",
")",
";",
"returns",
"abstract",
"getDateNames",
"(",
")",
";",
"param",
"style",
"returns",
"abstract",
"getDayOfWeekNames",
"(",
"style",
")",
";",
"param",
"date",
"returns",
"abstract",
"getYearName",
"(",
"date",
")",
";",
"returns",
"abstract",
"getFirstDayOfWeek",
"(",
")",
";",
"param",
"date",
"returns",
"abstract",
"getNumDaysInMonth",
"(",
"date",
")",
";",
"param",
"date",
"returns",
"abstract",
"clone",
"(",
"date",
")",
";",
"param",
"year",
"param",
"month",
"param",
"date",
"returns",
"abstract",
"createDate",
"(",
"year",
",",
"month",
"?",
",",
"date",
"?",
")",
";",
"param",
"year",
"param",
"month",
"param",
"date",
"param",
"hours",
"param",
"minutes",
"param",
"seconds",
"param",
"milliseconds",
"returns",
"abstract",
"createDateTime",
"(",
"year",
",",
"month",
",",
"date",
",",
"hours",
",",
"minutes",
",",
"seconds",
",",
"milliseconds",
")",
";",
"returns",
"abstract",
"today",
"(",
")",
";",
"param",
"value",
"param",
"parseFormat",
"returns",
"abstract",
"parse",
"(",
"value",
",",
"parseFormat",
")",
";",
"param",
"date",
"param",
"displayFormat",
"returns",
"abstract",
"format",
"(",
"date",
",",
"displayFormat",
")",
";",
"param",
"date",
"param",
"years",
"returns",
"abstract",
"addCalendarYears",
"(",
"date",
",",
"years",
")",
";",
"param",
"date",
"param",
"months",
"returns",
"abstract",
"addCalendarMonths",
"(",
"date",
",",
"months",
")",
";",
"param",
"date",
"param",
"days",
"returns",
"abstract",
"addCalendarDays",
"(",
"date",
",",
"days",
")",
";",
"param",
"date",
"returns",
"abstract",
"toIso8601",
"(",
"date",
")",
";",
"param",
"obj",
"returns",
"abstract",
"isDateInstance",
"(",
"obj",
")",
";",
"param",
"date",
"returns",
"abstract",
"isValid",
"(",
"date",
")",
";",
"returns",
"abstract",
"invalid",
"(",
")",
";",
"abstract",
"hasSame",
"(",
"startDate",
",",
"endDate",
",",
"unit",
")",
";",
"abstract",
"diffNow",
"(",
"date",
",",
"unit",
")",
";",
"param",
"value",
"returns",
"deserialize",
"(",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
"||",
"this",
".",
"isDateInstance",
"(",
"value",
")",
"&&",
"this",
".",
"isValid",
"(",
"value",
")",
")",
"{",
"return",
"value",
";",
"}",
"return",
"this",
".",
"invalid",
"(",
")",
";",
"}",
"param",
"locale",
"setLocale",
"(",
"locale",
")",
"{",
"this",
".",
"locale",
"=",
"locale",
";",
"this",
".",
"_localeChanges",
".",
"next",
"(",
")",
";",
"}",
"param",
"first",
"param",
"second",
"returns",
"compareDate",
"(",
"first",
",",
"second",
")",
"{",
"return",
"this",
".",
"getYear",
"(",
"first",
")",
"-",
"this",
".",
"getYear",
"(",
"second",
")",
"||",
"this",
".",
"getMonth",
"(",
"first",
")",
"-",
"this",
".",
"getMonth",
"(",
"second",
")",
"||",
"this",
".",
"getDate",
"(",
"first",
")",
"-",
"this",
".",
"getDate",
"(",
"second",
")",
";",
"}",
"param",
"first",
"param",
"second",
"returns",
"compareDateTime",
"(",
"first",
",",
"second",
")",
"{",
"return",
"this",
".",
"getYear",
"(",
"first",
")",
"-",
"this",
".",
"getYear",
"(",
"second",
")",
"||",
"this",
".",
"getMonth",
"(",
"first",
")",
"-",
"this",
".",
"getMonth",
"(",
"second",
")",
"||",
"this",
".",
"getDate",
"(",
"first",
")",
"-",
"this",
".",
"getDate",
"(",
"second",
")",
"||",
"this",
".",
"getHours",
"(",
"first",
")",
"-",
"this",
".",
"getHours",
"(",
"second",
")",
"||",
"this",
".",
"getMinutes",
"(",
"first",
")",
"-",
"this",
".",
"getMinutes",
"(",
"second",
")",
"||",
"this",
".",
"getSeconds",
"(",
"first",
")",
"-",
"this",
".",
"getSeconds",
"(",
"second",
")",
"||",
"this",
".",
"getMilliseconds",
"(",
"first",
")",
"-",
"this",
".",
"getMilliseconds",
"(",
"second",
")",
";",
"}",
"param",
"first",
"param",
"second",
"returns",
"sameDate",
"(",
"first",
",",
"second",
")",
"{",
"if",
"(",
"first",
"&&",
"second",
")",
"{",
"const",
"firstValid",
"=",
"this",
".",
"isValid",
"(",
"first",
")",
";",
"const",
"secondValid",
"=",
"this",
".",
"isValid",
"(",
"second",
")",
";",
"if",
"(",
"firstValid",
"&&",
"secondValid",
")",
"{",
"return",
"!",
"this",
".",
"compareDate",
"(",
"first",
",",
"second",
")",
";",
"}",
"return",
"firstValid",
"===",
"secondValid",
";",
"}",
"return",
"first",
"===",
"second",
";",
"}",
"param",
"date",
"param",
"min",
"param",
"max",
"returns",
"clampDate",
"(",
"date",
",",
"min",
"?",
",",
"max",
"?",
")",
"{",
"if",
"(",
"min",
"&&",
"this",
".",
"compareDate",
"(",
"date",
",",
"min",
")",
"<",
"0",
")",
"{",
"return",
"min",
";",
"}",
"if",
"(",
"max",
"&&",
"this",
".",
"compareDate",
"(",
"date",
",",
"max",
")",
">",
"0",
")",
"{",
"return",
"max",
";",
"}",
"return",
"date",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
5,
null,
2,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
5,
null,
2,
null,
null,
null,
null,
null,
null,
2,
null,
344,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
344,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
3,
null,
3,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
3,
null,
3,
null,
3,
null,
3,
null,
3,
null,
3,
null,
3,
null,
null,
null,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
344,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
344,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
344,
null,
3,
null,
null,
null,
null,
null,
null,
2,
null,
344,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
344,
null,
null,
null,
null,
344,
null,
null,
null,
null,
8,
null,
344,
null,
344,
null,
null,
null,
null,
null,
3,
null,
344,
null,
null,
null,
null,
null,
null,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
344,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
344,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
344,
null,
344,
null,
344,
null,
null,
344,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661789 | [
"import",
"{",
"InjectionToken",
"}",
"from",
"'@angular/core'",
";",
"export",
"interface",
"McDateFormats",
"{",
"dateInput",
":",
"any",
";",
"monthYearLabel",
":",
"any",
";",
"dateA11yLabel",
":",
"any",
";",
"monthYearA11yLabel",
":",
"any",
";",
"}",
"export",
"const",
"MC_DATE_FORMATS",
"=",
"new",
"InjectionToken",
"<",
"McDateFormats",
">",
"(",
"'mc-date-formats'",
")",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661790 | [
"import",
"*",
"as",
"fs",
"from",
"\"fs\"",
";",
"export",
"class",
"Row",
"{",
"constructor",
"(",
"public",
"values",
")",
"{",
"}",
"}",
"export",
"class",
"Table",
"{",
"private",
"static",
"padEnd",
"(",
"value",
",",
"size",
",",
"pad",
"=",
"\" \"",
")",
"{",
"while",
"(",
"value",
".",
"length",
"<",
"size",
")",
"{",
"value",
"+=",
"pad",
";",
"}",
"return",
"value",
";",
"}",
"private",
"static",
"writeRow",
"(",
"out",
",",
"values",
",",
"colSizes",
")",
"{",
"const",
"colValues",
"=",
"[",
"]",
";",
"for",
"(",
"let",
"ci",
"=",
"0",
";",
"ci",
"<",
"colSizes",
".",
"length",
";",
"++",
"ci",
")",
"{",
"const",
"cellTxt",
"=",
"values",
".",
"length",
">",
"ci",
"?",
"values",
"[",
"ci",
"]",
":",
"\"\"",
";",
"colValues",
".",
"push",
"(",
"Table",
".",
"padEnd",
"(",
"cellTxt",
",",
"colSizes",
"[",
"ci",
"]",
")",
")",
";",
"}",
"out",
".",
"write",
"(",
"\"| \"",
"+",
"colValues",
".",
"join",
"(",
"\" | \"",
")",
"+",
"\" |\\n\"",
")",
";",
"}",
"private",
"static",
"lineToString",
"(",
"colSizes",
")",
"{",
"const",
"colValues",
"=",
"colSizes",
".",
"map",
"(",
"size",
"=>",
"Table",
".",
"padEnd",
"(",
"\"-\"",
",",
"size",
",",
"\"-\"",
")",
")",
";",
"return",
"\"|-\"",
"+",
"colValues",
".",
"join",
"(",
"\"-|-\"",
")",
"+",
"\"-|\\n\"",
";",
"}",
"public",
"rows",
":",
"Row",
"[",
"]",
"=",
"[",
"]",
";",
"public",
"header",
"?",
":",
"Row",
";",
"public",
"writeTo",
"(",
"out",
")",
"{",
"const",
"colSizes",
"=",
"this",
".",
"calcColSizes",
"(",
")",
";",
"Table",
".",
"writeRow",
"(",
"out",
",",
"this",
".",
"header",
".",
"values",
",",
"colSizes",
")",
";",
"out",
".",
"write",
"(",
"Table",
".",
"lineToString",
"(",
"colSizes",
")",
")",
";",
"for",
"(",
"const",
"row",
"of",
"this",
".",
"rows",
")",
"{",
"Table",
".",
"writeRow",
"(",
"out",
",",
"row",
".",
"values",
",",
"colSizes",
")",
";",
"}",
"}",
"private",
"calcColSizes",
"(",
")",
"{",
"const",
"maxColSizes",
"=",
"[",
"]",
";",
"for",
"(",
"const",
"row",
"of",
"this",
".",
"rows",
".",
"concat",
"(",
"[",
"this",
".",
"header",
"]",
")",
")",
"{",
"for",
"(",
"let",
"ci",
"=",
"0",
";",
"ci",
"<",
"row",
".",
"values",
".",
"length",
";",
"++",
"ci",
")",
"{",
"if",
"(",
"ci",
"<",
"maxColSizes",
".",
"length",
")",
"{",
"maxColSizes",
"[",
"ci",
"]",
"=",
"Math",
".",
"max",
"(",
"maxColSizes",
"[",
"ci",
"]",
",",
"row",
".",
"values",
"[",
"ci",
"]",
".",
"length",
")",
";",
"}",
"else",
"{",
"maxColSizes",
".",
"push",
"(",
"row",
".",
"values",
"[",
"ci",
"]",
".",
"length",
")",
";",
"}",
"}",
"}",
"return",
"maxColSizes",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
3,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
8810,
null,
5,
null,
5,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
5,
null,
null,
null,
5,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
8810,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
392,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
392,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661791 | [
"export",
"type",
"TagType",
"=",
"'vorbis'",
"|",
"'ID3v1'",
"|",
"'ID3v2.2'",
"|",
"'ID3v2.3'",
"|",
"'ID3v2.4'",
"|",
"'APEv2'",
"|",
"'asf'",
"|",
"'iTunes'",
"|",
"'exif'",
"|",
"'matroska'",
";",
"export",
"interface",
"IGenericTag",
"{",
"id",
":",
"GenericTagId",
";",
"value",
":",
"any",
";",
"}",
"export",
"type",
"GenericTagId",
"=",
"'track'",
"|",
"'disk'",
"|",
"'year'",
"|",
"'title'",
"|",
"'artist'",
"|",
"'artists'",
"|",
"'albumartist'",
"|",
"'album'",
"|",
"'date'",
"|",
"'originaldate'",
"|",
"'originalyear'",
"|",
"'comment'",
"|",
"'genre'",
"|",
"'picture'",
"|",
"'composer'",
"|",
"'lyrics'",
"|",
"'albumsort'",
"|",
"'titlesort'",
"|",
"'work'",
"|",
"'artistsort'",
"|",
"'albumartistsort'",
"|",
"'composersort'",
"|",
"'lyricist'",
"|",
"'writer'",
"|",
"'conductor'",
"|",
"'remixer'",
"|",
"'arranger'",
"|",
"'engineer'",
"|",
"'technician'",
"|",
"'producer'",
"|",
"'djmixer'",
"|",
"'mixer'",
"|",
"'publisher'",
"|",
"'label'",
"|",
"'grouping'",
"|",
"'subtitle'",
"|",
"'discsubtitle'",
"|",
"'totaltracks'",
"|",
"'totaldiscs'",
"|",
"'compilation'",
"|",
"'rating'",
"|",
"'bpm'",
"|",
"'mood'",
"|",
"'media'",
"|",
"'catalognumber'",
"|",
"'tvShow'",
"|",
"'tvShowSort'",
"|",
"'tvEpisode'",
"|",
"'tvEpisodeId'",
"|",
"'tvNetwork'",
"|",
"'tvSeason'",
"|",
"'podcast'",
"|",
"'podcasturl'",
"|",
"'releasestatus'",
"|",
"'releasetype'",
"|",
"'releasecountry'",
"|",
"'script'",
"|",
"'language'",
"|",
"'copyright'",
"|",
"'license'",
"|",
"'encodedby'",
"|",
"'encodersettings'",
"|",
"'gapless'",
"|",
"'barcode'",
"|",
"'isrc'",
"|",
"'asin'",
"|",
"'musicbrainz_recordingid'",
"|",
"'musicbrainz_trackid'",
"|",
"'musicbrainz_albumid'",
"|",
"'musicbrainz_artistid'",
"|",
"'musicbrainz_albumartistid'",
"|",
"'musicbrainz_releasegroupid'",
"|",
"'musicbrainz_workid'",
"|",
"'musicbrainz_trmid'",
"|",
"'musicbrainz_discid'",
"|",
"'acoustid_id'",
"|",
"'acoustid_fingerprint'",
"|",
"'musicip_puid'",
"|",
"'musicip_fingerprint'",
"|",
"'website'",
"|",
"'performer:instrument'",
"|",
"'peakLevel'",
"|",
"'averageLevel'",
"|",
"'notes'",
"|",
"'key'",
"|",
"'originalalbum'",
"|",
"'originalartist'",
"|",
"'discogs_artist_id'",
"|",
"'discogs_label_id'",
"|",
"'discogs_master_release_id'",
"|",
"'discogs_rating'",
"|",
"'discogs_release_id'",
"|",
"'discogs_votes'",
"|",
"'replaygain_track_gain'",
"|",
"'replaygain_track_peak'",
"|",
"'replaygain_album_gain'",
"|",
"'replaygain_album_peak'",
"|",
"'replaygain_track_minmax'",
"|",
"'replaygain_album_minmax'",
"|",
"'replaygain_undo'",
"|",
"'description'",
"|",
"'longDescription'",
"|",
"'category'",
"|",
"'hdVideo'",
"|",
"'keywords'",
"|",
"'movement'",
"|",
"'movementIndex'",
"|",
"'movementTotal'",
"|",
"'podcastId'",
"|",
"'showMovement'",
"|",
"'stik'",
";",
"export",
"interface",
"INativeTagMap",
"{",
"[",
"index",
"]",
":",
"GenericTagId",
";",
"}",
"export",
"interface",
"ITagInfo",
"{",
"/**\n * True if result is an array\n */",
"multiple",
":",
"boolean",
";",
"/**\n * True if the result is an array and each value in the array should be unique\n */",
"unique",
"?",
":",
"boolean",
";",
"}",
"export",
"interface",
"ITagInfoMap",
"{",
"[",
"index",
"]",
":",
"ITagInfo",
";",
"}",
"export",
"const",
"commonTags",
"=",
"{",
"year",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"track",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"disk",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"title",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"artist",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"artists",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"albumartist",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"album",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"date",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"originaldate",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"originalyear",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"comment",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"false",
"}",
",",
"genre",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"picture",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"composer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"lyrics",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"false",
"}",
",",
"albumsort",
":",
"{",
"multiple",
":",
"false",
",",
"unique",
":",
"true",
"}",
",",
"titlesort",
":",
"{",
"multiple",
":",
"false",
",",
"unique",
":",
"true",
"}",
",",
"work",
":",
"{",
"multiple",
":",
"false",
",",
"unique",
":",
"true",
"}",
",",
"artistsort",
":",
"{",
"multiple",
":",
"false",
",",
"unique",
":",
"true",
"}",
",",
"albumartistsort",
":",
"{",
"multiple",
":",
"false",
",",
"unique",
":",
"true",
"}",
",",
"composersort",
":",
"{",
"multiple",
":",
"false",
",",
"unique",
":",
"true",
"}",
",",
"lyricist",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"writer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"conductor",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"remixer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"arranger",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"engineer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"producer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"technician",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"djmixer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"mixer",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"label",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"grouping",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"subtitle",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"discsubtitle",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"totaltracks",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"totaldiscs",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"compilation",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"rating",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"bpm",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"mood",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"media",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"catalognumber",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"tvShow",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"tvShowSort",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"tvSeason",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"tvEpisode",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"tvEpisodeId",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"tvNetwork",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"podcast",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"podcasturl",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"releasestatus",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"releasetype",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"releasecountry",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"script",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"language",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"copyright",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"license",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"encodedby",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"encodersettings",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"gapless",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"barcode",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"isrc",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"asin",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_recordingid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_trackid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_albumid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_artistid",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"musicbrainz_albumartistid",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"musicbrainz_releasegroupid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_workid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_trmid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicbrainz_discid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"acoustid_id",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"acoustid_fingerprint",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicip_puid",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"musicip_fingerprint",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"website",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"'performer:instrument'",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"averageLevel",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"peakLevel",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"notes",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"false",
"}",
",",
"key",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"originalalbum",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"originalartist",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"discogs_artist_id",
":",
"{",
"multiple",
":",
"true",
",",
"unique",
":",
"true",
"}",
",",
"discogs_release_id",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"discogs_label_id",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"discogs_master_release_id",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"discogs_votes",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"discogs_rating",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_track_peak",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_track_gain",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_album_peak",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_album_gain",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_track_minmax",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_album_minmax",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"replaygain_undo",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"description",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"longDescription",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"category",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"hdVideo",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"keywords",
":",
"{",
"multiple",
":",
"true",
"}",
",",
"movement",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"movementIndex",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"movementTotal",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"podcastId",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"showMovement",
":",
"{",
"multiple",
":",
"false",
"}",
",",
"stik",
":",
"{",
"multiple",
":",
"false",
"}",
"}",
";",
"param",
"alias",
"returns",
"{",
"boolean",
"|",
"*",
"}",
"export",
"function",
"isSingleton",
"(",
"alias",
")",
"{",
"return",
"commonTags",
".",
"hasOwnProperty",
"(",
"alias",
")",
"&&",
"!",
"commonTags",
"[",
"alias",
"]",
".",
"multiple",
";",
"}",
"param",
"alias",
"returns",
"{",
"boolean",
"|",
"*",
"}",
"export",
"function",
"isUnique",
"(",
"alias",
")",
"{",
"return",
"!",
"commonTags",
"[",
"alias",
"]",
".",
"multiple",
"||",
"commonTags",
"[",
"alias",
"]",
".",
"unique",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
27129,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
27129,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661792 | [
"import",
"{",
"IRatio",
"}",
"from",
"'../type'",
";",
"export",
"type",
"StringEncoding",
"=",
"'ascii'",
"|",
"'utf8'",
"|",
"'utf16le'",
"|",
"'ucs2'",
"|",
"'base64url'",
"|",
"'latin1'",
"|",
"'hex'",
";",
"export",
"function",
"getBit",
"(",
"buf",
",",
"off",
",",
"bit",
")",
"{",
"return",
"(",
"buf",
"[",
"off",
"]",
"&",
"(",
"1",
"<<",
"bit",
")",
")",
"!==",
"0",
";",
"}",
"param",
"uint8Array",
"param",
"start",
"param",
"end",
"param",
"encoding",
"return",
"export",
"function",
"findZero",
"(",
"uint8Array",
",",
"start",
",",
"end",
",",
"encoding",
"?",
")",
"{",
"let",
"i",
"=",
"start",
";",
"if",
"(",
"encoding",
"===",
"'utf16le'",
")",
"{",
"while",
"(",
"uint8Array",
"[",
"i",
"]",
"!==",
"0",
"||",
"uint8Array",
"[",
"i",
"+",
"1",
"]",
"!==",
"0",
")",
"{",
"if",
"(",
"i",
">=",
"end",
")",
"return",
"end",
";",
"i",
"+=",
"2",
";",
"}",
"return",
"i",
";",
"}",
"else",
"{",
"while",
"(",
"uint8Array",
"[",
"i",
"]",
"!==",
"0",
")",
"{",
"if",
"(",
"i",
">=",
"end",
")",
"return",
"end",
";",
"i",
"++",
";",
"}",
"return",
"i",
";",
"}",
"}",
"export",
"function",
"trimRightNull",
"(",
"x",
")",
"{",
"const",
"pos0",
"=",
"x",
".",
"indexOf",
"(",
"'\\0'",
")",
";",
"return",
"pos0",
"===",
"-",
"1",
"?",
"x",
":",
"x",
".",
"substr",
"(",
"0",
",",
"pos0",
")",
";",
"}",
"function",
"swapBytes",
"<",
"T",
"extends",
"Uint8Array",
">",
"(",
"uint8Array",
")",
"{",
"const",
"l",
"=",
"uint8Array",
".",
"length",
";",
"if",
"(",
"(",
"l",
"&",
"1",
")",
"!==",
"0",
")",
"throw",
"new",
"Error",
"(",
"'Buffer length must be even'",
")",
";",
"for",
"(",
"let",
"i",
"=",
"0",
";",
"i",
"<",
"l",
";",
"i",
"+=",
"2",
")",
"{",
"const",
"a",
"=",
"uint8Array",
"[",
"i",
"]",
";",
"uint8Array",
"[",
"i",
"]",
"=",
"uint8Array",
"[",
"i",
"+",
"1",
"]",
";",
"uint8Array",
"[",
"i",
"+",
"1",
"]",
"=",
"a",
";",
"}",
"return",
"uint8Array",
";",
"}",
"param",
"buffer",
"param",
"encoding",
"return",
"{",
"string",
"}",
"export",
"function",
"decodeString",
"(",
"buffer",
",",
"encoding",
")",
"{",
"let",
"offset",
"=",
"0",
";",
"if",
"(",
"buffer",
"[",
"0",
"]",
"===",
"0xFF",
"&&",
"buffer",
"[",
"1",
"]",
"===",
"0xFE",
")",
"{",
"if",
"(",
"encoding",
"===",
"'utf16le'",
")",
"{",
"offset",
"=",
"2",
";",
"}",
"else",
"if",
"(",
"buffer",
"[",
"2",
"]",
"===",
"0xFE",
"&&",
"buffer",
"[",
"3",
"]",
"===",
"0xFF",
")",
"{",
"offset",
"=",
"2",
";",
"}",
"}",
"else",
"if",
"(",
"encoding",
"===",
"'utf16le'",
"&&",
"buffer",
"[",
"0",
"]",
"===",
"0xFE",
"&&",
"buffer",
"[",
"1",
"]",
"===",
"0xFF",
")",
"{",
"return",
"decodeString",
"(",
"swapBytes",
"(",
"buffer",
")",
",",
"encoding",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
"encoding",
",",
"offset",
")",
";",
"}",
"export",
"function",
"stripNulls",
"(",
"str",
")",
"{",
"str",
"=",
"str",
".",
"replace",
"(",
"/^\\x00+/g",
",",
"''",
")",
";",
"str",
"=",
"str",
".",
"replace",
"(",
"/\\x00+$/g",
",",
"''",
")",
";",
"return",
"str",
";",
"}",
"param",
"buf",
"param",
"byteOffset",
"param",
"bitOffset",
"param",
"len",
"return",
"{",
"number",
"}",
"export",
"function",
"getBitAllignedNumber",
"(",
"buf",
",",
"byteOffset",
",",
"bitOffset",
",",
"len",
")",
"{",
"const",
"byteOff",
"=",
"byteOffset",
"+",
"~",
"~",
"(",
"bitOffset",
"/",
"8",
")",
";",
"const",
"bitOff",
"=",
"bitOffset",
"%",
"8",
";",
"let",
"value",
"=",
"buf",
"[",
"byteOff",
"]",
";",
"value",
"&=",
"0xff",
">>",
"bitOff",
";",
"const",
"bitsRead",
"=",
"8",
"-",
"bitOff",
";",
"const",
"bitsLeft",
"=",
"len",
"-",
"bitsRead",
";",
"if",
"(",
"bitsLeft",
"<",
"0",
")",
"{",
"value",
">>=",
"(",
"8",
"-",
"bitOff",
"-",
"len",
")",
";",
"}",
"else",
"if",
"(",
"bitsLeft",
">",
"0",
")",
"{",
"value",
"<<=",
"bitsLeft",
";",
"value",
"|=",
"getBitAllignedNumber",
"(",
"buf",
",",
"byteOffset",
",",
"bitOffset",
"+",
"bitsRead",
",",
"bitsLeft",
")",
";",
"}",
"return",
"value",
";",
"}",
"param",
"buf",
"param",
"byteOffset",
"param",
"bitOffset",
"return",
"{",
"number",
"}",
"export",
"function",
"isBitSet",
"(",
"buf",
",",
"byteOffset",
",",
"bitOffset",
")",
"{",
"return",
"getBitAllignedNumber",
"(",
"buf",
",",
"byteOffset",
",",
"bitOffset",
",",
"1",
")",
"===",
"1",
";",
"}",
"export",
"function",
"a2hex",
"(",
"str",
")",
"{",
"const",
"arr",
"=",
"[",
"]",
";",
"for",
"(",
"let",
"i",
"=",
"0",
",",
"l",
"=",
"str",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"{",
"const",
"hex",
"=",
"Number",
"(",
"str",
".",
"charCodeAt",
"(",
"i",
")",
")",
".",
"toString",
"(",
"16",
")",
";",
"arr",
".",
"push",
"(",
"hex",
".",
"length",
"===",
"1",
"?",
"'0'",
"+",
"hex",
":",
"hex",
")",
";",
"}",
"return",
"arr",
".",
"join",
"(",
"' '",
")",
";",
"}",
"/**\n * Convert power ratio to DB\n * ratio: [0..1]\n */",
"export",
"function",
"ratioToDb",
"(",
"ratio",
")",
"{",
"return",
"10",
"*",
"Math",
".",
"log10",
"(",
"ratio",
")",
";",
"}",
"/**\n * Convert dB to ratio\n * db Decibels\n */",
"export",
"function",
"dbToRatio",
"(",
"dB",
")",
"{",
"return",
"Math",
".",
"pow",
"(",
"10",
",",
"dB",
"/",
"10",
")",
";",
"}",
"param",
"value",
"export",
"function",
"toRatio",
"(",
"value",
")",
"{",
"const",
"ps",
"=",
"value",
".",
"split",
"(",
"' '",
")",
".",
"map",
"(",
"p",
"=>",
"p",
".",
"trim",
"(",
")",
".",
"toLowerCase",
"(",
")",
")",
";",
"if",
"(",
"ps",
".",
"length",
">=",
"1",
")",
"{",
"const",
"v",
"=",
"parseFloat",
"(",
"ps",
"[",
"0",
"]",
")",
";",
"if",
"(",
"ps",
".",
"length",
"===",
"2",
"&&",
"ps",
"[",
"1",
"]",
"===",
"'db'",
")",
"{",
"return",
"{",
"dB",
":",
"v",
",",
"ratio",
":",
"dbToRatio",
"(",
"v",
")",
"}",
";",
"}",
"else",
"{",
"return",
"{",
"dB",
":",
"ratioToDb",
"(",
"v",
")",
",",
"ratio",
":",
"v",
"}",
";",
"}",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
29,
null,
3,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
29,
null,
3,
null,
3,
null,
27130,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
null,
null,
null,
11,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
12,
null,
27130,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
29,
null,
3,
null,
3,
null,
3,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
29,
null,
3,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
2,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
2,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661793 | [
"import",
"*",
"as",
"util",
"from",
"'./Util'",
";",
"import",
"{",
"IToken",
"}",
"from",
"'strtok3/lib/core'",
";",
"const",
"validFourCC",
"=",
"/^[\\x21-\\x7e©][\\x20-\\x7e\\x00()]{3}/",
";",
"/**\n * Token for read FourCC\n * Ref: https://en.wikipedia.org/wiki/FourCC\n */",
"export",
"const",
"FourCcToken",
"=",
"{",
"len",
":",
"4",
",",
"get",
":",
"(",
"buf",
",",
"off",
")",
":",
"string",
"=>",
"{",
"const",
"id",
"=",
"buf",
".",
"toString",
"(",
"'binary'",
",",
"off",
",",
"off",
"+",
"FourCcToken",
".",
"len",
")",
";",
"switch",
"(",
"id",
")",
"{",
"default",
":",
"if",
"(",
"!",
"id",
".",
"match",
"(",
"validFourCC",
")",
")",
"{",
"throw",
"new",
"Error",
"(",
"`FourCC contains invalid characters: ${",
"util",
".",
"a2hex",
"(",
"id",
")",
"} \"${",
"id",
"}\"`",
")",
";",
"}",
"}",
"return",
"id",
";",
"}",
",",
"put",
":",
"(",
"buffer",
",",
"offset",
",",
"id",
")",
"=>",
"{",
"const",
"str",
"=",
"Buffer",
".",
"from",
"(",
"id",
",",
"'binary'",
")",
";",
"if",
"(",
"str",
".",
"length",
"!==",
"4",
")",
"throw",
"new",
"Error",
"(",
"'Invalid length'",
")",
";",
"return",
"str",
".",
"copy",
"(",
"buffer",
",",
"offset",
")",
";",
"}",
"}",
";"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
27,
null,
null,
null,
null,
null,
null,
298,
null,
null,
null,
null,
null,
null,
null,
null,
null,
12,
null,
3,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
12,
null,
3,
null,
2,
null,
null,
null,
null,
12,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661794 | [
"import",
"*",
"as",
"Token",
"from",
"'token-types'",
";",
"import",
"{",
"IGetToken",
"}",
"from",
"'strtok3/lib/core'",
";",
"import",
"{",
"FourCcToken",
"}",
"from",
"'../common/FourCC'",
";",
"/**\n * APETag versionIndex history / supported formats\n *\n * 1.0 (1000) - Original APE tag spec. Fully supported by this code.\n * 2.0 (2000) - Refined APE tag spec (better streaming support, UTF StringEncoding). Fully supported by this code.\n *\n * Notes:\n * - also supports reading of ID3v1.1 tags\n * - all saving done in the APE Tag format using CURRENT_APE_TAG_VERSION\n *\n * APE File Format Overview: (pieces in order -- only valid for the latest versionIndex APE files)\n *\n * JUNK - any amount of \"junk\" before the APE_DESCRIPTOR (so people that put ID3v2 tags on the files aren't hosed)\n * APE_DESCRIPTOR - defines the sizes (and offsets) of all the pieces, as well as the MD5 checksum\n * APE_HEADER - describes all of the necessary information about the APE file\n * SEEK TABLE - the table that represents seek offsets [optional]\n * HEADER DATA - the pre-audio data from the original file [optional]\n * APE FRAMES - the actual compressed audio (broken into frames for seekability)\n * TERMINATING DATA - the post-audio data from the original file [optional]\n * TAG - describes all the properties of the file [optional]\n */",
"export",
"interface",
"IDescriptor",
"{",
"ID",
":",
"string",
";",
"version",
":",
"number",
";",
"descriptorBytes",
":",
"number",
";",
"headerBytes",
":",
"number",
";",
"seekTableBytes",
":",
"number",
";",
"headerDataBytes",
":",
"number",
";",
"apeFrameDataBytes",
":",
"number",
";",
"apeFrameDataBytesHigh",
":",
"number",
";",
"terminatingDataBytes",
":",
"number",
";",
"fileMD5",
":",
"Uint8Array",
";",
"}",
"/**\n * APE_HEADER: describes all of the necessary information about the APE file\n */",
"export",
"interface",
"IHeader",
"{",
"compressionLevel",
":",
"number",
";",
"formatFlags",
":",
"number",
";",
"blocksPerFrame",
":",
"number",
";",
"finalFrameBlocks",
":",
"number",
";",
"totalFrames",
":",
"number",
";",
"bitsPerSample",
":",
"number",
";",
"channel",
":",
"number",
";",
"sampleRate",
":",
"number",
";",
"}",
"export",
"interface",
"IFooter",
"{",
"ID",
":",
"string",
";",
"version",
":",
"number",
";",
"size",
":",
"number",
";",
"fields",
":",
"number",
";",
"flags",
":",
"ITagFlags",
";",
"}",
"export",
"enum",
"DataType",
"{",
"text_utf8",
"=",
"0",
",",
"binary",
"=",
"1",
",",
"external_info",
"=",
"2",
",",
"reserved",
"=",
"3",
"}",
"/**\n * APE_DESCRIPTOR: defines the sizes (and offsets) of all the pieces, as well as the MD5 checksum\n */",
"export",
"const",
"DescriptorParser",
"=",
"{",
"len",
":",
"52",
",",
"get",
":",
"(",
"buf",
",",
"off",
")",
"=>",
"{",
"return",
"{",
"ID",
":",
"FourCcToken",
".",
"get",
"(",
"buf",
",",
"off",
")",
",",
"version",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"4",
")",
"/",
"1000",
",",
"descriptorBytes",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"8",
")",
",",
"headerBytes",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"12",
")",
",",
"seekTableBytes",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"16",
")",
",",
"headerDataBytes",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"20",
")",
",",
"apeFrameDataBytes",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"24",
")",
",",
"apeFrameDataBytesHigh",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"28",
")",
",",
"terminatingDataBytes",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"32",
")",
",",
"fileMD5",
":",
"new",
"Token",
".",
"Uint8ArrayType",
"(",
"16",
")",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"36",
")",
"}",
";",
"}",
"}",
";",
"/**\n * APE_HEADER: describes all of the necessary information about the APE file\n */",
"export",
"const",
"Header",
"=",
"{",
"len",
":",
"24",
",",
"get",
":",
"(",
"buf",
",",
"off",
")",
"=>",
"{",
"return",
"{",
"compressionLevel",
":",
"Token",
".",
"UINT16_LE",
".",
"get",
"(",
"buf",
",",
"off",
")",
",",
"formatFlags",
":",
"Token",
".",
"UINT16_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"2",
")",
",",
"blocksPerFrame",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"4",
")",
",",
"finalFrameBlocks",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"8",
")",
",",
"totalFrames",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"12",
")",
",",
"bitsPerSample",
":",
"Token",
".",
"UINT16_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"16",
")",
",",
"channel",
":",
"Token",
".",
"UINT16_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"18",
")",
",",
"sampleRate",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"20",
")",
"}",
";",
"}",
"}",
";",
"/**\n * APE Tag Header/Footer Version 2.0\n * TAG: describes all the properties of the file [optional]\n */",
"export",
"const",
"TagFooter",
"=",
"{",
"len",
":",
"32",
",",
"get",
":",
"(",
"buf",
",",
"off",
")",
"=>",
"{",
"return",
"{",
"ID",
":",
"new",
"Token",
".",
"StringType",
"(",
"8",
",",
"'ascii'",
")",
".",
"get",
"(",
"buf",
",",
"off",
")",
",",
"version",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"8",
")",
",",
"size",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"12",
")",
",",
"fields",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"16",
")",
",",
"flags",
":",
"parseTagFlags",
"(",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"20",
")",
")",
"}",
";",
"}",
"}",
";",
"/**\n * APE Tag v2.0 Item Header\n */",
"export",
"interface",
"ITagItemHeader",
"{",
"size",
":",
"number",
";",
"flags",
":",
"ITagFlags",
";",
"}",
"/**\n * APE Tag v2.0 Item Header\n */",
"export",
"const",
"TagItemHeader",
"=",
"{",
"len",
":",
"8",
",",
"get",
":",
"(",
"buf",
",",
"off",
")",
"=>",
"{",
"return",
"{",
"size",
":",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
")",
",",
"flags",
":",
"parseTagFlags",
"(",
"Token",
".",
"UINT32_LE",
".",
"get",
"(",
"buf",
",",
"off",
"+",
"4",
")",
")",
"}",
";",
"}",
"}",
";",
"export",
"const",
"TagField",
"=",
"footer",
"=>",
"{",
"return",
"new",
"Token",
".",
"Uint8ArrayType",
"(",
"footer",
".",
"size",
"-",
"TagFooter",
".",
"len",
")",
";",
"}",
";",
"export",
"interface",
"ITagFlags",
"{",
"containsHeader",
":",
"boolean",
";",
"containsFooter",
":",
"boolean",
";",
"isHeader",
":",
"boolean",
";",
"readOnly",
":",
"boolean",
";",
"dataType",
":",
"DataType",
";",
"}",
"export",
"function",
"parseTagFlags",
"(",
"flags",
")",
"{",
"return",
"{",
"containsHeader",
":",
"isBitSet",
"(",
"flags",
",",
"31",
")",
",",
"containsFooter",
":",
"isBitSet",
"(",
"flags",
",",
"30",
")",
",",
"isHeader",
":",
"isBitSet",
"(",
"flags",
",",
"31",
")",
",",
"readOnly",
":",
"isBitSet",
"(",
"flags",
",",
"0",
")",
",",
"dataType",
":",
"(",
"flags",
"&",
"6",
")",
">>",
"1",
"}",
";",
"}",
"param",
"num",
"{",
"number",
"}",
"param",
"bit",
"return",
"{",
"boolean",
"}",
"export",
"function",
"isBitSet",
"(",
"num",
",",
"bit",
")",
"{",
"return",
"(",
"num",
"&",
"1",
"<<",
"bit",
")",
"!==",
"0",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2519,
null,
null,
null,
null,
null,
null,
null,
null,
null,
29,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2519,
null,
null,
null,
null,
null,
null,
null,
null,
null,
29,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2519,
null,
null,
null,
null,
null,
null,
null,
null,
null,
12,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2519,
null,
null,
null,
null,
null,
null,
null,
null,
null,
29,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661795 | [
"import",
"{",
"GenericTagId",
",",
"TagType",
"}",
"from",
"'./common/GenericTagTypes'",
";",
"import",
"{",
"IFooter",
"}",
"from",
"'./apev2/APEv2Token'",
";",
"/**\n * Attached picture, typically used for cover art\n */",
"export",
"interface",
"IPicture",
"{",
"/**\n * Image mime type\n */",
"format",
":",
"string",
";",
"/**\n * Image data\n */",
"data",
":",
"Buffer",
";",
"/**\n * Optional description\n */",
"description",
"?",
":",
"string",
";",
"/**\n * Picture type\n */",
"type",
"?",
":",
"string",
";",
"/**\n * File name\n */",
"name",
"?",
":",
"string",
";",
"}",
"/**\n * Abstract interface to access rating information\n */",
"export",
"interface",
"IRating",
"{",
"/**\n * Rating source, could be an e-mail address\n */",
"source",
"?",
":",
"string",
";",
"/**\n * Rating [0..1]\n */",
"rating",
":",
"number",
";",
"}",
"export",
"interface",
"ICommonTagsResult",
"{",
"track",
":",
"{",
"no",
":",
"number",
"|",
"null",
";",
"of",
":",
"number",
"|",
"null",
";",
"}",
";",
"disk",
":",
"{",
"no",
":",
"number",
"|",
"null",
";",
"of",
":",
"number",
"|",
"null",
";",
"}",
";",
"/**\n * Release year\n */",
"year",
"?",
":",
"number",
";",
"/**\n * Track title\n */",
"title",
"?",
":",
"string",
";",
"/**\n * Track, maybe several artists written in a single string.\n */",
"artist",
"?",
":",
"string",
";",
"/**\n * Track artists, aims to capture every artist in a different string.\n */",
"artists",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Track album artists\n */",
"albumartist",
"?",
":",
"string",
";",
"/**\n * Album title\n */",
"album",
"?",
":",
"string",
";",
"/**\n * Release data\n */",
"date",
"?",
":",
"string",
";",
"/**\n * Original release date\n */",
"originaldate",
"?",
":",
"string",
";",
"/**\n * Original release yeat\n */",
"originalyear",
"?",
":",
"number",
";",
"/**\n * List of comments\n */",
"comment",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Genre\n */",
"genre",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Embedded album art\n */",
"picture",
"?",
":",
"IPicture",
"[",
"]",
";",
"/**\n * Track composer\n */",
"composer",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Lyrics\n */",
"lyrics",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Album title, formatted for alphabetic ordering\n */",
"albumsort",
"?",
":",
"string",
";",
"/**\n * Track title, formatted for alphabetic ordering\n */",
"titlesort",
"?",
":",
"string",
";",
"/**\n * The canonical title of the work\n */",
"work",
"?",
":",
"string",
";",
"/**\n * Track artist, formatted for alphabetic ordering\n */",
"artistsort",
"?",
":",
"string",
";",
"/**\n * Album artist, formatted for alphabetic ordering\n */",
"albumartistsort",
"?",
":",
"string",
";",
"/**\n * Composer, formatted for alphabetic ordering\n */",
"composersort",
"?",
":",
"string",
";",
"/**\n * Lyricist(s)\n */",
"lyricist",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Writer(s)\n */",
"writer",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Conductor(s)\n */",
"conductor",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Remixer(s)\n */",
"remixer",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Arranger(s)\n */",
"arranger",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Engineer(s)\n */",
"engineer",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Producer(s)\n */",
"producer",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Mix-DJ(s)\n */",
"djmixer",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Mixed by\n */",
"mixer",
"?",
":",
"string",
"[",
"]",
";",
"technician",
"?",
":",
"string",
"[",
"]",
";",
"label",
"?",
":",
"string",
"[",
"]",
";",
"grouping",
"?",
":",
"string",
";",
"subtitle",
"?",
":",
"string",
"[",
"]",
";",
"description",
"?",
":",
"string",
"[",
"]",
";",
"longDescription",
"?",
":",
"string",
";",
"discsubtitle",
"?",
":",
"string",
"[",
"]",
";",
"totaltracks",
"?",
":",
"string",
";",
"totaldiscs",
"?",
":",
"string",
";",
"movementTotal",
"?",
":",
"number",
";",
"compilation",
"?",
":",
"boolean",
";",
"rating",
"?",
":",
"IRating",
"[",
"]",
";",
"bpm",
"?",
":",
"number",
";",
"/**\n * Keywords to reflect the mood of the audio, e.g. 'Romantic' or 'Sad'\n */",
"mood",
"?",
":",
"string",
";",
"/**\n * Release format, e.g. 'CD'\n */",
"media",
"?",
":",
"string",
";",
"/**\n * Release catalog number(s)\n */",
"catalognumber",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * TV show title\n */",
"tvShow",
"?",
":",
"string",
";",
"/**\n * TV show title, formatted for alphabetic ordering\n */",
"tvShowSort",
"?",
":",
"string",
";",
"/**\n * TV season title sequence number\n */",
"tvSeason",
"?",
":",
"number",
";",
"/**\n * TV Episode sequence number\n */",
"tvEpisode",
"?",
":",
"number",
";",
"/**\n * TV episode ID\n */",
"tvEpisodeId",
"?",
":",
"string",
";",
"/**\n * TV network\n */",
"tvNetwork",
"?",
":",
"string",
";",
"podcast",
"?",
":",
"boolean",
";",
"podcasturl",
"?",
":",
"string",
";",
"releasestatus",
"?",
":",
"string",
";",
"releasetype",
"?",
":",
"string",
"[",
"]",
";",
"releasecountry",
"?",
":",
"string",
";",
"script",
"?",
":",
"string",
";",
"language",
"?",
":",
"string",
";",
"copyright",
"?",
":",
"string",
";",
"license",
"?",
":",
"string",
";",
"encodedby",
"?",
":",
"string",
";",
"encodersettings",
"?",
":",
"string",
";",
"gapless",
"?",
":",
"boolean",
";",
"barcode",
"?",
":",
"string",
";",
"isrc",
"?",
":",
"string",
"[",
"]",
";",
"asin",
"?",
":",
"string",
";",
"musicbrainz_recordingid",
"?",
":",
"string",
";",
"musicbrainz_trackid",
"?",
":",
"string",
";",
"musicbrainz_albumid",
"?",
":",
"string",
";",
"musicbrainz_artistid",
"?",
":",
"string",
"[",
"]",
";",
"musicbrainz_albumartistid",
"?",
":",
"string",
"[",
"]",
";",
"musicbrainz_releasegroupid",
"?",
":",
"string",
";",
"musicbrainz_workid",
"?",
":",
"string",
";",
"musicbrainz_trmid",
"?",
":",
"string",
";",
"musicbrainz_discid",
"?",
":",
"string",
";",
"acoustid_id",
"?",
":",
"string",
";",
"acoustid_fingerprint",
"?",
":",
"string",
";",
"musicip_puid",
"?",
":",
"string",
";",
"musicip_fingerprint",
"?",
":",
"string",
";",
"website",
"?",
":",
"string",
";",
"'performer:instrument'",
"?",
":",
"string",
"[",
"]",
";",
"averageLevel",
"?",
":",
"number",
";",
"peakLevel",
"?",
":",
"number",
";",
"notes",
"?",
":",
"string",
"[",
"]",
";",
"originalalbum",
"?",
":",
"string",
";",
"originalartist",
"?",
":",
"string",
";",
"discogs_artist_id",
"?",
":",
"number",
"[",
"]",
";",
"discogs_release_id",
"?",
":",
"number",
";",
"discogs_label_id",
"?",
":",
"number",
";",
"discogs_master_release_id",
"?",
":",
"number",
";",
"discogs_votes",
"?",
":",
"number",
";",
"discogs_rating",
"?",
":",
"number",
";",
"/**\n * Track gain ratio [0..1]\n */",
"replaygain_track_gain_ratio",
"?",
":",
"number",
";",
"/**\n * Track peak ratio [0..1]\n */",
"replaygain_track_peak_ratio",
"?",
":",
"number",
";",
"/**\n * Track gain ratio\n */",
"replaygain_track_gain",
"?",
":",
"IRatio",
";",
"/**\n * Track peak ratio\n */",
"replaygain_track_peak",
"?",
":",
"IRatio",
";",
"/**\n * Album gain ratio\n */",
"replaygain_album_gain",
"?",
":",
"IRatio",
";",
"/**\n * Album peak ratio\n */",
"replaygain_album_peak",
"?",
":",
"IRatio",
";",
"/**\n * minimum & maximum global gain values across a set of files scanned as an album\n */",
"replaygain_undo",
"?",
":",
"{",
"leftChannel",
":",
"number",
";",
"rightChannel",
":",
"number",
";",
"}",
";",
"/**\n * minimum & maximum global gain values across a set of files scanned as an album\n */",
"replaygain_track_minmax",
"?",
":",
"number",
"[",
"]",
";",
"/**\n * The initial key of the music in the file, e.g. \"A Minor\".\n * Ref: https://docs.microsoft.com/en-us/windows/win32/wmformat/wm-initialkey\n */",
"key",
"?",
":",
"string",
";",
"/**\n * Podcast Category\n */",
"category",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * iTunes Video Quality\n *\n * 2: Full HD\n * 1: HD\n * 0: SD\n */",
"hdVideo",
"?",
":",
"number",
";",
"/**\n * Podcast Keywords\n */",
"keywords",
"?",
":",
"string",
"[",
"]",
";",
"/**\n * Movement\n */",
"movement",
"?",
":",
"string",
";",
"/**\n * Movement Index/Total\n */",
"movementIndex",
":",
"{",
"no",
"?",
":",
"number",
";",
"of",
"?",
":",
"number",
";",
"}",
";",
"/**\n * Podcast Identifier\n */",
"podcastId",
"?",
":",
"string",
";",
"/**\n * Show Movement\n */",
"showMovement",
"?",
":",
"boolean",
";",
"/**\n * iTunes Media Type\n *\n * 1: Normal\n * 2: Audiobook\n * 6: Music Video\n * 9: Movie\n * 10: TV Show\n * 11: Booklet\n * 14: Ringtone\n *\n * https://github.com/sergiomb2/libmp4v2/wiki/iTunesMetadata#user-content-media-type-stik\n */",
"stik",
"?",
":",
"number",
";",
"}",
"export",
"interface",
"IRatio",
"{",
"/**\n * [0..1]\n */",
"ratio",
":",
"number",
";",
"/**\n * Decibel\n */",
"dB",
":",
"number",
";",
"}",
"export",
"type",
"FormatId",
"=",
"'container'",
"|",
"'duration'",
"|",
"'bitrate'",
"|",
"'sampleRate'",
"|",
"'bitsPerSample'",
"|",
"'codec'",
"|",
"'tool'",
"|",
"'codecProfile'",
"|",
"'lossless'",
"|",
"'numberOfChannels'",
"|",
"'numberOfSamples'",
"|",
"'audioMD5'",
"|",
"'chapters'",
"|",
"'modificationTime'",
"|",
"'creationTime'",
"|",
"'trackPeakLevel'",
"|",
"'trackGain'",
"|",
"'albumGain'",
";",
"export",
"interface",
"IAudioTrack",
"{",
"samplingFrequency",
"?",
":",
"number",
";",
"outputSamplingFrequency",
"?",
":",
"number",
";",
"channels",
"?",
":",
"number",
";",
"channelPositions",
"?",
":",
"Buffer",
";",
"bitDepth",
"?",
":",
"number",
";",
"}",
"export",
"interface",
"IVideoTrack",
"{",
"flagInterlaced",
"?",
":",
"boolean",
";",
"stereoMode",
"?",
":",
"number",
";",
"pixelWidth",
"?",
":",
"number",
";",
"pixelHeight",
"?",
":",
"number",
";",
"displayWidth",
"?",
":",
"number",
";",
"displayHeight",
"?",
":",
"number",
";",
"displayUnit",
"?",
":",
"number",
";",
"aspectRatioType",
"?",
":",
"number",
";",
"colourSpace",
"?",
":",
"Buffer",
";",
"gammaValue",
"?",
":",
"number",
";",
"}",
"export",
"enum",
"TrackType",
"{",
"video",
"=",
"0x01",
",",
"audio",
"=",
"0x02",
",",
"complex",
"=",
"0x03",
",",
"logo",
"=",
"0x04",
",",
"subtitle",
"=",
"0x11",
",",
"button",
"=",
"0x12",
",",
"control",
"=",
"0x20",
"}",
"export",
"interface",
"ITrackInfo",
"{",
"type",
"?",
":",
"TrackType",
";",
"codecName",
"?",
":",
"string",
";",
"codecSettings",
"?",
":",
"string",
";",
"flagEnabled",
"?",
":",
"boolean",
";",
"flagDefault",
"?",
":",
"boolean",
";",
"flagLacing",
"?",
":",
"boolean",
";",
"name",
"?",
":",
"string",
";",
"language",
"?",
":",
"string",
";",
"audio",
"?",
":",
"IAudioTrack",
";",
"video",
"?",
":",
"IVideoTrack",
";",
"}",
"export",
"interface",
"IFormat",
"{",
"readonly",
"trackInfo",
":",
"ITrackInfo",
"[",
"]",
";",
"/**\n * E.g.: 'flac'\n */",
"readonly",
"container",
"?",
":",
"string",
";",
"/**\n * List of tags found in parsed audio file\n */",
"readonly",
"tagTypes",
"?",
":",
"TagType",
"[",
"]",
";",
"/**\n * Duration in seconds\n */",
"readonly",
"duration",
"?",
":",
"number",
";",
"/**\n * Number bits per second of encoded audio file\n */",
"readonly",
"bitrate",
"?",
":",
"number",
";",
"/**\n * Sampling rate in Samples per second (S/s)\n */",
"readonly",
"sampleRate",
"?",
":",
"number",
";",
"/**\n * Audio bit depth\n */",
"readonly",
"bitsPerSample",
"?",
":",
"number",
";",
"/**\n * Encoder brand, e.g.: LAME3.99r\n */",
"readonly",
"tool",
"?",
":",
"string",
";",
"/**\n * Encoder name / compressionType, e.g.: 'PCM', 'ITU-T G.711 mu-law'\n */",
"readonly",
"codec",
"?",
":",
"string",
";",
"/**\n * Codec profile\n */",
"readonly",
"codecProfile",
"?",
":",
"string",
";",
"readonly",
"lossless",
"?",
":",
"boolean",
";",
"/**\n * Number of audio channels\n */",
"readonly",
"numberOfChannels",
"?",
":",
"number",
";",
"/**\n * Number of samples frames.\n * One sample contains all channels\n * The duration is: numberOfSamples / sampleRate\n */",
"readonly",
"numberOfSamples",
"?",
":",
"number",
";",
"/**\n * 16-byte MD5 of raw audio\n */",
"readonly",
"audioMD5",
"?",
":",
"Buffer",
";",
"/**\n * Chapters in audio stream\n */",
"readonly",
"chapters",
"?",
":",
"IChapter",
"[",
"]",
";",
"/**\n * Time file was created\n */",
"readonly",
"creationTime",
"?",
":",
"Date",
";",
"/**\n * Time file was modified\n */",
"readonly",
"modificationTime",
"?",
":",
"Date",
";",
"readonly",
"trackGain",
"?",
":",
"number",
";",
"readonly",
"trackPeakLevel",
"?",
":",
"number",
";",
"readonly",
"albumGain",
"?",
":",
"number",
";",
"}",
"export",
"interface",
"ITag",
"{",
"id",
":",
"string",
";",
"value",
":",
"any",
";",
"}",
"export",
"interface",
"IChapter",
"{",
"/**\n * Chapter title\n */",
"title",
":",
"string",
";",
"/**\n * Audio offset in sample number, 0 is the first sample.\n * Duration offset is sampleOffset / format.sampleRate\n */",
"sampleOffset",
":",
"number",
";",
"}",
"/**\n * Flat list of tags\n */",
"export",
"interface",
"INativeTags",
"{",
"[",
"tagType",
"]",
":",
"ITag",
"[",
"]",
";",
"}",
"/**\n * Tags ordered by tag-ID\n */",
"export",
"interface",
"INativeTagDict",
"{",
"[",
"tagId",
"]",
":",
"any",
"[",
"]",
";",
"}",
"export",
"interface",
"INativeAudioMetadata",
"{",
"format",
":",
"IFormat",
";",
"native",
":",
"INativeTags",
";",
"quality",
":",
"IQualityInformation",
";",
"}",
"export",
"interface",
"IQualityInformation",
"{",
"/**\n * Warnings\n */",
"warnings",
":",
"IParserWarning",
"[",
"]",
";",
"}",
"export",
"interface",
"IParserWarning",
"{",
"message",
":",
"string",
";",
"}",
"export",
"interface",
"IAudioMetadata",
"extends",
"INativeAudioMetadata",
"{",
"/**\n * Metadata, form independent interface\n */",
"common",
":",
"ICommonTagsResult",
";",
"}",
"/**\n * Corresponds with parser module name\n */",
"export",
"type",
"ParserType",
"=",
"'mpeg'",
"|",
"'apev2'",
"|",
"'mp4'",
"|",
"'asf'",
"|",
"'flac'",
"|",
"'ogg'",
"|",
"'aiff'",
"|",
"'wavpack'",
"|",
"'riff'",
"|",
"'musepack'",
"|",
"'dsf'",
"|",
"'dsdiff'",
"|",
"'adts'",
"|",
"'matroska'",
";",
"export",
"interface",
"IOptions",
"{",
"/**\n * default: `false`, if set to `true`, it will parse the whole media file if required to determine the duration.\n */",
"duration",
"?",
":",
"boolean",
";",
"/**\n * default: `false`, if set to `true`, it will skip parsing covers.\n */",
"skipCovers",
"?",
":",
"boolean",
";",
"/**\n * default: `false`, if set to `true`, it will not search all the entire track for additional headers.\n * Only recommenced to use in combination with streams.\n */",
"skipPostHeaders",
"?",
":",
"boolean",
";",
"/**\n * default: `false`, if set to `true`, it will include MP4 chapters\n */",
"includeChapters",
"?",
":",
"boolean",
";",
"/**\n * Set observer for async callbacks to common or format.\n */",
"observer",
"?",
":",
"Observer",
";",
"}",
"export",
"interface",
"IApeHeader",
"extends",
"IOptions",
"{",
"/**\n * Offset of APE-header\n */",
"offset",
":",
"number",
";",
"/**\n * APEv1 / APEv2 header offset\n */",
"footer",
":",
"IFooter",
";",
"}",
"export",
"interface",
"IPrivateOptions",
"extends",
"IOptions",
"{",
"apeHeader",
"?",
":",
"IApeHeader",
";",
"}",
"/**\n * Event definition send after each change to common/format metadata change to observer.\n */",
"export",
"interface",
"IMetadataEvent",
"{",
"/**\n * Tag which has been updated.\n */",
"tag",
":",
"{",
"/**\n * Either 'common' if it a generic tag event, or 'format' for format related updates\n */",
"type",
":",
"'common'",
"|",
"'format'",
";",
"/**\n * Tag id\n */",
"id",
":",
"GenericTagId",
"|",
"FormatId",
";",
"/**\n * Tag value\n */",
"value",
":",
"any",
";",
"}",
";",
"/**\n * Metadata model including the attached tag\n */",
"metadata",
":",
"IAudioMetadata",
";",
"}",
"export",
"type",
"Observer",
"=",
"(",
"update",
":",
"IMetadataEvent",
")",
"=>",
"void",
";",
"/**\n * Provides random data read access\n * Used read operations on file of buffers\n */",
"export",
"interface",
"IRandomReader",
"{",
"/**\n * Total length of file or buffer\n */",
"fileSize",
":",
"number",
";",
"param",
"buffer",
"{",
"Buffer",
"}",
"param",
"offset",
"{",
"number",
"}",
"param",
"length",
"{",
"number",
"}",
"param",
"position",
"{",
"number",
"}",
"return",
"{",
"Promise",
"<",
"number",
">",
"}",
"randomRead",
"(",
"buffer",
",",
"offset",
",",
"length",
",",
"position",
")",
":",
"Promise",
"<",
"number",
">",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
12,
null,
3,
null,
3,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null
] |
661796 | [
"import",
"{",
"FormatId",
",",
"IAudioMetadata",
",",
"ICommonTagsResult",
",",
"IFormat",
",",
"INativeTags",
",",
"IOptions",
",",
"IQualityInformation",
",",
"IPicture",
",",
"ITrackInfo",
",",
"TrackType",
"}",
"from",
"'../type'",
";",
"import",
"*",
"as",
"_debug",
"from",
"'debug'",
";",
"import",
"{",
"IGenericTag",
",",
"TagType",
",",
"isSingleton",
",",
"isUnique",
"}",
"from",
"'./GenericTagTypes'",
";",
"import",
"{",
"CombinedTagMapper",
"}",
"from",
"'./CombinedTagMapper'",
";",
"import",
"{",
"CommonTagMapper",
"}",
"from",
"'./GenericTagMapper'",
";",
"import",
"{",
"toRatio",
"}",
"from",
"'./Util'",
";",
"import",
"*",
"as",
"FileType",
"from",
"'file-type/core'",
";",
"const",
"debug",
"=",
"_debug",
"(",
"'music-metadata:collector'",
")",
";",
"const",
"TagPriority",
"=",
"[",
"'matroska'",
",",
"'APEv2'",
",",
"'vorbis'",
",",
"'ID3v2.4'",
",",
"'ID3v2.3'",
",",
"'ID3v2.2'",
",",
"'exif'",
",",
"'asf'",
",",
"'iTunes'",
",",
"'ID3v1'",
"]",
";",
"/**\n * Combines all generic-tag-mappers for each tag type\n */",
"export",
"interface",
"IWarningCollector",
"{",
"param",
"warning",
"addWarning",
"(",
"warning",
")",
";",
"}",
"export",
"interface",
"INativeMetadataCollector",
"extends",
"IWarningCollector",
"{",
"/**\n * Only use this for reading\n */",
"readonly",
"format",
":",
"IFormat",
";",
"readonly",
"native",
":",
"INativeTags",
";",
"readonly",
"quality",
":",
"IQualityInformation",
";",
"returns",
"{",
"boolean",
"}",
"hasAny",
"(",
")",
":",
"boolean",
";",
"setFormat",
"(",
"key",
",",
"value",
")",
":",
"void",
";",
"addTag",
"(",
"tagType",
",",
"tagId",
",",
"value",
")",
":",
"void",
";",
"addStreamInfo",
"(",
"streamInfo",
")",
":",
"void",
";",
"}",
"/**\n * Provided to the parser to uodate the metadata result.\n * Responsible for triggering async updates\n */",
"export",
"class",
"MetadataCollector",
"implements",
"INativeMetadataCollector",
"{",
"public",
"readonly",
"format",
":",
"IFormat",
"=",
"{",
"tagTypes",
":",
"[",
"]",
",",
"trackInfo",
":",
"[",
"]",
"}",
";",
"public",
"readonly",
"native",
":",
"INativeTags",
"=",
"{",
"}",
";",
"public",
"readonly",
"common",
":",
"ICommonTagsResult",
"=",
"{",
"track",
":",
"{",
"no",
":",
"null",
",",
"of",
":",
"null",
"}",
",",
"disk",
":",
"{",
"no",
":",
"null",
",",
"of",
":",
"null",
"}",
",",
"movementIndex",
":",
"{",
"}",
"}",
";",
"public",
"readonly",
"quality",
":",
"IQualityInformation",
"=",
"{",
"warnings",
":",
"[",
"]",
"}",
";",
"/**\n * Keeps track of origin priority for each mapped id\n */",
"private",
"readonly",
"commonOrigin",
":",
"{",
"[",
"id",
"]",
":",
"number",
";",
"}",
"=",
"{",
"}",
";",
"/**\n * Maps a tag type to a priority\n */",
"private",
"readonly",
"originPriority",
":",
"{",
"[",
"tagType",
"]",
":",
"number",
";",
"}",
"=",
"{",
"}",
";",
"private",
"tagMapper",
"=",
"new",
"CombinedTagMapper",
"(",
")",
";",
"public",
"constructor",
"(",
"private",
"opts",
")",
"{",
"let",
"priority",
"=",
"1",
";",
"for",
"(",
"const",
"tagType",
"of",
"TagPriority",
")",
"{",
"this",
".",
"originPriority",
"[",
"tagType",
"]",
"=",
"priority",
"++",
";",
"}",
"this",
".",
"originPriority",
".",
"artificial",
"=",
"500",
";",
"this",
".",
"originPriority",
".",
"id3v1",
"=",
"600",
";",
"}",
"returns",
"{",
"boolean",
"}",
"public",
"hasAny",
"(",
")",
"{",
"return",
"Object",
".",
"keys",
"(",
"this",
".",
"native",
")",
".",
"length",
">",
"0",
";",
"}",
"public",
"addStreamInfo",
"(",
"streamInfo",
")",
"{",
"debug",
"(",
"`streamInfo: type=${",
"TrackType",
"[",
"streamInfo",
".",
"type",
"]",
"}, codec=${",
"streamInfo",
".",
"codecName",
"}`",
")",
";",
"this",
".",
"format",
".",
"trackInfo",
".",
"push",
"(",
"streamInfo",
")",
";",
"}",
"public",
"setFormat",
"(",
"key",
",",
"value",
")",
"{",
"debug",
"(",
"`format: ${",
"key",
"} = ${",
"value",
"}`",
")",
";",
"(",
"this",
".",
"format",
"as",
"any",
")",
"[",
"key",
"]",
"=",
"value",
";",
"if",
"(",
"this",
".",
"opts",
".",
"observer",
")",
"{",
"this",
".",
"opts",
".",
"observer",
"(",
"{",
"metadata",
":",
"this",
",",
"tag",
":",
"{",
"type",
":",
"'format'",
",",
"id",
":",
"key",
",",
"value",
"}",
"}",
")",
";",
"}",
"}",
"public",
"addTag",
"(",
"tagType",
",",
"tagId",
",",
"value",
")",
"{",
"debug",
"(",
"`tag ${",
"tagType",
"}.${",
"tagId",
"} = ${",
"value",
"}`",
")",
";",
"if",
"(",
"!",
"this",
".",
"native",
"[",
"tagType",
"]",
")",
"{",
"this",
".",
"format",
".",
"tagTypes",
".",
"push",
"(",
"tagType",
")",
";",
"this",
".",
"native",
"[",
"tagType",
"]",
"=",
"[",
"]",
";",
"}",
"this",
".",
"native",
"[",
"tagType",
"]",
".",
"push",
"(",
"{",
"id",
":",
"tagId",
",",
"value",
"}",
")",
";",
"this",
".",
"toCommon",
"(",
"tagType",
",",
"tagId",
",",
"value",
")",
";",
"}",
"public",
"addWarning",
"(",
"warning",
")",
"{",
"this",
".",
"quality",
".",
"warnings",
".",
"push",
"(",
"{",
"message",
":",
"warning",
"}",
")",
";",
"}",
"public",
"postMap",
"(",
"tagType",
",",
"tag",
")",
"{",
"switch",
"(",
"tag",
".",
"id",
")",
"{",
"case",
"'artist'",
":",
"if",
"(",
"this",
".",
"commonOrigin",
".",
"artist",
"===",
"this",
".",
"originPriority",
"[",
"tagType",
"]",
")",
"{",
"return",
"this",
".",
"postMap",
"(",
"'artificial'",
",",
"{",
"id",
":",
"'artists'",
",",
"value",
":",
"tag",
".",
"value",
"}",
")",
";",
"}",
"if",
"(",
"!",
"this",
".",
"common",
".",
"artists",
")",
"{",
"this",
".",
"setGenericTag",
"(",
"'artificial'",
",",
"{",
"id",
":",
"'artists'",
",",
"value",
":",
"tag",
".",
"value",
"}",
")",
";",
"}",
"break",
";",
"case",
"'artists'",
":",
"if",
"(",
"!",
"this",
".",
"common",
".",
"artist",
"||",
"this",
".",
"commonOrigin",
".",
"artist",
"===",
"this",
".",
"originPriority",
".",
"artificial",
")",
"{",
"if",
"(",
"!",
"this",
".",
"common",
".",
"artists",
"||",
"this",
".",
"common",
".",
"artists",
".",
"indexOf",
"(",
"tag",
".",
"value",
")",
"===",
"-",
"1",
")",
"{",
"const",
"artists",
"=",
"(",
"this",
".",
"common",
".",
"artists",
"||",
"[",
"]",
")",
".",
"concat",
"(",
"[",
"tag",
".",
"value",
"]",
")",
";",
"const",
"value",
"=",
"joinArtists",
"(",
"artists",
")",
";",
"const",
"artistTag",
"=",
"{",
"id",
":",
"'artist'",
",",
"value",
"}",
";",
"this",
".",
"setGenericTag",
"(",
"'artificial'",
",",
"artistTag",
")",
";",
"}",
"}",
"break",
";",
"case",
"'picture'",
":",
"this",
".",
"postFixPicture",
"(",
"tag",
".",
"value",
"as",
"IPicture",
")",
".",
"then",
"(",
"picture",
"=>",
"{",
"if",
"(",
"picture",
"!==",
"null",
")",
"{",
"tag",
".",
"value",
"=",
"picture",
";",
"this",
".",
"setGenericTag",
"(",
"tagType",
",",
"tag",
")",
";",
"}",
"}",
")",
";",
"return",
";",
"case",
"'totaltracks'",
":",
"this",
".",
"common",
".",
"track",
".",
"of",
"=",
"CommonTagMapper",
".",
"toIntOrNull",
"(",
"tag",
".",
"value",
")",
";",
"return",
";",
"case",
"'totaldiscs'",
":",
"this",
".",
"common",
".",
"disk",
".",
"of",
"=",
"CommonTagMapper",
".",
"toIntOrNull",
"(",
"tag",
".",
"value",
")",
";",
"return",
";",
"case",
"'movementTotal'",
":",
"this",
".",
"common",
".",
"movementIndex",
".",
"of",
"=",
"CommonTagMapper",
".",
"toIntOrNull",
"(",
"tag",
".",
"value",
")",
";",
"return",
";",
"case",
"'track'",
":",
"case",
"'disk'",
":",
"case",
"'movementIndex'",
":",
"const",
"of",
"=",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
".",
"of",
";",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
"=",
"CommonTagMapper",
".",
"normalizeTrack",
"(",
"tag",
".",
"value",
")",
";",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
".",
"of",
"=",
"of",
"!=",
"null",
"?",
"of",
":",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
".",
"of",
";",
"return",
";",
"case",
"'bpm'",
":",
"case",
"'year'",
":",
"case",
"'originalyear'",
":",
"tag",
".",
"value",
"=",
"parseInt",
"(",
"tag",
".",
"value",
",",
"10",
")",
";",
"break",
";",
"case",
"'date'",
":",
"const",
"year",
"=",
"parseInt",
"(",
"tag",
".",
"value",
".",
"substr",
"(",
"0",
",",
"4",
")",
",",
"10",
")",
";",
"if",
"(",
"!",
"isNaN",
"(",
"year",
")",
")",
"{",
"this",
".",
"common",
".",
"year",
"=",
"year",
";",
"}",
"break",
";",
"case",
"'discogs_label_id'",
":",
"case",
"'discogs_release_id'",
":",
"case",
"'discogs_master_release_id'",
":",
"case",
"'discogs_artist_id'",
":",
"case",
"'discogs_votes'",
":",
"tag",
".",
"value",
"=",
"typeof",
"tag",
".",
"value",
"===",
"'string'",
"?",
"parseInt",
"(",
"tag",
".",
"value",
",",
"10",
")",
":",
"tag",
".",
"value",
";",
"break",
";",
"case",
"'replaygain_track_gain'",
":",
"case",
"'replaygain_track_peak'",
":",
"case",
"'replaygain_album_gain'",
":",
"case",
"'replaygain_album_peak'",
":",
"tag",
".",
"value",
"=",
"toRatio",
"(",
"tag",
".",
"value",
")",
";",
"break",
";",
"case",
"'replaygain_track_minmax'",
":",
"tag",
".",
"value",
"=",
"tag",
".",
"value",
".",
"split",
"(",
"','",
")",
".",
"map",
"(",
"v",
"=>",
"parseInt",
"(",
"v",
",",
"10",
")",
")",
";",
"break",
";",
"case",
"'replaygain_undo'",
":",
"const",
"minMix",
"=",
"tag",
".",
"value",
".",
"split",
"(",
"','",
")",
".",
"map",
"(",
"v",
"=>",
"parseInt",
"(",
"v",
",",
"10",
")",
")",
";",
"tag",
".",
"value",
"=",
"{",
"leftChannel",
":",
"minMix",
"[",
"0",
"]",
",",
"rightChannel",
":",
"minMix",
"[",
"1",
"]",
"}",
";",
"break",
";",
"case",
"'gapless'",
":",
"case",
"'compilation'",
":",
"case",
"'podcast'",
":",
"case",
"'showMovement'",
":",
"tag",
".",
"value",
"=",
"tag",
".",
"value",
"===",
"'1'",
"||",
"tag",
".",
"value",
"===",
"1",
";",
"break",
";",
"case",
"'isrc'",
":",
"if",
"(",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
"&&",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
".",
"indexOf",
"(",
"tag",
".",
"value",
")",
"!==",
"-",
"1",
")",
"return",
";",
"break",
";",
"default",
":",
"}",
"if",
"(",
"tag",
".",
"value",
"!==",
"null",
")",
"{",
"this",
".",
"setGenericTag",
"(",
"tagType",
",",
"tag",
")",
";",
"}",
"}",
"returns",
"{",
"IAudioMetadata",
"}",
"public",
"toCommonMetadata",
"(",
")",
"{",
"return",
"{",
"format",
":",
"this",
".",
"format",
",",
"native",
":",
"this",
".",
"native",
",",
"quality",
":",
"this",
".",
"quality",
",",
"common",
":",
"this",
".",
"common",
"}",
";",
"}",
"param",
"picture",
"private",
"async",
"postFixPicture",
"(",
"picture",
")",
"{",
"if",
"(",
"picture",
".",
"data",
"&&",
"picture",
".",
"data",
".",
"length",
">",
"0",
")",
"{",
"if",
"(",
"!",
"picture",
".",
"format",
")",
"{",
"const",
"fileType",
"=",
"await",
"FileType",
".",
"fromBuffer",
"(",
"picture",
".",
"data",
")",
";",
"if",
"(",
"fileType",
")",
"{",
"picture",
".",
"format",
"=",
"fileType",
".",
"mime",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"}",
"picture",
".",
"format",
"=",
"picture",
".",
"format",
".",
"toLocaleLowerCase",
"(",
")",
";",
"switch",
"(",
"picture",
".",
"format",
")",
"{",
"case",
"'image/jpg'",
":",
"picture",
".",
"format",
"=",
"'image/jpeg'",
";",
"}",
"return",
"picture",
";",
"}",
"this",
".",
"addWarning",
"(",
"`Empty picture tag found`",
")",
";",
"return",
"null",
";",
"}",
"/**\n * Convert native tag to common tags\n */",
"private",
"toCommon",
"(",
"tagType",
",",
"tagId",
",",
"value",
")",
"{",
"const",
"tag",
"=",
"{",
"id",
":",
"tagId",
",",
"value",
"}",
";",
"const",
"genericTag",
"=",
"this",
".",
"tagMapper",
".",
"mapTag",
"(",
"tagType",
",",
"tag",
",",
"this",
")",
";",
"if",
"(",
"genericTag",
")",
"{",
"this",
".",
"postMap",
"(",
"tagType",
",",
"genericTag",
")",
";",
"}",
"}",
"/**\n * Set generic tag\n */",
"private",
"setGenericTag",
"(",
"tagType",
",",
"tag",
")",
"{",
"debug",
"(",
"`common.${",
"tag",
".",
"id",
"} = ${",
"tag",
".",
"value",
"}`",
")",
";",
"const",
"prio0",
"=",
"this",
".",
"commonOrigin",
"[",
"tag",
".",
"id",
"]",
"||",
"1000",
";",
"const",
"prio1",
"=",
"this",
".",
"originPriority",
"[",
"tagType",
"]",
";",
"if",
"(",
"isSingleton",
"(",
"tag",
".",
"id",
")",
")",
"{",
"if",
"(",
"prio1",
"<=",
"prio0",
")",
"{",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
"=",
"tag",
".",
"value",
";",
"this",
".",
"commonOrigin",
"[",
"tag",
".",
"id",
"]",
"=",
"prio1",
";",
"}",
"else",
"{",
"return",
"debug",
"(",
"`Ignore native tag (singleton): ${",
"tagType",
"}.${",
"tag",
".",
"id",
"} = ${",
"tag",
".",
"value",
"}`",
")",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"prio1",
"===",
"prio0",
")",
"{",
"if",
"(",
"!",
"isUnique",
"(",
"tag",
".",
"id",
")",
"||",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
".",
"indexOf",
"(",
"tag",
".",
"value",
")",
"===",
"-",
"1",
")",
"{",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
".",
"push",
"(",
"tag",
".",
"value",
")",
";",
"}",
"else",
"{",
"debug",
"(",
"`Ignore duplicate value: ${",
"tagType",
"}.${",
"tag",
".",
"id",
"} = ${",
"tag",
".",
"value",
"}`",
")",
";",
"}",
"}",
"else",
"if",
"(",
"prio1",
"<",
"prio0",
")",
"{",
"this",
".",
"common",
"[",
"tag",
".",
"id",
"]",
"=",
"[",
"tag",
".",
"value",
"]",
";",
"this",
".",
"commonOrigin",
"[",
"tag",
".",
"id",
"]",
"=",
"prio1",
";",
"}",
"else",
"{",
"return",
"debug",
"(",
"`Ignore native tag (list): ${",
"tagType",
"}.${",
"tag",
".",
"id",
"} = ${",
"tag",
".",
"value",
"}`",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"opts",
".",
"observer",
")",
"{",
"this",
".",
"opts",
".",
"observer",
"(",
"{",
"metadata",
":",
"this",
",",
"tag",
":",
"{",
"type",
":",
"'common'",
",",
"id",
":",
"tag",
".",
"id",
",",
"value",
":",
"tag",
".",
"value",
"}",
"}",
")",
";",
"}",
"}",
"}",
"export",
"function",
"joinArtists",
"(",
"artists",
")",
"{",
"if",
"(",
"artists",
".",
"length",
">",
"2",
")",
"{",
"return",
"artists",
".",
"slice",
"(",
"0",
",",
"artists",
".",
"length",
"-",
"1",
")",
".",
"join",
"(",
"', '",
")",
"+",
"' & '",
"+",
"artists",
"[",
"artists",
".",
"length",
"-",
"1",
"]",
";",
"}",
"return",
"artists",
".",
"join",
"(",
"' & '",
")",
";",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
359,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
39932,
null,
null,
null,
null,
null,
null,
null,
null,
3940,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
20320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
630,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
3940,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
8,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
20320,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
39932,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3940,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
16309,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
16309,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
11507,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
23216,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7,
null,
11507,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7555,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
3940,
null,
2,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
16309,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
null,
null,
16309,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661797 | [
"import",
"*",
"as",
"generic",
"from",
"'./GenericTagTypes'",
";",
"import",
"{",
"ITag",
"}",
"from",
"'../type'",
";",
"import",
"{",
"INativeMetadataCollector",
",",
"IWarningCollector",
"}",
"from",
"'./MetadataCollector'",
";",
"export",
"interface",
"IGenericTagMapper",
"{",
"/**\n * Which tagType it able to map to the generic mapping format\n */",
"tagTypes",
":",
"generic",
".",
"TagType",
"[",
"]",
";",
"/**\n * Basic tag map\n */",
"tagMap",
":",
"generic",
".",
"INativeTagMap",
";",
"param",
"tag",
"param",
"warnings",
"return",
"mapGenericTag",
"(",
"tag",
",",
"warnings",
")",
":",
"generic",
".",
"IGenericTag",
";",
"}",
"export",
"class",
"CommonTagMapper",
"implements",
"IGenericTagMapper",
"{",
"public",
"static",
"maxRatingScore",
"=",
"1",
";",
"public",
"static",
"toIntOrNull",
"(",
"str",
")",
"{",
"const",
"cleaned",
"=",
"parseInt",
"(",
"str",
",",
"10",
")",
";",
"return",
"isNaN",
"(",
"cleaned",
")",
"?",
"null",
":",
"cleaned",
";",
"}",
"public",
"static",
"normalizeTrack",
"(",
"origVal",
")",
"{",
"const",
"split",
"=",
"origVal",
".",
"toString",
"(",
")",
".",
"split",
"(",
"'/'",
")",
";",
"return",
"{",
"no",
":",
"parseInt",
"(",
"split",
"[",
"0",
"]",
",",
"10",
")",
"||",
"null",
",",
"of",
":",
"parseInt",
"(",
"split",
"[",
"1",
"]",
",",
"10",
")",
"||",
"null",
"}",
";",
"}",
"public",
"constructor",
"(",
"public",
"tagTypes",
",",
"public",
"tagMap",
")",
"{",
"}",
"param",
"tag",
"param",
"warnings",
"return",
"public",
"mapGenericTag",
"(",
"tag",
",",
"warnings",
")",
"{",
"tag",
"=",
"{",
"id",
":",
"tag",
".",
"id",
",",
"value",
":",
"tag",
".",
"value",
"}",
";",
"this",
".",
"postMap",
"(",
"tag",
",",
"warnings",
")",
";",
"const",
"id",
"=",
"this",
".",
"getCommonName",
"(",
"tag",
".",
"id",
")",
";",
"return",
"id",
"?",
"{",
"id",
",",
"value",
":",
"tag",
".",
"value",
"}",
":",
"null",
";",
"}",
"tag",
"return",
"protected",
"getCommonName",
"(",
"tag",
")",
"{",
"return",
"this",
".",
"tagMap",
"[",
"tag",
"]",
";",
"}",
"param",
"{",
"string",
"}",
"tag",
"param",
"{",
"warnings",
"}",
"Used",
"protected",
"postMap",
"(",
"tag",
",",
"warnings",
")",
"{",
"return",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
1271,
null,
6865,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
3,
null,
2,
null,
null,
null,
3,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
6,
null,
null,
null,
null,
null,
5,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
null,
0,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
1271,
null,
22574,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
27129,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
0,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
null,
1271,
null,
22574,
null,
null,
null,
null,
null,
null
] |
661798 | [
"import",
"{",
"INativeTagMap",
"}",
"from",
"'../common/GenericTagTypes'",
";",
"import",
"{",
"CommonTagMapper",
"}",
"from",
"'../common/GenericTagMapper'",
";",
"/**\n * ID3v1 tag mappings\n */",
"const",
"id3v1TagMap",
"=",
"{",
"title",
":",
"'title'",
",",
"artist",
":",
"'artist'",
",",
"album",
":",
"'album'",
",",
"year",
":",
"'year'",
",",
"comment",
":",
"'comment'",
",",
"track",
":",
"'track'",
",",
"genre",
":",
"'genre'",
"}",
";",
"export",
"class",
"ID3v1TagMapper",
"extends",
"CommonTagMapper",
"{",
"public",
"constructor",
"(",
")",
"{",
"super",
"(",
"[",
"'ID3v1'",
"]",
",",
"id3v1TagMap",
")",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
7341,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |
661799 | [
"import",
"{",
"INativeTagMap",
",",
"TagType",
"}",
"from",
"'./GenericTagTypes'",
";",
"import",
"{",
"CommonTagMapper",
"}",
"from",
"'./GenericTagMapper'",
";",
"export",
"class",
"CaseInsensitiveTagMap",
"extends",
"CommonTagMapper",
"{",
"public",
"constructor",
"(",
"tagTypes",
",",
"tagMap",
")",
"{",
"const",
"upperCaseMap",
"=",
"{",
"}",
";",
"for",
"(",
"const",
"tag",
"of",
"Object",
".",
"keys",
"(",
"tagMap",
")",
")",
"{",
"upperCaseMap",
"[",
"tag",
".",
"toUpperCase",
"(",
")",
"]",
"=",
"tagMap",
"[",
"tag",
"]",
";",
"}",
"super",
"(",
"tagTypes",
",",
"upperCaseMap",
")",
";",
"}",
"tag",
"return",
"protected",
"getCommonName",
"(",
"tag",
")",
"{",
"return",
"this",
".",
"tagMap",
"[",
"tag",
".",
"toUpperCase",
"(",
")",
"]",
";",
"}",
"}"
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
5,
null,
7341,
null,
null,
null,
7341,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] |