"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Intrinsic=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),stack_trace_1=require("../stack-trace"),token_1=require("../token");class Intrinsic{constructor(value,options={}){try{jsiiDeprecationWarnings.aws_cdk_lib_IntrinsicProps(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Intrinsic),error}if(isFunction(value))throw new Error(`Argument to Intrinsic must be a plain value object, got ${value}`);this.creationStack=options.stackTrace??!0?stack_trace_1.captureStackTrace():[],this.value=value}resolve(_context){try{jsiiDeprecationWarnings.aws_cdk_lib_IResolveContext(_context)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.resolve),error}return this.value}toString(){return token_1.Token.asString(this)}toJSON(){return"<unresolved-token>"}newError(message){return new Error(`${message}
Token created:
    at ${this.creationStack.join(`
    at `)}
Error thrown:`)}}exports.Intrinsic=Intrinsic,_a=JSII_RTTI_SYMBOL_1,Intrinsic[_a]={fqn:"aws-cdk-lib.Intrinsic",version:"2.29.0"};function isFunction(x){return typeof x=="function"}
//# sourceMappingURL=intrinsic.js.map
