2026-07-24 07:16:23 +00:00
// Module ID: 5470
2026-07-27 11:26:19 +00:00
// Function ID: 46759
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 5067, 653, 4016, 686, 507, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 5470 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_4 from "_isNativeReflectConstruct" ;
import { FetchState } from "_isNativeReflectConstruct" ;
import { Endpoints } from "ME" ;
const require = arg1 ;
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
function tokensToAppTokensMap ( arg0 , arr ) {
let done ;
let mapped ;
if ( null != arr ) {
mapped = arr . map ( ( arg0 ) = > {
const items = [ arg0 , null ] ;
return items ;
} ) ;
}
if ( null == mapped ) {
mapped = [ ] ;
}
const fromEntriesResult = Object . fromEntries ( mapped ) ;
const tmp2 = _createForOfIteratorHelperLoose ( arg0 ) ;
let iter = tmp2 ( ) ;
if ( ! iter . done ) {
do {
let value = iter . value ;
fromEntriesResult [ value . application . id ] = value ;
let iter2 = tmp2 ( ) ;
iter = iter2 ;
done = iter2 . done ;
} while ( ! done ) ;
}
return fromEntriesResult ;
}
function fetchAuthorizedApps() {
return _fetchAuthorizedApps ( . . . arguments ) ;
}
2026-07-23 10:11:24 +00:00
async function _fetchAuthorizedApps ( arg0 , arg1 ) {
let closure_0 = arg0 ;
const HTTP = outer2_0 ( outer2_2 [ 5 ] ) . HTTP ;
let obj = { url : outer2_6.OAUTH2_TOKENS , oldFormErrors : true , rejectWithError : true , query : { application_ids : arg0 } } ;
const value = HTTP . get ( obj ) ;
2026-07-20 16:05:17 +00:00
yield value . then ( ( body ) = > {
2026-07-23 10:11:24 +00:00
let obj = outer3_1 ( outer3_2 [ 4 ] ) ;
obj = { type : "USER_AUTHORIZED_APPS_UPDATE" , isFullFetch : null == closure_0 , tokens : outer3_10 ( body . body , closure_0 ) } ;
2026-07-20 16:05:17 +00:00
return obj . dispatch ( obj ) ;
} , ( ) = > {
2026-07-23 10:11:24 +00:00
let obj = outer3_1 ( outer3_2 [ 4 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { type : "USER_AUTHORIZED_APPS_REQUEST_FAILED" } ;
2026-07-23 10:11:24 +00:00
if ( null == closure_0 ) {
2026-07-20 16:05:17 +00:00
obj = { type : "full" } ;
let obj1 = obj ;
} else {
2026-07-23 10:11:24 +00:00
obj1 = { type : "partial" , applicationIds : closure_0 } ;
2026-07-20 16:05:17 +00:00
}
obj . request = obj1 ;
return obj . dispatch ( obj ) ;
} ) ;
}
2026-07-23 10:11:24 +00:00
let obj = {
predicate ( arg0 ) {
return store . getFetchStateForApplication ( arg0 ) !== FetchState . FETCHING ;
} ,
onQueued ( applicationIds ) {
let request = importDefault ( 686 ) ;
request = { type : "partial" , applicationIds } ;
return request . dispatch ( { type : "USER_AUTHORIZED_APPS_REQUEST" , request } ) ;
} ,
onCancelled ( applicationIds ) {
let obj = importDefault ( 686 ) ;
obj = { type : "USER_AUTHORIZED_APPS_REQUEST_CANCELLED" , applicationIds } ;
return obj . dispatch ( obj ) ;
}
} ;
const batchInvocationManager = new require ( "_createForOfIteratorHelperLoose" ) . BatchInvocationManager ( fetchAuthorizedApps , obj ) ;
obj = {
2026-07-20 16:05:17 +00:00
fetch ( arg0 ) {
if ( store . getFetchState ( ) !== FetchState . FETCHING ) {
if ( null != arg0 ) {
2026-07-23 10:11:24 +00:00
( function queueAuthorizedApps ( arg0 ) {
outer1_7 . queue ( arg0 ) . catch ( ( arg0 ) = > {
if ( ! ( arg0 instanceof outer2_0 ( outer2_2 [ 3 ] ) . BatchInvocationManagerResetError ) ) {
throw arg0 ;
}
} ) ;
} ) ( arg0 ) ;
2026-07-20 16:05:17 +00:00
} else {
batchInvocationManager . reset ( ) ;
2026-07-23 10:11:24 +00:00
let obj = importDefault ( 686 ) ;
obj = { type : "USER_AUTHORIZED_APPS_REQUEST" } ;
obj = { type : "full" } ;
obj . request = obj ;
obj . dispatch ( obj ) ;
2026-07-20 16:05:17 +00:00
fetchAuthorizedApps ( ) ;
}
}
} ,
delete ( arg0 ) {
2026-07-23 10:11:24 +00:00
const self = this ;
const HTTP = self ( 507 ) . HTTP ;
const obj = { url : Endpoints.OAUTH2_TOKEN ( arg0 ) , oldFormErrors : true , rejectWithError : true } ;
2026-07-20 16:05:17 +00:00
HTTP . del ( obj ) . then ( ( ) = > {
const response = self . fetch ( ) ;
} ) ;
}
} ;
2026-07-23 10:11:24 +00:00
const result = require ( "ME" ) . fileFinishedImporting ( "modules/oauth2/AuthorizedAppsActionCreators.tsx" ) ;
export default obj ;