Exit Full View

Games Cupboard / gamescupboard-client / build / compileSync / main / productionExecutable / kotlin / korlibs-korinject.js

(function (root, factory) {
  if (typeof define === 'function' && define.amd)
    define(['exports', './kotlin-kotlin-stdlib-js-ir.js'], factory);
  else if (typeof exports === 'object')
    factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'));
  else {
    if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
      throw new Error("Error loading module 'korlibs-korinject'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'korlibs-korinject'.");
    }
    root['korlibs-korinject'] = factory(typeof this['korlibs-korinject'] === 'undefined' ? {} : this['korlibs-korinject'], this['kotlin-kotlin-stdlib-js-ir']);
  }
}(this, function (_, kotlin_kotlin) {
  'use strict';
  //region block: imports
  var objectMeta = kotlin_kotlin.$_$.wd;
  var THROW_CCE = kotlin_kotlin.$_$.di;
  var classMeta = kotlin_kotlin.$_$.pc;
  var RuntimeException = kotlin_kotlin.$_$.ci;
  var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.h3;
  var captureStack = kotlin_kotlin.$_$.jc;
  var CoroutineImpl = kotlin_kotlin.$_$.yb;
  var Unit_getInstance = kotlin_kotlin.$_$.k5;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.gb;
  var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.r4;
  var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.a4;
  var throwOnFailure = kotlin_kotlin.$_$.dj;
  var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.c4;
  var isObject = kotlin_kotlin.$_$.ld;
  var Continuation = kotlin_kotlin.$_$.qb;
  var isInterface = kotlin_kotlin.$_$.id;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v1;
  var getKClass = kotlin_kotlin.$_$.d;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m1;
  var startCoroutine = kotlin_kotlin.$_$.cc;
  var ensureNotNull = kotlin_kotlin.$_$.ri;
  var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ej;
  var CancellationException = kotlin_kotlin.$_$.fb;
  var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.k3;
  var interfaceMeta = kotlin_kotlin.$_$.yc;
  var SuspendFunction0 = kotlin_kotlin.$_$.zb;
  var Key = kotlin_kotlin.$_$.vb;
  var get = kotlin_kotlin.$_$.sb;
  var fold = kotlin_kotlin.$_$.rb;
  var minusKey = kotlin_kotlin.$_$.tb;
  var plus = kotlin_kotlin.$_$.wb;
  var Element = kotlin_kotlin.$_$.ub;
  //endregion
  //region block: pre-declaration
  NotMappedException.prototype = Object.create(RuntimeException.prototype);
  NotMappedException.prototype.constructor = NotMappedException;
  AsyncInjector$getSync$slambda.prototype = Object.create(CoroutineImpl.prototype);
  AsyncInjector$getSync$slambda.prototype.constructor = AsyncInjector$getSync$slambda;
  $getProviderOrNullCOROUTINE$0.prototype = Object.create(CoroutineImpl.prototype);
  $getProviderOrNullCOROUTINE$0.prototype.constructor = $getProviderOrNullCOROUTINE$0;
  $getProviderCOROUTINE$1.prototype = Object.create(CoroutineImpl.prototype);
  $getProviderCOROUTINE$1.prototype.constructor = $getProviderCOROUTINE$1;
  $getCOROUTINE$3.prototype = Object.create(CoroutineImpl.prototype);
  $getCOROUTINE$3.prototype.constructor = $getCOROUTINE$3;
  $createdCOROUTINE$5.prototype = Object.create(CoroutineImpl.prototype);
  $createdCOROUTINE$5.prototype.constructor = $createdCOROUTINE$5;
  $deinitCOROUTINE$6.prototype = Object.create(CoroutineImpl.prototype);
  $deinitCOROUTINE$6.prototype.constructor = $deinitCOROUTINE$6;
  $deinitCOROUTINE$7.prototype = Object.create(CoroutineImpl.prototype);
  $deinitCOROUTINE$7.prototype.constructor = $deinitCOROUTINE$7;
  $getCOROUTINE$9.prototype = Object.create(CoroutineImpl.prototype);
  $getCOROUTINE$9.prototype.constructor = $getCOROUTINE$9;
  $deinitCOROUTINE$10.prototype = Object.create(CoroutineImpl.prototype);
  $deinitCOROUTINE$10.prototype.constructor = $deinitCOROUTINE$10;
  $getCOROUTINE$11.prototype = Object.create(CoroutineImpl.prototype);
  $getCOROUTINE$11.prototype.constructor = $getCOROUTINE$11;
  //endregion
  function AsyncInjector_init_$Init$(parent, level, $mask0, $marker, $this) {
    if (!(($mask0 & 1) === 0))
      parent = null;
    if (!(($mask0 & 2) === 0))
      level = 0;
    AsyncInjector.call($this, parent, level);
    return $this;
  }
  function AsyncInjector_init_$Create$(parent, level, $mask0, $marker) {
    return AsyncInjector_init_$Init$(parent, level, $mask0, $marker, Object.create(AsyncInjector.prototype));
  }
  function Companion() {
    Companion_instance = this;
  }
  Companion.$metadata$ = objectMeta('Companion');
  var Companion_instance;
  function Companion_getInstance() {
    if (Companion_instance == null)
      new Companion();
    return Companion_instance;
  }
  function RequestContext(initialClazz) {
    this.zdw_1 = initialClazz;
  }
  RequestContext.prototype.toString = function () {
    return 'RequestContext(initialClazz=' + this.zdw_1 + ')';
  };
  RequestContext.prototype.hashCode = function () {
    return this.zdw_1.hashCode();
  };
  RequestContext.prototype.equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RequestContext))
      return false;
    var tmp0_other_with_cast = other instanceof RequestContext ? other : THROW_CCE();
    if (!this.zdw_1.equals(tmp0_other_with_cast.zdw_1))
      return false;
    return true;
  };
  RequestContext.$metadata$ = classMeta('RequestContext');
  function NotMappedException(clazz, requestedByClass, ctx, msg) {
    RuntimeException_init_$Init$(msg, this);
    this.adx_1 = clazz;
    this.bdx_1 = requestedByClass;
    this.cdx_1 = ctx;
    this.ddx_1 = msg;
    captureStack(this, NotMappedException);
  }
  NotMappedException.$metadata$ = classMeta('NotMappedException', undefined, undefined, undefined, undefined, RuntimeException.prototype);
  function AsyncInjector$getSync$slambda(this$0, $clazz, $ctx, resultContinuation) {
    this.mdx_1 = this$0;
    this.ndx_1 = $clazz;
    this.odx_1 = $ctx;
    CoroutineImpl.call(this, resultContinuation);
  }
  AsyncInjector$getSync$slambda.prototype.j53 = function ($cont) {
    var tmp = this.k53($cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  AsyncInjector$getSync$slambda.prototype.to = function ($cont) {
    return this.j53($cont);
  };
  AsyncInjector$getSync$slambda.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 2;
            this.o7_1 = 1;
            suspendResult = this.mdx_1.vdx(this.ndx_1, this.odx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 2) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  AsyncInjector$getSync$slambda.prototype.k53 = function (completion) {
    var i = new AsyncInjector$getSync$slambda(this.mdx_1, this.ndx_1, this.odx_1, completion);
    return i;
  };
  AsyncInjector$getSync$slambda.$metadata$ = classMeta('AsyncInjector$getSync$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
  function AsyncInjector$getSync$slambda_0(this$0, $clazz, $ctx, resultContinuation) {
    var i = new AsyncInjector$getSync$slambda(this$0, $clazz, $ctx, resultContinuation);
    var l = function ($cont) {
      return i.j53($cont);
    };
    l.$arity = 0;
    return l;
  }
  function AsyncInjector$getSync$2($rexception, $rresult) {
    this.xdx_1 = $rexception;
    this.ydx_1 = $rresult;
    this.wdx_1 = EmptyCoroutineContext_getInstance();
  }
  AsyncInjector$getSync$2.prototype.p5 = function () {
    return this.wdx_1;
  };
  AsyncInjector$getSync$2.prototype.n5 = function (result) {
    var exception = Result__exceptionOrNull_impl_p6xea9(result);
    if (!(exception == null)) {
      this.xdx_1._v = exception;
    } else {
      var tmp$ret$0;
      // Inline function 'kotlin.getOrThrow' call
      throwOnFailure(result);
      var tmp = _Result___get_value__impl__bjfvqg(result);
      tmp$ret$0 = (tmp == null ? true : isObject(tmp)) ? tmp : THROW_CCE();
      this.ydx_1._v = tmp$ret$0;
    }
  };
  AsyncInjector$getSync$2.$metadata$ = classMeta(undefined, [Continuation]);
  function $getProviderOrNullCOROUTINE$0(_this__u8e3s4, clazz, ctx, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hdy_1 = _this__u8e3s4;
    this.idy_1 = clazz;
    this.jdy_1 = ctx;
  }
  $getProviderOrNullCOROUTINE$0.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 7;
            this.kdy_1 = this.hdy_1.sdx_1.q(this.idy_1);
            if (this.kdy_1 == null) {
              this.mdy_1 = this.hdy_1.pdx_1;
              if (this.mdy_1 == null) {
                this.ndy_1 = null;
                this.o7_1 = 2;
                continue $sm;
              } else {
                this.o7_1 = 1;
                suspendResult = this.mdy_1.sdy(this.idy_1, this.jdy_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.ldy_1 = this.kdy_1;
              this.o7_1 = 3;
              continue $sm;
            }

            break;
          case 1:
            this.ndy_1 = suspendResult;
            this.o7_1 = 2;
            continue $sm;
          case 2:
            this.ldy_1 = this.ndy_1;
            this.o7_1 = 3;
            continue $sm;
          case 3:
            this.ody_1 = this.ldy_1;
            if (this.ody_1 == null) {
              this.qdy_1 = this.hdy_1.tdy();
              if (this.qdy_1 == null) {
                this.rdy_1 = null;
                this.o7_1 = 5;
                continue $sm;
              } else {
                this.o7_1 = 4;
                suspendResult = this.qdy_1(this.idy_1, this.jdy_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.pdy_1 = this.ody_1;
              this.o7_1 = 6;
              continue $sm;
            }

            ;
            break;
          case 4:
            this.rdy_1 = suspendResult;
            this.o7_1 = 5;
            continue $sm;
          case 5:
            var tmp3_safe_receiver = this.rdy_1;
            var tmp_0 = this;
            var tmp_1;
            if (tmp3_safe_receiver == null) {
              tmp_1 = null;
            } else {
              var tmp0_set = this.hdy_1.sdx_1;
              tmp0_set.a(this.idy_1, tmp3_safe_receiver);
              tmp_1 = tmp3_safe_receiver;
            }

            tmp_0.pdy_1 = tmp_1;
            this.o7_1 = 6;
            continue $sm;
          case 6:
            var tmp_2 = this.pdy_1;
            return (tmp_2 == null ? true : isInterface(tmp_2, AsyncObjectProvider)) ? tmp_2 : null;
          case 7:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 7) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $getProviderOrNullCOROUTINE$0.$metadata$ = classMeta('$getProviderOrNullCOROUTINE$0', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $getProviderCOROUTINE$1(_this__u8e3s4, clazz, ctx, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cdz_1 = _this__u8e3s4;
    this.ddz_1 = clazz;
    this.edz_1 = ctx;
  }
  $getProviderCOROUTINE$1.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 2;
            this.o7_1 = 1;
            suspendResult = this.cdz_1.sdy(this.ddz_1, this.edz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_elvis_lhs = suspendResult;
            var tmp_0;
            if (tmp0_elvis_lhs == null) {
              throw new NotMappedException(this.ddz_1, this.edz_1.zdw_1, this.edz_1, "Class '" + this.ddz_1 + "' doesn't have constructors " + this.edz_1);
            } else {
              tmp_0 = tmp0_elvis_lhs;
            }

            return tmp_0;
          case 2:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 2) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $getProviderCOROUTINE$1.$metadata$ = classMeta('$getProviderCOROUTINE$1', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $getCOROUTINE$3(_this__u8e3s4, clazz, ctx, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ndz_1 = _this__u8e3s4;
    this.odz_1 = clazz;
    this.pdz_1 = ctx;
  }
  $getCOROUTINE$3.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 3;
            this.o7_1 = 1;
            suspendResult = this.ndz_1.rdz(this.odz_1, this.pdz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qdz_1 = suspendResult;
            this.o7_1 = 2;
            suspendResult = this.qdz_1.sdz(this.ndz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 3) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $getCOROUTINE$3.$metadata$ = classMeta('$getCOROUTINE$3', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $createdCOROUTINE$5(_this__u8e3s4, instance, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.be0_1 = _this__u8e3s4;
    this.ce0_1 = instance;
  }
  $createdCOROUTINE$5.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 5;
            var tmp_0 = this.ce0_1;
            if (!(tmp_0 == null) ? isInterface(tmp_0, AsyncDependency) : false) {
              this.o7_1 = 1;
              suspendResult = this.ce0_1.k5g(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.o7_1 = 2;
              continue $sm;
            }

            break;
          case 1:
            this.o7_1 = 2;
            continue $sm;
          case 2:
            var tmp_1 = this.ce0_1;
            if (!(tmp_1 == null) ? isInterface(tmp_1, InjectorAsyncDependency) : false) {
              this.o7_1 = 3;
              suspendResult = this.ce0_1.de0(this.be0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.o7_1 = 4;
              continue $sm;
            }

            break;
          case 3:
            this.o7_1 = 4;
            continue $sm;
          case 4:
            var tmp_2 = this.ce0_1;
            if (!(tmp_2 == null) ? isInterface(tmp_2, AsyncDestructor) : false) {
              this.be0_1.udx_1.c(this.ce0_1);
            }

            return this.ce0_1;
          case 5:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 5) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $createdCOROUTINE$5.$metadata$ = classMeta('$createdCOROUTINE$5', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $deinitCOROUTINE$6(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.me0_1 = _this__u8e3s4;
  }
  $deinitCOROUTINE$6.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 7;
            var tmp_0 = this;
            var tmp_1 = this;
            tmp_1.ne0_1 = this.me0_1.sdx_1;
            tmp_0.oe0_1 = this.ne0_1.j1().j();
            this.o7_1 = 1;
            continue $sm;
          case 1:
            if (!this.oe0_1.k()) {
              this.o7_1 = 3;
              continue $sm;
            }

            this.pe0_1 = this.oe0_1.l();
            this.o7_1 = 2;
            suspendResult = this.pe0_1.l1().se0(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.o7_1 = 1;
            continue $sm;
          case 3:
            this.qe0_1 = this.me0_1.udx_1.j();
            this.o7_1 = 4;
            continue $sm;
          case 4:
            if (!this.qe0_1.k()) {
              this.o7_1 = 6;
              continue $sm;
            }

            this.re0_1 = this.qe0_1.l();
            this.o7_1 = 5;
            suspendResult = this.re0_1.se0(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.o7_1 = 4;
            continue $sm;
          case 6:
            this.me0_1.udx_1.x7();
            return Unit_getInstance();
          case 7:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 7) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $deinitCOROUTINE$6.$metadata$ = classMeta('$deinitCOROUTINE$6', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function AsyncInjector(parent, level) {
    Companion_getInstance();
    this.pdx_1 = parent;
    this.qdx_1 = level;
    this.rdx_1 = null;
    this.sdx_1 = LinkedHashMap_init_$Create$();
    var tmp = this;
    var tmp0_safe_receiver = this.pdx_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tdx_1;
    tmp.tdx_1 = tmp1_elvis_lhs == null ? this : tmp1_elvis_lhs;
    this.te0(getKClass(AsyncInjector), this);
    var tmp_0 = this;
    var tmp$ret$0;
    // Inline function 'kotlin.collections.arrayListOf' call
    tmp$ret$0 = ArrayList_init_$Create$();
    tmp_0.udx_1 = tmp$ret$0;
  }
  AsyncInjector.prototype.ue0 = function () {
    return this.sdx_1;
  };
  AsyncInjector.prototype.tdy = function () {
    var tmp1_elvis_lhs = this.rdx_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      var tmp0_safe_receiver = this.pdx_1;
      tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rdx_1;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    return tmp;
  };
  AsyncInjector.prototype.ve0 = function () {
    return new AsyncInjector(this, this.qdx_1 + 1 | 0);
  };
  AsyncInjector.prototype.te0 = function (clazz, instance) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.korinject.AsyncInjector.mapInstance.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    var tmp0_set = this.sdx_1;
    var tmp1_set = new InstanceAsyncObjectProvider(instance);
    tmp0_set.a(clazz, tmp1_set);
    tmp$ret$0 = this;
    return tmp$ret$0;
  };
  AsyncInjector.prototype.we0 = function (clazz, gen) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.korinject.AsyncInjector.mapSingleton.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    var tmp0_set = this.sdx_1;
    var tmp1_set = new SingletonAsyncObjectProvider(gen);
    tmp0_set.a(clazz, tmp1_set);
    tmp$ret$0 = this;
    return tmp$ret$0;
  };
  AsyncInjector.prototype.xe0 = function (clazz, gen) {
    var tmp$ret$0;
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.soywiz.korinject.AsyncInjector.mapPrototype.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    var tmp0_set = this.sdx_1;
    var tmp1_set = new PrototypeAsyncObjectProvider(gen);
    tmp0_set.a(clazz, tmp1_set);
    tmp$ret$0 = this;
    return tmp$ret$0;
  };
  AsyncInjector.prototype.sdy = function (clazz, ctx, $cont) {
    var tmp = new $getProviderOrNullCOROUTINE$0(this, clazz, ctx, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  AsyncInjector.prototype.rdz = function (clazz, ctx, $cont) {
    var tmp = new $getProviderCOROUTINE$1(this, clazz, ctx, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  AsyncInjector.prototype.ye0 = function (clazz, ctx) {
    var rresult = {_v: null};
    var rexception = {_v: null};
    var tmp$ret$0;
    // Inline function 'kotlin.suspend' call
    var tmp0_suspend = AsyncInjector$getSync$slambda_0(this, clazz, ctx, null);
    tmp$ret$0 = tmp0_suspend;
    var tmp = tmp$ret$0;
    startCoroutine(tmp, new AsyncInjector$getSync$2(rexception, rresult));
    if (!(rexception._v == null))
      throw ensureNotNull(rexception._v);
    try {
      var tmp_0;
      if (rresult._v == null) {
        throwUninitializedPropertyAccessException('rresult');
      } else {
        tmp_0 = rresult._v;
      }
      return tmp_0;
    } catch ($p) {
      if ($p instanceof Error) {
        if ($p instanceof CancellationException)
          throw $p;
        throw RuntimeException_init_$Create$("Couldn't get instance of type " + clazz + ' synchronously', $p);
      } else {
        throw $p;
      }
    }
  };
  AsyncInjector.prototype.vdx = function (clazz, ctx, $cont) {
    var tmp = new $getCOROUTINE$3(this, clazz, ctx, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  AsyncInjector.prototype.ze0 = function (clazz, ctx, $cont, $mask0, $handler) {
    if (!(($mask0 & 2) === 0))
      ctx = new RequestContext(clazz);
    return this.vdx(clazz, ctx, $cont);
  };
  AsyncInjector.prototype.toString = function () {
    return 'AsyncInjector(level=' + this.qdx_1 + ')';
  };
  AsyncInjector.prototype.ae1 = function (instance, $cont) {
    var tmp = new $createdCOROUTINE$5(this, instance, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  AsyncInjector.prototype.se0 = function ($cont) {
    var tmp = new $deinitCOROUTINE$6(this, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  AsyncInjector.$metadata$ = classMeta('AsyncInjector');
  function InjectorAsyncDependency() {
  }
  InjectorAsyncDependency.$metadata$ = interfaceMeta('InjectorAsyncDependency');
  function AsyncDependency() {
  }
  AsyncDependency.$metadata$ = interfaceMeta('AsyncDependency');
  function AsyncObjectProvider() {
  }
  AsyncObjectProvider.$metadata$ = interfaceMeta('AsyncObjectProvider');
  function $deinitCOROUTINE$7(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.je1_1 = _this__u8e3s4;
  }
  $deinitCOROUTINE$7.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.je1_1.me1_1;
            tmp_0.ke1_1 = (tmp_1 == null ? true : isInterface(tmp_1, AsyncDestructor)) ? tmp_1 : null;
            if (this.ke1_1 == null) {
              this.le1_1 = null;
              this.o7_1 = 2;
              continue $sm;
            } else {
              this.o7_1 = 1;
              suspendResult = this.ke1_1.se0(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

            break;
          case 1:
            var tmp_2 = this;
            tmp_2.le1_1 = Unit_getInstance();
            this.o7_1 = 2;
            continue $sm;
          case 2:
            ;
            return Unit_getInstance();
          case 3:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 3) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $deinitCOROUTINE$7.$metadata$ = classMeta('$deinitCOROUTINE$7', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function InstanceAsyncObjectProvider(instance) {
    this.me1_1 = instance;
  }
  InstanceAsyncObjectProvider.prototype.sdz = function (injector, $cont) {
    return this.me1_1;
  };
  InstanceAsyncObjectProvider.prototype.se0 = function ($cont) {
    var tmp = new $deinitCOROUTINE$7(this, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  InstanceAsyncObjectProvider.prototype.toString = function () {
    return 'InstanceAsyncObjectProvider(' + this.me1_1 + ')';
  };
  InstanceAsyncObjectProvider.$metadata$ = classMeta('InstanceAsyncObjectProvider', [AsyncObjectProvider]);
  function $getCOROUTINE$9(_this__u8e3s4, injector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ve1_1 = _this__u8e3s4;
    this.we1_1 = injector;
  }
  $getCOROUTINE$9.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 4;
            if (this.ve1_1.ze1_1 == null) {
              this.o7_1 = 1;
              suspendResult = this.ve1_1.ye1_1(this.we1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.o7_1 = 3;
              continue $sm;
            }

            break;
          case 1:
            this.xe1_1 = suspendResult;
            this.o7_1 = 2;
            suspendResult = this.we1_1.ae1(this.xe1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.ve1_1.ze1_1 = ARGUMENT;
            this.o7_1 = 3;
            continue $sm;
          case 3:
            return ensureNotNull(this.ve1_1.ze1_1);
          case 4:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 4) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $getCOROUTINE$9.$metadata$ = classMeta('$getCOROUTINE$9', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function $deinitCOROUTINE$10(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ie2_1 = _this__u8e3s4;
  }
  $deinitCOROUTINE$10.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.ie2_1.ze1_1;
            tmp_0.je2_1 = (tmp_1 == null ? true : isInterface(tmp_1, AsyncDestructor)) ? tmp_1 : null;
            if (this.je2_1 == null) {
              this.ke2_1 = null;
              this.o7_1 = 2;
              continue $sm;
            } else {
              this.o7_1 = 1;
              suspendResult = this.je2_1.se0(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

            break;
          case 1:
            var tmp_2 = this;
            tmp_2.ke2_1 = Unit_getInstance();
            this.o7_1 = 2;
            continue $sm;
          case 2:
            ;
            return Unit_getInstance();
          case 3:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 3) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $deinitCOROUTINE$10.$metadata$ = classMeta('$deinitCOROUTINE$10', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function SingletonAsyncObjectProvider(generator) {
    this.ye1_1 = generator;
    this.ze1_1 = null;
  }
  SingletonAsyncObjectProvider.prototype.sdz = function (injector, $cont) {
    var tmp = new $getCOROUTINE$9(this, injector, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  SingletonAsyncObjectProvider.prototype.se0 = function ($cont) {
    var tmp = new $deinitCOROUTINE$10(this, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  SingletonAsyncObjectProvider.prototype.toString = function () {
    return 'SingletonAsyncObjectProvider(' + this.ze1_1 + ')';
  };
  SingletonAsyncObjectProvider.$metadata$ = classMeta('SingletonAsyncObjectProvider', [AsyncObjectProvider]);
  function $getCOROUTINE$11(_this__u8e3s4, injector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.te2_1 = _this__u8e3s4;
    this.ue2_1 = injector;
  }
  $getCOROUTINE$11.prototype.v7 = function () {
    var suspendResult = this.q7_1;
    $sm: do
      try {
        var tmp = this.o7_1;
        switch (tmp) {
          case 0:
            this.p7_1 = 3;
            this.o7_1 = 1;
            suspendResult = this.te2_1.we2_1(this.ue2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ve2_1 = suspendResult;
            this.o7_1 = 2;
            suspendResult = this.ue2_1.ae1(this.ve2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.r7_1;
        }
      } catch ($p) {
        if (this.p7_1 === 3) {
          throw $p;
        } else {
          this.o7_1 = this.p7_1;
          this.r7_1 = $p;
        }
      }
     while (true);
  };
  $getCOROUTINE$11.$metadata$ = classMeta('$getCOROUTINE$11', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
  function PrototypeAsyncObjectProvider(generator) {
    this.we2_1 = generator;
  }
  PrototypeAsyncObjectProvider.prototype.sdz = function (injector, $cont) {
    var tmp = new $getCOROUTINE$11(this, injector, $cont);
    tmp.q7_1 = Unit_getInstance();
    tmp.r7_1 = null;
    return tmp.v7();
  };
  PrototypeAsyncObjectProvider.prototype.se0 = function ($cont) {
    return Unit_getInstance();
  };
  PrototypeAsyncObjectProvider.prototype.toString = function () {
    return 'PrototypeAsyncObjectProvider()';
  };
  PrototypeAsyncObjectProvider.$metadata$ = classMeta('PrototypeAsyncObjectProvider', [AsyncObjectProvider]);
  function AsyncDestructor() {
  }
  AsyncDestructor.$metadata$ = interfaceMeta('AsyncDestructor');
  function Companion_0() {
    Companion_instance_0 = this;
  }
  Companion_0.$metadata$ = objectMeta('Companion', [Key]);
  var Companion_instance_0;
  function Companion_getInstance_0() {
    if (Companion_instance_0 == null)
      new Companion_0();
    return Companion_instance_0;
  }
  function AsyncInjectorContext(injector) {
    Companion_getInstance_0();
    this.xe2_1 = injector;
  }
  AsyncInjectorContext.prototype.k1 = function () {
    return Companion_getInstance_0();
  };
  AsyncInjectorContext.$metadata$ = classMeta('AsyncInjectorContext', [Element]);
  //region block: post-declaration
  AsyncInjectorContext.prototype.i8 = get;
  AsyncInjectorContext.prototype.o8 = fold;
  AsyncInjectorContext.prototype.n8 = minusKey;
  AsyncInjectorContext.prototype.p8 = plus;
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = AsyncDependency;
  _.$_$.b = RequestContext;
  _.$_$.c = AsyncInjectorContext;
  _.$_$.d = AsyncInjector;
  _.$_$.e = InjectorAsyncDependency;
  _.$_$.f = AsyncInjector_init_$Create$;
  //endregion
  return _;
}));

//# sourceMappingURL=korlibs-korinject.js.map