import{CharacterCodes,Comparer,Comparison,Debug,EqualityComparer,MapLike,Queue,SortedArray,SortedReadonlyArray,TextSpan}from"./_namespaces/ts.js";export const emptyArray:never[]=[]as never[];export const emptyMap:ReadonlyMap<never,never>=new Map<never,never>;export function length(array:readonly any[]|undefined):number{return array===void 0?0:array.length}export function forEach<T,U>(array:readonly T[]|undefined,callback:(element:T,index:number)=>U|undefined):U|undefined{if(array!==void 0)for(let i=0;i<array.length;i++){let result=callback(array[i],i);if(result)return result}}export function forEachRight<T,U>(array:readonly T[]|undefined,callback:(element:T,index:number)=>U|undefined):U|undefined{if(array!==void 0)for(let i=array.length-1;i>=0;i--){let result=callback(array[i],i);if(result)return result}}export function firstDefined<T,U>(array:readonly T[]|undefined,callback:(element:T,index:number)=>U|undefined):U|undefined{if(array!==void 0)for(let i=0;i<array.length;i++){let result=callback(array[i],i);if(result!==void 0)return result}}export function firstDefinedIterator<T,U>(iter:Iterable<T>,callback:(element:T)=>U|undefined):U|undefined{for(let value of iter){let result=callback(value);if(result!==v

... [truncated 35499 chars] ...

nt:T)=>element is U):U[]|undefined{if(array!==void 0){let len=array.length,index=0;for(;index<len&&predicate(array[index]);)index++;return array.slice(0,index)as U[]}}export function skipWhile<T,U extends T>(array:readonly T[]|undefined,predicate:(element:T)=>element is U):Exclude<T,U>[]|undefined{if(array!==void 0){let len=array.length,index=0;for(;index<len&&predicate(array[index]);)index++;return array.slice(index)as Exclude<T,U>[]}}export function isNodeLikeSystem():boolean{return typeof process<`u`&&!!process.nextTick&&!(process as any).browser&&typeof require<`u`}