import{__assign as o}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as t}from"react/jsx-runtime";import{useMemo as n}from"react";import{merge as s}from"lodash";import r from"rollbar";import{Provider as a}from"@rollbar/react";import"../../../../../constants/goals.js";import"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/appPackages.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import{CORVA_COMPANY_ID as i}from"../../../../../constants/corvaCompanyId.js";import"../../../../GradientManager/configuration/constants.js";var e=function(o){var i=o.children,e=o.rollbarManifestConfig,c=o.appKey,p=o.version,l=n((function(){var o,t=window.parent.Rollbar,n={accessToken:!e.useGlobalInstance&&e.accessToken?e.accessToken:null===(o=null==t?void 0:t.options)||void 0===o?void 0:o.accessToken,payload:{context:e.contextPrefix?"".concat(e.contextPrefix,"#").concat(c):c,client:{javascript:{code_version:p}}}},a=s({},null==t?void 0:t.options,n);return new r(a)}),[]);return t(a,{instance:l,children:i})},c=function(n){var s=n.children,r=n.rollbarManifestConfig,a=n.isCLIApp,c=n.companyId===i;return r&&r.enabled&&c&&!a?t(e,o({},n,{children:s})):s};export{c as RollbarWrapper};
