tiny-essentials 1.28.19 → 1.29.0

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 (555) hide show
  1. package/README.md +1 -1
  2. package/changelog/1/28/19.md +24 -0
  3. package/changelog/1/29/0.md +58 -0
  4. package/dist/v1/ColorSafeStringify.min.js +1 -1
  5. package/dist/v1/TinyAdvancedRaffle.min.js +1 -1
  6. package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
  7. package/dist/v1/TinyAnalogClock.min.js +1 -1
  8. package/dist/v1/TinyArrayComparator.min.js +1 -1
  9. package/dist/v1/TinyArrayPaginator.min.js +1 -1
  10. package/dist/v1/TinyBasicsEs.min.js +1 -1
  11. package/dist/v1/TinyBrowserMonitor.min.js +1 -0
  12. package/dist/v1/TinyClassManager.min.js +1 -1
  13. package/dist/v1/TinyClipboard.min.js +1 -1
  14. package/dist/v1/TinyCloner.min.js +1 -0
  15. package/dist/v1/TinyColorConverter.min.js +1 -1
  16. package/dist/v1/TinyColorValidator.min.js +1 -1
  17. package/dist/v1/TinyCookieConsent.min.js +1 -1
  18. package/dist/v1/TinyDayNightCycle.min.js +1 -1
  19. package/dist/v1/TinyDebugger.min.js +1 -1
  20. package/dist/v1/TinyDomReadyManager.min.js +1 -1
  21. package/dist/v1/TinyDragDropDetector.min.js +1 -1
  22. package/dist/v1/TinyDragger.min.js +1 -1
  23. package/dist/v1/TinyElementObserver.min.js +1 -1
  24. package/dist/v1/TinyEssentials.min.js +1 -1
  25. package/dist/v1/TinyGamepad.min.js +1 -1
  26. package/dist/v1/TinyHtml.min.js +1 -1
  27. package/dist/v1/TinyHtmlTagRegexBuilder.min.js +1 -0
  28. package/dist/v1/TinyHttpResponseRegistry.min.js +1 -0
  29. package/dist/v1/TinyI18.min.js +1 -1
  30. package/dist/v1/TinyIframeEvents.min.js +1 -1
  31. package/dist/v1/TinyInventory.min.js +1 -1
  32. package/dist/v1/TinyInventoryTrader.min.js +1 -1
  33. package/dist/v1/TinyLevelUp.min.js +1 -1
  34. package/dist/v1/TinyLoadingScreen.min.js +1 -1
  35. package/dist/v1/TinyLocalStorage.min.js +1 -1
  36. package/dist/v1/TinyMaInSys.min.js +1 -1
  37. package/dist/v1/TinyMapCache.min.js +1 -0
  38. package/dist/v1/TinyMediaPlayer.min.js +1 -1
  39. package/dist/v1/TinyNeedBar.min.js +1 -1
  40. package/dist/v1/TinyNewWinEvents.min.js +1 -1
  41. package/dist/v1/TinyNotificationAdapter.min.js +1 -0
  42. package/dist/v1/TinyNotifications.min.js +1 -1
  43. package/dist/v1/TinyNotifyCenter.min.js +1 -1
  44. package/dist/v1/TinyOPFSFileSystem.min.js +1 -0
  45. package/dist/v1/TinyPasswordValidator.min.js +1 -0
  46. package/dist/v1/TinyPluginPackage.min.js +1 -0
  47. package/dist/v1/TinyPromiseQueue.min.js +1 -1
  48. package/dist/v1/TinyPushManager.min.js +1 -0
  49. package/dist/v1/TinyPushPayload.min.js +1 -0
  50. package/dist/v1/TinyPushRouter.min.js +1 -0
  51. package/dist/v1/TinyRadioFm.min.js +1 -1
  52. package/dist/v1/TinyRateLimiter.min.js +1 -1
  53. package/dist/v1/TinyRegexEs.min.js +1 -0
  54. package/dist/v1/TinyRouter.min.js +1 -0
  55. package/dist/v1/TinyServiceWorker.min.js +1 -0
  56. package/dist/v1/TinyServiceWorkerEngine.min.js +1 -0
  57. package/dist/v1/TinySetMapPackage.min.js +1 -0
  58. package/dist/v1/TinySimpleDice.min.js +1 -1
  59. package/dist/v1/TinySmartScroller.min.js +1 -1
  60. package/dist/v1/TinyStorageBucketFileSystem.min.js +1 -0
  61. package/dist/v1/TinyTextDiffer.min.js +1 -1
  62. package/dist/v1/TinyTextRangeEditor.min.js +1 -1
  63. package/dist/v1/TinyTextarea.min.js +1 -1
  64. package/dist/v1/TinyThrottledApi.min.js +1 -0
  65. package/dist/v1/TinyTimeout.min.js +1 -1
  66. package/dist/v1/TinyToastNotify.min.js +1 -1
  67. package/dist/v1/TinyUploadClicker.min.js +1 -1
  68. package/dist/v1/TinyUriParser.min.js +1 -0
  69. package/dist/v1/TinyVersion.min.js +1 -0
  70. package/dist/v1/TinyWebWorker.min.js +1 -0
  71. package/dist/v1/TinyWebWorkerEngine.min.js +1 -0
  72. package/dist/v1/UltraRandomMsgGen.min.js +1 -1
  73. package/dist/v1/basics/array.cjs +2 -2
  74. package/dist/v1/basics/array.d.mts +2 -0
  75. package/dist/v1/basics/array.d.mts.map +1 -1
  76. package/dist/v1/basics/array.mjs +2 -1
  77. package/dist/v1/basics/browserDetector.cjs +37 -12
  78. package/dist/v1/basics/browserDetector.d.mts +8 -0
  79. package/dist/v1/basics/browserDetector.d.mts.map +1 -1
  80. package/dist/v1/basics/browserDetector.mjs +32 -13
  81. package/dist/v1/basics/crypto.cjs +23 -0
  82. package/dist/v1/basics/crypto.d.mts +10 -0
  83. package/dist/v1/basics/crypto.d.mts.map +1 -0
  84. package/dist/v1/basics/crypto.mjs +18 -0
  85. package/dist/v1/basics/html.cjs +0 -3
  86. package/dist/v1/basics/html.d.mts.map +1 -1
  87. package/dist/v1/basics/html.mjs +0 -2
  88. package/dist/v1/basics/index.cjs +8 -1
  89. package/dist/v1/basics/index.d.mts +6 -5
  90. package/dist/v1/basics/index.d.mts.map +1 -1
  91. package/dist/v1/basics/index.mjs +6 -5
  92. package/dist/v1/basics/objChecker.cjs +88 -0
  93. package/dist/v1/basics/objChecker.d.mts +26 -0
  94. package/dist/v1/basics/objChecker.d.mts.map +1 -1
  95. package/dist/v1/basics/objChecker.mjs +74 -0
  96. package/dist/v1/basics/objFilter.cjs +234 -93
  97. package/dist/v1/basics/objFilter.d.mts +96 -22
  98. package/dist/v1/basics/objFilter.d.mts.map +1 -1
  99. package/dist/v1/basics/objFilter.mjs +216 -92
  100. package/dist/v1/basics/promiseUtils.cjs +48 -12
  101. package/dist/v1/basics/promiseUtils.d.mts +45 -12
  102. package/dist/v1/basics/promiseUtils.d.mts.map +1 -1
  103. package/dist/v1/basics/promiseUtils.mjs +47 -12
  104. package/dist/v1/basics/text.cjs +0 -12
  105. package/dist/v1/basics/text.d.mts +0 -10
  106. package/dist/v1/basics/text.d.mts.map +1 -1
  107. package/dist/v1/basics/text.mjs +0 -10
  108. package/dist/v1/index.cjs +88 -3
  109. package/dist/v1/index.d.mts +31 -6
  110. package/dist/v1/index.d.mts.map +1 -1
  111. package/dist/v1/index.mjs +32 -7
  112. package/dist/v1/jsdoc/EventEmitter.cjs +4 -0
  113. package/dist/v1/jsdoc/EventEmitter.d.mts +33 -0
  114. package/dist/v1/jsdoc/EventEmitter.d.mts.map +1 -0
  115. package/dist/v1/jsdoc/EventEmitter.mjs +18 -0
  116. package/dist/v1/libs/array/TinyArrayComparator.cjs +240 -25
  117. package/dist/v1/libs/array/TinyArrayComparator.d.mts +130 -22
  118. package/dist/v1/libs/array/TinyArrayComparator.d.mts.map +1 -1
  119. package/dist/v1/libs/array/TinyArrayComparator.mjs +210 -24
  120. package/dist/v1/libs/fs/constants.cjs +74 -0
  121. package/dist/v1/libs/fs/constants.d.mts +22 -0
  122. package/dist/v1/libs/fs/constants.d.mts.map +1 -0
  123. package/dist/v1/libs/fs/constants.mjs +53 -0
  124. package/dist/v1/libs/fs/encoding.cjs +118 -0
  125. package/dist/v1/libs/fs/encoding.d.mts +50 -0
  126. package/dist/v1/libs/fs/encoding.d.mts.map +1 -0
  127. package/dist/v1/libs/fs/encoding.mjs +102 -0
  128. package/dist/v1/libs/fs/error.cjs +188 -0
  129. package/dist/v1/libs/fs/error.d.mts +105 -0
  130. package/dist/v1/libs/fs/error.d.mts.map +1 -0
  131. package/dist/v1/libs/fs/error.mjs +158 -0
  132. package/dist/v1/libs/fs/handle.cjs +121 -0
  133. package/dist/v1/libs/fs/handle.d.mts +56 -0
  134. package/dist/v1/libs/fs/handle.d.mts.map +1 -0
  135. package/dist/v1/libs/fs/handle.mjs +100 -0
  136. package/dist/v1/libs/fs/index.cjs +700 -0
  137. package/dist/v1/libs/fs/index.d.mts +377 -0
  138. package/dist/v1/libs/fs/index.d.mts.map +1 -0
  139. package/dist/v1/libs/fs/index.mjs +630 -0
  140. package/dist/v1/libs/fs/path.cjs +234 -0
  141. package/dist/v1/libs/fs/path.d.mts +176 -0
  142. package/dist/v1/libs/fs/path.d.mts.map +1 -0
  143. package/dist/v1/libs/fs/path.mjs +197 -0
  144. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.cjs +202 -0
  145. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts +121 -0
  146. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts.map +1 -0
  147. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.mjs +172 -0
  148. package/dist/v1/libs/fs/plugins/OPFS/index.cjs +334 -0
  149. package/dist/v1/libs/fs/plugins/OPFS/index.d.mts +98 -0
  150. package/dist/v1/libs/fs/plugins/OPFS/index.d.mts.map +1 -0
  151. package/dist/v1/libs/fs/plugins/OPFS/index.mjs +300 -0
  152. package/dist/v1/libs/fs/stats.cjs +245 -0
  153. package/dist/v1/libs/fs/stats.d.mts +226 -0
  154. package/dist/v1/libs/fs/stats.d.mts.map +1 -0
  155. package/dist/v1/libs/fs/stats.mjs +197 -0
  156. package/dist/v1/libs/html/events/TinyIframeEvents.cjs +10 -1
  157. package/dist/v1/libs/html/events/TinyIframeEvents.d.mts +9 -2
  158. package/dist/v1/libs/html/events/TinyIframeEvents.d.mts.map +1 -1
  159. package/dist/v1/libs/html/events/TinyIframeEvents.mjs +8 -1
  160. package/dist/v1/libs/html/events/TinyNewWinEvents.cjs +14 -3
  161. package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts +21 -5
  162. package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts.map +1 -1
  163. package/dist/v1/libs/html/events/TinyNewWinEvents.mjs +12 -3
  164. package/dist/v1/libs/html/scroll/TinySmartScroller.cjs +13 -1
  165. package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts +29 -2
  166. package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts.map +1 -1
  167. package/dist/v1/libs/html/scroll/TinySmartScroller.mjs +11 -1
  168. package/dist/v1/libs/math/TinyAdvancedRaffle.cjs +13 -1
  169. package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts +32 -2
  170. package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts.map +1 -1
  171. package/dist/v1/libs/math/TinyAdvancedRaffle.mjs +11 -1
  172. package/dist/v1/libs/math/TinyTimeout.cjs +0 -14
  173. package/dist/v1/libs/math/TinyTimeout.d.mts +0 -11
  174. package/dist/v1/libs/math/TinyTimeout.d.mts.map +1 -1
  175. package/dist/v1/libs/math/TinyTimeout.mjs +0 -13
  176. package/dist/v1/libs/media/TinyMediaPlayer/index.cjs +25 -1
  177. package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts +35 -2
  178. package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts.map +1 -1
  179. package/dist/v1/libs/media/TinyMediaPlayer/index.mjs +23 -1
  180. package/dist/v1/libs/media/TinyMediaPlayer.cjs +2 -2
  181. package/dist/v1/libs/media/TinyMediaPlayer.d.mts +2 -2
  182. package/dist/v1/libs/media/TinyMediaPlayer.d.mts.map +1 -1
  183. package/dist/v1/libs/media/TinyMediaPlayer.mjs +2 -2
  184. package/dist/v1/libs/media/TinyRadioFm.cjs +19 -1
  185. package/dist/v1/libs/media/TinyRadioFm.d.mts +78 -2
  186. package/dist/v1/libs/media/TinyRadioFm.d.mts.map +1 -1
  187. package/dist/v1/libs/media/TinyRadioFm.mjs +17 -1
  188. package/dist/v1/libs/plugin/TinyPlugin.cjs +1630 -0
  189. package/dist/v1/libs/plugin/TinyPlugin.d.mts +753 -0
  190. package/dist/v1/libs/plugin/TinyPlugin.d.mts.map +1 -0
  191. package/dist/v1/libs/plugin/TinyPlugin.mjs +1376 -0
  192. package/dist/v1/libs/plugin/TinyVersion.cjs +204 -0
  193. package/dist/v1/libs/plugin/TinyVersion.d.mts +70 -0
  194. package/dist/v1/libs/plugin/TinyVersion.d.mts.map +1 -0
  195. package/dist/v1/libs/plugin/TinyVersion.mjs +179 -0
  196. package/dist/v1/libs/router/TinyRouter.cjs +661 -0
  197. package/dist/v1/libs/router/TinyRouter.d.mts +320 -0
  198. package/dist/v1/libs/router/TinyRouter.d.mts.map +1 -0
  199. package/dist/v1/libs/router/TinyRouter.mjs +572 -0
  200. package/dist/v1/libs/storage/TinyLocalStorage.cjs +20 -1
  201. package/dist/v1/libs/storage/TinyLocalStorage.d.mts +64 -2
  202. package/dist/v1/libs/storage/TinyLocalStorage.d.mts.map +1 -1
  203. package/dist/v1/libs/storage/TinyLocalStorage.mjs +18 -1
  204. package/dist/v1/libs/storage/TinyMapCache.cjs +373 -0
  205. package/dist/v1/libs/storage/TinyMapCache.d.mts +274 -0
  206. package/dist/v1/libs/storage/TinyMapCache.d.mts.map +1 -0
  207. package/dist/v1/libs/storage/TinyMapCache.mjs +333 -0
  208. package/dist/v1/libs/storage/TinySetMapDatabase.cjs +1167 -0
  209. package/dist/v1/libs/storage/TinySetMapDatabase.d.mts +603 -0
  210. package/dist/v1/libs/storage/TinySetMapDatabase.d.mts.map +1 -0
  211. package/dist/v1/libs/storage/TinySetMapDatabase.mjs +1059 -0
  212. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.cjs +126 -0
  213. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts +132 -0
  214. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts.map +1 -0
  215. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.mjs +109 -0
  216. package/dist/v1/libs/sw/browser/TinyPushManager.cjs +310 -0
  217. package/dist/v1/libs/sw/browser/TinyPushManager.d.mts +168 -0
  218. package/dist/v1/libs/sw/browser/TinyPushManager.d.mts.map +1 -0
  219. package/dist/v1/libs/sw/browser/TinyPushManager.mjs +264 -0
  220. package/dist/v1/libs/sw/browser/TinyServiceWorker.cjs +1060 -0
  221. package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts +348 -0
  222. package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts.map +1 -0
  223. package/dist/v1/libs/sw/browser/TinyServiceWorker.mjs +933 -0
  224. package/dist/v1/libs/sw/browser/plugins/TabManager.cjs +315 -0
  225. package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts +178 -0
  226. package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts.map +1 -0
  227. package/dist/v1/libs/sw/browser/plugins/TabManager.mjs +274 -0
  228. package/dist/v1/libs/sw/browser/utils.cjs +28 -0
  229. package/dist/v1/libs/sw/browser/utils.d.mts +8 -0
  230. package/dist/v1/libs/sw/browser/utils.d.mts.map +1 -0
  231. package/dist/v1/libs/sw/browser/utils.mjs +21 -0
  232. package/dist/v1/libs/sw/service/TinyPushRouter.cjs +222 -0
  233. package/dist/v1/libs/sw/service/TinyPushRouter.d.mts +138 -0
  234. package/dist/v1/libs/sw/service/TinyPushRouter.d.mts.map +1 -0
  235. package/dist/v1/libs/sw/service/TinyPushRouter.mjs +201 -0
  236. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.cjs +3016 -0
  237. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts +993 -0
  238. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts.map +1 -0
  239. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.mjs +2558 -0
  240. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.cjs +88 -0
  241. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts +32 -0
  242. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts.map +1 -0
  243. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.mjs +69 -0
  244. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.cjs +112 -0
  245. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts +31 -0
  246. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts.map +1 -0
  247. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.mjs +91 -0
  248. package/dist/v1/libs/sw/service/plugins/Ping.cjs +32 -0
  249. package/dist/v1/libs/sw/service/plugins/Ping.d.mts +9 -0
  250. package/dist/v1/libs/sw/service/plugins/Ping.d.mts.map +1 -0
  251. package/dist/v1/libs/sw/service/plugins/Ping.mjs +25 -0
  252. package/dist/v1/libs/sw/service/plugins/TabManager.cjs +457 -0
  253. package/dist/v1/libs/sw/service/plugins/TabManager.d.mts +91 -0
  254. package/dist/v1/libs/sw/service/plugins/TabManager.d.mts.map +1 -0
  255. package/dist/v1/libs/sw/service/plugins/TabManager.mjs +372 -0
  256. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.cjs +180 -0
  257. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts +28 -0
  258. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts.map +1 -0
  259. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.mjs +148 -0
  260. package/dist/v1/libs/sw/service/shared/TinyPushPayload.cjs +199 -0
  261. package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts +80 -0
  262. package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts.map +1 -0
  263. package/dist/v1/libs/sw/service/shared/TinyPushPayload.mjs +174 -0
  264. package/dist/v1/libs/sw/utils.cjs +57 -0
  265. package/dist/v1/libs/sw/utils.d.mts +173 -0
  266. package/dist/v1/libs/sw/utils.d.mts.map +1 -0
  267. package/dist/v1/libs/sw/utils.mjs +50 -0
  268. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.cjs +57 -0
  269. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts +39 -0
  270. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts.map +1 -0
  271. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.mjs +48 -0
  272. package/dist/v1/libs/text/TinyI18/Browser.cjs +64 -0
  273. package/dist/v1/libs/text/TinyI18/Browser.d.mts +47 -0
  274. package/dist/v1/libs/text/TinyI18/Browser.d.mts.map +1 -0
  275. package/dist/v1/libs/text/TinyI18/Browser.mjs +57 -0
  276. package/dist/v1/libs/text/TinyI18/Node.cjs +49 -0
  277. package/dist/v1/libs/text/TinyI18/Node.d.mts +38 -0
  278. package/dist/v1/libs/text/TinyI18/Node.d.mts.map +1 -0
  279. package/dist/v1/libs/text/TinyI18/Node.mjs +43 -0
  280. package/dist/v1/libs/text/TinyI18/browser-utils.cjs +17 -0
  281. package/dist/v1/libs/text/TinyI18/browser-utils.d.mts +8 -0
  282. package/dist/v1/libs/text/TinyI18/browser-utils.d.mts.map +1 -0
  283. package/dist/v1/libs/text/TinyI18/browser-utils.mjs +13 -0
  284. package/dist/v1/libs/text/{TinyI18.cjs → TinyI18/index.cjs} +205 -104
  285. package/dist/v1/libs/text/{TinyI18.d.mts → TinyI18/index.d.mts} +141 -92
  286. package/dist/v1/libs/text/TinyI18/index.d.mts.map +1 -0
  287. package/dist/v1/libs/text/{TinyI18.mjs → TinyI18/index.mjs} +195 -101
  288. package/dist/v1/libs/tools/TinyBrowserMonitor.cjs +1088 -0
  289. package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts +621 -0
  290. package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts.map +1 -0
  291. package/dist/v1/libs/tools/TinyBrowserMonitor.mjs +940 -0
  292. package/dist/v1/libs/tools/TinyDebugger.cjs +180 -19
  293. package/dist/v1/libs/tools/TinyDebugger.d.mts +220 -24
  294. package/dist/v1/libs/tools/TinyDebugger.d.mts.map +1 -1
  295. package/dist/v1/libs/tools/TinyDebugger.mjs +161 -19
  296. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.cjs +256 -0
  297. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts +125 -0
  298. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts.map +1 -0
  299. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.mjs +223 -0
  300. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.cjs +23 -0
  301. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts +17 -0
  302. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts.map +1 -0
  303. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.mjs +19 -0
  304. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.cjs +23 -0
  305. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts +17 -0
  306. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts.map +1 -0
  307. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.mjs +19 -0
  308. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.cjs +390 -0
  309. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts +9 -0
  310. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts.map +1 -0
  311. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.mjs +387 -0
  312. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.cjs +2 -0
  313. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts +27 -0
  314. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts.map +1 -0
  315. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.mjs +12 -0
  316. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/LICENSE +53 -0
  317. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.cjs +405 -0
  318. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts +34 -0
  319. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts.map +1 -0
  320. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.mjs +342 -0
  321. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.cjs +23 -0
  322. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts +17 -0
  323. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts.map +1 -0
  324. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.mjs +19 -0
  325. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.cjs +327 -0
  326. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts +9 -0
  327. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts.map +1 -0
  328. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.mjs +324 -0
  329. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.cjs +268 -0
  330. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts +107 -0
  331. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts.map +1 -0
  332. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.mjs +238 -0
  333. package/dist/v1/libs/tools/TinyPasswordValidator.cjs +491 -0
  334. package/dist/v1/libs/tools/TinyPasswordValidator.d.mts +246 -0
  335. package/dist/v1/libs/tools/TinyPasswordValidator.d.mts.map +1 -0
  336. package/dist/v1/libs/tools/TinyPasswordValidator.mjs +434 -0
  337. package/dist/v1/libs/tools/TinyPkgExportValidator.cjs +48 -0
  338. package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts +14 -0
  339. package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts.map +1 -1
  340. package/dist/v1/libs/tools/TinyPkgExportValidator.mjs +44 -0
  341. package/dist/v1/libs/tools/TinySiteMap.cjs +1029 -0
  342. package/dist/v1/libs/tools/TinySiteMap.d.mts +429 -0
  343. package/dist/v1/libs/tools/TinySiteMap.d.mts.map +1 -0
  344. package/dist/v1/libs/tools/TinySiteMap.mjs +910 -0
  345. package/dist/v1/libs/tools/TinySiteMapStream.cjs +121 -0
  346. package/dist/v1/libs/tools/TinySiteMapStream.d.mts +51 -0
  347. package/dist/v1/libs/tools/TinySiteMapStream.d.mts.map +1 -0
  348. package/dist/v1/libs/tools/TinySiteMapStream.mjs +85 -0
  349. package/dist/v1/libs/tools/TinyURLSecurityVerifier.cjs +444 -0
  350. package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts +217 -0
  351. package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts.map +1 -0
  352. package/dist/v1/libs/tools/TinyURLSecurityVerifier.mjs +394 -0
  353. package/dist/v1/libs/tools/TinyUriParser/BlueSky.cjs +613 -0
  354. package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts +152 -0
  355. package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts.map +1 -0
  356. package/dist/v1/libs/tools/TinyUriParser/BlueSky.mjs +527 -0
  357. package/dist/v1/libs/tools/TinyUriParser/Discord.cjs +1119 -0
  358. package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts +306 -0
  359. package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts.map +1 -0
  360. package/dist/v1/libs/tools/TinyUriParser/Discord.mjs +968 -0
  361. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.cjs +469 -0
  362. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts +80 -0
  363. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts.map +1 -0
  364. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.mjs +379 -0
  365. package/dist/v1/libs/tools/TinyUriParser.cjs +217 -0
  366. package/dist/v1/libs/tools/TinyUriParser.d.mts +109 -0
  367. package/dist/v1/libs/tools/TinyUriParser.d.mts.map +1 -0
  368. package/dist/v1/libs/tools/TinyUriParser.mjs +183 -0
  369. package/dist/v1/libs/utils/TinyCloner.cjs +466 -0
  370. package/dist/v1/libs/utils/TinyCloner.d.mts +221 -0
  371. package/dist/v1/libs/utils/TinyCloner.d.mts.map +1 -0
  372. package/dist/v1/libs/utils/TinyCloner.mjs +416 -0
  373. package/dist/v1/libs/utils/TinyPromiseQueue.cjs +1 -1
  374. package/dist/v1/libs/utils/TinyPromiseQueue.d.mts +2 -2
  375. package/dist/v1/libs/utils/TinyPromiseQueue.d.mts.map +1 -1
  376. package/dist/v1/libs/utils/TinyPromiseQueue.mjs +1 -1
  377. package/dist/v1/libs/utils/TinyThrottledApi.cjs +333 -0
  378. package/dist/v1/libs/utils/TinyThrottledApi.d.mts +163 -0
  379. package/dist/v1/libs/utils/TinyThrottledApi.d.mts.map +1 -0
  380. package/dist/v1/libs/utils/TinyThrottledApi.mjs +294 -0
  381. package/dist/v1/libs/worker/browser/TinyWebWorker.cjs +342 -0
  382. package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts +97 -0
  383. package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts.map +1 -0
  384. package/dist/v1/libs/worker/browser/TinyWebWorker.mjs +305 -0
  385. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.cjs +346 -0
  386. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts +127 -0
  387. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts.map +1 -0
  388. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.mjs +304 -0
  389. package/dist/v1/regexp/Email.cjs +185 -0
  390. package/dist/v1/regexp/Email.d.mts +73 -0
  391. package/dist/v1/regexp/Email.d.mts.map +1 -0
  392. package/dist/v1/regexp/Email.mjs +153 -0
  393. package/dist/v1/regexp/Glob.cjs +293 -0
  394. package/dist/v1/regexp/Glob.d.mts +45 -0
  395. package/dist/v1/regexp/Glob.d.mts.map +1 -0
  396. package/dist/v1/regexp/Glob.mjs +260 -0
  397. package/dist/v1/regexp/Ipv4.cjs +57 -0
  398. package/dist/v1/regexp/Ipv4.d.mts +29 -0
  399. package/dist/v1/regexp/Ipv4.d.mts.map +1 -0
  400. package/dist/v1/regexp/Ipv4.mjs +45 -0
  401. package/dist/v1/regexp/Ipv6.cjs +67 -0
  402. package/dist/v1/regexp/Ipv6.d.mts +29 -0
  403. package/dist/v1/regexp/Ipv6.d.mts.map +1 -0
  404. package/dist/v1/regexp/Ipv6.mjs +54 -0
  405. package/dist/v1/regexp/SegmentExtractor.cjs +145 -0
  406. package/dist/v1/regexp/SegmentExtractor.d.mts +91 -0
  407. package/dist/v1/regexp/SegmentExtractor.d.mts.map +1 -0
  408. package/dist/v1/regexp/SegmentExtractor.mjs +116 -0
  409. package/dist/v1/regexp/UrlDetector.cjs +125 -0
  410. package/dist/v1/regexp/UrlDetector.d.mts +67 -0
  411. package/dist/v1/regexp/UrlDetector.d.mts.map +1 -0
  412. package/dist/v1/regexp/UrlDetector.mjs +102 -0
  413. package/dist/v1/regexp/Username/index.cjs +233 -0
  414. package/dist/v1/regexp/Username/index.d.mts +77 -0
  415. package/dist/v1/regexp/Username/index.d.mts.map +1 -0
  416. package/dist/v1/regexp/Username/index.mjs +199 -0
  417. package/dist/v1/regexp/Username/jsDoc.cjs +2 -0
  418. package/dist/v1/regexp/Username/jsDoc.d.mts +57 -0
  419. package/dist/v1/regexp/Username/jsDoc.d.mts.map +1 -0
  420. package/dist/v1/regexp/Username/jsDoc.mjs +18 -0
  421. package/dist/v1/regexp/Username/templates/BlueSky.cjs +56 -0
  422. package/dist/v1/regexp/Username/templates/BlueSky.d.mts +35 -0
  423. package/dist/v1/regexp/Username/templates/BlueSky.d.mts.map +1 -0
  424. package/dist/v1/regexp/Username/templates/BlueSky.mjs +52 -0
  425. package/dist/v1/regexp/Username/templates/Discord.cjs +505 -0
  426. package/dist/v1/regexp/Username/templates/Discord.d.mts +209 -0
  427. package/dist/v1/regexp/Username/templates/Discord.d.mts.map +1 -0
  428. package/dist/v1/regexp/Username/templates/Discord.mjs +458 -0
  429. package/dist/v1/regexp/Username/templates/MatrixProtocol.cjs +143 -0
  430. package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts +70 -0
  431. package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts.map +1 -0
  432. package/dist/v1/regexp/Username/templates/MatrixProtocol.mjs +128 -0
  433. package/dist/v1/regexp/Username/templates/deprecated/Discord.cjs +24 -0
  434. package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts +17 -0
  435. package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts.map +1 -0
  436. package/dist/v1/regexp/Username/templates/deprecated/Discord.mjs +20 -0
  437. package/dist/v1/regexp/Username/templates/index.cjs +11 -0
  438. package/dist/v1/regexp/Username/templates/index.d.mts +5 -0
  439. package/dist/v1/regexp/Username/templates/index.d.mts.map +1 -0
  440. package/dist/v1/regexp/Username/templates/index.mjs +4 -0
  441. package/dist/v1/regexp/index.cjs +41 -0
  442. package/dist/v1/regexp/index.d.mts +9 -0
  443. package/dist/v1/regexp/index.d.mts.map +1 -0
  444. package/dist/v1/regexp/index.mjs +8 -0
  445. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.cjs +64 -0
  446. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts +11 -0
  447. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts.map +1 -0
  448. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.mjs +51 -0
  449. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.cjs +66 -0
  450. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts +11 -0
  451. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts.map +1 -0
  452. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.mjs +51 -0
  453. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.cjs +39 -0
  454. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts +11 -0
  455. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts.map +1 -0
  456. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.mjs +28 -0
  457. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.cjs +494 -0
  458. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts +142 -0
  459. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts.map +1 -0
  460. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.mjs +445 -0
  461. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.cjs +30 -4
  462. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts +5 -2
  463. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts.map +1 -1
  464. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.mjs +29 -5
  465. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.cjs +135 -0
  466. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts +83 -0
  467. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts.map +1 -0
  468. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.mjs +120 -0
  469. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.cjs +127 -0
  470. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts +95 -0
  471. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts.map +1 -0
  472. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.mjs +109 -0
  473. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.cjs +83 -0
  474. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts +46 -0
  475. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts.map +1 -0
  476. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.mjs +71 -0
  477. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.cjs +493 -0
  478. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts +67 -0
  479. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts.map +1 -0
  480. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.mjs +399 -0
  481. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.cjs +35 -0
  482. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts +6 -0
  483. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts.map +1 -0
  484. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.mjs +29 -0
  485. package/docs/info/RegExp.md +74 -0
  486. package/docs/v1/Exports.md +101 -0
  487. package/docs/v1/README.md +113 -15
  488. package/docs/v1/basics/asyncReplace.md +2 -0
  489. package/docs/v1/basics/browserDetector.md +28 -11
  490. package/docs/v1/basics/crypto.md +85 -0
  491. package/docs/v1/basics/deprecated/html.md +2 -0
  492. package/docs/v1/basics/deprecated/objFilter.md +2 -0
  493. package/docs/v1/basics/html.md +2 -0
  494. package/docs/v1/basics/objChecker.md +55 -0
  495. package/docs/v1/basics/objFilter.md +57 -86
  496. package/docs/v1/basics/promiseUtils.md +12 -3
  497. package/docs/v1/basics/text.md +0 -1
  498. package/docs/v1/libs/array/TinyArrayComparator.md +50 -39
  499. package/docs/v1/libs/fs/TinyFS.md +752 -0
  500. package/docs/v1/libs/fs/TinyOPFSFileSystem.md +495 -0
  501. package/docs/v1/libs/fs/TinyStorageBucketFileSystem.md +407 -0
  502. package/docs/v1/libs/plugin/TinyPlugin.md +441 -0
  503. package/docs/v1/libs/plugin/TinyVersion.md +145 -0
  504. package/docs/v1/libs/router/TinyRouter.md +216 -0
  505. package/docs/v1/libs/storage/TinyMapCache.md +219 -0
  506. package/docs/v1/libs/storage/TinySetMapDatabase.md +478 -0
  507. package/docs/v1/libs/sw/browser/TinyNotificationAdapter.md +280 -0
  508. package/docs/v1/libs/sw/browser/TinyPushManager.md +782 -0
  509. package/docs/v1/libs/sw/browser/TinyServiceWorker.md +365 -0
  510. package/docs/v1/libs/sw/browser/plugins/TabManager.md +133 -0
  511. package/docs/v1/libs/sw/service/TinyPushRouter.md +314 -0
  512. package/docs/v1/libs/sw/service/TinyServiceWorkerEngine.md +748 -0
  513. package/docs/v1/libs/sw/service/plugins/GlobBypassPlugin.md +229 -0
  514. package/docs/v1/libs/sw/service/plugins/GlobCachePlugin.md +91 -0
  515. package/docs/v1/libs/sw/service/plugins/Ping.md +36 -0
  516. package/docs/v1/libs/sw/service/plugins/TabManager.md +64 -0
  517. package/docs/v1/libs/sw/service/plugins/ViteFileDetector.md +92 -0
  518. package/docs/v1/libs/sw/service/shared/TinyPushPayload.md +316 -0
  519. package/docs/v1/libs/text/TinyI18.md +80 -56
  520. package/docs/v1/libs/tools/TinyBrowserMonitor.md +170 -0
  521. package/docs/v1/libs/tools/TinyDebugger.md +117 -1
  522. package/docs/v1/libs/tools/TinyHtmlTagRegexBuilder.md +141 -0
  523. package/docs/v1/libs/tools/TinyHttpResponseRegistry.md +129 -0
  524. package/docs/v1/libs/tools/TinyPasswordValidator.md +153 -0
  525. package/docs/v1/libs/tools/TinyPkgExportValidator.md +45 -1
  526. package/docs/v1/libs/tools/TinySiteMap.md +134 -0
  527. package/docs/v1/libs/tools/TinySiteMapStream.md +97 -0
  528. package/docs/v1/libs/tools/TinyURLSecurityVerifier.md +146 -0
  529. package/docs/v1/libs/tools/TinyUriParser/Discord.md +374 -0
  530. package/docs/v1/libs/tools/TinyUriParser/MatrixProtocol.md +54 -0
  531. package/docs/v1/libs/tools/TinyUriParser.md +128 -0
  532. package/docs/v1/libs/utils/TinyCloner.md +126 -0
  533. package/docs/v1/libs/utils/TinyPromiseQueue.md +1 -1
  534. package/docs/v1/libs/utils/TinyThrottledApi.md +219 -0
  535. package/docs/v1/libs/worker/browser/TinyWebWorker.md +331 -0
  536. package/docs/v1/libs/worker/engine/TinyWebWorkerEngine.md +137 -0
  537. package/docs/v1/regexp/Email.md +127 -0
  538. package/docs/v1/regexp/Glob.md +155 -0
  539. package/docs/v1/regexp/IPv4.md +103 -0
  540. package/docs/v1/regexp/IPv6.md +122 -0
  541. package/docs/v1/regexp/SegmentExtractor.md +120 -0
  542. package/docs/v1/regexp/UrlDetector.md +117 -0
  543. package/docs/v1/regexp/Username/Base.md +131 -0
  544. package/docs/v1/regexp/Username/Discord.md +267 -0
  545. package/docs/v1/regexp/Username/MatrixProtocol.md +131 -0
  546. package/docs/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters.md +569 -0
  547. package/docs/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.md +19 -7
  548. package/docs/v1/webTemplates/media/MediaValidator/v1/Browser.md +123 -0
  549. package/docs/v1/webTemplates/media/MediaValidator/v1/Node.md +136 -0
  550. package/docs/v1/webTemplates/multiformats/14.0/IPFSHasher.md +310 -0
  551. package/docs/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.md +131 -0
  552. package/docs/v1/webTemplates/vite/7.3/plugins/githubUtils.md +50 -0
  553. package/package.json +303 -13
  554. package/types/EventEmitter.d.ts +48 -0
  555. package/dist/v1/libs/text/TinyI18.d.mts.map +0 -1
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,r)=>{if(Array.isArray(r))for(var s=0;s<r.length;){var n=r[s++],i=r[s++];e.o(t,n)?0===i&&s++:0===i?Object.defineProperty(t,n,{enumerable:!0,value:r[s++]}):Object.defineProperty(t,n,{enumerable:!0,get:i})}else for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyTextRangeEditor:()=>r});const r=class{#e;#t;#r;constructor(e,{openTag:t="[",closeTag:r="]"}={}){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new TypeError("Element must be an input or textarea.");if("string"!=typeof t)throw new TypeError("openTag must be a string.");if("string"!=typeof r)throw new TypeError("closeTag must be a string.");this.#e=e,this.#t=t,this.#r=r}getOpenTag(){return this.#t}getCloseTag(){return this.#r}setOpenTag(e){if("string"!=typeof e)throw new TypeError("Open tag must be a string.");this.#t=e}setCloseTag(e){if("string"!=typeof e)throw new TypeError("Close tag must be a string.");this.#r=e}ensureFocus(){return document.activeElement!==this.#e&&this.#e.focus(),this}focus(){return this.#e.focus(),this}getSelectionRange(){return{start:this.#e.selectionStart??NaN,end:this.#e.selectionEnd??NaN}}setSelectionRange(e,t,r=!0){if("number"!=typeof e||"number"!=typeof t)throw new TypeError("start and end must be numbers.");if("boolean"!=typeof r)throw new TypeError("preserveScroll must be a boolean.");const s=this.#e.scrollTop,n=this.#e.scrollLeft;return this.#e.setSelectionRange(e,t),r&&(this.#e.scrollTop=s,this.#e.scrollLeft=n),this}getValue(){return this.#e.value}setValue(e){if("string"!=typeof e)throw new TypeError("Value must be a string.");return this.#e.value=e,this}getSelectedText(){const{start:e,end:t}=this.getSelectionRange();return this.#e.value.slice(e,t)}insertText(e,{newCursor:t="end",autoSpacing:r=!1,autoSpaceLeft:s=r,autoSpaceRight:n=r}={}){if("string"!=typeof e)throw new TypeError("Text must be a string.");if(!["start","end","preserve"].includes(t))throw new TypeError("newCursor must be one of 'start', 'end', or 'preserve'.");if("boolean"!=typeof r)throw new TypeError("autoSpacing must be a boolean.");if("boolean"!=typeof s)throw new TypeError("autoSpaceLeft must be a boolean.");if("boolean"!=typeof n)throw new TypeError("autoSpaceRight must be a boolean.");const{start:i,end:o}=this.getSelectionRange(),a=this.#e.value,l=a[i-1]||"",h=a[o]||"",g=`${s&&l&&!/\s/.test(l)?" ":""}${e}${n&&h&&!/\s/.test(h)?" ":""}`,c=a.slice(0,i)+g+a.slice(o);this.setValue(c);let p=i;return"end"===t?p=i+g.length:"preserve"===t&&(p=i),this.setSelectionRange(p,p),this}deleteSelection(){return this.insertText(""),this}transformSelection(e){if("function"!=typeof e)throw new TypeError("transformer must be a function.");const{start:t}=this.getSelectionRange(),r=e(this.getSelectedText());return this.insertText(r),this.setSelectionRange(t,t+r.length),this}surroundSelection(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("prefix and suffix must be strings.");const r=this.getSelectedText();return this.insertText(`${e}${r}${t}`),this}moveCaret(e){if("number"!=typeof e)throw new TypeError("offset must be a number.");const{start:t}=this.getSelectionRange(),r=Math.max(0,t+e);return this.setSelectionRange(r,r),this}selectAll(){return this.setSelectionRange(0,this.#e.value.length),this}expandSelection(e,t){if("number"!=typeof e||"number"!=typeof t)throw new TypeError("before and after must be numbers.");const{start:r,end:s}=this.getSelectionRange(),n=Math.max(0,r-e),i=Math.min(this.#e.value.length,s+t);return this.setSelectionRange(n,i),this}replaceAll(e,t){if(!(e instanceof RegExp))throw new TypeError("regex must be a RegExp.");if("function"!=typeof t)throw new TypeError("replacer must be a function.");const r=this.#e.value.replace(e,t);return this.setValue(r),this}replaceInSelection(e,t){if(!(e instanceof RegExp))throw new TypeError("regex must be a RegExp.");if("function"!=typeof t)throw new TypeError("replacer must be a function.");const{start:r,end:s}=this.getSelectionRange(),n=this.#e.value,i=n.slice(r,s).replace(e,t),o=n.slice(0,r)+i+n.slice(s);return this.setValue(o),this.setSelectionRange(r,r+i.length),this}toggleCode(e){if("string"!=typeof e)throw new TypeError("codeName must be a string.");const t=this.getSelectedText();if(t.startsWith(e)&&t.endsWith(e)){const r=t.slice(e.length,t.length-e.length);this.insertText(r)}else this.insertText(`${e}${t}${e}`);return this}_insertAttr(e){let t="";if(Array.isArray(e)){if(!e.every(e=>"string"==typeof e))throw new TypeError("All entries in attributes array must be strings.");t=e.map(e=>`${e}`).join(" ")}else{if("object"!=typeof e||null===e)throw new TypeError("attributes must be an object or an array of strings.");t=Object.entries(e).map(([e,t])=>{if("string"!=typeof t)throw new TypeError("All entries in attributes object must be strings.");return`${e}${t.length>0?`="${t}"`:""}`}).join(" ")}return t}wrapWithTag(e,t={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");const r=this._insertAttr(t),s=r?`${this.#t}${e} ${r}${this.#r}`:`${this.#t}${e}${this.#r}`,n=`${this.#t}/${e}${this.#r}`;return this.surroundSelection(s,n),this}insertTag(e,t="",r={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");if("string"!=typeof t)throw new TypeError("content must be a string.");const s=this._insertAttr(r),n=s?`${this.#t}${e} ${s}${this.#r}`:`${this.#t}${e}${this.#r}`,i=`${this.#t}/${e}${this.#r}`;return this.insertText(`${n}${t}${i}`),this}insertSelfClosingTag(e,t={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");const r=this._insertAttr(t),s=r?`${this.#t}${e} ${r}${this.#r}`:`${this.#t}${e}${this.#r}`;return this.insertText(s),this}toggleTag(e,t={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");const r=this.getSelectedText(),s=new RegExp(`^\\[${e}(\\s+[^\\]]*)?\\]`),n=new RegExp(`\\[/${e}\\]$`),i=s.test(r),o=n.test(r);if(i&&o){const e=r.replace(s,"").replace(n,"");this.insertText(e)}else{const s=this._insertAttr(t),n=s?`${this.#t}${e} ${s}${this.#r}`:`${this.#t}${e}${this.#r}`,i=`${this.#t}/${e}${this.#r}`;this.insertText(`${n}${r}${i}`)}return this}};window.TinyTextRangeEditor=t.TinyTextRangeEditor})();
1
+ (()=>{"use strict";const e={d:(t,r)=>{for(var s in r)e.o(r,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:r[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyTextRangeEditor:()=>r});const r=class{#e;#t;#r;constructor(e,{openTag:t="[",closeTag:r="]"}={}){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new TypeError("Element must be an input or textarea.");if("string"!=typeof t)throw new TypeError("openTag must be a string.");if("string"!=typeof r)throw new TypeError("closeTag must be a string.");this.#e=e,this.#t=t,this.#r=r}getOpenTag(){return this.#t}getCloseTag(){return this.#r}setOpenTag(e){if("string"!=typeof e)throw new TypeError("Open tag must be a string.");this.#t=e}setCloseTag(e){if("string"!=typeof e)throw new TypeError("Close tag must be a string.");this.#r=e}ensureFocus(){return document.activeElement!==this.#e&&this.#e.focus(),this}focus(){return this.#e.focus(),this}getSelectionRange(){return{start:this.#e.selectionStart??NaN,end:this.#e.selectionEnd??NaN}}setSelectionRange(e,t,r=!0){if("number"!=typeof e||"number"!=typeof t)throw new TypeError("start and end must be numbers.");if("boolean"!=typeof r)throw new TypeError("preserveScroll must be a boolean.");const s=this.#e.scrollTop,n=this.#e.scrollLeft;return this.#e.setSelectionRange(e,t),r&&(this.#e.scrollTop=s,this.#e.scrollLeft=n),this}getValue(){return this.#e.value}setValue(e){if("string"!=typeof e)throw new TypeError("Value must be a string.");return this.#e.value=e,this}getSelectedText(){const{start:e,end:t}=this.getSelectionRange();return this.#e.value.slice(e,t)}insertText(e,{newCursor:t="end",autoSpacing:r=!1,autoSpaceLeft:s=r,autoSpaceRight:n=r}={}){if("string"!=typeof e)throw new TypeError("Text must be a string.");if(!["start","end","preserve"].includes(t))throw new TypeError("newCursor must be one of 'start', 'end', or 'preserve'.");if("boolean"!=typeof r)throw new TypeError("autoSpacing must be a boolean.");if("boolean"!=typeof s)throw new TypeError("autoSpaceLeft must be a boolean.");if("boolean"!=typeof n)throw new TypeError("autoSpaceRight must be a boolean.");const{start:i,end:o}=this.getSelectionRange(),a=this.#e.value,l=a[i-1]||"",h=a[o]||"",g=`${s&&l&&!/\s/.test(l)?" ":""}${e}${n&&h&&!/\s/.test(h)?" ":""}`,c=a.slice(0,i)+g+a.slice(o);this.setValue(c);let p=i;return"end"===t?p=i+g.length:"preserve"===t&&(p=i),this.setSelectionRange(p,p),this}deleteSelection(){return this.insertText(""),this}transformSelection(e){if("function"!=typeof e)throw new TypeError("transformer must be a function.");const{start:t}=this.getSelectionRange(),r=e(this.getSelectedText());return this.insertText(r),this.setSelectionRange(t,t+r.length),this}surroundSelection(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("prefix and suffix must be strings.");const r=this.getSelectedText();return this.insertText(`${e}${r}${t}`),this}moveCaret(e){if("number"!=typeof e)throw new TypeError("offset must be a number.");const{start:t}=this.getSelectionRange(),r=Math.max(0,t+e);return this.setSelectionRange(r,r),this}selectAll(){return this.setSelectionRange(0,this.#e.value.length),this}expandSelection(e,t){if("number"!=typeof e||"number"!=typeof t)throw new TypeError("before and after must be numbers.");const{start:r,end:s}=this.getSelectionRange(),n=Math.max(0,r-e),i=Math.min(this.#e.value.length,s+t);return this.setSelectionRange(n,i),this}replaceAll(e,t){if(!(e instanceof RegExp))throw new TypeError("regex must be a RegExp.");if("function"!=typeof t)throw new TypeError("replacer must be a function.");const r=this.#e.value.replace(e,t);return this.setValue(r),this}replaceInSelection(e,t){if(!(e instanceof RegExp))throw new TypeError("regex must be a RegExp.");if("function"!=typeof t)throw new TypeError("replacer must be a function.");const{start:r,end:s}=this.getSelectionRange(),n=this.#e.value,i=n.slice(r,s).replace(e,t),o=n.slice(0,r)+i+n.slice(s);return this.setValue(o),this.setSelectionRange(r,r+i.length),this}toggleCode(e){if("string"!=typeof e)throw new TypeError("codeName must be a string.");const t=this.getSelectedText();if(t.startsWith(e)&&t.endsWith(e)){const r=t.slice(e.length,t.length-e.length);this.insertText(r)}else this.insertText(`${e}${t}${e}`);return this}_insertAttr(e){let t="";if(Array.isArray(e)){if(!e.every(e=>"string"==typeof e))throw new TypeError("All entries in attributes array must be strings.");t=e.map(e=>`${e}`).join(" ")}else{if("object"!=typeof e||null===e)throw new TypeError("attributes must be an object or an array of strings.");t=Object.entries(e).map(([e,t])=>{if("string"!=typeof t)throw new TypeError("All entries in attributes object must be strings.");return`${e}${t.length>0?`="${t}"`:""}`}).join(" ")}return t}wrapWithTag(e,t={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");const r=this._insertAttr(t),s=r?`${this.#t}${e} ${r}${this.#r}`:`${this.#t}${e}${this.#r}`,n=`${this.#t}/${e}${this.#r}`;return this.surroundSelection(s,n),this}insertTag(e,t="",r={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");if("string"!=typeof t)throw new TypeError("content must be a string.");const s=this._insertAttr(r),n=s?`${this.#t}${e} ${s}${this.#r}`:`${this.#t}${e}${this.#r}`,i=`${this.#t}/${e}${this.#r}`;return this.insertText(`${n}${t}${i}`),this}insertSelfClosingTag(e,t={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");const r=this._insertAttr(t),s=r?`${this.#t}${e} ${r}${this.#r}`:`${this.#t}${e}${this.#r}`;return this.insertText(s),this}toggleTag(e,t={}){if("string"!=typeof e)throw new TypeError("tagName must be a string.");const r=this.getSelectedText(),s=new RegExp(`^\\[${e}(\\s+[^\\]]*)?\\]`),n=new RegExp(`\\[/${e}\\]$`),i=s.test(r),o=n.test(r);if(i&&o){const e=r.replace(s,"").replace(n,"");this.insertText(e)}else{const s=this._insertAttr(t),n=s?`${this.#t}${e} ${s}${this.#r}`:`${this.#t}${e}${this.#r}`,i=`${this.#t}/${e}${this.#r}`;this.insertText(`${n}${r}${i}`)}return this}};window.TinyTextRangeEditor=t.TinyTextRangeEditor})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,i)=>{if(Array.isArray(i))for(var n=0;n<i.length;){var r=i[n++],s=i[n++];e.o(t,r)?0===s&&n++:0===s?Object.defineProperty(t,r,{enumerable:!0,value:i[n++]}):Object.defineProperty(t,r,{enumerable:!0,get:s})}else for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyTextarea:()=>i});const i=class{#e=!1;get destroyed(){return this.#e}#t;#i;#n;#r=0;#s=0;#o;#a=null;#h=null;get lineHeight(){return this.#t}get maxRows(){return this.#i-1}get extraHeight(){return this.#n}get currentHeight(){return this.#r}get currentRows(){return this.#s}get textarea(){return this.#o}constructor(e,t={}){if(!(e instanceof HTMLTextAreaElement))throw new Error("TinyTextarea: Provided element is not a <textarea>.");if("object"!=typeof t||null===t)throw new TypeError("TinyTextarea: Options must be an object if provided.");if("maxRows"in t&&"number"!=typeof t.maxRows)throw new TypeError("TinyTextarea: `maxRows` must be a number.");if("extraHeight"in t&&"number"!=typeof t.extraHeight)throw new TypeError("TinyTextarea: `extraHeight` must be a number.");if("onResize"in t&&"function"!=typeof t.onResize)throw new TypeError("TinyTextarea: `onResize` must be a function.");if("onInput"in t&&"function"!=typeof t.onInput)throw new TypeError("TinyTextarea: `onInput` must be a function.");this.#o=e,this.#i=(t.maxRows??5)+1,this.#n=t.extraHeight??0,this.#a=t.onResize??null,this.#h=t.onInput??null,this.#t=this.#l(),e.style.overflowY="hidden",e.style.resize="none",this._handleInput=()=>this.#u(),e.addEventListener("input",this._handleInput),this.#u()}#u(){this.#o.style.height="auto";const e=window.getComputedStyle(this.#o),t=parseFloat(e.paddingTop)||0,i=parseFloat(e.paddingBottom)||0,n=(this.#o.value.match(/\n/g)||[]).length,r=this.#o.scrollHeight,s=this.#t*this.#i,o=Math.ceil(Math.min(r,s)-t-i+this.#n),a=this.#i-1,h=n<a?n+1:a;this.#o.style.height=`${o}px`,this.#o.style.overflowY=r>s?"auto":"hidden",this.#r=o;const l={breakLines:n,rows:h,height:o,scrollHeight:r,maxHeight:s,lineHeight:this.#t,maxRows:a};h!==this.#s&&(this.#s=h,"function"==typeof this.#a&&this.#a({...l})),"function"==typeof this.#h&&this.#h(l)}#l(){const e=window.getComputedStyle(this.#o),t=parseFloat(e.lineHeight);return Number.isNaN(t)?1.2*parseFloat(e.fontSize):t}getData(){return{rows:this.#s,height:this.#r}}refresh(){this.#u()}destroy(){this.destroyed||(this.#o.removeEventListener("input",this._handleInput),this.#e=!0)}};window.TinyTextarea=t.TinyTextarea})();
1
+ (()=>{"use strict";const t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};let e={};t.d(e,{TinyTextarea:()=>i});const i=class{#t=!1;get destroyed(){return this.#t}#e;#i;#n;#s=0;#r=0;#o;#a=null;#h=null;get lineHeight(){return this.#e}get maxRows(){return this.#i-1}get extraHeight(){return this.#n}get currentHeight(){return this.#s}get currentRows(){return this.#r}get textarea(){return this.#o}constructor(t,e={}){if(!(t instanceof HTMLTextAreaElement))throw new Error("TinyTextarea: Provided element is not a <textarea>.");if("object"!=typeof e||null===e)throw new TypeError("TinyTextarea: Options must be an object if provided.");if("maxRows"in e&&"number"!=typeof e.maxRows)throw new TypeError("TinyTextarea: `maxRows` must be a number.");if("extraHeight"in e&&"number"!=typeof e.extraHeight)throw new TypeError("TinyTextarea: `extraHeight` must be a number.");if("onResize"in e&&"function"!=typeof e.onResize)throw new TypeError("TinyTextarea: `onResize` must be a function.");if("onInput"in e&&"function"!=typeof e.onInput)throw new TypeError("TinyTextarea: `onInput` must be a function.");this.#o=t,this.#i=(e.maxRows??5)+1,this.#n=e.extraHeight??0,this.#a=e.onResize??null,this.#h=e.onInput??null,this.#e=this.#l(),t.style.overflowY="hidden",t.style.resize="none",this._handleInput=()=>this.#u(),t.addEventListener("input",this._handleInput),this.#u()}#u(){this.#o.style.height="auto";const t=window.getComputedStyle(this.#o),e=parseFloat(t.paddingTop)||0,i=parseFloat(t.paddingBottom)||0,n=(this.#o.value.match(/\n/g)||[]).length,s=this.#o.scrollHeight,r=this.#e*this.#i,o=Math.ceil(Math.min(s,r)-e-i+this.#n),a=this.#i-1,h=n<a?n+1:a;this.#o.style.height=`${o}px`,this.#o.style.overflowY=s>r?"auto":"hidden",this.#s=o;const l={breakLines:n,rows:h,height:o,scrollHeight:s,maxHeight:r,lineHeight:this.#e,maxRows:a};h!==this.#r&&(this.#r=h,"function"==typeof this.#a&&this.#a({...l})),"function"==typeof this.#h&&this.#h(l)}#l(){const t=window.getComputedStyle(this.#o),e=parseFloat(t.lineHeight);return Number.isNaN(e)?1.2*parseFloat(t.fontSize):e}getData(){return{rows:this.#r,height:this.#s}}refresh(){this.#u()}destroy(){this.destroyed||(this.#o.removeEventListener("input",this._handleInput),this.#t=!0)}};window.TinyTextarea=e.TinyTextarea})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";const e={cw:e=>{var t;return()=>{if(e){var i=e;e=0,t={exports:{}},i.call(t.exports,t,t.exports)}return t.exports}},d:(t,i)=>{for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyThrottledApi:()=>h});var i=e.cw(function(e,t){var i,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(i,r){function n(i){e.removeListener(t,o),r(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",n),i([].slice.call(arguments))}d(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&d(e,"error",t,{once:!0})}(e,n)})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function h(e,t,i,r){var n,o,s,u;if(a(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),s=o[t]),void 0===s)s=o[t]=i,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[i,s]:[s,i]:r?s.unshift(i):s.push(i),(n=c(e))>0&&s.length>n&&!s.warned){s.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=s.length,u=h,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},n=l.bind(r);return n.listener=i,r.wrapFn=n,n}function m(e,t,i){var r=e._events;if(void 0===r)return[];var n=r[t];return void 0===n?[]:"function"==typeof n?i?[n.listener||n]:[n]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(n):y(n,n.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function y(e,t){for(var i=new Array(t),r=0;r<t;++r)i[r]=e[r];return i}function d(e,t,i,r){if("function"==typeof e.on)r.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function n(o){r.once&&e.removeEventListener(t,n),i(o)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)n(a,this,t);else{var c=a.length,h=y(a,c);for(i=0;i<c;++i)n(h[i],this,t)}return!0},s.prototype.addListener=function(e,t){return h(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return h(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var i,r,n,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(i=r[e]))return this;if(i===t||i.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(n=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){s=i[o].listener,n=o;break}if(n<0)return this;0===n?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,n),1===i.length&&(r[e]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,i,r;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var n,o=Object.keys(i);for(r=0;r<o.length;++r)"removeListener"!==(n=o[r])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}});i();const r=class{#e=[];#t=!1;#i={};#r=new Set;isRunning(){return this.#t}async#n(e){if(e&&"function"==typeof e.task&&"function"==typeof e.resolve&&"function"==typeof e.reject){const{task:t,resolve:i,reject:r,delay:n,id:o}=e;try{if(o&&this.#r.has(o))return r(new Error("The function was canceled on TinyPromiseQueue.")),this.#r.delete(o),this.#t=!1,void this.#o();n&&o&&await new Promise(e=>{const t=setTimeout(()=>{delete this.#i[o],e(null)},n);this.#i[o]=t}),i(await t())}catch(e){r(e)}finally{this.#t=!1,this.#o()}}}async#s(){const e=[];for(;this.#e.length&&"POINT_MARKER"===this.#e[0]?.marker;)e.push(this.#e.shift());if(0===e.length)return this.#t=!1,void this.#o();await Promise.all(e.map(({task:e,resolve:t,reject:i,id:r})=>new Promise(async n=>{if(r&&this.#r.has(r))return this.#r.delete(r),i(new Error("The function was canceled on TinyPromiseQueue.")),void n(!0);await e().then(t).catch(i),n(!0)}))),this.#t=!1,this.#o()}async#o(){if(!this.#t&&0!==this.#e.length)if(this.#t=!0,"string"!=typeof this.#e[0]?.marker||"POINT_MARKER"!==this.#e[0]?.marker){const e=this.#e.shift();this.#n(e)}else this.#s()}getIndexById(e){return this.#e.findIndex(t=>t.id===e)}getQueuedIds(){return this.#e.map((e,t)=>({index:t,id:e.id})).filter(e=>"string"==typeof e.id)}reorderQueue(e,t){if("number"!=typeof e||"number"!=typeof t||e<0||t<0||e>=this.#e.length||t>=this.#e.length)return;const[i]=this.#e.splice(e,1);this.#e.splice(t,0,i)}async enqueuePoint(e,t){if("function"!=typeof e)return Promise.reject(new Error("Task must be a function returning a Promise."));if(void 0!==t&&"string"!=typeof t)throw new Error('The "id" parameter must be a string.');return this.#t?new Promise((i,r)=>{this.#e.push({marker:"POINT_MARKER",task:e,resolve:i,reject:r,id:t}),this.#o()}):e()}enqueue(e,t,i){if("function"!=typeof e)return Promise.reject(new Error("Task must be a function returning a Promise."));if(void 0!==t&&("number"!=typeof t||t<0))return Promise.reject(new Error("Delay must be a positive number or undefined."));if(void 0!==i&&"string"!=typeof i)throw new Error('The "id" parameter must be a string.');return new Promise((r,n)=>{this.#e.push({task:e,resolve:r,reject:n,id:i,delay:t}),this.#o()})}cancelTask(e){if("string"!=typeof e)throw new Error('The "id" parameter must be a string.');let t=!1;e in this.#i&&(clearTimeout(this.#i[e]),delete this.#i[e],t=!0);const i=this.getIndexById(e);if(-1!==i){const[e]=this.#e.splice(i,1);e?.reject?.(new Error("The function was canceled on TinyPromiseQueue.")),t=!0}return t&&this.#r.add(e),t}},n=(e,t=100)=>{if("function"!=typeof e)throw new TypeError("Expected 'getValue' to be a function.");if(!Number.isFinite(t)||t<=0)throw new TypeError("Expected 'checkInterval' to be a positive number.");return new Promise(i=>{const r=setInterval(()=>{e()&&(clearInterval(r),i())},t)})},o=e=>t=>{if(t)throw new Error(`This ${e} instance has been destroyed and can no longer be used.`)},s=o("TinyTimeout"),u=class{#u=!1;#a;#c;#h=null;#l=new Map;constructor({cooldownWatcherTime:e=5e3,allowAutoConfigChange:t=!1}={}){if(!Number.isFinite(e)||e<=0)throw new TypeError("Expected 'cooldownWatcherTime' to be a positive number.");if("boolean"!=typeof t)throw new TypeError("Expected 'allowAutoConfigChange' to be a boolean.");this.#c=e,this.#a=t,this.setCooldownWatcherTime(e)}isDestroyed(){return this.#u}getAllowAutoConfigChange(){return s(this.#u),this.#a}getCooldownWatcherTime(){return s(this.#u),this.#c}setAllowAutoConfigChange(e){if(s(this.#u),"boolean"!=typeof e)throw new TypeError("Expected 'value' to be a boolean.");this.#a=e}setCooldownWatcherTime(e){if(s(this.#u),this.#u)throw new Error("TinyTimeout has been destroyed.");if(!Number.isFinite(e)||e<=0)throw new TypeError("Expected 'value' to be a positive number.");this.#c=e,this.#h&&clearInterval(this.#h),this.#h=setInterval(()=>{this.#l.forEach(e=>{e.now>0&&e.now--})},this.#c)}set(e,t,i,r=null){if(s(this.#u),this.#u)throw new Error("TinyTimeout has been destroyed.");if("string"!=typeof e||""===e.trim())throw new TypeError("Expected 'id' to be a non-empty string.");if("function"!=typeof t)throw new TypeError("Expected 'callback' to be a function.");if(!Number.isFinite(i)||i<0)throw new TypeError("Expected 'value' to be a non-negative number.");if(null!==r&&(!Number.isFinite(r)||r<0))throw new TypeError("Expected 'limit' to be null or a non-negative number.");let n=this.#l.get(e);(!n||this.#a&&i!==n.value)&&(n={value:i,now:0},this.#l.set(e,n));const o=n.value*n.now;return n.now++,setTimeout(t,"number"==typeof r?Math.min(o,r):o)}waitForTrue(e,t=100){if(s(this.#u),this.#u)throw new Error("TinyTimeout has been destroyed.");if("function"!=typeof e)throw new TypeError("Expected 'getValue' to be a function.");if(null!==t&&(!Number.isFinite(t)||t<=0))throw new TypeError("Expected 'checkInterval' to be null or a positive number.");return n(e,t??this.#c)}destroy(){this.#u||(this.#h&&clearInterval(this.#h),this.#h=null,this.#l.clear(),this.#u=!0)}},a=o("TinyThrottledApi"),c=i().EventEmitter,h=class extends c{static TinyTimeout=u;#f=0;#m;#e=new r;#p;#y;#d=100;#v=5e3;#u=!1;#w=!1;constructor(e,t,i=null){if(super(),"number"!=typeof e||e<=0)throw new TypeError("Concurrency limit must be a positive number.");if("function"!=typeof t)throw new TypeError("API must be a function.");if(null!=i&&!(i instanceof u))throw new TypeError("timeoutInstance must be a TinyTimeout instance.");this.#m=e,this.#p=t,this.#y=i??null}async exec(...e){a(this.#u);const t=crypto.randomUUID();if(this.#f<this.#m){this.#f++,this.emit("ExecTask",t);const i=await this.#g(...e);return this.emit("TaskEnded",t),i}return this.#e.enqueue(async()=>{this.emit("WaitingTask",t);const i=()=>n(()=>this.#f<this.#m),r=async()=>{this.#y&&await new Promise(e=>{this.#y?this.#y.set("api_throttle",e,this.#d,this.#v):e(void 0)})};this.#w?(await r(),await i()):(await i(),await r()),this.#f++,this.emit("ExecTask",t);const o=await this.#g(...e);return this.emit("TaskEnded",t),o},void 0,t)}destroy(){this.#u||(this.removeAllListeners(),this.#u=!0,this.emit("Destroyed"))}async#g(...e){try{const t=this.#p;return await t(...e)}finally{this.#f--}}get isDestroyed(){return this.#u}get queue(){return a(this.#u),this.#e}get api(){return a(this.#u),this.#p}get concurrencyLimit(){return a(this.#u),this.#m}set concurrencyLimit(e){if(a(this.#u),"number"!=typeof e||e<=0)throw new TypeError("Concurrency limit must be a positive number.");this.#m=e,this.emit("SetConcurrencyLimit",e)}get timeoutInstance(){return a(this.#u),this.#y}get timeoutValue(){return a(this.#u),this.#d}set timeoutValue(e){if(a(this.#u),"number"!=typeof e)throw new TypeError("Timeout value must be a number.");if(e<0)throw new RangeError("Timeout value cannot be negative.");this.#d=e,this.emit("SetTimeoutValue",e)}get timeoutLimit(){return a(this.#u),this.#v}get timeoutFirst(){return this.#w}set timeoutFirst(e){if("boolean"!=typeof e)throw new TypeError("timeoutFirst must be a boolean.");this.#w=e}set timeoutLimit(e){if(a(this.#u),"number"!=typeof e)throw new TypeError("Timeout limit must be a number.");if(e<0)throw new RangeError("Timeout limit cannot be negative.");this.#v=e,this.emit("SetTimeoutLimit",e)}get activeCount(){return a(this.#u),this.#f}get queuedCount(){return a(this.#u),this.#e.getQueuedIds().length}};window.TinyThrottledApi=t.TinyThrottledApi})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,o)=>{if(Array.isArray(o))for(var r=0;r<o.length;){var i=o[r++],n=o[r++];e.o(t,i)?0===n&&r++:0===n?Object.defineProperty(t,i,{enumerable:!0,value:o[r++]}):Object.defineProperty(t,i,{enumerable:!0,get:n})}else for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyTimeout:()=>i});const o=(e,t=100)=>{if("function"!=typeof e)throw new TypeError("Expected 'getValue' to be a function.");if(!Number.isFinite(t)||t<=0)throw new TypeError("Expected 'checkInterval' to be a positive number.");return new Promise(o=>{const r=setInterval(()=>{e()&&(clearInterval(r),o())},t)})},r=e=>{if(e)throw new Error("This TinyTimeout instance has been destroyed and can no longer be used.")};const i=class{#e=!1;#t;#o;#r=null;#i=new Map;constructor({cooldownWatcherTime:e=5e3,allowAutoConfigChange:t=!1}={}){if(!Number.isFinite(e)||e<=0)throw new TypeError("Expected 'cooldownWatcherTime' to be a positive number.");if("boolean"!=typeof t)throw new TypeError("Expected 'allowAutoConfigChange' to be a boolean.");this.#o=e,this.#t=t,this.setCooldownWatcherTime(e)}isDestroyed(){return this.#e}getAllowAutoConfigChange(){return r(this.#e),this.#t}getCooldownWatcherTime(){return r(this.#e),this.#o}setAllowAutoConfigChange(e){if(r(this.#e),"boolean"!=typeof e)throw new TypeError("Expected 'value' to be a boolean.");this.#t=e}setCooldownWatcherTime(e){if(r(this.#e),this.#e)throw new Error("TinyTimeout has been destroyed.");if(!Number.isFinite(e)||e<=0)throw new TypeError("Expected 'value' to be a positive number.");this.#o=e,this.#r&&clearInterval(this.#r),this.#r=setInterval(()=>{this.#i.forEach(e=>{e.now>0&&e.now--})},this.#o)}set(e,t,o,i=null){if(r(this.#e),this.#e)throw new Error("TinyTimeout has been destroyed.");if("string"!=typeof e||""===e.trim())throw new TypeError("Expected 'id' to be a non-empty string.");if("function"!=typeof t)throw new TypeError("Expected 'callback' to be a function.");if(!Number.isFinite(o)||o<0)throw new TypeError("Expected 'value' to be a non-negative number.");if(null!==i&&(!Number.isFinite(i)||i<0))throw new TypeError("Expected 'limit' to be null or a non-negative number.");let n=this.#i.get(e);(!n||this.#t&&o!==n.value)&&(n={value:o,now:0},this.#i.set(e,n));const s=n.value*n.now;return n.now++,setTimeout(t,"number"==typeof i?Math.min(s,i):s)}static waitForTrue(e,t=100){return o(e,t)}waitForTrue(e,t=100){if(r(this.#e),this.#e)throw new Error("TinyTimeout has been destroyed.");if("function"!=typeof e)throw new TypeError("Expected 'getValue' to be a function.");if(null!==t&&(!Number.isFinite(t)||t<=0))throw new TypeError("Expected 'checkInterval' to be null or a positive number.");return o(e,t??this.#o)}destroy(){this.#e||(this.#r&&clearInterval(this.#r),this.#r=null,this.#i.clear(),this.#e=!0)}};window.TinyTimeout=t.TinyTimeout})();
1
+ (()=>{"use strict";const e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};let o={};e.d(o,{TinyTimeout:()=>r});const t=e=>{if(e)throw new Error("This TinyTimeout instance has been destroyed and can no longer be used.")};const r=class{#e=!1;#o;#t;#r=null;#i=new Map;constructor({cooldownWatcherTime:e=5e3,allowAutoConfigChange:o=!1}={}){if(!Number.isFinite(e)||e<=0)throw new TypeError("Expected 'cooldownWatcherTime' to be a positive number.");if("boolean"!=typeof o)throw new TypeError("Expected 'allowAutoConfigChange' to be a boolean.");this.#t=e,this.#o=o,this.setCooldownWatcherTime(e)}isDestroyed(){return this.#e}getAllowAutoConfigChange(){return t(this.#e),this.#o}getCooldownWatcherTime(){return t(this.#e),this.#t}setAllowAutoConfigChange(e){if(t(this.#e),"boolean"!=typeof e)throw new TypeError("Expected 'value' to be a boolean.");this.#o=e}setCooldownWatcherTime(e){if(t(this.#e),this.#e)throw new Error("TinyTimeout has been destroyed.");if(!Number.isFinite(e)||e<=0)throw new TypeError("Expected 'value' to be a positive number.");this.#t=e,this.#r&&clearInterval(this.#r),this.#r=setInterval(()=>{this.#i.forEach(e=>{e.now>0&&e.now--})},this.#t)}set(e,o,r,i=null){if(t(this.#e),this.#e)throw new Error("TinyTimeout has been destroyed.");if("string"!=typeof e||""===e.trim())throw new TypeError("Expected 'id' to be a non-empty string.");if("function"!=typeof o)throw new TypeError("Expected 'callback' to be a function.");if(!Number.isFinite(r)||r<0)throw new TypeError("Expected 'value' to be a non-negative number.");if(null!==i&&(!Number.isFinite(i)||i<0))throw new TypeError("Expected 'limit' to be null or a non-negative number.");let n=this.#i.get(e);(!n||this.#o&&r!==n.value)&&(n={value:r,now:0},this.#i.set(e,n));const s=n.value*n.now;return n.now++,setTimeout(o,"number"==typeof i?Math.min(s,i):s)}waitForTrue(e,o=100){if(t(this.#e),this.#e)throw new Error("TinyTimeout has been destroyed.");if("function"!=typeof e)throw new TypeError("Expected 'getValue' to be a function.");if(null!==o&&(!Number.isFinite(o)||o<=0))throw new TypeError("Expected 'checkInterval' to be null or a positive number.");return((e,o=100)=>{if("function"!=typeof e)throw new TypeError("Expected 'getValue' to be a function.");if(!Number.isFinite(o)||o<=0)throw new TypeError("Expected 'checkInterval' to be a positive number.");return new Promise(t=>{const r=setInterval(()=>{e()&&(clearInterval(r),t())},o)})})(e,o??this.#t)}destroy(){this.#e||(this.#r&&clearInterval(this.#r),this.#r=null,this.#i.clear(),this.#e=!0)}};window.TinyTimeout=o.TinyTimeout})();
@@ -1 +1 @@
1
- (()=>{"use strict";const t={d:(e,i)=>{if(Array.isArray(i))for(var r=0;r<i.length;){var n=i[r++],a=i[r++];t.o(e,n)?0===a&&r++:0===a?Object.defineProperty(e,n,{enumerable:!0,value:i[r++]}):Object.defineProperty(e,n,{enumerable:!0,get:a})}else for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};let e={};t.d(e,{TinyToastNotify:()=>r});const i=t=>{if(t)throw new Error("This TinyToastNotify instance has been destroyed and can no longer be used.")};const r=class{#t;#e;#i;#r;#n;#a;#o=!1;get destroyed(){return this.#o}constructor(t="top",e="right",i=3e3,r=50,n=300,a=".notify-container"){this.#s(t),this.#d(e),this.#l(i,"baseDuration"),this.#l(r,"extraPerChar"),this.#l(n,"fadeOutDuration"),this.#t=t,this.#e=e,this.#i=i,this.#r=r,this.#n=n;const o=document.querySelector(`${a}.${t}.${e}`);o instanceof HTMLElement?this.#a=o:(this.#a=document.createElement("div"),this.#a.className=`notify-container ${t} ${e}`,document.body.appendChild(this.#a))}getContainer(){if(i(this.#o),!(this.#a instanceof HTMLElement))throw new Error("Container is not a valid HTMLElement.");return this.#a}#s(t){if(!["top","bottom"].includes(t))throw new Error(`Invalid vertical direction "${t}". Expected "top" or "bottom".`)}#d(t){if(!["left","right","center"].includes(t))throw new Error(`Invalid horizontal position "${t}". Expected "left", "right" or "center".`)}#l(t,e){if("number"!=typeof t||t<0||!Number.isFinite(t))throw new Error(`Invalid value for "${e}": ${t}. Must be a non-negative finite number.`)}getY(){return i(this.#o),this.#t}setY(t){i(this.#o),this.#s(t);const e=this.getContainer();e.classList.remove(this.#t),e.classList.add(t),this.#t=t}getX(){return i(this.#o),this.#e}setX(t){i(this.#o),this.#d(t);const e=this.getContainer();e.classList.remove(this.#e),e.classList.add(t),this.#e=t}getBaseDuration(){return i(this.#o),this.#i}setBaseDuration(t){i(this.#o),this.#l(t,"baseDuration"),this.#i=t}getExtraPerChar(){return i(this.#o),this.#r}setExtraPerChar(t){i(this.#o),this.#l(t,"extraPerChar"),this.#r=t}getFadeOutDuration(){return i(this.#o),this.#n}setFadeOutDuration(t){i(this.#o),this.#l(t,"fadeOutDuration"),this.#n=t}show(t){i(this.#o);let e="",r="",n=null,a=!1,o=null;const s=document.createElement("div");if(s.className="notify enter","string"==typeof t)e=t;else{if("object"!=typeof t||null===t||"string"!=typeof t.message)throw new Error("Invalid argument for show(): expected string or { message: string, title?: string, onClick?: function, html?: boolean, avatar?: string }");if(e=t.message,r="string"==typeof t.title?t.title:"",a=!0===t.html,o="string"==typeof t.avatar?t.avatar:null,void 0!==t.onClick){if("function"!=typeof t.onClick)throw new Error("onClick must be a function if defined");n=t.onClick,s.classList.add("clickable")}}const d=document.createElement("button");if(d.innerHTML="&times;",d.className="close",d.setAttribute("aria-label","Close"),d.addEventListener("mouseenter",()=>{d.style.color="var(--notify-close-color-hover)"}),d.addEventListener("mouseleave",()=>{d.style.color="var(--notify-close-color)"}),o){const t=document.createElement("img");t.src=o,t.alt="avatar",t.className="avatar",s.appendChild(t)}if(r){const t=document.createElement("strong");t.textContent=r,t.style.display="block",s.appendChild(t)}if(a){const t=document.createElement("div");t.innerHTML=e,s.appendChild(t)}else s.appendChild(document.createTextNode(e));s.appendChild(d),this.getContainer().appendChild(s);const l=this.#i+e.length*this.#r+this.#n;let c=!1;const h=()=>{c||(c=!0,s.classList.remove("enter","show"),s.classList.add("exit"),setTimeout(()=>s.remove(),this.#n))};"function"==typeof n&&s.addEventListener("click",t=>{t.target!==d&&n(t,h)}),d.addEventListener("click",t=>{t.stopPropagation(),h()}),setTimeout(()=>{s.classList.remove("enter"),s.classList.add("show")},1),setTimeout(()=>h(),l)}destroy(){this.#o||this.#a instanceof HTMLElement&&(this.#a.querySelectorAll(".notify").forEach(t=>t.remove()),this.#a.parentNode&&this.#a.parentNode.removeChild(this.#a),this.#a=null,this.#o=!0)}};window.TinyToastNotify=e.TinyToastNotify})();
1
+ (()=>{"use strict";const t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};let e={};t.d(e,{TinyToastNotify:()=>n});const i=t=>{if(t)throw new Error("This TinyToastNotify instance has been destroyed and can no longer be used.")};const n=class{#t;#e;#i;#n;#r;#s;#o=!1;get destroyed(){return this.#o}constructor(t="top",e="right",i=3e3,n=50,r=300,s=".notify-container"){this.#a(t),this.#d(e),this.#l(i,"baseDuration"),this.#l(n,"extraPerChar"),this.#l(r,"fadeOutDuration"),this.#t=t,this.#e=e,this.#i=i,this.#n=n,this.#r=r;const o=document.querySelector(`${s}.${t}.${e}`);o instanceof HTMLElement?this.#s=o:(this.#s=document.createElement("div"),this.#s.className=`notify-container ${t} ${e}`,document.body.appendChild(this.#s))}getContainer(){if(i(this.#o),!(this.#s instanceof HTMLElement))throw new Error("Container is not a valid HTMLElement.");return this.#s}#a(t){if(!["top","bottom"].includes(t))throw new Error(`Invalid vertical direction "${t}". Expected "top" or "bottom".`)}#d(t){if(!["left","right","center"].includes(t))throw new Error(`Invalid horizontal position "${t}". Expected "left", "right" or "center".`)}#l(t,e){if("number"!=typeof t||t<0||!Number.isFinite(t))throw new Error(`Invalid value for "${e}": ${t}. Must be a non-negative finite number.`)}getY(){return i(this.#o),this.#t}setY(t){i(this.#o),this.#a(t);const e=this.getContainer();e.classList.remove(this.#t),e.classList.add(t),this.#t=t}getX(){return i(this.#o),this.#e}setX(t){i(this.#o),this.#d(t);const e=this.getContainer();e.classList.remove(this.#e),e.classList.add(t),this.#e=t}getBaseDuration(){return i(this.#o),this.#i}setBaseDuration(t){i(this.#o),this.#l(t,"baseDuration"),this.#i=t}getExtraPerChar(){return i(this.#o),this.#n}setExtraPerChar(t){i(this.#o),this.#l(t,"extraPerChar"),this.#n=t}getFadeOutDuration(){return i(this.#o),this.#r}setFadeOutDuration(t){i(this.#o),this.#l(t,"fadeOutDuration"),this.#r=t}show(t){i(this.#o);let e="",n="",r=null,s=!1,o=null;const a=document.createElement("div");if(a.className="notify enter","string"==typeof t)e=t;else{if("object"!=typeof t||null===t||"string"!=typeof t.message)throw new Error("Invalid argument for show(): expected string or { message: string, title?: string, onClick?: function, html?: boolean, avatar?: string }");if(e=t.message,n="string"==typeof t.title?t.title:"",s=!0===t.html,o="string"==typeof t.avatar?t.avatar:null,void 0!==t.onClick){if("function"!=typeof t.onClick)throw new Error("onClick must be a function if defined");r=t.onClick,a.classList.add("clickable")}}const d=document.createElement("button");if(d.innerHTML="&times;",d.className="close",d.setAttribute("aria-label","Close"),d.addEventListener("mouseenter",()=>{d.style.color="var(--notify-close-color-hover)"}),d.addEventListener("mouseleave",()=>{d.style.color="var(--notify-close-color)"}),o){const t=document.createElement("img");t.src=o,t.alt="avatar",t.className="avatar",a.appendChild(t)}if(n){const t=document.createElement("strong");t.textContent=n,t.style.display="block",a.appendChild(t)}if(s){const t=document.createElement("div");t.innerHTML=e,a.appendChild(t)}else a.appendChild(document.createTextNode(e));a.appendChild(d),this.getContainer().appendChild(a);const l=this.#i+e.length*this.#n+this.#r;let c=!1;const h=()=>{c||(c=!0,a.classList.remove("enter","show"),a.classList.add("exit"),setTimeout(()=>a.remove(),this.#r))};"function"==typeof r&&a.addEventListener("click",t=>{t.target!==d&&r(t,h)}),d.addEventListener("click",t=>{t.stopPropagation(),h()}),setTimeout(()=>{a.classList.remove("enter"),a.classList.add("show")},1),setTimeout(()=>h(),l)}destroy(){this.#o||this.#s instanceof HTMLElement&&(this.#s.querySelectorAll(".notify").forEach(t=>t.remove()),this.#s.parentNode&&this.#s.parentNode.removeChild(this.#s),this.#s=null,this.#o=!0)}};window.TinyToastNotify=e.TinyToastNotify})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(t,i)=>{if(Array.isArray(i))for(var n=0;n<i.length;){var r=i[n++],o=i[n++];e.o(t,r)?0===o&&n++:0===o?Object.defineProperty(t,r,{enumerable:!0,value:i[n++]}):Object.defineProperty(t,r,{enumerable:!0,get:o})}else for(var r in i)e.o(i,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:i[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.d(t,{TinyUploadClicker:()=>n});const n=class{#e=!1;get destroyed(){return this.#e}#t;#i=[];#n=new WeakMap;#r;constructor(e){if(!i(e))throw new TypeError('TinyUploadClicker: "options" must be a valid object.');this.#t={multiple:!1,accept:"",inputAttributes:{},inputStyles:{display:"none"},onClick:null,onFileLoad:null,...e};const{triggers:t}=e;if(!(Array.isArray(t)||"string"==typeof t||t instanceof HTMLElement))throw new TypeError('TinyUploadClicker: "triggers" is required and must be a string, HTMLElement, or an array of them.');const n=(Array.isArray(this.#t.triggers)?this.#t.triggers:[this.#t.triggers]).map(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`TinyUploadClicker: No element found for selector "${e}".`);return t}if(!(e instanceof HTMLElement))throw new TypeError("TinyUploadClicker: All triggers must be either strings (selectors) or HTMLElements.");return e});if(void 0!==e.accept&&"string"!=typeof e.accept&&!Array.isArray(e.accept))throw new TypeError('TinyUploadClicker: "accept" must be a string or an array of strings.');if(void 0!==e.onClick&&"function"!=typeof e.onClick&&null!==e.onClick)throw new TypeError('TinyUploadClicker: "onClick" must be a function or null.');if(void 0!==e.onFileLoad&&"function"!=typeof e.onFileLoad&&null!==e.onFileLoad)throw new TypeError('TinyUploadClicker: "onFileLoad" must be a function or null.');if(void 0!==e.inputAttributes&&!i(e.inputAttributes))throw new TypeError('TinyUploadClicker: "inputAttributes" must be an object.');if(void 0!==e.inputStyles&&!i(e.inputStyles))throw new TypeError('TinyUploadClicker: "inputStyles" must be an object.');this.#r=this.#o.bind(this),this.#i=n,this.#i.forEach(e=>{if(!(e instanceof HTMLElement))return;const t=document.createElement("input");t.type="file",this.#t.multiple&&(t.multiple=!0),"string"==typeof this.#t.accept?t.accept=this.#t.accept:Array.isArray(this.#t.accept)&&(t.accept=this.#t.accept.join(","));const i=this.#t.inputAttributes;if(i&&"object"==typeof i)for(const[e,n]of Object.entries(i))t.setAttribute(e,n);Object.assign(t.style,this.#t.inputStyles||{display:"none"}),t.addEventListener("change",()=>{t.files&&"function"==typeof this.#t.onFileLoad&&this.#t.onFileLoad(t.files,e),t.value=""}),document.body.appendChild(t),this.#n.set(e,t),e.addEventListener("click",this.#r)})}#o(e){const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const i=this.#n.get(t);i&&("function"==typeof this.#t.onClick&&this.#t.onClick(t),i.click())}destroy(){if(!this.destroyed){for(const e of this.#i){if(!(e instanceof HTMLElement))return;e.removeEventListener("click",this.#r);const t=this.#n.get(e);t&&t.parentNode&&t.remove(),this.#n.delete(e)}this.#i=[],this.#e=!0}}};window.TinyUploadClicker=t.TinyUploadClicker})();
1
+ (()=>{"use strict";const t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};let e={};function i(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.d(e,{TinyUploadClicker:()=>n});const n=class{#t=!1;get destroyed(){return this.#t}#e;#i=[];#n=new WeakMap;#r;constructor(t){if(!i(t))throw new TypeError('TinyUploadClicker: "options" must be a valid object.');this.#e={multiple:!1,accept:"",inputAttributes:{},inputStyles:{display:"none"},onClick:null,onFileLoad:null,...t};const{triggers:e}=t;if(!(Array.isArray(e)||"string"==typeof e||e instanceof HTMLElement))throw new TypeError('TinyUploadClicker: "triggers" is required and must be a string, HTMLElement, or an array of them.');const n=(Array.isArray(this.#e.triggers)?this.#e.triggers:[this.#e.triggers]).map(t=>{if("string"==typeof t){const e=document.querySelector(t);if(!e)throw new Error(`TinyUploadClicker: No element found for selector "${t}".`);return e}if(!(t instanceof HTMLElement))throw new TypeError("TinyUploadClicker: All triggers must be either strings (selectors) or HTMLElements.");return t});if(void 0!==t.accept&&"string"!=typeof t.accept&&!Array.isArray(t.accept))throw new TypeError('TinyUploadClicker: "accept" must be a string or an array of strings.');if(void 0!==t.onClick&&"function"!=typeof t.onClick&&null!==t.onClick)throw new TypeError('TinyUploadClicker: "onClick" must be a function or null.');if(void 0!==t.onFileLoad&&"function"!=typeof t.onFileLoad&&null!==t.onFileLoad)throw new TypeError('TinyUploadClicker: "onFileLoad" must be a function or null.');if(void 0!==t.inputAttributes&&!i(t.inputAttributes))throw new TypeError('TinyUploadClicker: "inputAttributes" must be an object.');if(void 0!==t.inputStyles&&!i(t.inputStyles))throw new TypeError('TinyUploadClicker: "inputStyles" must be an object.');this.#r=this.#o.bind(this),this.#i=n,this.#i.forEach(t=>{if(!(t instanceof HTMLElement))return;const e=document.createElement("input");e.type="file",this.#e.multiple&&(e.multiple=!0),"string"==typeof this.#e.accept?e.accept=this.#e.accept:Array.isArray(this.#e.accept)&&(e.accept=this.#e.accept.join(","));const i=this.#e.inputAttributes;if(i&&"object"==typeof i)for(const[t,n]of Object.entries(i))e.setAttribute(t,n);Object.assign(e.style,this.#e.inputStyles||{display:"none"}),e.addEventListener("change",()=>{e.files&&"function"==typeof this.#e.onFileLoad&&this.#e.onFileLoad(e.files,t),e.value=""}),document.body.appendChild(e),this.#n.set(t,e),t.addEventListener("click",this.#r)})}#o(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const i=this.#n.get(e);i&&("function"==typeof this.#e.onClick&&this.#e.onClick(e),i.click())}destroy(){if(!this.destroyed){for(const t of this.#i){if(!(t instanceof HTMLElement))return;t.removeEventListener("click",this.#r);const e=this.#n.get(t);e&&e.parentNode&&e.remove(),this.#n.delete(t)}this.#i=[],this.#t=!0}}};window.TinyUploadClicker=e.TinyUploadClicker})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";const e={d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)};let r={};e.d(r,{TinyUriParser:()=>s});const t=e=>{if(e)throw new Error("This TinyUriParser instance has been destroyed and can no longer be used.")};const s=class{static buildParserPair(e,r,t,s){return Object.freeze([e,r,r=>({type:e,data:t(r)}),s])}#e=!1;get isDestroyed(){return this.#e}#r;get parsers(){return t(this.#e),Array.from(this.#r).map(e=>[...e])}get size(){return t(this.#e),this.#r.size}constructor(...e){for(const[r,t]of e.entries()){if(!Array.isArray(t))throw new TypeError(`Parser at index ${r} must be an array representing a ParserPair.`);if(4!==t.length)throw new TypeError(`Parser at index ${r} must contain exactly 4 elements.`);if("string"!=typeof t[0])throw new TypeError(`The first element of the parser at index ${r} must be a string (Type).`);if("function"!=typeof t[1])throw new TypeError(`The second element of the parser at index ${r} must be a function (ParseChecker).`);if("function"!=typeof t[2])throw new TypeError(`The third element of the parser at index ${r} must be a function (ParserCallback).`);if("function"!=typeof t[3])throw new TypeError(`The fourth element of the parser at index ${r} must be a function (StringifyCallback).`)}this.#r=new Set(e)}parse(e){if(t(this.#e),"string"!=typeof e)throw new TypeError("The input must be a string.");for(const r of this.#r)if(r[1](e))return r[2](e);throw new Error(`Unable to determine the protocol for the provided URI: ${e}`)}stringify(e){if(t(this.#e),null===(r=e)||"object"!=typeof r||Array.isArray(r)||"[object Object]"!==Object.prototype.toString.call(r)||"string"!=typeof e.type)throw new TypeError('The input must be a valid ParsedUri object with a "type" property.');var r;for(const r of this.#r){const[t,,,s]=r;if(t===e.type&&"function"==typeof s){const r=s(e.data);if("string"==typeof r)return r}}throw new Error(`No reconstructor found for the parsed type: ${e.type}`)}destroy(){this.#e||(this.#r.clear(),this.#e=!0)}};window.TinyUriParser=r.TinyUriParser})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";const t={d:(r,i)=>{for(var e in i)t.o(i,e)&&!t.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:i[e]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r)};let r={};t.d(r,{TinyVersion:()=>e});class i{#t=0;#r=0;#i=0;#e=null;constructor(t){if("string"!=typeof t)throw new TypeError("[TinyVersion] Expected version to be a string, received type: "+typeof t);const r=t.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/),i=t=>{"string"==typeof t[1]&&(this.#t=parseInt(t[1],10)),"string"==typeof t[2]&&(this.#r=parseInt(t[2],10)),"string"==typeof t[3]&&(this.#i=parseInt(t[3],10)),"string"==typeof t[4]&&(this.#e=t[4])};if(r)i(r);else{const r=t.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(r)i(r);else{const r=t.match(/^(\d+)\.(\d+)$/);if(r)i(r);else{const r=t.match(/^(\d+)$/);if(!r)throw new Error(`[TinyVersion] Invalid version format: "${t}". Expected format: "X.Y.Z" or "X.Y.Z-tag".`);i(r)}}}}get major(){return this.#t}get minor(){return this.#r}get patch(){return this.#i}get tag(){return this.#e}isGreaterThan(t){if(!(t instanceof i))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof t);return this.#t!==t.major?this.#t>t.major:this.#r!==t.minor?this.#r>t.minor:this.#i!==t.patch?this.#i>t.patch:null===this.#e&&null!==t.tag||(null===this.#e||null!==t.tag)&&(null!==this.#e||null!==t.tag)&&(this.#e??"")>(t.tag??"")}isEqualTo(t){if(!(t instanceof i))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof t);return this.#t===t.major&&this.#r===t.minor&&this.#i===t.patch&&this.#e===t.tag}isLessThan(t){if(!(t instanceof i))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof t);return!this.isGreaterThan(t)&&!this.isEqualTo(t)}toString(){const t=`${this.#t}.${this.#r}.${this.#i}`;return this.#e?`${t}-${this.#e}`:t}}const e=i;window.TinyVersion=r.TinyVersion})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";const e={cw:e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyWebWorker:()=>S});var r=e.cw(function(e,t){var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise(function(r,i){function s(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,s)})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function g(e,t,r,i){var s,o,n,a;if(l(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),n=o[t]),void 0===n)n=o[t]=r,++e._eventsCount;else if("function"==typeof n?n=o[t]=i?[r,n]:[n,r]:i?n.unshift(r):n.push(r),(s=h(e))>0&&n.length>s&&!n.warned){n.warned=!0;var g=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");g.name="MaxListenersExceededWarning",g.emitter=e,g.type=t,g.count=n.length,a=g,console&&console.warn&&console.warn(a)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=d.bind(i);return s.listener=r,i.wrapFn=s,s}function u(e,t,r){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):p(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function y(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(o){i.once&&e.removeEventListener(t,s),r(o)})}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return h(this)},n.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var n;if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var a=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw a.context=n,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)s(l,this,t);else{var h=l.length,g=p(l,h);for(r=0;r<h;++r)s(g[r],this,t)}return!0},n.prototype.addListener=function(e,t){return g(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return g(this,e,t,!0)},n.prototype.once=function(e,t){return l(t),this.on(e,c(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,c(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,s,o,n;if(l(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){n=r[o].listener,s=o;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,n||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(s=o[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},n.prototype.listeners=function(e){return u(this,e,!0)},n.prototype.rawListeners=function(e){return u(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},n.prototype.listenerCount=f,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"===Object.prototype.toString.call(e)}r();const s="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:null,o="undefined"!=typeof document?document:null,n=["chrome","firefox","ie","edge","safari","opera","yandex","other"];const a=r().EventEmitter,l=class extends a{#e;#t;#r=null;#i;#s;#o;#n;#a=new Map([["log",""],["info",""],["warn",""],["error",""],["debug",""],["main_class",""],["sub_class",""],["reset",""],["black",""],["red",""],["green",""],["yellow",""],["blue",""],["magenta",""],["cyan",""],["white",""],["gray",""]]);#l=new Map([["log","[_log_LOG_reset_]"],["info","[_info_INFO_reset_]"],["warn","[_warn_WARN_reset_]"],["error","[_error_ERROR_reset_]"],["debug","[_debug_DEBUG_reset_]"]]);constructor({logger:e,id:t,debugMode:r,canEmitLogs:i=!1,useLogColors:a=!1,autoHideId:l=!1}){if(super(),null===(h=e)||"object"!=typeof h||Array.isArray(h))throw new TypeError("Logger must be an object that implements the Console interface.");var h;if("string"!=typeof t)throw new TypeError("Logger instance id must be a string.");if("boolean"!=typeof r)throw new TypeError("debugMode must be a boolean.");if("boolean"!=typeof i)throw new TypeError("canEmitLogs must be a boolean.");if("boolean"!=typeof a)throw new TypeError("useLogColors must be a boolean.");if("boolean"!=typeof l)throw new TypeError("autoHideId must be a boolean.");this.#t=t,this.#e=e,this.#s=r,this.#i=i,this.#n=l,this.#o="firefox"!==function(e=[]){const t=function(e=[]){if(!Array.isArray(e))throw new TypeError('The "disable" argument must be an array.');for(const t of e)if(!n.includes(t))throw new TypeError(`Invalid browser name provided in disable array: ${t}`);const t={chrome:0,firefox:0,ie:0,edge:0,safari:0,opera:0,yandex:0,other:0};t[function(){if("undefined"==typeof navigator)return"other";const e=navigator.userAgent;return-1!==e.indexOf("Chrome")?"chrome":-1!==e.indexOf("Firefox")?"firefox":-1!==e.indexOf("MSIE")?"ie":-1!==e.indexOf("Edge")?"edge":-1!==e.indexOf("Safari")?"safari":-1!==e.indexOf("Opera")?"opera":-1!==e.indexOf("YaBrowser")?"yandex":"other"}()]++;const r=function(){const e=s?.getComputedStyle?(Array.prototype.slice.call(s.getComputedStyle(document.documentElement,"")).join("").match(/-(moz|webkit|ms)-/)??["",""])[1]:"";return"moz"===e?"gecko":"webkit"===e?"webkit":"ms"===e?"trident":"other"}();"gecko"===r?e.indexOf("firefox")<0&&t.firefox++:"webkit"===r?(e.indexOf("chrome")<0&&t.chrome++,e.indexOf("safari")<0&&t.safari++,e.indexOf("opera")<0&&t.opera++,e.indexOf("edge")<0&&t.edge++):"trident"===r?e.indexOf("ie")<0&&t.ie++:e.indexOf("other")<0&&t.other++;const i=function(){const e=!!s?.opr&&!!opr.addons||!!s?.opera||navigator.userAgent.indexOf(" OPR/")>=0,t="undefined"!=typeof InstallTrigger,r=!!s?.HTMLElement&&/constructor/i.test(s.HTMLElement)||"[object SafariRemoteNotification]"===(!s.safari||"undefined"!=typeof safari&&safari.pushNotification).toString(),i=!!o?.documentMode,n=!i&&!!s?.StyleMedia,a=!!s?.chrome;return{isOpera:e,isFirefox:t,isSafari:r,isIE:i,isEdge:n,isChrome:a,isBlink:(a||e)&&!!s?.CSS}}();return i.isOpera&&e.indexOf("opera")<0&&t.opera++,i.isFirefox&&e.indexOf("firefox")<0&&t.firefox++,i.isSafari&&e.indexOf("safari")<0&&t.safari++,i.isIE&&e.indexOf("ie")<0&&t.ie++,i.isEdge&&e.indexOf("edge")<0&&t.edge++,i.isChrome&&e.indexOf("chrome")<0&&t.chrome++,t}(e);return Object.keys(t).reduce((e,r)=>t[r]>t[e]?r:e)}()&&a,this.log("info","Emit logs of debug mode set to: "+(this.#s?"ON":"OFF")),this.log("info","Custom logger assigned.")}get logId(){return this.#t}get logSubId(){if("string"!=typeof this.#r)throw new Error('logSubId has not been set yet. Assign a string to "logSubId" before reading it.');return this.#r}set logSubId(e){if("string"!=typeof e)throw new TypeError(`logSubId must be a string. Received: ${typeof e}.`);if(null!==this.#r)throw new Error(`logSubId is already set to "${this.#r}" and cannot be reassigned.`);this.#r=e,this.emit("setLogSubId",e)}get canEmitLogs(){return this.#i}get useLogColors(){return this.#o}set useLogColors(e){if("boolean"!=typeof e)throw new TypeError("useLogColors must be a boolean.");this.#o=e,this.log("info","Log Colors usage mode set to: "+(this.#o?"ON":"OFF")),this.emit("setUseLogColors",e)}get debugMode(){return this.#s}set debugMode(e){if("boolean"!=typeof e)throw new TypeError("debugMode must be a boolean.");this.#s=e,this.log("info","Debug mode set to: "+(this.#s?"ON":"OFF")),this.emit("setDebugMode",e)}_addLogColor(e,t){this.#a.set(e,t)}_removeLogColor(e){this.#a.delete(e)}_addLogPrefix(e,t){this.#l.set(e,t)}_removeLogPrefix(e){this.#l.delete(e)}#h(e){if("string"!=typeof e)return e;let t=e;for(const[e,r]of this.#l){const i=new RegExp(`\\:${e}\\:`,"g");t=t.replace(i,r)}for(const[e,r]of this.#a){const i=new RegExp(`\\_${e}\\_`,"g");t=t.replace(i,this.#o?r:"")}return t}_applyLogFormatting(e){return this.#h(e)}logClear(){if(this.#s)return this.#i&&this.emit("debug:clear"),this.#e.clear?this.#e.clear():console.clear()}logGroupEnd(){if(this.#s)return this.#i&&this.emit("debug:groupEnd"),this.#e.groupEnd?this.#e.groupEnd():console.groupEnd()}logLabel(e,t){if(!this.#s)return;const r=["count","countReset","time","timeEnd","profile","profileEnd","timeStamp"];if(!r.includes(e))throw new TypeError(`Invalid logType. Expected one of: ${r.join(", ")}`);if(void 0!==t&&"string"!=typeof t)throw new TypeError("The label must be a string.");const i=this.#e[e]?this.#e[e]:console[e];if(!i)throw new TypeError(`The log type "${e}" is not supported by the provided logger or console.`);return this.#i&&this.emit("debug:logLabel",e,t),i(t)}logTimeLabel(e,...t){if(this.#s)return this.#i&&this.emit("debug:timeLog",e,...t),this.#e.timeLog?this.#e.timeLog(e,...t):console.timeLog(e,...t)}logAssert(e,...t){if(this.#s)return this.#i&&this.emit("debug:assert",e,...t),this.#e.assert?this.#e.assert(e,...t):console.assert(e,...t)}logDir(e,t){if(this.#s)return this.#i&&this.emit("debug:dir",e,t),this.#e.dir?this.#e.dir(e,t):console.dir(e,t)}logTable(e,t){if(this.#s){if(!(void 0===t||Array.isArray(t)&&t.every(e=>"string"==typeof e)))throw new TypeError("Properties must be an array of strings.");return this.#i&&this.emit("debug:table",e,t),this.#e.table?this.#e.table(e,t):console.table(e,t)}}log(e,t,...r){if(!this.#s)return;const i=["log","info","warn","error","debug","dirxml","group","groupCollapsed","trace"];if(!i.includes(e))throw new TypeError(`Invalid logType. Expected one of: ${i.join(", ")}`);if("string"!=typeof t)throw new TypeError("The message must be a string.");let s=this.#t,o=this.#r??"",n=t;const a=!this.#n||"string"!=typeof this.#r;s=a?this.#h(s):"",o&&(o=this.#h(o)),n=this.#h(n);const l=`${s}${o?a?` ${o}`:o:""}`,h=this.#e[e]?this.#e[e]:console[e];return h?(this.#i&&this.emit("debug:log",l,n,...r),h(l,n,...r)):(this.#i&&this.emit("debug:log",l,n,...r),console.log(l,n,...r))}#g(e,t){const[r="",...i]=t;return"string"==typeof r?this.log(e,r,...i):this.log(e,"",r,...i)}toConsole(){return{log:(...e)=>this.#g("log",e),info:(...e)=>this.#g("info",e),warn:(...e)=>this.#g("warn",e),error:(...e)=>this.#g("error",e),debug:(...e)=>this.#g("debug",e),dirxml:(...e)=>this.#g("dirxml",e),group:(...e)=>this.#g("group",e),groupCollapsed:(...e)=>this.#g("groupCollapsed",e),trace:(...e)=>this.#g("trace",e),assert:(e,...t)=>this.logAssert(e,...t),dir:(e,t)=>this.logDir(e,t),table:(e,t)=>this.logTable(e,t),clear:()=>this.logClear(),groupEnd:()=>this.logGroupEnd(),count:e=>this.logLabel("count",e),countReset:e=>this.logLabel("countReset",e),time:e=>this.logLabel("time",e),timeEnd:e=>this.logLabel("timeEnd",e),timeLog:(e,...t)=>this.logTimeLabel(e,...t),timeStamp:e=>this.logLabel("timeStamp",e),profile:e=>this.logLabel("profile",e),profileEnd:e=>this.logLabel("profileEnd",e)}}};class h{#d=0;#c=0;#u=0;#f=null;constructor(e){if("string"!=typeof e)throw new TypeError("[TinyVersion] Expected version to be a string, received type: "+typeof e);const t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/),r=e=>{"string"==typeof e[1]&&(this.#d=parseInt(e[1],10)),"string"==typeof e[2]&&(this.#c=parseInt(e[2],10)),"string"==typeof e[3]&&(this.#u=parseInt(e[3],10)),"string"==typeof e[4]&&(this.#f=e[4])};if(t)r(t);else{const t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(t)r(t);else{const t=e.match(/^(\d+)\.(\d+)$/);if(t)r(t);else{const t=e.match(/^(\d+)$/);if(!t)throw new Error(`[TinyVersion] Invalid version format: "${e}". Expected format: "X.Y.Z" or "X.Y.Z-tag".`);r(t)}}}}get major(){return this.#d}get minor(){return this.#c}get patch(){return this.#u}get tag(){return this.#f}isGreaterThan(e){if(!(e instanceof h))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof e);return this.#d!==e.major?this.#d>e.major:this.#c!==e.minor?this.#c>e.minor:this.#u!==e.patch?this.#u>e.patch:null===this.#f&&null!==e.tag||(null===this.#f||null!==e.tag)&&(null!==this.#f||null!==e.tag)&&(this.#f??"")>(e.tag??"")}isEqualTo(e){if(!(e instanceof h))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof e);return this.#d===e.major&&this.#c===e.minor&&this.#u===e.patch&&this.#f===e.tag}isLessThan(e){if(!(e instanceof h))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof e);return!this.isGreaterThan(e)&&!this.isEqualTo(e)}toString(){const e=`${this.#d}.${this.#c}.${this.#u}`;return this.#f?`${e}-${this.#f}`:e}}const g=h,d=e=>t=>{if(t)throw new Error(`This ${e} instance has been destroyed and can no longer be used.`)},c=d("TinyPlugin"),u=(e,t)=>t instanceof Set?t.has("*")||t.has(e):t.indexOf("*")>-1||t.indexOf(e)>-1,f=(e,t,r)=>{const s=(e,t)=>{if(!Array.isArray(t)||!t.every(e=>"string"==typeof e||"symbol"==typeof e))throw new TypeError(`The ${e} of sandbox blacklist must be an array of strings.`)};if(i(r)&&i(e?.sandboxBlacklist)){const{get:t,set:i}=e.sandboxBlacklist;void 0!==t&&(s("get",t),t.forEach(e=>r.get.add(e))),void 0!==i&&(s("set",i),i.forEach(e=>r.set.add(e)))}if(i(e?.accessControl)){const{mode:r,whitelist:o,blacklist:n,publicKey:a,cryptoAlgorithm:l,importAlgorithm:h,importKeyFormat:g}=e.accessControl;if("none"!==r&&"whitelist"!==r&&"blacklist"!==r&&"cryptographic"!==r)throw new TypeError('accessControl.mode must be "none", "whitelist", "blacklist", or "cryptographic".');if("cryptographic"===r&&"string"!=typeof a)throw new TypeError("In cryptographic mode, accessControl.publicKey must be a string (PEM format).");i(o)&&(void 0!==o.ids&&(s("whitelist ids",o.ids),o.ids.forEach(e=>t.whitelist.ids.add(e))),void 0!==o.authors&&(s("whistlist authors",o.authors),o.authors.forEach(e=>t.whitelist.authors.add(e))),void 0!==o.categories&&(s("whistlist categories",o.categories),o.categories.forEach(e=>t.whitelist.categories.add(e))),void 0!==o.tags&&(s("whistlist tags",o.tags),o.tags.forEach(e=>t.whitelist.tags.add(e)))),i(n)&&(void 0!==n.ids&&(s("blacklist ids",n.ids),n.ids.forEach(e=>t.blacklist.ids.add(e))),void 0!==n.authors&&(s("blacklist authors",n.authors),n.authors.forEach(e=>t.blacklist.authors.add(e))),void 0!==n.categories&&(s("blacklist categories",n.categories),n.categories.forEach(e=>t.blacklist.categories.add(e))),void 0!==n.tags&&(s("blacklist tags",n.tags),n.tags.forEach(e=>t.blacklist.tags.add(e)))),"string"==typeof r&&(t.mode=r),"string"==typeof a&&(t.publicKey=a),void 0!==l&&(t.cryptoAlgorithm=l),void 0!==h&&(t.importAlgorithm=h),void 0!==g&&(t.importKeyFormat=g)}},p=e=>{const t=globalThis.atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer},y=async(e,t,r,i,s,o,n)=>{const{publicKey:a,cryptoAlgorithm:l,importKeyFormat:h,importAlgorithm:g}=e,d=((e,t,r,i)=>{if("string"!=typeof e)throw new TypeError("Security Error: Cryptographic mode enabled, but pluginId is missing.");if(!Array.isArray(t))throw new TypeError("Security Error: Cryptographic mode enabled, but authors is missing.");if(!t.every(e=>"string"==typeof e))throw new TypeError("Security Error: Cryptographic mode enabled, but authors is invalid.");return JSON.stringify({id:e,authors:[...t].sort(),categories:[...r].sort(),tags:[...i].sort()})})(r,i,s,o);try{if("string"!=typeof a)throw new TypeError("Security Error: Cryptographic mode enabled, but public key is missing.");if(!("string"==typeof n||n instanceof ArrayBuffer||n instanceof Uint8Array))throw new TypeError("Security Error: Cryptographic mode enabled, but signature is invalid (must be string, ArrayBuffer, or Uint8Array).");const e=(new TextEncoder).encode(d);let i;i="spki"===h||"pkcs8"===h?(e=>{const t=e.replace(/(-----(BEGIN|END) [^-]+-----)/g,"").replace(/\s+/g,"");return p(t)})(a):"string"==typeof a?p(a):a;const s="string"==typeof n?p(n):n,o=await crypto.subtle.importKey(h,i,g,!1,["verify"]),c=await crypto.subtle.verify(l,o,s,e);return c&&t.add(r),c}catch(e){return console.error(e),!1}},w=(e,t,r,i,s,o,n,a)=>{if("cryptographic"===e)return a.has(t);if("whitelist"===e){const e=u(t,o.ids),n=r.some(e=>u(e,o.authors)),a=i.some(e=>u(e,o.categories)),l=s.some(e=>u(e,o.tags));return e||n||a||l}if("blacklist"===e){const e=u(t,n.ids),o=r.some(e=>u(e,n.authors)),a=i.some(e=>u(e,n.categories)),l=s.some(e=>u(e,n.tags));return!(e||o||a||l)}return!0},m=()=>({mode:"none",importKeyFormat:"spki",importAlgorithm:{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},cryptoAlgorithm:{name:"RSASSA-PKCS1-v1_5"},publicKey:null,whitelist:{ids:new Set,authors:new Set,categories:new Set,tags:new Set},blacklist:{ids:new Set,authors:new Set,categories:new Set,tags:new Set}}),b=(e,t,r,s,o,n,a)=>{const l=[...s],h=[...o],g=t??{get:[],set:[]},d=[...n??[],...g.get],c=[...d,...g.set,...a??[]];return i(r)&&(d.forEach(e=>r.get.add(e)),c.forEach(e=>r.set.add(e))),new Proxy(e,{get(e,t){if(h.includes(t)||h.includes("*")){const r=Reflect.get(e,t,e);return"function"==typeof r?r.bind(e):r}throw new Error(`Security Error: Access to property "${String(t)}" is denied by the sandbox.`)},set(e,t,r){if(l.includes(t)||l.includes("*"))return Reflect.set(e,t,r);throw new Error("Security Error: Cannot modify read-only properties on the plugin sandbox.")},setPrototypeOf(){throw new Error("Security Error: Prototype manipulation is forbidden.")}})};class E extends l{#p=!1;#y=new Set;#w=m();get isReady(){return this.#p}get accessControlWhitelist(){return Object.freeze({ids:Object.freeze([...this.#w.whitelist.ids]),authors:Object.freeze([...this.#w.whitelist.authors]),categories:Object.freeze([...this.#w.whitelist.categories]),tags:Object.freeze([...this.#w.whitelist.tags])})}get accessControlBlacklist(){return Object.freeze({ids:Object.freeze([...this.#w.blacklist.ids]),authors:Object.freeze([...this.#w.blacklist.authors]),categories:Object.freeze([...this.#w.blacklist.categories]),tags:Object.freeze([...this.#w.blacklist.tags])})}get accessControlMode(){return this.#w.mode}constructor(e){super(e?.logCfg??{id:"[_main_class_TinyPluginLayer_reset_]",logger:console,autoHideId:!0,debugMode:!1,useLogColors:!1}),f(e??{},this.#w)}_startLayer(e,t,...r){if(this.#p)throw new Error("TinyPluginLayer: The layer has already been initialized.");return this.logSubId=e.logSubId,"function"==typeof t&&t(...r),this.#p=!0,this}canAccessLayer(e,t,r,i){const{mode:s,whitelist:o,blacklist:n}=this.#w;return w(s,e,t,r,i,o,n,this.#y)}async verifyPluginSignature(e,t,r,i,s){return y(this.#w,this.#y,e,t,r,i,s)}_createSandbox(e,t){return b(this,null,null,[...e],["isReady","accessControlMode","accessControlWhitelist","accessControlBlacklist","verifyPluginSignature","canAccessLayer",...t])}}class v extends l{static#m=E;static get TinyPluginLayer(){return v.#m}static#b="pluginsDestroyed";#E={get:new Set,set:new Set};#w=m();#y=new Set;static get pluginsDestroyEventName(){return v.pluginsDestroyEventName}static set pluginsDestroyEventName(e){if("string"!=typeof e)throw new TypeError("pluginsDestroyEventName must be a string.");v.pluginsDestroyEventName=e}#v=new Map;get sandboxBlacklist(){return Object.freeze({set:Object.freeze([...this.#E.set]),get:Object.freeze([...this.#E.get])})}get plugins(){return Object.fromEntries(this.#v)}get pluginsSize(){return this.#v.size}get accessControlWhitelist(){return Object.freeze({ids:Object.freeze([...this.#w.whitelist.ids]),authors:Object.freeze([...this.#w.whitelist.authors]),categories:Object.freeze([...this.#w.whitelist.categories]),tags:Object.freeze([...this.#w.whitelist.tags])})}get accessControlBlacklist(){return Object.freeze({ids:Object.freeze([...this.#w.blacklist.ids]),authors:Object.freeze([...this.#w.blacklist.authors]),categories:Object.freeze([...this.#w.blacklist.categories]),tags:Object.freeze([...this.#w.blacklist.tags])})}get accessControlMode(){return this.#w.mode}constructor(e){super(e.logCfg),f(e,this.#w,this.#E)}canAccessEngine(e,t,r,i){const{mode:s,whitelist:o,blacklist:n}=this.#w;return w(s,e,t,r,i,o,n,this.#y)}async verifyPluginSignature(e,t,r,i,s){return y(this.#w,this.#y,e,t,r,i,s)}_addPlugin(e){if(!(e instanceof L))throw new TypeError("The provided plugin must be an instance of TinyPlugin.");if(!this.canAccessEngine(e.id,e.authors,e.categories,e.tags))throw new Error(`Security Error: Access to the core is denied for plugin "${e.id}" based on current access control rules.`);this.#v.set(e.id,e)}installPlugin(e,...t){return L._addModuleToCore(this,e,...t)}hasPlugin(e){return this.#v.has("string"==typeof e?e:e.id)}getPlugin(e){const t=this.#v.get(e);return t&&!t.isDestroyed?t:void 0}_getPlugin(e,t){if(!(t instanceof L))throw new TypeError("The provided external plugin must be an instance of TinyPlugin.");const r=this.#v.get(e);if(r&&!r.isDestroyed){if(!r.layer.canAccessLayer(t.id,t.authors,t.categories,t.tags))throw new Error(`Security Error: Access to the plugin "${e}" is denied for plugin "${t.id}" based on current plugin access control rules.`);return r}}destroyPlugins(){this.#y.clear(),this.#v.forEach(e=>e.destroy()),this.emit(v.#b)}}class L extends l{static#L={id:"[_main_class_TinyPlugin_reset_]",autoHideId:!0,logger:console,debugMode:!1,canEmitLogs:!1,useLogColors:!0};static get logCfg(){return{...L.#L}}static set logCfg(e){this.#L=e}static _addModuleToCore(e,t,...r){if(!(e instanceof v))throw new TypeError("The provided engine must be an instance of TinyPluginCore.");const i=new L({engine:e,installer:t,logCfg:{...L.#L,debugMode:e.debugMode}},...r);if(i._startPlugin(),e.hasPlugin(i))throw new Error(`A plugin with the name "${i.id}" is already registered.`);return e._addPlugin(i),i}#E={get:new Set,set:new Set};#T="";#C="";#S=new Set;#k=new Set;#x=new Set;#A=new Set;#O=null;#_;#P;#j;#p=!1;#M=null;#D=!1;#R=new Set;#I=new Set;get isDestroyed(){return this.#D}get plugins(){return c(this.#D),Object.keys(this.#_.plugins)}get pluginsSize(){return c(this.#D),this.#_.pluginsSize}getPlugin(e){return c(this.#D),this.#_._getPlugin(e,this)}hasPlugin(e){return c(this.#D),this.#_.hasPlugin(e)}get isReady(){return c(this.#D),this.#p}get id(){if(c(this.#D),0===this.#T.length)throw new Error("Plugin id is not set.");return this.#T}set id(e){if(c(this.#D),0!==this.#T.length)throw new Error("Id is already set.");if("string"!=typeof e)throw new TypeError("Id must be a string.");if(0===e.length)throw new TypeError("Id cannot be empty.");this.#T=e,this.logSubId=`${this.#_.logId} [_sub_class_${e}_reset_]`}get description(){if(c(this.#D),0===this.#C.length)throw new Error("Plugin description is not set.");return this.#C}set description(e){if(c(this.#D),0!==this.#C.length)throw new Error("Description is already set.");if("string"!=typeof e)throw new TypeError("Description must be a string.");if(0===e.length)throw new TypeError("Description cannot be empty.");this.#C=e}get authors(){if(c(this.#D),0===this.#S.size)throw new Error("Plugin authors is not set.");return Object.freeze([...this.#S])}set authors(e){if(c(this.#D),0!==this.#S.size)throw new Error("Authors is already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Authors must be a array of non-empty strings.");if(0===e.length)throw new TypeError("Authors cannot be empty.");e.forEach(e=>this.#S.add(e))}get contributors(){if(c(this.#D),0===this.#k.size)throw new Error("Plugin contributors is not set.");return Object.freeze([...this.#k])}set contributors(e){if(c(this.#D),0!==this.#k.size)throw new Error("Authors is already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Authors must be a array of non-empty strings.");if(0===e.length)throw new TypeError("Authors cannot be empty.");e.forEach(e=>this.#k.add(e))}get categories(){if(c(this.#D),0===this.#x.size)throw new Error("Plugin categories are not set.");return Object.freeze([...this.#x])}set categories(e){if(c(this.#D),0!==this.#x.size)throw new Error("Categories are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Categories must be an array of non-empty strings.");if(0===e.length)throw new TypeError("Categories cannot be empty.");e.forEach(e=>this.#x.add(e))}get tags(){if(c(this.#D),0===this.#A.size)throw new Error("Plugin tags are not set.");return Object.freeze([...this.#A])}set tags(e){if(c(this.#D),0!==this.#A.size)throw new Error("Tags are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Tags must be an array of non-empty strings.");if(0===e.length)throw new TypeError("Tags cannot be empty.");e.forEach(e=>this.#A.add(e))}get allowedSets(){return c(this.#D),[...this.#I]}set allowedSets(e){if(c(this.#D),0!==this.#I.size||this.#p)throw new Error("AllowedSets are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("AllowedSets must be an array of non-empty strings.");if(0===e.length)throw new TypeError("AllowedSets cannot be empty.");e.forEach(e=>this.#I.add(e))}get allowedGets(){return c(this.#D),[...this.#R]}set allowedGets(e){if(c(this.#D),0!==this.#R.size||this.#p)throw new Error("AllowedGets are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("AllowedGets must be an array of non-empty strings.");if(0===e.length)throw new TypeError("AllowedGets cannot be empty.");e.forEach(e=>this.#R.add(e))}get version(){if(c(this.#D),!this.#O)throw new Error("Plugin version is not set.");return this.#O.toString()}set version(e){if(c(this.#D),this.#O)throw new Error("Version is already set.");if("string"!=typeof e)throw new TypeError("Version must be a string.");if(0===e.length)throw new TypeError("Version cannot be empty.");this.#O=new g(e)}get tinyVersion(){if(c(this.#D),!this.#O)throw new Error("Plugin version is not set.");return this.#O}get layer(){if(c(this.#D),null===this.#M)throw new Error("Plugin layer is not set.");return this.#M._createSandbox([...this.#I],[...this.#R])}get engine(){if(c(this.#D),!this.#_.canAccessEngine(this.#T,[...this.#S],[...this.#x],[...this.#A]))throw new Error(`Security Error: Access to the engine is denied for plugin "${this.id}" based on current access control rules.`);const e=this.#E;return new Proxy(this.#_,{get(t,r){if(e.get.has(r))throw new Error(`Security Error: Access to property "${String(r)}" is denied by the sandbox.`);const i=Reflect.get(t,r,t);return"function"==typeof i?i.bind(t):i},set(t,r,i){if(e.set.has(r))throw new Error("Security Error: Cannot modify read-only properties on the plugin sandbox.");return Reflect.set(t,r,i)},setPrototypeOf(){throw new Error("Security Error: Prototype manipulation is forbidden.")}})}get options(){return c(this.#D),this.#j}get engineBlacklist(){return c(this.#D),this.#_.sandboxBlacklist}constructor({engine:e,logCfg:t,installer:r},...i){super(t),this.#_=e,this.#P=r,this.#j=i}#z(){const e=["id","version","description","authors","contributors","categories","tags","allowedGets","allowedSets"];return b(this,this.#_.sandboxBlacklist,this.#E,e,[...e,"tinyVersion","isReady","layer","options","engine","engineBlacklist","isDestroyed","pluginsSize","plugins","hasPlugin","getPlugin","log","logClear","logGroupEnd","logLabel","logTimeLabel","logAssert","logDir","logTable","toConsole","isDestroyed"],["getPlugin","_getPlugin","plugins","installPlugin","_addPlugin","destroyPlugins"],["accessControlMode","accessControlWhitelist","accessControlBlacklist","verifyPluginSignature","canAccessEngine"])}_startPlugin(){if(c(this.#D),this.#p)throw new Error("Plugin is already ready.");this.#j&&Object.freeze(this.#j);const e=this.#z();try{if(this.#M=this.#P(e,...this.#j),!(this.#M instanceof E))throw new TypeError("Plugin layer is not a valid TinyPluginLayer instance.");if(this.#M.debugMode=this.debugMode,this.#M.isReady||this.#M._startLayer(this),0===this.#T.length)throw new Error("Plugin id is not set.");if(0===this.#C.length)throw new Error("Plugin description is not set.");if(0===this.#S.size)throw new Error("Plugin authors are not set.");if(0===this.#k.size)throw new Error("Plugin contributors are not set.");if(0===this.#x.size)throw new Error("Plugin categories are not set.");if(0===this.#A.size)throw new Error("Plugin tags are not set.");if(!this.#O)throw new Error("Plugin version is not set.");this.#p=!0}catch(e){throw this.emit("error",e),this.destroy(),new Error(`Plugin initialization failed: ${e instanceof Error?e.message:"Unknown Error"}`)}}destroy(){this.#D||(this.emit("destroyed"),this.#M?.emit("destroyed"),this.#D=!0)}}const T=d("TinyWebWorker");class C extends v{static#$(e){if(e.startsWith("ww:"))throw new TypeError(`The event type "${e}" is reserved for internal Web Worker lifecycle management.`)}#W=null;#T;#F;#H;#p=!1;#D=!1;#B=new Map;#N=new Map;#G=null;#U=null;get isReady(){return this.#p}get isDestroyed(){return this.#D}get worker(){return T(this.#D),this.#W}constructor({id:e,workerUrl:t,workerOptions:r={},logger:i,debugMode:s,useLogColors:o}){if(super({logCfg:{id:"[_sub_class_TinyWebWorker_reset_]",logger:i??console,debugMode:s??!1,useLogColors:o??!1}}),"string"!=typeof e||""===e.trim())throw new TypeError('The "id" parameter must be a non-empty string.');if("string"!=typeof t&&!(t instanceof URL))throw new TypeError('The "workerUrl" parameter must be a string or URL.');this.#T=e,this.#F=t,this.#H=r}async init(){if(T(this.#D),this.#W)throw new Error("Worker is already initialized.");return new Promise((e,t)=>{try{this.#W=new Worker(this.#F,this.#H)}catch(e){return this.log("error","Failed to instantiate Worker:",e),t(e)}this.#G=t=>{const r=t.data;if(Array.isArray(r)||"object"!=typeof r||null===r)return;if("string"!=typeof r.type)return;if("ww:EngineReady"===r.type)return this.#p=!0,super.emit("ww:Started"),void e();const i=r.type,s=r.data,o=r.correlationId,n=r.isApi;if("ww:ApiResponse"===i){if("string"!=typeof o)return;const e=this.#B.get(o);return void(e&&(clearTimeout(e.timer),this.#B.delete(o),r.error?e.reject(new Error(r.error)):e.resolve(s)))}if(!0===n){if("string"!=typeof o)return;const e=this.#N.get(i);if(!e)return void this.#W?.postMessage({correlationId:o,type:"ww:ApiResponse",error:`No API handler registered in Main Thread for type: ${i}`});try{const t=e=>this.#W?.postMessage({correlationId:o,type:"ww:ApiResponse",data:e}),r=e({data:s,correlationId:o});r instanceof Promise?r.then(t).catch(e=>{this.#W?.postMessage({correlationId:o,type:"ww:ApiResponse",error:e instanceof Error?e.message:String(e)})}):t(r)}catch(e){this.#W?.postMessage({correlationId:o,type:"ww:ApiResponse",error:e instanceof Error?e.message:String(e)})}return}super.emit(i,{data:s,event:t})},this.#U=e=>{this.log("error",`Worker Error [${this.#T}]:`,e.message),super.emit("ww:Error",{error:e}),t(new Error(`Web Worker [${this.#T}] failed to start: ${e.message||"unknown error"}`))},this.#W.addEventListener("message",this.#G),this.#W.addEventListener("error",this.#U)})}#K(e,t,r=!1){if(T(this.#D),!this.#W)throw new Error("Worker is not initialized.");if("string"!=typeof e)throw new TypeError("Payload.type must be a string.");if(void 0!==t&&(Array.isArray(t)||"object"!=typeof t||null===t))throw new TypeError("Payload.data must be a non-null object.");r&&C.#$(e),this.#W.postMessage({type:e,data:t})}emitMessage(e,t){this.#K(e,t,!0)}onApi(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function.");this.#N.set(e,t)}offApi(e){return this.#N.delete(e)}async emitApi(e,t,r=1e4){if(T(this.#D),!this.#W)throw new Error("Worker is not initialized.");const i=crypto.randomUUID();return new Promise((s,o)=>{const n=setTimeout(()=>{this.#B.has(i)&&(this.#B.delete(i),o(new Error(`API request timeout: ${e} (ID: ${i})`)))},r);this.#B.set(i,{resolve:s,reject:o,timer:n}),this.#W?.postMessage({type:e,data:t,correlationId:i,isApi:!0})})}terminate(){this.#D||(this.#W&&(this.#G&&this.#W.removeEventListener("message",this.#G),this.#U&&this.#W.removeEventListener("error",this.#U),this.#W.terminate(),this.log("info",`Web Worker [${this.#T}] terminated.`)),this.#W=null,this.#G=null,this.#U=null,this.#p=!1,super.emit("ww:Terminated"))}destroy(){this.#D||(this.terminate(),this.removeAllListeners(),this.destroyPlugins(),this.#D=!0,this.log("info",`[${this.#T}] Destroyed successfully.`))}}const S=C;window.TinyWebWorker=t.TinyWebWorker})();
@@ -0,0 +1 @@
1
+ (()=>{"use strict";const e={cw:e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};let t={};e.d(t,{TinyWebWorkerEngine:()=>C});var r=e.cw(function(e,t){var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}e.exports=n,e.exports.once=function(e,t){return new Promise(function(r,i){function s(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,s)})},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function g(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var s,o,n,a;if(l(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),n=o[t]),void 0===n)n=o[t]=r,++e._eventsCount;else if("function"==typeof n?n=o[t]=i?[r,n]:[n,r]:i?n.unshift(r):n.push(r),(s=g(e))>0&&n.length>s&&!n.warned){n.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+n.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=n.length,a=h,console&&console.warn&&console.warn(a)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=c.bind(i);return s.listener=r,i.wrapFn=s,s}function u(e,t,r){var i=e._events;if(void 0===i)return[];var s=i[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(s):p(s,s.length)}function f(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function y(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function s(o){i.once&&e.removeEventListener(t,s),r(o)})}}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return g(this)},n.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var n;if(t.length>0&&(n=t[0]),n instanceof Error)throw n;var a=new Error("Unhandled error."+(n?" ("+n.message+")":""));throw a.context=n,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)s(l,this,t);else{var g=l.length,h=p(l,g);for(r=0;r<g;++r)s(h[r],this,t)}return!0},n.prototype.addListener=function(e,t){return h(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return h(this,e,t,!0)},n.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,s,o,n;if(l(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){n=r[o].listener,s=o;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,s),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,n||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var s,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(s=o[i])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},n.prototype.listeners=function(e){return u(this,e,!0)},n.prototype.rawListeners=function(e){return u(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},n.prototype.listenerCount=f,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"===Object.prototype.toString.call(e)}r();const s="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:null,o="undefined"!=typeof document?document:null,n=["chrome","firefox","ie","edge","safari","opera","yandex","other"];const a=r().EventEmitter,l=class extends a{#e;#t;#r=null;#i;#s;#o;#n;#a=new Map([["log",""],["info",""],["warn",""],["error",""],["debug",""],["main_class",""],["sub_class",""],["reset",""],["black",""],["red",""],["green",""],["yellow",""],["blue",""],["magenta",""],["cyan",""],["white",""],["gray",""]]);#l=new Map([["log","[_log_LOG_reset_]"],["info","[_info_INFO_reset_]"],["warn","[_warn_WARN_reset_]"],["error","[_error_ERROR_reset_]"],["debug","[_debug_DEBUG_reset_]"]]);constructor({logger:e,id:t,debugMode:r,canEmitLogs:i=!1,useLogColors:a=!1,autoHideId:l=!1}){if(super(),null===(g=e)||"object"!=typeof g||Array.isArray(g))throw new TypeError("Logger must be an object that implements the Console interface.");var g;if("string"!=typeof t)throw new TypeError("Logger instance id must be a string.");if("boolean"!=typeof r)throw new TypeError("debugMode must be a boolean.");if("boolean"!=typeof i)throw new TypeError("canEmitLogs must be a boolean.");if("boolean"!=typeof a)throw new TypeError("useLogColors must be a boolean.");if("boolean"!=typeof l)throw new TypeError("autoHideId must be a boolean.");this.#t=t,this.#e=e,this.#s=r,this.#i=i,this.#n=l,this.#o="firefox"!==function(e=[]){const t=function(e=[]){if(!Array.isArray(e))throw new TypeError('The "disable" argument must be an array.');for(const t of e)if(!n.includes(t))throw new TypeError(`Invalid browser name provided in disable array: ${t}`);const t={chrome:0,firefox:0,ie:0,edge:0,safari:0,opera:0,yandex:0,other:0};t[function(){if("undefined"==typeof navigator)return"other";const e=navigator.userAgent;return-1!==e.indexOf("Chrome")?"chrome":-1!==e.indexOf("Firefox")?"firefox":-1!==e.indexOf("MSIE")?"ie":-1!==e.indexOf("Edge")?"edge":-1!==e.indexOf("Safari")?"safari":-1!==e.indexOf("Opera")?"opera":-1!==e.indexOf("YaBrowser")?"yandex":"other"}()]++;const r=function(){const e=s?.getComputedStyle?(Array.prototype.slice.call(s.getComputedStyle(document.documentElement,"")).join("").match(/-(moz|webkit|ms)-/)??["",""])[1]:"";return"moz"===e?"gecko":"webkit"===e?"webkit":"ms"===e?"trident":"other"}();"gecko"===r?e.indexOf("firefox")<0&&t.firefox++:"webkit"===r?(e.indexOf("chrome")<0&&t.chrome++,e.indexOf("safari")<0&&t.safari++,e.indexOf("opera")<0&&t.opera++,e.indexOf("edge")<0&&t.edge++):"trident"===r?e.indexOf("ie")<0&&t.ie++:e.indexOf("other")<0&&t.other++;const i=function(){const e=!!s?.opr&&!!opr.addons||!!s?.opera||navigator.userAgent.indexOf(" OPR/")>=0,t="undefined"!=typeof InstallTrigger,r=!!s?.HTMLElement&&/constructor/i.test(s.HTMLElement)||"[object SafariRemoteNotification]"===(!s.safari||"undefined"!=typeof safari&&safari.pushNotification).toString(),i=!!o?.documentMode,n=!i&&!!s?.StyleMedia,a=!!s?.chrome;return{isOpera:e,isFirefox:t,isSafari:r,isIE:i,isEdge:n,isChrome:a,isBlink:(a||e)&&!!s?.CSS}}();return i.isOpera&&e.indexOf("opera")<0&&t.opera++,i.isFirefox&&e.indexOf("firefox")<0&&t.firefox++,i.isSafari&&e.indexOf("safari")<0&&t.safari++,i.isIE&&e.indexOf("ie")<0&&t.ie++,i.isEdge&&e.indexOf("edge")<0&&t.edge++,i.isChrome&&e.indexOf("chrome")<0&&t.chrome++,t}(e);return Object.keys(t).reduce((e,r)=>t[r]>t[e]?r:e)}()&&a,this.log("info","Emit logs of debug mode set to: "+(this.#s?"ON":"OFF")),this.log("info","Custom logger assigned.")}get logId(){return this.#t}get logSubId(){if("string"!=typeof this.#r)throw new Error('logSubId has not been set yet. Assign a string to "logSubId" before reading it.');return this.#r}set logSubId(e){if("string"!=typeof e)throw new TypeError(`logSubId must be a string. Received: ${typeof e}.`);if(null!==this.#r)throw new Error(`logSubId is already set to "${this.#r}" and cannot be reassigned.`);this.#r=e,this.emit("setLogSubId",e)}get canEmitLogs(){return this.#i}get useLogColors(){return this.#o}set useLogColors(e){if("boolean"!=typeof e)throw new TypeError("useLogColors must be a boolean.");this.#o=e,this.log("info","Log Colors usage mode set to: "+(this.#o?"ON":"OFF")),this.emit("setUseLogColors",e)}get debugMode(){return this.#s}set debugMode(e){if("boolean"!=typeof e)throw new TypeError("debugMode must be a boolean.");this.#s=e,this.log("info","Debug mode set to: "+(this.#s?"ON":"OFF")),this.emit("setDebugMode",e)}_addLogColor(e,t){this.#a.set(e,t)}_removeLogColor(e){this.#a.delete(e)}_addLogPrefix(e,t){this.#l.set(e,t)}_removeLogPrefix(e){this.#l.delete(e)}#g(e){if("string"!=typeof e)return e;let t=e;for(const[e,r]of this.#l){const i=new RegExp(`\\:${e}\\:`,"g");t=t.replace(i,r)}for(const[e,r]of this.#a){const i=new RegExp(`\\_${e}\\_`,"g");t=t.replace(i,this.#o?r:"")}return t}_applyLogFormatting(e){return this.#g(e)}logClear(){if(this.#s)return this.#i&&this.emit("debug:clear"),this.#e.clear?this.#e.clear():console.clear()}logGroupEnd(){if(this.#s)return this.#i&&this.emit("debug:groupEnd"),this.#e.groupEnd?this.#e.groupEnd():console.groupEnd()}logLabel(e,t){if(!this.#s)return;const r=["count","countReset","time","timeEnd","profile","profileEnd","timeStamp"];if(!r.includes(e))throw new TypeError(`Invalid logType. Expected one of: ${r.join(", ")}`);if(void 0!==t&&"string"!=typeof t)throw new TypeError("The label must be a string.");const i=this.#e[e]?this.#e[e]:console[e];if(!i)throw new TypeError(`The log type "${e}" is not supported by the provided logger or console.`);return this.#i&&this.emit("debug:logLabel",e,t),i(t)}logTimeLabel(e,...t){if(this.#s)return this.#i&&this.emit("debug:timeLog",e,...t),this.#e.timeLog?this.#e.timeLog(e,...t):console.timeLog(e,...t)}logAssert(e,...t){if(this.#s)return this.#i&&this.emit("debug:assert",e,...t),this.#e.assert?this.#e.assert(e,...t):console.assert(e,...t)}logDir(e,t){if(this.#s)return this.#i&&this.emit("debug:dir",e,t),this.#e.dir?this.#e.dir(e,t):console.dir(e,t)}logTable(e,t){if(this.#s){if(!(void 0===t||Array.isArray(t)&&t.every(e=>"string"==typeof e)))throw new TypeError("Properties must be an array of strings.");return this.#i&&this.emit("debug:table",e,t),this.#e.table?this.#e.table(e,t):console.table(e,t)}}log(e,t,...r){if(!this.#s)return;const i=["log","info","warn","error","debug","dirxml","group","groupCollapsed","trace"];if(!i.includes(e))throw new TypeError(`Invalid logType. Expected one of: ${i.join(", ")}`);if("string"!=typeof t)throw new TypeError("The message must be a string.");let s=this.#t,o=this.#r??"",n=t;const a=!this.#n||"string"!=typeof this.#r;s=a?this.#g(s):"",o&&(o=this.#g(o)),n=this.#g(n);const l=`${s}${o?a?` ${o}`:o:""}`,g=this.#e[e]?this.#e[e]:console[e];return g?(this.#i&&this.emit("debug:log",l,n,...r),g(l,n,...r)):(this.#i&&this.emit("debug:log",l,n,...r),console.log(l,n,...r))}#h(e,t){const[r="",...i]=t;return"string"==typeof r?this.log(e,r,...i):this.log(e,"",r,...i)}toConsole(){return{log:(...e)=>this.#h("log",e),info:(...e)=>this.#h("info",e),warn:(...e)=>this.#h("warn",e),error:(...e)=>this.#h("error",e),debug:(...e)=>this.#h("debug",e),dirxml:(...e)=>this.#h("dirxml",e),group:(...e)=>this.#h("group",e),groupCollapsed:(...e)=>this.#h("groupCollapsed",e),trace:(...e)=>this.#h("trace",e),assert:(e,...t)=>this.logAssert(e,...t),dir:(e,t)=>this.logDir(e,t),table:(e,t)=>this.logTable(e,t),clear:()=>this.logClear(),groupEnd:()=>this.logGroupEnd(),count:e=>this.logLabel("count",e),countReset:e=>this.logLabel("countReset",e),time:e=>this.logLabel("time",e),timeEnd:e=>this.logLabel("timeEnd",e),timeLog:(e,...t)=>this.logTimeLabel(e,...t),timeStamp:e=>this.logLabel("timeStamp",e),profile:e=>this.logLabel("profile",e),profileEnd:e=>this.logLabel("profileEnd",e)}}};class g{#c=0;#d=0;#u=0;#f=null;constructor(e){if("string"!=typeof e)throw new TypeError("[TinyVersion] Expected version to be a string, received type: "+typeof e);const t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/),r=e=>{"string"==typeof e[1]&&(this.#c=parseInt(e[1],10)),"string"==typeof e[2]&&(this.#d=parseInt(e[2],10)),"string"==typeof e[3]&&(this.#u=parseInt(e[3],10)),"string"==typeof e[4]&&(this.#f=e[4])};if(t)r(t);else{const t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(t)r(t);else{const t=e.match(/^(\d+)\.(\d+)$/);if(t)r(t);else{const t=e.match(/^(\d+)$/);if(!t)throw new Error(`[TinyVersion] Invalid version format: "${e}". Expected format: "X.Y.Z" or "X.Y.Z-tag".`);r(t)}}}}get major(){return this.#c}get minor(){return this.#d}get patch(){return this.#u}get tag(){return this.#f}isGreaterThan(e){if(!(e instanceof g))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof e);return this.#c!==e.major?this.#c>e.major:this.#d!==e.minor?this.#d>e.minor:this.#u!==e.patch?this.#u>e.patch:null===this.#f&&null!==e.tag||(null===this.#f||null!==e.tag)&&(null!==this.#f||null!==e.tag)&&(this.#f??"")>(e.tag??"")}isEqualTo(e){if(!(e instanceof g))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof e);return this.#c===e.major&&this.#d===e.minor&&this.#u===e.patch&&this.#f===e.tag}isLessThan(e){if(!(e instanceof g))throw new TypeError("[TinyVersion] Comparison target must be an instance of TinyVersion. Received: "+typeof e);return!this.isGreaterThan(e)&&!this.isEqualTo(e)}toString(){const e=`${this.#c}.${this.#d}.${this.#u}`;return this.#f?`${e}-${this.#f}`:e}}const h=g,c=e=>{if(e)throw new Error("This TinyPlugin instance has been destroyed and can no longer be used.")};const d=(e,t)=>t instanceof Set?t.has("*")||t.has(e):t.indexOf("*")>-1||t.indexOf(e)>-1,u=(e,t,r)=>{const s=(e,t)=>{if(!Array.isArray(t)||!t.every(e=>"string"==typeof e||"symbol"==typeof e))throw new TypeError(`The ${e} of sandbox blacklist must be an array of strings.`)};if(i(r)&&i(e?.sandboxBlacklist)){const{get:t,set:i}=e.sandboxBlacklist;void 0!==t&&(s("get",t),t.forEach(e=>r.get.add(e))),void 0!==i&&(s("set",i),i.forEach(e=>r.set.add(e)))}if(i(e?.accessControl)){const{mode:r,whitelist:o,blacklist:n,publicKey:a,cryptoAlgorithm:l,importAlgorithm:g,importKeyFormat:h}=e.accessControl;if("none"!==r&&"whitelist"!==r&&"blacklist"!==r&&"cryptographic"!==r)throw new TypeError('accessControl.mode must be "none", "whitelist", "blacklist", or "cryptographic".');if("cryptographic"===r&&"string"!=typeof a)throw new TypeError("In cryptographic mode, accessControl.publicKey must be a string (PEM format).");i(o)&&(void 0!==o.ids&&(s("whitelist ids",o.ids),o.ids.forEach(e=>t.whitelist.ids.add(e))),void 0!==o.authors&&(s("whistlist authors",o.authors),o.authors.forEach(e=>t.whitelist.authors.add(e))),void 0!==o.categories&&(s("whistlist categories",o.categories),o.categories.forEach(e=>t.whitelist.categories.add(e))),void 0!==o.tags&&(s("whistlist tags",o.tags),o.tags.forEach(e=>t.whitelist.tags.add(e)))),i(n)&&(void 0!==n.ids&&(s("blacklist ids",n.ids),n.ids.forEach(e=>t.blacklist.ids.add(e))),void 0!==n.authors&&(s("blacklist authors",n.authors),n.authors.forEach(e=>t.blacklist.authors.add(e))),void 0!==n.categories&&(s("blacklist categories",n.categories),n.categories.forEach(e=>t.blacklist.categories.add(e))),void 0!==n.tags&&(s("blacklist tags",n.tags),n.tags.forEach(e=>t.blacklist.tags.add(e)))),"string"==typeof r&&(t.mode=r),"string"==typeof a&&(t.publicKey=a),void 0!==l&&(t.cryptoAlgorithm=l),void 0!==g&&(t.importAlgorithm=g),void 0!==h&&(t.importKeyFormat=h)}},f=e=>{const t=globalThis.atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r.buffer},p=async(e,t,r,i,s,o,n)=>{const{publicKey:a,cryptoAlgorithm:l,importKeyFormat:g,importAlgorithm:h}=e,c=((e,t,r,i)=>{if("string"!=typeof e)throw new TypeError("Security Error: Cryptographic mode enabled, but pluginId is missing.");if(!Array.isArray(t))throw new TypeError("Security Error: Cryptographic mode enabled, but authors is missing.");if(!t.every(e=>"string"==typeof e))throw new TypeError("Security Error: Cryptographic mode enabled, but authors is invalid.");return JSON.stringify({id:e,authors:[...t].sort(),categories:[...r].sort(),tags:[...i].sort()})})(r,i,s,o);try{if("string"!=typeof a)throw new TypeError("Security Error: Cryptographic mode enabled, but public key is missing.");if(!("string"==typeof n||n instanceof ArrayBuffer||n instanceof Uint8Array))throw new TypeError("Security Error: Cryptographic mode enabled, but signature is invalid (must be string, ArrayBuffer, or Uint8Array).");const e=(new TextEncoder).encode(c);let i;i="spki"===g||"pkcs8"===g?(e=>{const t=e.replace(/(-----(BEGIN|END) [^-]+-----)/g,"").replace(/\s+/g,"");return f(t)})(a):"string"==typeof a?f(a):a;const s="string"==typeof n?f(n):n,o=await crypto.subtle.importKey(g,i,h,!1,["verify"]),d=await crypto.subtle.verify(l,o,s,e);return d&&t.add(r),d}catch(e){return console.error(e),!1}},y=(e,t,r,i,s,o,n,a)=>{if("cryptographic"===e)return a.has(t);if("whitelist"===e){const e=d(t,o.ids),n=r.some(e=>d(e,o.authors)),a=i.some(e=>d(e,o.categories)),l=s.some(e=>d(e,o.tags));return e||n||a||l}if("blacklist"===e){const e=d(t,n.ids),o=r.some(e=>d(e,n.authors)),a=i.some(e=>d(e,n.categories)),l=s.some(e=>d(e,n.tags));return!(e||o||a||l)}return!0},w=()=>({mode:"none",importKeyFormat:"spki",importAlgorithm:{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},cryptoAlgorithm:{name:"RSASSA-PKCS1-v1_5"},publicKey:null,whitelist:{ids:new Set,authors:new Set,categories:new Set,tags:new Set},blacklist:{ids:new Set,authors:new Set,categories:new Set,tags:new Set}}),m=(e,t,r,s,o,n,a)=>{const l=[...s],g=[...o],h=t??{get:[],set:[]},c=[...n??[],...h.get],d=[...c,...h.set,...a??[]];return i(r)&&(c.forEach(e=>r.get.add(e)),d.forEach(e=>r.set.add(e))),new Proxy(e,{get(e,t){if(g.includes(t)||g.includes("*")){const r=Reflect.get(e,t,e);return"function"==typeof r?r.bind(e):r}throw new Error(`Security Error: Access to property "${String(t)}" is denied by the sandbox.`)},set(e,t,r){if(l.includes(t)||l.includes("*"))return Reflect.set(e,t,r);throw new Error("Security Error: Cannot modify read-only properties on the plugin sandbox.")},setPrototypeOf(){throw new Error("Security Error: Prototype manipulation is forbidden.")}})};class b extends l{#p=!1;#y=new Set;#w=w();get isReady(){return this.#p}get accessControlWhitelist(){return Object.freeze({ids:Object.freeze([...this.#w.whitelist.ids]),authors:Object.freeze([...this.#w.whitelist.authors]),categories:Object.freeze([...this.#w.whitelist.categories]),tags:Object.freeze([...this.#w.whitelist.tags])})}get accessControlBlacklist(){return Object.freeze({ids:Object.freeze([...this.#w.blacklist.ids]),authors:Object.freeze([...this.#w.blacklist.authors]),categories:Object.freeze([...this.#w.blacklist.categories]),tags:Object.freeze([...this.#w.blacklist.tags])})}get accessControlMode(){return this.#w.mode}constructor(e){super(e?.logCfg??{id:"[_main_class_TinyPluginLayer_reset_]",logger:console,autoHideId:!0,debugMode:!1,useLogColors:!1}),u(e??{},this.#w)}_startLayer(e,t,...r){if(this.#p)throw new Error("TinyPluginLayer: The layer has already been initialized.");return this.logSubId=e.logSubId,"function"==typeof t&&t(...r),this.#p=!0,this}canAccessLayer(e,t,r,i){const{mode:s,whitelist:o,blacklist:n}=this.#w;return y(s,e,t,r,i,o,n,this.#y)}async verifyPluginSignature(e,t,r,i,s){return p(this.#w,this.#y,e,t,r,i,s)}_createSandbox(e,t){return m(this,null,null,[...e],["isReady","accessControlMode","accessControlWhitelist","accessControlBlacklist","verifyPluginSignature","canAccessLayer",...t])}}class E extends l{static#m=b;static get TinyPluginLayer(){return E.#m}static#b="pluginsDestroyed";#E={get:new Set,set:new Set};#w=w();#y=new Set;static get pluginsDestroyEventName(){return E.pluginsDestroyEventName}static set pluginsDestroyEventName(e){if("string"!=typeof e)throw new TypeError("pluginsDestroyEventName must be a string.");E.pluginsDestroyEventName=e}#v=new Map;get sandboxBlacklist(){return Object.freeze({set:Object.freeze([...this.#E.set]),get:Object.freeze([...this.#E.get])})}get plugins(){return Object.fromEntries(this.#v)}get pluginsSize(){return this.#v.size}get accessControlWhitelist(){return Object.freeze({ids:Object.freeze([...this.#w.whitelist.ids]),authors:Object.freeze([...this.#w.whitelist.authors]),categories:Object.freeze([...this.#w.whitelist.categories]),tags:Object.freeze([...this.#w.whitelist.tags])})}get accessControlBlacklist(){return Object.freeze({ids:Object.freeze([...this.#w.blacklist.ids]),authors:Object.freeze([...this.#w.blacklist.authors]),categories:Object.freeze([...this.#w.blacklist.categories]),tags:Object.freeze([...this.#w.blacklist.tags])})}get accessControlMode(){return this.#w.mode}constructor(e){super(e.logCfg),u(e,this.#w,this.#E)}canAccessEngine(e,t,r,i){const{mode:s,whitelist:o,blacklist:n}=this.#w;return y(s,e,t,r,i,o,n,this.#y)}async verifyPluginSignature(e,t,r,i,s){return p(this.#w,this.#y,e,t,r,i,s)}_addPlugin(e){if(!(e instanceof v))throw new TypeError("The provided plugin must be an instance of TinyPlugin.");if(!this.canAccessEngine(e.id,e.authors,e.categories,e.tags))throw new Error(`Security Error: Access to the core is denied for plugin "${e.id}" based on current access control rules.`);this.#v.set(e.id,e)}installPlugin(e,...t){return v._addModuleToCore(this,e,...t)}hasPlugin(e){return this.#v.has("string"==typeof e?e:e.id)}getPlugin(e){const t=this.#v.get(e);return t&&!t.isDestroyed?t:void 0}_getPlugin(e,t){if(!(t instanceof v))throw new TypeError("The provided external plugin must be an instance of TinyPlugin.");const r=this.#v.get(e);if(r&&!r.isDestroyed){if(!r.layer.canAccessLayer(t.id,t.authors,t.categories,t.tags))throw new Error(`Security Error: Access to the plugin "${e}" is denied for plugin "${t.id}" based on current plugin access control rules.`);return r}}destroyPlugins(){this.#y.clear(),this.#v.forEach(e=>e.destroy()),this.emit(E.#b)}}class v extends l{static#L={id:"[_main_class_TinyPlugin_reset_]",autoHideId:!0,logger:console,debugMode:!1,canEmitLogs:!1,useLogColors:!0};static get logCfg(){return{...v.#L}}static set logCfg(e){this.#L=e}static _addModuleToCore(e,t,...r){if(!(e instanceof E))throw new TypeError("The provided engine must be an instance of TinyPluginCore.");const i=new v({engine:e,installer:t,logCfg:{...v.#L,debugMode:e.debugMode}},...r);if(i._startPlugin(),e.hasPlugin(i))throw new Error(`A plugin with the name "${i.id}" is already registered.`);return e._addPlugin(i),i}#E={get:new Set,set:new Set};#T="";#C="";#S=new Set;#x=new Set;#A=new Set;#_=new Set;#O=null;#P;#j;#M;#p=!1;#k=null;#I=!1;#R=new Set;#D=new Set;get isDestroyed(){return this.#I}get plugins(){return c(this.#I),Object.keys(this.#P.plugins)}get pluginsSize(){return c(this.#I),this.#P.pluginsSize}getPlugin(e){return c(this.#I),this.#P._getPlugin(e,this)}hasPlugin(e){return c(this.#I),this.#P.hasPlugin(e)}get isReady(){return c(this.#I),this.#p}get id(){if(c(this.#I),0===this.#T.length)throw new Error("Plugin id is not set.");return this.#T}set id(e){if(c(this.#I),0!==this.#T.length)throw new Error("Id is already set.");if("string"!=typeof e)throw new TypeError("Id must be a string.");if(0===e.length)throw new TypeError("Id cannot be empty.");this.#T=e,this.logSubId=`${this.#P.logId} [_sub_class_${e}_reset_]`}get description(){if(c(this.#I),0===this.#C.length)throw new Error("Plugin description is not set.");return this.#C}set description(e){if(c(this.#I),0!==this.#C.length)throw new Error("Description is already set.");if("string"!=typeof e)throw new TypeError("Description must be a string.");if(0===e.length)throw new TypeError("Description cannot be empty.");this.#C=e}get authors(){if(c(this.#I),0===this.#S.size)throw new Error("Plugin authors is not set.");return Object.freeze([...this.#S])}set authors(e){if(c(this.#I),0!==this.#S.size)throw new Error("Authors is already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Authors must be a array of non-empty strings.");if(0===e.length)throw new TypeError("Authors cannot be empty.");e.forEach(e=>this.#S.add(e))}get contributors(){if(c(this.#I),0===this.#x.size)throw new Error("Plugin contributors is not set.");return Object.freeze([...this.#x])}set contributors(e){if(c(this.#I),0!==this.#x.size)throw new Error("Authors is already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Authors must be a array of non-empty strings.");if(0===e.length)throw new TypeError("Authors cannot be empty.");e.forEach(e=>this.#x.add(e))}get categories(){if(c(this.#I),0===this.#A.size)throw new Error("Plugin categories are not set.");return Object.freeze([...this.#A])}set categories(e){if(c(this.#I),0!==this.#A.size)throw new Error("Categories are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Categories must be an array of non-empty strings.");if(0===e.length)throw new TypeError("Categories cannot be empty.");e.forEach(e=>this.#A.add(e))}get tags(){if(c(this.#I),0===this.#_.size)throw new Error("Plugin tags are not set.");return Object.freeze([...this.#_])}set tags(e){if(c(this.#I),0!==this.#_.size)throw new Error("Tags are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("Tags must be an array of non-empty strings.");if(0===e.length)throw new TypeError("Tags cannot be empty.");e.forEach(e=>this.#_.add(e))}get allowedSets(){return c(this.#I),[...this.#D]}set allowedSets(e){if(c(this.#I),0!==this.#D.size||this.#p)throw new Error("AllowedSets are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("AllowedSets must be an array of non-empty strings.");if(0===e.length)throw new TypeError("AllowedSets cannot be empty.");e.forEach(e=>this.#D.add(e))}get allowedGets(){return c(this.#I),[...this.#R]}set allowedGets(e){if(c(this.#I),0!==this.#R.size||this.#p)throw new Error("AllowedGets are already set.");if(!Array.isArray(e)||!e.every(e=>"string"==typeof e&&0!==e.trim().length))throw new TypeError("AllowedGets must be an array of non-empty strings.");if(0===e.length)throw new TypeError("AllowedGets cannot be empty.");e.forEach(e=>this.#R.add(e))}get version(){if(c(this.#I),!this.#O)throw new Error("Plugin version is not set.");return this.#O.toString()}set version(e){if(c(this.#I),this.#O)throw new Error("Version is already set.");if("string"!=typeof e)throw new TypeError("Version must be a string.");if(0===e.length)throw new TypeError("Version cannot be empty.");this.#O=new h(e)}get tinyVersion(){if(c(this.#I),!this.#O)throw new Error("Plugin version is not set.");return this.#O}get layer(){if(c(this.#I),null===this.#k)throw new Error("Plugin layer is not set.");return this.#k._createSandbox([...this.#D],[...this.#R])}get engine(){if(c(this.#I),!this.#P.canAccessEngine(this.#T,[...this.#S],[...this.#A],[...this.#_]))throw new Error(`Security Error: Access to the engine is denied for plugin "${this.id}" based on current access control rules.`);const e=this.#E;return new Proxy(this.#P,{get(t,r){if(e.get.has(r))throw new Error(`Security Error: Access to property "${String(r)}" is denied by the sandbox.`);const i=Reflect.get(t,r,t);return"function"==typeof i?i.bind(t):i},set(t,r,i){if(e.set.has(r))throw new Error("Security Error: Cannot modify read-only properties on the plugin sandbox.");return Reflect.set(t,r,i)},setPrototypeOf(){throw new Error("Security Error: Prototype manipulation is forbidden.")}})}get options(){return c(this.#I),this.#M}get engineBlacklist(){return c(this.#I),this.#P.sandboxBlacklist}constructor({engine:e,logCfg:t,installer:r},...i){super(t),this.#P=e,this.#j=r,this.#M=i}#z(){const e=["id","version","description","authors","contributors","categories","tags","allowedGets","allowedSets"];return m(this,this.#P.sandboxBlacklist,this.#E,e,[...e,"tinyVersion","isReady","layer","options","engine","engineBlacklist","isDestroyed","pluginsSize","plugins","hasPlugin","getPlugin","log","logClear","logGroupEnd","logLabel","logTimeLabel","logAssert","logDir","logTable","toConsole","isDestroyed"],["getPlugin","_getPlugin","plugins","installPlugin","_addPlugin","destroyPlugins"],["accessControlMode","accessControlWhitelist","accessControlBlacklist","verifyPluginSignature","canAccessEngine"])}_startPlugin(){if(c(this.#I),this.#p)throw new Error("Plugin is already ready.");this.#M&&Object.freeze(this.#M);const e=this.#z();try{if(this.#k=this.#j(e,...this.#M),!(this.#k instanceof b))throw new TypeError("Plugin layer is not a valid TinyPluginLayer instance.");if(this.#k.debugMode=this.debugMode,this.#k.isReady||this.#k._startLayer(this),0===this.#T.length)throw new Error("Plugin id is not set.");if(0===this.#C.length)throw new Error("Plugin description is not set.");if(0===this.#S.size)throw new Error("Plugin authors are not set.");if(0===this.#x.size)throw new Error("Plugin contributors are not set.");if(0===this.#A.size)throw new Error("Plugin categories are not set.");if(0===this.#_.size)throw new Error("Plugin tags are not set.");if(!this.#O)throw new Error("Plugin version is not set.");this.#p=!0}catch(e){throw this.emit("error",e),this.destroy(),new Error(`Plugin initialization failed: ${e instanceof Error?e.message:"Unknown Error"}`)}}destroy(){this.#I||(this.emit("destroyed"),this.#k?.emit("destroyed"),this.#I=!0)}}const L=self;class T extends E{static#$(e){if(e.startsWith("ww:"))throw new TypeError(`The event type "${e}" is reserved for internal Web Worker lifecycle management.`)}#F=new Map;#B=new Map;#N=new Map;#W=!1;get started(){return this.#W}constructor(e={}){super({logCfg:{id:"[_main_class_TinyWW-Engine_reset_]",logger:e.logger??console,debugMode:e.debugMode??!1,useLogColors:e.useLogColors??!1}})}onApi(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function.");this.#F.set(e,t)}offApi(e){return this.#F.delete(e)}addMessageListener(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function.");this.#B.set(e,t)}removeMessageListener(e){return this.#B.delete(e)}emit(e,...t){const r=t[0];if("string"!=typeof e)throw new TypeError("type must be a string.");if(void 0!==r&&(Array.isArray(r)||"object"!=typeof r||null===r))throw new TypeError("data must be a non-null object.");return T.#$(e),L.postMessage({type:e,data:r}),!0}async emitApi(e,t,r=1e4){const i=crypto.randomUUID();return new Promise((s,o)=>{const n=setTimeout(()=>{this.#N.has(i)&&(this.#N.delete(i),o(new Error(`API timeout: ${e}`)))},r);this.#N.set(i,{resolve:s,reject:o,timer:n}),L.postMessage({type:e,data:t,correlationId:i,isApi:!0})})}init(){if(this.#W)throw new Error("TinyWebWorkerEngine is already initialized.");L.addEventListener("message",e=>{const t=e.data;if(Array.isArray(t)||"object"!=typeof t||null===t)return;if("string"!=typeof t.type)return;if(void 0!==t.data&&(Array.isArray(t.data)||"object"!=typeof t.data||null===t.data))return;const{type:r,data:i,correlationId:s,isApi:o,error:n}=t;if("ww:ApiResponse"===r){if("string"!=typeof s)return void this.log("error",'Received API response with missing or invalid "correlationId".');const e=this.#N.get(s);return void(e&&(clearTimeout(e.timer),this.#N.delete(s),n?e.reject(new Error(n)):e.resolve(i)))}if(!0===o){if("string"!=typeof s)return void this.log("error",'Received API request with missing or invalid "correlationId".');const e=this.#F.get(r);if(!e)return void L.postMessage({correlationId:s,type:"ww:ApiResponse",error:`No API handler registered in worker for type: ${r}`});try{const t=e=>L.postMessage({correlationId:s,type:"ww:ApiResponse",data:e}),r=e({data:i,correlationId:s});r instanceof Promise?r.then(t).catch(e=>{L.postMessage({correlationId:s,type:"ww:ApiResponse",error:e instanceof Error?e.message:String(e)})}):t(r)}catch(e){L.postMessage({correlationId:s,type:"ww:ApiResponse",error:e instanceof Error?e.message:String(e)})}return}const a=this.#B.get(r),l={type:r,event:e,data:i};if(super.emit("beforeMessage",l),a)try{a(l)}catch(e){this.log("error",`Error executing handler for message type "${r}":`,e),super.emit("messageError",{type:r,error:e,data:l})}super.emit("afterMessage",l)}),this.#W=!0,this.log("info","Web Worker Engine initialized."),L.postMessage({type:"ww:EngineReady"})}}const C=T;window.TinyWebWorkerEngine=t.TinyWebWorkerEngine})();
@@ -1 +1 @@
1
- (()=>{"use strict";const e={d:(n,t)=>{if(Array.isArray(t))for(var a=0;a<t.length;){var o=t[a++],r=t[a++];e.o(n,o)?0===r&&a++:0===r?Object.defineProperty(n,o,{enumerable:!0,value:t[a++]}):Object.defineProperty(n,o,{enumerable:!0,get:r})}else for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};let n={};e.d(n,{UltraRandomMsgGen:()=>h});const t=e=>{if(e)throw new Error("This UltraRandomMsgGen instance has been destroyed and can no longer be used.")};const a=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","sed","do","eiusmod","tempor","incididunt","ut","labore","et","dolore","magna","aliqua"],o=["😂","🌈","🤖","💥","🐸","🍕","🦄","🧠","🧬","🚀","🫠","💫","🍩","👾","🎉","🥴","🐙","🧃","🪐","🎈","🧸","👻","🥳","🍭","💖","😺","🌮","🪅","🎮","🥓","🍮","🍬","🍓","🍒","🥝","🥑","🍄","🌊","☁️","🌟","🌙","🧚","🐾","🐥","🐼","🐨","🐳","✨","🧁","🌸","🍃","💎","🎐","🎀","🫧","☄️","🛸","🔮"],r=["pudding","bean","snuggle","bloop","jelly","unicorn","floof","giggle","bubble","muffin","puff","pickle","goblin","waffle","sprinkle","cupcake","fizzle","marshmallow","duckling","sock","cloud","teacup","nugget","gnome","hug","moonbean","crayon","jiggle","glitter","carrot","goober"],i=["wiggles","bounces","flies","splats","scoots","giggles","wigglesnacks","twirls","boops","pops","sings","hugs","floats","glows","flaps","mlems","dances","puddles","nomnoms","wigglejumps","sniffs","tumbles","slides","chirps","burps","sparkles","waddles","rambles","blinks","mews"],s=["fluffy","silly","yummy","squishy","wobbly","magical","tiny","sleepy","wiggly","bubbly","glittery","fuzzy","jiggly","sparkly","giggly","crunchy","goofy","soft","mushy","sweet","loopy","floaty","bonkers","chewy","ticklish","dreamy","pastel","cozy","teensy","grumbly"],d=["Boop!","Wiggle achieved.","Oops, {noun} everywhere!","Tiny {adj} {noun}, big {adj} {noun}.","Snuggle initiated with a {adj} {noun}.","{adj} vibes only, powered by {noun}.","No {noun}, no {noun}.","Bounce first, {verb} later.","Mlem. {verb}. {noun}.","{noun} go brrr and {verb}.","Why not? {noun} did. Then {noun} followed.","A {adj} {noun} just {verb} near the {adj} window.","That {adj} {noun} stole my {noun}!","Look, a {adj} {noun} trying to {verb} again!","Every {noun} deserves a {adj} nap.","The {adj} {noun} is my {adj} spirit animal.","Someone call the {noun}, it’s {verb}ing and {verb}ing again!","Don’t touch the {adj} {noun}. It {verb}s loudly.","{noun} forgot how {noun}s work and just {verb}ed.","There once was a {adj} {noun} who loved to {verb} with a {adj} {noun} all day.","Apparently, {noun}s are banned from {verb}ing and {verb}ing in the {noun} library.","That {adj} noise? Just a {noun} learning to {verb} on a {adj} {noun}.","I saw a {adj} {noun} {verb} so hard, it became a {adj} muffin.","The {adj} {noun} met a {adj} pickle and everything {verb}ed.","{noun}s are like {noun}: {adj}, unpredictable, and wiggly.","Don’t judge a {adj} {noun} by its ability to {verb}, or by its {adj} hat.","All I wanted was peace, but a {adj} {noun} with a {adj} {noun} had other plans.","One {adj} morning, a {adj} {noun} decided it was finally time to {verb}, but halfway through, it tripped on a {noun} and turned into a {adj} marshmallow.","I tried to be {adj} today, but then a {noun} {verb}ed across my {noun} and typed “asdfgh{noun}” repeatedly.","If you think you’ve seen everything, wait until a {adj} {noun} {verb}s on a {noun} wearing {adj} socks with tiny {noun}s.","No one ever believed the stories about the ancient {adj} {noun} who could {verb} with such {adj} grace that entire {noun}s turned pink out of embarrassment.","A curious {adj} {noun} wandered into a {noun} shop, not knowing that its destiny involved twelve {adj} {noun}s, one rubber {noun}, and a suspiciously quiet {adj} llama.","In a land where every {adj} {noun} was made of pudding and the sky was {adj} whipped cream, one brave {adj} {noun} set out to discover the legendary Spoon of {noun}s, facing obstacles like bouncing {noun}s, sassy {noun}s, and the Great Wobble of the {noun}.","Once upon a {adj} time, long before the {noun}s learned to {verb}, there existed a tiny {adj} {noun} who dreamed of swimming in a pool made entirely of {adj} glitter pudding while {verb}ing off-key lullabies to passing {noun}s with monocles.","The Council of {noun}s gathered in {adj} secret when the sacred {adj} {noun} started to {verb} uncontrollably, threatening the entire {adj} dessert-based civilization with spontaneous {noun} jiggles and uncontainable {noun} fits across the {noun}.","Hey... do you ever wonder if {noun}s dream of {noun}s?","Okay but hear me out: what if the {adj} {noun} could actually {verb} backwards?","Can we talk about the {noun} that just {verb}ed and vanished?","So I was talking to a {noun}, and it told me to stop being {adj}. Rude.","Not to alarm you, but there’s a {adj} {noun} behind you doing the {verb}.","Why does this {noun} keep staring at me like I owe it pudding?","Is this a safe space to admit I accidentally {verb}ed a {noun}?","I just walked into the room and someone shouted “{adj} {noun}!” — what did I miss?","Wait... we were supposed to bring a {noun}? No one told me!","Okay but what if the {adj} {noun} has feelings too?","Be honest, do I look like a {noun} that forgot how to {verb}?",'If I say "oops", do I still have to explain why the {noun} is glowing?',"I don’t know what’s going on but I brought snacks and a confused {noun}.","Do you think pudding knows it’s pudding? Just a thought.","Is this about the time I {verb}ed the {adj} {noun} by accident? Because I can explain.","Wait, are we talking about {noun}s or am I on the wrong chat again?",'What is this group even about? I just saw "pudding" and joined.',"Hi! I have no idea what’s happening but I’m here and I brought a {noun}.","I blinked and now there’s a {adj} {noun} in charge of everything.","Can someone please explain why the {noun} is floating and chanting?","Okay who gave the {noun} access to glitter and emotional support pickles?","I came for a calm discussion and now there’s a {adj} battle between {noun}s.","Not sure if I’m early, late, or inside a {noun} dream.","I was gone for 3 minutes and now someone’s riding a {noun} into the pudding realm.","This isn’t the pudding appreciation group, is it? ...oh no.","So... who summoned the {adj} {noun} this time? Be honest.","I came here for vibes and stayed for the {noun}s.","Does anyone else hear faint giggling or is that just the {adj} {noun} again?","I feel like I missed step one, two, and also three of this conversation.","All I asked was “what’s up?” and now I’m emotionally attached to a {noun}.",'Me: "I’ll be normal today." Also me: *{verb}s into a meeting riding a {adj} {noun}*','"It’s just pudding," they said. "It can’t hurt you," they said. They were wrong.',"I said one nice thing to a {noun} and now it follows me everywhere.","Can we take a moment to appreciate how the {adj} {noun} is just vibing?","Who put a tiny hat on the {noun}? Because that’s adorable.","My life has been different ever since the {noun} started {verb}ing.","Raise your hand if you’ve ever been personally attacked by a {adj} {noun}.",'"Don’t be weird," they said. So I became a {noun} instead.',"Do {noun}s have feelings? Asking for a {adj} friend.","I trusted the {noun} and all I got was a glitter-covered sock.","Plot twist: the {adj} {noun} was inside us all along.","In the glow of the {adj} moon, the {noun} began to {verb}.","A sprinkle of {adj} dust made the {noun} {verb} through the air.","The {noun} whispered a {adj} secret that made everyone {verb}.","Everything felt {adj} and {adj}, especially when the {noun} {verb}ed.","The {noun} is {verb}ing! The {noun} is {verb}ing! AAAAA!","Glitch in the {noun}: the {adj} {noun} just {verb}ed out of existence.","The {adj} {noun} {verb} and {verb} all over the {adj} {noun}!","Oops! {noun}s {verb}ed into the {adj} {noun} while {verb}ing crazily.","{adj}, {adj}, and more {adj} {noun}s just {verb}ed by!","Why does the {adj} {noun} keep {verb}ing and {verb}ing without stopping?","Look! A {adj} {noun}, a {adj} {noun}, and a {noun} all {verb}ing together!","Sometimes, the {noun} just {verb}s, then {verb}s again, and never stops being {adj}.","{noun}, {noun}, and {noun} — all {verb}ing and {verb}ing in a {adj} {noun}.","I saw a {adj} {noun} {verb}, then another {noun} {verb}ing with a {adj} {noun}.","The {noun} {verb}s {verb} while the {adj} {noun} {verb}s and the {noun} just {verb}s.","Can a {adj} {noun} {verb} {verb} without a {adj} {noun} watching?","Whoa! The {adj} {noun} just {verb}ed... and then {verb}ed again!","Hey... did you see that {adj} {noun} {verb} over there?","Umm, the {noun} is {verb}ing but also {verb}ing and {verb}ing!","Lol! {noun}s {verb} so {adj}ly, it’s impossible not to giggle.",'"Hey! What’s up?" asked the {adj} {noun}, who {verb}ed loudly.','"I’m just a {adj} {noun} trying to {verb}, you know?"','"Did you see the {adj} {noun} that just {verb}ed in the pudding?"','"No way! The {noun} {verb}s better than me!"','"Wait, the {adj} {noun} said it would {verb}, but it {verb}ed instead!"',"Once upon a {adj} {noun}, a group of {adj} {noun}s {verb}ed through the {adj} forest, singing {adj} songs and eating {noun}s made of pudding.","The legend tells of a {adj} {noun} who could {verb} faster than any {noun} ever seen, leaving trails of {adj} sparkles behind.","Every day, the {adj} {noun} would {verb} around the {adj} meadow, trying to convince the {noun}s to join the grand pudding party.","No one knows why the {adj} {noun} suddenly {verb}ed and then {verb}ed again, but everyone agrees it was the cutest thing they ever saw.","In the kingdom of {adj} {noun}s, only the bravest {noun} dared to {verb} the giant pudding monster, armed with nothing but {adj} smiles and jellybeans.","{adj} {noun} {verb} {verb} {verb} {noun} {verb} {adj} {noun} {verb} {noun}!","{noun} {noun} {verb} {adj} {noun} and then {verb} {verb} the {adj} {noun}.","{verb} the {adj} {noun}, then {verb} the {noun} while {verb}ing {adj}ly.","Can the {adj} {noun} {verb} and {verb} the {adj} {noun} at the same time?","{noun} {verb} {noun} {verb}, but the {adj} {noun} {verb}s better.","Boop! The {adj} {noun} just {verb}ed in the pudding.","Bloop bloop, the {noun} is {verb}ing all over again!","Mlem mlem, a {adj} {noun} {verb}s quietly in the corner.","Splat! {noun} {verb}ed right on the {adj} {noun}.","Yum! A {adj} {noun} just {verb}ed in my mouth.","Do {noun}s really {verb} when nobody’s watching?","Why does the {adj} {noun} always {verb} at midnight?","Can a {noun} be too {adj} to {verb} properly?","Is it normal for a {adj} {noun} to {verb} three times in a row?","Who taught the {noun} to {verb} like that?","Wait, did the {adj} {noun} just {verb} itself?","I can’t believe the {noun} {verb}ed into a {adj} {noun}!","Suddenly, a {adj} {noun} appeared and started to {verb} wildly.","That {noun} was {verb}ing so {adj}ly it broke the pudding meter.","Everyone’s talking about the {adj} {noun} that {verb}ed out of nowhere."];class u{static#e=a;static#n=o;static#t=r;static#a=i;static#o=s;static#r=d;static#i(e,n){if(!Array.isArray(e))throw new TypeError(`${n} must be an array of strings`);if(!e.every(e=>"string"==typeof e))throw new TypeError(`${n} must contain only strings`);if(0===e.length)throw new Error(`${n} cannot be empty`)}static get defaultWords(){return[...this.#e]}static set defaultWords(e){this.#i(e,"defaultWords"),this.#e=[...e]}static get defaultEmojis(){return[...this.#n]}static set defaultEmojis(e){this.#i(e,"defaultEmojis"),this.#n=[...e]}static get defaultNouns(){return[...this.#t]}static set defaultNouns(e){this.#i(e,"defaultNouns"),this.#t=[...e]}static get defaultVerbs(){return[...this.#a]}static set defaultVerbs(e){this.#i(e,"defaultVerbs"),this.#a=[...e]}static get defaultAdjectives(){return[...this.#o]}static set defaultAdjectives(e){this.#i(e,"defaultAdjectives"),this.#o=[...e]}static get defaultTemplates(){return[...this.#r]}static set defaultTemplates(e){this.#i(e,"defaultTemplates"),this.#r=[...e]}#s=!1;get destroyed(){return this.#s}#d={minLength:10,maxLength:300,readable:!0,useEmojis:!0,includeNumbers:!0,includeSymbols:!0,allowWeirdSpacing:!1,emojiSet:[],wordSet:[],mode:"mixed",grammar:{templates:[],nouns:[],verbs:[],adjectives:[]},repeatWords:!0,emojiPlacement:"inline",line:{minLength:20,maxLength:120,emojiChance:.3}};get config(){return t(this.#s),structuredClone(this.#d)}#u="!@#$%^&*()-_=+[]{}|;:,.<>?/\\~".split("");get symbols(){return t(this.#s),structuredClone(this.#u)}constructor(e={}){const{minLength:n,maxLength:t,readable:a,useEmojis:o,includeNumbers:r,includeSymbols:i,allowWeirdSpacing:s,emojiSet:d,wordSet:h,mode:l,grammar:g,repeatWords:m,emojiPlacement:b,paragraphs:c,line:f}=e;if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.minLength must be an integer >= 1");if(void 0!==t&&(!Number.isInteger(t)||t<1))throw new TypeError("config.maxLength must be an integer >= 1");if(void 0!==n&&void 0!==t&&n>t)throw new RangeError("config.minLength cannot be greater than config.maxLength");if(void 0!==a&&"boolean"!=typeof a)throw new TypeError("config.readable must be a boolean");if(void 0!==o&&"boolean"!=typeof o)throw new TypeError("config.useEmojis must be a boolean");if(void 0!==r&&"boolean"!=typeof r)throw new TypeError("config.includeNumbers must be a boolean");if(void 0!==i&&"boolean"!=typeof i)throw new TypeError("config.includeSymbols must be a boolean");if(void 0!==s&&"boolean"!=typeof s)throw new TypeError("config.allowWeirdSpacing must be a boolean");if(void 0!==d&&!Array.isArray(d))throw new TypeError("config.emojiSet must be an array of strings");if(void 0!==h&&!Array.isArray(h))throw new TypeError("config.wordSet must be an array of strings");if(void 0!==l&&!["mixed","readable","chaotic","natural"].includes(l))throw new RangeError('config.mode must be one of: "mixed", "readable", "chaotic", "natural');if(void 0!==g){if("object"!=typeof g||null===g)throw new TypeError("config.grammar must be an object");const{templates:e,nouns:n,verbs:t,adjectives:a}=g;if(void 0!==e&&!Array.isArray(e))throw new TypeError("config.grammar.templates must be an array of strings");if(void 0!==n&&!Array.isArray(n))throw new TypeError("config.grammar.nouns must be an array of strings");if(void 0!==t&&!Array.isArray(t))throw new TypeError("config.grammar.verbs must be an array of strings");if(void 0!==a&&!Array.isArray(a))throw new TypeError("config.grammar.adjectives must be an array of strings")}if(void 0!==m&&"boolean"!=typeof m)throw new TypeError("config.repeatWords must be a boolean");if(void 0!==b&&!["inline","end","none"].includes(b))throw new RangeError('config.emojiPlacement must be one of: "inline", "end", "none"');if(void 0!==c){if("object"!=typeof c)throw new TypeError("config.paragraphs must be an object or null");const{min:e,max:n}=c;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.paragraphs.min must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.paragraphs.max must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.paragraphs.min cannot be greater than config.paragraphs.max")}if(void 0!==f){if("object"!=typeof f||null===f)throw new TypeError("config.line must be an object");const{minLength:e,maxLength:n,emojiChance:t}=f;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.line.minLength must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.line.maxLength must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.line.minLength cannot be greater than config.line.maxLength");if(void 0!==t&&("number"!=typeof t||t<0||t>1))throw new RangeError("config.line.emojiChance must be a number between 0 and 1")}this.#d.emojiSet=[...u.#n],this.#d.wordSet=[...u.#e],this.#d.grammar.templates=[...u.#r],this.#d.grammar.nouns=[...u.#t],this.#d.grammar.verbs=[...u.#a],this.#d.grammar.adjectives=[...u.#o],Object.assign(this.#d,e)}configure(e={}){return t(this.#s),Object.assign(this.#d,e),this}setGrammarTemplates(...e){return t(this.#s),this.#d.grammar.templates=e.flat(),this}addGrammarTemplates(...e){return t(this.#s),this.#d.grammar.templates.push(...e.flat()),this}setGrammarNouns(...e){return t(this.#s),this.#d.grammar.nouns=e.flat(),this}addGrammarNouns(...e){return t(this.#s),this.#d.grammar.nouns.push(...e.flat()),this}setGrammarVerbs(...e){return t(this.#s),this.#d.grammar.verbs=e.flat(),this}addGrammarVerbs(...e){return t(this.#s),this.#d.grammar.verbs.push(...e.flat()),this}setGrammarAdjectives(...e){return t(this.#s),this.#d.grammar.adjectives=e.flat(),this}addGrammarAdjectives(...e){return t(this.#s),this.#d.grammar.adjectives.push(...e.flat()),this}removeGrammarTemplates(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.templates=this.#d.grammar.templates.filter(e=>!n.has(e)),this}removeGrammarNouns(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.nouns=this.#d.grammar.nouns.filter(e=>!n.has(e)),this}removeGrammarVerbs(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.verbs=this.#d.grammar.verbs.filter(e=>!n.has(e)),this}removeGrammarAdjectives(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.adjectives=this.#d.grammar.adjectives.filter(e=>!n.has(e)),this}setWords(...e){return t(this.#s),this.#d.wordSet=e.flat(),this}addWords(...e){return t(this.#s),this.#d.wordSet.push(...e.flat()),this}removeWords(...e){t(this.#s);const n=new Set(e.flat());return this.#d.wordSet=this.#d.wordSet.filter(e=>!n.has(e)),this}setEmojis(...e){return t(this.#s),this.#d.emojiSet=e.flat(),this}addEmojis(...e){return t(this.#s),this.#d.emojiSet.push(...e.flat()),this}removeEmojis(...e){t(this.#s);const n=new Set(e.flat());return this.#d.emojiSet=this.#d.emojiSet.filter(e=>!n.has(e)),this}_getRandomItem(e){return e[Math.floor(Math.random()*e.length)]}_generateChunk(){const{wordSet:e,emojiSet:n,includeNumbers:t,includeSymbols:a,useEmojis:o,readable:r,mode:i,emojiPlacement:s}=this.#d;if("natural"===i)return this._generateNaturalSentence();const d=[];return(r||"readable"===i||"mixed"===i)&&d.push(this._getRandomItem(e)),"chaotic"!==i&&"mixed"!==i||d.push(Math.random().toString(36).slice(2)),t&&d.push(Math.floor(99999*Math.random()).toString()),a&&d.push(this._getRandomItem(this.#u)),"inline"===s&&o&&n.length&&d.push(this._getRandomItem(n)),this._getRandomItem(d)}_generateNaturalSentence(){const{templates:e,nouns:n,verbs:t,adjectives:a}=this.#d.grammar;return this._getRandomItem(e).replace(/{noun}/g,()=>this._getRandomItem(n)).replace(/{verb}/g,()=>this._getRandomItem(t)).replace(/{adj}/g,()=>this._getRandomItem(a))}_generateLine(e,n){const{allowWeirdSpacing:t,repeatWords:a,readable:o,emojiSet:r,useEmojis:i,emojiPlacement:s,line:d}=this.#d,u=[];for(n??=new Set;u.join(" ").length<e;){let e=this._generateChunk();!a&&n.has(e)||(n.add(e),t&&(Math.random()<.1&&(e="\n"+e),Math.random()<.1&&(e=" "+e),Math.random()<.05&&(e=e.toUpperCase())),u.push(e))}let h=u.join(o?" ":"");return"end"===s&&i&&r.length&&Math.random()<(d?.emojiChance||0)&&(h+=" "+this._getRandomItem(r)),h}_generateParagraphLines(e){const{line:n}=this.#d,t=[],a=new Set;let o=0;for(;o<e;){const r=Math.floor(Math.random()*(n.maxLength-n.minLength+1)+n.minLength),i=Math.min(r,e-o);t.push(this._generateLine(i,a)),o+=i}return t}generate(){t(this.#s);const{minLength:e,maxLength:n,paragraphs:a}=this.#d,o=Math.floor(Math.random()*(n-e+1))+e;if(a&&"object"==typeof a){const e=Math.floor(Math.random()*(a.max-a.min+1))+a.min,n=Math.floor(o/e),t=[];for(let a=0;a<e;a++){const e=this._generateParagraphLines(n);t.push(e.join("\n"))}return t.join("\n\n")}return this._generateParagraphLines(o).join("\n")}destroy(){this.destroyed||(this.#u=[],this.#d.emojiSet=[],this.#d.wordSet=[],this.#d.grammar.templates=[],this.#d.grammar.nouns=[],this.#d.grammar.verbs=[],this.#d.grammar.adjectives=[],this.#s=!0)}}const h=u;window.UltraRandomMsgGen=n.UltraRandomMsgGen})();
1
+ (()=>{"use strict";const e={d:(n,t)=>{for(var a in t)e.o(t,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:t[a]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};let n={};e.d(n,{UltraRandomMsgGen:()=>h});const t=e=>{if(e)throw new Error("This UltraRandomMsgGen instance has been destroyed and can no longer be used.")};const a=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","sed","do","eiusmod","tempor","incididunt","ut","labore","et","dolore","magna","aliqua"],o=["😂","🌈","🤖","💥","🐸","🍕","🦄","🧠","🧬","🚀","🫠","💫","🍩","👾","🎉","🥴","🐙","🧃","🪐","🎈","🧸","👻","🥳","🍭","💖","😺","🌮","🪅","🎮","🥓","🍮","🍬","🍓","🍒","🥝","🥑","🍄","🌊","☁️","🌟","🌙","🧚","🐾","🐥","🐼","🐨","🐳","✨","🧁","🌸","🍃","💎","🎐","🎀","🫧","☄️","🛸","🔮"],r=["pudding","bean","snuggle","bloop","jelly","unicorn","floof","giggle","bubble","muffin","puff","pickle","goblin","waffle","sprinkle","cupcake","fizzle","marshmallow","duckling","sock","cloud","teacup","nugget","gnome","hug","moonbean","crayon","jiggle","glitter","carrot","goober"],i=["wiggles","bounces","flies","splats","scoots","giggles","wigglesnacks","twirls","boops","pops","sings","hugs","floats","glows","flaps","mlems","dances","puddles","nomnoms","wigglejumps","sniffs","tumbles","slides","chirps","burps","sparkles","waddles","rambles","blinks","mews"],s=["fluffy","silly","yummy","squishy","wobbly","magical","tiny","sleepy","wiggly","bubbly","glittery","fuzzy","jiggly","sparkly","giggly","crunchy","goofy","soft","mushy","sweet","loopy","floaty","bonkers","chewy","ticklish","dreamy","pastel","cozy","teensy","grumbly"],d=["Boop!","Wiggle achieved.","Oops, {noun} everywhere!","Tiny {adj} {noun}, big {adj} {noun}.","Snuggle initiated with a {adj} {noun}.","{adj} vibes only, powered by {noun}.","No {noun}, no {noun}.","Bounce first, {verb} later.","Mlem. {verb}. {noun}.","{noun} go brrr and {verb}.","Why not? {noun} did. Then {noun} followed.","A {adj} {noun} just {verb} near the {adj} window.","That {adj} {noun} stole my {noun}!","Look, a {adj} {noun} trying to {verb} again!","Every {noun} deserves a {adj} nap.","The {adj} {noun} is my {adj} spirit animal.","Someone call the {noun}, it’s {verb}ing and {verb}ing again!","Don’t touch the {adj} {noun}. It {verb}s loudly.","{noun} forgot how {noun}s work and just {verb}ed.","There once was a {adj} {noun} who loved to {verb} with a {adj} {noun} all day.","Apparently, {noun}s are banned from {verb}ing and {verb}ing in the {noun} library.","That {adj} noise? Just a {noun} learning to {verb} on a {adj} {noun}.","I saw a {adj} {noun} {verb} so hard, it became a {adj} muffin.","The {adj} {noun} met a {adj} pickle and everything {verb}ed.","{noun}s are like {noun}: {adj}, unpredictable, and wiggly.","Don’t judge a {adj} {noun} by its ability to {verb}, or by its {adj} hat.","All I wanted was peace, but a {adj} {noun} with a {adj} {noun} had other plans.","One {adj} morning, a {adj} {noun} decided it was finally time to {verb}, but halfway through, it tripped on a {noun} and turned into a {adj} marshmallow.","I tried to be {adj} today, but then a {noun} {verb}ed across my {noun} and typed “asdfgh{noun}” repeatedly.","If you think you’ve seen everything, wait until a {adj} {noun} {verb}s on a {noun} wearing {adj} socks with tiny {noun}s.","No one ever believed the stories about the ancient {adj} {noun} who could {verb} with such {adj} grace that entire {noun}s turned pink out of embarrassment.","A curious {adj} {noun} wandered into a {noun} shop, not knowing that its destiny involved twelve {adj} {noun}s, one rubber {noun}, and a suspiciously quiet {adj} llama.","In a land where every {adj} {noun} was made of pudding and the sky was {adj} whipped cream, one brave {adj} {noun} set out to discover the legendary Spoon of {noun}s, facing obstacles like bouncing {noun}s, sassy {noun}s, and the Great Wobble of the {noun}.","Once upon a {adj} time, long before the {noun}s learned to {verb}, there existed a tiny {adj} {noun} who dreamed of swimming in a pool made entirely of {adj} glitter pudding while {verb}ing off-key lullabies to passing {noun}s with monocles.","The Council of {noun}s gathered in {adj} secret when the sacred {adj} {noun} started to {verb} uncontrollably, threatening the entire {adj} dessert-based civilization with spontaneous {noun} jiggles and uncontainable {noun} fits across the {noun}.","Hey... do you ever wonder if {noun}s dream of {noun}s?","Okay but hear me out: what if the {adj} {noun} could actually {verb} backwards?","Can we talk about the {noun} that just {verb}ed and vanished?","So I was talking to a {noun}, and it told me to stop being {adj}. Rude.","Not to alarm you, but there’s a {adj} {noun} behind you doing the {verb}.","Why does this {noun} keep staring at me like I owe it pudding?","Is this a safe space to admit I accidentally {verb}ed a {noun}?","I just walked into the room and someone shouted “{adj} {noun}!” — what did I miss?","Wait... we were supposed to bring a {noun}? No one told me!","Okay but what if the {adj} {noun} has feelings too?","Be honest, do I look like a {noun} that forgot how to {verb}?",'If I say "oops", do I still have to explain why the {noun} is glowing?',"I don’t know what’s going on but I brought snacks and a confused {noun}.","Do you think pudding knows it’s pudding? Just a thought.","Is this about the time I {verb}ed the {adj} {noun} by accident? Because I can explain.","Wait, are we talking about {noun}s or am I on the wrong chat again?",'What is this group even about? I just saw "pudding" and joined.',"Hi! I have no idea what’s happening but I’m here and I brought a {noun}.","I blinked and now there’s a {adj} {noun} in charge of everything.","Can someone please explain why the {noun} is floating and chanting?","Okay who gave the {noun} access to glitter and emotional support pickles?","I came for a calm discussion and now there’s a {adj} battle between {noun}s.","Not sure if I’m early, late, or inside a {noun} dream.","I was gone for 3 minutes and now someone’s riding a {noun} into the pudding realm.","This isn’t the pudding appreciation group, is it? ...oh no.","So... who summoned the {adj} {noun} this time? Be honest.","I came here for vibes and stayed for the {noun}s.","Does anyone else hear faint giggling or is that just the {adj} {noun} again?","I feel like I missed step one, two, and also three of this conversation.","All I asked was “what’s up?” and now I’m emotionally attached to a {noun}.",'Me: "I’ll be normal today." Also me: *{verb}s into a meeting riding a {adj} {noun}*','"It’s just pudding," they said. "It can’t hurt you," they said. They were wrong.',"I said one nice thing to a {noun} and now it follows me everywhere.","Can we take a moment to appreciate how the {adj} {noun} is just vibing?","Who put a tiny hat on the {noun}? Because that’s adorable.","My life has been different ever since the {noun} started {verb}ing.","Raise your hand if you’ve ever been personally attacked by a {adj} {noun}.",'"Don’t be weird," they said. So I became a {noun} instead.',"Do {noun}s have feelings? Asking for a {adj} friend.","I trusted the {noun} and all I got was a glitter-covered sock.","Plot twist: the {adj} {noun} was inside us all along.","In the glow of the {adj} moon, the {noun} began to {verb}.","A sprinkle of {adj} dust made the {noun} {verb} through the air.","The {noun} whispered a {adj} secret that made everyone {verb}.","Everything felt {adj} and {adj}, especially when the {noun} {verb}ed.","The {noun} is {verb}ing! The {noun} is {verb}ing! AAAAA!","Glitch in the {noun}: the {adj} {noun} just {verb}ed out of existence.","The {adj} {noun} {verb} and {verb} all over the {adj} {noun}!","Oops! {noun}s {verb}ed into the {adj} {noun} while {verb}ing crazily.","{adj}, {adj}, and more {adj} {noun}s just {verb}ed by!","Why does the {adj} {noun} keep {verb}ing and {verb}ing without stopping?","Look! A {adj} {noun}, a {adj} {noun}, and a {noun} all {verb}ing together!","Sometimes, the {noun} just {verb}s, then {verb}s again, and never stops being {adj}.","{noun}, {noun}, and {noun} — all {verb}ing and {verb}ing in a {adj} {noun}.","I saw a {adj} {noun} {verb}, then another {noun} {verb}ing with a {adj} {noun}.","The {noun} {verb}s {verb} while the {adj} {noun} {verb}s and the {noun} just {verb}s.","Can a {adj} {noun} {verb} {verb} without a {adj} {noun} watching?","Whoa! The {adj} {noun} just {verb}ed... and then {verb}ed again!","Hey... did you see that {adj} {noun} {verb} over there?","Umm, the {noun} is {verb}ing but also {verb}ing and {verb}ing!","Lol! {noun}s {verb} so {adj}ly, it’s impossible not to giggle.",'"Hey! What’s up?" asked the {adj} {noun}, who {verb}ed loudly.','"I’m just a {adj} {noun} trying to {verb}, you know?"','"Did you see the {adj} {noun} that just {verb}ed in the pudding?"','"No way! The {noun} {verb}s better than me!"','"Wait, the {adj} {noun} said it would {verb}, but it {verb}ed instead!"',"Once upon a {adj} {noun}, a group of {adj} {noun}s {verb}ed through the {adj} forest, singing {adj} songs and eating {noun}s made of pudding.","The legend tells of a {adj} {noun} who could {verb} faster than any {noun} ever seen, leaving trails of {adj} sparkles behind.","Every day, the {adj} {noun} would {verb} around the {adj} meadow, trying to convince the {noun}s to join the grand pudding party.","No one knows why the {adj} {noun} suddenly {verb}ed and then {verb}ed again, but everyone agrees it was the cutest thing they ever saw.","In the kingdom of {adj} {noun}s, only the bravest {noun} dared to {verb} the giant pudding monster, armed with nothing but {adj} smiles and jellybeans.","{adj} {noun} {verb} {verb} {verb} {noun} {verb} {adj} {noun} {verb} {noun}!","{noun} {noun} {verb} {adj} {noun} and then {verb} {verb} the {adj} {noun}.","{verb} the {adj} {noun}, then {verb} the {noun} while {verb}ing {adj}ly.","Can the {adj} {noun} {verb} and {verb} the {adj} {noun} at the same time?","{noun} {verb} {noun} {verb}, but the {adj} {noun} {verb}s better.","Boop! The {adj} {noun} just {verb}ed in the pudding.","Bloop bloop, the {noun} is {verb}ing all over again!","Mlem mlem, a {adj} {noun} {verb}s quietly in the corner.","Splat! {noun} {verb}ed right on the {adj} {noun}.","Yum! A {adj} {noun} just {verb}ed in my mouth.","Do {noun}s really {verb} when nobody’s watching?","Why does the {adj} {noun} always {verb} at midnight?","Can a {noun} be too {adj} to {verb} properly?","Is it normal for a {adj} {noun} to {verb} three times in a row?","Who taught the {noun} to {verb} like that?","Wait, did the {adj} {noun} just {verb} itself?","I can’t believe the {noun} {verb}ed into a {adj} {noun}!","Suddenly, a {adj} {noun} appeared and started to {verb} wildly.","That {noun} was {verb}ing so {adj}ly it broke the pudding meter.","Everyone’s talking about the {adj} {noun} that {verb}ed out of nowhere."];class u{static#e=a;static#n=o;static#t=r;static#a=i;static#o=s;static#r=d;static#i(e,n){if(!Array.isArray(e))throw new TypeError(`${n} must be an array of strings`);if(!e.every(e=>"string"==typeof e))throw new TypeError(`${n} must contain only strings`);if(0===e.length)throw new Error(`${n} cannot be empty`)}static get defaultWords(){return[...this.#e]}static set defaultWords(e){this.#i(e,"defaultWords"),this.#e=[...e]}static get defaultEmojis(){return[...this.#n]}static set defaultEmojis(e){this.#i(e,"defaultEmojis"),this.#n=[...e]}static get defaultNouns(){return[...this.#t]}static set defaultNouns(e){this.#i(e,"defaultNouns"),this.#t=[...e]}static get defaultVerbs(){return[...this.#a]}static set defaultVerbs(e){this.#i(e,"defaultVerbs"),this.#a=[...e]}static get defaultAdjectives(){return[...this.#o]}static set defaultAdjectives(e){this.#i(e,"defaultAdjectives"),this.#o=[...e]}static get defaultTemplates(){return[...this.#r]}static set defaultTemplates(e){this.#i(e,"defaultTemplates"),this.#r=[...e]}#s=!1;get destroyed(){return this.#s}#d={minLength:10,maxLength:300,readable:!0,useEmojis:!0,includeNumbers:!0,includeSymbols:!0,allowWeirdSpacing:!1,emojiSet:[],wordSet:[],mode:"mixed",grammar:{templates:[],nouns:[],verbs:[],adjectives:[]},repeatWords:!0,emojiPlacement:"inline",line:{minLength:20,maxLength:120,emojiChance:.3}};get config(){return t(this.#s),structuredClone(this.#d)}#u="!@#$%^&*()-_=+[]{}|;:,.<>?/\\~".split("");get symbols(){return t(this.#s),structuredClone(this.#u)}constructor(e={}){const{minLength:n,maxLength:t,readable:a,useEmojis:o,includeNumbers:r,includeSymbols:i,allowWeirdSpacing:s,emojiSet:d,wordSet:h,mode:l,grammar:g,repeatWords:m,emojiPlacement:b,paragraphs:c,line:f}=e;if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.minLength must be an integer >= 1");if(void 0!==t&&(!Number.isInteger(t)||t<1))throw new TypeError("config.maxLength must be an integer >= 1");if(void 0!==n&&void 0!==t&&n>t)throw new RangeError("config.minLength cannot be greater than config.maxLength");if(void 0!==a&&"boolean"!=typeof a)throw new TypeError("config.readable must be a boolean");if(void 0!==o&&"boolean"!=typeof o)throw new TypeError("config.useEmojis must be a boolean");if(void 0!==r&&"boolean"!=typeof r)throw new TypeError("config.includeNumbers must be a boolean");if(void 0!==i&&"boolean"!=typeof i)throw new TypeError("config.includeSymbols must be a boolean");if(void 0!==s&&"boolean"!=typeof s)throw new TypeError("config.allowWeirdSpacing must be a boolean");if(void 0!==d&&!Array.isArray(d))throw new TypeError("config.emojiSet must be an array of strings");if(void 0!==h&&!Array.isArray(h))throw new TypeError("config.wordSet must be an array of strings");if(void 0!==l&&!["mixed","readable","chaotic","natural"].includes(l))throw new RangeError('config.mode must be one of: "mixed", "readable", "chaotic", "natural');if(void 0!==g){if("object"!=typeof g||null===g)throw new TypeError("config.grammar must be an object");const{templates:e,nouns:n,verbs:t,adjectives:a}=g;if(void 0!==e&&!Array.isArray(e))throw new TypeError("config.grammar.templates must be an array of strings");if(void 0!==n&&!Array.isArray(n))throw new TypeError("config.grammar.nouns must be an array of strings");if(void 0!==t&&!Array.isArray(t))throw new TypeError("config.grammar.verbs must be an array of strings");if(void 0!==a&&!Array.isArray(a))throw new TypeError("config.grammar.adjectives must be an array of strings")}if(void 0!==m&&"boolean"!=typeof m)throw new TypeError("config.repeatWords must be a boolean");if(void 0!==b&&!["inline","end","none"].includes(b))throw new RangeError('config.emojiPlacement must be one of: "inline", "end", "none"');if(void 0!==c){if("object"!=typeof c)throw new TypeError("config.paragraphs must be an object or null");const{min:e,max:n}=c;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.paragraphs.min must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.paragraphs.max must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.paragraphs.min cannot be greater than config.paragraphs.max")}if(void 0!==f){if("object"!=typeof f||null===f)throw new TypeError("config.line must be an object");const{minLength:e,maxLength:n,emojiChance:t}=f;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.line.minLength must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.line.maxLength must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.line.minLength cannot be greater than config.line.maxLength");if(void 0!==t&&("number"!=typeof t||t<0||t>1))throw new RangeError("config.line.emojiChance must be a number between 0 and 1")}this.#d.emojiSet=[...u.#n],this.#d.wordSet=[...u.#e],this.#d.grammar.templates=[...u.#r],this.#d.grammar.nouns=[...u.#t],this.#d.grammar.verbs=[...u.#a],this.#d.grammar.adjectives=[...u.#o],Object.assign(this.#d,e)}configure(e={}){return t(this.#s),Object.assign(this.#d,e),this}setGrammarTemplates(...e){return t(this.#s),this.#d.grammar.templates=e.flat(),this}addGrammarTemplates(...e){return t(this.#s),this.#d.grammar.templates.push(...e.flat()),this}setGrammarNouns(...e){return t(this.#s),this.#d.grammar.nouns=e.flat(),this}addGrammarNouns(...e){return t(this.#s),this.#d.grammar.nouns.push(...e.flat()),this}setGrammarVerbs(...e){return t(this.#s),this.#d.grammar.verbs=e.flat(),this}addGrammarVerbs(...e){return t(this.#s),this.#d.grammar.verbs.push(...e.flat()),this}setGrammarAdjectives(...e){return t(this.#s),this.#d.grammar.adjectives=e.flat(),this}addGrammarAdjectives(...e){return t(this.#s),this.#d.grammar.adjectives.push(...e.flat()),this}removeGrammarTemplates(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.templates=this.#d.grammar.templates.filter(e=>!n.has(e)),this}removeGrammarNouns(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.nouns=this.#d.grammar.nouns.filter(e=>!n.has(e)),this}removeGrammarVerbs(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.verbs=this.#d.grammar.verbs.filter(e=>!n.has(e)),this}removeGrammarAdjectives(...e){t(this.#s);const n=new Set(e.flat());return this.#d.grammar.adjectives=this.#d.grammar.adjectives.filter(e=>!n.has(e)),this}setWords(...e){return t(this.#s),this.#d.wordSet=e.flat(),this}addWords(...e){return t(this.#s),this.#d.wordSet.push(...e.flat()),this}removeWords(...e){t(this.#s);const n=new Set(e.flat());return this.#d.wordSet=this.#d.wordSet.filter(e=>!n.has(e)),this}setEmojis(...e){return t(this.#s),this.#d.emojiSet=e.flat(),this}addEmojis(...e){return t(this.#s),this.#d.emojiSet.push(...e.flat()),this}removeEmojis(...e){t(this.#s);const n=new Set(e.flat());return this.#d.emojiSet=this.#d.emojiSet.filter(e=>!n.has(e)),this}_getRandomItem(e){return e[Math.floor(Math.random()*e.length)]}_generateChunk(){const{wordSet:e,emojiSet:n,includeNumbers:t,includeSymbols:a,useEmojis:o,readable:r,mode:i,emojiPlacement:s}=this.#d;if("natural"===i)return this._generateNaturalSentence();const d=[];return(r||"readable"===i||"mixed"===i)&&d.push(this._getRandomItem(e)),"chaotic"!==i&&"mixed"!==i||d.push(Math.random().toString(36).slice(2)),t&&d.push(Math.floor(99999*Math.random()).toString()),a&&d.push(this._getRandomItem(this.#u)),"inline"===s&&o&&n.length&&d.push(this._getRandomItem(n)),this._getRandomItem(d)}_generateNaturalSentence(){const{templates:e,nouns:n,verbs:t,adjectives:a}=this.#d.grammar;return this._getRandomItem(e).replace(/{noun}/g,()=>this._getRandomItem(n)).replace(/{verb}/g,()=>this._getRandomItem(t)).replace(/{adj}/g,()=>this._getRandomItem(a))}_generateLine(e,n){const{allowWeirdSpacing:t,repeatWords:a,readable:o,emojiSet:r,useEmojis:i,emojiPlacement:s,line:d}=this.#d,u=[];for(n??=new Set;u.join(" ").length<e;){let e=this._generateChunk();!a&&n.has(e)||(n.add(e),t&&(Math.random()<.1&&(e="\n"+e),Math.random()<.1&&(e=" "+e),Math.random()<.05&&(e=e.toUpperCase())),u.push(e))}let h=u.join(o?" ":"");return"end"===s&&i&&r.length&&Math.random()<(d?.emojiChance||0)&&(h+=" "+this._getRandomItem(r)),h}_generateParagraphLines(e){const{line:n}=this.#d,t=[],a=new Set;let o=0;for(;o<e;){const r=Math.floor(Math.random()*(n.maxLength-n.minLength+1)+n.minLength),i=Math.min(r,e-o);t.push(this._generateLine(i,a)),o+=i}return t}generate(){t(this.#s);const{minLength:e,maxLength:n,paragraphs:a}=this.#d,o=Math.floor(Math.random()*(n-e+1))+e;if(a&&"object"==typeof a){const e=Math.floor(Math.random()*(a.max-a.min+1))+a.min,n=Math.floor(o/e),t=[];for(let a=0;a<e;a++){const e=this._generateParagraphLines(n);t.push(e.join("\n"))}return t.join("\n\n")}return this._generateParagraphLines(o).join("\n")}destroy(){this.destroyed||(this.#u=[],this.#d.emojiSet=[],this.#d.wordSet=[],this.#d.grammar.templates=[],this.#d.grammar.nouns=[],this.#d.grammar.verbs=[],this.#d.grammar.adjectives=[],this.#s=!0)}}const h=u;window.UltraRandomMsgGen=n.UltraRandomMsgGen})();
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- // https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array
4
-
5
3
  /**
6
4
  * Randomly shuffles the elements of an array in place using the Fisher–Yates algorithm.
7
5
  *
8
6
  * This implementation ensures a uniform distribution of permutations.
9
7
  * Original algorithm source: StackOverflow (link above).
10
8
  *
9
+ * @reference https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array
10
+ *
11
11
  * @template {any[]} T
12
12
  * @param {T} items - The array to shuffle.
13
13
  * @returns {T} The same array instance, now shuffled in place.
@@ -4,6 +4,8 @@
4
4
  * This implementation ensures a uniform distribution of permutations.
5
5
  * Original algorithm source: StackOverflow (link above).
6
6
  *
7
+ * @reference https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array
8
+ *
7
9
  * @template {any[]} T
8
10
  * @param {T} items - The array to shuffle.
9
11
  * @returns {T} The same array instance, now shuffled in place.
@@ -1 +1 @@
1
- {"version":3,"file":"array.d.mts","sourceRoot":"","sources":["../../../src/v1/basics/array.mjs"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAJP,CAAC,SAAR,GAAG,EAAK,EAIO,KAAK,EAHvB,CAGuB,GAFrB,CAAC,CAqBb;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CALhB,UAAU,SAAf,GAAe,EAKO,MAAM,EAJ/B,UAAU,EAIqB,EAAE,MAAM,EAHvC,MAAM,EAGiC,GAFrC,UAAU,EAAE,CAyBxB;AAIE,YAAkB,iBAAiB,CADzB,CAAC,IAEX;;;;IAAgB,KAAK,EAAV,CAAC,EAAE,CACd;;;;IAAgB,OAAO,EAAZ,CAAC,EAAE,CAChB;CAAA,CAAA;AALD;;;;;GAKG;AAEH;;;;;;GAMG;AACH,wBAAgB,aAAa,CALhB,CAAC,EAKgB,QAAQ,EAJ3B,CAAC,EAI0B,EAAE,QAAQ,EAHrC,CAAC,EAGoC,GAFnC,iBAAiB,CAAC,CAAC,CAAC,CAahC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,AAZpC,CACA,EADQ,MAAM,GAAC,IAYqB,EAAE,SAAS,AAX/C,CACA,EADQ,OAW+C,GAV7C,CAAC,CAAC,KAA0B,EAAE,CAAC,KAA0B,KAAK,MAAM,CAmChF"}
1
+ {"version":3,"file":"array.d.mts","sourceRoot":"","sources":["../../../src/v1/basics/array.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAJP,CAAC,SAAR,GAAG,EAAK,EAIO,KAAK,EAHvB,CAGuB,GAFrB,CAAC,CAqBb;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CALhB,UAAU,SAAf,GAAe,EAKO,MAAM,EAJ/B,UAAU,EAIqB,EAAE,MAAM,EAHvC,MAAM,EAGiC,GAFrC,UAAU,EAAE,CAyBxB;AAIE,YAAkB,iBAAiB,CADzB,CAAC,IAEX;;;;IAAgB,KAAK,EAAV,CAAC,EAAE,CACd;;;;IAAgB,OAAO,EAAZ,CAAC,EAAE,CAChB;CAAA,CAAA;AALD;;;;;GAKG;AAEH;;;;;;GAMG;AACH,wBAAgB,aAAa,CALhB,CAAC,EAKgB,QAAQ,EAJ3B,CAAC,EAI0B,EAAE,QAAQ,EAHrC,CAAC,EAGoC,GAFnC,iBAAiB,CAAC,CAAC,CAAC,CAahC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,AAZpC,CACA,EADQ,MAAM,GAAC,IAYqB,EAAE,SAAS,AAX/C,CACA,EADQ,OAW+C,GAV7C,CAAC,CAAC,KAA0B,EAAE,CAAC,KAA0B,KAAK,MAAM,CAmChF"}
@@ -1,10 +1,11 @@
1
- // https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array
2
1
  /**
3
2
  * Randomly shuffles the elements of an array in place using the Fisher–Yates algorithm.
4
3
  *
5
4
  * This implementation ensures a uniform distribution of permutations.
6
5
  * Original algorithm source: StackOverflow (link above).
7
6
  *
7
+ * @reference https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array
8
+ *
8
9
  * @template {any[]} T
9
10
  * @param {T} items - The array to shuffle.
10
11
  * @returns {T} The same array instance, now shuffled in place.