11cb0ef41Sopenharmony_ciconst SOURCES = {
21cb0ef41Sopenharmony_ci  __proto__: null,
31cb0ef41Sopenharmony_ci  'test:Array': ['1', '2'], // both `1,2` and `12` are valid ESM
41cb0ef41Sopenharmony_ci  'test:ArrayBuffer': new ArrayBuffer(0),
51cb0ef41Sopenharmony_ci  'test:BigInt64Array': new BigInt64Array(0),
61cb0ef41Sopenharmony_ci  'test:BigUint64Array': new BigUint64Array(0),
71cb0ef41Sopenharmony_ci  'test:Float32Array': new Float32Array(0),
81cb0ef41Sopenharmony_ci  'test:Float64Array': new Float64Array(0),
91cb0ef41Sopenharmony_ci  'test:Int8Array': new Int8Array(0),
101cb0ef41Sopenharmony_ci  'test:Int16Array': new Int16Array(0),
111cb0ef41Sopenharmony_ci  'test:Int32Array': new Int32Array(0),
121cb0ef41Sopenharmony_ci  'test:null': null,
131cb0ef41Sopenharmony_ci  'test:Object': {},
141cb0ef41Sopenharmony_ci  'test:SharedArrayBuffer': new SharedArrayBuffer(0),
151cb0ef41Sopenharmony_ci  'test:string': '',
161cb0ef41Sopenharmony_ci  'test:String': new String(''),
171cb0ef41Sopenharmony_ci  'test:Uint8Array': new Uint8Array(0),
181cb0ef41Sopenharmony_ci  'test:Uint8ClampedArray': new Uint8ClampedArray(0),
191cb0ef41Sopenharmony_ci  'test:Uint16Array': new Uint16Array(0),
201cb0ef41Sopenharmony_ci  'test:Uint32Array': new Uint32Array(0),
211cb0ef41Sopenharmony_ci  'test:undefined': undefined,
221cb0ef41Sopenharmony_ci}
231cb0ef41Sopenharmony_ciexport function resolve(specifier, context, next) {
241cb0ef41Sopenharmony_ci  if (specifier.startsWith('test:')) {
251cb0ef41Sopenharmony_ci    return {
261cb0ef41Sopenharmony_ci      importAttributes: context.importAttributes,
271cb0ef41Sopenharmony_ci      shortCircuit: true,
281cb0ef41Sopenharmony_ci      url: specifier,
291cb0ef41Sopenharmony_ci    };
301cb0ef41Sopenharmony_ci  }
311cb0ef41Sopenharmony_ci  return next(specifier);
321cb0ef41Sopenharmony_ci}
331cb0ef41Sopenharmony_ci
341cb0ef41Sopenharmony_ciexport function load(href, context, next) {
351cb0ef41Sopenharmony_ci  if (href.startsWith('test:')) {
361cb0ef41Sopenharmony_ci    return {
371cb0ef41Sopenharmony_ci      format: 'module',
381cb0ef41Sopenharmony_ci      shortCircuit: true,
391cb0ef41Sopenharmony_ci      source: SOURCES[href],
401cb0ef41Sopenharmony_ci    };
411cb0ef41Sopenharmony_ci  }
421cb0ef41Sopenharmony_ci  return next(href);
431cb0ef41Sopenharmony_ci}
44