built-in-definitions.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.CommonInstanceDependencies = exports.InstanceProperties = exports.StaticProperties = exports.BuiltIns = exports.PromiseDependenciesWithIterators = exports.PromiseDependencies = exports.CommonIterators = void 0;
  4. var _data = _interopRequireDefault(require("../core-js-compat/data.js"));
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6. const polyfillsOrder = {};
  7. Object.keys(_data.default).forEach((name, index) => {
  8. polyfillsOrder[name] = index;
  9. });
  10. const define = (pure, global, name = global[0], exclude) => {
  11. return {
  12. name,
  13. pure,
  14. global: global.sort((a, b) => polyfillsOrder[a] - polyfillsOrder[b]),
  15. exclude
  16. };
  17. };
  18. const typed = name => define(null, [name, ...TypedArrayDependencies]);
  19. const ArrayNatureIterators = ["es.array.iterator", "web.dom-collections.iterator"];
  20. const CommonIterators = ["es.string.iterator", ...ArrayNatureIterators];
  21. exports.CommonIterators = CommonIterators;
  22. const ArrayNatureIteratorsWithTag = ["es.object.to-string", ...ArrayNatureIterators];
  23. const CommonIteratorsWithTag = ["es.object.to-string", ...CommonIterators];
  24. const ErrorDependencies = ["es.error.cause", "es.error.to-string"];
  25. const TypedArrayDependencies = ["es.typed-array.at", "es.typed-array.copy-within", "es.typed-array.every", "es.typed-array.fill", "es.typed-array.filter", "es.typed-array.find", "es.typed-array.find-index", "es.typed-array.for-each", "es.typed-array.includes", "es.typed-array.index-of", "es.typed-array.iterator", "es.typed-array.join", "es.typed-array.last-index-of", "es.typed-array.map", "es.typed-array.reduce", "es.typed-array.reduce-right", "es.typed-array.reverse", "es.typed-array.set", "es.typed-array.slice", "es.typed-array.some", "es.typed-array.sort", "es.typed-array.subarray", "es.typed-array.to-locale-string", "es.typed-array.to-string", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice", "esnext.typed-array.filter-reject", "esnext.typed-array.find-last", "esnext.typed-array.find-last-index", "esnext.typed-array.group-by", "esnext.typed-array.to-reversed", "esnext.typed-array.to-sorted", "esnext.typed-array.to-spliced", "esnext.typed-array.unique-by", "esnext.typed-array.with"];
  26. const PromiseDependencies = ["es.promise", "es.object.to-string"];
  27. exports.PromiseDependencies = PromiseDependencies;
  28. const PromiseDependenciesWithIterators = [...PromiseDependencies, ...CommonIterators];
  29. exports.PromiseDependenciesWithIterators = PromiseDependenciesWithIterators;
  30. const SymbolDependencies = ["es.symbol", "es.symbol.description", "es.object.to-string"];
  31. const MapDependencies = ["es.map", "esnext.map.delete-all", "esnext.map.emplace", "esnext.map.every", "esnext.map.filter", "esnext.map.find", "esnext.map.find-key", "esnext.map.includes", "esnext.map.key-of", "esnext.map.map-keys", "esnext.map.map-values", "esnext.map.merge", "esnext.map.reduce", "esnext.map.some", "esnext.map.update", ...CommonIteratorsWithTag];
  32. const SetDependencies = ["es.set", "esnext.set.add-all", "esnext.set.delete-all", "esnext.set.difference", "esnext.set.every", "esnext.set.filter", "esnext.set.find", "esnext.set.intersection", "esnext.set.is-disjoint-from", "esnext.set.is-subset-of", "esnext.set.is-superset-of", "esnext.set.join", "esnext.set.map", "esnext.set.reduce", "esnext.set.some", "esnext.set.symmetric-difference", "esnext.set.union", ...CommonIteratorsWithTag];
  33. const WeakMapDependencies = ["es.weak-map", "esnext.weak-map.delete-all", "esnext.weak-map.emplace", ...CommonIteratorsWithTag];
  34. const WeakSetDependencies = ["es.weak-set", "esnext.weak-set.add-all", "esnext.weak-set.delete-all", ...CommonIteratorsWithTag];
  35. const DOMExceptionDependencies = ["web.dom-exception.constructor", "web.dom-exception.stack", "web.dom-exception.to-string-tag", "es.error.to-string"];
  36. const URLSearchParamsDependencies = ["web.url-search-params", ...CommonIteratorsWithTag];
  37. const AsyncIteratorDependencies = ["esnext.async-iterator.constructor", ...PromiseDependencies];
  38. const AsyncIteratorProblemMethods = ["esnext.async-iterator.every", "esnext.async-iterator.filter", "esnext.async-iterator.find", "esnext.async-iterator.flat-map", "esnext.async-iterator.for-each", "esnext.async-iterator.map", "esnext.async-iterator.reduce", "esnext.async-iterator.some"];
  39. const IteratorDependencies = ["esnext.iterator.constructor", "es.object.to-string"];
  40. const TypedArrayStaticMethods = {
  41. from: define(null, ["es.typed-array.from"]),
  42. fromAsync: define(null, ["esnext.typed-array.from-async", ...PromiseDependenciesWithIterators]),
  43. of: define(null, ["es.typed-array.of"])
  44. };
  45. const BuiltIns = {
  46. AsyncIterator: define("async-iterator/index", AsyncIteratorDependencies),
  47. AggregateError: define("aggregate-error", ["es.aggregate-error", ...ErrorDependencies, ...CommonIteratorsWithTag, "es.aggregate-error.cause"]),
  48. ArrayBuffer: define(null, ["es.array-buffer.constructor", "es.array-buffer.slice", "es.object.to-string"]),
  49. DataView: define(null, ["es.data-view", "es.array-buffer.slice", "es.object.to-string"]),
  50. Date: define(null, ["es.date.to-string"]),
  51. DOMException: define("dom-exception", DOMExceptionDependencies),
  52. Error: define(null, ErrorDependencies),
  53. EvalError: define(null, ErrorDependencies),
  54. Float32Array: typed("es.typed-array.float32-array"),
  55. Float64Array: typed("es.typed-array.float64-array"),
  56. Int8Array: typed("es.typed-array.int8-array"),
  57. Int16Array: typed("es.typed-array.int16-array"),
  58. Int32Array: typed("es.typed-array.int32-array"),
  59. Iterator: define("iterator/index", IteratorDependencies),
  60. Uint8Array: typed("es.typed-array.uint8-array"),
  61. Uint8ClampedArray: typed("es.typed-array.uint8-clamped-array"),
  62. Uint16Array: typed("es.typed-array.uint16-array"),
  63. Uint32Array: typed("es.typed-array.uint32-array"),
  64. Map: define("map/index", MapDependencies),
  65. Number: define(null, ["es.number.constructor"]),
  66. Observable: define("observable/index", ["esnext.observable", "esnext.symbol.observable", "es.object.to-string", ...CommonIteratorsWithTag]),
  67. Promise: define("promise/index", PromiseDependencies),
  68. RangeError: define(null, ErrorDependencies),
  69. ReferenceError: define(null, ErrorDependencies),
  70. Reflect: define(null, ["es.reflect.to-string-tag", "es.object.to-string"]),
  71. RegExp: define(null, ["es.regexp.constructor", "es.regexp.dot-all", "es.regexp.exec", "es.regexp.sticky", "es.regexp.to-string"]),
  72. Set: define("set/index", SetDependencies),
  73. Symbol: define("symbol/index", SymbolDependencies),
  74. SyntaxError: define(null, ErrorDependencies),
  75. TypeError: define(null, ErrorDependencies),
  76. URIError: define(null, ErrorDependencies),
  77. URL: define("url/index", ["web.url", ...URLSearchParamsDependencies]),
  78. URLSearchParams: define("url-search-params/index", URLSearchParamsDependencies),
  79. WeakMap: define("weak-map/index", WeakMapDependencies),
  80. WeakSet: define("weak-set/index", WeakSetDependencies),
  81. atob: define("atob", ["web.atob", ...DOMExceptionDependencies]),
  82. btoa: define("btoa", ["web.btoa", ...DOMExceptionDependencies]),
  83. clearImmediate: define("clear-immediate", ["web.immediate"]),
  84. compositeKey: define("composite-key", ["esnext.composite-key"]),
  85. compositeSymbol: define("composite-symbol", ["esnext.composite-symbol"]),
  86. escape: define("escape", ["es.escape"]),
  87. fetch: define(null, PromiseDependencies),
  88. globalThis: define("global-this", ["es.global-this"]),
  89. parseFloat: define("parse-float", ["es.parse-float"]),
  90. parseInt: define("parse-int", ["es.parse-int"]),
  91. queueMicrotask: define("queue-microtask", ["web.queue-microtask"]),
  92. setImmediate: define("set-immediate", ["web.immediate"]),
  93. setInterval: define("set-interval", ["web.timers"]),
  94. setTimeout: define("set-timeout", ["web.timers"]),
  95. structuredClone: define("structured-clone", ["web.structured-clone", ...DOMExceptionDependencies, "es.array.iterator", "es.object.keys", "es.object.to-string", "es.map", "es.set"]),
  96. unescape: define("unescape", ["es.unescape"])
  97. };
  98. exports.BuiltIns = BuiltIns;
  99. const StaticProperties = {
  100. AsyncIterator: {
  101. from: define("async-iterator/from", ["esnext.async-iterator.from", ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods, ...CommonIterators])
  102. },
  103. Array: {
  104. from: define("array/from", ["es.array.from", "es.string.iterator"]),
  105. fromAsync: define("array/from-async", ["esnext.array.from-async", ...PromiseDependenciesWithIterators]),
  106. isArray: define("array/is-array", ["es.array.is-array"]),
  107. isTemplateObject: define("array/is-template-object", ["esnext.array.is-template-object"]),
  108. of: define("array/of", ["es.array.of"])
  109. },
  110. ArrayBuffer: {
  111. isView: define(null, ["es.array-buffer.is-view"])
  112. },
  113. BigInt: {
  114. range: define("bigint/range", ["esnext.bigint.range", "es.object.to-string"])
  115. },
  116. Date: {
  117. now: define("date/now", ["es.date.now"])
  118. },
  119. Function: {
  120. isCallable: define("function/is-callable", ["esnext.function.is-callable"]),
  121. isConstructor: define("function/is-constructor", ["esnext.function.is-constructor"])
  122. },
  123. Iterator: {
  124. from: define("iterator/from", ["esnext.iterator.from", ...IteratorDependencies, ...CommonIterators])
  125. },
  126. JSON: {
  127. stringify: define("json/stringify", ["es.json.stringify"], "es.symbol")
  128. },
  129. Math: {
  130. DEG_PER_RAD: define("math/deg-per-rad", ["esnext.math.deg-per-rad"]),
  131. RAD_PER_DEG: define("math/rad-per-deg", ["esnext.math.rad-per-deg"]),
  132. acosh: define("math/acosh", ["es.math.acosh"]),
  133. asinh: define("math/asinh", ["es.math.asinh"]),
  134. atanh: define("math/atanh", ["es.math.atanh"]),
  135. cbrt: define("math/cbrt", ["es.math.cbrt"]),
  136. clamp: define("math/clamp", ["esnext.math.clamp"]),
  137. clz32: define("math/clz32", ["es.math.clz32"]),
  138. cosh: define("math/cosh", ["es.math.cosh"]),
  139. degrees: define("math/degrees", ["esnext.math.degrees"]),
  140. expm1: define("math/expm1", ["es.math.expm1"]),
  141. fround: define("math/fround", ["es.math.fround"]),
  142. fscale: define("math/fscale", ["esnext.math.fscale"]),
  143. hypot: define("math/hypot", ["es.math.hypot"]),
  144. iaddh: define("math/iaddh", ["esnext.math.iaddh"]),
  145. imul: define("math/imul", ["es.math.imul"]),
  146. imulh: define("math/imulh", ["esnext.math.imulh"]),
  147. isubh: define("math/isubh", ["esnext.math.isubh"]),
  148. log10: define("math/log10", ["es.math.log10"]),
  149. log1p: define("math/log1p", ["es.math.log1p"]),
  150. log2: define("math/log2", ["es.math.log2"]),
  151. radians: define("math/radians", ["esnext.math.radians"]),
  152. scale: define("math/scale", ["esnext.math.scale"]),
  153. seededPRNG: define("math/seeded-prng", ["esnext.math.seeded-prng"]),
  154. sign: define("math/sign", ["es.math.sign"]),
  155. signbit: define("math/signbit", ["esnext.math.signbit"]),
  156. sinh: define("math/sinh", ["es.math.sinh"]),
  157. tanh: define("math/tanh", ["es.math.tanh"]),
  158. trunc: define("math/trunc", ["es.math.trunc"]),
  159. umulh: define("math/umulh", ["esnext.math.umulh"])
  160. },
  161. Map: {
  162. from: define(null, ["esnext.map.from", ...MapDependencies]),
  163. groupBy: define(null, ["esnext.map.group-by", ...MapDependencies]),
  164. keyBy: define(null, ["esnext.map.key-by", ...MapDependencies]),
  165. of: define(null, ["esnext.map.of", ...MapDependencies])
  166. },
  167. Number: {
  168. EPSILON: define("number/epsilon", ["es.number.epsilon"]),
  169. MAX_SAFE_INTEGER: define("number/max-safe-integer", ["es.number.max-safe-integer"]),
  170. MIN_SAFE_INTEGER: define("number/min-safe-integer", ["es.number.min-safe-integer"]),
  171. fromString: define("number/from-string", ["esnext.number.from-string"]),
  172. isFinite: define("number/is-finite", ["es.number.is-finite"]),
  173. isInteger: define("number/is-integer", ["es.number.is-integer"]),
  174. isNaN: define("number/is-nan", ["es.number.is-nan"]),
  175. isSafeInteger: define("number/is-safe-integer", ["es.number.is-safe-integer"]),
  176. parseFloat: define("number/parse-float", ["es.number.parse-float"]),
  177. parseInt: define("number/parse-int", ["es.number.parse-int"]),
  178. range: define("number/range", ["esnext.number.range", "es.object.to-string"])
  179. },
  180. Object: {
  181. assign: define("object/assign", ["es.object.assign"]),
  182. create: define("object/create", ["es.object.create"]),
  183. defineProperties: define("object/define-properties", ["es.object.define-properties"]),
  184. defineProperty: define("object/define-property", ["es.object.define-property"]),
  185. entries: define("object/entries", ["es.object.entries"]),
  186. freeze: define("object/freeze", ["es.object.freeze"]),
  187. fromEntries: define("object/from-entries", ["es.object.from-entries", "es.array.iterator"]),
  188. getOwnPropertyDescriptor: define("object/get-own-property-descriptor", ["es.object.get-own-property-descriptor"]),
  189. getOwnPropertyDescriptors: define("object/get-own-property-descriptors", ["es.object.get-own-property-descriptors"]),
  190. getOwnPropertyNames: define("object/get-own-property-names", ["es.object.get-own-property-names"]),
  191. getOwnPropertySymbols: define("object/get-own-property-symbols", ["es.symbol"]),
  192. getPrototypeOf: define("object/get-prototype-of", ["es.object.get-prototype-of"]),
  193. hasOwn: define("object/has-own", ["es.object.has-own"]),
  194. is: define("object/is", ["es.object.is"]),
  195. isExtensible: define("object/is-extensible", ["es.object.is-extensible"]),
  196. isFrozen: define("object/is-frozen", ["es.object.is-frozen"]),
  197. isSealed: define("object/is-sealed", ["es.object.is-sealed"]),
  198. keys: define("object/keys", ["es.object.keys"]),
  199. preventExtensions: define("object/prevent-extensions", ["es.object.prevent-extensions"]),
  200. seal: define("object/seal", ["es.object.seal"]),
  201. setPrototypeOf: define("object/set-prototype-of", ["es.object.set-prototype-of"]),
  202. values: define("object/values", ["es.object.values"])
  203. },
  204. Promise: {
  205. all: define(null, PromiseDependenciesWithIterators),
  206. allSettled: define(null, ["es.promise.all-settled", ...PromiseDependenciesWithIterators]),
  207. any: define(null, ["es.promise.any", "es.aggregate-error", ...PromiseDependenciesWithIterators]),
  208. race: define(null, PromiseDependenciesWithIterators),
  209. try: define(null, ["esnext.promise.try", ...PromiseDependenciesWithIterators])
  210. },
  211. Reflect: {
  212. apply: define("reflect/apply", ["es.reflect.apply"]),
  213. construct: define("reflect/construct", ["es.reflect.construct"]),
  214. defineMetadata: define("reflect/define-metadata", ["esnext.reflect.define-metadata"]),
  215. defineProperty: define("reflect/define-property", ["es.reflect.define-property"]),
  216. deleteMetadata: define("reflect/delete-metadata", ["esnext.reflect.delete-metadata"]),
  217. deleteProperty: define("reflect/delete-property", ["es.reflect.delete-property"]),
  218. get: define("reflect/get", ["es.reflect.get"]),
  219. getMetadata: define("reflect/get-metadata", ["esnext.reflect.get-metadata"]),
  220. getMetadataKeys: define("reflect/get-metadata-keys", ["esnext.reflect.get-metadata-keys"]),
  221. getOwnMetadata: define("reflect/get-own-metadata", ["esnext.reflect.get-own-metadata"]),
  222. getOwnMetadataKeys: define("reflect/get-own-metadata-keys", ["esnext.reflect.get-own-metadata-keys"]),
  223. getOwnPropertyDescriptor: define("reflect/get-own-property-descriptor", ["es.reflect.get-own-property-descriptor"]),
  224. getPrototypeOf: define("reflect/get-prototype-of", ["es.reflect.get-prototype-of"]),
  225. has: define("reflect/has", ["es.reflect.has"]),
  226. hasMetadata: define("reflect/has-metadata", ["esnext.reflect.has-metadata"]),
  227. hasOwnMetadata: define("reflect/has-own-metadata", ["esnext.reflect.has-own-metadata"]),
  228. isExtensible: define("reflect/is-extensible", ["es.reflect.is-extensible"]),
  229. metadata: define("reflect/metadata", ["esnext.reflect.metadata"]),
  230. ownKeys: define("reflect/own-keys", ["es.reflect.own-keys"]),
  231. preventExtensions: define("reflect/prevent-extensions", ["es.reflect.prevent-extensions"]),
  232. set: define("reflect/set", ["es.reflect.set"]),
  233. setPrototypeOf: define("reflect/set-prototype-of", ["es.reflect.set-prototype-of"])
  234. },
  235. Set: {
  236. from: define(null, ["esnext.set.from", ...SetDependencies]),
  237. of: define(null, ["esnext.set.of", ...SetDependencies])
  238. },
  239. String: {
  240. cooked: define("string/cooked", ["esnext.string.cooked"]),
  241. fromCodePoint: define("string/from-code-point", ["es.string.from-code-point"]),
  242. raw: define("string/raw", ["es.string.raw"])
  243. },
  244. Symbol: {
  245. asyncDispose: define("symbol/async-dispose", ["esnext.symbol.async-dispose"]),
  246. asyncIterator: define("symbol/async-iterator", ["es.symbol.async-iterator"]),
  247. dispose: define("symbol/dispose", ["esnext.symbol.dispose"]),
  248. for: define("symbol/for", [], "es.symbol"),
  249. hasInstance: define("symbol/has-instance", ["es.symbol.has-instance", "es.function.has-instance"]),
  250. isConcatSpreadable: define("symbol/is-concat-spreadable", ["es.symbol.is-concat-spreadable", "es.array.concat"]),
  251. iterator: define("symbol/iterator", ["es.symbol.iterator", ...CommonIteratorsWithTag]),
  252. keyFor: define("symbol/key-for", [], "es.symbol"),
  253. match: define("symbol/match", ["es.symbol.match", "es.string.match"]),
  254. matcher: define("symbol/matcher", ["esnext.symbol.matcher"]),
  255. matchAll: define("symbol/match-all", ["es.symbol.match-all", "es.string.match-all"]),
  256. metadata: define("symbol/metadata", ["esnext.symbol.metadata"]),
  257. observable: define("symbol/observable", ["esnext.symbol.observable"]),
  258. patternMatch: define("symbol/pattern-match", ["esnext.symbol.pattern-match"]),
  259. replace: define("symbol/replace", ["es.symbol.replace", "es.string.replace"]),
  260. search: define("symbol/search", ["es.symbol.search", "es.string.search"]),
  261. species: define("symbol/species", ["es.symbol.species", "es.array.species"]),
  262. split: define("symbol/split", ["es.symbol.split", "es.string.split"]),
  263. toPrimitive: define("symbol/to-primitive", ["es.symbol.to-primitive", "es.date.to-primitive"]),
  264. toStringTag: define("symbol/to-string-tag", ["es.symbol.to-string-tag", "es.object.to-string", "es.math.to-string-tag", "es.json.to-string-tag"]),
  265. unscopables: define("symbol/unscopables", ["es.symbol.unscopables"])
  266. },
  267. WeakMap: {
  268. from: define(null, ["esnext.weak-map.from", ...WeakMapDependencies]),
  269. of: define(null, ["esnext.weak-map.of", ...WeakMapDependencies])
  270. },
  271. WeakSet: {
  272. from: define(null, ["esnext.weak-set.from", ...WeakSetDependencies]),
  273. of: define(null, ["esnext.weak-set.of", ...WeakSetDependencies])
  274. },
  275. Int8Array: TypedArrayStaticMethods,
  276. Uint8Array: TypedArrayStaticMethods,
  277. Uint8ClampedArray: TypedArrayStaticMethods,
  278. Int16Array: TypedArrayStaticMethods,
  279. Uint16Array: TypedArrayStaticMethods,
  280. Int32Array: TypedArrayStaticMethods,
  281. Uint32Array: TypedArrayStaticMethods,
  282. Float32Array: TypedArrayStaticMethods,
  283. Float64Array: TypedArrayStaticMethods,
  284. WebAssembly: {
  285. CompileError: define(null, ErrorDependencies),
  286. LinkError: define(null, ErrorDependencies),
  287. RuntimeError: define(null, ErrorDependencies)
  288. }
  289. };
  290. exports.StaticProperties = StaticProperties;
  291. const InstanceProperties = {
  292. asIndexedPairs: define("instance/asIndexedPairs", ["esnext.async-iterator.as-indexed-pairs", ...AsyncIteratorDependencies, "esnext.iterator.as-indexed-pairs", ...IteratorDependencies]),
  293. at: define("instance/at", [// TODO: We should introduce overloaded instance methods definition
  294. // Before that is implemented, the `esnext.string.at` must be the first
  295. // In pure mode, the provider resolves the descriptor as a "pure" `esnext.string.at`
  296. // and treats the compat-data of `esnext.string.at` as the compat-data of
  297. // pure import `instance/at`. The first polyfill here should have the lowest corejs
  298. // supported versions.
  299. "esnext.string.at", "es.string.at-alternative", "es.array.at"]),
  300. anchor: define(null, ["es.string.anchor"]),
  301. big: define(null, ["es.string.big"]),
  302. bind: define("instance/bind", ["es.function.bind"]),
  303. blink: define(null, ["es.string.blink"]),
  304. bold: define(null, ["es.string.bold"]),
  305. codePointAt: define("instance/code-point-at", ["es.string.code-point-at"]),
  306. codePoints: define("instance/code-points", ["esnext.string.code-points"]),
  307. concat: define("instance/concat", ["es.array.concat"], undefined, ["String"]),
  308. copyWithin: define("instance/copy-within", ["es.array.copy-within"]),
  309. description: define(null, ["es.symbol", "es.symbol.description"]),
  310. dotAll: define("instance/dot-all", ["es.regexp.dot-all"]),
  311. drop: define("instance/drop", ["esnext.async-iterator.drop", ...AsyncIteratorDependencies, "esnext.iterator.drop", ...IteratorDependencies]),
  312. emplace: define("instance/emplace", ["esnext.map.emplace", "esnext.weak-map.emplace"]),
  313. endsWith: define("instance/ends-with", ["es.string.ends-with"]),
  314. entries: define("instance/entries", ArrayNatureIteratorsWithTag),
  315. every: define("instance/every", ["es.array.every", "esnext.async-iterator.every", // TODO: add async iterator dependencies when we support sub-dependencies
  316. // esnext.async-iterator.every depends on es.promise
  317. // but we don't want to pull es.promise when esnext.async-iterator is disabled
  318. //
  319. // ...AsyncIteratorDependencies
  320. "esnext.iterator.every", ...IteratorDependencies]),
  321. exec: define(null, ["es.regexp.exec"]),
  322. fill: define("instance/fill", ["es.array.fill"]),
  323. filter: define("instance/filter", ["es.array.filter", "esnext.async-iterator.filter", "esnext.iterator.filter", ...IteratorDependencies]),
  324. filterReject: define("instance/filterReject", ["esnext.array.filter-reject"]),
  325. finally: define(null, ["es.promise.finally", ...PromiseDependencies]),
  326. find: define("instance/find", ["es.array.find", "esnext.async-iterator.find", "esnext.iterator.find", ...IteratorDependencies]),
  327. findIndex: define("instance/find-index", ["es.array.find-index"]),
  328. findLast: define("instance/find-last", ["esnext.array.find-last"]),
  329. findLastIndex: define("instance/find-last-index", ["esnext.array.find-last-index"]),
  330. fixed: define(null, ["es.string.fixed"]),
  331. flags: define("instance/flags", ["es.regexp.flags"]),
  332. flatMap: define("instance/flat-map", ["es.array.flat-map", "es.array.unscopables.flat-map", "esnext.async-iterator.flat-map", "esnext.iterator.flat-map", ...IteratorDependencies]),
  333. flat: define("instance/flat", ["es.array.flat", "es.array.unscopables.flat"]),
  334. getYear: define(null, ["es.date.get-year"]),
  335. groupBy: define("instance/group-by", ["esnext.array.group-by"]),
  336. groupByToMap: define("instance/group-by-to-map", ["esnext.array.group-by-to-map", "es.map", "es.object.to-string"]),
  337. fontcolor: define(null, ["es.string.fontcolor"]),
  338. fontsize: define(null, ["es.string.fontsize"]),
  339. forEach: define("instance/for-each", ["es.array.for-each", "esnext.async-iterator.for-each", "esnext.iterator.for-each", ...IteratorDependencies, "web.dom-collections.for-each"]),
  340. includes: define("instance/includes", ["es.array.includes", "es.string.includes"]),
  341. indexOf: define("instance/index-of", ["es.array.index-of"]),
  342. italic: define(null, ["es.string.italics"]),
  343. join: define(null, ["es.array.join"]),
  344. keys: define("instance/keys", ArrayNatureIteratorsWithTag),
  345. lastIndex: define(null, ["esnext.array.last-index"]),
  346. lastIndexOf: define("instance/last-index-of", ["es.array.last-index-of"]),
  347. lastItem: define(null, ["esnext.array.last-item"]),
  348. link: define(null, ["es.string.link"]),
  349. map: define("instance/map", ["es.array.map", "esnext.async-iterator.map", "esnext.iterator.map"]),
  350. match: define(null, ["es.string.match", "es.regexp.exec"]),
  351. matchAll: define("instance/match-all", ["es.string.match-all", "es.regexp.exec"]),
  352. name: define(null, ["es.function.name"]),
  353. padEnd: define("instance/pad-end", ["es.string.pad-end"]),
  354. padStart: define("instance/pad-start", ["es.string.pad-start"]),
  355. reduce: define("instance/reduce", ["es.array.reduce", "esnext.async-iterator.reduce", "esnext.iterator.reduce", ...IteratorDependencies]),
  356. reduceRight: define("instance/reduce-right", ["es.array.reduce-right"]),
  357. repeat: define("instance/repeat", ["es.string.repeat"]),
  358. replace: define(null, ["es.string.replace", "es.regexp.exec"]),
  359. replaceAll: define("instance/replace-all", ["es.string.replace-all", "es.string.replace", "es.regexp.exec"]),
  360. reverse: define("instance/reverse", ["es.array.reverse"]),
  361. search: define(null, ["es.string.search", "es.regexp.exec"]),
  362. setYear: define(null, ["es.date.set-year"]),
  363. slice: define("instance/slice", ["es.array.slice"]),
  364. small: define(null, ["es.string.small"]),
  365. some: define("instance/some", ["es.array.some", "esnext.async-iterator.some", "esnext.iterator.some", ...IteratorDependencies]),
  366. sort: define("instance/sort", ["es.array.sort"]),
  367. splice: define("instance/splice", ["es.array.splice"]),
  368. split: define(null, ["es.string.split", "es.regexp.exec"]),
  369. startsWith: define("instance/starts-with", ["es.string.starts-with"]),
  370. sticky: define("instance/sticky", ["es.regexp.sticky"]),
  371. strike: define(null, ["es.string.strike"]),
  372. sub: define(null, ["es.string.sub"]),
  373. substr: define(null, ["es.string.substr"]),
  374. sup: define(null, ["es.string.sup"]),
  375. take: define("instance/take", ["esnext.async-iterator.take", ...AsyncIteratorDependencies, "esnext.iterator.take", ...IteratorDependencies]),
  376. test: define("instance/test", ["es.regexp.test", "es.regexp.exec"]),
  377. toArray: define("instance/to-array", ["esnext.async-iterator.to-array", ...AsyncIteratorDependencies, "esnext.iterator.to-array", ...IteratorDependencies]),
  378. toAsync: define(null, ["esnext.iterator.to-async", ...IteratorDependencies, ...AsyncIteratorDependencies, ...AsyncIteratorProblemMethods]),
  379. toExponential: define(null, ["es.number.to-exponential"]),
  380. toFixed: define(null, ["es.number.to-fixed"]),
  381. toGMTString: define(null, ["es.date.to-gmt-string"]),
  382. toISOString: define(null, ["es.date.to-iso-string"]),
  383. toJSON: define(null, ["es.date.to-json", "web.url.to-json"]),
  384. toPrecision: define(null, ["es.number.to-precision"]),
  385. toReversed: define("instance/to-reversed", ["esnext.array.to-reversed"]),
  386. toSorted: define("instance/to-sorted", ["esnext.array.to-sorted", "es.array.sort"]),
  387. toSpliced: define("instance/to-reversed", ["esnext.array.to-spliced"]),
  388. toString: define(null, ["es.object.to-string", "es.error.to-string", "es.date.to-string", "es.regexp.to-string"]),
  389. trim: define("instance/trim", ["es.string.trim"]),
  390. trimEnd: define("instance/trim-end", ["es.string.trim-end"]),
  391. trimLeft: define("instance/trim-left", ["es.string.trim-start"]),
  392. trimRight: define("instance/trim-right", ["es.string.trim-end"]),
  393. trimStart: define("instance/trim-start", ["es.string.trim-start"]),
  394. uniqueBy: define("instance/unique-by", ["esnext.array.unique-by", "es.map"]),
  395. unThis: define("instance/un-this", ["esnext.function.un-this"]),
  396. values: define("instance/values", ArrayNatureIteratorsWithTag),
  397. with: define("instance/with", ["esnext.array.with"]),
  398. __defineGetter__: define(null, ["es.object.define-getter"]),
  399. __defineSetter__: define(null, ["es.object.define-setter"]),
  400. __lookupGetter__: define(null, ["es.object.lookup-getter"]),
  401. __lookupSetter__: define(null, ["es.object.lookup-setter"])
  402. };
  403. exports.InstanceProperties = InstanceProperties;
  404. const CommonInstanceDependencies = new Set(["es.object.to-string", "es.object.define-getter", "es.object.define-setter", "es.object.lookup-getter", "es.object.lookup-setter", "es.regexp.exec"]);
  405. exports.CommonInstanceDependencies = CommonInstanceDependencies;