import{__require as r}from"./get-built-in.mjs";import{__require as e}from"./has-own-property.mjs";import{__require as t}from"./create-non-enumerable-property.mjs";import{__require as o}from"./object-is-prototype-of.mjs";import{__require as i}from"./object-set-prototype-of.mjs";import{__require as s}from"./copy-constructor-properties.mjs";import{__require as m}from"./proxy-accessor.mjs";import{__require as a}from"./inherit-if-required.mjs";import{__require as p}from"./normalize-string-argument.mjs";import{__require as n}from"./install-error-cause.mjs";import{__require as u}from"./error-stack-install.mjs";import{__require as _}from"./descriptors.mjs";import{__require as c}from"./is-pure.mjs";var f,j;function q(){if(j)return f;j=1;var q=r(),l=e(),y=t(),h=o(),v=i(),g=s(),d=m(),b=a(),k=p(),w=n(),x=u(),E=_(),T=c();return f=function(r,e,t,o){var i="stackTraceLimit",s=o?2:1,m=r.split("."),a=m[m.length-1],p=q.apply(null,m);if(p){var n=p.prototype;if(!T&&l(n,"cause")&&delete n.cause,!t)return p;var u=q("Error"),_=e(function(r,e){var t=k(o?e:r,void 0),i=o?new p(r):new p;return void 0!==t&&y(i,"message",t),x(i,_,i.stack,2),this&&h(n,this)&&b(i,this,_),arguments.length>s&&w(i,arguments[s]),i});if(_.prototype=n,"Error"!==a?v?v(_,u):g(_,u,{name:!0}):E&&i in p&&(d(_,p,i),d(_,p,"prepareStackTrace")),g(_,p),!T)try{n.name!==a&&y(n,"name",a),n.constructor=_}catch(r){}return _}},f}export{q as __require};