core-js 3.19.1 → 3.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (961) hide show
  1. package/README.md +27 -17
  2. package/actual/README.md +1 -0
  3. package/actual/aggregate-error.js +3 -0
  4. package/actual/array/at.js +3 -0
  5. package/actual/array/concat.js +3 -0
  6. package/actual/array/copy-within.js +3 -0
  7. package/actual/array/entries.js +3 -0
  8. package/actual/array/every.js +3 -0
  9. package/actual/array/fill.js +3 -0
  10. package/actual/array/filter.js +3 -0
  11. package/actual/array/find-index.js +3 -0
  12. package/actual/array/find-last-index.js +4 -0
  13. package/actual/array/find-last.js +4 -0
  14. package/actual/array/find.js +3 -0
  15. package/actual/array/flat-map.js +3 -0
  16. package/actual/array/flat.js +3 -0
  17. package/actual/array/for-each.js +3 -0
  18. package/actual/array/from.js +3 -0
  19. package/actual/array/group-by-to-map.js +6 -0
  20. package/actual/array/group-by.js +4 -0
  21. package/actual/array/includes.js +3 -0
  22. package/actual/array/index-of.js +3 -0
  23. package/actual/array/index.js +9 -0
  24. package/actual/array/is-array.js +3 -0
  25. package/actual/array/iterator.js +3 -0
  26. package/actual/array/join.js +3 -0
  27. package/actual/array/keys.js +3 -0
  28. package/actual/array/last-index-of.js +3 -0
  29. package/actual/array/map.js +3 -0
  30. package/actual/array/of.js +3 -0
  31. package/actual/array/reduce-right.js +3 -0
  32. package/actual/array/reduce.js +3 -0
  33. package/actual/array/reverse.js +3 -0
  34. package/actual/array/slice.js +3 -0
  35. package/actual/array/some.js +3 -0
  36. package/actual/array/sort.js +3 -0
  37. package/actual/array/splice.js +3 -0
  38. package/actual/array/values.js +3 -0
  39. package/actual/array/virtual/at.js +3 -0
  40. package/actual/array/virtual/concat.js +3 -0
  41. package/actual/array/virtual/copy-within.js +3 -0
  42. package/actual/array/virtual/entries.js +3 -0
  43. package/actual/array/virtual/every.js +3 -0
  44. package/actual/array/virtual/fill.js +3 -0
  45. package/actual/array/virtual/filter.js +3 -0
  46. package/actual/array/virtual/find-index.js +3 -0
  47. package/actual/array/virtual/find-last-index.js +4 -0
  48. package/actual/array/virtual/find-last.js +4 -0
  49. package/actual/array/virtual/find.js +3 -0
  50. package/actual/array/virtual/flat-map.js +3 -0
  51. package/actual/array/virtual/flat.js +3 -0
  52. package/actual/array/virtual/for-each.js +3 -0
  53. package/actual/array/virtual/group-by-to-map.js +6 -0
  54. package/actual/array/virtual/group-by.js +4 -0
  55. package/actual/array/virtual/includes.js +3 -0
  56. package/actual/array/virtual/index-of.js +3 -0
  57. package/actual/array/virtual/index.js +9 -0
  58. package/actual/array/virtual/iterator.js +3 -0
  59. package/actual/array/virtual/join.js +3 -0
  60. package/actual/array/virtual/keys.js +3 -0
  61. package/actual/array/virtual/last-index-of.js +3 -0
  62. package/actual/array/virtual/map.js +3 -0
  63. package/actual/array/virtual/reduce-right.js +3 -0
  64. package/actual/array/virtual/reduce.js +3 -0
  65. package/actual/array/virtual/reverse.js +3 -0
  66. package/actual/array/virtual/slice.js +3 -0
  67. package/actual/array/virtual/some.js +3 -0
  68. package/actual/array/virtual/sort.js +3 -0
  69. package/actual/array/virtual/splice.js +3 -0
  70. package/actual/array/virtual/values.js +3 -0
  71. package/actual/array-buffer/constructor.js +3 -0
  72. package/actual/array-buffer/index.js +3 -0
  73. package/actual/array-buffer/is-view.js +3 -0
  74. package/actual/array-buffer/slice.js +3 -0
  75. package/actual/clear-immediate.js +3 -0
  76. package/actual/data-view/index.js +3 -0
  77. package/actual/date/get-year.js +3 -0
  78. package/actual/date/index.js +3 -0
  79. package/actual/date/now.js +3 -0
  80. package/actual/date/set-year.js +3 -0
  81. package/actual/date/to-gmt-string.js +3 -0
  82. package/actual/date/to-iso-string.js +3 -0
  83. package/actual/date/to-json.js +3 -0
  84. package/actual/date/to-primitive.js +3 -0
  85. package/actual/date/to-string.js +3 -0
  86. package/actual/dom-collections/for-each.js +3 -0
  87. package/actual/dom-collections/index.js +3 -0
  88. package/actual/dom-collections/iterator.js +3 -0
  89. package/actual/dom-exception/constructor.js +3 -0
  90. package/actual/dom-exception/index.js +3 -0
  91. package/actual/dom-exception/to-string-tag.js +3 -0
  92. package/actual/error/constructor.js +3 -0
  93. package/actual/error/index.js +3 -0
  94. package/actual/error/to-string.js +3 -0
  95. package/actual/escape.js +3 -0
  96. package/actual/function/bind.js +3 -0
  97. package/actual/function/has-instance.js +3 -0
  98. package/actual/function/index.js +3 -0
  99. package/actual/function/name.js +3 -0
  100. package/actual/function/virtual/bind.js +3 -0
  101. package/actual/function/virtual/index.js +3 -0
  102. package/actual/get-iterator-method.js +3 -0
  103. package/actual/get-iterator.js +3 -0
  104. package/actual/global-this.js +3 -0
  105. package/actual/index.js +4 -0
  106. package/actual/instance/at.js +3 -0
  107. package/actual/instance/bind.js +3 -0
  108. package/actual/instance/code-point-at.js +3 -0
  109. package/actual/instance/concat.js +3 -0
  110. package/actual/instance/copy-within.js +3 -0
  111. package/actual/instance/ends-with.js +3 -0
  112. package/actual/instance/entries.js +3 -0
  113. package/actual/instance/every.js +3 -0
  114. package/actual/instance/fill.js +3 -0
  115. package/actual/instance/filter.js +3 -0
  116. package/actual/instance/find-index.js +3 -0
  117. package/actual/instance/find-last-index.js +9 -0
  118. package/actual/instance/find-last.js +9 -0
  119. package/actual/instance/find.js +3 -0
  120. package/actual/instance/flags.js +3 -0
  121. package/actual/instance/flat-map.js +3 -0
  122. package/actual/instance/flat.js +3 -0
  123. package/actual/instance/for-each.js +3 -0
  124. package/actual/instance/group-by-to-map.js +9 -0
  125. package/actual/instance/group-by.js +9 -0
  126. package/actual/instance/includes.js +3 -0
  127. package/actual/instance/index-of.js +3 -0
  128. package/actual/instance/keys.js +3 -0
  129. package/actual/instance/last-index-of.js +3 -0
  130. package/actual/instance/map.js +3 -0
  131. package/actual/instance/match-all.js +3 -0
  132. package/actual/instance/pad-end.js +3 -0
  133. package/actual/instance/pad-start.js +3 -0
  134. package/actual/instance/reduce-right.js +3 -0
  135. package/actual/instance/reduce.js +3 -0
  136. package/actual/instance/repeat.js +3 -0
  137. package/actual/instance/replace-all.js +3 -0
  138. package/actual/instance/reverse.js +3 -0
  139. package/actual/instance/slice.js +3 -0
  140. package/actual/instance/some.js +3 -0
  141. package/actual/instance/sort.js +3 -0
  142. package/actual/instance/splice.js +3 -0
  143. package/actual/instance/starts-with.js +3 -0
  144. package/actual/instance/trim-end.js +3 -0
  145. package/actual/instance/trim-left.js +3 -0
  146. package/actual/instance/trim-right.js +3 -0
  147. package/actual/instance/trim-start.js +3 -0
  148. package/actual/instance/trim.js +3 -0
  149. package/actual/instance/values.js +3 -0
  150. package/actual/is-iterable.js +3 -0
  151. package/actual/json/index.js +3 -0
  152. package/actual/json/stringify.js +3 -0
  153. package/actual/json/to-string-tag.js +3 -0
  154. package/actual/map/index.js +3 -0
  155. package/actual/math/acosh.js +3 -0
  156. package/actual/math/asinh.js +3 -0
  157. package/actual/math/atanh.js +3 -0
  158. package/actual/math/cbrt.js +3 -0
  159. package/actual/math/clz32.js +3 -0
  160. package/actual/math/cosh.js +3 -0
  161. package/actual/math/expm1.js +3 -0
  162. package/actual/math/fround.js +3 -0
  163. package/actual/math/hypot.js +3 -0
  164. package/actual/math/imul.js +3 -0
  165. package/actual/math/index.js +3 -0
  166. package/actual/math/log10.js +3 -0
  167. package/actual/math/log1p.js +3 -0
  168. package/actual/math/log2.js +3 -0
  169. package/actual/math/sign.js +3 -0
  170. package/actual/math/sinh.js +3 -0
  171. package/actual/math/tanh.js +3 -0
  172. package/actual/math/to-string-tag.js +3 -0
  173. package/actual/math/trunc.js +3 -0
  174. package/actual/number/constructor.js +3 -0
  175. package/actual/number/epsilon.js +3 -0
  176. package/actual/number/index.js +3 -0
  177. package/actual/number/is-finite.js +3 -0
  178. package/actual/number/is-integer.js +3 -0
  179. package/actual/number/is-nan.js +3 -0
  180. package/actual/number/is-safe-integer.js +3 -0
  181. package/actual/number/max-safe-integer.js +3 -0
  182. package/actual/number/min-safe-integer.js +3 -0
  183. package/actual/number/parse-float.js +3 -0
  184. package/actual/number/parse-int.js +3 -0
  185. package/actual/number/to-exponential.js +3 -0
  186. package/actual/number/to-fixed.js +3 -0
  187. package/actual/number/to-precision.js +3 -0
  188. package/actual/number/virtual/index.js +3 -0
  189. package/actual/number/virtual/to-exponential.js +3 -0
  190. package/actual/number/virtual/to-fixed.js +3 -0
  191. package/actual/number/virtual/to-precision.js +3 -0
  192. package/actual/object/assign.js +3 -0
  193. package/actual/object/create.js +3 -0
  194. package/actual/object/define-getter.js +3 -0
  195. package/actual/object/define-properties.js +3 -0
  196. package/actual/object/define-property.js +3 -0
  197. package/actual/object/define-setter.js +3 -0
  198. package/actual/object/entries.js +3 -0
  199. package/actual/object/freeze.js +3 -0
  200. package/actual/object/from-entries.js +3 -0
  201. package/actual/object/get-own-property-descriptor.js +3 -0
  202. package/actual/object/get-own-property-descriptors.js +3 -0
  203. package/actual/object/get-own-property-names.js +3 -0
  204. package/actual/object/get-own-property-symbols.js +3 -0
  205. package/actual/object/get-prototype-of.js +3 -0
  206. package/actual/object/has-own.js +3 -0
  207. package/actual/object/index.js +3 -0
  208. package/actual/object/is-extensible.js +3 -0
  209. package/actual/object/is-frozen.js +3 -0
  210. package/actual/object/is-sealed.js +3 -0
  211. package/actual/object/is.js +3 -0
  212. package/actual/object/keys.js +3 -0
  213. package/actual/object/lookup-getter.js +3 -0
  214. package/actual/object/lookup-setter.js +3 -0
  215. package/actual/object/prevent-extensions.js +3 -0
  216. package/actual/object/seal.js +3 -0
  217. package/actual/object/set-prototype-of.js +3 -0
  218. package/actual/object/to-string.js +3 -0
  219. package/actual/object/values.js +3 -0
  220. package/actual/parse-float.js +3 -0
  221. package/actual/parse-int.js +3 -0
  222. package/actual/promise/all-settled.js +3 -0
  223. package/actual/promise/any.js +3 -0
  224. package/actual/promise/finally.js +3 -0
  225. package/actual/promise/index.js +3 -0
  226. package/actual/queue-microtask.js +3 -0
  227. package/actual/reflect/apply.js +3 -0
  228. package/actual/reflect/construct.js +3 -0
  229. package/actual/reflect/define-property.js +3 -0
  230. package/actual/reflect/delete-property.js +3 -0
  231. package/actual/reflect/get-own-property-descriptor.js +3 -0
  232. package/actual/reflect/get-prototype-of.js +3 -0
  233. package/actual/reflect/get.js +3 -0
  234. package/actual/reflect/has.js +3 -0
  235. package/actual/reflect/index.js +3 -0
  236. package/actual/reflect/is-extensible.js +3 -0
  237. package/actual/reflect/own-keys.js +3 -0
  238. package/actual/reflect/prevent-extensions.js +3 -0
  239. package/actual/reflect/set-prototype-of.js +3 -0
  240. package/actual/reflect/set.js +3 -0
  241. package/actual/reflect/to-string-tag.js +3 -0
  242. package/actual/regexp/constructor.js +3 -0
  243. package/actual/regexp/dot-all.js +3 -0
  244. package/actual/regexp/flags.js +3 -0
  245. package/actual/regexp/index.js +3 -0
  246. package/actual/regexp/match.js +3 -0
  247. package/actual/regexp/replace.js +3 -0
  248. package/actual/regexp/search.js +3 -0
  249. package/actual/regexp/split.js +3 -0
  250. package/actual/regexp/sticky.js +3 -0
  251. package/actual/regexp/test.js +3 -0
  252. package/actual/regexp/to-string.js +3 -0
  253. package/actual/set/index.js +3 -0
  254. package/actual/set-immediate.js +3 -0
  255. package/actual/set-interval.js +3 -0
  256. package/actual/set-timeout.js +3 -0
  257. package/actual/string/anchor.js +3 -0
  258. package/actual/string/at.js +3 -0
  259. package/actual/string/big.js +3 -0
  260. package/actual/string/blink.js +3 -0
  261. package/actual/string/bold.js +3 -0
  262. package/actual/string/code-point-at.js +3 -0
  263. package/actual/string/ends-with.js +3 -0
  264. package/actual/string/fixed.js +3 -0
  265. package/actual/string/fontcolor.js +3 -0
  266. package/actual/string/fontsize.js +3 -0
  267. package/actual/string/from-code-point.js +3 -0
  268. package/actual/string/includes.js +3 -0
  269. package/actual/string/index.js +3 -0
  270. package/actual/string/italics.js +3 -0
  271. package/actual/string/iterator.js +3 -0
  272. package/actual/string/link.js +3 -0
  273. package/actual/string/match-all.js +3 -0
  274. package/actual/string/match.js +3 -0
  275. package/actual/string/pad-end.js +3 -0
  276. package/actual/string/pad-start.js +3 -0
  277. package/actual/string/raw.js +3 -0
  278. package/actual/string/repeat.js +3 -0
  279. package/actual/string/replace-all.js +3 -0
  280. package/actual/string/replace.js +3 -0
  281. package/actual/string/search.js +3 -0
  282. package/actual/string/small.js +3 -0
  283. package/actual/string/split.js +3 -0
  284. package/actual/string/starts-with.js +3 -0
  285. package/actual/string/strike.js +3 -0
  286. package/actual/string/sub.js +3 -0
  287. package/actual/string/substr.js +3 -0
  288. package/actual/string/sup.js +3 -0
  289. package/actual/string/trim-end.js +3 -0
  290. package/actual/string/trim-left.js +3 -0
  291. package/actual/string/trim-right.js +3 -0
  292. package/actual/string/trim-start.js +3 -0
  293. package/actual/string/trim.js +3 -0
  294. package/actual/string/virtual/anchor.js +3 -0
  295. package/actual/string/virtual/at.js +3 -0
  296. package/actual/string/virtual/big.js +3 -0
  297. package/actual/string/virtual/blink.js +3 -0
  298. package/actual/string/virtual/bold.js +3 -0
  299. package/actual/string/virtual/code-point-at.js +3 -0
  300. package/actual/string/virtual/ends-with.js +3 -0
  301. package/actual/string/virtual/fixed.js +3 -0
  302. package/actual/string/virtual/fontcolor.js +3 -0
  303. package/actual/string/virtual/fontsize.js +3 -0
  304. package/actual/string/virtual/includes.js +3 -0
  305. package/actual/string/virtual/index.js +3 -0
  306. package/actual/string/virtual/italics.js +3 -0
  307. package/actual/string/virtual/iterator.js +3 -0
  308. package/actual/string/virtual/link.js +3 -0
  309. package/actual/string/virtual/match-all.js +3 -0
  310. package/actual/string/virtual/pad-end.js +3 -0
  311. package/actual/string/virtual/pad-start.js +3 -0
  312. package/actual/string/virtual/repeat.js +3 -0
  313. package/actual/string/virtual/replace-all.js +3 -0
  314. package/actual/string/virtual/small.js +3 -0
  315. package/actual/string/virtual/starts-with.js +3 -0
  316. package/actual/string/virtual/strike.js +3 -0
  317. package/actual/string/virtual/sub.js +3 -0
  318. package/actual/string/virtual/substr.js +3 -0
  319. package/actual/string/virtual/sup.js +3 -0
  320. package/actual/string/virtual/trim-end.js +3 -0
  321. package/actual/string/virtual/trim-left.js +3 -0
  322. package/actual/string/virtual/trim-right.js +3 -0
  323. package/actual/string/virtual/trim-start.js +3 -0
  324. package/actual/string/virtual/trim.js +3 -0
  325. package/actual/structured-clone.js +3 -0
  326. package/actual/symbol/async-iterator.js +3 -0
  327. package/actual/symbol/description.js +3 -0
  328. package/actual/symbol/for.js +3 -0
  329. package/actual/symbol/has-instance.js +3 -0
  330. package/actual/symbol/index.js +3 -0
  331. package/actual/symbol/is-concat-spreadable.js +3 -0
  332. package/actual/symbol/iterator.js +3 -0
  333. package/actual/symbol/key-for.js +3 -0
  334. package/actual/symbol/match-all.js +3 -0
  335. package/actual/symbol/match.js +3 -0
  336. package/actual/symbol/replace.js +3 -0
  337. package/actual/symbol/search.js +3 -0
  338. package/actual/symbol/species.js +3 -0
  339. package/actual/symbol/split.js +3 -0
  340. package/actual/symbol/to-primitive.js +3 -0
  341. package/actual/symbol/to-string-tag.js +3 -0
  342. package/actual/symbol/unscopables.js +3 -0
  343. package/actual/typed-array/at.js +3 -0
  344. package/actual/typed-array/copy-within.js +3 -0
  345. package/actual/typed-array/entries.js +3 -0
  346. package/actual/typed-array/every.js +3 -0
  347. package/actual/typed-array/fill.js +3 -0
  348. package/actual/typed-array/filter.js +3 -0
  349. package/actual/typed-array/find-index.js +3 -0
  350. package/actual/typed-array/find-last-index.js +1 -0
  351. package/actual/typed-array/find-last.js +1 -0
  352. package/actual/typed-array/find.js +3 -0
  353. package/actual/typed-array/float32-array.js +4 -0
  354. package/actual/typed-array/float64-array.js +4 -0
  355. package/actual/typed-array/for-each.js +3 -0
  356. package/actual/typed-array/from.js +3 -0
  357. package/actual/typed-array/includes.js +3 -0
  358. package/actual/typed-array/index-of.js +3 -0
  359. package/actual/typed-array/index.js +5 -0
  360. package/actual/typed-array/int16-array.js +4 -0
  361. package/actual/typed-array/int32-array.js +4 -0
  362. package/actual/typed-array/int8-array.js +4 -0
  363. package/actual/typed-array/iterator.js +3 -0
  364. package/actual/typed-array/join.js +3 -0
  365. package/actual/typed-array/keys.js +3 -0
  366. package/actual/typed-array/last-index-of.js +3 -0
  367. package/actual/typed-array/map.js +3 -0
  368. package/actual/typed-array/methods.js +5 -0
  369. package/actual/typed-array/of.js +3 -0
  370. package/actual/typed-array/reduce-right.js +3 -0
  371. package/actual/typed-array/reduce.js +3 -0
  372. package/actual/typed-array/reverse.js +3 -0
  373. package/actual/typed-array/set.js +3 -0
  374. package/actual/typed-array/slice.js +3 -0
  375. package/actual/typed-array/some.js +3 -0
  376. package/actual/typed-array/sort.js +3 -0
  377. package/actual/typed-array/subarray.js +3 -0
  378. package/actual/typed-array/to-locale-string.js +3 -0
  379. package/actual/typed-array/to-string.js +3 -0
  380. package/actual/typed-array/uint16-array.js +4 -0
  381. package/actual/typed-array/uint32-array.js +4 -0
  382. package/actual/typed-array/uint8-array.js +4 -0
  383. package/actual/typed-array/uint8-clamped-array.js +4 -0
  384. package/actual/typed-array/values.js +3 -0
  385. package/actual/unescape.js +3 -0
  386. package/actual/url/index.js +3 -0
  387. package/actual/url/to-json.js +3 -0
  388. package/actual/url-search-params/index.js +3 -0
  389. package/actual/weak-map/index.js +3 -0
  390. package/actual/weak-set/index.js +3 -0
  391. package/es/aggregate-error.js +2 -0
  392. package/es/array-buffer/constructor.js +1 -0
  393. package/es/data-view/index.js +2 -0
  394. package/es/error/constructor.js +4 -0
  395. package/es/error/index.js +5 -0
  396. package/es/error/to-string.js +4 -0
  397. package/es/index.js +4 -0
  398. package/es/number/index.js +1 -0
  399. package/es/number/to-exponential.js +4 -0
  400. package/es/number/virtual/index.js +1 -0
  401. package/es/number/virtual/to-exponential.js +4 -0
  402. package/es/typed-array/float32-array.js +2 -0
  403. package/es/typed-array/float64-array.js +2 -0
  404. package/es/typed-array/int16-array.js +2 -0
  405. package/es/typed-array/int32-array.js +2 -0
  406. package/es/typed-array/int8-array.js +2 -0
  407. package/es/typed-array/uint16-array.js +2 -0
  408. package/es/typed-array/uint32-array.js +2 -0
  409. package/es/typed-array/uint8-array.js +2 -0
  410. package/es/typed-array/uint8-clamped-array.js +2 -0
  411. package/features/aggregate-error.js +1 -1
  412. package/features/array/at.js +1 -1
  413. package/features/array/concat.js +1 -1
  414. package/features/array/copy-within.js +1 -1
  415. package/features/array/entries.js +1 -1
  416. package/features/array/every.js +1 -1
  417. package/features/array/fill.js +1 -1
  418. package/features/array/filter.js +1 -1
  419. package/features/array/find-index.js +1 -1
  420. package/features/array/find-last-index.js +2 -3
  421. package/features/array/find-last.js +2 -3
  422. package/features/array/find.js +1 -1
  423. package/features/array/flat-map.js +1 -1
  424. package/features/array/flat.js +1 -1
  425. package/features/array/for-each.js +1 -1
  426. package/features/array/from.js +1 -1
  427. package/features/array/group-by-to-map.js +3 -0
  428. package/features/array/group-by.js +2 -3
  429. package/features/array/includes.js +1 -1
  430. package/features/array/index-of.js +1 -1
  431. package/features/array/index.js +5 -5
  432. package/features/array/is-array.js +1 -1
  433. package/features/array/iterator.js +1 -1
  434. package/features/array/join.js +1 -1
  435. package/features/array/keys.js +1 -1
  436. package/features/array/last-index-of.js +1 -1
  437. package/features/array/map.js +1 -1
  438. package/features/array/of.js +1 -1
  439. package/features/array/reduce-right.js +1 -1
  440. package/features/array/reduce.js +1 -1
  441. package/features/array/reverse.js +1 -1
  442. package/features/array/slice.js +1 -1
  443. package/features/array/some.js +1 -1
  444. package/features/array/sort.js +1 -1
  445. package/features/array/splice.js +1 -1
  446. package/features/array/to-reversed.js +4 -0
  447. package/features/array/to-sorted.js +5 -0
  448. package/features/array/to-spliced.js +4 -0
  449. package/features/array/values.js +1 -1
  450. package/features/array/virtual/at.js +1 -1
  451. package/features/array/virtual/concat.js +1 -1
  452. package/features/array/virtual/copy-within.js +1 -1
  453. package/features/array/virtual/entries.js +1 -1
  454. package/features/array/virtual/every.js +1 -1
  455. package/features/array/virtual/fill.js +1 -1
  456. package/features/array/virtual/filter.js +1 -1
  457. package/features/array/virtual/find-index.js +1 -1
  458. package/features/array/virtual/find-last-index.js +2 -3
  459. package/features/array/virtual/find-last.js +2 -3
  460. package/features/array/virtual/find.js +1 -1
  461. package/features/array/virtual/flat-map.js +1 -1
  462. package/features/array/virtual/flat.js +1 -1
  463. package/features/array/virtual/for-each.js +1 -1
  464. package/features/array/virtual/group-by-to-map.js +3 -0
  465. package/features/array/virtual/group-by.js +2 -3
  466. package/features/array/virtual/includes.js +1 -1
  467. package/features/array/virtual/index-of.js +1 -1
  468. package/features/array/virtual/index.js +5 -5
  469. package/features/array/virtual/iterator.js +1 -1
  470. package/features/array/virtual/join.js +1 -1
  471. package/features/array/virtual/keys.js +1 -1
  472. package/features/array/virtual/last-index-of.js +1 -1
  473. package/features/array/virtual/map.js +1 -1
  474. package/features/array/virtual/reduce-right.js +1 -1
  475. package/features/array/virtual/reduce.js +1 -1
  476. package/features/array/virtual/reverse.js +1 -1
  477. package/features/array/virtual/slice.js +1 -1
  478. package/features/array/virtual/some.js +1 -1
  479. package/features/array/virtual/sort.js +1 -1
  480. package/features/array/virtual/splice.js +1 -1
  481. package/features/array/virtual/to-reversed.js +4 -0
  482. package/features/array/virtual/to-sorted.js +5 -0
  483. package/features/array/virtual/to-spliced.js +4 -0
  484. package/features/array/virtual/values.js +1 -1
  485. package/features/array/virtual/with.js +4 -0
  486. package/features/array/with.js +4 -0
  487. package/features/array-buffer/constructor.js +1 -1
  488. package/features/array-buffer/index.js +1 -1
  489. package/features/array-buffer/is-view.js +1 -1
  490. package/features/array-buffer/slice.js +1 -1
  491. package/features/clear-immediate.js +1 -1
  492. package/features/data-view/index.js +1 -1
  493. package/features/date/get-year.js +1 -1
  494. package/features/date/index.js +1 -1
  495. package/features/date/now.js +1 -1
  496. package/features/date/set-year.js +1 -1
  497. package/features/date/to-gmt-string.js +1 -1
  498. package/features/date/to-iso-string.js +1 -1
  499. package/features/date/to-json.js +1 -1
  500. package/features/date/to-primitive.js +1 -1
  501. package/features/date/to-string.js +1 -1
  502. package/features/dom-collections/for-each.js +1 -1
  503. package/features/dom-collections/index.js +1 -1
  504. package/features/dom-collections/iterator.js +1 -1
  505. package/features/dom-exception/constructor.js +3 -0
  506. package/features/dom-exception/index.js +3 -0
  507. package/features/dom-exception/to-string-tag.js +3 -0
  508. package/features/error/constructor.js +3 -0
  509. package/features/error/index.js +3 -0
  510. package/features/error/to-string.js +3 -0
  511. package/features/escape.js +1 -1
  512. package/features/function/bind.js +1 -1
  513. package/features/function/has-instance.js +1 -1
  514. package/features/function/index.js +4 -1
  515. package/features/function/is-callable.js +4 -0
  516. package/features/function/is-constructor.js +4 -0
  517. package/features/function/name.js +1 -1
  518. package/features/function/un-this.js +4 -0
  519. package/features/function/virtual/bind.js +1 -1
  520. package/features/function/virtual/index.js +2 -1
  521. package/features/function/virtual/un-this.js +4 -0
  522. package/features/get-iterator-method.js +1 -1
  523. package/features/get-iterator.js +1 -1
  524. package/features/global-this.js +1 -1
  525. package/features/index.js +22 -0
  526. package/features/instance/bind.js +1 -1
  527. package/features/instance/code-point-at.js +1 -1
  528. package/features/instance/concat.js +1 -1
  529. package/features/instance/copy-within.js +1 -1
  530. package/features/instance/ends-with.js +1 -1
  531. package/features/instance/entries.js +1 -1
  532. package/features/instance/every.js +1 -1
  533. package/features/instance/fill.js +1 -1
  534. package/features/instance/filter.js +1 -1
  535. package/features/instance/find-index.js +1 -1
  536. package/features/instance/find-last-index.js +2 -8
  537. package/features/instance/find-last.js +2 -8
  538. package/features/instance/find.js +1 -1
  539. package/features/instance/flags.js +1 -1
  540. package/features/instance/flat-map.js +1 -1
  541. package/features/instance/flat.js +1 -1
  542. package/features/instance/for-each.js +1 -1
  543. package/features/instance/group-by-to-map.js +3 -0
  544. package/features/instance/group-by.js +2 -8
  545. package/features/instance/includes.js +1 -1
  546. package/features/instance/index-of.js +1 -1
  547. package/features/instance/keys.js +1 -1
  548. package/features/instance/last-index-of.js +1 -1
  549. package/features/instance/map.js +1 -1
  550. package/features/instance/match-all.js +1 -1
  551. package/features/instance/pad-end.js +1 -1
  552. package/features/instance/pad-start.js +1 -1
  553. package/features/instance/reduce-right.js +1 -1
  554. package/features/instance/reduce.js +1 -1
  555. package/features/instance/repeat.js +1 -1
  556. package/features/instance/replace-all.js +1 -1
  557. package/features/instance/reverse.js +1 -1
  558. package/features/instance/slice.js +1 -1
  559. package/features/instance/some.js +1 -1
  560. package/features/instance/sort.js +1 -1
  561. package/features/instance/splice.js +1 -1
  562. package/features/instance/starts-with.js +1 -1
  563. package/features/instance/to-reversed.js +9 -0
  564. package/features/instance/to-sorted.js +9 -0
  565. package/features/instance/to-spliced.js +9 -0
  566. package/features/instance/trim-end.js +1 -1
  567. package/features/instance/trim-left.js +1 -1
  568. package/features/instance/trim-right.js +1 -1
  569. package/features/instance/trim-start.js +1 -1
  570. package/features/instance/trim.js +1 -1
  571. package/features/instance/un-this.js +9 -0
  572. package/features/instance/values.js +1 -1
  573. package/features/instance/with.js +9 -0
  574. package/features/is-iterable.js +1 -1
  575. package/features/iterator/index.js +2 -0
  576. package/features/iterator/to-async.js +8 -0
  577. package/features/json/index.js +1 -1
  578. package/features/json/stringify.js +1 -1
  579. package/features/json/to-string-tag.js +1 -1
  580. package/features/map/index.js +1 -1
  581. package/features/math/acosh.js +1 -1
  582. package/features/math/asinh.js +1 -1
  583. package/features/math/atanh.js +1 -1
  584. package/features/math/cbrt.js +1 -1
  585. package/features/math/clz32.js +1 -1
  586. package/features/math/cosh.js +1 -1
  587. package/features/math/expm1.js +1 -1
  588. package/features/math/fround.js +1 -1
  589. package/features/math/hypot.js +1 -1
  590. package/features/math/imul.js +1 -1
  591. package/features/math/index.js +1 -1
  592. package/features/math/log10.js +1 -1
  593. package/features/math/log1p.js +1 -1
  594. package/features/math/log2.js +1 -1
  595. package/features/math/sign.js +1 -1
  596. package/features/math/sinh.js +1 -1
  597. package/features/math/tanh.js +1 -1
  598. package/features/math/to-string-tag.js +1 -1
  599. package/features/math/trunc.js +1 -1
  600. package/features/number/constructor.js +1 -1
  601. package/features/number/epsilon.js +1 -1
  602. package/features/number/index.js +1 -1
  603. package/features/number/is-finite.js +1 -1
  604. package/features/number/is-integer.js +1 -1
  605. package/features/number/is-nan.js +1 -1
  606. package/features/number/is-safe-integer.js +1 -1
  607. package/features/number/max-safe-integer.js +1 -1
  608. package/features/number/min-safe-integer.js +1 -1
  609. package/features/number/parse-float.js +1 -1
  610. package/features/number/parse-int.js +1 -1
  611. package/features/number/to-exponential.js +3 -0
  612. package/features/number/to-fixed.js +1 -1
  613. package/features/number/to-precision.js +1 -1
  614. package/features/number/virtual/index.js +1 -1
  615. package/features/number/virtual/to-exponential.js +3 -0
  616. package/features/number/virtual/to-fixed.js +1 -1
  617. package/features/number/virtual/to-precision.js +1 -1
  618. package/features/object/assign.js +1 -1
  619. package/features/object/create.js +1 -1
  620. package/features/object/define-getter.js +1 -1
  621. package/features/object/define-properties.js +1 -1
  622. package/features/object/define-property.js +1 -1
  623. package/features/object/define-setter.js +1 -1
  624. package/features/object/entries.js +1 -1
  625. package/features/object/freeze.js +1 -1
  626. package/features/object/from-entries.js +1 -1
  627. package/features/object/get-own-property-descriptor.js +1 -1
  628. package/features/object/get-own-property-descriptors.js +1 -1
  629. package/features/object/get-own-property-names.js +1 -1
  630. package/features/object/get-own-property-symbols.js +1 -1
  631. package/features/object/get-prototype-of.js +1 -1
  632. package/features/object/has-own.js +1 -1
  633. package/features/object/index.js +1 -1
  634. package/features/object/is-extensible.js +1 -1
  635. package/features/object/is-frozen.js +1 -1
  636. package/features/object/is-sealed.js +1 -1
  637. package/features/object/is.js +1 -1
  638. package/features/object/keys.js +1 -1
  639. package/features/object/lookup-getter.js +1 -1
  640. package/features/object/lookup-setter.js +1 -1
  641. package/features/object/prevent-extensions.js +1 -1
  642. package/features/object/seal.js +1 -1
  643. package/features/object/set-prototype-of.js +1 -1
  644. package/features/object/to-string.js +1 -1
  645. package/features/object/values.js +1 -1
  646. package/features/parse-float.js +1 -1
  647. package/features/parse-int.js +1 -1
  648. package/features/promise/all-settled.js +1 -1
  649. package/features/promise/any.js +1 -1
  650. package/features/promise/finally.js +1 -1
  651. package/features/promise/index.js +1 -1
  652. package/features/queue-microtask.js +1 -1
  653. package/features/reflect/apply.js +1 -1
  654. package/features/reflect/construct.js +1 -1
  655. package/features/reflect/define-property.js +1 -1
  656. package/features/reflect/delete-property.js +1 -1
  657. package/features/reflect/get-own-property-descriptor.js +1 -1
  658. package/features/reflect/get-prototype-of.js +1 -1
  659. package/features/reflect/get.js +1 -1
  660. package/features/reflect/has.js +1 -1
  661. package/features/reflect/index.js +1 -1
  662. package/features/reflect/is-extensible.js +1 -1
  663. package/features/reflect/own-keys.js +1 -1
  664. package/features/reflect/prevent-extensions.js +1 -1
  665. package/features/reflect/set-prototype-of.js +1 -1
  666. package/features/reflect/set.js +1 -1
  667. package/features/regexp/constructor.js +1 -1
  668. package/features/regexp/dot-all.js +1 -1
  669. package/features/regexp/flags.js +1 -1
  670. package/features/regexp/index.js +1 -1
  671. package/features/regexp/match.js +1 -1
  672. package/features/regexp/replace.js +1 -1
  673. package/features/regexp/search.js +1 -1
  674. package/features/regexp/split.js +1 -1
  675. package/features/regexp/sticky.js +1 -1
  676. package/features/regexp/test.js +1 -1
  677. package/features/regexp/to-string.js +1 -1
  678. package/features/set/index.js +1 -1
  679. package/features/set-immediate.js +1 -1
  680. package/features/set-interval.js +1 -1
  681. package/features/set-timeout.js +1 -1
  682. package/features/string/anchor.js +1 -1
  683. package/features/string/at.js +1 -1
  684. package/features/string/big.js +1 -1
  685. package/features/string/blink.js +1 -1
  686. package/features/string/bold.js +1 -1
  687. package/features/string/code-point-at.js +1 -1
  688. package/features/string/cooked.js +4 -0
  689. package/features/string/ends-with.js +1 -1
  690. package/features/string/fixed.js +1 -1
  691. package/features/string/fontcolor.js +1 -1
  692. package/features/string/fontsize.js +1 -1
  693. package/features/string/from-code-point.js +1 -1
  694. package/features/string/includes.js +1 -1
  695. package/features/string/index.js +3 -3
  696. package/features/string/italics.js +1 -1
  697. package/features/string/iterator.js +1 -1
  698. package/features/string/link.js +1 -1
  699. package/features/string/match-all.js +1 -1
  700. package/features/string/match.js +1 -1
  701. package/features/string/pad-end.js +1 -1
  702. package/features/string/pad-start.js +1 -1
  703. package/features/string/raw.js +1 -1
  704. package/features/string/repeat.js +1 -1
  705. package/features/string/replace-all.js +1 -1
  706. package/features/string/replace.js +1 -1
  707. package/features/string/search.js +1 -1
  708. package/features/string/small.js +1 -1
  709. package/features/string/split.js +1 -1
  710. package/features/string/starts-with.js +1 -1
  711. package/features/string/strike.js +1 -1
  712. package/features/string/sub.js +1 -1
  713. package/features/string/substr.js +1 -1
  714. package/features/string/sup.js +1 -1
  715. package/features/string/trim-end.js +1 -1
  716. package/features/string/trim-left.js +1 -1
  717. package/features/string/trim-right.js +1 -1
  718. package/features/string/trim-start.js +1 -1
  719. package/features/string/trim.js +1 -1
  720. package/features/string/virtual/anchor.js +1 -1
  721. package/features/string/virtual/at.js +1 -1
  722. package/features/string/virtual/big.js +1 -1
  723. package/features/string/virtual/blink.js +1 -1
  724. package/features/string/virtual/bold.js +1 -1
  725. package/features/string/virtual/code-point-at.js +1 -1
  726. package/features/string/virtual/ends-with.js +1 -1
  727. package/features/string/virtual/fixed.js +1 -1
  728. package/features/string/virtual/fontcolor.js +1 -1
  729. package/features/string/virtual/fontsize.js +1 -1
  730. package/features/string/virtual/includes.js +1 -1
  731. package/features/string/virtual/index.js +1 -1
  732. package/features/string/virtual/italics.js +1 -1
  733. package/features/string/virtual/iterator.js +1 -1
  734. package/features/string/virtual/link.js +1 -1
  735. package/features/string/virtual/match-all.js +1 -1
  736. package/features/string/virtual/pad-end.js +1 -1
  737. package/features/string/virtual/pad-start.js +1 -1
  738. package/features/string/virtual/repeat.js +1 -1
  739. package/features/string/virtual/replace-all.js +1 -1
  740. package/features/string/virtual/small.js +1 -1
  741. package/features/string/virtual/starts-with.js +1 -1
  742. package/features/string/virtual/strike.js +1 -1
  743. package/features/string/virtual/sub.js +1 -1
  744. package/features/string/virtual/substr.js +1 -1
  745. package/features/string/virtual/sup.js +1 -1
  746. package/features/string/virtual/trim-end.js +1 -1
  747. package/features/string/virtual/trim-left.js +1 -1
  748. package/features/string/virtual/trim-right.js +1 -1
  749. package/features/string/virtual/trim-start.js +1 -1
  750. package/features/string/virtual/trim.js +1 -1
  751. package/features/structured-clone.js +3 -0
  752. package/features/symbol/async-iterator.js +1 -1
  753. package/features/symbol/for.js +1 -1
  754. package/features/symbol/has-instance.js +1 -1
  755. package/features/symbol/index.js +1 -1
  756. package/features/symbol/is-concat-spreadable.js +1 -1
  757. package/features/symbol/iterator.js +1 -1
  758. package/features/symbol/key-for.js +1 -1
  759. package/features/symbol/match-all.js +1 -1
  760. package/features/symbol/match.js +1 -1
  761. package/features/symbol/replace.js +1 -1
  762. package/features/symbol/search.js +1 -1
  763. package/features/symbol/species.js +1 -1
  764. package/features/symbol/split.js +1 -1
  765. package/features/symbol/to-primitive.js +1 -1
  766. package/features/symbol/to-string-tag.js +1 -1
  767. package/features/symbol/unscopables.js +1 -1
  768. package/features/typed-array/at.js +1 -1
  769. package/features/typed-array/copy-within.js +1 -1
  770. package/features/typed-array/entries.js +1 -1
  771. package/features/typed-array/every.js +1 -1
  772. package/features/typed-array/fill.js +1 -1
  773. package/features/typed-array/filter.js +1 -1
  774. package/features/typed-array/find-index.js +1 -1
  775. package/features/typed-array/find-last-index.js +3 -1
  776. package/features/typed-array/find-last.js +3 -1
  777. package/features/typed-array/find.js +1 -1
  778. package/features/typed-array/float32-array.js +1 -1
  779. package/features/typed-array/float64-array.js +1 -1
  780. package/features/typed-array/for-each.js +1 -1
  781. package/features/typed-array/from.js +1 -1
  782. package/features/typed-array/includes.js +1 -1
  783. package/features/typed-array/index-of.js +1 -1
  784. package/features/typed-array/index.js +5 -3
  785. package/features/typed-array/int16-array.js +1 -1
  786. package/features/typed-array/int32-array.js +1 -1
  787. package/features/typed-array/int8-array.js +1 -1
  788. package/features/typed-array/iterator.js +1 -1
  789. package/features/typed-array/join.js +1 -1
  790. package/features/typed-array/keys.js +1 -1
  791. package/features/typed-array/last-index-of.js +1 -1
  792. package/features/typed-array/map.js +1 -1
  793. package/features/typed-array/methods.js +5 -3
  794. package/features/typed-array/of.js +1 -1
  795. package/features/typed-array/reduce-right.js +1 -1
  796. package/features/typed-array/reduce.js +1 -1
  797. package/features/typed-array/reverse.js +1 -1
  798. package/features/typed-array/set.js +1 -1
  799. package/features/typed-array/slice.js +1 -1
  800. package/features/typed-array/some.js +1 -1
  801. package/features/typed-array/sort.js +1 -1
  802. package/features/typed-array/subarray.js +1 -1
  803. package/features/typed-array/to-locale-string.js +1 -1
  804. package/features/typed-array/to-reversed.js +1 -0
  805. package/features/typed-array/to-sorted.js +2 -0
  806. package/features/typed-array/to-spliced.js +1 -0
  807. package/features/typed-array/to-string.js +1 -1
  808. package/features/typed-array/uint16-array.js +1 -1
  809. package/features/typed-array/uint32-array.js +1 -1
  810. package/features/typed-array/uint8-array.js +1 -1
  811. package/features/typed-array/uint8-clamped-array.js +1 -1
  812. package/features/typed-array/values.js +1 -1
  813. package/features/typed-array/with.js +1 -0
  814. package/features/unescape.js +1 -1
  815. package/features/url/index.js +1 -1
  816. package/features/url/to-json.js +1 -1
  817. package/features/url-search-params/index.js +1 -1
  818. package/features/weak-map/index.js +1 -1
  819. package/features/weak-set/index.js +1 -1
  820. package/internals/array-buffer-view-core.js +5 -5
  821. package/internals/array-buffer.js +1 -1
  822. package/internals/array-from-constructor-and-list.js +3 -1
  823. package/internals/array-group-by.js +1 -0
  824. package/internals/array-slice-simple.js +17 -0
  825. package/internals/array-sort.js +1 -1
  826. package/internals/array-to-reversed.js +11 -0
  827. package/internals/array-to-spliced.js +35 -0
  828. package/internals/array-with.js +18 -0
  829. package/internals/async-from-sync-iterator.js +3 -1
  830. package/internals/async-iterator-create-proxy.js +3 -1
  831. package/internals/clear-error-stack.js +1 -8
  832. package/internals/copy-constructor-properties.js +4 -2
  833. package/internals/create-iterator-constructor.js +2 -2
  834. package/internals/dom-exception-constants.js +27 -0
  835. package/internals/error-to-string.js +30 -0
  836. package/internals/ie8-dom-define.js +1 -1
  837. package/internals/ieee754.js +20 -5
  838. package/internals/is-constructor.js +12 -3
  839. package/internals/iterator-create-proxy.js +3 -1
  840. package/internals/math-log10.js +7 -0
  841. package/internals/object-get-own-property-names-external.js +1 -1
  842. package/internals/queue.js +23 -0
  843. package/internals/regexp-exec.js +1 -2
  844. package/internals/regexp-sticky-helpers.js +14 -2
  845. package/internals/set-to-string-tag.js +4 -3
  846. package/internals/shared.js +1 -1
  847. package/internals/string-punycode-to-ascii.js +8 -6
  848. package/internals/try-node-require.js +8 -0
  849. package/internals/wrap-error-constructor-with-cause.js +60 -0
  850. package/modules/es.aggregate-error.cause.js +21 -0
  851. package/modules/es.aggregate-error.js +3 -3
  852. package/modules/es.array.iterator.js +9 -1
  853. package/modules/es.error.cause.js +56 -0
  854. package/modules/es.error.to-string.js +10 -0
  855. package/modules/es.function.name.js +1 -1
  856. package/modules/es.math.log10.js +2 -6
  857. package/modules/es.number.to-exponential.js +100 -0
  858. package/modules/es.number.to-fixed.js +1 -0
  859. package/modules/es.object.define-property.js +2 -2
  860. package/modules/es.promise.js +47 -44
  861. package/modules/es.regexp.constructor.js +4 -3
  862. package/modules/es.regexp.sticky.js +2 -2
  863. package/modules/es.string.at-alternative.js +1 -1
  864. package/modules/es.string.split.js +1 -1
  865. package/modules/es.typed-array.iterator.js +14 -7
  866. package/modules/es.weak-map.js +5 -5
  867. package/modules/esnext.array.group-by-to-map.js +38 -0
  868. package/modules/esnext.array.group-by.js +1 -2
  869. package/modules/esnext.array.to-reversed.js +18 -0
  870. package/modules/esnext.array.to-sorted.js +25 -0
  871. package/modules/esnext.array.to-spliced.js +20 -0
  872. package/modules/esnext.array.with.js +15 -0
  873. package/modules/esnext.function.is-callable.js +29 -0
  874. package/modules/esnext.function.is-constructor.js +8 -0
  875. package/modules/esnext.function.un-this.js +11 -0
  876. package/modules/esnext.iterator.to-async.js +10 -0
  877. package/modules/esnext.map.merge.js +1 -1
  878. package/modules/esnext.observable.js +69 -54
  879. package/modules/esnext.string.at.js +10 -3
  880. package/modules/esnext.string.cooked.js +30 -0
  881. package/modules/esnext.typed-array.from-async.js +1 -0
  882. package/modules/esnext.typed-array.group-by.js +1 -0
  883. package/modules/esnext.typed-array.to-reversed.js +13 -0
  884. package/modules/esnext.typed-array.to-sorted.js +19 -0
  885. package/modules/esnext.typed-array.to-spliced.js +15 -0
  886. package/modules/esnext.typed-array.with.js +13 -0
  887. package/modules/web.dom-exception.constructor.js +141 -0
  888. package/modules/web.dom-exception.stack.js +58 -0
  889. package/modules/web.dom-exception.to-string-tag.js +6 -0
  890. package/modules/web.structured-clone.js +461 -0
  891. package/modules/web.url-search-params.js +76 -67
  892. package/modules/web.url.js +612 -590
  893. package/package.json +2 -2
  894. package/proposals/accessible-object-hasownproperty.js +0 -1
  895. package/proposals/array-flat-map.js +5 -0
  896. package/proposals/array-from-async.js +1 -0
  897. package/proposals/array-grouping.js +2 -0
  898. package/proposals/array-includes.js +3 -0
  899. package/proposals/array-is-template-object.js +1 -0
  900. package/proposals/array-last.js +1 -0
  901. package/proposals/async-iteration.js +2 -0
  902. package/proposals/change-array-by-copy.js +9 -0
  903. package/proposals/collection-methods.js +1 -0
  904. package/proposals/collection-of-from.js +1 -0
  905. package/proposals/efficient-64-bit-arithmetic.js +1 -0
  906. package/proposals/error-cause.js +3 -0
  907. package/proposals/function-is-callable-is-constructor.js +3 -0
  908. package/proposals/function-un-this.js +2 -0
  909. package/proposals/global-this.js +1 -0
  910. package/proposals/index.js +1 -0
  911. package/proposals/iterator-helpers.js +2 -0
  912. package/proposals/keys-composition.js +1 -0
  913. package/proposals/map-update-or-insert.js +1 -0
  914. package/proposals/map-upsert.js +1 -1
  915. package/proposals/math-extensions.js +1 -0
  916. package/proposals/math-signbit.js +1 -0
  917. package/proposals/number-from-string.js +1 -0
  918. package/proposals/object-from-entries.js +2 -0
  919. package/proposals/object-getownpropertydescriptors.js +2 -0
  920. package/proposals/object-iteration.js +1 -0
  921. package/proposals/object-values-entries.js +3 -0
  922. package/proposals/observable.js +1 -0
  923. package/proposals/promise-all-settled.js +1 -1
  924. package/proposals/promise-any.js +1 -0
  925. package/proposals/promise-finally.js +2 -0
  926. package/proposals/promise-try.js +1 -0
  927. package/proposals/reflect-metadata.js +1 -0
  928. package/proposals/regexp-dotall-flag.js +5 -0
  929. package/proposals/regexp-named-groups.js +4 -0
  930. package/proposals/relative-indexing-method.js +0 -1
  931. package/proposals/seeded-random.js +1 -0
  932. package/proposals/set-methods.js +1 -0
  933. package/proposals/string-at.js +1 -0
  934. package/proposals/string-code-points.js +1 -0
  935. package/proposals/string-cooked.js +2 -0
  936. package/proposals/string-left-right-trim.js +3 -0
  937. package/proposals/string-match-all.js +1 -1
  938. package/proposals/string-padding.js +3 -0
  939. package/proposals/string-replace-all.js +1 -0
  940. package/proposals/symbol-description.js +2 -0
  941. package/proposals/url.js +1 -0
  942. package/proposals/well-formed-stringify.js +2 -0
  943. package/stable/dom-exception/constructor.js +6 -0
  944. package/stable/dom-exception/index.js +7 -0
  945. package/stable/dom-exception/to-string-tag.js +3 -0
  946. package/stable/error/constructor.js +3 -0
  947. package/stable/error/index.js +3 -0
  948. package/stable/error/to-string.js +3 -0
  949. package/stable/index.js +8 -0
  950. package/stable/number/to-exponential.js +3 -0
  951. package/stable/number/virtual/to-exponential.js +3 -0
  952. package/stable/structured-clone.js +13 -0
  953. package/stable/symbol/description.js +3 -1
  954. package/stage/0.js +2 -0
  955. package/stage/1.js +1 -2
  956. package/stage/2.js +2 -0
  957. package/stage/3.js +1 -0
  958. package/stage/4.js +2 -0
  959. package/web/dom-exception.js +7 -0
  960. package/web/index.js +4 -0
  961. package/web/structured-clone.js +8 -0
