(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_atomicfu) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var VOID = kotlin_kotlin.$_$.g;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.q;
  var protoOf = kotlin_kotlin.$_$.vf;
  var Unit_getInstance = kotlin_kotlin.$_$.g6;
  var toList = kotlin_kotlin.$_$.jc;
  var classMeta = kotlin_kotlin.$_$.ge;
  var setMetadataFor = kotlin_kotlin.$_$.wf;
  var THROW_IAE = kotlin_kotlin.$_$.gm;
  var enumEntries = kotlin_kotlin.$_$.td;
  var Enum = kotlin_kotlin.$_$.sl;
  var objectMeta = kotlin_kotlin.$_$.uf;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.f2;
  var toString = kotlin_kotlin.$_$.ag;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.jn;
  var objectCreate = kotlin_kotlin.$_$.tf;
  var emptyList = kotlin_kotlin.$_$.d9;
  var THROW_CCE = kotlin_kotlin.$_$.fm;
  var trimMargin = kotlin_kotlin.$_$.al;
  var hashCode = kotlin_kotlin.$_$.ue;
  var equals = kotlin_kotlin.$_$.ke;
  var firstOrNull = kotlin_kotlin.$_$.l9;
  var lastOrNull = kotlin_kotlin.$_$.ja;
  var Iterable = kotlin_kotlin.$_$.u6;
  var Collection = kotlin_kotlin.$_$.p6;
  var isInterface = kotlin_kotlin.$_$.ff;
  var get_lastIndex = kotlin_kotlin.$_$.ha;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.s2;
  var last = kotlin_kotlin.$_$.la;
  var first = kotlin_kotlin.$_$.p9;
  var ReentrantLock = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.a;
  //endregion
  //region block: pre-declaration
  setMetadataFor(InvalidateCallbackTracker, 'InvalidateCallbackTracker', classMeta);
  setMetadataFor(LoadType, 'LoadType', classMeta, Enum);
  setMetadataFor(Companion, 'Companion', objectMeta);
  setMetadataFor(PagingConfig, 'PagingConfig', classMeta);
  setMetadataFor(LoadParams, 'LoadParams', classMeta);
  setMetadataFor(Refresh, 'Refresh', classMeta, LoadParams);
  setMetadataFor(Append, 'Append', classMeta, LoadParams);
  setMetadataFor(Prepend, 'Prepend', classMeta, LoadParams);
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor(LoadResult, 'LoadResult', classMeta);
  setMetadataFor(Error_0, 'Error', classMeta, LoadResult);
  setMetadataFor(Invalid, 'Invalid', classMeta, LoadResult, VOID, Invalid);
  setMetadataFor(Page, 'Page', classMeta, LoadResult, [LoadResult, Iterable]);
  setMetadataFor(PagingSource, 'PagingSource', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PagingState, 'PagingState', classMeta);
  setMetadataFor(PagingLogger, 'PagingLogger', objectMeta);
  setMetadataFor(ReentrantLock_0, 'ReentrantLock', classMeta, VOID, VOID, ReentrantLock_0);
  //endregion
  function get_NULL() {
    _init_properties_FlowExt_kt__yvi0dd();
    return NULL;
  }
  var NULL;
  var properties_initialized_FlowExt_kt_frd9wj;
  function _init_properties_FlowExt_kt__yvi0dd() {
    if (!properties_initialized_FlowExt_kt_frd9wj) {
      properties_initialized_FlowExt_kt_frd9wj = true;
      NULL = new Object();
    }
  }
  function _get_callbackInvoker__ln2f5w($this) {
    return $this.callbackInvoker_1;
  }
  function _get_invalidGetter__27738v($this) {
    return $this.invalidGetter_1;
  }
  function _get_lock__d9xa4g($this) {
    return $this.lock_1;
  }
  function _get_callbacks__bg494z($this) {
    return $this.callbacks_1;
  }
  function _set_invalid__2a1ke($this, _set____db54di) {
    $this.invalid_1 = _set____db54di;
  }
  function InvalidateCallbackTracker(callbackInvoker, invalidGetter) {
    invalidGetter = invalidGetter === VOID ? null : invalidGetter;
    this.callbackInvoker_1 = callbackInvoker;
    this.invalidGetter_1 = invalidGetter;
    this.lock_1 = new ReentrantLock_0();
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.callbacks_1 = ArrayList_init_$Create$();
    this.invalid_1 = false;
  }
  protoOf(InvalidateCallbackTracker).get_invalid_xocxse_k$ = function () {
    return this.invalid_1;
  };
  protoOf(InvalidateCallbackTracker).callbackCount_nfu5sa_k$ = function () {
    return this.callbacks_1.get_size_woubt6_k$();
  };
  protoOf(InvalidateCallbackTracker).registerInvalidatedCallback_d3th04_k$ = function (callback) {
    var tmp0_safe_receiver = this.invalidGetter_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver()) === true) {
      this.invalidate_uamw91_k$();
    }
    if (this.invalid_1) {
      this.callbackInvoker_1(callback);
      return Unit_getInstance();
    }
    var tmp$ret$1;
    $l$block: {
      // Inline function 'androidx.paging.internal.withLock' call
      var this_0 = this.lock_1;
      // Inline function 'kotlin.contracts.contract' call
      try {
        this_0.lock_fp5s9n_k$();
        // Inline function 'androidx.paging.InvalidateCallbackTracker.registerInvalidatedCallback.<anonymous>' call
        var tmp;
        if (this.invalid_1) {
          tmp = true;
        } else {
          this.callbacks_1.add_utx5q5_k$(callback);
          tmp = false;
        }
        tmp$ret$1 = tmp;
        break $l$block;
      }finally {
        this_0.unlock_85w96c_k$();
      }
    }
    var callImmediately = tmp$ret$1;
    if (callImmediately) {
      this.callbackInvoker_1(callback);
    }
  };
  protoOf(InvalidateCallbackTracker).unregisterInvalidatedCallback_h9b1v_k$ = function (callback) {
    $l$block: {
      // Inline function 'androidx.paging.internal.withLock' call
      var this_0 = this.lock_1;
      // Inline function 'kotlin.contracts.contract' call
      try {
        this_0.lock_fp5s9n_k$();
        // Inline function 'androidx.paging.InvalidateCallbackTracker.unregisterInvalidatedCallback.<anonymous>' call
        this.callbacks_1.remove_cedx0m_k$(callback);
        break $l$block;
      }finally {
        this_0.unlock_85w96c_k$();
      }
    }
  };
  protoOf(InvalidateCallbackTracker).invalidate_uamw91_k$ = function () {
    if (this.invalid_1)
      return false;
    $l$block: {
      // Inline function 'androidx.paging.internal.withLock' call
      var this_0 = this.lock_1;
      // Inline function 'kotlin.contracts.contract' call
      try {
        this_0.lock_fp5s9n_k$();
        // Inline function 'androidx.paging.InvalidateCallbackTracker.invalidate.<anonymous>' call
        if (this.invalid_1)
          return false;
        this.invalid_1 = true;
        // Inline function 'kotlin.also' call
        var this_1 = toList(this.callbacks_1);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'androidx.paging.InvalidateCallbackTracker.invalidate.<anonymous>.<anonymous>' call
        this.callbacks_1.clear_j9egeb_k$();
        break $l$block;
      }finally {
        this_0.unlock_85w96c_k$();
      }
    }
    var callbacksToInvoke = this_1;
    // Inline function 'kotlin.collections.forEach' call
    var action = this.callbackInvoker_1;
    var tmp0_iterator = callbacksToInvoke.iterator_jk1svi_k$();
    while (tmp0_iterator.hasNext_bitz1p_k$()) {
      var element = tmp0_iterator.next_20eer_k$();
      action(element);
    }
    return true;
  };
  var LoadType_REFRESH_instance;
  var LoadType_PREPEND_instance;
  var LoadType_APPEND_instance;
  function values() {
    return [LoadType_REFRESH_getInstance(), LoadType_PREPEND_getInstance(), LoadType_APPEND_getInstance()];
  }
  function valueOf(value) {
    switch (value) {
      case 'REFRESH':
        return LoadType_REFRESH_getInstance();
      case 'PREPEND':
        return LoadType_PREPEND_getInstance();
      case 'APPEND':
        return LoadType_APPEND_getInstance();
      default:
        LoadType_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  function get_entries() {
    if ($ENTRIES == null)
      $ENTRIES = enumEntries(values());
    return $ENTRIES;
  }
  var LoadType_entriesInitialized;
  function LoadType_initEntries() {
    if (LoadType_entriesInitialized)
      return Unit_getInstance();
    LoadType_entriesInitialized = true;
    LoadType_REFRESH_instance = new LoadType('REFRESH', 0);
    LoadType_PREPEND_instance = new LoadType('PREPEND', 1);
    LoadType_APPEND_instance = new LoadType('APPEND', 2);
  }
  var $ENTRIES;
  function LoadType(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LoadType_REFRESH_getInstance() {
    LoadType_initEntries();
    return LoadType_REFRESH_instance;
  }
  function LoadType_PREPEND_getInstance() {
    LoadType_initEntries();
    return LoadType_PREPEND_instance;
  }
  function LoadType_APPEND_getInstance() {
    LoadType_initEntries();
    return LoadType_APPEND_instance;
  }
  function Companion() {
    Companion_instance = this;
    this.MAX_SIZE_UNBOUNDED_1 = 2147483647;
    this.DEFAULT_INITIAL_PAGE_MULTIPLIER_1 = 3;
  }
  protoOf(Companion).get_MAX_SIZE_UNBOUNDED_o2sqvq_k$ = function () {
    return this.MAX_SIZE_UNBOUNDED_1;
  };
  protoOf(Companion).get_DEFAULT_INITIAL_PAGE_MULTIPLIER_21k78x_k$ = function () {
    return this.DEFAULT_INITIAL_PAGE_MULTIPLIER_1;
  };
  var Companion_instance;
  function Companion_getInstance() {
    if (Companion_instance == null)
      new Companion();
    return Companion_instance;
  }
  function PagingConfig(pageSize, prefetchDistance, enablePlaceholders, initialLoadSize, maxSize, jumpThreshold) {
    Companion_getInstance();
    prefetchDistance = prefetchDistance === VOID ? pageSize : prefetchDistance;
    enablePlaceholders = enablePlaceholders === VOID ? true : enablePlaceholders;
    initialLoadSize = initialLoadSize === VOID ? imul(pageSize, 3) : initialLoadSize;
    maxSize = maxSize === VOID ? 2147483647 : maxSize;
    jumpThreshold = jumpThreshold === VOID ? Companion_getInstance_1().get_COUNT_UNDEFINED_gfivhz_k$() : jumpThreshold;
    this.pageSize_1 = pageSize;
    this.prefetchDistance_1 = prefetchDistance;
    this.enablePlaceholders_1 = enablePlaceholders;
    this.initialLoadSize_1 = initialLoadSize;
    this.maxSize_1 = maxSize;
    this.jumpThreshold_1 = jumpThreshold;
    if (!this.enablePlaceholders_1 ? this.prefetchDistance_1 === 0 : false) {
      throw IllegalArgumentException_init_$Create$('Placeholders and prefetch are the only ways to trigger loading of more data in PagingData, so either placeholders must be enabled, or prefetch distance must be > 0.');
    }
    if (!(this.maxSize_1 === 2147483647) ? this.maxSize_1 < (this.pageSize_1 + imul(this.prefetchDistance_1, 2) | 0) : false) {
      throw IllegalArgumentException_init_$Create$('Maximum size must be at least pageSize + 2*prefetchDist' + (', pageSize=' + this.pageSize_1 + ', prefetchDist=' + this.prefetchDistance_1) + (', maxSize=' + this.maxSize_1));
    }
    // Inline function 'kotlin.require' call
    // Inline function 'kotlin.contracts.contract' call
    if (!(this.jumpThreshold_1 === Companion_getInstance_1().get_COUNT_UNDEFINED_gfivhz_k$() ? true : this.jumpThreshold_1 > 0)) {
      // Inline function 'androidx.paging.PagingConfig.<anonymous>' call
      var message = 'jumpThreshold must be positive to enable jumps or COUNT_UNDEFINED to disable jumping.';
      throw IllegalArgumentException_init_$Create$(toString(message));
    }
  }
  protoOf(PagingConfig).get_pageSize_hl979j_k$ = function () {
    return this.pageSize_1;
  };
  protoOf(PagingConfig).get_prefetchDistance_xrcrf9_k$ = function () {
    return this.prefetchDistance_1;
  };
  protoOf(PagingConfig).get_enablePlaceholders_e59f64_k$ = function () {
    return this.enablePlaceholders_1;
  };
  protoOf(PagingConfig).get_initialLoadSize_svsqyq_k$ = function () {
    return this.initialLoadSize_1;
  };
  protoOf(PagingConfig).get_maxSize_f83j4s_k$ = function () {
    return this.maxSize_1;
  };
  protoOf(PagingConfig).get_jumpThreshold_ptz5u4_k$ = function () {
    return this.jumpThreshold_1;
  };
  function log(level, tr, block) {
    tr = tr === VOID ? null : tr;
    var logger = PagingLogger_getInstance();
    if (logger.isLoggable_3pa0mp_k$(level)) {
      logger.log_dwsd6o_k$(level, block(), tr);
    }
  }
  function get_DEBUG() {
    return DEBUG;
  }
  var DEBUG;
  function Refresh(key, loadSize, placeholdersEnabled) {
    LoadParams.call(this, loadSize, placeholdersEnabled);
    this.key_1 = key;
  }
  protoOf(Refresh).get_key_18j28a_k$ = function () {
    return this.key_1;
  };
  function Append(key, loadSize, placeholdersEnabled) {
    LoadParams.call(this, loadSize, placeholdersEnabled);
    this.key_1 = key;
  }
  protoOf(Append).get_key_18j28a_k$ = function () {
    return this.key_1;
  };
  function Prepend(key, loadSize, placeholdersEnabled) {
    LoadParams.call(this, loadSize, placeholdersEnabled);
    this.key_1 = key;
  }
  protoOf(Prepend).get_key_18j28a_k$ = function () {
    return this.key_1;
  };
  function Companion_0() {
    Companion_instance_0 = this;
  }
  protoOf(Companion_0).create_uukl1p_k$ = function (loadType, key, loadSize, placeholdersEnabled) {
    var tmp;
    switch (loadType.get_ordinal_ip24qg_k$()) {
      case 0:
        tmp = new Refresh(key, loadSize, placeholdersEnabled);
        break;
      case 1:
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlin.requireNotNull' call
          // Inline function 'kotlin.contracts.contract' call
          if (key == null) {
            // Inline function 'androidx.paging.Companion.create.<anonymous>' call
            var message = 'key cannot be null for prepend';
            throw IllegalArgumentException_init_$Create$(toString(message));
          } else {
            tmp$ret$1 = key;
            break $l$block;
          }
        }

        var tmp1_key = tmp$ret$1;
        tmp = new Prepend(tmp1_key, loadSize, placeholdersEnabled);
        break;
      case 2:
        var tmp$ret$3;
        $l$block_0: {
          // Inline function 'kotlin.requireNotNull' call
          // Inline function 'kotlin.contracts.contract' call
          if (key == null) {
            // Inline function 'androidx.paging.Companion.create.<anonymous>' call
            var message_0 = 'key cannot be null for append';
            throw IllegalArgumentException_init_$Create$(toString(message_0));
          } else {
            tmp$ret$3 = key;
            break $l$block_0;
          }
        }

        var tmp2_key = tmp$ret$3;
        tmp = new Append(tmp2_key, loadSize, placeholdersEnabled);
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  };
  var Companion_instance_0;
  function Companion_getInstance_0() {
    if (Companion_instance_0 == null)
      new Companion_0();
    return Companion_instance_0;
  }
  function Page_init_$Init$(data, prevKey, nextKey, $this) {
    Page.call($this, data, prevKey, nextKey, -2147483648, -2147483648);
    return $this;
  }
  function Page_init_$Create$(data, prevKey, nextKey) {
    return Page_init_$Init$(data, prevKey, nextKey, objectCreate(protoOf(Page)));
  }
  function Companion_1() {
    Companion_instance_1 = this;
    this.COUNT_UNDEFINED_1 = -2147483648;
    this.EMPTY_1 = new Page(emptyList(), null, null, 0, 0);
  }
  protoOf(Companion_1).get_COUNT_UNDEFINED_gfivhz_k$ = function () {
    return this.COUNT_UNDEFINED_1;
  };
  protoOf(Companion_1).get_EMPTY_i8q41w_k$ = function () {
    return this.EMPTY_1;
  };
  protoOf(Companion_1).empty_tm8wxc_k$ = function () {
    var tmp = this.EMPTY_1;
    return tmp instanceof Page ? tmp : THROW_CCE();
  };
  var Companion_instance_1;
  function Companion_getInstance_1() {
    if (Companion_instance_1 == null)
      new Companion_1();
    return Companion_instance_1;
  }
  function Error_0(throwable) {
    LoadResult.call(this);
    this.throwable_1 = throwable;
  }
  protoOf(Error_0).get_throwable_c93gq1_k$ = function () {
    return this.throwable_1;
  };
  protoOf(Error_0).toString = function () {
    return trimMargin('LoadResult.Error(\n                    |   throwable: ' + this.throwable_1 + '\n                    |) ');
  };
  protoOf(Error_0).component1_7eebsc_k$ = function () {
    return this.throwable_1;
  };
  protoOf(Error_0).copy_5o3qmy_k$ = function (throwable) {
    return new Error_0(throwable);
  };
  protoOf(Error_0).copy$default_od4u9a_k$ = function (throwable, $super) {
    throwable = throwable === VOID ? this.throwable_1 : throwable;
    return $super === VOID ? this.copy_5o3qmy_k$(throwable) : $super.copy_5o3qmy_k$.call(this, throwable);
  };
  protoOf(Error_0).hashCode = function () {
    return hashCode(this.throwable_1);
  };
  protoOf(Error_0).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Error_0))
      return false;
    var tmp0_other_with_cast = other instanceof Error_0 ? other : THROW_CCE();
    if (!equals(this.throwable_1, tmp0_other_with_cast.throwable_1))
      return false;
    return true;
  };
  function Invalid() {
    LoadResult.call(this);
  }
  protoOf(Invalid).toString = function () {
    return 'LoadResult.Invalid';
  };
  function Page(data, prevKey, nextKey, itemsBefore, itemsAfter) {
    Companion_getInstance_1();
    itemsBefore = itemsBefore === VOID ? -2147483648 : itemsBefore;
    itemsAfter = itemsAfter === VOID ? -2147483648 : itemsAfter;
    LoadResult.call(this);
    this.data_1 = data;
    this.prevKey_1 = prevKey;
    this.nextKey_1 = nextKey;
    this.itemsBefore_1 = itemsBefore;
    this.itemsAfter_1 = itemsAfter;
    // Inline function 'kotlin.require' call
    // Inline function 'kotlin.contracts.contract' call
    if (!(this.itemsBefore_1 === -2147483648 ? true : this.itemsBefore_1 >= 0)) {
      // Inline function 'androidx.paging.Page.<anonymous>' call
      var message = 'itemsBefore cannot be negative';
      throw IllegalArgumentException_init_$Create$(toString(message));
    }
    // Inline function 'kotlin.require' call
    // Inline function 'kotlin.contracts.contract' call
    if (!(this.itemsAfter_1 === -2147483648 ? true : this.itemsAfter_1 >= 0)) {
      // Inline function 'androidx.paging.Page.<anonymous>' call
      var message_0 = 'itemsAfter cannot be negative';
      throw IllegalArgumentException_init_$Create$(toString(message_0));
    }
  }
  protoOf(Page).get_data_wokkxf_k$ = function () {
    return this.data_1;
  };
  protoOf(Page).get_prevKey_3zwgxp_k$ = function () {
    return this.prevKey_1;
  };
  protoOf(Page).get_nextKey_vt8qrn_k$ = function () {
    return this.nextKey_1;
  };
  protoOf(Page).get_itemsBefore_6fgn4a_k$ = function () {
    return this.itemsBefore_1;
  };
  protoOf(Page).get_itemsAfter_r9uxl1_k$ = function () {
    return this.itemsAfter_1;
  };
  protoOf(Page).iterator_jk1svi_k$ = function () {
    return this.data_1.listIterator_xjshxw_k$();
  };
  protoOf(Page).toString = function () {
    return trimMargin('LoadResult.Page(\n                    |   data size: ' + this.data_1.get_size_woubt6_k$() + '\n                    |   first Item: ' + firstOrNull(this.data_1) + '\n                    |   last Item: ' + lastOrNull(this.data_1) + '\n                    |   nextKey: ' + this.nextKey_1 + '\n                    |   prevKey: ' + this.prevKey_1 + '\n                    |   itemsBefore: ' + this.itemsBefore_1 + '\n                    |   itemsAfter: ' + this.itemsAfter_1 + '\n                    |) ');
  };
  protoOf(Page).component1_7eebsc_k$ = function () {
    return this.data_1;
  };
  protoOf(Page).component2_7eebsb_k$ = function () {
    return this.prevKey_1;
  };
  protoOf(Page).component3_7eebsa_k$ = function () {
    return this.nextKey_1;
  };
  protoOf(Page).component4_7eebs9_k$ = function () {
    return this.itemsBefore_1;
  };
  protoOf(Page).component5_7eebs8_k$ = function () {
    return this.itemsAfter_1;
  };
  protoOf(Page).copy_mij4oi_k$ = function (data, prevKey, nextKey, itemsBefore, itemsAfter) {
    return new Page(data, prevKey, nextKey, itemsBefore, itemsAfter);
  };
  protoOf(Page).copy$default_xffw1u_k$ = function (data, prevKey, nextKey, itemsBefore, itemsAfter, $super) {
    data = data === VOID ? this.data_1 : data;
    prevKey = prevKey === VOID ? this.prevKey_1 : prevKey;
    nextKey = nextKey === VOID ? this.nextKey_1 : nextKey;
    itemsBefore = itemsBefore === VOID ? this.itemsBefore_1 : itemsBefore;
    itemsAfter = itemsAfter === VOID ? this.itemsAfter_1 : itemsAfter;
    return $super === VOID ? this.copy_mij4oi_k$(data, prevKey, nextKey, itemsBefore, itemsAfter) : $super.copy_mij4oi_k$.call(this, data, prevKey, nextKey, itemsBefore, itemsAfter);
  };
  protoOf(Page).hashCode = function () {
    var result = hashCode(this.data_1);
    result = imul(result, 31) + (this.prevKey_1 == null ? 0 : hashCode(this.prevKey_1)) | 0;
    result = imul(result, 31) + (this.nextKey_1 == null ? 0 : hashCode(this.nextKey_1)) | 0;
    result = imul(result, 31) + this.itemsBefore_1 | 0;
    result = imul(result, 31) + this.itemsAfter_1 | 0;
    return result;
  };
  protoOf(Page).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Page))
      return false;
    var tmp0_other_with_cast = other instanceof Page ? other : THROW_CCE();
    if (!equals(this.data_1, tmp0_other_with_cast.data_1))
      return false;
    if (!equals(this.prevKey_1, tmp0_other_with_cast.prevKey_1))
      return false;
    if (!equals(this.nextKey_1, tmp0_other_with_cast.nextKey_1))
      return false;
    if (!(this.itemsBefore_1 === tmp0_other_with_cast.itemsBefore_1))
      return false;
    if (!(this.itemsAfter_1 === tmp0_other_with_cast.itemsAfter_1))
      return false;
    return true;
  };
  function _get_invalidateCallbackTracker__cdriuf($this) {
    return $this.invalidateCallbackTracker_1;
  }
  function LoadParams(loadSize, placeholdersEnabled) {
    Companion_getInstance_0();
    this.loadSize_1 = loadSize;
    this.placeholdersEnabled_1 = placeholdersEnabled;
  }
  protoOf(LoadParams).get_loadSize_1a4pbk_k$ = function () {
    return this.loadSize_1;
  };
  protoOf(LoadParams).get_placeholdersEnabled_t0o508_k$ = function () {
    return this.placeholdersEnabled_1;
  };
  function LoadResult() {
  }
  function PagingSource$invalidateCallbackTracker$lambda(it) {
    it();
    return Unit_getInstance();
  }
  function PagingSource() {
    var tmp = this;
    tmp.invalidateCallbackTracker_1 = new InvalidateCallbackTracker(PagingSource$invalidateCallbackTracker$lambda);
  }
  protoOf(PagingSource).get_invalidateCallbackCount_jh1cpm_k$ = function () {
    return this.invalidateCallbackTracker_1.callbackCount_nfu5sa_k$();
  };
  protoOf(PagingSource).get_jumpingSupported_exxy3n_k$ = function () {
    return false;
  };
  protoOf(PagingSource).get_keyReuseSupported_wzjygg_k$ = function () {
    return false;
  };
  protoOf(PagingSource).get_invalid_xocxse_k$ = function () {
    return this.invalidateCallbackTracker_1.get_invalid_xocxse_k$();
  };
  protoOf(PagingSource).invalidate_p4aufp_k$ = function () {
    if (this.invalidateCallbackTracker_1.invalidate_uamw91_k$()) {
      // Inline function 'androidx.paging.log' call
      var level = get_DEBUG();
      var logger = PagingLogger_getInstance();
      if (logger.isLoggable_3pa0mp_k$(level)) {
        // Inline function 'androidx.paging.PagingSource.invalidate.<anonymous>' call
        var tmp$ret$0 = 'Invalidated PagingSource ' + this;
        logger.log_dwsd6o_k$(level, tmp$ret$0, null);
      }
    }
  };
  protoOf(PagingSource).registerInvalidatedCallback_m09l7x_k$ = function (onInvalidatedCallback) {
    this.invalidateCallbackTracker_1.registerInvalidatedCallback_d3th04_k$(onInvalidatedCallback);
  };
  protoOf(PagingSource).unregisterInvalidatedCallback_3xxsu2_k$ = function (onInvalidatedCallback) {
    this.invalidateCallbackTracker_1.unregisterInvalidatedCallback_h9b1v_k$(onInvalidatedCallback);
  };
  function _get_leadingPlaceholderCount__ibc27l($this) {
    return $this.leadingPlaceholderCount_1;
  }
  function PagingState(pages, anchorPosition, config, leadingPlaceholderCount) {
    this.pages_1 = pages;
    this.anchorPosition_1 = anchorPosition;
    this.config_1 = config;
    this.leadingPlaceholderCount_1 = leadingPlaceholderCount;
  }
  protoOf(PagingState).get_pages_iwqisb_k$ = function () {
    return this.pages_1;
  };
  protoOf(PagingState).get_anchorPosition_9otczr_k$ = function () {
    return this.anchorPosition_1;
  };
  protoOf(PagingState).get_config_c0698r_k$ = function () {
    return this.config_1;
  };
  protoOf(PagingState).equals = function (other) {
    var tmp;
    var tmp_0;
    var tmp_1;
    var tmp_2;
    if (other instanceof PagingState) {
      tmp_2 = equals(this.pages_1, other.pages_1);
    } else {
      tmp_2 = false;
    }
    if (tmp_2) {
      tmp_1 = this.anchorPosition_1 == other.anchorPosition_1;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      tmp_0 = equals(this.config_1, other.config_1);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.leadingPlaceholderCount_1 === other.leadingPlaceholderCount_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PagingState).hashCode = function () {
    var tmp = hashCode(this.pages_1);
    // Inline function 'kotlin.hashCode' call
    var tmp0_safe_receiver = this.anchorPosition_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
    return ((tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0) + hashCode(this.config_1) | 0) + this.leadingPlaceholderCount_1 | 0;
  };
  protoOf(PagingState).closestItemToPosition_3yf15k_k$ = function (anchorPosition) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var this_0 = this.pages_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.isEmpty_y1axqb_k$();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = true;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'androidx.paging.PagingState.closestItemToPosition.<anonymous>' call
        if (!element.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
      }
      tmp$ret$0 = true;
    }
    if (tmp$ret$0)
      return null;
    // Inline function 'androidx.paging.PagingState.anchorPositionToPagedIndices' call
    var pageIndex = 0;
    var index = anchorPosition - this.leadingPlaceholderCount_1 | 0;
    while (pageIndex < get_lastIndex(this.pages_1) ? index > get_lastIndex(this.pages_1.get_c1px32_k$(pageIndex).get_data_wokkxf_k$()) : false) {
      index = index - this.pages_1.get_c1px32_k$(pageIndex).get_data_wokkxf_k$().get_size_woubt6_k$() | 0;
      pageIndex = pageIndex + 1 | 0;
    }
    var pageIndex_0 = pageIndex;
    var index_0 = index;
    var tmp$ret$4;
    $l$block_1: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator_0 = this.pages_1.iterator_jk1svi_k$();
      while (tmp0_iterator_0.hasNext_bitz1p_k$()) {
        var element_0 = tmp0_iterator_0.next_20eer_k$();
        // Inline function 'androidx.paging.PagingState.closestItemToPosition.<anonymous>.<anonymous>' call
        // Inline function 'kotlin.collections.isNotEmpty' call
        if (!element_0.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$4 = element_0;
          break $l$block_1;
        }
      }
      throw NoSuchElementException_init_$Create$('Collection contains no element matching the predicate.');
    }
    var firstNonEmptyPage = tmp$ret$4;
    var tmp$ret$7;
    $l$block_2: {
      // Inline function 'kotlin.collections.last' call
      var this_1 = this.pages_1;
      var iterator = this_1.listIterator_70e65o_k$(this_1.get_size_woubt6_k$());
      while (iterator.hasPrevious_qh0629_k$()) {
        var element_1 = iterator.previous_l2dfd5_k$();
        // Inline function 'androidx.paging.PagingState.closestItemToPosition.<anonymous>.<anonymous>' call
        // Inline function 'kotlin.collections.isNotEmpty' call
        if (!element_1.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$7 = element_1;
          break $l$block_2;
        }
      }
      throw NoSuchElementException_init_$Create$('List contains no element matching the predicate.');
    }
    var lastNonEmptyPage = tmp$ret$7;
    var tmp_0;
    if (index_0 < 0) {
      tmp_0 = first(firstNonEmptyPage.get_data_wokkxf_k$());
    } else if (pageIndex_0 === get_lastIndex(this.pages_1) ? index_0 > get_lastIndex(last(this.pages_1).get_data_wokkxf_k$()) : false) {
      tmp_0 = last(lastNonEmptyPage.get_data_wokkxf_k$());
    } else {
      tmp_0 = this.pages_1.get_c1px32_k$(pageIndex_0).get_data_wokkxf_k$().get_c1px32_k$(index_0);
    }
    return tmp_0;
  };
  protoOf(PagingState).closestPageToPosition_njecmk_k$ = function (anchorPosition) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var this_0 = this.pages_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.isEmpty_y1axqb_k$();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = true;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'androidx.paging.PagingState.closestPageToPosition.<anonymous>' call
        if (!element.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
      }
      tmp$ret$0 = true;
    }
    if (tmp$ret$0)
      return null;
    // Inline function 'androidx.paging.PagingState.anchorPositionToPagedIndices' call
    var pageIndex = 0;
    var index = anchorPosition - this.leadingPlaceholderCount_1 | 0;
    while (pageIndex < get_lastIndex(this.pages_1) ? index > get_lastIndex(this.pages_1.get_c1px32_k$(pageIndex).get_data_wokkxf_k$()) : false) {
      index = index - this.pages_1.get_c1px32_k$(pageIndex).get_data_wokkxf_k$().get_size_woubt6_k$() | 0;
      pageIndex = pageIndex + 1 | 0;
    }
    var pageIndex_0 = pageIndex;
    return index < 0 ? first(this.pages_1) : this.pages_1.get_c1px32_k$(pageIndex_0);
  };
  protoOf(PagingState).isEmpty_y1axqb_k$ = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.all' call
      var this_0 = this.pages_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.isEmpty_y1axqb_k$();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = true;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'androidx.paging.PagingState.isEmpty.<anonymous>' call
        if (!element.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
      }
      tmp$ret$0 = true;
    }
    return tmp$ret$0;
  };
  protoOf(PagingState).firstItemOrNull_y6rnil_k$ = function () {
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.pages_1.iterator_jk1svi_k$();
      while (tmp0_iterator.hasNext_bitz1p_k$()) {
        var element = tmp0_iterator.next_20eer_k$();
        // Inline function 'androidx.paging.PagingState.firstItemOrNull.<anonymous>' call
        // Inline function 'kotlin.collections.isNotEmpty' call
        if (!element.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp0_safe_receiver = tmp$ret$2;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_data_wokkxf_k$();
    return tmp1_safe_receiver == null ? null : firstOrNull(tmp1_safe_receiver);
  };
  protoOf(PagingState).lastItemOrNull_yli1pv_k$ = function () {
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.lastOrNull' call
      var this_0 = this.pages_1;
      var iterator = this_0.listIterator_70e65o_k$(this_0.get_size_woubt6_k$());
      while (iterator.hasPrevious_qh0629_k$()) {
        var element = iterator.previous_l2dfd5_k$();
        // Inline function 'androidx.paging.PagingState.lastItemOrNull.<anonymous>' call
        // Inline function 'kotlin.collections.isNotEmpty' call
        if (!element.get_data_wokkxf_k$().isEmpty_y1axqb_k$()) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp0_safe_receiver = tmp$ret$2;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.get_data_wokkxf_k$();
    return tmp1_safe_receiver == null ? null : lastOrNull(tmp1_safe_receiver);
  };
  protoOf(PagingState).toString = function () {
    return 'PagingState(pages=' + this.pages_1 + ', anchorPosition=' + this.anchorPosition_1 + ', config=' + this.config_1 + ', ' + ('leadingPlaceholderCount=' + this.leadingPlaceholderCount_1 + ')');
  };
  protoOf(PagingState).anchorPositionToPagedIndices_74gxqh_k$ = function (anchorPosition, block) {
    var pageIndex = 0;
    var index = anchorPosition - this.leadingPlaceholderCount_1 | 0;
    while (pageIndex < get_lastIndex(this.pages_1) ? index > get_lastIndex(this.pages_1.get_c1px32_k$(pageIndex).get_data_wokkxf_k$()) : false) {
      index = index - this.pages_1.get_c1px32_k$(pageIndex).get_data_wokkxf_k$().get_size_woubt6_k$() | 0;
      pageIndex = pageIndex + 1 | 0;
    }
    return block(pageIndex, index);
  };
  function withLock(_this__u8e3s4, block) {
    // Inline function 'kotlin.contracts.contract' call
    try {
      _this__u8e3s4.lock_fp5s9n_k$();
      return block();
    }finally {
      _this__u8e3s4.unlock_85w96c_k$();
    }
  }
  function PagingLogger() {
    PagingLogger_instance = this;
  }
  protoOf(PagingLogger).isLoggable_3pa0mp_k$ = function (level) {
    return false;
  };
  protoOf(PagingLogger).log_dwsd6o_k$ = function (level, message, tr) {
  };
  protoOf(PagingLogger).log$default_qg788w_k$ = function (level, message, tr, $super) {
    tr = tr === VOID ? null : tr;
    var tmp;
    if ($super === VOID) {
      this.log_dwsd6o_k$(level, message, tr);
      tmp = Unit_getInstance();
    } else {
      tmp = $super.log_dwsd6o_k$.call(this, level, message, tr);
    }
    return tmp;
  };
  var PagingLogger_instance;
  function PagingLogger_getInstance() {
    if (PagingLogger_instance == null)
      new PagingLogger();
    return PagingLogger_instance;
  }
  function _get_delegate__idh0py($this) {
    return $this.delegate_1;
  }
  function ReentrantLock_0() {
    this.delegate_1 = new ReentrantLock();
  }
  protoOf(ReentrantLock_0).lock_fp5s9n_k$ = function () {
    // Inline function 'kotlinx.atomicfu.locks.ReentrantLock.lock' call
    this.delegate_1;
  };
  protoOf(ReentrantLock_0).unlock_85w96c_k$ = function () {
    // Inline function 'kotlinx.atomicfu.locks.ReentrantLock.unlock' call
    this.delegate_1;
  };
  //region block: init
  DEBUG = 3;
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = Error_0;
  _.$_$.b = Invalid;
  _.$_$.c = Page;
  _.$_$.d = LoadResult;
  _.$_$.e = PagingSource;
  _.$_$.f = PagingState;
  _.$_$.g = Page_init_$Create$;
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-atomicfu.js')));

//# sourceMappingURL=multiplatform-paging-root-paging-common.js.map
