Module 260447

1,619 characters · in cdb0764a346ddb8b.js, 0021a3a5560a37b4.js
Dependencies
Required by (2)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(r,e,t){t.d(e,{z:()=>c});var n=t(64700),o=t(192308),a=t(139033),i=t(626584),l=t(38405),s=t(794400),u=t(375708);let d=new i.A("RevenueErrorBoundary.tsx");class c extends n.PureComponent{state={error:null,info:null};getSentryTags(r,e){return{app_context:this.getSentryAppContext(),...e?{crashed:"true"}:{}}}getSentryExtras(r){return r instanceof s.v&&null!=r.extraSentryInformation?{...r.extraSentryInformation}:{}}onErrorCaught(r,e){}closeAndShowAlert(){(0,o.closeAllModals)(),(0,a.A)({title:u.intl.string(u.t.iufib1),subtitle:u.intl.string(u.t.ZUEGFn),confirmText:u.intl.string(u.t.TyCVIq)})}getErrorHandlingBehavior(r){return r instanceof s.v?r.errorHandlingBehavior:this.props.errorHandlingBehavior}getCrashedFlag(r){return"rethrow"===this.getErrorHandlingBehavior(r)}emitSentryException(r,e){let{additionalAnalyticsData:t}=this.props,n=this.getCrashedFlag(r),o=this.getSentryExtras(r),a={tags:this.getSentryTags(r,n),extra:{...o,...t??{},...null!=e?{reactErrorInfo:e}:{}}};return r instanceof s.v&&r.skipReportingToSentry||l.A.captureException(r,a),d.error("Revenue error occurred:",{error:r,additionalErrorContext:o}),{sentryErrorOptions:a}}componentDidCatch(r,e){let{sentryErrorOptions:t}=this.emitSentryException(r,e);if(this.onErrorCaught(r,e),this.setState({error:r,info:e}),null!=this.props.onErrorReported&&this.props.onErrorReported(r,e,t),"rethrow"===this.getErrorHandlingBehavior(r))throw r;this.closeAndShowAlert()}render(){return null!=this.state.error?null!=this.props.renderCustomErrorComponent?this.props.renderCustomErrorComponent(this.state.error,this.state.info):null:this.props.children}}}