@@ -0,0 +1,461 @@
1
+ var IS_PURE = require('../internals/is-pure');
2
+ var $ = require('../internals/export');
3
+ var global = require('../internals/global');
4
+ var getBuiltin = require('../internals/get-built-in');
5
+ var uncurryThis = require('../internals/function-uncurry-this');
6
+ var fails = require('../internals/fails');
7
+ var uid = require('../internals/uid');
8
+ var isCallable = require('../internals/is-callable');
9
+ var isConstructor = require('../internals/is-constructor');
10
+ var isObject = require('../internals/is-object');
11
+ var isSymbol = require('../internals/is-symbol');
12
+ var iterate = require('../internals/iterate');
13
+ var anObject = require('../internals/an-object');
14
+ var classof = require('../internals/classof');
15
+ var hasOwn = require('../internals/has-own-property');
16
+ var createProperty = require('../internals/create-property');
17
+ var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
18
+ var lengthOfArrayLike = require('../internals/length-of-array-like');
19
+ var regExpFlags = require('../internals/regexp-flags');
20
+ var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');
21
+
22
+ var Object = global.Object;
23
+ var Date = global.Date;
24
+ var Error = global.Error;
25
+ var EvalError = global.EvalError;
26
+ var RangeError = global.RangeError;
27
+ var ReferenceError = global.ReferenceError;
28
+ var SyntaxError = global.SyntaxError;
29
+ var TypeError = global.TypeError;
30
+ var URIError = global.URIError;
31
+ var PerformanceMark = global.PerformanceMark;
32
+ var WebAssembly = global.WebAssembly;
33
+ var CompileError = WebAssembly && WebAssembly.CompileError || Error;
34
+ var LinkError = WebAssembly && WebAssembly.LinkError || Error;
35
+ var RuntimeError = WebAssembly && WebAssembly.RuntimeError || Error;
36
+ var DOMException = getBuiltin('DOMException');
37
+ var Set = getBuiltin('Set');
38
+ var Map = getBuiltin('Map');
39
+ var MapPrototype = Map.prototype;
40
+ var mapHas = uncurryThis(MapPrototype.has);
41
+ var mapGet = uncurryThis(MapPrototype.get);
42
+ var mapSet = uncurryThis(MapPrototype.set);
43
+ var setAdd = uncurryThis(Set.prototype.add);
44
+ var objectKeys = getBuiltin('Object', 'keys');
45
+ var push = uncurryThis([].push);
46
+ var booleanValueOf = uncurryThis(true.valueOf);
47
+ var numberValueOf = uncurryThis(1.0.valueOf);
48
+ var stringValueOf = uncurryThis(''.valueOf);
49
+ var getFlags = uncurryThis(regExpFlags);
50
+ var getTime = uncurryThis(Date.prototype.getTime);
51
+ var PERFORMANCE_MARK = uid('structuredClone');
52
+ var DATA_CLONE_ERROR = 'DataCloneError';
53
+ var TRANSFERRING = 'Transferring';
54
+
55
+ var checkBasicSemantic = function (structuredCloneImplementation) {
56
+ return !fails(function () {
57
+ var set1 = new global.Set([7]);
58
+ var set2 = structuredCloneImplementation(set1);
59
+ var number = structuredCloneImplementation(Object(7));
60
+ return set2 == set1 || !set2.has(7) || typeof number != 'object' || number != 7;
61
+ }) && structuredCloneImplementation;
62
+ };
63
+
64
+ // https://github.com/whatwg/html/pull/5749
65
+ var checkNewErrorsSemantic = function (structuredCloneImplementation) {
66
+ return !fails(function () {
67
+ var test = structuredCloneImplementation(new global.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
68
+ return test.name != 'AggregateError' || test.errors[0] != 1 || test.message != PERFORMANCE_MARK || test.cause != 3;
69
+ }) && structuredCloneImplementation;
70
+ };
71
+
72
+ // FF94+, Safari TP134+, Chrome Canary 98+, NodeJS 17.0+, Deno 1.13+
73
+ // current FF and Safari implementations can't clone errors
74
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1556604
75
+ // no one of current implementations supports new (html/5749) error cloning semantic
76
+ var nativeStructuredClone = global.structuredClone;
77
+
78
+ var FORCED_REPLACEMENT = IS_PURE || !checkNewErrorsSemantic(nativeStructuredClone);
79
+
80
+ // Chrome 82+, Safari 14.1+, Deno 1.11+
81
+ // Chrome 78-81 implementation swaps `.name` and `.message` of cloned `DOMException`
82
+ // Safari 14.1 implementation doesn't clone some `RegExp` flags, so requires a workaround
83
+ // current Safari implementation can't clone errors
84
+ // Deno 1.2-1.10 implementations too naive
85
+ // NodeJS 16.0+ does not have `PerformanceMark` constructor, structured cloning implementation
86
+ // from `performance.mark` is too naive and can't clone, for example, `RegExp` or some boxed primitives
87
+ // https://github.com/nodejs/node/issues/40840
88
+ // no one of current implementations supports new (html/5749) error cloning semantic
89
+ var structuredCloneFromMark = !nativeStructuredClone && checkBasicSemantic(function (value) {
90
+ return new PerformanceMark(PERFORMANCE_MARK, { detail: value }).detail;
91
+ });
92
+
93
+ var nativeRestrictedStructuredClone = checkBasicSemantic(nativeStructuredClone) || structuredCloneFromMark;
94
+
95
+ var throwUncloneable = function (type) {
96
+ throw new DOMException('Uncloneable type: ' + type, DATA_CLONE_ERROR);
97
+ };
98
+
99
+ var throwUnpolyfillable = function (type, kind) {
100
+ throw new DOMException((kind || 'Cloning') + ' of ' + type + ' cannot be properly polyfilled in this engine', DATA_CLONE_ERROR);
101
+ };
102
+
103
+ var structuredCloneInternal = function (value, map) {
104
+ if (isSymbol(value)) throwUncloneable('Symbol');
105
+ if (!isObject(value)) return value;
106
+ // effectively preserves circular references
107
+ if (map) {
108
+ if (mapHas(map, value)) return mapGet(map, value);
109
+ } else map = new Map();
110
+
111
+ var type = classof(value);
112
+ var deep = false;
113
+ var C, name, cloned, dataTransfer, i, length, keys, key, source, target;
114
+
115
+ switch (type) {
116
+ case 'Array':
117
+ cloned = [];
118
+ deep = true;
119
+ break;
120
+ case 'Object':
121
+ cloned = {};
122
+ deep = true;
123
+ break;
124
+ case 'Map':
125
+ cloned = new Map();
126
+ deep = true;
127
+ break;
128
+ case 'Set':
129
+ cloned = new Set();
130
+ deep = true;
131
+ break;
132
+ case 'RegExp':
133
+ // in this block because of a Safari 14.1 bug
134
+ // old FF does not clone regexes passed to the constructor, so get the source and flags directly
135
+ cloned = new RegExp(value.source, 'flags' in value ? value.flags : getFlags(value));
136
+ break;
137
+ case 'Error':
138
+ name = value.name;
139
+ switch (name) {
140
+ case 'AggregateError':
141
+ cloned = getBuiltin('AggregateError')([]);
142
+ break;
143
+ case 'EvalError':
144
+ cloned = EvalError();
145
+ break;
146
+ case 'RangeError':
147
+ cloned = RangeError();
148
+ break;
149
+ case 'ReferenceError':
150
+ cloned = ReferenceError();
151
+ break;
152
+ case 'SyntaxError':
153
+ cloned = SyntaxError();
154
+ break;
155
+ case 'TypeError':
156
+ cloned = TypeError();
157
+ break;
158
+ case 'URIError':
159
+ cloned = URIError();
160
+ break;
161
+ case 'CompileError':
162
+ cloned = CompileError();
163
+ break;
164
+ case 'LinkError':
165
+ cloned = LinkError();
166
+ break;
167
+ case 'RuntimeError':
168
+ cloned = RuntimeError();
169
+ break;
170
+ default:
171
+ cloned = Error();
172
+ }
173
+ deep = true;
174
+ break;
175
+ case 'DOMException':
176
+ cloned = new DOMException(value.message, value.name);
177
+ deep = true;
178
+ break;
179
+ case 'DataView':
180
+ case 'Int8Array':
181
+ case 'Uint8Array':
182
+ case 'Uint8ClampedArray':
183
+ case 'Int16Array':
184
+ case 'Uint16Array':
185
+ case 'Int32Array':
186
+ case 'Uint32Array':
187
+ case 'Float32Array':
188
+ case 'Float64Array':
189
+ case 'BigInt64Array':
190
+ case 'BigUint64Array':
191
+ C = global[type];
192
+ // in some old engines like Safari 9, typeof C is 'object'
193
+ // on Uint8ClampedArray or some other constructors
194
+ if (!isObject(C)) throwUnpolyfillable(type);
195
+ cloned = new C(
196
+ // this is safe, since arraybuffer cannot have circular references
197
+ structuredCloneInternal(value.buffer, map),
198
+ value.byteOffset,
199
+ type === 'DataView' ? value.byteLength : value.length
200
+ );
201
+ break;
202
+ case 'DOMQuad':
203
+ try {
204
+ cloned = new DOMQuad(
205
+ structuredCloneInternal(value.p1, map),
206
+ structuredCloneInternal(value.p2, map),
207
+ structuredCloneInternal(value.p3, map),
208
+ structuredCloneInternal(value.p4, map)
209
+ );
210
+ } catch (error) {
211
+ if (nativeRestrictedStructuredClone) {
212
+ cloned = nativeRestrictedStructuredClone(value);
213
+ } else throwUnpolyfillable(type);
214
+ }
215
+ break;
216
+ case 'FileList':
217
+ C = global.DataTransfer;
218
+ if (isConstructor(C)) {
219
+ dataTransfer = new C();
220
+ for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
221
+ dataTransfer.items.add(structuredCloneInternal(value[i], map));
222
+ }
223
+ cloned = dataTransfer.files;
224
+ } else if (nativeRestrictedStructuredClone) {
225
+ cloned = nativeRestrictedStructuredClone(value);
226
+ } else throwUnpolyfillable(type);
227
+ break;
228
+ case 'ImageData':
229
+ // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
230
+ try {
231
+ cloned = new ImageData(
232
+ structuredCloneInternal(value.data, map),
233
+ value.width,
234
+ value.height,
235
+ { colorSpace: value.colorSpace }
236
+ );
237
+ } catch (error) {
238
+ if (nativeRestrictedStructuredClone) {
239
+ cloned = nativeRestrictedStructuredClone(value);
240
+ } else throwUnpolyfillable(type);
241
+ } break;
242
+ default:
243
+ if (nativeRestrictedStructuredClone) {
244
+ cloned = nativeRestrictedStructuredClone(value);
245
+ } else switch (type) {
246
+ case 'BigInt':
247
+ // can be a 3rd party polyfill
248
+ cloned = Object(value.valueOf());
249
+ break;
250
+ case 'Boolean':
251
+ cloned = Object(booleanValueOf(value));
252
+ break;
253
+ case 'Number':
254
+ cloned = Object(numberValueOf(value));
255
+ break;
256
+ case 'String':
257
+ cloned = Object(stringValueOf(value));
258
+ break;
259
+ case 'Date':
260
+ cloned = new Date(getTime(value));
261
+ break;
262
+ case 'ArrayBuffer':
263
+ C = global.DataView;
264
+ // `ArrayBuffer#slice` is not available in IE10
265
+ // `ArrayBuffer#slice` and `DataView` are not available in old FF
266
+ if (!C && typeof value.slice != 'function') throwUnpolyfillable(type);
267
+ // detached buffers throws in `DataView` and `.slice`
268
+ try {
269
+ if (typeof value.slice == 'function') {
270
+ cloned = value.slice(0);
271
+ } else {
272
+ length = value.byteLength;
273
+ cloned = new ArrayBuffer(length);
274
+ source = new C(value);
275
+ target = new C(cloned);
276
+ for (i = 0; i < length; i++) {
277
+ target.setUint8(i, source.getUint8(i));
278
+ }
279
+ }
280
+ } catch (error) {
281
+ throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR);
282
+ } break;
283
+ case 'SharedArrayBuffer':
284
+ // SharedArrayBuffer should use shared memory, we can't polyfill it, so return the original
285
+ cloned = value;
286
+ break;
287
+ case 'Blob':
288
+ try {
289
+ cloned = value.slice(0, value.size, value.type);
290
+ } catch (error) {
291
+ throwUnpolyfillable(type);
292
+ } break;
293
+ case 'DOMPoint':
294
+ case 'DOMPointReadOnly':
295
+ C = global[type];
296
+ try {
297
+ cloned = C.fromPoint
298
+ ? C.fromPoint(value)
299
+ : new C(value.x, value.y, value.z, value.w);
300
+ } catch (error) {
301
+ throwUnpolyfillable(type);
302
+ } break;
303
+ case 'DOMRect':
304
+ case 'DOMRectReadOnly':
305
+ C = global[type];
306
+ try {
307
+ cloned = C.fromRect
308
+ ? C.fromRect(value)
309
+ : new C(value.x, value.y, value.width, value.height);
310
+ } catch (error) {
311
+ throwUnpolyfillable(type);
312
+ } break;
313
+ case 'DOMMatrix':
314
+ case 'DOMMatrixReadOnly':
315
+ C = global[type];
316
+ try {
317
+ cloned = C.fromMatrix
318
+ ? C.fromMatrix(value)
319
+ : new C(value);
320
+ } catch (error) {
321
+ throwUnpolyfillable(type);
322
+ } break;
323
+ case 'AudioData':
324
+ case 'VideoFrame':
325
+ if (!isCallable(value.clone)) throwUnpolyfillable(type);
326
+ try {
327
+ cloned = value.clone();
328
+ } catch (error) {
329
+ throwUncloneable(type);
330
+ } break;
331
+ case 'File':
332
+ try {
333
+ cloned = new File([value], value.name, value);
334
+ } catch (error) {
335
+ throwUnpolyfillable(type);
336
+ } break;
337
+ case 'CryptoKey':
338
+ case 'GPUCompilationMessage':
339
+ case 'GPUCompilationInfo':
340
+ case 'ImageBitmap':
341
+ case 'RTCCertificate':
342
+ case 'WebAssembly.Module':
343
+ throwUnpolyfillable(type);
344
+ // break omitted
345
+ default:
346
+ throwUncloneable(type);
347
+ }
348
+ }
349
+
350
+ mapSet(map, value, cloned);
351
+
352
+ if (deep) switch (type) {
353
+ case 'Array':
354
+ case 'Object':
355
+ keys = objectKeys(value);
356
+ for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
357
+ key = keys[i];
358
+ createProperty(cloned, key, structuredCloneInternal(value[key], map));
359
+ } break;
360
+ case 'Map':
361
+ value.forEach(function (v, k) {
362
+ mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
363
+ });
364
+ break;
365
+ case 'Set':
366
+ value.forEach(function (v) {
367
+ setAdd(cloned, structuredCloneInternal(v, map));
368
+ });
369
+ break;
370
+ case 'Error':
371
+ createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
372
+ if (hasOwn(value, 'cause')) {
373
+ createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
374
+ }
375
+ if (name == 'AggregateError') {
376
+ cloned.errors = structuredCloneInternal(value.errors, map);
377
+ } // break omitted
378
+ case 'DOMException':
379
+ if (ERROR_STACK_INSTALLABLE) {
380
+ createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
381
+ }
382
+ }
383
+
384
+ return cloned;
385
+ };
386
+
387
+ var PROPER_TRANSFER = nativeStructuredClone && !fails(function () {
388
+ var buffer = new ArrayBuffer(8);
389
+ var clone = nativeStructuredClone(buffer, { transfer: [buffer] });
390
+ return buffer.byteLength != 0 || clone.byteLength != 8;
391
+ });
392
+
393
+ var tryToTransfer = function (rawTransfer, map) {
394
+ if (!isObject(rawTransfer)) throw TypeError('Transfer option cannot be converted to a sequence');
395
+
396
+ var transfer = [];
397
+
398
+ iterate(rawTransfer, function (value) {
399
+ push(transfer, anObject(value));
400
+ });
401
+
402
+ var i = 0;
403
+ var length = lengthOfArrayLike(transfer);
404
+ var value, type, C, transferredArray, transferred, canvas, context;
405
+
406
+ if (PROPER_TRANSFER) {
407
+ transferredArray = nativeStructuredClone(transfer, { transfer: transfer });
408
+ while (i < length) mapSet(map, transfer[i], transferredArray[i++]);
409
+ } else while (i < length) {
410
+ value = transfer[i++];
411
+ if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
412
+
413
+ type = classof(value);
414
+
415
+ switch (type) {
416
+ case 'ImageBitmap':
417
+ C = global.OffscreenCanvas;
418
+ if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);
419
+ try {
420
+ canvas = new C(value.width, value.height);
421
+ context = canvas.getContext('bitmaprenderer');
422
+ context.transferFromImageBitmap(value);
423
+ transferred = canvas.transferToImageBitmap();
424
+ } catch (error) { /* empty */ }
425
+ break;
426
+ case 'AudioData':
427
+ case 'VideoFrame':
428
+ if (!isCallable(value.clone) || !isCallable(value.close)) throwUnpolyfillable(type, TRANSFERRING);
429
+ try {
430
+ transferred = value.clone();
431
+ value.close();
432
+ } catch (error) { /* empty */ }
433
+ break;
434
+ case 'ArrayBuffer':
435
+ case 'MessagePort':
436
+ case 'OffscreenCanvas':
437
+ case 'ReadableStream':
438
+ case 'TransformStream':
439
+ case 'WritableStream':
440
+ throwUnpolyfillable(type, TRANSFERRING);
441
+ }
442
+
443
+ if (transferred === undefined) throw new DOMException('This object cannot be transferred: ' + type, DATA_CLONE_ERROR);
444
+ mapSet(map, value, transferred);
445
+ }
446
+ };
447
+
448
+ $({ global: true, enumerable: true, sham: !PROPER_TRANSFER, forced: FORCED_REPLACEMENT }, {
449
+ structuredClone: function structuredClone(value /* , { transfer } */) {
450
+ var options = arguments.length > 1 ? anObject(arguments[1]) : undefined;
451
+ var transfer = options ? options.transfer : undefined;
452
+ var map;
453
+
454
+ if (transfer !== undefined) {
455
+ map = new Map();
456
+ tryToTransfer(transfer, map);
457
+ }
458
+
459
+ return structuredCloneInternal(value, map);
460
+ }
461
+ });
@@ -99,29 +99,6 @@ var serialize = function (it) {
99
99
  return replace(encodeURIComponent(it), find, replacer);
100
100
  };
