function makeError(){function r(r){r=Error.call(this,r),this.name=r.name,this.message=r.message,this.stack=r.stack}return r.prototype=Error.prototype,r}class ActivityError extends makeError(){}class ActivityCancellationError extends ActivityError{}ActivityCancellationError.prototype.message="[WF: activity cancellation error] The activity was cancelled.",ActivityCancellationError.prototype.code="WF: activity cancellation error";class GenericActivityError extends ActivityError{constructor(r,e){super(),this.code=r||"WF: activity error",this.message="["+this.code+"] "+(e||"Some errors occurred.")}}class ProgramStartError extends makeError(){}ProgramStartError.prototype.code="WF: start error",ProgramStartError.prototype.message="[WF: start error] The given workflow program contains no start point and none was given in the options.";class UnspecifiedError extends makeError(){}UnspecifiedError.prototype.code="WF: unspecified error",UnspecifiedError.prototype.message="[WF: unspecified error] The given workflow program completed with an unspecified error.";class ActivityBindingError extends ActivityError{constructor(r,e,t){super(),this.action=e,this.error=t}}ActivityBindingError.prototype.code="WF: binding error",ActivityBindingError.prototype.message="[WF: binding error] The given workflow program contains some activities which are not valid.";class EngineRuntimeError extends makeError(){constructor(r){super(),this.error=r}}EngineRuntimeError.prototype.code="WF: runtime error",EngineRuntimeError.prototype.message="[WF: runtime error] The workflow engine experienced an internal error.";class ProgramParserError extends makeError(){constructor(r){super(),this.error=r}}ProgramParserError.prototype.code="WF: parser error",ProgramParserError.prototype.message="[WF: parsing error] The given workflow program could not be parsed.";class ExpressionEvaluationError extends ActivityError{constructor(r,e,t,i){super(),this.activityId=r,this.inputName=e,this.expression=t,this.error=i,this.code="WF: expression evaluation error",this.message="["+this.code+"] The given expression could not be evaluated.",t&&(this.message+=' "'+t+'"'),i&&i.message&&(this.message+=" "+i.message)}}class ExpressionSyntaxError extends ActivityError{constructor(r,e,t,i){super(),this.activityId=r,this.inputName=e,this.expression=t,this.error=i,this.code="WF: expression syntax error",this.message="["+this.code+"] The given expression could not be parsed.",t&&(this.message+=' "'+t+'"'),i&&i.message&&(this.message+=" "+i.message)}}class ExpressionAccessorError extends ActivityError{constructor(r,e,t,i){super(),this.activityId=r,this.accessorName=e,this.error=t,this.code="WF: expression accessor error",this.message="["+this.code+"] The requested accessor could not be resolved.",this.error=t,this.errors=i}}class ActivityActivationError extends ActivityError{constructor(r,e,t){super(),this.activityId=r,this.type=e,this.error=t,this.code="WF: activity activation error",this.message="["+this.code+"] The requested facility could not be activated.",this.error=t}}class AggregateActivityError extends ActivityError{constructor(r,e){super(),this.activityId=r,this.code="WF: aggregate error",this.message="["+this.code+"] The activity experienced multiple errors.",this.errors=e}}class ActivityInputError extends ActivityError{constructor(r,e){super(),this.inputName=r,this.assertion=e}}ActivityInputError.prototype.code="WF: activity input error",ActivityInputError.prototype.message="[WF: activity input error] The activity has invalid inputs.";class ActivityNotImplementedError extends ActivityError{constructor(r){super(),this.message=`[WF: activity not implemented] The ${r} activity has not been implemented.`}}ActivityNotImplementedError.prototype.code="WF: activity not implemented";export{ActivityError,ActivityCancellationError,GenericActivityError,ProgramStartError,UnspecifiedError,ActivityBindingError,EngineRuntimeError,ProgramParserError,ExpressionEvaluationError,ExpressionSyntaxError,ExpressionAccessorError,ActivityActivationError,AggregateActivityError,ActivityInputError,ActivityNotImplementedError};