@swf2es/runtime 0.0.0-stage → 0.1.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 (459) hide show
  1. package/LICENSE +202 -0
  2. package/LICENSE.third-party +422 -0
  3. package/README.md +29 -2
  4. package/dist/avm1/activation.d.ts +108 -0
  5. package/dist/avm1/activation.d.ts.map +1 -0
  6. package/dist/avm1/activation.js +90 -0
  7. package/dist/avm1/activation.js.map +1 -0
  8. package/dist/avm1/case.d.ts +3 -0
  9. package/dist/avm1/case.d.ts.map +1 -0
  10. package/dist/avm1/case.js +250 -0
  11. package/dist/avm1/case.js.map +1 -0
  12. package/dist/avm1/clips.d.ts +68 -0
  13. package/dist/avm1/clips.d.ts.map +1 -0
  14. package/dist/avm1/clips.js +335 -0
  15. package/dist/avm1/clips.js.map +1 -0
  16. package/dist/avm1/control.d.ts +54 -0
  17. package/dist/avm1/control.d.ts.map +1 -0
  18. package/dist/avm1/control.js +281 -0
  19. package/dist/avm1/control.js.map +1 -0
  20. package/dist/avm1/errors.d.ts +49 -0
  21. package/dist/avm1/errors.d.ts.map +1 -0
  22. package/dist/avm1/errors.js +51 -0
  23. package/dist/avm1/errors.js.map +1 -0
  24. package/dist/avm1/functions.d.ts +94 -0
  25. package/dist/avm1/functions.d.ts.map +1 -0
  26. package/dist/avm1/functions.js +250 -0
  27. package/dist/avm1/functions.js.map +1 -0
  28. package/dist/avm1/globals/array.d.ts +8 -0
  29. package/dist/avm1/globals/array.d.ts.map +1 -0
  30. package/dist/avm1/globals/array.js +550 -0
  31. package/dist/avm1/globals/array.js.map +1 -0
  32. package/dist/avm1/globals/broadcaster.d.ts +22 -0
  33. package/dist/avm1/globals/broadcaster.d.ts.map +1 -0
  34. package/dist/avm1/globals/broadcaster.js +132 -0
  35. package/dist/avm1/globals/broadcaster.js.map +1 -0
  36. package/dist/avm1/globals/date.d.ts +10 -0
  37. package/dist/avm1/globals/date.d.ts.map +1 -0
  38. package/dist/avm1/globals/date.js +437 -0
  39. package/dist/avm1/globals/date.js.map +1 -0
  40. package/dist/avm1/globals/global.d.ts +23 -0
  41. package/dist/avm1/globals/global.d.ts.map +1 -0
  42. package/dist/avm1/globals/global.js +345 -0
  43. package/dist/avm1/globals/global.js.map +1 -0
  44. package/dist/avm1/globals/math.d.ts +7 -0
  45. package/dist/avm1/globals/math.d.ts.map +1 -0
  46. package/dist/avm1/globals/math.js +140 -0
  47. package/dist/avm1/globals/math.js.map +1 -0
  48. package/dist/avm1/globals/number.d.ts +11 -0
  49. package/dist/avm1/globals/number.d.ts.map +1 -0
  50. package/dist/avm1/globals/number.js +94 -0
  51. package/dist/avm1/globals/number.js.map +1 -0
  52. package/dist/avm1/globals/string.d.ts +8 -0
  53. package/dist/avm1/globals/string.d.ts.map +1 -0
  54. package/dist/avm1/globals/string.js +202 -0
  55. package/dist/avm1/globals/string.js.map +1 -0
  56. package/dist/avm1/globals/timers.d.ts +49 -0
  57. package/dist/avm1/globals/timers.d.ts.map +1 -0
  58. package/dist/avm1/globals/timers.js +130 -0
  59. package/dist/avm1/globals/timers.js.map +1 -0
  60. package/dist/avm1/host.d.ts +146 -0
  61. package/dist/avm1/host.d.ts.map +1 -0
  62. package/dist/avm1/host.js +6 -0
  63. package/dist/avm1/host.js.map +1 -0
  64. package/dist/avm1/index.d.ts +15 -0
  65. package/dist/avm1/index.d.ts.map +1 -0
  66. package/dist/avm1/index.js +15 -0
  67. package/dist/avm1/index.js.map +1 -0
  68. package/dist/avm1/inheritance.d.ts +25 -0
  69. package/dist/avm1/inheritance.d.ts.map +1 -0
  70. package/dist/avm1/inheritance.js +133 -0
  71. package/dist/avm1/inheritance.js.map +1 -0
  72. package/dist/avm1/numbers.d.ts +21 -0
  73. package/dist/avm1/numbers.d.ts.map +1 -0
  74. package/dist/avm1/numbers.js +299 -0
  75. package/dist/avm1/numbers.js.map +1 -0
  76. package/dist/avm1/objects.d.ts +245 -0
  77. package/dist/avm1/objects.d.ts.map +1 -0
  78. package/dist/avm1/objects.js +897 -0
  79. package/dist/avm1/objects.js.map +1 -0
  80. package/dist/avm1/operators.d.ts +45 -0
  81. package/dist/avm1/operators.d.ts.map +1 -0
  82. package/dist/avm1/operators.js +171 -0
  83. package/dist/avm1/operators.js.map +1 -0
  84. package/dist/avm1/realm.d.ts +126 -0
  85. package/dist/avm1/realm.d.ts.map +1 -0
  86. package/dist/avm1/realm.js +530 -0
  87. package/dist/avm1/realm.js.map +1 -0
  88. package/dist/avm1/runtime.d.ts +294 -0
  89. package/dist/avm1/runtime.d.ts.map +1 -0
  90. package/dist/avm1/runtime.js +883 -0
  91. package/dist/avm1/runtime.js.map +1 -0
  92. package/dist/avm1/scope.d.ts +77 -0
  93. package/dist/avm1/scope.d.ts.map +1 -0
  94. package/dist/avm1/scope.js +386 -0
  95. package/dist/avm1/scope.js.map +1 -0
  96. package/dist/avm1/urls.d.ts +25 -0
  97. package/dist/avm1/urls.d.ts.map +1 -0
  98. package/dist/avm1/urls.js +181 -0
  99. package/dist/avm1/urls.js.map +1 -0
  100. package/dist/avm1/values.d.ts +52 -0
  101. package/dist/avm1/values.d.ts.map +1 -0
  102. package/dist/avm1/values.js +98 -0
  103. package/dist/avm1/values.js.map +1 -0
  104. package/dist/avm2/amf-classes.d.ts +28 -0
  105. package/dist/avm2/amf-classes.d.ts.map +1 -0
  106. package/dist/avm2/amf-classes.js +67 -0
  107. package/dist/avm2/amf-classes.js.map +1 -0
  108. package/dist/avm2/amf.d.ts +96 -0
  109. package/dist/avm2/amf.d.ts.map +1 -0
  110. package/dist/avm2/amf.js +802 -0
  111. package/dist/avm2/amf.js.map +1 -0
  112. package/dist/avm2/array-conversion.d.ts +31 -0
  113. package/dist/avm2/array-conversion.d.ts.map +1 -0
  114. package/dist/avm2/array-conversion.js +101 -0
  115. package/dist/avm2/array-conversion.js.map +1 -0
  116. package/dist/avm2/builtin-library.d.ts +2 -0
  117. package/dist/avm2/builtin-library.d.ts.map +1 -0
  118. package/dist/avm2/builtin-library.js +22 -0
  119. package/dist/avm2/builtin-library.js.map +1 -0
  120. package/dist/avm2/cache-fill.d.ts +14 -0
  121. package/dist/avm2/cache-fill.d.ts.map +1 -0
  122. package/dist/avm2/cache-fill.js +87 -0
  123. package/dist/avm2/cache-fill.js.map +1 -0
  124. package/dist/avm2/classes.d.ts +17 -0
  125. package/dist/avm2/classes.d.ts.map +1 -0
  126. package/dist/avm2/classes.js +212 -0
  127. package/dist/avm2/classes.js.map +1 -0
  128. package/dist/avm2/definitions.d.ts +28 -0
  129. package/dist/avm2/definitions.d.ts.map +1 -0
  130. package/dist/avm2/definitions.js +70 -0
  131. package/dist/avm2/definitions.js.map +1 -0
  132. package/dist/avm2/descriptors.d.ts +118 -0
  133. package/dist/avm2/descriptors.d.ts.map +1 -0
  134. package/dist/avm2/descriptors.js +6 -0
  135. package/dist/avm2/descriptors.js.map +1 -0
  136. package/dist/avm2/dictionary-keys.d.ts +73 -0
  137. package/dist/avm2/dictionary-keys.d.ts.map +1 -0
  138. package/dist/avm2/dictionary-keys.js +296 -0
  139. package/dist/avm2/dictionary-keys.js.map +1 -0
  140. package/dist/avm2/domain-memory.d.ts +23 -0
  141. package/dist/avm2/domain-memory.d.ts.map +1 -0
  142. package/dist/avm2/domain-memory.js +76 -0
  143. package/dist/avm2/domain-memory.js.map +1 -0
  144. package/dist/avm2/domain.d.ts +108 -0
  145. package/dist/avm2/domain.d.ts.map +1 -0
  146. package/dist/avm2/domain.js +281 -0
  147. package/dist/avm2/domain.js.map +1 -0
  148. package/dist/avm2/dynamic-properties.d.ts +62 -0
  149. package/dist/avm2/dynamic-properties.d.ts.map +1 -0
  150. package/dist/avm2/dynamic-properties.js +183 -0
  151. package/dist/avm2/dynamic-properties.js.map +1 -0
  152. package/dist/avm2/enumeration.d.ts +75 -0
  153. package/dist/avm2/enumeration.d.ts.map +1 -0
  154. package/dist/avm2/enumeration.js +394 -0
  155. package/dist/avm2/enumeration.js.map +1 -0
  156. package/dist/avm2/errors.d.ts +20 -0
  157. package/dist/avm2/errors.d.ts.map +1 -0
  158. package/dist/avm2/errors.js +46 -0
  159. package/dist/avm2/errors.js.map +1 -0
  160. package/dist/avm2/float-library.d.ts +2 -0
  161. package/dist/avm2/float-library.d.ts.map +1 -0
  162. package/dist/avm2/float-library.js +67 -0
  163. package/dist/avm2/float-library.js.map +1 -0
  164. package/dist/avm2/float.d.ts +9 -0
  165. package/dist/avm2/float.d.ts.map +1 -0
  166. package/dist/avm2/float.js +27 -0
  167. package/dist/avm2/float.js.map +1 -0
  168. package/dist/avm2/hooks.d.ts +77 -0
  169. package/dist/avm2/hooks.d.ts.map +1 -0
  170. package/dist/avm2/hooks.js +20 -0
  171. package/dist/avm2/hooks.js.map +1 -0
  172. package/dist/avm2/index.d.ts +32 -0
  173. package/dist/avm2/index.d.ts.map +1 -0
  174. package/dist/avm2/index.js +39 -0
  175. package/dist/avm2/index.js.map +1 -0
  176. package/dist/avm2/messages.d.ts +2 -0
  177. package/dist/avm2/messages.d.ts.map +1 -0
  178. package/dist/avm2/messages.js +178 -0
  179. package/dist/avm2/messages.js.map +1 -0
  180. package/dist/avm2/method-factories.d.ts +35 -0
  181. package/dist/avm2/method-factories.d.ts.map +1 -0
  182. package/dist/avm2/method-factories.js +96 -0
  183. package/dist/avm2/method-factories.js.map +1 -0
  184. package/dist/avm2/modules.d.ts +40 -0
  185. package/dist/avm2/modules.d.ts.map +1 -0
  186. package/dist/avm2/modules.js +106 -0
  187. package/dist/avm2/modules.js.map +1 -0
  188. package/dist/avm2/names.d.ts +143 -0
  189. package/dist/avm2/names.d.ts.map +1 -0
  190. package/dist/avm2/names.js +249 -0
  191. package/dist/avm2/names.js.map +1 -0
  192. package/dist/avm2/natives/aliases.d.ts +3 -0
  193. package/dist/avm2/natives/aliases.d.ts.map +1 -0
  194. package/dist/avm2/natives/aliases.js +48 -0
  195. package/dist/avm2/natives/aliases.js.map +1 -0
  196. package/dist/avm2/natives/array.d.ts +5 -0
  197. package/dist/avm2/natives/array.d.ts.map +1 -0
  198. package/dist/avm2/natives/array.js +391 -0
  199. package/dist/avm2/natives/array.js.map +1 -0
  200. package/dist/avm2/natives/bytearray.d.ts +180 -0
  201. package/dist/avm2/natives/bytearray.d.ts.map +1 -0
  202. package/dist/avm2/natives/bytearray.js +1228 -0
  203. package/dist/avm2/natives/bytearray.js.map +1 -0
  204. package/dist/avm2/natives/case.d.ts +5 -0
  205. package/dist/avm2/natives/case.d.ts.map +1 -0
  206. package/dist/avm2/natives/case.js +89 -0
  207. package/dist/avm2/natives/case.js.map +1 -0
  208. package/dist/avm2/natives/concurrent.d.ts +24 -0
  209. package/dist/avm2/natives/concurrent.d.ts.map +1 -0
  210. package/dist/avm2/natives/concurrent.js +200 -0
  211. package/dist/avm2/natives/concurrent.js.map +1 -0
  212. package/dist/avm2/natives/date.d.ts +5 -0
  213. package/dist/avm2/natives/date.d.ts.map +1 -0
  214. package/dist/avm2/natives/date.js +582 -0
  215. package/dist/avm2/natives/date.js.map +1 -0
  216. package/dist/avm2/natives/define.d.ts +58 -0
  217. package/dist/avm2/natives/define.d.ts.map +1 -0
  218. package/dist/avm2/natives/define.js +131 -0
  219. package/dist/avm2/natives/define.js.map +1 -0
  220. package/dist/avm2/natives/describe.d.ts +3 -0
  221. package/dist/avm2/natives/describe.d.ts.map +1 -0
  222. package/dist/avm2/natives/describe.js +352 -0
  223. package/dist/avm2/natives/describe.js.map +1 -0
  224. package/dist/avm2/natives/dictionary.d.ts +3 -0
  225. package/dist/avm2/natives/dictionary.d.ts.map +1 -0
  226. package/dist/avm2/natives/dictionary.js +13 -0
  227. package/dist/avm2/natives/dictionary.js.map +1 -0
  228. package/dist/avm2/natives/float-vector.d.ts +20 -0
  229. package/dist/avm2/natives/float-vector.d.ts.map +1 -0
  230. package/dist/avm2/natives/float-vector.js +82 -0
  231. package/dist/avm2/natives/float-vector.js.map +1 -0
  232. package/dist/avm2/natives/float.d.ts +5 -0
  233. package/dist/avm2/natives/float.d.ts.map +1 -0
  234. package/dist/avm2/natives/float.js +97 -0
  235. package/dist/avm2/natives/float.js.map +1 -0
  236. package/dist/avm2/natives/index.d.ts +7 -0
  237. package/dist/avm2/natives/index.d.ts.map +1 -0
  238. package/dist/avm2/natives/index.js +65 -0
  239. package/dist/avm2/natives/index.js.map +1 -0
  240. package/dist/avm2/natives/json.d.ts +3 -0
  241. package/dist/avm2/natives/json.d.ts.map +1 -0
  242. package/dist/avm2/natives/json.js +515 -0
  243. package/dist/avm2/natives/json.js.map +1 -0
  244. package/dist/avm2/natives/number.d.ts +15 -0
  245. package/dist/avm2/natives/number.d.ts.map +1 -0
  246. package/dist/avm2/natives/number.js +163 -0
  247. package/dist/avm2/natives/number.js.map +1 -0
  248. package/dist/avm2/natives/object.d.ts +8 -0
  249. package/dist/avm2/natives/object.d.ts.map +1 -0
  250. package/dist/avm2/natives/object.js +238 -0
  251. package/dist/avm2/natives/object.js.map +1 -0
  252. package/dist/avm2/natives/proxy.d.ts +5 -0
  253. package/dist/avm2/natives/proxy.d.ts.map +1 -0
  254. package/dist/avm2/natives/proxy.js +76 -0
  255. package/dist/avm2/natives/proxy.js.map +1 -0
  256. package/dist/avm2/natives/regexp.d.ts +21 -0
  257. package/dist/avm2/natives/regexp.d.ts.map +1 -0
  258. package/dist/avm2/natives/regexp.js +486 -0
  259. package/dist/avm2/natives/regexp.js.map +1 -0
  260. package/dist/avm2/natives/shell-workers.d.ts +140 -0
  261. package/dist/avm2/natives/shell-workers.d.ts.map +1 -0
  262. package/dist/avm2/natives/shell-workers.js +405 -0
  263. package/dist/avm2/natives/shell-workers.js.map +1 -0
  264. package/dist/avm2/natives/shell.d.ts +12 -0
  265. package/dist/avm2/natives/shell.d.ts.map +1 -0
  266. package/dist/avm2/natives/shell.js +558 -0
  267. package/dist/avm2/natives/shell.js.map +1 -0
  268. package/dist/avm2/natives/sort.d.ts +7 -0
  269. package/dist/avm2/natives/sort.d.ts.map +1 -0
  270. package/dist/avm2/natives/sort.js +378 -0
  271. package/dist/avm2/natives/sort.js.map +1 -0
  272. package/dist/avm2/natives/string.d.ts +5 -0
  273. package/dist/avm2/natives/string.d.ts.map +1 -0
  274. package/dist/avm2/natives/string.js +133 -0
  275. package/dist/avm2/natives/string.js.map +1 -0
  276. package/dist/avm2/natives/sync.d.ts +215 -0
  277. package/dist/avm2/natives/sync.d.ts.map +1 -0
  278. package/dist/avm2/natives/sync.js +822 -0
  279. package/dist/avm2/natives/sync.js.map +1 -0
  280. package/dist/avm2/natives/toplevel.d.ts +5 -0
  281. package/dist/avm2/natives/toplevel.d.ts.map +1 -0
  282. package/dist/avm2/natives/toplevel.js +140 -0
  283. package/dist/avm2/natives/toplevel.js.map +1 -0
  284. package/dist/avm2/natives/vector-elements.d.ts +10 -0
  285. package/dist/avm2/natives/vector-elements.d.ts.map +1 -0
  286. package/dist/avm2/natives/vector-elements.js +47 -0
  287. package/dist/avm2/natives/vector-elements.js.map +1 -0
  288. package/dist/avm2/natives/vector.d.ts +5 -0
  289. package/dist/avm2/natives/vector.d.ts.map +1 -0
  290. package/dist/avm2/natives/vector.js +407 -0
  291. package/dist/avm2/natives/vector.js.map +1 -0
  292. package/dist/avm2/natives/xml/access.d.ts +34 -0
  293. package/dist/avm2/natives/xml/access.d.ts.map +1 -0
  294. package/dist/avm2/natives/xml/access.js +634 -0
  295. package/dist/avm2/natives/xml/access.js.map +1 -0
  296. package/dist/avm2/natives/xml/build.d.ts +11 -0
  297. package/dist/avm2/natives/xml/build.d.ts.map +1 -0
  298. package/dist/avm2/natives/xml/build.js +292 -0
  299. package/dist/avm2/natives/xml/build.js.map +1 -0
  300. package/dist/avm2/natives/xml/chars.d.ts +9 -0
  301. package/dist/avm2/natives/xml/chars.d.ts.map +1 -0
  302. package/dist/avm2/natives/xml/chars.js +113 -0
  303. package/dist/avm2/natives/xml/chars.js.map +1 -0
  304. package/dist/avm2/natives/xml/escape.d.ts +5 -0
  305. package/dist/avm2/natives/xml/escape.d.ts.map +1 -0
  306. package/dist/avm2/natives/xml/escape.js +39 -0
  307. package/dist/avm2/natives/xml/escape.js.map +1 -0
  308. package/dist/avm2/natives/xml/names.d.ts +46 -0
  309. package/dist/avm2/natives/xml/names.d.ts.map +1 -0
  310. package/dist/avm2/natives/xml/names.js +205 -0
  311. package/dist/avm2/natives/xml/names.js.map +1 -0
  312. package/dist/avm2/natives/xml/node.d.ts +94 -0
  313. package/dist/avm2/natives/xml/node.d.ts.map +1 -0
  314. package/dist/avm2/natives/xml/node.js +273 -0
  315. package/dist/avm2/natives/xml/node.js.map +1 -0
  316. package/dist/avm2/natives/xml/operators.d.ts +7 -0
  317. package/dist/avm2/natives/xml/operators.d.ts.map +1 -0
  318. package/dist/avm2/natives/xml/operators.js +70 -0
  319. package/dist/avm2/natives/xml/operators.js.map +1 -0
  320. package/dist/avm2/natives/xml/parser.d.ts +51 -0
  321. package/dist/avm2/natives/xml/parser.d.ts.map +1 -0
  322. package/dist/avm2/natives/xml/parser.js +357 -0
  323. package/dist/avm2/natives/xml/parser.js.map +1 -0
  324. package/dist/avm2/natives/xml/strings.d.ts +10 -0
  325. package/dist/avm2/natives/xml/strings.d.ts.map +1 -0
  326. package/dist/avm2/natives/xml/strings.js +192 -0
  327. package/dist/avm2/natives/xml/strings.js.map +1 -0
  328. package/dist/avm2/natives/xml/values.d.ts +48 -0
  329. package/dist/avm2/natives/xml/values.d.ts.map +1 -0
  330. package/dist/avm2/natives/xml/values.js +123 -0
  331. package/dist/avm2/natives/xml/values.js.map +1 -0
  332. package/dist/avm2/natives/xml/xml.d.ts +5 -0
  333. package/dist/avm2/natives/xml/xml.d.ts.map +1 -0
  334. package/dist/avm2/natives/xml/xml.js +646 -0
  335. package/dist/avm2/natives/xml/xml.js.map +1 -0
  336. package/dist/avm2/number-strings.d.ts +28 -0
  337. package/dist/avm2/number-strings.d.ts.map +1 -0
  338. package/dist/avm2/number-strings.js +111 -0
  339. package/dist/avm2/number-strings.js.map +1 -0
  340. package/dist/avm2/numbers.d.ts +12 -0
  341. package/dist/avm2/numbers.d.ts.map +1 -0
  342. package/dist/avm2/numbers.js +559 -0
  343. package/dist/avm2/numbers.js.map +1 -0
  344. package/dist/avm2/options.d.ts +105 -0
  345. package/dist/avm2/options.d.ts.map +1 -0
  346. package/dist/avm2/options.js +17 -0
  347. package/dist/avm2/options.js.map +1 -0
  348. package/dist/avm2/player-messages.d.ts +3 -0
  349. package/dist/avm2/player-messages.d.ts.map +1 -0
  350. package/dist/avm2/player-messages.js +551 -0
  351. package/dist/avm2/player-messages.js.map +1 -0
  352. package/dist/avm2/property-cache.d.ts +61 -0
  353. package/dist/avm2/property-cache.d.ts.map +1 -0
  354. package/dist/avm2/property-cache.js +136 -0
  355. package/dist/avm2/property-cache.js.map +1 -0
  356. package/dist/avm2/runtime.d.ts +588 -0
  357. package/dist/avm2/runtime.d.ts.map +1 -0
  358. package/dist/avm2/runtime.js +2645 -0
  359. package/dist/avm2/runtime.js.map +1 -0
  360. package/dist/avm2/traits.d.ts +233 -0
  361. package/dist/avm2/traits.d.ts.map +1 -0
  362. package/dist/avm2/traits.js +510 -0
  363. package/dist/avm2/traits.js.map +1 -0
  364. package/dist/index.d.ts +8 -0
  365. package/dist/index.d.ts.map +1 -0
  366. package/dist/index.js +8 -0
  367. package/dist/index.js.map +1 -0
  368. package/package.json +43 -3
  369. package/src/avm1/activation.ts +114 -0
  370. package/src/avm1/case.ts +257 -0
  371. package/src/avm1/clips.ts +440 -0
  372. package/src/avm1/control.ts +339 -0
  373. package/src/avm1/errors.ts +60 -0
  374. package/src/avm1/functions.ts +271 -0
  375. package/src/avm1/globals/array.ts +676 -0
  376. package/src/avm1/globals/broadcaster.ts +185 -0
  377. package/src/avm1/globals/date.ts +548 -0
  378. package/src/avm1/globals/global.ts +420 -0
  379. package/src/avm1/globals/math.ts +152 -0
  380. package/src/avm1/globals/number.ts +122 -0
  381. package/src/avm1/globals/string.ts +254 -0
  382. package/src/avm1/globals/timers.ts +144 -0
  383. package/src/avm1/host.ts +155 -0
  384. package/src/avm1/index.ts +69 -0
  385. package/src/avm1/inheritance.ts +159 -0
  386. package/src/avm1/numbers.ts +348 -0
  387. package/src/avm1/objects.ts +1080 -0
  388. package/src/avm1/operators.ts +229 -0
  389. package/src/avm1/realm.ts +704 -0
  390. package/src/avm1/runtime.ts +1291 -0
  391. package/src/avm1/scope.ts +482 -0
  392. package/src/avm1/urls.ts +226 -0
  393. package/src/avm1/values.ts +145 -0
  394. package/src/avm2/amf-classes.ts +80 -0
  395. package/src/avm2/amf.ts +913 -0
  396. package/src/avm2/array-conversion.ts +117 -0
  397. package/src/avm2/builtin-library.ts +28 -0
  398. package/src/avm2/cache-fill.ts +124 -0
  399. package/src/avm2/classes.ts +235 -0
  400. package/src/avm2/definitions.ts +93 -0
  401. package/src/avm2/descriptors.ts +137 -0
  402. package/src/avm2/dictionary-keys.ts +345 -0
  403. package/src/avm2/domain-memory.ts +95 -0
  404. package/src/avm2/domain.ts +335 -0
  405. package/src/avm2/dynamic-properties.ts +209 -0
  406. package/src/avm2/enumeration.ts +506 -0
  407. package/src/avm2/errors.ts +54 -0
  408. package/src/avm2/float-library.ts +66 -0
  409. package/src/avm2/float.ts +31 -0
  410. package/src/avm2/hooks.ts +97 -0
  411. package/src/avm2/index.ts +84 -0
  412. package/src/avm2/messages.ts +178 -0
  413. package/src/avm2/method-factories.ts +130 -0
  414. package/src/avm2/modules.ts +120 -0
  415. package/src/avm2/names.ts +292 -0
  416. package/src/avm2/natives/aliases.ts +59 -0
  417. package/src/avm2/natives/array.ts +482 -0
  418. package/src/avm2/natives/bytearray.ts +1474 -0
  419. package/src/avm2/natives/case.ts +98 -0
  420. package/src/avm2/natives/concurrent.ts +268 -0
  421. package/src/avm2/natives/date.ts +678 -0
  422. package/src/avm2/natives/define.ts +176 -0
  423. package/src/avm2/natives/describe.ts +426 -0
  424. package/src/avm2/natives/dictionary.ts +18 -0
  425. package/src/avm2/natives/float-vector.ts +99 -0
  426. package/src/avm2/natives/float.ts +116 -0
  427. package/src/avm2/natives/index.ts +70 -0
  428. package/src/avm2/natives/json.ts +600 -0
  429. package/src/avm2/natives/number.ts +194 -0
  430. package/src/avm2/natives/object.ts +272 -0
  431. package/src/avm2/natives/proxy.ts +98 -0
  432. package/src/avm2/natives/regexp.ts +580 -0
  433. package/src/avm2/natives/shell-workers.ts +474 -0
  434. package/src/avm2/natives/shell.ts +707 -0
  435. package/src/avm2/natives/sort.ts +438 -0
  436. package/src/avm2/natives/string.ts +158 -0
  437. package/src/avm2/natives/sync.ts +964 -0
  438. package/src/avm2/natives/toplevel.ts +163 -0
  439. package/src/avm2/natives/vector-elements.ts +61 -0
  440. package/src/avm2/natives/vector.ts +511 -0
  441. package/src/avm2/natives/xml/access.ts +767 -0
  442. package/src/avm2/natives/xml/build.ts +381 -0
  443. package/src/avm2/natives/xml/chars.ts +127 -0
  444. package/src/avm2/natives/xml/escape.ts +46 -0
  445. package/src/avm2/natives/xml/names.ts +256 -0
  446. package/src/avm2/natives/xml/node.ts +339 -0
  447. package/src/avm2/natives/xml/operators.ts +90 -0
  448. package/src/avm2/natives/xml/parser.ts +414 -0
  449. package/src/avm2/natives/xml/strings.ts +241 -0
  450. package/src/avm2/natives/xml/values.ts +162 -0
  451. package/src/avm2/natives/xml/xml.ts +829 -0
  452. package/src/avm2/number-strings.ts +127 -0
  453. package/src/avm2/numbers.ts +605 -0
  454. package/src/avm2/options.ts +125 -0
  455. package/src/avm2/player-messages.ts +552 -0
  456. package/src/avm2/property-cache.ts +160 -0
  457. package/src/avm2/runtime.ts +3274 -0
  458. package/src/avm2/traits.ts +584 -0
  459. package/src/index.ts +8 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 The swf2es authors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
