declare var TextDecoder ; export class LoaderUtils { static decodeText ( array ) { if ( typeof TextDecoder !== 'undefined' ) { return new TextDecoder ( ) . decode ( array ) ; } let s = '' ; for ( const c of array as Array < number > ) { s += String . fromCharCode ( c ) ; } return decodeURIComponent ( escape ( s ) ) ; } static extractUrlBase ( url ) { const parts = url . split ( '/' ) ; if ( parts . length === 1 ) { return './' ; } parts . pop ( ) ; return parts . join ( '/' ) + '/' ; } }