"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("immutable"),n=require("query-string"),t=require("../constants/devcenter.js");require("../constants/goals.js");var r=require("../constants/segment.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/appPackages.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("../constants/corvaCompanyId.js"),require("lodash"),require("../components/GradientManager/configuration/constants.js");var o=i(n);exports.createDevCenterRouter=function(e){var n,t;return{push:function(n){if("string"==typeof n)e.push(n);else{var t=n.query?o.default.stringify(n.query):"",r=t?"?".concat(t):void 0;e.push({pathname:n.pathname,search:r})}},location:{pathname:null==e||null===(n=e.location)||void 0===n?void 0:n.pathname,query:o.default.parse(null==e||null===(t=e.location)||void 0===t?void 0:t.search)}}},exports.getAppIdentifier=function(e){var n=e.appKey,t=e.version,r=e.isLocalDebugMode;if(!n)return"";var i=n.replace(/\./g,"_");return r?i:"".concat(i,"-").concat(t)},exports.getAppName=function(e){var n,t,r,i,o;return null!==(n=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e||null===(r=e.package)||void 0===r||null===(i=r.manifest)||void 0===i||null===(o=i.application)||void 0===o?void 0:o.name)&&void 0!==n?n:""},exports.getAppSegment=function(n){var t,i;if(!n)return r.SEGMENTS.DRILLING;var o,a=n.settings instanceof e.Map?n.settings.get("segment"):null===(t=n.settings)||void 0===t?void 0:t.segment,s=null!=a?a:null===(i=n.segment)||void 0===i?void 0:i[0];return s?s===r.SEGMENTS.COMPLETION&&"core"===(null===(o=n.app)||void 0===o?void 0:o.platform)&&n.category===r.DRILLOUT_SEGMENT?r.DRILLOUT_SEGMENT:s:null!=s?s:r.SEGMENTS.DRILLING},exports.getTimestampFromQuery=function(e){return e?+(e.split("#")[2]||"").replace("}",""):void 0},exports.isAppMaximized=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.DEV_CENTER_CLI_APP_ID;return n===+(null==e?void 0:e.maximizeDC)},exports.isCorvaApp=function(e){var n,t;return"corva"===(null==e||null===(n=e.app_key)||void 0===n||null===(t=n.split("."))||void 0===t?void 0:t[0])},exports.isDevCenterApp=function(e){var n;return"dev_center"===((null==e?void 0:e.platform)||(null==e||null===(n=e.app)||void 0===n?void 0:n.platform))},exports.isIsolationEnabledInPackageManifest=function(e){var n,t,r;return null===(n=null==e||null===(t=e.manifest)||void 0===t||null===(r=t.settings)||void 0===r?void 0:r.enable_isolation)||void 0===n||n};
//# sourceMappingURL=devcenter.js.map
