@spinnaker/kayenta 2.0.0 → 2.1.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-6303bdf8.js","sources":["../../../src/kayenta/canary.settings.ts","../../../src/kayenta/service/canaryConfig.service.ts","../../../src/kayenta/service/canaryRun.service.ts","../../../src/kayenta/canary.dataSource.stub.ts","../../../src/kayenta/canary.help.ts","../../node_modules/lodash.frompairs/index.js","../../node_modules/ngcomponent/node_modules/lodash/_freeGlobal.js","../../node_modules/ngcomponent/node_modules/lodash/_root.js","../../node_modules/ngcomponent/node_modules/lodash/_Symbol.js","../../node_modules/ngcomponent/node_modules/lodash/_getRawTag.js","../../node_modules/ngcomponent/node_modules/lodash/_objectToString.js","../../node_modules/ngcomponent/node_modules/lodash/_baseGetTag.js","../../node_modules/ngcomponent/node_modules/lodash/isObject.js","../../node_modules/ngcomponent/node_modules/lodash/isFunction.js","../../node_modules/ngcomponent/node_modules/lodash/_isMasked.js","../../node_modules/ngcomponent/node_modules/lodash/_coreJsData.js","../../node_modules/ngcomponent/node_modules/lodash/_toSource.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIsNative.js","../../node_modules/ngcomponent/node_modules/lodash/_getValue.js","../../node_modules/ngcomponent/node_modules/lodash/_getNative.js","../../node_modules/ngcomponent/node_modules/lodash/_defineProperty.js","../../node_modules/ngcomponent/node_modules/lodash/_baseAssignValue.js","../../node_modules/ngcomponent/node_modules/lodash/eq.js","../../node_modules/ngcomponent/node_modules/lodash/_assignValue.js","../../node_modules/ngcomponent/node_modules/lodash/_copyObject.js","../../node_modules/ngcomponent/node_modules/lodash/identity.js","../../node_modules/ngcomponent/node_modules/lodash/_apply.js","../../node_modules/ngcomponent/node_modules/lodash/_overRest.js","../../node_modules/ngcomponent/node_modules/lodash/constant.js","../../node_modules/ngcomponent/node_modules/lodash/_baseSetToString.js","../../node_modules/ngcomponent/node_modules/lodash/_shortOut.js","../../node_modules/ngcomponent/node_modules/lodash/_setToString.js","../../node_modules/ngcomponent/node_modules/lodash/_baseRest.js","../../node_modules/ngcomponent/node_modules/lodash/isLength.js","../../node_modules/ngcomponent/node_modules/lodash/isArrayLike.js","../../node_modules/ngcomponent/node_modules/lodash/_isIndex.js","../../node_modules/ngcomponent/node_modules/lodash/_isIterateeCall.js","../../node_modules/ngcomponent/node_modules/lodash/_createAssigner.js","../../node_modules/ngcomponent/node_modules/lodash/_isPrototype.js","../../node_modules/ngcomponent/node_modules/lodash/_baseTimes.js","../../node_modules/ngcomponent/node_modules/lodash/isObjectLike.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIsArguments.js","../../node_modules/ngcomponent/node_modules/lodash/isArguments.js","../../node_modules/ngcomponent/node_modules/lodash/isArray.js","../../node_modules/ngcomponent/node_modules/lodash/stubFalse.js","../../node_modules/ngcomponent/node_modules/lodash/isBuffer.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIsTypedArray.js","../../node_modules/ngcomponent/node_modules/lodash/_baseUnary.js","../../node_modules/ngcomponent/node_modules/lodash/_nodeUtil.js","../../node_modules/ngcomponent/node_modules/lodash/isTypedArray.js","../../node_modules/ngcomponent/node_modules/lodash/_arrayLikeKeys.js","../../node_modules/ngcomponent/node_modules/lodash/_overArg.js","../../node_modules/ngcomponent/node_modules/lodash/_nativeKeys.js","../../node_modules/ngcomponent/node_modules/lodash/_baseKeys.js","../../node_modules/ngcomponent/node_modules/lodash/keys.js","../../node_modules/ngcomponent/node_modules/lodash/assign.js","../../node_modules/ngcomponent/node_modules/lodash/_createBaseFor.js","../../node_modules/ngcomponent/node_modules/lodash/_baseFor.js","../../node_modules/ngcomponent/node_modules/lodash/_baseForOwn.js","../../node_modules/ngcomponent/node_modules/lodash/_listCacheClear.js","../../node_modules/ngcomponent/node_modules/lodash/_assocIndexOf.js","../../node_modules/ngcomponent/node_modules/lodash/_listCacheDelete.js","../../node_modules/ngcomponent/node_modules/lodash/_listCacheGet.js","../../node_modules/ngcomponent/node_modules/lodash/_listCacheHas.js","../../node_modules/ngcomponent/node_modules/lodash/_listCacheSet.js","../../node_modules/ngcomponent/node_modules/lodash/_ListCache.js","../../node_modules/ngcomponent/node_modules/lodash/_stackClear.js","../../node_modules/ngcomponent/node_modules/lodash/_stackDelete.js","../../node_modules/ngcomponent/node_modules/lodash/_stackGet.js","../../node_modules/ngcomponent/node_modules/lodash/_stackHas.js","../../node_modules/ngcomponent/node_modules/lodash/_Map.js","../../node_modules/ngcomponent/node_modules/lodash/_nativeCreate.js","../../node_modules/ngcomponent/node_modules/lodash/_hashClear.js","../../node_modules/ngcomponent/node_modules/lodash/_hashDelete.js","../../node_modules/ngcomponent/node_modules/lodash/_hashGet.js","../../node_modules/ngcomponent/node_modules/lodash/_hashHas.js","../../node_modules/ngcomponent/node_modules/lodash/_hashSet.js","../../node_modules/ngcomponent/node_modules/lodash/_Hash.js","../../node_modules/ngcomponent/node_modules/lodash/_mapCacheClear.js","../../node_modules/ngcomponent/node_modules/lodash/_isKeyable.js","../../node_modules/ngcomponent/node_modules/lodash/_getMapData.js","../../node_modules/ngcomponent/node_modules/lodash/_mapCacheDelete.js","../../node_modules/ngcomponent/node_modules/lodash/_mapCacheGet.js","../../node_modules/ngcomponent/node_modules/lodash/_mapCacheHas.js","../../node_modules/ngcomponent/node_modules/lodash/_mapCacheSet.js","../../node_modules/ngcomponent/node_modules/lodash/_MapCache.js","../../node_modules/ngcomponent/node_modules/lodash/_stackSet.js","../../node_modules/ngcomponent/node_modules/lodash/_Stack.js","../../node_modules/ngcomponent/node_modules/lodash/_setCacheAdd.js","../../node_modules/ngcomponent/node_modules/lodash/_setCacheHas.js","../../node_modules/ngcomponent/node_modules/lodash/_SetCache.js","../../node_modules/ngcomponent/node_modules/lodash/_arraySome.js","../../node_modules/ngcomponent/node_modules/lodash/_cacheHas.js","../../node_modules/ngcomponent/node_modules/lodash/_equalArrays.js","../../node_modules/ngcomponent/node_modules/lodash/_Uint8Array.js","../../node_modules/ngcomponent/node_modules/lodash/_mapToArray.js","../../node_modules/ngcomponent/node_modules/lodash/_setToArray.js","../../node_modules/ngcomponent/node_modules/lodash/_equalByTag.js","../../node_modules/ngcomponent/node_modules/lodash/_arrayPush.js","../../node_modules/ngcomponent/node_modules/lodash/_baseGetAllKeys.js","../../node_modules/ngcomponent/node_modules/lodash/_arrayFilter.js","../../node_modules/ngcomponent/node_modules/lodash/stubArray.js","../../node_modules/ngcomponent/node_modules/lodash/_getSymbols.js","../../node_modules/ngcomponent/node_modules/lodash/_getAllKeys.js","../../node_modules/ngcomponent/node_modules/lodash/_equalObjects.js","../../node_modules/ngcomponent/node_modules/lodash/_DataView.js","../../node_modules/ngcomponent/node_modules/lodash/_Promise.js","../../node_modules/ngcomponent/node_modules/lodash/_Set.js","../../node_modules/ngcomponent/node_modules/lodash/_WeakMap.js","../../node_modules/ngcomponent/node_modules/lodash/_getTag.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIsEqualDeep.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIsEqual.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIsMatch.js","../../node_modules/ngcomponent/node_modules/lodash/_isStrictComparable.js","../../node_modules/ngcomponent/node_modules/lodash/_getMatchData.js","../../node_modules/ngcomponent/node_modules/lodash/_matchesStrictComparable.js","../../node_modules/ngcomponent/node_modules/lodash/_baseMatches.js","../../node_modules/ngcomponent/node_modules/lodash/isSymbol.js","../../node_modules/ngcomponent/node_modules/lodash/_isKey.js","../../node_modules/ngcomponent/node_modules/lodash/memoize.js","../../node_modules/ngcomponent/node_modules/lodash/_memoizeCapped.js","../../node_modules/ngcomponent/node_modules/lodash/_stringToPath.js","../../node_modules/ngcomponent/node_modules/lodash/_arrayMap.js","../../node_modules/ngcomponent/node_modules/lodash/_baseToString.js","../../node_modules/ngcomponent/node_modules/lodash/toString.js","../../node_modules/ngcomponent/node_modules/lodash/_castPath.js","../../node_modules/ngcomponent/node_modules/lodash/_toKey.js","../../node_modules/ngcomponent/node_modules/lodash/_baseGet.js","../../node_modules/ngcomponent/node_modules/lodash/get.js","../../node_modules/ngcomponent/node_modules/lodash/_baseHasIn.js","../../node_modules/ngcomponent/node_modules/lodash/_hasPath.js","../../node_modules/ngcomponent/node_modules/lodash/hasIn.js","../../node_modules/ngcomponent/node_modules/lodash/_baseMatchesProperty.js","../../node_modules/ngcomponent/node_modules/lodash/_baseProperty.js","../../node_modules/ngcomponent/node_modules/lodash/_basePropertyDeep.js","../../node_modules/ngcomponent/node_modules/lodash/property.js","../../node_modules/ngcomponent/node_modules/lodash/_baseIteratee.js","../../node_modules/ngcomponent/node_modules/lodash/mapValues.js","../../node_modules/ngcomponent/node_modules/lodash/_createBaseEach.js","../../node_modules/ngcomponent/node_modules/lodash/_baseEach.js","../../node_modules/ngcomponent/node_modules/lodash/_baseSome.js","../../node_modules/ngcomponent/node_modules/lodash/some.js","../../node_modules/react2angular/index.js","../../node_modules/ngcomponent/index.js","../../node_modules/classnames/index.js","../../node_modules/style-inject/dist/style-inject.es.js","../../../src/kayenta/components/canaryScore.tsx","../../../src/kayenta/components/canaryScore.component.ts","../../../src/kayenta/components/canaryScores.tsx","../../../src/kayenta/domain/IKayentaAccount.ts","../../../src/kayenta/domain/IKayentaStageConfig.ts","../../../src/kayenta/domain/MetricClassificationLabel.ts","../../../src/kayenta/domain/ScoreClassificationLabel.ts","../../../src/kayenta/components/canaryScores.component.ts","../../../src/kayenta/stages/kayentaStage/AnalysisType.tsx","../../../src/kayenta/stages/kayentaStage/analysisType.component.ts","../../node_modules/ngimport/index.js","../../../src/kayenta/stages/kayentaStage/forAnalysisType.component.ts","../../../src/kayenta/stages/kayentaStage/CanaryExecutionLabel.tsx","../../../src/kayenta/stages/kayentaStage/kayentaStage.ts","../../../src/kayenta/utils/duration.ts","../../../src/kayenta/stages/kayentaStage/kayentaStage.controller.ts","../../../src/kayenta/stages/kayentaStage/stageTypes.ts","../../../src/kayenta/stages/kayentaStage/kayentaStage.transformer.ts","../../../src/kayenta/stages/kayentaStage/kayentaStageConfigSection.component.ts","../../../src/kayenta/layout/styleguide.tsx","../../../src/kayenta/layout/table/nativeTableHeader.tsx","../../../src/kayenta/layout/table/nativeTable.tsx","../../../src/kayenta/stages/kayentaStage/canaryRunSummaries.tsx","../../../src/kayenta/stages/kayentaStage/canaryRunSummaries.component.ts","../../../src/kayenta/stages/kayentaStage/kayentaStageExecutionDetails.controller.ts","../../../src/stub.ts","../../../src/kayenta/navigation/canary.states.stub.ts"],"sourcesContent":["import { SETTINGS } from '@spinnaker/core';\n\nexport interface ICanarySettings {\n showAllConfigs: boolean;\n reduxLogger: boolean;\n metricsAccountName: string;\n storageAccountName: string;\n defaultJudge: string;\n metricStore: string;\n stagesEnabled: boolean;\n stageName: string;\n executionsCountOptions: number[];\n defaultExecutionCount: number;\n stageDescription: string;\n featureDisabled: boolean;\n optInAll: boolean;\n atlasWebComponentsUrl: string;\n atlasWebComponentsPolyfillUrl: string;\n atlasGraphBaseUrl: string;\n templatesEnabled: boolean;\n manualAnalysisEnabled: boolean;\n legacySiteLocalFieldsEnabled: boolean; // legacy fields for backwards-compat with old systems, no long term support planned\n}\n\nexport const CanarySettings: ICanarySettings = SETTINGS.canary || { featureDisabled: true };\n","import { CanarySettings } from 'kayenta/canary.settings';\nimport {\n ICanaryConfig,\n ICanaryConfigSummary,\n ICanaryConfigUpdateResponse,\n ICanaryMetricConfig,\n IJudge,\n IKayentaAccount,\n} from 'kayenta/domain';\nimport { ICanaryState } from 'kayenta/reducers';\nimport { omit } from 'lodash';\n\nimport { REST } from '@spinnaker/core';\n\nexport function getCanaryConfigById(id: string): PromiseLike<ICanaryConfig> {\n return REST('/v2/canaryConfig')\n .path(id)\n .get()\n .then((config: ICanaryConfig) => ({\n ...config,\n id,\n }));\n}\n\nexport function getCanaryConfigSummaries(...application: string[]): PromiseLike<ICanaryConfigSummary[]> {\n return REST('/v2/canaryConfig').query({ application }).get();\n}\n\nexport function updateCanaryConfig(config: ICanaryConfig): PromiseLike<ICanaryConfigUpdateResponse> {\n return REST('/v2/canaryConfig').path(config.id).put(config);\n}\n\nexport function createCanaryConfig(config: ICanaryConfig): PromiseLike<ICanaryConfigUpdateResponse> {\n return REST('/v2/canaryConfig').post(config);\n}\n\nexport function deleteCanaryConfig(id: string): PromiseLike<void> {\n return REST('/v2/canaryConfig').path(id).delete();\n}\n\nexport function listJudges(): PromiseLike<IJudge[]> {\n return REST('/v2/canaries/judges')\n .get()\n .then((judges: IJudge[]) => judges.filter((judge) => judge.visible));\n}\n\nexport function listKayentaAccounts(): PromiseLike<IKayentaAccount[]> {\n return REST('/v2/canaries/credentials').useCache().get();\n}\n\n// Not sure if this is the right way to go about this. We have pieces of the config\n// living on different parts of the store. Before, e.g., updating the config, we should\n// reconstitute it into a single object that reflects the user's changes.\nexport function mapStateToConfig(state: ICanaryState): ICanaryConfig {\n const { selectedConfig } = state;\n if (selectedConfig.config) {\n return {\n ...selectedConfig.config,\n judge: selectedConfig.judge.judgeConfig,\n metrics: selectedConfig.metricList.map((metric) => omit(metric, 'id')),\n classifier: {\n ...selectedConfig.config.classifier,\n groupWeights: selectedConfig.group.groupWeights,\n },\n };\n } else {\n return null;\n }\n}\n\nexport function buildNewConfig(state: ICanaryState): ICanaryConfig {\n let configName = 'new-config';\n let i = 1;\n while ((state.data.configSummaries || []).some((summary) => summary.name === configName)) {\n configName = `new-config-${i}`;\n i++;\n }\n\n return {\n name: configName,\n applications: [state.data.application.name],\n description: '',\n isNew: true,\n metrics: [] as ICanaryMetricConfig[],\n configVersion: '1',\n templates: {},\n classifier: {\n groupWeights: {} as { [key: string]: number },\n },\n judge: {\n name: CanarySettings.defaultJudge || 'NetflixACAJudge-v1.0',\n judgeConfigurations: {},\n },\n };\n}\n\nexport function buildConfigCopy(state: ICanaryState): ICanaryConfig {\n const config: ICanaryConfig = {\n ...mapStateToConfig(state),\n applications: [state.data.application.name], // Copy into current application.\n };\n if (!config) {\n return null;\n }\n\n // Probably a rare case, but someone could be lazy about naming their configs.\n let configName = `${config.name}-copy`;\n let i = 1;\n while ((state.data.configSummaries || []).some((summary) => summary.name === configName)) {\n configName = `${config.name}-copy-${i}`;\n i++;\n }\n\n return omit(\n {\n ...config,\n name: configName,\n isNew: true,\n },\n 'id',\n );\n}\n","import { CanarySettings } from 'kayenta/canary.settings';\nimport {\n ICanaryExecutionRequest,\n ICanaryExecutionRequestParams,\n ICanaryExecutionResponse,\n ICanaryExecutionStatusResult,\n IMetricSetPair,\n} from 'kayenta/domain';\n\nimport { ReactInjector, REST } from '@spinnaker/core';\n\nexport const getCanaryRun = (configId: string, canaryExecutionId: string): PromiseLike<ICanaryExecutionStatusResult> =>\n REST('/v2/canaries/canary')\n .path(configId, canaryExecutionId)\n .query({ storageAccountName: CanarySettings.storageAccountName })\n .useCache()\n .get()\n .then((run: ICanaryExecutionStatusResult) => {\n const { config } = run;\n config.id = configId;\n run.id = canaryExecutionId;\n run.result?.judgeResult.results.sort((a, b) => a.name.localeCompare(b.name));\n return run;\n });\n\nexport const startCanaryRun = (\n configId: string,\n executionRequest: ICanaryExecutionRequest,\n params: ICanaryExecutionRequestParams = {},\n): PromiseLike<ICanaryExecutionResponse> => {\n return REST('/v2/canaries/canary')\n .path(configId)\n .query(params as any)\n .post(executionRequest);\n};\n\nexport const getMetricSetPair = (metricSetPairListId: string, metricSetPairId: string): PromiseLike<IMetricSetPair> =>\n REST('/v2/canaries/metricSetPairList')\n .path(metricSetPairListId)\n .query({ storageAccountName: CanarySettings.storageAccountName })\n .useCache()\n .get()\n .then((list: IMetricSetPair[]) => list.find((pair) => pair.id === metricSetPairId));\n\nexport const listCanaryExecutions = (application: string): PromiseLike<ICanaryExecutionStatusResult[]> => {\n const limit = ReactInjector.$stateParams.count || 20;\n return REST('/v2/canaries').path(application, 'executions').query({ limit }).get();\n};\n\nexport const getHealthLabel = (health: string, result: string): string => {\n const healthLC = (health || '').toLowerCase();\n const resultLC = (result || '').toLowerCase();\n return healthLC === 'unhealthy'\n ? 'unhealthy'\n : resultLC === 'success'\n ? 'healthy'\n : resultLC === 'failure'\n ? 'failing'\n : 'unknown';\n};\n","import { CanarySettings } from 'kayenta/canary.settings';\n\nimport { Application, ApplicationDataSourceRegistry } from '@spinnaker/core';\n\nimport { getCanaryConfigSummaries, listJudges } from './service/canaryConfig.service';\nimport { listCanaryExecutions } from './service/canaryRun.service';\n\n// When the lazy portion loads, it overwrites these stub with implementation that bridges data to the redux store\nexport const stub = {\n loadCanaryExecutions: (application: Application) => listCanaryExecutions(application.name),\n afterConfigsLoaded: (_application: Application): void => void 0,\n afterJudgesLoaded: (_application: Application): void => void 0,\n afterCanaryExecutionsLoaded: (_application: Application): void => void 0,\n};\n\nexport function registerKayentaDataSourceStubs() {\n const onLoad = (app: Application, data: any) => Promise.resolve(data);\n const loadCanaryConfigs = (application: Application) => {\n return CanarySettings.showAllConfigs ? getCanaryConfigSummaries() : getCanaryConfigSummaries(application.name);\n };\n\n ApplicationDataSourceRegistry.registerDataSource({\n optIn: !CanarySettings.optInAll,\n optional: true,\n loader: loadCanaryConfigs,\n onLoad,\n afterLoad: (application) => stub.afterConfigsLoaded(application),\n description: 'Canary analysis configuration and reporting',\n key: 'canaryConfigs',\n label: 'Canary',\n defaultData: [],\n });\n\n ApplicationDataSourceRegistry.registerDataSource({\n key: 'canaryJudges',\n label: 'Canary Configs',\n sref: '.canary.canaryConfig',\n activeState: '**.canaryConfig.**',\n category: 'delivery',\n requiresDataSource: 'canaryConfigs',\n loader: listJudges,\n onLoad,\n afterLoad: (application) => stub.afterJudgesLoaded(application),\n lazy: true,\n autoActivate: true,\n defaultData: [],\n iconName: 'spMenuCanaryConfig',\n });\n\n ApplicationDataSourceRegistry.registerDataSource({\n key: 'canaryExecutions',\n label: 'Canary Reports',\n sref: '.canary.report',\n activeState: '**.report.**',\n category: 'delivery',\n requiresDataSource: 'canaryConfigs',\n loader: (application) => stub.loadCanaryExecutions(application),\n onLoad,\n afterLoad: (application) => stub.afterCanaryExecutionsLoaded(application),\n lazy: true,\n defaultData: [],\n iconName: 'spMenuCanaryReport',\n });\n}\n","import { HelpContentsRegistry } from '@spinnaker/core';\n\nconst helpContents: { [key: string]: string } = {\n 'pipeline.config.canary.analysisType': `\n <p>\n <strong>Real Time</strong> analysis will be performed\n over a time interval beginning at the moment of execution.\n <ul>\n <li>\n <strong>Automatic:</strong> Spinnaker will provision and clean up the baseline and canary server groups. Not all cloud providers support this mode.\n </li>\n <li>\n <strong>Manual:</strong> You are responsible for provisioning and cleaning up the baseline and canary server groups.\n </li>\n </ul>\n </p>\n <p>\n <strong>Retrospective</strong> analysis will be performed over an explicitly-specified time\n interval (likely in the past). You are responsible for provisioning and cleaning up\n the baseline and canary server groups.\n </p>\n `,\n 'pipeline.config.canary.delayBeforeAnalysis':\n '<p>The number of minutes until the first canary analysis measurement interval begins.</p>',\n 'pipeline.config.canary.baselineAnalysisOffset':\n '<p>The offset in minutes of baseline data collection from the beginning of canary analysis. Useful for comparing metrics pre-canary for relative comparison. This field accepts SpEL</p>',\n 'pipeline.config.canary.canaryInterval': `\n <p>The frequency at which a canary score is generated. The recommended interval is at least 30 minutes.</p>\n <p>If an interval is not specified, or the specified interval is larger than the overall time range, there will be one canary run over the full time range.</p>`,\n 'pipeline.config.canary.successfulScore':\n '<p>The minimum score the canary must achieve to be considered successful.</p>',\n 'pipeline.config.canary.unhealthyScore':\n '<p>The lowest score the canary can attain before it is aborted and disabled as a failure.</p>',\n 'pipeline.config.canary.baselineGroup':\n '<p>The server group to treat as the <em>control</em> in the canary analysis.</p>',\n 'pipeline.config.canary.baselineLocation':\n '<p>The location (could be a region, a namespace, or something else) of the server group to treat as the <em>control</em> in the canary analysis.</p>',\n 'pipeline.config.canary.canaryGroup':\n '<p>The server group to treat as the <em>experiment</em> in the canary analysis.</p>',\n 'pipeline.config.canary.canaryLocation':\n '<p>The location (could be a region, a namespace, or something else) of the server group to treat as the <em>experiment</em> in the canary analysis.</p>',\n 'pipeline.config.canary.startTimeIso':\n '<p>The overall start time of the data points to be retrieved, specified as a UTC instant using <a target=\"_\" href=\"https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT\">ISO-8601 instant format.</a> For example, `2018-07-12T20:28:29Z`.</p>',\n 'pipeline.config.canary.endTimeIso':\n '<p>The overall end time of the data points to be retrieved, specified as a UTC instant using <a target=\"_\" href=\"https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT\">ISO-8601 instant format.</a> For example, `2018-07-12T22:28:29Z`.</p>',\n 'pipeline.config.canary.extendedScopeParams': `\n <p>Metric source specific parameters which may be used to further alter the canary scope.</p>\n <p>Also used to provide variable bindings for use in the expansion of custom filter templates within the canary config.</p>`,\n 'pipeline.config.canary.lookback':\n '<p>With an analysis type of <strong>Growing</strong>, the entire duration of the canary will be considered during the analysis.</p><p>When choosing <strong>Sliding</strong>, the canary will use the most recent number of specified minutes for its analysis report (<b>useful for long running canaries that span multiple days</b>).</p>',\n 'pipeline.config.canary.delayBeforeCleanup':\n '<p>The total time after canary analysis ends before canary cluster cleanup begins. Allows for manual inspection of instances.</p>',\n 'pipeline.config.canary.marginalScore': `\n <p>A canary stage can include multiple canary runs.</p>\n <p>If a given canary run score is less than or equal to the marginal threshold, the canary stage will fail immediately.</p>\n <p>If the canary run score is greater than the marginal threshold, the canary stage will not fail and will execute the remaining downstream canary runs.</p>`,\n 'pipeline.config.canary.passingScore':\n '<p>When all canary runs in a stage have executed, a canary stage is considered a success if the final (that is, the latest) canary run score is greater than or equal to the pass threshold. Otherwise, it is a failure.</p>',\n 'pipeline.config.canary.lifetime': `\n <p>The total time for which data will be collected and analyzed during this stage.</p>\n `,\n 'pipeline.config.canary.legacySiteLocalRecipients':\n '<p>Email addresses to be notified when a canary report completes, separated by commas.</p>',\n 'pipeline.config.metricsAccount':\n \"<p>The account to be used to access the metric store defined in this stage's canary config.</p>\",\n 'pipeline.config.storageAccount':\n '<p>The account to be used to access a storage service, which will be used to store artifacts generated by this stage.</p>',\n 'canary.config.metricGroupWeights': `\n <p>A canary score is the weighted sum of metric group scores.</p>\n <p>Group weights must sum to 100.</p>\n `,\n 'canary.config.nanStrategy': `\n <p>When there is no value for a metric at a given point in time, it can either be ignored or assumed to be zero. The right choice depends on what is being measured. For example, when measuring successful attempts (like health checks) replacing missing values with zero may be appropriate.</p>\n <p>The default strategy for a given metric will be used if no strategy is selected.</p>\n `,\n 'canary.config.filterTemplate': `\n <p>Templates allow you to compose and parameterize advanced queries against your telemetry provider.</p>\n <p>Parameterized queries are hydrated by values provided in the canary stage. The <strong>project</strong>, <strong>resourceType</strong>, </string><strong>scope</strong>, and <strong>location</strong> variable bindings are implicitly available.</p>\n <p>For example, you can interpolate <strong>project</strong> using the following syntax: <strong>\\${project}</strong>.</p>\n `,\n 'canary.config.signalFx.queryPairs': `\n <p><strong>Query pairs are optional</strong></p>\n <p>Can be dimensions, properties, or tags (Use tag as key for tags).</p>\n <p>\n Example: Given a metric with name <pre>'request.count'</pre> that gets reported with dimensions uri, and stats_code. </br>\n If I added the following query pairs</br>\n <pre>{\n \"uri\": \"v1/some-endpoint\",\n \"status_code\": \"5*\"\n}</pre>\n I could make a metric that tracks the number of server errors for endpoint <pre>/v1/some-endpoint</pre>\n </p>\n <p>These k,v pairs are used to construct filters for the compiled SignalFlow program. EX:<pre>data('request.count', filters=filter('uri', 'v1/some-endpoint') and filter('status_code', '5*') and filter('version', '1.0.0') and filter('environment', 'production')).sum(by=['version', 'environment']).publish()</pre>\n Note that the version and environment would come from the canary scope and the sum method comes from the aggregation method.\n </p>\n `,\n 'canary.config.signalFx.aggregationMethod': `\n <p>This must be a method defined in the <a target=\"_blank\" href=\"https://developers.signalfx.com/reference#signalflow-stream-methods-1\">SignalFlow Stream Methods</a> that supports aggregation</p>\n <p>These are methods such as min, max, sum, mean and are documented with supporting the <strong>'by'</strong> keyword, ex: <pre>sum(by=['version', 'environment'])</pre></p>\n <p>Simply put the name of the method that should be used in this field such as sum, Kayenta will populate the by clauses using the canary scope filter keys</p>\n <p>This method is used to construct the compiled SignalFlow program. EX:<pre>data('request.count', filters=filter('uri', 'v1/some-endpoint') and filter('status_code', '5*') and filter('version', '1.0.0') and filter('environment', 'production')).sum(by=['version', 'environment']).publish()</pre>\n Note that the version and environment k,v pairs are sourced from the canary scope. The other k,v pairs come from the metric specific k,v pair list.\n </p>\n `,\n 'canary.config.prometheus.queryType': `\n <p>Select <strong>default</strong> to use options from the UI to configure your query.</p>\n <p>Select <strong>PromQL</strong> to compose a custom PromQL query (see <a target=\"blank\" href=\"https://prometheus.io/docs/prometheus/latest/querying/basics/\">documentation</a>).</p>\n `,\n 'canary.config.effectSize.cles': `\n <p>\n The Common Language Effect Size (CLES) reports the probability that a value from one group will be greater than a\n value from the other group.\n </p>\n <p>A value of 0.50 indicates that the two groups are stochastically equal.</p>\n <p>A value of 1 indicates that the first group shows complete stochastic domination over the other group, and a\n value of 0 indicates the complete stochastic domination by the second group.\n </p>\n <p>\n <a href=\"https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test#Common_language_effect_size\" target=\"_blank\">Read more about CLES</a>.\n </p>\n `,\n // These come (almost) verbatim from Stackdriver's Metric Explorer.\n 'stackdriver.resourceType':\n 'For Stackdriver, a set of time series is identified by a <strong>resource type</strong> and a metric type that has data from that resource type.',\n 'stackdriver.metricType':\n 'For Stackdriver, a set of time series is identified by a resource type and a <strong>metric type</strong> that has data from that resource type.',\n 'stackdriver.groupBy': 'Group by resource or metric labels to reduce the number of time series.',\n 'stackdriver.crossSeriesReducer': 'Use an algorithm to group multiple time series together.',\n 'stackdriver.perSeriesAligner': 'Use an algorithm to align individual time series.',\n};\n\nObject.keys(helpContents).forEach((key) => HelpContentsRegistry.register(key, helpContents[key]));\n","/**\n * lodash 4.0.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['fred', 30], ['barney', 40]]);\n * // => { 'fred': 30, 'barney': 40 }\n */\nfunction fromPairs(pairs) {\n var index = -1,\n length = pairs ? pairs.length : 0,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n}\n\nmodule.exports = fromPairs;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var assignValue = require('./_assignValue'),\n copyObject = require('./_copyObject'),\n createAssigner = require('./_createAssigner'),\n isArrayLike = require('./isArrayLike'),\n isPrototype = require('./_isPrototype'),\n keys = require('./keys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nmodule.exports = assign;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nmodule.exports = baseSome;\n","var arraySome = require('./_arraySome'),\n baseIteratee = require('./_baseIteratee'),\n baseSome = require('./_baseSome'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = some;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar fromPairs = require(\"lodash.frompairs\");\nvar ngcomponent_1 = require(\"ngcomponent\");\nvar React = require(\"react\");\nvar react_dom_1 = require(\"react-dom\");\n/**\n * Wraps a React component in Angular. Returns a new Angular component.\n *\n * Usage:\n *\n * ```ts\n * type Props = { foo: number }\n * class ReactComponent extends React.Component<Props, S> {}\n * const AngularComponent = react2angular(ReactComponent, ['foo'])\n * ```\n */\nfunction react2angular(Class, bindingNames, injectNames) {\n if (bindingNames === void 0) { bindingNames = null; }\n if (injectNames === void 0) { injectNames = []; }\n var names = bindingNames\n || (Class.propTypes && Object.keys(Class.propTypes))\n || [];\n return {\n bindings: fromPairs(names.map(function (_) { return [_, '<']; })),\n controller: ['$element'].concat(injectNames, [/** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1($element) {\n var injectedProps = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n injectedProps[_i - 1] = arguments[_i];\n }\n var _this = _super.call(this) || this;\n _this.$element = $element;\n _this.injectedProps = {};\n injectNames.forEach(function (name, i) {\n _this.injectedProps[name] = injectedProps[i];\n });\n return _this;\n }\n class_1.prototype.render = function () {\n react_dom_1.render(React.createElement(Class, __assign({}, this.injectedProps, this.props)), this.$element[0]);\n };\n class_1.prototype.componentWillUnmount = function () {\n react_dom_1.unmountComponentAtNode(this.$element[0]);\n };\n return class_1;\n }(ngcomponent_1.default))])\n };\n}\nexports.react2angular = react2angular;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar assign = require(\"lodash/assign\");\nvar mapValues = require(\"lodash/mapValues\");\nvar some = require(\"lodash/some\");\nvar NgComponent = /** @class */ (function () {\n function NgComponent() {\n this.__isFirstRender = true;\n this.state = {};\n this.props = {};\n }\n /*\n eg. {\n as: {currentValue: [1, 2, 3], previousValue: [1, 2]},\n bs: {currentValue: 42, previousValue: undefined}\n }\n */\n // nb: this method is explicity exposed for unit testing\n NgComponent.prototype.$onChanges = function (changes) {\n var oldProps = this.props;\n // TODO: fix Lodash typings upstream\n var newProps = mapValues(changes, 'currentValue');\n // TODO: implement nextState (which also means implement this.setState)\n var nextProps = assign({}, this.props, newProps);\n if (this.__isFirstRender) {\n assign(this, { props: nextProps });\n this.componentWillMount();\n this.render();\n this.__isFirstRender = false;\n }\n else {\n if (!this.didPropsChange(newProps, oldProps))\n return;\n this.componentWillReceiveProps(nextProps);\n var shouldUpdate = this.shouldComponentUpdate(nextProps, this.state);\n assign(this, { props: nextProps });\n if (!shouldUpdate)\n return;\n this.componentWillUpdate(this.props, this.state);\n this.render();\n this.componentDidUpdate(this.props, this.state);\n }\n };\n NgComponent.prototype.$postLink = function () {\n this.componentDidMount();\n };\n NgComponent.prototype.$onDestroy = function () {\n this.componentWillUnmount();\n };\n NgComponent.prototype.didPropsChange = function (newProps, oldProps) {\n return some(newProps, function (v, k) { return v !== oldProps[k]; });\n };\n /*\n lifecycle hooks\n */\n NgComponent.prototype.componentWillMount = function () { };\n NgComponent.prototype.componentDidMount = function () { };\n NgComponent.prototype.componentWillReceiveProps = function (_props) { };\n NgComponent.prototype.shouldComponentUpdate = function (_nextProps, _nextState) { return true; };\n NgComponent.prototype.componentWillUpdate = function (_props, _state) { };\n NgComponent.prototype.componentDidUpdate = function (_props, _state) { };\n NgComponent.prototype.componentWillUnmount = function () { };\n NgComponent.prototype.render = function () { };\n return NgComponent;\n}());\nexports.default = NgComponent;\n//# sourceMappingURL=index.js.map","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { ScoreClassificationLabel } from '../domain/ScoreClassificationLabel';\nimport { getHealthLabel } from '../service/canaryRun.service';\n\nimport './canaryScore.component.less';\n\nexport interface ICanaryScoreProps {\n score: number | string;\n health?: string;\n result: string;\n inverse: boolean;\n className?: string;\n classification?: ScoreClassificationLabel;\n}\n\nexport interface ICanaryScoreState {\n score: number | string;\n healthLabel: string;\n}\n\nexport class CanaryScore extends React.Component<ICanaryScoreProps, ICanaryScoreState> {\n public static defaultProps: Partial<ICanaryScoreProps> = {\n health: '',\n };\n\n constructor(props: ICanaryScoreProps) {\n super(props);\n this.state = this.getLabelState(props);\n }\n\n private getLabelState(props: ICanaryScoreProps): ICanaryScoreState {\n const score = props.score === 0 || (props.score && props.score > 0) ? props.score : 'N/A';\n\n return {\n score,\n healthLabel: getHealthLabel(props.health, props.result),\n };\n }\n\n public componentWillReceiveProps(props: ICanaryScoreProps) {\n this.setState(this.getLabelState(props));\n }\n\n public render() {\n const className = [\n this.props.inverse ? 'inverse' : '',\n 'score',\n 'score-label',\n 'label-default',\n `label-${this.state.healthLabel}`,\n ].join(' ');\n return (\n <span className={classNames(className, this.props.className)}>\n {this.state.score}\n {this.props.classification && (\n <span className=\"score-classification\">{this.props.classification.toString()}</span>\n )}\n </span>\n );\n }\n}\n","import { module } from 'angular';\nimport { react2angular } from 'react2angular';\n\nimport { withErrorBoundary } from '@spinnaker/core';\n\nimport { CanaryScore } from './canaryScore';\n\nexport const CANARY_SCORE_COMPONENT = 'spinnaker.kayenta.score.component';\nmodule(CANARY_SCORE_COMPONENT, []).component(\n 'kayentaCanaryScore',\n react2angular(withErrorBoundary(CanaryScore, 'kayentaCanaryScore'), ['score', 'health', 'result', 'inverse']),\n);\n","import classNames from 'classnames';\nimport { isString } from 'lodash';\nimport * as React from 'react';\n\nimport { HelpField } from '@spinnaker/core';\n\nimport './canaryScores.less';\n\nexport interface IScoreConfig {\n successfulScore: string;\n unhealthyScore: string;\n}\n\nexport interface ICanaryScoresProps {\n onChange: (scoreConfig: IScoreConfig) => void;\n successfulHelpFieldId?: string;\n successfulLabel?: string;\n successfulScore: string;\n unhealthyHelpFieldId?: string;\n unhealthyLabel?: string;\n unhealthyScore: string;\n disabled?: boolean;\n}\n\nexport interface ICanaryScoresState {\n successfulTouched: boolean;\n unhealthyTouched: boolean;\n}\n\nexport function CanaryScores(props: ICanaryScoresProps) {\n const [successfulTouched, setSuccessfulTouched] = React.useState(!!props.successfulScore);\n const [unhealthyTouched, setUnhealthyTouched] = React.useState(!!props.unhealthyScore);\n\n const { successfulScore, unhealthyScore } = props;\n\n const isExpression = (scoreValue: string): boolean => {\n return isString(scoreValue) && scoreValue.includes('${');\n };\n\n const hasExpressions = isExpression(unhealthyScore) || isExpression(successfulScore);\n\n let successful: number;\n let unhealthy: number;\n if (!hasExpressions) {\n successful = Number(successfulScore);\n unhealthy = Number(unhealthyScore);\n }\n\n const handleSuccessfulChange = (event: React.ChangeEvent<HTMLInputElement>): void => {\n props.onChange({\n successfulScore: event.target.value,\n unhealthyScore,\n });\n };\n\n const handleUnhealthyChange = (event: React.ChangeEvent<HTMLInputElement>): void => {\n props.onChange({\n successfulScore,\n unhealthyScore: event.target.value,\n });\n };\n\n const errors = {\n successful: '',\n unhealthy: '',\n };\n\n if (successfulTouched) {\n if (successful <= 0) {\n errors.successful = 'Must be positive';\n }\n if (successful >= 100) {\n errors.successful = 'Must be less than 100';\n }\n }\n\n if (unhealthyTouched) {\n if (unhealthy <= 0) {\n errors.unhealthy = 'Must be positive';\n }\n if (unhealthy >= 100) {\n errors.unhealthy = 'Must be less than 100';\n }\n }\n\n if (successfulTouched && unhealthyTouched) {\n if (successful <= unhealthy) {\n errors.successful = `Must be greater than ${props.unhealthyLabel}`;\n }\n }\n\n const invalid = !(successful && unhealthy);\n return (\n <div>\n {hasExpressions && (\n <div className=\"form-group\">\n <div className=\"col-md-2 col-md-offset-1 sm-label-right\">Canary Scores</div>\n <div className=\"col-md-9 form-control-static\">Expressions are currently being used for canary scores.</div>\n </div>\n )}\n {!hasExpressions && (\n <div className=\"canary-score\">\n <div className=\"form-group\">\n <div className=\"col-md-2 col-md-offset-1 sm-label-right\">\n {props.unhealthyLabel || 'Unhealthy Score '}\n <HelpField id={props.unhealthyHelpFieldId || 'pipeline.config.canary.unhealthyScore'} />\n </div>\n <div className=\"col-md-2\">\n <input\n type=\"number\"\n required={true}\n disabled={props.disabled}\n onBlur={() => setUnhealthyTouched(true)}\n value={Number.isNaN(unhealthy) ? '' : unhealthy}\n onChange={handleUnhealthyChange}\n className={classNames('form-control', 'input-sm', {\n 'ng-invalid': !!errors.unhealthy,\n 'ng-invalid-validate-min': !!errors.unhealthy,\n })}\n />\n {errors.unhealthy && <div className=\"error-message\">{errors.unhealthy}</div>}\n </div>\n <div className=\"col-md-2 col-md-offset-1 sm-label-right\">\n {props.successfulLabel || 'Successful Score '}\n <HelpField id={props.successfulHelpFieldId || 'pipeline.config.canary.successfulScore'} />\n </div>\n <div className=\"col-md-2\">\n <input\n type=\"number\"\n required={true}\n disabled={props.disabled}\n onBlur={() => setSuccessfulTouched(true)}\n value={Number.isNaN(successful) ? '' : successful}\n onChange={handleSuccessfulChange}\n className={classNames('form-control', 'input-sm', {\n 'ng-invalid': !!errors.successful,\n 'ng-invalid-validate-max': !!errors.successful,\n })}\n />\n {errors.successful && <div className=\"error-message\">{errors.successful}</div>}\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col-md-offset-1 col-md-10\">\n <div className=\"progress\">\n <div className=\"progress-bar progress-bar-danger\" style={{ width: `${invalid ? 0 : unhealthy}%` }} />\n <div\n className=\"progress-bar progress-bar-warning\"\n style={{ width: `${invalid ? 0 : 100 - (unhealthy + (100 - successful))}%` }}\n />\n <div\n className=\"progress-bar progress-bar-success\"\n style={{ width: `${invalid ? 0 : 100 - successful}%` }}\n />\n <div className=\"progress-bar progress-bar-warning\" style={{ width: `${invalid ? 100 : 0}%` }} />\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n}\n","export interface IKayentaAccount {\n name: string;\n type: string;\n supportedTypes: KayentaAccountType[];\n metricsStoreType?: string;\n locations?: string[];\n recommendedLocations?: string[];\n}\n\nexport enum KayentaAccountType {\n MetricsStore = 'METRICS_STORE',\n ObjectStore = 'OBJECT_STORE',\n ConfigurationStore = 'CONFIGURATION_STORE',\n}\n","export interface IKayentaStage {\n canaryConfig: IKayentaStageCanaryConfig;\n analysisType: KayentaAnalysisType;\n deployments: IKayentaStageDeployments;\n isNew: boolean;\n}\n\nexport interface IKayentaStageCanaryConfig {\n beginCanaryAnalysisAfterMins?: string;\n canaryAnalysisIntervalMins: string;\n canaryConfigId: string;\n scopes: IKayentaStageCanaryConfigScope[];\n combinedCanaryResultStrategy: string;\n lifetimeHours?: string;\n lifetimeDuration?: string; // String to be converted to Java.time.Duration in Orca (https://github.com/spinnaker/orca/blob/master/orca-kayenta/src/main/kotlin/com/netflix/spinnaker/orca/kayenta/model/KayentaCanaryContext.kt#L32)\n lookbackMins?: string;\n metricsAccountName: string;\n scoreThresholds: {\n pass: string;\n marginal: string;\n };\n siteLocal?: { notificationEmail?: string[] | string };\n storageAccountName: string;\n}\n\nexport interface IKayentaStageCanaryConfigScope {\n scopeName: string;\n controlScope?: string;\n controlLocation?: string;\n experimentScope?: string;\n experimentLocation?: string;\n startTimeIso?: string;\n endTimeIso?: string;\n step?: number;\n extendedScopeParams: { [key: string]: string };\n}\n\nexport interface IKayentaStageDeployments {\n baseline: {\n cloudProvider: string;\n application: string;\n account: string;\n cluster: string;\n };\n serverGroupPairs: IKayentaServerGroupPair[];\n delayBeforeCleanup: string; // String to be converted to Java.time.Duration in Orca (https://github.com/spinnaker/orca/blob/master/orca-kayenta/src/main/kotlin/com/netflix/spinnaker/orca/kayenta/model/Deployments.kt#L33)\n}\n\nexport interface IKayentaServerGroupPair {\n control: any;\n experiment: any;\n}\n\nexport enum KayentaAnalysisType {\n RealTimeAutomatic = 'realTimeAutomatic',\n RealTime = 'realTime',\n Retrospective = 'retrospective',\n}\n","export enum MetricClassificationLabel {\n Pass = 'Pass',\n High = 'High',\n Low = 'Low',\n Nodata = 'Nodata',\n Error = 'Error',\n}\n","export enum ScoreClassificationLabel {\n Pass = 'Pass',\n Marginal = 'Marginal',\n Fail = 'Fail',\n Nodata = 'Nodata',\n Error = 'Error',\n}\n","import { module } from 'angular';\nimport { react2angular } from 'react2angular';\n\nimport { withErrorBoundary } from '@spinnaker/core';\n\nimport { CanaryScores } from './canaryScores';\n\nexport const CANARY_SCORES_CONFIG_COMPONENT = 'spinnaker.kayenta.canaryScores.component';\nmodule(CANARY_SCORES_CONFIG_COMPONENT, []).component(\n 'kayentaCanaryScores',\n react2angular(withErrorBoundary(CanaryScores, 'kayentaCanaryScores'), [\n 'onChange',\n 'successfulHelpFieldId',\n 'successfulLabel',\n 'successfulScore',\n 'unhealthyHelpFieldId',\n 'unhealthyLabel',\n 'unhealthyScore',\n ]),\n);\n","import { KayentaAnalysisType } from 'kayenta/domain';\nimport * as React from 'react';\n\nimport { noop } from '@spinnaker/core';\n\nexport interface IAnalysisTypeProps {\n analysisTypes: KayentaAnalysisType[];\n selectedType: KayentaAnalysisType;\n onChange?: (type: KayentaAnalysisType) => void;\n}\n\nexport const AnalysisTypeWarning = () => (\n <div className=\"alert alert-warning\">\n The analysis type you've selected isn't supported by any of this application's cloud providers. Please select a\n different type.\n </div>\n);\n\nexport const AnalysisTypeRadioButton = ({\n selectedType,\n analysisTypes,\n onChange = noop,\n label,\n type,\n}: IAnalysisTypeProps & { label: string; type: KayentaAnalysisType }) => {\n if (!analysisTypes.includes(type)) {\n return null;\n }\n return (\n <div className=\"radio\">\n <label>\n <input type=\"radio\" name=\"analysisType\" checked={selectedType === type} onChange={() => onChange(type)} />\n {label}\n </label>\n </div>\n );\n};\n\nexport const AnalysisType = (props: IAnalysisTypeProps) => {\n const { analysisTypes = [], selectedType } = props;\n return (\n <>\n {!analysisTypes.includes(selectedType) && <AnalysisTypeWarning />}\n <AnalysisTypeRadioButton {...props} label=\"Real Time (Automatic)\" type={KayentaAnalysisType.RealTimeAutomatic} />\n <AnalysisTypeRadioButton {...props} label=\"Real Time (Manual)\" type={KayentaAnalysisType.RealTime} />\n <AnalysisTypeRadioButton {...props} label=\"Retrospective\" type={KayentaAnalysisType.Retrospective} />\n </>\n );\n};\n","import { module } from 'angular';\nimport { react2angular } from 'react2angular';\n\nimport { withErrorBoundary } from '@spinnaker/core';\n\nimport { AnalysisType } from './AnalysisType';\n\nexport const KAYENTA_ANALYSIS_TYPE_COMPONENT = 'spinnaker.kayenta.analysisType.component';\nmodule(KAYENTA_ANALYSIS_TYPE_COMPONENT, []).component(\n 'kayentaAnalysisType',\n react2angular(withErrorBoundary(AnalysisType, 'kayentaAnalysisType'), ['analysisTypes', 'selectedType', 'onChange']),\n);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar angular = require(\"angular\");\n// providers\n// TODO: add more\nexports.$httpProvider = undefined;\nexports.$logProvider = undefined;\n// services\nexports.$anchorScroll = undefined;\nexports.$cacheFactory = undefined;\nexports.$compile = undefined;\nexports.$controller = undefined;\nexports.$document = undefined;\nexports.$exceptionHandler = undefined;\nexports.$filter = undefined;\nexports.$http = undefined;\nexports.$httpBackend = undefined;\nexports.$httpParamSerializer = undefined;\nexports.$httpParamSerializerJQLike = undefined;\nexports.$injector = undefined;\nexports.$interpolate = undefined;\nexports.$interval = undefined;\nexports.$locale = undefined;\nexports.$location = undefined;\nexports.$log = undefined;\nexports.$parse = undefined;\nexports.$provide = undefined;\nexports.$q = undefined;\nexports.$rootElement = undefined;\nexports.$rootScope = undefined;\nexports.$sce = undefined;\nexports.$sceDelegate = undefined;\nexports.$templateCache = undefined;\nexports.$templateRequest = undefined;\nexports.$timeout = undefined;\nexports.$window = undefined;\nexports.$xhrFactory = undefined;\n// prevent double-loading, which has the potential\n// to prevent sharing state between services\nvar m = null;\ntry {\n m = angular.module('bcherny/ngimport');\n}\ncatch (e) {\n m = angular.module('bcherny/ngimport', []);\n}\nm.config(['$provide', '$httpProvider', '$logProvider', function ($a, $b, $c) {\n exports.$provide = $a;\n exports.$httpProvider = $b;\n exports.$logProvider = $c;\n }]);\nm.run(['$injector', function ($i) {\n exports.$anchorScroll = $i.get('$anchorScroll');\n exports.$cacheFactory = $i.get('$cacheFactory');\n exports.$compile = $i.get('$compile');\n exports.$controller = $i.get('$controller');\n exports.$document = $i.get('$document');\n exports.$exceptionHandler = $i.get('$exceptionHandler');\n exports.$filter = $i.get('$filter');\n exports.$http = $i.get('$http');\n exports.$httpBackend = $i.get('$httpBackend');\n exports.$httpParamSerializer = $i.get('$httpParamSerializer');\n exports.$httpParamSerializerJQLike = $i.get('$httpParamSerializerJQLike');\n exports.$injector = $i;\n exports.$interpolate = $i.get('$interpolate');\n exports.$interval = $i.get('$interval');\n exports.$locale = $i.get('$locale');\n exports.$location = $i.get('$location');\n exports.$log = $i.get('$log');\n exports.$parse = $i.get('$parse');\n exports.$q = $i.get('$q');\n exports.$rootElement = $i.get('$rootElement');\n exports.$rootScope = $i.get('$rootScope');\n exports.$sce = $i.get('$sce');\n exports.$sceDelegate = $i.get('$sceDelegate');\n exports.$templateCache = $i.get('$templateCache');\n exports.$templateRequest = $i.get('$templateRequest');\n exports.$timeout = $i.get('$timeout');\n exports.$window = $i.get('$window');\n exports.$xhrFactory = $i.get('$xhrFactory');\n }]);\n//# sourceMappingURL=index.js.map","import { IComponentController, module } from 'angular';\nimport { IKayentaStage, KayentaAnalysisType } from 'kayenta/domain';\nimport { $log } from 'ngimport';\n\nclass ForAnalysisTypeController implements IComponentController {\n private stage: IKayentaStage;\n private types: string;\n\n public showForAnalysisType = (): boolean => {\n if (!this.stage) {\n $log.warn('No stage bound to <for-analysis-type> component');\n }\n if (!this.types) {\n $log.warn('No types bound to <for-analysis-type> component');\n }\n\n return (this.types || '')\n .split(',')\n .map((type) => {\n const val = type.trim() as KayentaAnalysisType;\n if (\n ![\n KayentaAnalysisType.Retrospective,\n KayentaAnalysisType.RealTime,\n KayentaAnalysisType.RealTimeAutomatic,\n ].includes(val)\n ) {\n $log.warn(`${val} is not a Kayenta analysis type.`);\n }\n return val;\n })\n .includes(this.stage.analysisType);\n };\n}\n\nexport const FOR_ANALYSIS_TYPE_COMPONENT = 'spinnaker.kayenta.forAnalysisType.component';\nmodule(FOR_ANALYSIS_TYPE_COMPONENT, []).component('forAnalysisType', {\n bindings: {\n types: '@',\n stage: '<',\n },\n controller: ForAnalysisTypeController,\n transclude: true,\n template: '<ng-transclude ng-if=\"$ctrl.showForAnalysisType()\"></ng-transclude>',\n});\n","import { CanaryScore } from 'kayenta/components/canaryScore';\nimport { get } from 'lodash';\nimport * as React from 'react';\n\nimport { IExecutionStage, IExecutionStageSummary } from '@spinnaker/core';\n\nexport interface ICanaryExecutionLabelProps {\n stage: IExecutionStageSummary;\n}\n\nexport const CanaryExecutionLabel = ({ stage }: ICanaryExecutionLabelProps) => {\n const { overallScore, overallResult } = get<IExecutionStage['context']>(stage, 'masterStage.context', {});\n const score = (\n <CanaryScore\n inverse={true}\n score={overallScore}\n result={overallResult === 'success' ? overallResult : null}\n health={overallResult === 'success' ? null : 'unhealthy'}\n />\n );\n return (\n <span className=\"stage-label\">\n <span>{stage.name}</span> ({score})\n </span>\n );\n};\n","import { CanarySettings } from 'kayenta/canary.settings';\nimport { IKayentaStage, KayentaAnalysisType } from 'kayenta/domain';\nimport { getCanaryConfigById } from 'kayenta/service/canaryConfig.service';\nimport { difference, get, has, isEmpty, isString, map, uniq } from 'lodash';\n\nimport { IPipeline } from '@spinnaker/core';\n\nimport { CanaryExecutionLabel } from './CanaryExecutionLabel';\n\nconst isExpression = (value: string) => isString(value) && value.includes('${');\n\nconst emailPattern = /^(.+)@(.+).([A-Za-z]{2,6})/;\nconst isValidEmail = (email: string) => isExpression(email) || email.match(emailPattern);\n\nconst utcInstantPattern = /^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/;\nconst isValidUtcInstant = (timestamp: string) =>\n isExpression(timestamp) || (isString(timestamp) && timestamp.match(utcInstantPattern));\n\nconst requiredForAnalysisTypes = (\n analysisTypes: KayentaAnalysisType[] = [],\n fieldName: string,\n fieldLabel?: string,\n): ((p: IPipeline, s: IKayentaStage) => string) => {\n return (_pipeline: IPipeline, stage: IKayentaStage): string => {\n if (analysisTypes.includes(stage.analysisType)) {\n if (!has(stage, fieldName) || get(stage, fieldName) === '') {\n return `<strong>${fieldLabel || fieldName}</strong> is a required field for Kayenta Canary stages.`;\n }\n }\n return null;\n };\n};\n\nconst allScopesMustBeConfigured = (_pipeline: IPipeline, stage: IKayentaStage): PromiseLike<string> => {\n return getCanaryConfigById(get(stage, 'canaryConfig.canaryConfigId')).then((configDetails) => {\n let definedScopeNames = uniq(map(configDetails.metrics, (metric) => metric.scopeName || 'default'));\n definedScopeNames = !isEmpty(definedScopeNames) ? definedScopeNames : ['default'];\n\n const configureScopedNames: string[] = map(get(stage, 'canaryConfig.scopes'), 'scopeName');\n const missingScopeNames = difference(definedScopeNames, configureScopedNames);\n\n if (missingScopeNames.length > 1) {\n return `Scopes <strong>${missingScopeNames.join()}</strong> are defined but not configured.`;\n } else if (missingScopeNames.length === 1) {\n return `Scope <strong>${missingScopeNames[0]}</strong> is defined but not configured.`;\n } else {\n return null;\n }\n });\n};\n\nconst allConfiguredScopesMustBeDefined = (_pipeline: IPipeline, stage: IKayentaStage): PromiseLike<string> => {\n return getCanaryConfigById(get(stage, 'canaryConfig.canaryConfigId')).then((configDetails) => {\n let definedScopeNames = uniq(map(configDetails.metrics, (metric) => metric.scopeName || 'default'));\n definedScopeNames = !isEmpty(definedScopeNames) ? definedScopeNames : ['default'];\n\n const configureScopedNames: string[] = map(get(stage, 'canaryConfig.scopes'), 'scopeName');\n const missingScopeNames = difference(configureScopedNames, definedScopeNames);\n\n if (missingScopeNames.length > 1) {\n return `Scopes <strong>${missingScopeNames.join()}</strong> are configured but are not defined in the canary configuration.`;\n } else if (missingScopeNames.length === 1) {\n return `Scope <strong>${missingScopeNames[0]}</strong> is configured but is not defined in the canary configuration.`;\n } else {\n return null;\n }\n });\n};\n\nexport const kayentaCanaryStage = {\n label: CanarySettings.stageName || 'Canary Analysis',\n description: CanarySettings.stageDescription || 'Runs a canary task',\n key: 'kayentaCanary',\n templateUrl: require('./kayentaStage.html'),\n controller: 'KayentaCanaryStageCtrl',\n controllerAs: 'kayentaCanaryStageCtrl',\n executionDetailsUrl: require('./kayentaStageExecutionDetails.html'),\n executionLabelComponent: CanaryExecutionLabel,\n validators: [\n { type: 'requiredField', fieldName: 'canaryConfig.canaryConfigId', fieldLabel: 'Config Name' },\n { type: 'requiredField', fieldName: 'canaryConfig.metricsAccountName', fieldLabel: 'Metrics Account' },\n { type: 'requiredField', fieldName: 'canaryConfig.storageAccountName', fieldLabel: 'Storage Account' },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.RealTimeAutomatic],\n 'deployments.serverGroupPairs[0].control',\n 'Baseline & Canary Server Groups',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.RealTimeAutomatic],\n 'deployments.baseline.cluster',\n 'Baseline Cluster',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.RealTimeAutomatic],\n 'deployments.baseline.account',\n 'Baseline Account',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.RealTime, KayentaAnalysisType.Retrospective],\n 'canaryConfig.scopes[0].controlScope',\n 'Baseline Scope',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.RealTime, KayentaAnalysisType.Retrospective],\n 'canaryConfig.scopes[0].experimentScope',\n 'Canary Scope',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.RealTime, KayentaAnalysisType.RealTimeAutomatic],\n 'canaryConfig.lifetimeDuration',\n 'Lifetime',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.Retrospective],\n 'canaryConfig.scopes[0].startTimeIso',\n 'Start Time',\n ),\n },\n {\n type: 'custom',\n validate: requiredForAnalysisTypes(\n [KayentaAnalysisType.Retrospective],\n 'canaryConfig.scopes[0].endTimeIso',\n 'End Time',\n ),\n },\n {\n type: 'custom',\n validate: (_pipeline: IPipeline, stage: IKayentaStage) => {\n if (\n !has(stage, 'canaryConfig.canaryConfigId') ||\n stage.analysisType === KayentaAnalysisType.RealTimeAutomatic\n ) {\n return null;\n }\n\n return getCanaryConfigById(get(stage, 'canaryConfig.canaryConfigId')).then((configDetails) => {\n if (\n get(configDetails, 'metrics[0].query.type') === 'atlas' &&\n !get(stage, 'canaryConfig.scopes[0].extendedScopeParams.type')\n ) {\n return 'Scope Type is required';\n } else {\n return null;\n }\n });\n },\n },\n {\n type: 'custom',\n validate: allScopesMustBeConfigured,\n },\n {\n type: 'custom',\n validate: allConfiguredScopesMustBeDefined,\n },\n {\n type: 'custom',\n validate: (_pipeline: IPipeline, { canaryConfig }: IKayentaStage) => {\n if (!CanarySettings.legacySiteLocalFieldsEnabled) {\n return null;\n }\n const notificationEmail = get(canaryConfig, 'siteLocal.notificationEmail');\n if (!notificationEmail) {\n return null;\n }\n const emails = Array.isArray(notificationEmail) ? notificationEmail : [notificationEmail];\n const invalidEmail = emails.find((email) => !isValidEmail(email));\n return invalidEmail ? `Invalid <strong>Notification Email</strong> (${invalidEmail})` : null;\n },\n },\n {\n type: 'custom',\n validate: (_pipeline: IPipeline, stage: IKayentaStage) => {\n const startTime: string = get(stage, 'canaryConfig.scopes[0].startTimeIso');\n if (\n stage.analysisType === KayentaAnalysisType.Retrospective &&\n !isEmpty(startTime) &&\n !isValidUtcInstant(startTime)\n ) {\n return '<strong>Start Time</strong> must be formatted as a UTC instant using ISO-8601 instant format (e.g., 2018-07-12T20:28:29Z).';\n }\n return null;\n },\n },\n {\n type: 'custom',\n validate: (_pipeline: IPipeline, stage: IKayentaStage) => {\n const endTime: string = get(stage, 'canaryConfig.scopes[0].endTimeIso');\n if (\n stage.analysisType === KayentaAnalysisType.Retrospective &&\n !isEmpty(endTime) &&\n !isValidUtcInstant(endTime)\n ) {\n return '<strong>End Time</strong> must be formatted as a UTC instant using ISO-8601 instant format (e.g., 2018-07-12T20:28:29Z).';\n }\n return null;\n },\n },\n ],\n};\n","import { isEmpty, isInteger, isString } from 'lodash';\n\nexport interface IDuration {\n hours: number;\n minutes: number;\n}\n\nexport const defaultDurationObject = {\n hours: 0,\n minutes: 0,\n};\n\nexport const defaultDurationString = 'PT0H0M';\n\nexport function parseDurationString(duration: string): IDuration {\n const defaultDurationObjectCopy = { ...defaultDurationObject };\n if (!isString(duration)) {\n return defaultDurationObjectCopy;\n }\n const durationComponents = duration.match(/PT(\\d+)H(?:(\\d+)M)?/i);\n if (isEmpty(durationComponents)) {\n return defaultDurationObjectCopy;\n }\n let hours = parseInt(durationComponents[1], 10);\n if (!isInteger(hours) || hours < 0) {\n hours = 0;\n }\n let minutes = parseInt(durationComponents[2], 10);\n if (!isInteger(minutes) || minutes < 0) {\n minutes = 0;\n }\n return { hours, minutes };\n}\n// Returns string parsable by Java.time.Duration.parse\n// https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence\nexport function getDurationString(duration: IDuration): string {\n if (!duration) {\n return defaultDurationString;\n }\n let { hours, minutes } = duration;\n if (!isInteger(hours) || hours < 0) {\n hours = 0;\n }\n if (!isInteger(minutes) || minutes < 0) {\n minutes = 0;\n }\n return `PT${hours}H${minutes}M`;\n}\n","import { IComponentController, ILogService, IScope } from 'angular';\nimport { IModalService } from 'angular-ui-bootstrap';\nimport { CanarySettings } from 'kayenta/canary.settings';\nimport {\n ICanaryConfig,\n ICanaryConfigSummary,\n IKayentaAccount,\n IKayentaServerGroupPair,\n IKayentaStage,\n IKayentaStageCanaryConfigScope,\n KayentaAccountType,\n KayentaAnalysisType,\n} from 'kayenta/domain';\nimport { getCanaryConfigById, listKayentaAccounts } from 'kayenta/service/canaryConfig.service';\nimport { getDurationString, parseDurationString } from 'kayenta/utils/duration';\nimport { cloneDeep, first, get, has, isEmpty, isFinite, isString, map, set, uniq, unset } from 'lodash';\n\nimport {\n AccountService,\n AppListExtractor,\n CloudProviderRegistry,\n IAccountDetails,\n NameUtils,\n ProviderSelectionService,\n ServerGroupCommandBuilderService,\n} from '@spinnaker/core';\n\nimport './kayentaStage.less';\n\n// TODO: Open up to all providers.\nconst REAL_TIME_AUTOMATIC_PROVIDERS = ['gce', 'aws', 'titus'];\n\nexport class KayentaStageController implements IComponentController {\n public static $inject = [\n '$scope',\n '$uibModal',\n '$log',\n 'serverGroupCommandBuilder',\n 'serverGroupTransformer',\n 'stage',\n ];\n\n public state = {\n useLookback: false,\n backingDataLoading: false,\n lifetimeHoursUpdatedToDuration: false,\n lifetime: { hours: 0, minutes: 0 },\n showAdvancedSettings: false,\n useAtlasGlobalDataset: false,\n atlasScopeType: 'cluster',\n legacySiteLocalRecipients: '',\n showLegacySiteLocalRecipients: CanarySettings.legacySiteLocalFieldsEnabled,\n showAllLocations: {\n control: false,\n experiment: false,\n },\n delayBeforeCleanup: { hours: 0, minutes: 0 },\n analysisTypes: [\n KayentaAnalysisType.RealTimeAutomatic,\n KayentaAnalysisType.RealTime,\n KayentaAnalysisType.Retrospective,\n ],\n };\n public canaryConfigSummaries: ICanaryConfigSummary[] = [];\n public selectedCanaryConfigDetails: ICanaryConfig;\n public scopeNames: string[] = [];\n public kayentaAccounts = new Map<KayentaAccountType, IKayentaAccount[]>();\n public metricStore: string;\n public providers: string[];\n public accounts: IAccountDetails[];\n public clusterList: string[];\n\n constructor(\n private $scope: IScope,\n private $uibModal: IModalService,\n private $log: ILogService,\n private serverGroupCommandBuilder: ServerGroupCommandBuilderService,\n private serverGroupTransformer: any,\n public stage: IKayentaStage,\n ) {\n 'ngInject';\n this.initialize();\n }\n\n private initialize = async (): Promise<void> => {\n await this.loadBackingData();\n\n const firstStorageAccount = first(this.kayentaAccounts.get(KayentaAccountType.ObjectStore));\n const firstMetricsAccount = first(this.kayentaAccounts.get(KayentaAccountType.MetricsStore));\n\n this.stage.canaryConfig = {\n storageAccountName: (firstStorageAccount && firstStorageAccount.name) || CanarySettings.storageAccountName,\n metricsAccountName: (firstMetricsAccount && firstMetricsAccount.name) || CanarySettings.metricsAccountName,\n ...this.stage.canaryConfig,\n scoreThresholds: {\n marginal: null,\n pass: null,\n ...get(this.stage, 'canaryConfig.scoreThresholds'),\n },\n };\n\n this.stage.analysisType = this.stage.analysisType || this.state.analysisTypes[0];\n\n if (!this.stage.canaryConfig.scopes || !this.stage.canaryConfig.scopes.length) {\n this.stage.canaryConfig.scopes = [{ scopeName: 'default' } as IKayentaStageCanaryConfigScope];\n }\n\n if (!this.stage.isNew) {\n const stageLifetimeDuration: string = get(this.stage, 'canaryConfig.lifetimeDuration');\n this.state.lifetime = parseDurationString(stageLifetimeDuration);\n\n const stageDelayBeforeCleanupDuration: string = get(this.stage, 'deployments.delayBeforeCleanup');\n this.state.delayBeforeCleanup = parseDurationString(stageDelayBeforeCleanupDuration);\n }\n\n if (this.stage.canaryConfig.lookbackMins) {\n this.state.useLookback = true;\n }\n\n this.populateScopeNameChoices();\n this.setMetricStore();\n this.setLocations();\n this.setShowAdvancedSettings();\n this.setClusterList();\n this.deleteConfigAccountsIfMissing();\n this.updateLifetimeFromHoursToDuration();\n this.deleteCanaryConfigIdIfMissing();\n\n if (CanarySettings.legacySiteLocalFieldsEnabled) {\n this.setLegacySiteLocalRecipients();\n }\n\n if (this.stage.isNew && this.stage.analysisType === KayentaAnalysisType.RealTimeAutomatic) {\n await this.initializeRealTimeAutomaticAnalysisType();\n }\n };\n\n private loadBackingData = async (): Promise<void> => {\n this.state.backingDataLoading = true;\n try {\n await this.$scope.application.ready();\n [\n this.selectedCanaryConfigDetails,\n this.kayentaAccounts,\n this.providers,\n this.accounts,\n this.canaryConfigSummaries,\n ] = await Promise.all([\n this.loadCanaryConfigDetails(),\n this.loadKayentaAccounts(),\n this.loadProviders(),\n this.loadAccounts(),\n Promise.resolve(this.$scope.application.getDataSource('canaryConfigs').data),\n ]);\n } catch (e) {\n this.$log.warn('Error loading backing data for Kayenta stage: ', e);\n } finally {\n this.state.backingDataLoading = false;\n\n // This is the price we pay for async/await, since we're not using $q.\n this.$scope.$applyAsync();\n }\n };\n\n public onUseLookbackChange = (): void => {\n if (!this.state.useLookback) {\n delete this.stage.canaryConfig.lookbackMins;\n }\n };\n\n public onCanaryConfigSelect = async (): Promise<void> => {\n this.selectedCanaryConfigDetails = await this.loadCanaryConfigDetails();\n this.populateScopeNameChoices();\n this.setMetricStore();\n };\n\n public isExpression = (val: number | string): boolean => {\n return isString(val) && val.includes('${');\n };\n\n public handleScoreThresholdChange = (scoreThresholds: { successfulScore: string; unhealthyScore: string }): void => {\n // Called from a React component.\n this.$scope.$applyAsync(() => {\n this.stage.canaryConfig.scoreThresholds.pass = scoreThresholds.successfulScore;\n this.stage.canaryConfig.scoreThresholds.marginal = scoreThresholds.unhealthyScore;\n });\n };\n\n public handleAnalysisTypeChange = async (type: KayentaAnalysisType): Promise<void> => {\n this.stage.analysisType = type;\n\n switch (this.stage.analysisType) {\n case KayentaAnalysisType.RealTime:\n delete this.stage.canaryConfig.scopes[0].startTimeIso;\n delete this.stage.canaryConfig.scopes[0].endTimeIso;\n delete this.stage.deployments;\n\n if (this.metricStore === 'atlas') {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n unset(scope, 'extendedScopeParams.dataset');\n unset(scope, 'extendedScopeParams.environment');\n });\n this.setAtlasScopeParams();\n }\n break;\n case KayentaAnalysisType.RealTimeAutomatic:\n delete this.stage.canaryConfig.scopes[0].startTimeIso;\n delete this.stage.canaryConfig.scopes[0].endTimeIso;\n delete this.stage.canaryConfig.scopes[0].controlLocation;\n delete this.stage.canaryConfig.scopes[0].experimentLocation;\n this.initializeRealTimeAutomaticAnalysisType();\n break;\n case KayentaAnalysisType.Retrospective:\n delete this.stage.canaryConfig.beginCanaryAnalysisAfterMins;\n delete this.stage.canaryConfig.lifetimeDuration;\n delete this.stage.deployments;\n\n if (this.metricStore === 'atlas') {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n unset(scope, 'extendedScopeParams.dataset');\n unset(scope, 'extendedScopeParams.environment');\n });\n this.setAtlasScopeParams();\n }\n break;\n }\n // Called from React.\n this.$scope.$applyAsync();\n };\n\n private initializeRealTimeAutomaticAnalysisType = async (): Promise<void> => {\n this.stage.deployments = {\n ...this.stage.deployments,\n baseline: {\n ...get(this.stage, 'deployments.baseline'),\n cloudProvider: this.providers[0],\n application: this.$scope.application.name,\n cluster: null,\n account: null,\n },\n serverGroupPairs: [],\n };\n this.accounts = await this.loadAccounts();\n this.setClusterList();\n this.setMetricStore();\n };\n\n private loadCanaryConfigDetails = async (): Promise<ICanaryConfig> => {\n if (!has(this.stage, 'canaryConfig.canaryConfigId')) {\n return null;\n }\n const id = this.stage.canaryConfig.canaryConfigId;\n\n try {\n return getCanaryConfigById(id);\n } catch (e) {\n this.$log.warn(`Could not load canary config with id ${id}: `, e);\n return null;\n }\n };\n\n private setMetricStore = (): void => {\n this.metricStore = get(this.selectedCanaryConfigDetails, 'metrics[0].query.type');\n\n if (this.metricStore === 'atlas') {\n this.setAtlasScopeParams();\n this.$scope.$applyAsync();\n } else {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n unset(scope, 'extendedScopeParams.type');\n });\n }\n };\n\n private setAtlasScopeParams = (): void => {\n const isRealTimeAutomatic = this.stage.analysisType === KayentaAnalysisType.RealTimeAutomatic;\n\n const existingScopeType = get(this.stage.canaryConfig.scopes[0], 'extendedScopeParams.type') as string;\n if (!isRealTimeAutomatic) {\n this.state.atlasScopeType = existingScopeType !== 'asg' ? existingScopeType : 'cluster';\n }\n this.stage.canaryConfig.scopes.forEach((scope) => {\n set(scope, 'extendedScopeParams.type', isRealTimeAutomatic ? 'asg' : this.state.atlasScopeType);\n });\n\n if (isRealTimeAutomatic) {\n this.state.useAtlasGlobalDataset =\n get(this.stage.canaryConfig.scopes[0], 'extendedScopeParams.dataset') === 'global';\n this.stage.canaryConfig.scopes.forEach((scope) => {\n set(scope, 'extendedScopeParams.dataset', this.state.useAtlasGlobalDataset ? 'global' : 'regional');\n });\n }\n };\n\n private setLocations = (): void => {\n const { recommendedLocations, locations, hasChoices } = this.getLocationChoices();\n\n if (!hasChoices) {\n return;\n }\n\n this.state.showAllLocations.control = this.state.showAllLocations.experiment =\n recommendedLocations.length === 0 && locations.length > 0;\n\n this.stage.canaryConfig.scopes.forEach((scope) => {\n if (!recommendedLocations.includes(scope.controlLocation) && !locations.includes(scope.controlLocation)) {\n delete scope.controlLocation;\n } else if (!recommendedLocations.includes(scope.controlLocation)) {\n this.state.showAllLocations.control = true;\n }\n\n if (!recommendedLocations.includes(scope.experimentLocation) && !locations.includes(scope.experimentLocation)) {\n delete scope.experimentLocation;\n } else if (!recommendedLocations.includes(scope.experimentLocation)) {\n this.state.showAllLocations.experiment = true;\n }\n });\n };\n\n private setShowAdvancedSettings = (): void => {\n this.state.showAdvancedSettings =\n this.kayentaAccounts.get(KayentaAccountType.MetricsStore).length > 1 ||\n this.kayentaAccounts.get(KayentaAccountType.ObjectStore).length > 1 ||\n this.scopeNames.length > 1 ||\n CanarySettings.legacySiteLocalFieldsEnabled;\n };\n\n public getLocationChoices = (): {\n combinedLocations: { control: string[]; experiment: string[] };\n recommendedLocations: string[];\n locations: string[];\n hasChoices: boolean;\n } => {\n const accounts = this.kayentaAccounts.get(KayentaAccountType.MetricsStore);\n const selectedAccount =\n accounts && accounts.find(({ name }) => name === this.stage.canaryConfig.metricsAccountName);\n if (!selectedAccount) {\n return {\n combinedLocations: { control: [], experiment: [] },\n recommendedLocations: [],\n locations: [],\n hasChoices: false,\n };\n }\n\n const hasChoices = selectedAccount.locations.length > 0 || selectedAccount.recommendedLocations.length > 0;\n const allLocations = selectedAccount.recommendedLocations.concat(selectedAccount.locations);\n const control = uniq(\n this.state.showAllLocations.control\n ? allLocations\n : selectedAccount.recommendedLocations.length > 0\n ? selectedAccount.recommendedLocations\n : selectedAccount.locations,\n );\n const experiment = uniq(\n this.state.showAllLocations.experiment\n ? allLocations\n : selectedAccount.recommendedLocations.length > 0\n ? selectedAccount.recommendedLocations\n : selectedAccount.locations,\n );\n\n return {\n combinedLocations: {\n control,\n experiment,\n },\n recommendedLocations: selectedAccount.recommendedLocations,\n locations: selectedAccount.locations,\n hasChoices,\n };\n };\n\n public toggleAllLocations = (type: 'control' | 'experiment'): void => {\n this.state.showAllLocations[type] = !this.state.showAllLocations[type];\n\n const locationChoices = this.getLocationChoices();\n\n this.stage.canaryConfig.scopes.forEach((scope) => {\n if (!locationChoices.combinedLocations.control.includes(scope.controlLocation)) {\n delete scope.controlLocation;\n }\n if (!locationChoices.combinedLocations.experiment.includes(scope.experimentLocation)) {\n delete scope.experimentLocation;\n }\n });\n };\n\n private populateScopeNameChoices = (): void => {\n if (!this.selectedCanaryConfigDetails) {\n return;\n }\n\n const scopeNames = uniq(map(this.selectedCanaryConfigDetails.metrics, (metric) => metric.scopeName || 'default'));\n this.scopeNames = !isEmpty(scopeNames) ? scopeNames : ['default'];\n this.setShowAdvancedSettings();\n\n if (!isEmpty(this.stage.canaryConfig.scopes) && !scopeNames.includes(this.stage.canaryConfig.scopes[0].scopeName)) {\n delete this.stage.canaryConfig.scopes[0].scopeName;\n } else if (isEmpty(this.stage.canaryConfig.scopes)) {\n this.stage.canaryConfig.scopes = [{ scopeName: scopeNames[0] }] as IKayentaStageCanaryConfigScope[];\n }\n };\n\n private loadKayentaAccounts = async (): Promise<Map<KayentaAccountType, IKayentaAccount[]>> => {\n const mapped = new Map<KayentaAccountType, IKayentaAccount[]>();\n const accounts = await listKayentaAccounts();\n\n accounts.forEach((account) => {\n account.supportedTypes.forEach((type) => {\n if (mapped.has(type)) {\n mapped.set(type, mapped.get(type).concat([account]));\n } else {\n mapped.set(type, [account]);\n }\n });\n });\n\n return mapped;\n };\n\n private deleteConfigAccountsIfMissing = (): void => {\n if (\n (this.kayentaAccounts.get(KayentaAccountType.ObjectStore) || []).every(\n (account) => account.name !== this.stage.canaryConfig.storageAccountName,\n )\n ) {\n delete this.stage.canaryConfig.storageAccountName;\n }\n if (\n (this.kayentaAccounts.get(KayentaAccountType.MetricsStore) || []).every(\n (account) => account.name !== this.stage.canaryConfig.metricsAccountName,\n )\n ) {\n delete this.stage.canaryConfig.metricsAccountName;\n }\n };\n\n private deleteCanaryConfigIdIfMissing = (): void => {\n if (this.canaryConfigSummaries.every((s) => s.id !== this.stage.canaryConfig.canaryConfigId)) {\n delete this.stage.canaryConfig.canaryConfigId;\n }\n };\n\n public populateScopeWithExpressions = (): void => {\n this.stage.canaryConfig.scopes[0].controlScope =\n \"${ #stage('Clone Server Group')['context']['source']['serverGroupName'] }\";\n this.stage.canaryConfig.scopes[0].controlLocation = '${ deployedServerGroups[0].region }';\n this.stage.canaryConfig.scopes[0].experimentScope = '${ deployedServerGroups[0].serverGroup }';\n this.stage.canaryConfig.scopes[0].experimentLocation = '${ deployedServerGroups[0].region }';\n };\n\n public onLifetimeChange = (): void => {\n this.stage.canaryConfig.lifetimeDuration = getDurationString(this.state.lifetime);\n };\n\n private updateLifetimeFromHoursToDuration = (): void => {\n if (has(this.stage, ['canaryConfig', 'lifetimeHours'])) {\n const hours = parseInt(this.stage.canaryConfig.lifetimeHours, 10);\n if (isFinite(hours)) {\n const fractional = parseFloat(this.stage.canaryConfig.lifetimeHours) - hours;\n const minutes = Math.floor(fractional * 60);\n this.stage.canaryConfig.lifetimeDuration = `PT${hours}H`;\n if (isFinite(minutes)) {\n this.stage.canaryConfig.lifetimeDuration += `${minutes}M`;\n }\n this.state.lifetimeHoursUpdatedToDuration = true;\n }\n delete this.stage.canaryConfig.lifetimeHours;\n }\n };\n\n public getLifetimeClassnames = (): string => {\n if (this.state.lifetimeHoursUpdatedToDuration) {\n return 'alert alert-warning';\n }\n return '';\n };\n\n public getLifetimeInputClassnames = (): string => {\n const { hours, minutes } = this.state.lifetime;\n if (hours === 0 && minutes === 0) {\n return 'ng-invalid ng-invalid-required';\n }\n return '';\n };\n\n private loadProviders = async (): Promise<string[]> => {\n this.providers = (await AccountService.listProviders(this.$scope.application)).filter((p) =>\n REAL_TIME_AUTOMATIC_PROVIDERS.includes(p),\n );\n // If none of the application's providers support real time automatic mode, don't show it!\n if (!this.providers.length) {\n this.state.analysisTypes = [KayentaAnalysisType.RealTime, KayentaAnalysisType.Retrospective];\n }\n return this.providers;\n };\n\n public handleProviderChange = async (): Promise<void> => {\n set(this.stage, 'deployments.baseline.account', null);\n set(this.stage, 'deployments.baseline.cluster', null);\n this.accounts = await this.loadAccounts();\n this.setClusterList();\n };\n\n public loadAccounts = (): Promise<IAccountDetails[]> => {\n if (!has(this.stage, 'deployments.baseline.cloudProvider')) {\n return null;\n }\n\n return Promise.resolve(AccountService.listAccounts(this.stage.deployments.baseline.cloudProvider));\n };\n\n private setClusterList = (): void => {\n this.clusterList = AppListExtractor.getClusters([this.$scope.application], (sg) =>\n has(this.stage, 'deployments.baseline.account') ? sg.account === this.stage.deployments.baseline.account : true,\n );\n\n this.setAtlasEnvironment();\n };\n\n private setAtlasEnvironment = (): void => {\n if (this.metricStore === 'atlas' && this.stage.analysisType === KayentaAnalysisType.RealTimeAutomatic) {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n if (this.stage.deployments.baseline.account) {\n const accountDetails = this.accounts.find(({ name }) => this.stage.deployments.baseline.account === name);\n accountDetails && set(scope, 'extendedScopeParams.environment', accountDetails.environment);\n } else {\n unset(scope, 'extendedScopeParams.environment');\n }\n });\n }\n };\n\n private setLegacySiteLocalRecipients = (): void => {\n const recipients = get(this.stage.canaryConfig, 'siteLocal.notificationEmail');\n\n if (Array.isArray(recipients)) {\n this.state.legacySiteLocalRecipients = recipients.join(',');\n } else {\n this.state.legacySiteLocalRecipients = isString(recipients) ? recipients : '';\n }\n };\n\n public handleLegacySiteLocalRecipientsChange = (): void => {\n if (this.state.legacySiteLocalRecipients.includes('${')) {\n set(this.stage.canaryConfig, 'siteLocal.notificationEmail', this.state.legacySiteLocalRecipients);\n } else if (this.state.legacySiteLocalRecipients.length) {\n set(\n this.stage.canaryConfig,\n 'siteLocal.notificationEmail',\n this.state.legacySiteLocalRecipients.split(',').map((email) => email.trim()),\n );\n } else {\n delete this.stage.canaryConfig.siteLocal;\n }\n };\n\n public getRegion = (serverGroup: any): string => {\n if (serverGroup.region) {\n return serverGroup.region;\n }\n const availabilityZones = serverGroup.availabilityZones;\n return availabilityZones\n ? Object.keys(availabilityZones).length\n ? Object.keys(availabilityZones)[0]\n : 'n/a'\n : 'n/a';\n };\n\n public getServerGroupName = (serverGroup: any): string => {\n return NameUtils.getClusterName(serverGroup.application, serverGroup.stack, serverGroup.freeFormDetails);\n };\n\n public addPair = async (): Promise<void> => {\n this.stage.deployments.serverGroupPairs = this.stage.deployments.serverGroupPairs || [];\n const provider = await (has(this.stage, 'deployments.baseline.cloudProvider')\n ? Promise.resolve(this.stage.deployments.baseline.cloudProvider)\n : Promise.resolve(ProviderSelectionService.selectProvider(this.$scope.application, 'serverGroup')));\n this.stage.deployments.baseline.cloudProvider = provider;\n const config = CloudProviderRegistry.getValue(provider, 'serverGroup');\n\n const command: any = await this.serverGroupCommandBuilder.buildNewServerGroupCommandForPipeline(\n provider,\n null,\n null,\n );\n\n command.viewState = {\n ...command.viewState,\n requiresTemplateSelection: true,\n disableStrategySelection: true,\n hideClusterNamePreview: true,\n readOnlyFields: {\n credentials: true,\n region: true,\n subnet: true,\n useSourceCapacity: true,\n },\n overrides: {\n capacity: {\n min: 1,\n max: 1,\n desired: 1,\n },\n useSourceCapacity: false,\n },\n imageSourceText: `\n <p>This dialogue will configure two server groups.</p>\n <p>\n The <b>Baseline</b> server group's image will be resolved\n from the <b>Newest</b> server group\n in the <b>Baseline Version</b> cluster defined in this stage.\n </p>\n <p>\n The <b>Canary</b> server group's image will be resolved from\n an upstream <b>Bake</b> or <b>Find Image</b> stage.\n </p>`,\n };\n\n delete command.strategy;\n try {\n const title = 'Add Baseline + Canary Pair';\n const application = this.$scope.application;\n\n let result;\n if (config.CloneServerGroupModal) {\n // react\n result = await config.CloneServerGroupModal.show({\n title,\n application,\n command,\n });\n } else {\n // angular\n result = await this.$uibModal.open({\n templateUrl: config.cloneServerGroupTemplateUrl,\n controller: `${config.cloneServerGroupController} as ctrl`,\n size: 'lg',\n resolve: {\n title: () => title,\n application: () => application,\n serverGroupCommand: () => command,\n },\n }).result;\n }\n const control = this.serverGroupTransformer.convertServerGroupCommandToDeployConfiguration(result);\n const experiment = cloneDeep(control);\n\n const cleanup = (serverGroup: any, type: string) => {\n delete serverGroup.backingData;\n if (serverGroup.freeFormDetails && serverGroup.freeFormDetails.split('-').pop() === type) {\n return;\n }\n serverGroup.freeFormDetails = `${serverGroup.freeFormDetails ? `${serverGroup.freeFormDetails}-` : ''}${type}`;\n };\n\n cleanup(control, 'baseline');\n cleanup(experiment, 'canary');\n this.stage.deployments.serverGroupPairs = [{ control, experiment }];\n this.$scope.$applyAsync();\n } catch (e) {\n this.$log.warn('Error creating server group pair for Kayenta stage: ', e);\n }\n };\n\n public editServerGroup = async (\n serverGroup: any,\n index: number,\n type: keyof IKayentaServerGroupPair,\n ): Promise<void> => {\n serverGroup.provider = serverGroup.provider || serverGroup.cloudProvider;\n const config = CloudProviderRegistry.getValue(serverGroup.cloudProvider, 'serverGroup');\n try {\n const title = `Configure ${type[0].toUpperCase() + type.substring(1)} Server Group`;\n const application = this.$scope.application;\n\n const command = await this.serverGroupCommandBuilder.buildServerGroupCommandFromPipeline(\n application,\n serverGroup,\n null,\n null,\n );\n command.viewState = {\n ...command.viewState,\n disableStrategySelection: true,\n hideClusterNamePreview: true,\n readOnlyFields: {\n credentials: true,\n region: true,\n subnet: true,\n useSourceCapacity: true,\n },\n imageSourceText: this.resolveImageSourceText(type),\n };\n delete command.strategy;\n\n let result;\n if (config.CloneServerGroupModal) {\n // react\n result = await config.CloneServerGroupModal.show({\n title,\n application,\n command,\n });\n } else {\n // angular\n result = await this.$uibModal.open({\n templateUrl: config.cloneServerGroupTemplateUrl,\n controller: `${config.cloneServerGroupController} as ctrl`,\n size: 'lg',\n resolve: {\n title: () => title,\n application: () => application,\n serverGroupCommand: () => command,\n },\n }).result;\n }\n\n this.stage.deployments.serverGroupPairs[index][\n type\n ] = this.serverGroupTransformer.convertServerGroupCommandToDeployConfiguration(result);\n } catch (e) {\n this.$log.warn('Error editing server group pair for Kayenta stage: ', e);\n }\n };\n\n public deletePair = (index: number): void => {\n (this.stage.deployments.serverGroupPairs || []).splice(index, 1);\n };\n\n private resolveImageSourceText(type: keyof IKayentaServerGroupPair): string {\n if (type === 'experiment') {\n return `This server group's image will be resolved from an upstream\n <b>Bake</b> or <b>Find Image</b> stage.`;\n } else {\n return `This server group's image will be resolved from the <b>Newest</b>\n server group in the <b>Baseline Version</b> cluster defined in this stage.`;\n }\n }\n\n public handleAtlasDatasetChange = (event: Event): void => {\n const { checked } = event.target as HTMLInputElement;\n this.$scope.$applyAsync(() => {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n set(scope, 'extendedScopeParams.dataset', checked ? 'global' : 'regional');\n set(\n scope,\n 'extendedScopeParams.type',\n this.stage.analysisType === KayentaAnalysisType.RealTimeAutomatic ? 'asg' : this.state.atlasScopeType,\n );\n });\n });\n };\n\n public onAtlasScopeTypeChange = (): void => {\n this.$scope.$applyAsync(() => {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n set(scope, 'extendedScopeParams.type', this.state.atlasScopeType);\n });\n });\n };\n\n public handleExtendedScopeParamsChange = (): void => {\n if (this.metricStore !== 'atlas') {\n return;\n }\n\n this.stage.canaryConfig.scopes.forEach((scope) => {\n set(\n scope,\n 'extendedScopeParams.type',\n this.stage.analysisType === KayentaAnalysisType.RealTimeAutomatic ? 'asg' : this.state.atlasScopeType,\n );\n });\n\n if (this.stage.analysisType === KayentaAnalysisType.RealTimeAutomatic) {\n this.stage.canaryConfig.scopes.forEach((scope) => {\n set(scope, 'extendedScopeParams.dataset', this.state.useAtlasGlobalDataset ? 'global' : 'regional');\n });\n this.setAtlasEnvironment();\n }\n this.$scope.$applyAsync();\n };\n\n public onDelayBeforeCleanupChange = (): void => {\n this.stage.deployments.delayBeforeCleanup = getDurationString(this.state.delayBeforeCleanup);\n };\n}\n","export const KAYENTA_CANARY = 'kayentaCanary';\nexport const RUN_CANARY = 'runCanary';\nexport const WAIT = 'wait';\nexport const CREATE_SERVER_GROUP = 'createServerGroup';\nexport const DEPLOY_CANARY_SERVER_GROUPS = 'deployCanaryServerGroups';\n","import { get, last, round } from 'lodash';\n\nimport { Application, IExecution, IExecutionStage, ITransformer, OrchestratedItemTransformer } from '@spinnaker/core';\n\nimport { CREATE_SERVER_GROUP, DEPLOY_CANARY_SERVER_GROUPS, KAYENTA_CANARY, RUN_CANARY, WAIT } from './stageTypes';\n\nconst stageTypesToAlwaysShow = [KAYENTA_CANARY, CREATE_SERVER_GROUP];\n\nexport class KayentaStageTransformer implements ITransformer {\n public transform(_application: Application, execution: IExecution): void {\n const kayentaStages = execution.stages.filter(({ type }) => type === KAYENTA_CANARY);\n if (!kayentaStages.length) {\n return;\n }\n\n let stagesToRenderAsTasks: IExecutionStage[] = [];\n\n execution.stages.forEach((stage) => {\n if (stage.type === KAYENTA_CANARY) {\n OrchestratedItemTransformer.defineProperties(stage);\n\n const intervalStageId: string = stage.context.intervalStageId;\n const syntheticCanaryStages = intervalStageId\n ? execution.stages.filter(\n ({ parentStageId, type }) =>\n parentStageId && parentStageId === intervalStageId && [WAIT, RUN_CANARY].includes(type),\n )\n : [];\n\n stagesToRenderAsTasks = stagesToRenderAsTasks.concat(syntheticCanaryStages);\n\n const runCanaryStages = syntheticCanaryStages.filter((s) => s.type === RUN_CANARY);\n syntheticCanaryStages.forEach((syntheticStage) => OrchestratedItemTransformer.defineProperties(syntheticStage));\n this.calculateRunCanaryResults(runCanaryStages);\n this.calculateKayentaCanaryResults(stage, syntheticCanaryStages);\n\n stage.exceptions = [];\n this.addExceptions([stage, ...syntheticCanaryStages], stage.exceptions);\n\n // For now, a 'kayentaCanary' stage should only have an 'aggregateCanaryResults' task, which should definitely go last.\n stage.tasks = [...syntheticCanaryStages, ...stage.tasks];\n } else if (stage.type === CREATE_SERVER_GROUP && this.isDescendantOf(stage, kayentaStages, execution)) {\n OrchestratedItemTransformer.defineProperties(stage);\n const parentKayentaStageId = this.isDescendantOf(stage, kayentaStages, execution);\n const locations = stage.context['deploy.server.groups'] && Object.keys(stage.context['deploy.server.groups']);\n stage.name = `Deploy ${stage.context.freeFormDetails}${locations ? ' in ' + locations.join(', ') : ''}`;\n stage.parentStageId = parentKayentaStageId;\n }\n });\n\n const kayentaStageIds = kayentaStages.map(({ id }) => id);\n const deployCanaryServerGroupsStages = execution.stages.filter(\n ({ parentStageId, type }) => kayentaStageIds.includes(parentStageId) && type === DEPLOY_CANARY_SERVER_GROUPS,\n );\n\n deployCanaryServerGroupsStages.forEach((deployCanaryStage) => {\n const parentKayentaStage = kayentaStages.find(({ id }) => deployCanaryStage.parentStageId === id);\n if (parentKayentaStage && (deployCanaryStage.outputs.deployedServerGroups || []).length) {\n const [{ controlScope, experimentScope }] = deployCanaryStage.outputs.deployedServerGroups;\n parentKayentaStage.outputs = { ...parentKayentaStage.outputs, controlScope, experimentScope };\n }\n });\n execution.stages = execution.stages.filter(\n (stage) =>\n !stagesToRenderAsTasks.includes(stage) &&\n (!this.isDescendantOf(stage, kayentaStages, execution) ||\n stageTypesToAlwaysShow.includes(stage.type) ||\n stage.status !== 'SUCCEEDED'),\n );\n }\n\n private isDescendantOf(child: IExecutionStage, ancestors: IExecutionStage[], execution: IExecution) {\n const ancestorIds = ancestors.map(({ id }) => id);\n let node = child;\n while (node && node.parentStageId) {\n const parentNode = execution.stages.find(({ id }) => node.parentStageId === id);\n if (parentNode && ancestorIds.includes(parentNode.id)) {\n return parentNode.id;\n } else {\n node = parentNode;\n }\n }\n\n return null;\n }\n\n // Massages each runCanary stage into what the `canaryScore` component expects.\n private calculateRunCanaryResults(runCanaryStages: IExecutionStage[]): void {\n runCanaryStages.forEach((run) => {\n if (typeof run.getValueFor('canaryScore') === 'number') {\n if (run.status === 'SUCCEEDED') {\n if (run.context.canaryScore >= run.context.scoreThresholds.pass) {\n run.result = 'success';\n }\n } else {\n run.health = 'unhealthy';\n }\n\n run.context.canaryScore = round(run.context.canaryScore, 2);\n }\n });\n }\n\n // Massages the kayentaCanary stage results into what the `canaryScore` component expects.\n private calculateKayentaCanaryResults(kayentaStage: IExecutionStage, runCanaryStages: IExecutionStage[]): void {\n if (!kayentaStage.isRunning) {\n if (kayentaStage.getValueFor('canaryScores')) {\n // If we made it through the final scheduled canary run, this should\n // be the same as the value returned from `getLastCanaryRunScore`,\n // but this is also how Orca determines the overall score.\n kayentaStage.context.overallScore = last(kayentaStage.getValueFor('canaryScores'));\n } else {\n kayentaStage.context.overallScore = this.getLastCanaryRunScore(runCanaryStages);\n }\n kayentaStage.context.overallScore = round(kayentaStage.context.overallScore, 2);\n\n // Sometimes when the very first runCanary stage fails due to a low score\n // it never adds its canaryScoreMessage to the kayenta stage.\n if (!kayentaStage.context.canaryScoreMessage) {\n kayentaStage.context.canaryScoreMessage = this.getLastCanaryScoreMessage(runCanaryStages);\n }\n\n if (!kayentaStage.isCanceled) {\n const overallScore = get(kayentaStage, 'context.overallScore', null);\n const scoreThreshold = get(kayentaStage, 'context.canaryConfig.scoreThresholds.marginal', null);\n if (kayentaStage.status === 'SUCCEEDED' || (overallScore && overallScore > scoreThreshold)) {\n kayentaStage.context.overallResult = 'success';\n } else {\n kayentaStage.context.overallHealth = 'unhealthy';\n }\n }\n }\n }\n\n private getLastCanaryRunScore(runCanaryStages: IExecutionStage[] = []): number {\n const canaryRunScores = runCanaryStages\n .filter((s) => typeof s.getValueFor('canaryScore') === 'number')\n .map((s) => s.getValueFor('canaryScore'));\n return last(canaryRunScores);\n }\n\n private getLastCanaryScoreMessage(runCanaryStages: IExecutionStage[] = []): number {\n const canaryRunMessages = runCanaryStages\n .filter((s) => s.getValueFor('canaryScoreMessage'))\n .map((s) => s.getValueFor('canaryScoreMessage'));\n return last(canaryRunMessages);\n }\n\n private addExceptions(stages: IExecutionStage[], exceptions: string[]): void {\n stages.forEach((stage) => {\n if (this.getException(stage)) {\n exceptions.push(this.getException(stage));\n }\n const overallScore = get(stage, 'context.overallScore', null);\n const scoreThreshold = get(stage, 'context.canaryConfig.scoreThresholds.marginal', null);\n const message = get(stage, 'context.canaryScoreMessage', null);\n if (overallScore && message && overallScore <= scoreThreshold) {\n exceptions.push(message);\n }\n });\n }\n\n private getException(stage: IExecutionStage): string {\n if (stage && stage.isFailed) {\n if (\n stage.context &&\n stage.context.exception &&\n stage.context.exception.details &&\n stage.context.exception.details.responseBody\n ) {\n return stage.context.exception.details.responseBody;\n } else {\n return stage.failureMessage;\n }\n } else {\n return null;\n }\n }\n}\n","import { IComponentOptions, module } from 'angular';\n\nconst kayentaStageConfigSection: IComponentOptions = {\n transclude: {\n sectionHeader: '?sectionHeader',\n },\n bindings: { title: '@' },\n template: `\n <section>\n <ul class=\"list-inline\">\n <li><h5>{{ $ctrl.title }}</h5></li>\n <li><span ng-transclude=\"sectionHeader\"></span></li>\n </ul>\n <div class=\"horizontal-rule\"></div>\n <ng-transclude></ng-transclude>\n </section>\n `,\n};\n\nexport const KAYENTA_STAGE_CONFIG_SECTION = 'spinnaker.kayenta.stageConfigSection';\nmodule(KAYENTA_STAGE_CONFIG_SECTION, []).component('kayentaStageConfigSection', kayentaStageConfigSection);\n","import classNames from 'classnames';\nimport * as React from 'react';\n\nimport '../canary.less';\n\nexport const STYLEGUIDE_CLASS = 'styleguide';\nexport const KAYENTA_CLASS = 'kayenta';\n\nexport interface IStyleguideProps {\n children: JSX.Element | JSX.Element[];\n className?: string;\n}\n\nexport default function Styleguide({ children, className }: IStyleguideProps) {\n return <div className={classNames(STYLEGUIDE_CLASS, KAYENTA_CLASS, className)}>{children}</div>;\n}\n","import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { ITableColumn } from './tableColumn';\n\nexport interface INativeTableHeaderProps<T = any> {\n rows: T[];\n columns: Array<ITableColumn<T>>;\n className: string;\n}\n\nexport const NativeTableHeader = ({ rows = [], columns, className }: INativeTableHeaderProps) => {\n return (\n <thead className={className}>\n <tr>\n {columns.map(({ label, labelClassName, hide }, i) => (\n <th key={label || i} className=\"native-table-header\">\n {(!hide || !rows.every(hide)) && (\n <h6 className={classNames('heading-6', 'uppercase', 'color-text-primary', labelClassName)}>{label}</h6>\n )}\n </th>\n ))}\n </tr>\n </thead>\n );\n};\n","import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { NativeTableHeader } from './nativeTableHeader';\nimport { ITableColumn } from './tableColumn';\n\nexport interface INativeTableProps<T> {\n rows: T[];\n columns: Array<ITableColumn<T>>;\n rowKey: (row: T) => string;\n tableBodyClassName?: string;\n headerClassName?: string;\n rowClassName?: (row: T) => string;\n onRowClick?: (row: T) => void;\n customRow?: (row: T) => JSX.Element;\n className?: string;\n}\n\nexport function NativeTable<T>({\n rows,\n columns,\n rowKey,\n tableBodyClassName,\n rowClassName,\n onRowClick,\n customRow,\n className,\n headerClassName,\n}: INativeTableProps<T>) {\n const TableRow = ({ row }: { row: T }) => (\n <tr\n onClick={onRowClick ? () => onRowClick(row) : null}\n className={classNames({ 'table-row': !rowClassName }, rowClassName && rowClassName(row))}\n >\n {columns.map(({ label, hide, getContent }, i) => (\n <td key={label || i}>{(!hide || !hide(row)) && getContent(row)}</td>\n ))}\n </tr>\n );\n\n return (\n <table className={className}>\n <NativeTableHeader rows={rows} columns={columns} className={classNames('table-header', headerClassName)} />\n <tbody className={tableBodyClassName}>\n {rows.map((r) =>\n customRow && customRow(r) ? <td key={rowKey(r)}>{customRow(r)}</td> : <TableRow key={rowKey(r)} row={r} />,\n )}\n </tbody>\n </table>\n );\n}\n","import { CanaryScore } from 'kayenta/components/canaryScore';\nimport Styleguide from 'kayenta/layout/styleguide';\nimport { ITableColumn, NativeTable } from 'kayenta/layout/table';\nimport { get, has } from 'lodash';\nimport * as React from 'react';\n\nimport { CopyToClipboard, HoverablePopover, IStage, ReactInjector, timestamp } from '@spinnaker/core';\n\nimport './canaryRunSummaries.less';\n\nexport interface ICanarySummariesProps {\n canaryRuns: IStage[];\n firstScopeName: string;\n}\n\nexport interface ICanaryRunColumn {\n label?: string;\n width: number;\n getContent: (run: IStage, firstScopeName?: string) => JSX.Element;\n}\n\nexport default function CanaryRunSummaries({ canaryRuns, firstScopeName }: ICanarySummariesProps) {\n const canaryRunColumns: Array<ITableColumn<IStage>> = [\n {\n label: 'Canary Result',\n getContent: (run) => {\n return (\n <>\n <CanaryScore\n score={run.context.canaryScore}\n health={run.health}\n result={run.result}\n inverse={false}\n className=\"label\"\n />\n {get(run, ['context', 'warnings'], []).length > 0 && (\n <HoverablePopover template={<CanaryRunWarningMessages messages={run.context.warnings} />}>\n <i className=\"fa fa-exclamation-triangle\" style={{ paddingLeft: '8px' }} />\n </HoverablePopover>\n )}\n </>\n );\n },\n },\n {\n label: 'Duration',\n getContent: (run) => <span>{run.context.durationString || ' - '}</span>,\n },\n {\n label: 'Last Updated',\n getContent: (run) => <span>{timestamp(run.context.lastUpdated)}</span>,\n },\n {\n getContent: (run) => {\n const popoverTemplate = <CanaryRunTimestamps canaryRun={run} firstScopeName={firstScopeName} />;\n return (\n <section className=\"horizontal text-center\">\n <div className=\"flex-1\">\n <ReportLink canaryRun={run} />\n </div>\n <div className=\"flex-1\">\n <HoverablePopover template={popoverTemplate}>\n <i className=\"far fa-clock\" />\n </HoverablePopover>\n </div>\n </section>\n );\n },\n },\n ];\n\n return (\n <Styleguide className=\"horizontal flex-1\">\n <NativeTable\n rows={canaryRuns}\n className=\"header-transparent flex-1\"\n columns={canaryRunColumns}\n rowKey={(run) => run.id}\n />\n </Styleguide>\n );\n}\n\nfunction CanaryRunTimestamps({ canaryRun, firstScopeName }: { canaryRun: IStage; firstScopeName: string }) {\n const toolTipText = 'Copy timestamp to clipboard as UTC instant in ISO-8601 format';\n return (\n <section className=\"small\">\n <ul className=\"list-unstyled\">\n <li>\n <b>Start:</b> {timestamp(Date.parse(canaryRun.context.scopes[firstScopeName].experimentScope.start))}\n <CopyToClipboard\n displayText={false}\n text={canaryRun.context.scopes[firstScopeName].experimentScope.start}\n toolTip={toolTipText}\n />\n </li>\n <li>\n <b>End:</b> {timestamp(Date.parse(canaryRun.context.scopes[firstScopeName].experimentScope.end))}\n <CopyToClipboard\n displayText={false}\n text={canaryRun.context.scopes[firstScopeName].experimentScope.end}\n toolTip={toolTipText}\n />\n </li>\n </ul>\n </section>\n );\n}\n\nfunction ReportLink({ canaryRun }: { canaryRun: IStage }) {\n if (\n !has(canaryRun, 'context.canaryConfigId') ||\n !has(canaryRun, 'context.canaryPipelineExecutionId') ||\n canaryRun.status === 'RUNNING'\n ) {\n return null;\n }\n\n const onClick = () =>\n ReactInjector.$state.go('home.applications.application.canary.report.reportDetail', {\n configId: canaryRun.context.canaryConfigId,\n runId: canaryRun.context.canaryPipelineExecutionId,\n });\n\n return <i className=\"fa fa-chart-bar clickable\" onClick={onClick} />;\n}\n\nfunction CanaryRunWarningMessages({ messages }: { messages: string[] }) {\n return (\n <div>\n {messages.map((message, i) => (\n <p key={`${i}-${message}`}>{message}</p>\n ))}\n </div>\n );\n}\n","import { module } from 'angular';\nimport { react2angular } from 'react2angular';\n\nimport { withErrorBoundary } from '@spinnaker/core';\n\nimport CanaryRunSummaries from './canaryRunSummaries';\n\nexport const CANARY_RUN_SUMMARIES_COMPONENT = 'spinnaker.kayenta.canaryRunSummaries.component';\nmodule(CANARY_RUN_SUMMARIES_COMPONENT, []).component(\n 'canaryRunSummaries',\n react2angular(withErrorBoundary(CanaryRunSummaries, 'canaryRunSummaries'), ['canaryRuns', 'firstScopeName']),\n);\n","import { StateParams } from '@uirouter/angularjs';\nimport { IScope, module } from 'angular';\nimport { ICanaryConfigSummary, KayentaAnalysisType } from 'kayenta/domain';\n\nimport { ExecutionDetailsSectionService, IExecutionStage } from '@spinnaker/core';\n\nimport { CANARY_RUN_SUMMARIES_COMPONENT } from './canaryRunSummaries.component';\nimport { KAYENTA_CANARY, RUN_CANARY } from './stageTypes';\n\nimport './kayentaStageExecutionDetails.less';\n\nclass KayentaStageExecutionDetailsController {\n public static $inject = ['$scope', '$stateParams', 'executionDetailsSectionService'];\n\n public canaryRuns: IExecutionStage[];\n public canaryConfigName: string;\n public firstScopeName: string;\n public resolvedControl: string;\n public resolvedExperiment: string;\n\n constructor(\n public $scope: IScope,\n private $stateParams: StateParams,\n private executionDetailsSectionService: ExecutionDetailsSectionService,\n ) {\n 'ngInject';\n this.$scope.configSections = ['canarySummary', 'canaryConfig', 'taskStatus'];\n this.$scope.$on('$stateChangeSuccess', () => this.initialize());\n }\n\n public $onInit(): void {\n this.initialize();\n }\n\n private initialize(): void {\n this.executionDetailsSectionService.synchronizeSection(this.$scope.configSections, () => this.initialized());\n }\n\n private initialized(): void {\n this.$scope.detailsSection = this.$stateParams.details;\n this.$scope.application.ready().then(() => {\n if (this.$scope.stage.type !== KAYENTA_CANARY) {\n return;\n }\n const canaryConfigSummary = this.$scope.application\n .getDataSource('canaryConfigs')\n .data.find(\n (config: ICanaryConfigSummary) => config.id === this.$scope.stage.context.canaryConfig.canaryConfigId,\n );\n if (canaryConfigSummary) {\n this.canaryConfigName = canaryConfigSummary.name;\n }\n });\n this.setCanaryRuns();\n this.resolveFirstScopeName();\n this.resolveControlAndExperimentNames();\n this.$scope.$watchCollection('stage.tasks', () => this.setCanaryRuns());\n }\n\n private setCanaryRuns(): void {\n // The kayentaStageTransformer pushes related 'runCanary' and 'wait' stages\n // into the 'kayentaCanary' tasks list.\n this.canaryRuns = this.$scope.stage.tasks.filter((t: IExecutionStage) => t.type === RUN_CANARY);\n }\n\n private resolveFirstScopeName(): void {\n this.firstScopeName = this.$scope.stage.context.canaryConfig.scopes[0].scopeName;\n }\n\n private resolveControlAndExperimentNames(): void {\n if (this.$scope.stage.context.analysisType === KayentaAnalysisType.RealTimeAutomatic) {\n this.resolvedControl = this.$scope.stage.outputs.controlScope;\n this.resolvedExperiment = this.$scope.stage.outputs.experimentScope;\n } else {\n this.resolvedControl = this.canaryRuns.length\n ? this.canaryRuns[0].context.scopes[this.firstScopeName].controlScope.scope\n : this.$scope.stage.context.canaryConfig.scopes[0].controlScope;\n this.resolvedExperiment = this.canaryRuns.length\n ? this.canaryRuns[0].context.scopes[this.firstScopeName].experimentScope.scope\n : this.$scope.stage.context.canaryConfig.scopes[0].experimentScope;\n }\n }\n}\n\nexport const KAYENTA_STAGE_EXECUTION_DETAILS_CONTROLLER = 'spinnaker.kayenta.kayentaStageExecutionDetails.controller';\nmodule(KAYENTA_STAGE_EXECUTION_DETAILS_CONTROLLER, [CANARY_RUN_SUMMARIES_COMPONENT])\n .controller('kayentaStageExecutionDetailsCtrl', KayentaStageExecutionDetailsController)\n .filter('dateToMillis', () => Date.parse);\n","import { UIRouter } from '@uirouter/core';\nimport { module } from 'angular';\nimport { registerKayentaDataSourceStubs } from 'kayenta/canary.dataSource.stub';\nimport 'kayenta/canary.help';\nimport { CanarySettings } from 'kayenta/canary.settings';\nimport { registerKayentaStateStubs } from 'kayenta/navigation/canary.states.stub';\n\nimport { ApplicationStateProvider, Registry } from '@spinnaker/core';\n\nimport { CANARY_SCORE_COMPONENT } from './kayenta/components/canaryScore.component';\nimport { CANARY_SCORES_CONFIG_COMPONENT } from './kayenta/components/canaryScores.component';\nimport { KAYENTA_ANALYSIS_TYPE_COMPONENT } from './kayenta/stages/kayentaStage/analysisType.component';\nimport { FOR_ANALYSIS_TYPE_COMPONENT } from './kayenta/stages/kayentaStage/forAnalysisType.component';\nimport { kayentaCanaryStage } from './kayenta/stages/kayentaStage/kayentaStage';\nimport { KayentaStageController } from './kayenta/stages/kayentaStage/kayentaStage.controller';\nimport { KayentaStageTransformer } from './kayenta/stages/kayentaStage/kayentaStage.transformer';\nimport { KAYENTA_STAGE_CONFIG_SECTION } from './kayenta/stages/kayentaStage/kayentaStageConfigSection.component';\nimport { KAYENTA_STAGE_EXECUTION_DETAILS_CONTROLLER } from './kayenta/stages/kayentaStage/kayentaStageExecutionDetails.controller';\n\n/**\n * This is the stub for Kayenta in deck\n *\n * - Registers all AngularJS components and controllers\n * - Registers the full Kayenta Stage with Deck\n * - Registers STUB routes for canary configs and canary reports (see: registerKayentaStateStubs)\n * - These stub routes are names and URLs only\n * - A lazyLoad router hook runs when the user navigates to a stub route and loads the remainder of Kayenta\n * - Registers a DataSource that fetches kayenta canary/report data (and provides the nav items)\n *\n * See: lazy.ts for what happens next\n */\n\nexport const KAYENTA_MODULE = 'spinnaker.kayenta';\n\nif (CanarySettings.featureDisabled) {\n module(KAYENTA_MODULE, []);\n} else {\n module(KAYENTA_MODULE, [\n 'ui.router',\n CANARY_SCORES_CONFIG_COMPONENT,\n CANARY_SCORE_COMPONENT,\n FOR_ANALYSIS_TYPE_COMPONENT,\n KAYENTA_ANALYSIS_TYPE_COMPONENT,\n KAYENTA_STAGE_CONFIG_SECTION,\n KAYENTA_STAGE_EXECUTION_DETAILS_CONTROLLER,\n ])\n .controller('KayentaCanaryStageCtrl', KayentaStageController)\n .run([\n '$uiRouter',\n 'applicationState',\n function ($uiRouter: UIRouter, applicationState: ApplicationStateProvider) {\n registerKayentaDataSourceStubs();\n registerKayentaStateStubs(applicationState, $uiRouter);\n if (CanarySettings.stagesEnabled !== false) {\n Registry.pipeline.registerStage(kayentaCanaryStage);\n Registry.pipeline.registerTransformer(new KayentaStageTransformer());\n }\n },\n ]);\n}\n","import { StateDeclaration, UIRouter } from '@uirouter/core';\n\nimport { ApplicationStateProvider } from '@spinnaker/core';\n\nexport function registerKayentaStateStubs(applicationState: ApplicationStateProvider, uiRouter: UIRouter) {\n const states: StateDeclaration[] = [\n {\n name: 'canary',\n url: '/canary',\n lazyLoad: () =>\n import(/* webpackChunkName: \"Lazy-Kayenta-Tabs\" */ '../../lazy').then((m) =>\n m.lazyInitializeKayenta(applicationState, uiRouter),\n ),\n },\n { name: 'canary.canaryConfig', url: '/config' },\n { name: 'canary.canaryConfig.configDetail', url: '/:id?copy&new' },\n { name: 'canary.canaryConfig.configDefault', url: '' },\n { name: 'canary.report', url: '/report?count' },\n { name: 'canary.report.reportDetail', url: '/:configId/:runId' },\n { name: 'canary.report.reportDefault', url: '' },\n ];\n\n ['home.project', 'home.applications'].forEach((prefix) => {\n states\n .map((state) => ({ ...state, name: `${prefix}.application.${state.name}` } as StateDeclaration))\n .forEach((state) => uiRouter.stateRegistry.register(state as StateDeclaration));\n });\n}\n"],"names":["CanarySettings","SETTINGS","canary","featureDisabled","getCanaryConfigById","id","REST","path","get","then","config","getCanaryConfigSummaries","application","query","updateCanaryConfig","put","createCanaryConfig","post","deleteCanaryConfig","delete","listJudges","judges","filter","judge","visible","listKayentaAccounts","useCache","mapStateToConfig","state","selectedConfig","judgeConfig","metrics","metricList","map","metric","omit","classifier","groupWeights","group","buildNewConfig","configName","i","data","configSummaries","some","summary","name","applications","description","isNew","configVersion","templates","defaultJudge","judgeConfigurations","buildConfigCopy","getCanaryRun","configId","canaryExecutionId","storageAccountName","run","result","judgeResult","results","sort","a","b","localeCompare","startCanaryRun","executionRequest","params","getMetricSetPair","metricSetPairListId","metricSetPairId","list","find","pair","listCanaryExecutions","limit","ReactInjector","$stateParams","count","getHealthLabel","health","healthLC","toLowerCase","resultLC","stub","loadCanaryExecutions","afterConfigsLoaded","_application","afterJudgesLoaded","afterCanaryExecutionsLoaded","helpContents","pipeline.config.canary.analysisType","pipeline.config.canary.delayBeforeAnalysis","pipeline.config.canary.baselineAnalysisOffset","pipeline.config.canary.canaryInterval","pipeline.config.canary.successfulScore","pipeline.config.canary.unhealthyScore","pipeline.config.canary.baselineGroup","pipeline.config.canary.baselineLocation","pipeline.config.canary.canaryGroup","pipeline.config.canary.canaryLocation","pipeline.config.canary.startTimeIso","pipeline.config.canary.endTimeIso","pipeline.config.canary.extendedScopeParams","pipeline.config.canary.lookback","pipeline.config.canary.delayBeforeCleanup","pipeline.config.canary.marginalScore","pipeline.config.canary.passingScore","pipeline.config.canary.lifetime","pipeline.config.canary.legacySiteLocalRecipients","pipeline.config.metricsAccount","pipeline.config.storageAccount","canary.config.metricGroupWeights","canary.config.nanStrategy","canary.config.filterTemplate","canary.config.signalFx.queryPairs","canary.config.signalFx.aggregationMethod","canary.config.prometheus.queryType","canary.config.effectSize.cles","stackdriver.resourceType","stackdriver.metricType","stackdriver.groupBy","stackdriver.crossSeriesReducer","stackdriver.perSeriesAligner","Object","keys","forEach","key","HelpContentsRegistry","register","pairs","index","length","global","freeSelf","self","freeGlobal","Function","root","Symbol","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","symToStringTag","toStringTag","undefined","value","isOwn","call","tag","unmasked","e","getRawTag","objectToString","type","uid","isObject","baseGetTag","maskSrcKey","exec","coreJsData","IE_PROTO","func","funcToString","reIsHostCtor","funcProto","reIsNative","RegExp","replace","isMasked","isFunction","test","toSource","object","getValue","baseIsNative","getNative","defineProperty","configurable","enumerable","writable","other","objValue","eq","baseAssignValue","source","props","customizer","newValue","assignValue","thisArg","args","apply","nativeMax","Math","max","start","transform","arguments","array","Array","otherArgs","this","string","constant","identity","nativeNow","Date","now","lastCalled","stamp","remaining","shortOut","baseSetToString","setToString","overRest","isLength","reIsUint","isArrayLike","isIndex","assigner","baseRest","sources","guard","isIterateeCall","Ctor","constructor","n","iteratee","isObjectLike","propertyIsEnumerable","baseIsArguments","isArray","freeExports","exports","nodeType","freeModule","module","Buffer","isBuffer","stubFalse","typedArrayTags","freeProcess","process","nodeUtil","types","require","binding","nodeIsTypedArray","isTypedArray","baseUnary","baseIsTypedArray","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","String","push","arg","overArg","isPrototype","nativeKeys","arrayLikeKeys","baseKeys","createAssigner","copyObject","fromRight","keysFunc","iterable","createBaseFor","baseFor","__data__","size","splice","assocIndexOf","pop","ListCache","entries","clear","entry","set","listCacheClear","listCacheDelete","listCacheGet","has","listCacheHas","listCacheSet","nativeCreate","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","hash","Map","isKeyable","getMapData","MapCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","LARGE_ARRAY_SIZE","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","SetCache","values","add","setCacheAdd","setCacheHas","predicate","cache","bitmask","equalFunc","stack","isPartial","arrLength","othLength","stacked","seen","arrValue","othValue","compared","arraySome","othIndex","cacheHas","Uint8Array","symbolProto","symbolValueOf","valueOf","byteLength","byteOffset","buffer","message","convert","mapToArray","setToArray","equalArrays","offset","symbolsFunc","arrayPush","resIndex","nativeGetSymbols","getOwnPropertySymbols","arrayFilter","symbol","stubArray","baseGetAllKeys","getSymbols","objProps","getAllKeys","objLength","skipCtor","objCtor","othCtor","dataViewCtorString","DataView","mapCtorString","promiseCtorString","Promise","setCtorString","Set","weakMapCtorString","WeakMap","getTag","ArrayBuffer","resolve","ctorString","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsEqual","baseIsEqualDeep","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","isStrictComparable","getMatchData","matchesStrictComparable","baseIsMatch","reIsDeepProp","reIsPlainProp","isSymbol","memoize","resolver","TypeError","memoized","Cache","rePropName","reEscapeChar","memoizeCapped","charCodeAt","match","number","quote","subString","symbolToString","baseToString","arrayMap","isKey","stringToPath","castPath","toKey","defaultValue","baseGet","hasFunc","hasPath","baseHasIn","hasIn","baseProperty","basePropertyDeep","baseMatchesProperty","baseMatches","property","baseIteratee","baseForOwn","eachFunc","collection","createBaseEach","baseEach","extendStatics","baseSome","NgComponent","__isFirstRender","$onChanges","changes","oldProps","newProps","mapValues","nextProps","assign","componentWillMount","render","didPropsChange","componentWillReceiveProps","shouldUpdate","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","$postLink","componentDidMount","$onDestroy","componentWillUnmount","v","k","_props","_nextProps","_nextState","_state","__extends","setPrototypeOf","__proto__","d","p","__","create","__assign","t","s","Class","bindingNames","injectNames","names","propTypes","bindings","fromPairs","_","controller","concat","_super","class_1","$element","injectedProps","_i","_this","react_dom_1","React","createElement","unmountComponentAtNode","ngcomponent_1","default","hasOwn","classNames","classes","argType","join","window","styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CanaryScore","Component","[object Object]","super","getLabelState","score","healthLabel","setState","className","inverse","classification","component","react2angular","withErrorBoundary","CanaryScores","successfulTouched","setSuccessfulTouched","useState","successfulScore","unhealthyTouched","setUnhealthyTouched","unhealthyScore","isExpression","scoreValue","isString","includes","hasExpressions","successful","unhealthy","Number","errors","unhealthyLabel","invalid","HelpField","unhealthyHelpFieldId","required","disabled","onBlur","isNaN","onChange","event","target","ng-invalid","ng-invalid-validate-min","successfulLabel","successfulHelpFieldId","ng-invalid-validate-max","width","KayentaAccountType","KayentaAnalysisType","MetricClassificationLabel","ScoreClassificationLabel","AnalysisTypeWarning","AnalysisTypeRadioButton","selectedType","analysisTypes","noop","label","checked","RealTimeAutomatic","RealTime","Retrospective","m","angular","$a","$b","$c","$i","stage","$log","warn","split","val","trim","analysisType","transclude","template","emailPattern","utcInstantPattern","isValidUtcInstant","timestamp","requiredForAnalysisTypes","fieldName","fieldLabel","_pipeline","kayentaCanaryStage","stageName","stageDescription","templateUrl","controllerAs","executionDetailsUrl","executionLabelComponent","overallScore","overallResult","validators","validate","configDetails","definedScopeNames","uniq","scopeName","isEmpty","configureScopedNames","missingScopeNames","difference","canaryConfig","legacySiteLocalFieldsEnabled","notificationEmail","invalidEmail","email","isValidEmail","startTime","endTime","defaultDurationObject","hours","minutes","parseDurationString","duration","defaultDurationObjectCopy","durationComponents","parseInt","isInteger","getDurationString","REAL_TIME_AUTOMATIC_PROVIDERS","KayentaStageController","$scope","$uibModal","serverGroupCommandBuilder","serverGroupTransformer","useLookback","backingDataLoading","lifetimeHoursUpdatedToDuration","lifetime","showAdvancedSettings","useAtlasGlobalDataset","atlasScopeType","legacySiteLocalRecipients","showLegacySiteLocalRecipients","showAllLocations","control","experiment","delayBeforeCleanup","async","loadBackingData","firstStorageAccount","first","kayentaAccounts","ObjectStore","firstMetricsAccount","MetricsStore","metricsAccountName","scoreThresholds","marginal","pass","scopes","stageLifetimeDuration","stageDelayBeforeCleanupDuration","lookbackMins","populateScopeNameChoices","setMetricStore","setLocations","setShowAdvancedSettings","setClusterList","deleteConfigAccountsIfMissing","updateLifetimeFromHoursToDuration","deleteCanaryConfigIdIfMissing","setLegacySiteLocalRecipients","initializeRealTimeAutomaticAnalysisType","ready","selectedCanaryConfigDetails","providers","accounts","canaryConfigSummaries","all","loadCanaryConfigDetails","loadKayentaAccounts","loadProviders","loadAccounts","getDataSource","$applyAsync","startTimeIso","endTimeIso","deployments","metricStore","scope","unset","setAtlasScopeParams","controlLocation","experimentLocation","beginCanaryAnalysisAfterMins","lifetimeDuration","baseline","cloudProvider","cluster","account","serverGroupPairs","canaryConfigId","isRealTimeAutomatic","existingScopeType","recommendedLocations","locations","hasChoices","getLocationChoices","scopeNames","selectedAccount","combinedLocations","allLocations","locationChoices","mapped","supportedTypes","every","controlScope","experimentScope","lifetimeHours","isFinite","fractional","parseFloat","floor","AccountService","listProviders","listAccounts","clusterList","AppListExtractor","getClusters","sg","setAtlasEnvironment","accountDetails","environment","recipients","siteLocal","serverGroup","region","availabilityZones","NameUtils","getClusterName","freeFormDetails","provider","ProviderSelectionService","selectProvider","CloudProviderRegistry","command","buildNewServerGroupCommandForPipeline","viewState","requiresTemplateSelection","disableStrategySelection","hideClusterNamePreview","readOnlyFields","credentials","subnet","useSourceCapacity","overrides","capacity","min","desired","imageSourceText","strategy","title","CloneServerGroupModal","show","open","cloneServerGroupTemplateUrl","cloneServerGroupController","serverGroupCommand","convertServerGroupCommandToDeployConfiguration","cloneDeep","cleanup","backingData","toUpperCase","substring","buildServerGroupCommandFromPipeline","resolveImageSourceText","initialize","RUN_CANARY","WAIT","stageTypesToAlwaysShow","KayentaStageTransformer","execution","kayentaStages","stages","stagesToRenderAsTasks","OrchestratedItemTransformer","defineProperties","intervalStageId","context","syntheticCanaryStages","parentStageId","runCanaryStages","syntheticStage","calculateRunCanaryResults","calculateKayentaCanaryResults","exceptions","addExceptions","tasks","isDescendantOf","parentKayentaStageId","kayentaStageIds","deployCanaryStage","parentKayentaStage","outputs","deployedServerGroups","status","child","ancestors","ancestorIds","node","parentNode","getValueFor","canaryScore","round","kayentaStage","isRunning","last","getLastCanaryRunScore","canaryScoreMessage","getLastCanaryScoreMessage","isCanceled","scoreThreshold","overallHealth","canaryRunScores","canaryRunMessages","getException","isFailed","exception","details","responseBody","failureMessage","kayentaStageConfigSection","sectionHeader","Styleguide","children","NativeTableHeader","rows","columns","labelClassName","hide","NativeTable","rowKey","tableBodyClassName","rowClassName","onRowClick","customRow","headerClassName","TableRow","row","onClick","table-row","getContent","r","CanaryRunTimestamps","canaryRun","firstScopeName","toolTipText","parse","CopyToClipboard","displayText","text","toolTip","end","ReportLink","$state","go","runId","canaryPipelineExecutionId","CanaryRunWarningMessages","messages","canaryRuns","canaryRunColumns","HoverablePopover","warnings","paddingLeft","durationString","lastUpdated","popoverTemplate","KayentaStageExecutionDetailsController","executionDetailsSectionService","configSections","$on","synchronizeSection","initialized","detailsSection","canaryConfigSummary","canaryConfigName","setCanaryRuns","resolveFirstScopeName","resolveControlAndExperimentNames","$watchCollection","resolvedControl","resolvedExperiment","KAYENTA_MODULE","$uiRouter","applicationState","onLoad","app","ApplicationDataSourceRegistry","registerDataSource","optIn","optInAll","optional","loader","showAllConfigs","afterLoad","defaultData","sref","activeState","category","requiresDataSource","lazy","autoActivate","iconName","registerKayentaDataSourceStubs","uiRouter","states","url","lazyLoad","import","lazyInitializeKayenta","prefix","stateRegistry","registerKayentaStateStubs","stagesE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