101
101
 
102
- var parseSearchParams = function (result, query) {
103
- if (query) {
104
- var attributes = split(query, '&');
105
- var index = 0;
106
- var attribute, entry;
107
- while (index < attributes.length) {
108
- attribute = attributes[index++];
109
- if (attribute.length) {
110
- entry = split(attribute, '=');
111
- push(result, {
112
- key: deserialize(shift(entry)),
113
- value: deserialize(join(entry, '='))
114
- });
115
- }
116
- }
117
- }
118
- };
119
-
120
- var updateSearchParams = function (query) {
121
- this.entries.length = 0;
122
- parseSearchParams(this.entries, query);
123
- };
124
-
125
102
  var validateArgumentsLength = function (passed, required) {
126
103
  if (passed < required) throw TypeError('Not enough arguments');
127
104
  };
@@ -140,50 +117,89 @@ var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params
140
117
  if (!step.done) {
141
118
  step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
142
119
  } return step;
143
- });
120
+ }, true);
144
121
 
145
- // `URLSearchParams` constructor
146
- // https://url.spec.whatwg.org/#interface-urlsearchparams
147
- var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
148
- anInstance(this, URLSearchParamsPrototype);
149
- var init = arguments.length > 0 ? arguments[0] : undefined;
150
- var that = this;
151
- var entries = [];
152
- var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
153
-
154
- setInternalState(that, {
155
- type: URL_SEARCH_PARAMS,
156
- entries: entries,
157
- updateURL: function () { /* empty */ },
158
- updateSearchParams: updateSearchParams
159
- });
122
+ var URLSearchParamsState = function (init) {
123
+ this.entries = [];
124
+ this.url = null;
160
125
 
161
126
  if (init !== undefined) {
162
- if (isObject(init)) {
163
- iteratorMethod = getIteratorMethod(init);
164
- if (iteratorMethod) {
165
- iterator = getIterator(init, iteratorMethod);
166
- next = iterator.next;
167
- while (!(step = call(next, iterator)).done) {
168
- entryIterator = getIterator(anObject(step.value));
169
- entryNext = entryIterator.next;
170
- if (
171
- (first = call(entryNext, entryIterator)).done ||
172
- (second = call(entryNext, entryIterator)).done ||
173
- !call(entryNext, entryIterator).done
174
- ) throw TypeError('Expected sequence with length 2');
175
- push(entries, { key: $toString(first.value), value: $toString(second.value) });
127
+ if (isObject(init)) this.parseObject(init);
128
+ else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));
129
+ }
130
+ };
131
+
132
+ URLSearchParamsState.prototype = {
133
+ type: URL_SEARCH_PARAMS,
134
+ bindURL: function (url) {
135
+ this.url = url;
136
+ this.update();
137
+ },
138
+ parseObject: function (object) {
139
+ var iteratorMethod = getIteratorMethod(object);
140
+ var iterator, next, step, entryIterator, entryNext, first, second;
141
+
142
+ if (iteratorMethod) {
143
+ iterator = getIterator(object, iteratorMethod);
144
+ next = iterator.next;
145
+ while (!(step = call(next, iterator)).done) {
146
+ entryIterator = getIterator(anObject(step.value));
147
+ entryNext = entryIterator.next;
148
+ if (
149
+ (first = call(entryNext, entryIterator)).done ||
150
+ (second = call(entryNext, entryIterator)).done ||
151
+ !call(entryNext, entryIterator).done
152
+ ) throw TypeError('Expected sequence with length 2');
153
+ push(this.entries, { key: $toString(first.value), value: $toString(second.value) });
154
+ }
155
+ } else for (var key in object) if (hasOwn(object, key)) {
156
+ push(this.entries, { key: key, value: $toString(object[key]) });
157
+ }
158
+ },
159
+ parseQuery: function (query) {
160
+ if (query) {
161
+ var attributes = split(query, '&');
162
+ var index = 0;
163
+ var attribute, entry;
164
+ while (index < attributes.length) {
165
+ attribute = attributes[index++];
166
+ if (attribute.length) {
167
+ entry = split(attribute, '=');
168
+ push(this.entries, {
169
+ key: deserialize(shift(entry)),
170
+ value: deserialize(join(entry, '='))
171
+ });
176
172
  }
177
- } else for (key in init) if (hasOwn(init, key)) push(entries, { key: key, value: $toString(init[key]) });
178
- } else {
179
- parseSearchParams(
180
- entries,
181
- typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init)
182
- );
173
+ }
183
174
  }
175
+ },
176
+ serialize: function () {
177
+ var entries = this.entries;
178
+ var result = [];
179
+ var index = 0;
180
+ var entry;
181
+ while (index < entries.length) {
182
+ entry = entries[index++];
183
+ push(result, serialize(entry.key) + '=' + serialize(entry.value));
184
+ } return join(result, '&');
185
+ },
186
+ update: function () {
187
+ this.entries.length = 0;
188
+ this.parseQuery(this.url.query);
189
+ },
190
+ updateURL: function () {
191
+ if (this.url) this.url.update();
184
192
  }
185
193
  };
186
194
 
195
+ // `URLSearchParams` constructor
196
+ // https://url.spec.whatwg.org/#interface-urlsearchparams
197
+ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
198
+ anInstance(this, URLSearchParamsPrototype);
199
+ var init = arguments.length > 0 ? arguments[0] : undefined;
200
+ setInternalState(this, new URLSearchParamsState(init));
201
+ };
202
+
187
203
  var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
188
204
 
189
205
  redefineAll(URLSearchParamsPrototype, {
@@ -310,14 +326,7 @@ redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, {
310
326
  // `URLSearchParams.prototype.toString` method
311
327
  // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
312
328
  redefine(URLSearchParamsPrototype, 'toString', function toString() {
313
- var entries = getInternalParamsState(this).entries;
314
- var result = [];
315
- var index = 0;
316
- var entry;
317
- while (index < entries.length) {
318
- entry = entries[index++];
319
- push(result, serialize(entry.key) + '=' + serialize(entry.value));
320
- } return join(result, '&');
329
+ return getInternalParamsState(this).serialize();
321
330
  }, { enumerable: true });
322
331
 
323
332
  setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);