@@ -0,0 +1,422 @@
1
+ Code from elsewhere in @swf2es/runtime, and its terms. The package's own
2
+ code is under the Apache License 2.0 (LICENSE).
3
+
4
+
5
+ avmplus
6
+ =======
7
+
8
+ src/avm2/builtin-library.ts holds avmplus' builtin.abc, and the files
9
+ under src/ whose headers say so are translated from avmplus; dist/ holds
10
+ them compiled.
11
+
12
+ These are subject to the Mozilla Public License, v. 2.0, below.
13
+ Their TypeScript is under src/.
14
+ Each ABC is compiled from avmplus' ActionScript, whose source form is at
15
+ https://github.com/swf2es/avmplus/tree/858d034a3bd3a54d9b70909386435cf4aec81d21.
16
+
17
+ Mozilla Public License Version 2.0
18
+ ==================================
19
+
20
+ 1. Definitions
21
+ --------------
22
+
23
+ 1.1. "Contributor"
24
+ means each individual or legal entity that creates, contributes to
25
+ the creation of, or owns Covered Software.
26
+
27
+ 1.2. "Contributor Version"
28
+ means the combination of the Contributions of others (if any) used
29
+ by a Contributor and that particular Contributor's Contribution.
30
+
31
+ 1.3. "Contribution"
32
+ means Covered Software of a particular Contributor.
33
+
34
+ 1.4. "Covered Software"
35
+ means Source Code Form to which the initial Contributor has attached
36
+ the notice in Exhibit A, the Executable Form of such Source Code
37
+ Form, and Modifications of such Source Code Form, in each case
38
+ including portions thereof.
39
+
40
+ 1.5. "Incompatible With Secondary Licenses"
41
+ means
42
+
43
+ (a) that the initial Contributor has attached the notice described
44
+ in Exhibit B to the Covered Software; or
45
+
46
+ (b) that the Covered Software was made available under the terms of
47
+ version 1.1 or earlier of the License, but not also under the
48
+ terms of a Secondary License.
49
+
50
+ 1.6. "Executable Form"
51
+ means any form of the work other than Source Code Form.
52
+
53
+ 1.7. "Larger Work"
54
+ means a work that combines Covered Software with other material, in
55
+ a separate file or files, that is not Covered Software.
56
+
57
+ 1.8. "License"
58
+ means this document.
59
+
60
+ 1.9. "Licensable"
61
+ means having the right to grant, to the maximum extent possible,
62
+ whether at the time of the initial grant or subsequently, any and
63
+ all of the rights conveyed by this License.
64
+
65
+ 1.10. "Modifications"
66
+ means any of the following:
67
+
68
+ (a) any file in Source Code Form that results from an addition to,
69
+ deletion from, or modification of the contents of Covered
70
+ Software; or
71
+
72
+ (b) any new file in Source Code Form that contains any Covered
73
+ Software.
74
+
75
+ 1.11. "Patent Claims" of a Contributor
76
+ means any patent claim(s), including without limitation, method,
77
+ process, and apparatus claims, in any patent Licensable by such
78
+ Contributor that would be infringed, but for the grant of the
79
+ License, by the making, using, selling, offering for sale, having
80
+ made, import, or transfer of either its Contributions or its
81
+ Contributor Version.
82
+
83
+ 1.12. "Secondary License"
84
+ means either the GNU General Public License, Version 2.0, the GNU
85
+ Lesser General Public License, Version 2.1, the GNU Affero General
86
+ Public License, Version 3.0, or any later versions of those
87
+ licenses.
88
+
89
+ 1.13. "Source Code Form"
90
+ means the form of the work preferred for making modifications.
91
+
92
+ 1.14. "You" (or "Your")
93
+ means an individual or a legal entity exercising rights under this
94
+ License. For legal entities, "You" includes any entity that
95
+ controls, is controlled by, or is under common control with You. For
96
+ purposes of this definition, "control" means (a) the power, direct
97
+ or indirect, to cause the direction or management of such entity,
98
+ whether by contract or otherwise, or (b) ownership of more than
99
+ fifty percent (50%) of the outstanding shares or beneficial
100
+ ownership of such entity.
101
+
102
+ 2. License Grants and Conditions
103
+ --------------------------------
104
+
105
+ 2.1. Grants
106
+
107
+ Each Contributor hereby grants You a world-wide, royalty-free,
108
+ non-exclusive license:
109
+
110
+ (a) under intellectual property rights (other than patent or trademark)
111
+ Licensable by such Contributor to use, reproduce, make available,
112
+ modify, display, perform, distribute, and otherwise exploit its
113
+ Contributions, either on an unmodified basis, with Modifications, or
114
+ as part of a Larger Work; and
115
+
116
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
117
+ for sale, have made, import, and otherwise transfer either its
118
+ Contributions or its Contributor Version.
119
+
120
+ 2.2. Effective Date
121
+
122
+ The licenses granted in Section 2.1 with respect to any Contribution
123
+ become effective for each Contribution on the date the Contributor first
124
+ distributes such Contribution.
125
+
126
+ 2.3. Limitations on Grant Scope
127
+
128
+ The licenses granted in this Section 2 are the only rights granted under
129
+ this License. No additional rights or licenses will be implied from the
130
+ distribution or licensing of Covered Software under this License.
131
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
132
+ Contributor:
133
+
134
+ (a) for any code that a Contributor has removed from Covered Software;
135
+ or
136
+
137
+ (b) for infringements caused by: (i) Your and any other third party's
138
+ modifications of Covered Software, or (ii) the combination of its
139
+ Contributions with other software (except as part of its Contributor
140
+ Version); or
141
+
142
+ (c) under Patent Claims infringed by Covered Software in the absence of
143
+ its Contributions.
144
+
145
+ This License does not grant any rights in the trademarks, service marks,
146
+ or logos of any Contributor (except as may be necessary to comply with
147
+ the notice requirements in Section 3.4).
148
+
149
+ 2.4. Subsequent Licenses
150
+
151
+ No Contributor makes additional grants as a result of Your choice to
152
+ distribute the Covered Software under a subsequent version of this
153
+ License (see Section 10.2) or under the terms of a Secondary License (if
154
+ permitted under the terms of Section 3.3).
155
+
156
+ 2.5. Representation
157
+
158
+ Each Contributor represents that the Contributor believes its
159
+ Contributions are its original creation(s) or it has sufficient rights
160
+ to grant the rights to its Contributions conveyed by this License.
161
+
162
+ 2.6. Fair Use
163
+
164
+ This License is not intended to limit any rights You have under
165
+ applicable copyright doctrines of fair use, fair dealing, or other
166
+ equivalents.
167
+
168
+ 2.7. Conditions
169
+
170
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
171
+ in Section 2.1.
172
+
173
+ 3. Responsibilities
174
+ -------------------
175
+
176
+ 3.1. Distribution of Source Form
177
+
178
+ All distribution of Covered Software in Source Code Form, including any
179
+ Modifications that You create or to which You contribute, must be under
180
+ the terms of this License. You must inform recipients that the Source
181
+ Code Form of the Covered Software is governed by the terms of this
182
+ License, and how they can obtain a copy of this License. You may not
183
+ attempt to alter or restrict the recipients' rights in the Source Code
184
+ Form.
185
+
186
+ 3.2. Distribution of Executable Form
187
+
188
+ If You distribute Covered Software in Executable Form then:
189
+
190
+ (a) such Covered Software must also be made available in Source Code
191
+ Form, as described in Section 3.1, and You must inform recipients of
192
+ the Executable Form how they can obtain a copy of such Source Code
193
+ Form by reasonable means in a timely manner, at a charge no more
194
+ than the cost of distribution to the recipient; and
195
+
196
+ (b) You may distribute such Executable Form under the terms of this
197
+ License, or sublicense it under different terms, provided that the
198
+ license for the Executable Form does not attempt to limit or alter
199
+ the recipients' rights in the Source Code Form under this License.
200
+
201
+ 3.3. Distribution of a Larger Work
202
+
203
+ You may create and distribute a Larger Work under terms of Your choice,
204
+ provided that You also comply with the requirements of this License for
205
+ the Covered Software. If the Larger Work is a combination of Covered
206
+ Software with a work governed by one or more Secondary Licenses, and the
207
+ Covered Software is not Incompatible With Secondary Licenses, this
208
+ License permits You to additionally distribute such Covered Software
209
+ under the terms of such Secondary License(s), so that the recipient of
210
+ the Larger Work may, at their option, further distribute the Covered
211
+ Software under the terms of either this License or such Secondary
212
+ License(s).
213
+
214
+ 3.4. Notices
215
+
216
+ You may not remove or alter the substance of any license notices
217
+ (including copyright notices, patent notices, disclaimers of warranty,
218
+ or limitations of liability) contained within the Source Code Form of
219
+ the Covered Software, except that You may alter any license notices to
220
+ the extent required to remedy known factual inaccuracies.
221
+
222
+ 3.5. Application of Additional Terms
223
+
224
+ You may choose to offer, and to charge a fee for, warranty, support,
225
+ indemnity or liability obligations to one or more recipients of Covered
226
+ Software. However, You may do so only on Your own behalf, and not on
227
+ behalf of any Contributor. You must make it absolutely clear that any
228
+ such warranty, support, indemnity, or liability obligation is offered by
229
+ You alone, and You hereby agree to indemnify every Contributor for any
230
+ liability incurred by such Contributor as a result of warranty, support,
231
+ indemnity or liability terms You offer. You may include additional
232
+ disclaimers of warranty and limitations of liability specific to any
233
+ jurisdiction.
234
+
235
+ 4. Inability to Comply Due to Statute or Regulation
236
+ ---------------------------------------------------
237
+
238
+ If it is impossible for You to comply with any of the terms of this
239
+ License with respect to some or all of the Covered Software due to
240
+ statute, judicial order, or regulation then You must: (a) comply with
241
+ the terms of this License to the maximum extent possible; and (b)
242
+ describe the limitations and the code they affect. Such description must
243
+ be placed in a text file included with all distributions of the Covered
244
+ Software under this License. Except to the extent prohibited by statute
245
+ or regulation, such description must be sufficiently detailed for a
246
+ recipient of ordinary skill to be able to understand it.
247
+
248
+ 5. Termination
249
+ --------------
250
+
251
+ 5.1. The rights granted under this License will terminate automatically
252
+ if You fail to comply with any of its terms. However, if You become
253
+ compliant, then the rights granted under this License from a particular
254
+ Contributor are reinstated (a) provisionally, unless and until such
255
+ Contributor explicitly and finally terminates Your grants, and (b) on an
256
+ ongoing basis, if such Contributor fails to notify You of the
257
+ non-compliance by some reasonable means prior to 60 days after You have
258
+ come back into compliance. Moreover, Your grants from a particular
259
+ Contributor are reinstated on an ongoing basis if such Contributor
260
+ notifies You of the non-compliance by some reasonable means, this is the
261
+ first time You have received notice of non-compliance with this License
262
+ from such Contributor, and You become compliant prior to 30 days after
263
+ Your receipt of the notice.
264
+
265
+ 5.2. If You initiate litigation against any entity by asserting a patent
266
+ infringement claim (excluding declaratory judgment actions,
267
+ counter-claims, and cross-claims) alleging that a Contributor Version
268
+ directly or indirectly infringes any patent, then the rights granted to
269
+ You by any and all Contributors for the Covered Software under Section
270
+ 2.1 of this License shall terminate.
271
+
272
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
273
+ end user license agreements (excluding distributors and resellers) which
274
+ have been validly granted by You or Your distributors under this License
275
+ prior to termination shall survive termination.
276
+
277
+ ************************************************************************
278
+ * *
279
+ * 6. Disclaimer of Warranty *
280
+ * ------------------------- *
281
+ * *
282
+ * Covered Software is provided under this License on an "as is" *
283
+ * basis, without warranty of any kind, either expressed, implied, or *
284
+ * statutory, including, without limitation, warranties that the *
285
+ * Covered Software is free of defects, merchantable, fit for a *
286
+ * particular purpose or non-infringing. The entire risk as to the *
287
+ * quality and performance of the Covered Software is with You. *
288
+ * Should any Covered Software prove defective in any respect, You *
289
+ * (not any Contributor) assume the cost of any necessary servicing, *
290
+ * repair, or correction. This disclaimer of warranty constitutes an *
291
+ * essential part of this License. No use of any Covered Software is *
292
+ * authorized under this License except under this disclaimer. *
293
+ * *
294
+ ************************************************************************
295
+
296
+ ************************************************************************
297
+ * *
298
+ * 7. Limitation of Liability *
299
+ * -------------------------- *
300
+ * *
301
+ * Under no circumstances and under no legal theory, whether tort *
302
+ * (including negligence), contract, or otherwise, shall any *
303
+ * Contributor, or anyone who distributes Covered Software as *
304
+ * permitted above, be liable to You for any direct, indirect, *
305
+ * special, incidental, or consequential damages of any character *
306
+ * including, without limitation, damages for lost profits, loss of *
307
+ * goodwill, work stoppage, computer failure or malfunction, or any *
308
+ * and all other commercial damages or losses, even if such party *
309
+ * shall have been informed of the possibility of such damages. This *
310
+ * limitation of liability shall not apply to liability for death or *
311
+ * personal injury resulting from such party's negligence to the *
312
+ * extent applicable law prohibits such limitation. Some *
313
+ * jurisdictions do not allow the exclusion or limitation of *
314
+ * incidental or consequential damages, so this exclusion and *
315
+ * limitation may not apply to You. *
316
+ * *
317
+ ************************************************************************
318
+
319
+ 8. Litigation
320
+ -------------
321
+
322
+ Any litigation relating to this License may be brought only in the
323
+ courts of a jurisdiction where the defendant maintains its principal
324
+ place of business and such litigation shall be governed by laws of that
325
+ jurisdiction, without reference to its conflict-of-law provisions.
326
+ Nothing in this Section shall prevent a party's ability to bring
327
+ cross-claims or counter-claims.
328
+
329
+ 9. Miscellaneous
330
+ ----------------
331
+
332
+ This License represents the complete agreement concerning the subject
333
+ matter hereof. If any provision of this License is held to be
334
+ unenforceable, such provision shall be reformed only to the extent
335
+ necessary to make it enforceable. Any law or regulation which provides
336
+ that the language of a contract shall be construed against the drafter
337
+ shall not be used to construe this License against a Contributor.
338
+
339
+ 10. Versions of the License
340
+ ---------------------------
341
+
342
+ 10.1. New Versions
343
+
344
+ Mozilla Foundation is the license steward. Except as provided in Section
345
+ 10.3, no one other than the license steward has the right to modify or
346
+ publish new versions of this License. Each version will be given a
347
+ distinguishing version number.
348
+
349
+ 10.2. Effect of New Versions
350
+
351
+ You may distribute the Covered Software under the terms of the version
352
+ of the License under which You originally received the Covered Software,
353
+ or under the terms of any subsequent version published by the license
354
+ steward.
355
+
356
+ 10.3. Modified Versions
357
+
358
+ If you create software not governed by this License, and you want to
359
+ create a new license for such software, you may create and use a
360
+ modified version of this License if you rename the license and remove
361
+ any references to the name of the license steward (except to note that
362
+ such modified license differs from this License).
363
+
364
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
365
+ Licenses
366
+
367
+ If You choose to distribute Source Code Form that is Incompatible With
368
+ Secondary Licenses under the terms of this version of the License, the
369
+ notice described in Exhibit B of this License must be attached.
370
+
371
+ Exhibit A - Source Code Form License Notice
372
+ -------------------------------------------
373
+
374
+ This Source Code Form is subject to the terms of the Mozilla Public
375
+ License, v. 2.0. If a copy of the MPL was not distributed with this
376
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
377
+
378
+ If it is not possible or desirable to put the notice in a particular
379
+ file, then You may include the notice in a location (such as a LICENSE
380
+ file in a relevant directory) where a recipient would be likely to look
381
+ for such a notice.
382
+
383
+ You may add additional accurate notices of copyright ownership.
384
+
385
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
386
+ ---------------------------------------------------------
387
+
388
+ This Source Code Form is "Incompatible With Secondary Licenses", as
389
+ defined by the Mozilla Public License, v. 2.0.
390
+
391
+
392
+ Ruffle
393
+ ======
394
+
395
+ Parts of the files under src/, and of dist/ compiled from them, are taken
396
+ or ported from Ruffle, Copyright (c) 2018-2022 Ruffle LLC and Ruffle
397
+ contributors: each file's header says so.
398
+
399
+ Ruffle, https://github.com/ruffle-rs/ruffle, is under the MIT license or
400
+ the Apache License 2.0 (LICENSE), at your choice. Its MIT terms:
401
+
402
+ The MIT License (MIT)
403
+
404
+ Copyright (c) 2018-2022 Ruffle LLC and Ruffle contributors
405
+
406
+ Permission is hereby granted, free of charge, to any person obtaining a copy
407
+ of this software and associated documentation files (the "Software"), to deal
408
+ in the Software without restriction, including without limitation the rights
409
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
410
+ copies of the Software, and to permit persons to whom the Software is
411
+ furnished to do so, subject to the following conditions:
412
+
413
+ The above copyright notice and this permission notice shall be included in all
414
+ copies or substantial portions of the Software.
415
+
416
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
417
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
418
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
419
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
420
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
421
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
422
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,30 @@
1
- # Temporary Holding Version
1
+ # @swf2es/runtime
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The language runtimes of [swf2es](https://github.com/swf2es/swf2es), which
4
+ the modules `@swf2es/codegen` compiles call into: AS3's (`avm2`, also
5
+ `@swf2es/runtime/avm2`) and AS1/2's (`avm1`, also `@swf2es/runtime/avm1`).
6
+ It holds the language alone, with no display list and no DOM or node
7
+ APIs, so it runs in browsers, workers and node. The player
8
+ ([`@swf2es/player`](https://www.npmjs.com/package/@swf2es/player)) and the
9
+ `swf2es` command ([`@swf2es/cli`](https://www.npmjs.com/package/@swf2es/cli))
10
+ use it; most pages want
11
+ [`@swf2es/web`](https://www.npmjs.com/package/@swf2es/web).
12
+
13
+ ```sh
14
+ npm install @swf2es/runtime
15
+ ```
16
+
17
+ ```js
18
+ import { builtinLibrary, createRuntime } from "@swf2es/runtime/avm2";
19
+
20
+ // avmplus' builtin.abc, which every AS3 runtime loads first.
21
+ console.log(builtinLibrary.length);
22
+ const runtime = createRuntime();
23
+ ```
24
+
25
+ `runShell` in `@swf2es/cli` shows the runtime and the compiler together,
26
+ running ABCs as avmshell does.
27
+
28
+ Apache-2.0 ([LICENSE](LICENSE)); builtin.abc and the files translated
29
+ from avmplus are under the MPL-2.0, and parts are from Ruffle: see
30
+ [LICENSE.third-party](LICENSE.third-party).