tiny-essentials 1.28.15 → 1.28.16
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.
- package/TinyFork.mjs +45 -23
- package/changelog/1/28/16.md +19 -0
- package/dist/_/numbers.d.mts.map +1 -0
- package/dist/v1/TinyAdvancedRaffle.min.js +1 -1
- package/dist/v1/TinyDebugger.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyI18.min.js +1 -1
- package/dist/v1/TinyIframeEvents.min.js +1 -1
- package/dist/v1/TinyLocalStorage.min.js +1 -1
- package/dist/v1/TinyMediaPlayer.min.js +1 -1
- package/dist/v1/TinyNewWinEvents.min.js +1 -1
- package/dist/v1/TinyRadioFm.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyUploadClicker.min.js +1 -1
- package/dist/v1/basics/array.d.mts.map +1 -0
- package/dist/v1/basics/browserDetector.d.mts.map +1 -0
- package/dist/v1/basics/clock.d.mts.map +1 -0
- package/dist/v1/basics/collision.d.mts.map +1 -0
- package/dist/v1/basics/deprecated/html.d.mts.map +1 -0
- package/dist/v1/basics/extendObjType/Buffer.d.mts.map +1 -0
- package/dist/v1/basics/fullScreen.d.mts.map +1 -0
- package/dist/v1/basics/html.d.mts.map +1 -0
- package/dist/v1/basics/index.d.mts.map +1 -0
- package/dist/v1/basics/mediaContent.d.mts.map +1 -0
- package/dist/v1/basics/objChecker.d.mts.map +1 -0
- package/dist/v1/basics/objFilter.d.mts.map +1 -0
- package/dist/v1/basics/promiseUtils.d.mts.map +1 -0
- package/dist/v1/basics/simpleMath.d.mts.map +1 -0
- package/dist/v1/basics/text.d.mts.map +1 -0
- package/dist/v1/fileManager/asyncFuncs.d.mts.map +1 -0
- package/dist/v1/fileManager/index.d.mts.map +1 -0
- package/dist/v1/fileManager/normalFuncs.d.mts.map +1 -0
- package/dist/v1/index.cjs +49 -45
- package/dist/v1/index.d.mts +47 -45
- package/dist/v1/index.d.mts.map +1 -0
- package/dist/v1/index.mjs +47 -45
- package/dist/v1/libs/array/TinyArrayComparator.d.mts.map +1 -0
- package/dist/v1/libs/array/TinyArrayPaginator.d.mts.map +1 -0
- package/dist/v1/libs/color/ColorSafeStringify.d.mts.map +1 -0
- package/dist/v1/libs/color/TinyColorConverter.d.mts.map +1 -0
- package/dist/v1/libs/color/TinyColorValidator.d.mts.map +1 -0
- package/dist/v1/libs/{TinyDayNightCycle.cjs → game/TinyDayNightCycle.cjs} +2 -2
- package/dist/v1/libs/game/TinyDayNightCycle.d.mts.map +1 -0
- package/dist/v1/libs/{TinyDayNightCycle.mjs → game/TinyDayNightCycle.mjs} +1 -1
- package/dist/v1/libs/{TinyGamepad.cjs → game/TinyGamepad.cjs} +2 -2
- package/dist/v1/libs/game/TinyGamepad.d.mts.map +1 -0
- package/dist/v1/libs/{TinyGamepad.mjs → game/TinyGamepad.mjs} +1 -1
- package/dist/v1/libs/game/TinyInventory.d.mts.map +1 -0
- package/dist/v1/libs/game/TinyInventoryTrader.d.mts.map +1 -0
- package/dist/v1/libs/game/TinyLevelUp.d.mts.map +1 -0
- package/dist/v1/libs/game/TinyNeedBar.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyDomReadyManager.d.mts.map +1 -0
- package/dist/v1/libs/{TinyElementObserver.cjs → html/TinyElementObserver.cjs} +2 -2
- package/dist/v1/libs/html/TinyElementObserver.d.mts.map +1 -0
- package/dist/v1/libs/{TinyElementObserver.mjs → html/TinyElementObserver.mjs} +1 -1
- package/dist/v1/libs/html/TinyHtml/TinyHtmlAnchor.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlButton.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlCanvas.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlDatalist.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlEmbed.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlForm.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlIcon.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlIframe.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlImage.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlLink.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlMedia.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlScript.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlSelect.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlStyle.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlTemplate.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/TinyHtmlTextarea.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/index.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/TinyHtmlColorInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/TinyHtmlFileInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/TinyHtmlHiddenInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/TinyHtmlImageInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/button/TinyHtmlButtonInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/button/TinyHtmlResetInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/button/TinyHtmlSubmitInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/check/TinyHtmlCheckboxInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/check/TinyHtmlRadioInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/date/TinyHtmlDateInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/date/TinyHtmlDateTimeInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/date/TinyHtmlMonthInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/date/TinyHtmlTimeInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/date/TinyHtmlWeekInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/number/TinyHtmlNumberInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/number/TinyHtmlRangeInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/text/TinyHtmlEmailInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/text/TinyHtmlPasswordInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/text/TinyHtmlSearchInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/text/TinyHtmlTelInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/text/TinyHtmlTextInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/input/text/TinyHtmlUrlInput.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/media/TinyHtmlAudio.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/media/TinyHtmlObject.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/media/TinyHtmlSource.d.mts.map +1 -0
- package/dist/v1/libs/html/TinyHtml/media/TinyHtmlVideo.d.mts.map +1 -0
- package/dist/v1/libs/{TinyHtml.cjs → html/TinyHtml.cjs} +4 -4
- package/dist/v1/libs/{TinyHtml.d.mts → html/TinyHtml.d.mts} +3 -3
- package/dist/v1/libs/html/TinyHtml.d.mts.map +1 -0
- package/dist/v1/libs/{TinyHtml.mjs → html/TinyHtml.mjs} +4 -4
- package/dist/v1/libs/{TinyDragDropDetector.cjs → html/drag/TinyDragDropDetector.cjs} +2 -2
- package/dist/v1/libs/html/drag/TinyDragDropDetector.d.mts.map +1 -0
- package/dist/v1/libs/{TinyDragDropDetector.mjs → html/drag/TinyDragDropDetector.mjs} +1 -1
- package/dist/v1/libs/{TinyDragger.cjs → html/drag/TinyDragger.cjs} +5 -5
- package/dist/v1/libs/{TinyDragger.d.mts → html/drag/TinyDragger.d.mts} +2 -2
- package/dist/v1/libs/html/drag/TinyDragger.d.mts.map +1 -0
- package/dist/v1/libs/{TinyDragger.mjs → html/drag/TinyDragger.mjs} +4 -4
- package/dist/v1/libs/{TinyIframeEvents.cjs → html/events/TinyIframeEvents.cjs} +3 -3
- package/dist/v1/libs/html/events/TinyIframeEvents.d.mts.map +1 -0
- package/dist/v1/libs/{TinyIframeEvents.mjs → html/events/TinyIframeEvents.mjs} +2 -2
- package/dist/v1/libs/{TinyNewWinEvents.cjs → html/events/TinyNewWinEvents.cjs} +2 -2
- package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts.map +1 -0
- package/dist/v1/libs/{TinyNewWinEvents.mjs → html/events/TinyNewWinEvents.mjs} +1 -1
- package/dist/v1/libs/{TinyNotifications.cjs → html/notification/TinyNotifications.cjs} +1 -1
- package/dist/v1/libs/html/notification/TinyNotifications.d.mts.map +1 -0
- package/dist/v1/libs/{TinyNotifications.mjs → html/notification/TinyNotifications.mjs} +1 -1
- package/dist/v1/libs/{TinyNotifyCenter.cjs → html/notification/TinyNotifyCenter.cjs} +2 -2
- package/dist/v1/libs/html/notification/TinyNotifyCenter.d.mts.map +1 -0
- package/dist/v1/libs/{TinyNotifyCenter.mjs → html/notification/TinyNotifyCenter.mjs} +1 -1
- package/dist/v1/libs/{TinyToastNotify.cjs → html/notification/TinyToastNotify.cjs} +2 -2
- package/dist/v1/libs/html/notification/TinyToastNotify.d.mts.map +1 -0
- package/dist/v1/libs/{TinyToastNotify.mjs → html/notification/TinyToastNotify.mjs} +1 -1
- package/dist/v1/libs/{TinyAfterScrollWatcher.cjs → html/scroll/TinyAfterScrollWatcher.cjs} +2 -2
- package/dist/v1/libs/html/scroll/TinyAfterScrollWatcher.d.mts.map +1 -0
- package/dist/v1/libs/{TinyAfterScrollWatcher.mjs → html/scroll/TinyAfterScrollWatcher.mjs} +1 -1
- package/dist/v1/libs/{TinySmartScroller.cjs → html/scroll/TinySmartScroller.cjs} +4 -4
- package/dist/v1/libs/{TinySmartScroller.d.mts → html/scroll/TinySmartScroller.d.mts} +2 -2
- package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts.map +1 -0
- package/dist/v1/libs/{TinySmartScroller.mjs → html/scroll/TinySmartScroller.mjs} +3 -3
- package/dist/v1/libs/{TinyAnalogClock.cjs → html/templates/TinyAnalogClock.cjs} +2 -2
- package/dist/v1/libs/html/templates/TinyAnalogClock.d.mts.map +1 -0
- package/dist/v1/libs/{TinyAnalogClock.mjs → html/templates/TinyAnalogClock.mjs} +1 -1
- package/dist/v1/libs/html/templates/TinyCookieConsent.d.mts.map +1 -0
- package/dist/v1/libs/html/templates/TinyLoadingScreen.d.mts.map +1 -0
- package/dist/v1/libs/{TinyUploadClicker.cjs → html/upload/TinyUploadClicker.cjs} +1 -10
- package/dist/v1/libs/{TinyUploadClicker.d.mts → html/upload/TinyUploadClicker.d.mts} +24 -24
- package/dist/v1/libs/html/upload/TinyUploadClicker.d.mts.map +1 -0
- package/dist/v1/libs/{TinyUploadClicker.mjs → html/upload/TinyUploadClicker.mjs} +1 -1
- package/dist/v1/libs/{TinyAdvancedRaffle.cjs → math/TinyAdvancedRaffle.cjs} +2 -2
- package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts.map +1 -0
- package/dist/v1/libs/{TinyAdvancedRaffle.mjs → math/TinyAdvancedRaffle.mjs} +1 -1
- package/dist/v1/libs/math/TinyMamdaniInferenceSystem.d.mts.map +1 -0
- package/dist/v1/libs/{TinyRateLimiter.cjs → math/TinyRateLimiter.cjs} +2 -2
- package/dist/v1/libs/math/TinyRateLimiter.d.mts.map +1 -0
- package/dist/v1/libs/{TinyRateLimiter.mjs → math/TinyRateLimiter.mjs} +1 -1
- package/dist/v1/libs/{TinySimpleDice.cjs → math/TinySimpleDice.cjs} +1 -1
- package/dist/v1/libs/math/TinySimpleDice.d.mts.map +1 -0
- package/dist/v1/libs/{TinySimpleDice.mjs → math/TinySimpleDice.mjs} +1 -1
- package/dist/v1/libs/{TinyTimeout.cjs → math/TinyTimeout.cjs} +3 -3
- package/dist/v1/libs/math/TinyTimeout.d.mts.map +1 -0
- package/dist/v1/libs/{TinyTimeout.mjs → math/TinyTimeout.mjs} +2 -2
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/HtmlAudio.cjs +5 -5
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/HtmlAudio.d.mts +4 -4
- package/dist/v1/libs/media/TinyMediaPlayer/HtmlAudio.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/HtmlAudio.mjs +4 -4
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/HtmlVideo.cjs +5 -5
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/HtmlVideo.d.mts +4 -4
- package/dist/v1/libs/media/TinyMediaPlayer/HtmlVideo.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/HtmlVideo.mjs +4 -4
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/Mock.cjs +5 -5
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/Mock.d.mts +2 -2
- package/dist/v1/libs/media/TinyMediaPlayer/Mock.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/Mock.mjs +4 -4
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/SoundCloud.cjs +6 -6
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/SoundCloud.d.mts +4 -4
- package/dist/v1/libs/media/TinyMediaPlayer/SoundCloud.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/SoundCloud.mjs +5 -5
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/Youtube.cjs +6 -6
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/Youtube.d.mts +4 -4
- package/dist/v1/libs/media/TinyMediaPlayer/Youtube.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/Youtube.mjs +5 -5
- package/dist/v1/libs/media/TinyMediaPlayer/docs/SoundCloudWidget.d.mts.map +1 -0
- package/dist/v1/libs/media/TinyMediaPlayer/docs/YouTubePlayer.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/index.cjs +4 -4
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/index.d.mts +2 -2
- package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/index.mjs +3 -3
- package/dist/v1/libs/{TinyMediaPlayer.cjs → media/TinyMediaPlayer.cjs} +13 -13
- package/dist/v1/libs/{TinyMediaPlayer.d.mts → media/TinyMediaPlayer.d.mts} +18 -18
- package/dist/v1/libs/media/TinyMediaPlayer.d.mts.map +1 -0
- package/dist/v1/libs/{TinyMediaPlayer.mjs → media/TinyMediaPlayer.mjs} +13 -13
- package/dist/v1/libs/{TinyRadioFm.cjs → media/TinyRadioFm.cjs} +15 -15
- package/dist/v1/libs/{TinyRadioFm.d.mts → media/TinyRadioFm.d.mts} +22 -22
- package/dist/v1/libs/media/TinyRadioFm.d.mts.map +1 -0
- package/dist/v1/libs/{TinyRadioFm.mjs → media/TinyRadioFm.mjs} +14 -14
- package/dist/v1/libs/{TinyLocalStorage.cjs → storage/TinyLocalStorage.cjs} +3 -3
- package/dist/v1/libs/storage/TinyLocalStorage.d.mts.map +1 -0
- package/dist/v1/libs/{TinyLocalStorage.mjs → storage/TinyLocalStorage.mjs} +2 -2
- package/dist/v1/libs/text/TinyClipboard.d.mts.map +1 -0
- package/dist/v1/libs/{TinyI18.cjs → text/TinyI18.cjs} +2 -2
- package/dist/v1/libs/text/TinyI18.d.mts.map +1 -0
- package/dist/v1/libs/{TinyI18.mjs → text/TinyI18.mjs} +1 -1
- package/dist/v1/libs/{TinyTextDiffer.cjs → text/TinyTextDiffer.cjs} +2 -2
- package/dist/v1/libs/text/TinyTextDiffer.d.mts.map +1 -0
- package/dist/v1/libs/{TinyTextDiffer.mjs → text/TinyTextDiffer.mjs} +1 -1
- package/dist/v1/libs/text/TinyTextRangeEditor.d.mts.map +1 -0
- package/dist/v1/libs/text/TinyTextarea.d.mts.map +1 -0
- package/dist/v1/libs/{TinyClassManager → tools/TinyClassManager}/TinyPluginInliner.cjs +1 -1
- package/dist/v1/libs/tools/TinyClassManager/TinyPluginInliner.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyClassManager.d.mts.map +1 -0
- package/dist/v1/libs/{TinyDebugger.cjs → tools/TinyDebugger.cjs} +2 -2
- package/dist/v1/libs/tools/TinyDebugger.d.mts.map +1 -0
- package/dist/v1/libs/{TinyDebugger.mjs → tools/TinyDebugger.mjs} +2 -2
- package/dist/v1/libs/tools/TinyPkgExportValidator.cjs +462 -0
- package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts +104 -0
- package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyPkgExportValidator.mjs +407 -0
- package/dist/v1/libs/tools/examples/TinyClassManager.d.mts.map +1 -0
- package/dist/v1/libs/utils/TinyPromiseQueue.d.mts.map +1 -0
- package/dist/v1/libs/{UltraRandomMsgGen.cjs → utils/UltraRandomMsgGen.cjs} +2 -2
- package/dist/v1/libs/utils/UltraRandomMsgGen.d.mts.map +1 -0
- package/dist/v1/libs/{UltraRandomMsgGen.mjs → utils/UltraRandomMsgGen.mjs} +1 -1
- package/dist/v1/libs/{utils.d.mts → utils/tools.d.mts} +1 -1
- package/dist/v1/libs/utils/tools.d.mts.map +1 -0
- package/docs/TinyFork.md +2 -2
- package/docs/v1/Exports.md +129 -92
- package/docs/v1/README.md +100 -49
- package/docs/v1/libs/{TinyArrayComparator.md → array/TinyArrayComparator.md} +1 -1
- package/docs/v1/libs/{TinyArrayPaginator.md → array/TinyArrayPaginator.md} +1 -1
- package/docs/v1/libs/{ColorSafeStringify.md → color/ColorSafeStringify.md} +1 -1
- package/docs/v1/libs/{TinyLevelUp.md → game/TinyLevelUp.md} +1 -1
- package/docs/v1/libs/{TinyDomReadyManager.md → html/TinyDomReadyManager.md} +1 -1
- package/docs/v1/libs/{TinyElementObserver.md → html/TinyElementObserver.md} +1 -1
- package/docs/v1/libs/{TinyDragDropDetector.md → html/drag/TinyDragDropDetector.md} +1 -1
- package/docs/v1/libs/{TinyDragger.md → html/drag/TinyDragger.md} +1 -1
- package/docs/v1/libs/{TinyIframeEvents.md → html/events/TinyIframeEvents.md} +2 -2
- package/docs/v1/libs/{TinyNewWinEvents.md → html/events/TinyNewWinEvents.md} +2 -2
- package/docs/v1/libs/{TinyNotifications.md → html/notification/TinyNotifications.md} +1 -1
- package/docs/v1/libs/{TinyAfterScrollWatcher.md → html/scroll/TinyAfterScrollWatcher.md} +1 -1
- package/docs/v1/libs/{TinyAnalogClock.md → html/templates/TinyAnalogClock.md} +1 -1
- package/docs/v1/libs/{TinyCookieConsent.md → html/templates/TinyCookieConsent.md} +1 -1
- package/docs/v1/libs/{TinyLoadingScreen.md → html/templates/TinyLoadingScreen.md} +1 -1
- package/docs/v1/libs/{TinyMediaPlayer.md → media/TinyMediaPlayer.md} +8 -8
- package/docs/v1/libs/{TinyClipboard.md → text/TinyClipboard.md} +1 -1
- package/docs/v1/libs/{TinyTextDiffer.md → text/TinyTextDiffer.md} +1 -1
- package/docs/v1/libs/{TinyTextarea.md → text/TinyTextarea.md} +1 -1
- package/docs/v1/libs/{TinyClassManager → tools/TinyClassManager}/TinyPluginInliner.md +2 -2
- package/docs/v1/libs/{TinyClassManager.md → tools/TinyClassManager.md} +1 -1
- package/docs/v1/libs/{TinyDebugger.md → tools/TinyDebugger.md} +1 -1
- package/docs/v1/libs/tools/TinyPkgExportValidator.md +234 -0
- package/docs/v1/libs/{TinyPromiseQueue.md → utils/TinyPromiseQueue.md} +2 -2
- package/package.json +305 -303
- package/dist/v1/build/ColorSafeStringify.cjs +0 -7
- package/dist/v1/build/ColorSafeStringify.d.mts +0 -3
- package/dist/v1/build/ColorSafeStringify.mjs +0 -2
- package/dist/v1/build/TinyAdvancedRaffle.cjs +0 -7
- package/dist/v1/build/TinyAdvancedRaffle.d.mts +0 -3
- package/dist/v1/build/TinyAdvancedRaffle.mjs +0 -2
- package/dist/v1/build/TinyAfterScrollWatcher.cjs +0 -7
- package/dist/v1/build/TinyAfterScrollWatcher.d.mts +0 -3
- package/dist/v1/build/TinyAfterScrollWatcher.mjs +0 -2
- package/dist/v1/build/TinyAnalogClock.cjs +0 -7
- package/dist/v1/build/TinyAnalogClock.d.mts +0 -3
- package/dist/v1/build/TinyAnalogClock.mjs +0 -2
- package/dist/v1/build/TinyArrayComparator.cjs +0 -7
- package/dist/v1/build/TinyArrayComparator.d.mts +0 -3
- package/dist/v1/build/TinyArrayComparator.mjs +0 -2
- package/dist/v1/build/TinyArrayPaginator.cjs +0 -7
- package/dist/v1/build/TinyArrayPaginator.d.mts +0 -3
- package/dist/v1/build/TinyArrayPaginator.mjs +0 -2
- package/dist/v1/build/TinyClassManager.cjs +0 -7
- package/dist/v1/build/TinyClassManager.d.mts +0 -3
- package/dist/v1/build/TinyClassManager.mjs +0 -2
- package/dist/v1/build/TinyClipboard.cjs +0 -7
- package/dist/v1/build/TinyClipboard.d.mts +0 -3
- package/dist/v1/build/TinyClipboard.mjs +0 -2
- package/dist/v1/build/TinyColorConverter.cjs +0 -7
- package/dist/v1/build/TinyColorConverter.d.mts +0 -3
- package/dist/v1/build/TinyColorConverter.mjs +0 -2
- package/dist/v1/build/TinyColorValidator.cjs +0 -7
- package/dist/v1/build/TinyColorValidator.d.mts +0 -3
- package/dist/v1/build/TinyColorValidator.mjs +0 -2
- package/dist/v1/build/TinyCookieConsent.cjs +0 -7
- package/dist/v1/build/TinyCookieConsent.d.mts +0 -3
- package/dist/v1/build/TinyCookieConsent.mjs +0 -2
- package/dist/v1/build/TinyDayNightCycle.cjs +0 -7
- package/dist/v1/build/TinyDayNightCycle.d.mts +0 -3
- package/dist/v1/build/TinyDayNightCycle.mjs +0 -2
- package/dist/v1/build/TinyDebugger.cjs +0 -7
- package/dist/v1/build/TinyDebugger.d.mts +0 -3
- package/dist/v1/build/TinyDebugger.mjs +0 -2
- package/dist/v1/build/TinyDomReadyManager.cjs +0 -7
- package/dist/v1/build/TinyDomReadyManager.d.mts +0 -3
- package/dist/v1/build/TinyDomReadyManager.mjs +0 -2
- package/dist/v1/build/TinyDragDropDetector.cjs +0 -7
- package/dist/v1/build/TinyDragDropDetector.d.mts +0 -3
- package/dist/v1/build/TinyDragDropDetector.mjs +0 -2
- package/dist/v1/build/TinyDragger.cjs +0 -7
- package/dist/v1/build/TinyDragger.d.mts +0 -3
- package/dist/v1/build/TinyDragger.mjs +0 -2
- package/dist/v1/build/TinyElementObserver.cjs +0 -7
- package/dist/v1/build/TinyElementObserver.d.mts +0 -3
- package/dist/v1/build/TinyElementObserver.mjs +0 -2
- package/dist/v1/build/TinyGamepad.cjs +0 -7
- package/dist/v1/build/TinyGamepad.d.mts +0 -3
- package/dist/v1/build/TinyGamepad.mjs +0 -2
- package/dist/v1/build/TinyHtml.cjs +0 -7
- package/dist/v1/build/TinyHtml.d.mts +0 -3
- package/dist/v1/build/TinyHtml.mjs +0 -2
- package/dist/v1/build/TinyI18.cjs +0 -7
- package/dist/v1/build/TinyI18.d.mts +0 -3
- package/dist/v1/build/TinyI18.mjs +0 -2
- package/dist/v1/build/TinyIframeEvents.cjs +0 -7
- package/dist/v1/build/TinyIframeEvents.d.mts +0 -3
- package/dist/v1/build/TinyIframeEvents.mjs +0 -2
- package/dist/v1/build/TinyInventory.cjs +0 -7
- package/dist/v1/build/TinyInventory.d.mts +0 -3
- package/dist/v1/build/TinyInventory.mjs +0 -2
- package/dist/v1/build/TinyInventoryTrader.cjs +0 -7
- package/dist/v1/build/TinyInventoryTrader.d.mts +0 -3
- package/dist/v1/build/TinyInventoryTrader.mjs +0 -2
- package/dist/v1/build/TinyLevelUp.cjs +0 -7
- package/dist/v1/build/TinyLevelUp.d.mts +0 -3
- package/dist/v1/build/TinyLevelUp.mjs +0 -2
- package/dist/v1/build/TinyLoadingScreen.cjs +0 -7
- package/dist/v1/build/TinyLoadingScreen.d.mts +0 -3
- package/dist/v1/build/TinyLoadingScreen.mjs +0 -2
- package/dist/v1/build/TinyLocalStorage.cjs +0 -7
- package/dist/v1/build/TinyLocalStorage.d.mts +0 -3
- package/dist/v1/build/TinyLocalStorage.mjs +0 -2
- package/dist/v1/build/TinyMediaPlayer.cjs +0 -7
- package/dist/v1/build/TinyMediaPlayer.d.mts +0 -3
- package/dist/v1/build/TinyMediaPlayer.mjs +0 -2
- package/dist/v1/build/TinyNeedBar.cjs +0 -7
- package/dist/v1/build/TinyNeedBar.d.mts +0 -3
- package/dist/v1/build/TinyNeedBar.mjs +0 -2
- package/dist/v1/build/TinyNewWinEvents.cjs +0 -7
- package/dist/v1/build/TinyNewWinEvents.d.mts +0 -3
- package/dist/v1/build/TinyNewWinEvents.mjs +0 -2
- package/dist/v1/build/TinyNotifications.cjs +0 -7
- package/dist/v1/build/TinyNotifications.d.mts +0 -3
- package/dist/v1/build/TinyNotifications.mjs +0 -2
- package/dist/v1/build/TinyNotifyCenter.cjs +0 -7
- package/dist/v1/build/TinyNotifyCenter.d.mts +0 -3
- package/dist/v1/build/TinyNotifyCenter.mjs +0 -2
- package/dist/v1/build/TinyPromiseQueue.cjs +0 -7
- package/dist/v1/build/TinyPromiseQueue.d.mts +0 -3
- package/dist/v1/build/TinyPromiseQueue.mjs +0 -2
- package/dist/v1/build/TinyRadioFm.cjs +0 -7
- package/dist/v1/build/TinyRadioFm.d.mts +0 -3
- package/dist/v1/build/TinyRadioFm.mjs +0 -2
- package/dist/v1/build/TinyRateLimiter.cjs +0 -7
- package/dist/v1/build/TinyRateLimiter.d.mts +0 -3
- package/dist/v1/build/TinyRateLimiter.mjs +0 -2
- package/dist/v1/build/TinySimpleDice.cjs +0 -7
- package/dist/v1/build/TinySimpleDice.d.mts +0 -3
- package/dist/v1/build/TinySimpleDice.mjs +0 -2
- package/dist/v1/build/TinySmartScroller.cjs +0 -7
- package/dist/v1/build/TinySmartScroller.d.mts +0 -3
- package/dist/v1/build/TinySmartScroller.mjs +0 -2
- package/dist/v1/build/TinyTextDiffer.cjs +0 -7
- package/dist/v1/build/TinyTextDiffer.d.mts +0 -3
- package/dist/v1/build/TinyTextDiffer.mjs +0 -2
- package/dist/v1/build/TinyTextRangeEditor.cjs +0 -7
- package/dist/v1/build/TinyTextRangeEditor.d.mts +0 -3
- package/dist/v1/build/TinyTextRangeEditor.mjs +0 -2
- package/dist/v1/build/TinyTextarea.cjs +0 -7
- package/dist/v1/build/TinyTextarea.d.mts +0 -3
- package/dist/v1/build/TinyTextarea.mjs +0 -2
- package/dist/v1/build/TinyTimeout.cjs +0 -7
- package/dist/v1/build/TinyTimeout.d.mts +0 -3
- package/dist/v1/build/TinyTimeout.mjs +0 -2
- package/dist/v1/build/TinyToastNotify.cjs +0 -7
- package/dist/v1/build/TinyToastNotify.d.mts +0 -3
- package/dist/v1/build/TinyToastNotify.mjs +0 -2
- package/dist/v1/build/TinyUploadClicker.cjs +0 -7
- package/dist/v1/build/TinyUploadClicker.d.mts +0 -3
- package/dist/v1/build/TinyUploadClicker.mjs +0 -2
- package/dist/v1/build/UltraRandomMsgGen.cjs +0 -7
- package/dist/v1/build/UltraRandomMsgGen.d.mts +0 -3
- package/dist/v1/build/UltraRandomMsgGen.mjs +0 -2
- /package/dist/v1/libs/{TinyArrayComparator.cjs → array/TinyArrayComparator.cjs} +0 -0
- /package/dist/v1/libs/{TinyArrayComparator.d.mts → array/TinyArrayComparator.d.mts} +0 -0
- /package/dist/v1/libs/{TinyArrayComparator.mjs → array/TinyArrayComparator.mjs} +0 -0
- /package/dist/v1/libs/{TinyArrayPaginator.cjs → array/TinyArrayPaginator.cjs} +0 -0
- /package/dist/v1/libs/{TinyArrayPaginator.d.mts → array/TinyArrayPaginator.d.mts} +0 -0
- /package/dist/v1/libs/{TinyArrayPaginator.mjs → array/TinyArrayPaginator.mjs} +0 -0
- /package/dist/v1/libs/{ColorSafeStringify.cjs → color/ColorSafeStringify.cjs} +0 -0
- /package/dist/v1/libs/{ColorSafeStringify.d.mts → color/ColorSafeStringify.d.mts} +0 -0
- /package/dist/v1/libs/{ColorSafeStringify.mjs → color/ColorSafeStringify.mjs} +0 -0
- /package/dist/v1/libs/{TinyColorConverter.cjs → color/TinyColorConverter.cjs} +0 -0
- /package/dist/v1/libs/{TinyColorConverter.d.mts → color/TinyColorConverter.d.mts} +0 -0
- /package/dist/v1/libs/{TinyColorConverter.mjs → color/TinyColorConverter.mjs} +0 -0
- /package/dist/v1/libs/{TinyColorValidator.cjs → color/TinyColorValidator.cjs} +0 -0
- /package/dist/v1/libs/{TinyColorValidator.d.mts → color/TinyColorValidator.d.mts} +0 -0
- /package/dist/v1/libs/{TinyColorValidator.mjs → color/TinyColorValidator.mjs} +0 -0
- /package/dist/v1/libs/{TinyDayNightCycle.d.mts → game/TinyDayNightCycle.d.mts} +0 -0
- /package/dist/v1/libs/{TinyGamepad.d.mts → game/TinyGamepad.d.mts} +0 -0
- /package/dist/v1/libs/{TinyInventory.cjs → game/TinyInventory.cjs} +0 -0
- /package/dist/v1/libs/{TinyInventory.d.mts → game/TinyInventory.d.mts} +0 -0
- /package/dist/v1/libs/{TinyInventory.mjs → game/TinyInventory.mjs} +0 -0
- /package/dist/v1/libs/{TinyInventoryTrader.cjs → game/TinyInventoryTrader.cjs} +0 -0
- /package/dist/v1/libs/{TinyInventoryTrader.d.mts → game/TinyInventoryTrader.d.mts} +0 -0
- /package/dist/v1/libs/{TinyInventoryTrader.mjs → game/TinyInventoryTrader.mjs} +0 -0
- /package/dist/v1/libs/{TinyLevelUp.cjs → game/TinyLevelUp.cjs} +0 -0
- /package/dist/v1/libs/{TinyLevelUp.d.mts → game/TinyLevelUp.d.mts} +0 -0
- /package/dist/v1/libs/{TinyLevelUp.mjs → game/TinyLevelUp.mjs} +0 -0
- /package/dist/v1/libs/{TinyNeedBar.cjs → game/TinyNeedBar.cjs} +0 -0
- /package/dist/v1/libs/{TinyNeedBar.d.mts → game/TinyNeedBar.d.mts} +0 -0
- /package/dist/v1/libs/{TinyNeedBar.mjs → game/TinyNeedBar.mjs} +0 -0
- /package/dist/v1/libs/{TinyDomReadyManager.cjs → html/TinyDomReadyManager.cjs} +0 -0
- /package/dist/v1/libs/{TinyDomReadyManager.d.mts → html/TinyDomReadyManager.d.mts} +0 -0
- /package/dist/v1/libs/{TinyDomReadyManager.mjs → html/TinyDomReadyManager.mjs} +0 -0
- /package/dist/v1/libs/{TinyElementObserver.d.mts → html/TinyElementObserver.d.mts} +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlAnchor.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlAnchor.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlAnchor.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlButton.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlButton.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlButton.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlCanvas.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlCanvas.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlCanvas.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlDatalist.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlDatalist.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlDatalist.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlEmbed.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlEmbed.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlEmbed.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlForm.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlForm.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlForm.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlIcon.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlIcon.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlIcon.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlIframe.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlIframe.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlIframe.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlImage.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlImage.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlImage.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlLink.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlLink.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlLink.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlMedia.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlMedia.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlMedia.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlScript.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlScript.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlScript.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlSelect.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlSelect.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlSelect.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlStyle.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlStyle.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlStyle.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlTemplate.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlTemplate.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlTemplate.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlTextarea.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlTextarea.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/TinyHtmlTextarea.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/index.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/index.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/index.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlColorInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlColorInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlColorInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlFileInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlFileInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlFileInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlHiddenInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlHiddenInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlHiddenInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlImageInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlImageInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/TinyHtmlImageInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlButtonInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlButtonInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlButtonInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlResetInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlResetInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlResetInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlSubmitInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlSubmitInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/button/TinyHtmlSubmitInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/check/TinyHtmlCheckboxInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/check/TinyHtmlCheckboxInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/check/TinyHtmlCheckboxInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/check/TinyHtmlRadioInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/check/TinyHtmlRadioInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/check/TinyHtmlRadioInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlDateInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlDateInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlDateInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlDateTimeInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlDateTimeInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlDateTimeInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlMonthInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlMonthInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlMonthInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlTimeInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlTimeInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlTimeInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlWeekInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlWeekInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/date/TinyHtmlWeekInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/number/TinyHtmlNumberInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/number/TinyHtmlNumberInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/number/TinyHtmlNumberInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/number/TinyHtmlRangeInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/number/TinyHtmlRangeInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/number/TinyHtmlRangeInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlEmailInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlEmailInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlEmailInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlPasswordInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlPasswordInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlPasswordInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlSearchInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlSearchInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlSearchInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlTelInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlTelInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlTelInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlTextInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlTextInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlTextInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlUrlInput.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlUrlInput.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/input/text/TinyHtmlUrlInput.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlAudio.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlAudio.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlAudio.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlObject.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlObject.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlObject.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlSource.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlSource.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlSource.mjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlVideo.cjs +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlVideo.d.mts +0 -0
- /package/dist/v1/libs/{TinyHtml → html/TinyHtml}/media/TinyHtmlVideo.mjs +0 -0
- /package/dist/v1/libs/{TinyDragDropDetector.d.mts → html/drag/TinyDragDropDetector.d.mts} +0 -0
- /package/dist/v1/libs/{TinyIframeEvents.d.mts → html/events/TinyIframeEvents.d.mts} +0 -0
- /package/dist/v1/libs/{TinyNewWinEvents.d.mts → html/events/TinyNewWinEvents.d.mts} +0 -0
- /package/dist/v1/libs/{TinyNotifications.d.mts → html/notification/TinyNotifications.d.mts} +0 -0
- /package/dist/v1/libs/{TinyNotifyCenter.d.mts → html/notification/TinyNotifyCenter.d.mts} +0 -0
- /package/dist/v1/libs/{TinyToastNotify.d.mts → html/notification/TinyToastNotify.d.mts} +0 -0
- /package/dist/v1/libs/{TinyAfterScrollWatcher.d.mts → html/scroll/TinyAfterScrollWatcher.d.mts} +0 -0
- /package/dist/v1/libs/{TinyAnalogClock.d.mts → html/templates/TinyAnalogClock.d.mts} +0 -0
- /package/dist/v1/libs/{TinyCookieConsent.cjs → html/templates/TinyCookieConsent.cjs} +0 -0
- /package/dist/v1/libs/{TinyCookieConsent.d.mts → html/templates/TinyCookieConsent.d.mts} +0 -0
- /package/dist/v1/libs/{TinyCookieConsent.mjs → html/templates/TinyCookieConsent.mjs} +0 -0
- /package/dist/v1/libs/{TinyLoadingScreen.cjs → html/templates/TinyLoadingScreen.cjs} +0 -0
- /package/dist/v1/libs/{TinyLoadingScreen.d.mts → html/templates/TinyLoadingScreen.d.mts} +0 -0
- /package/dist/v1/libs/{TinyLoadingScreen.mjs → html/templates/TinyLoadingScreen.mjs} +0 -0
- /package/dist/v1/libs/{TinyAdvancedRaffle.d.mts → math/TinyAdvancedRaffle.d.mts} +0 -0
- /package/dist/v1/libs/{TinyMamdaniInferenceSystem.cjs → math/TinyMamdaniInferenceSystem.cjs} +0 -0
- /package/dist/v1/libs/{TinyMamdaniInferenceSystem.d.mts → math/TinyMamdaniInferenceSystem.d.mts} +0 -0
- /package/dist/v1/libs/{TinyMamdaniInferenceSystem.mjs → math/TinyMamdaniInferenceSystem.mjs} +0 -0
- /package/dist/v1/libs/{TinyRateLimiter.d.mts → math/TinyRateLimiter.d.mts} +0 -0
- /package/dist/v1/libs/{TinySimpleDice.d.mts → math/TinySimpleDice.d.mts} +0 -0
- /package/dist/v1/libs/{TinyTimeout.d.mts → math/TinyTimeout.d.mts} +0 -0
- /package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/docs/SoundCloudWidget.cjs +0 -0
- /package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/docs/SoundCloudWidget.d.mts +0 -0
- /package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/docs/SoundCloudWidget.mjs +0 -0
- /package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/docs/YouTubePlayer.cjs +0 -0
- /package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/docs/YouTubePlayer.d.mts +0 -0
- /package/dist/v1/libs/{TinyMediaPlayer → media/TinyMediaPlayer}/docs/YouTubePlayer.mjs +0 -0
- /package/dist/v1/libs/{TinyLocalStorage.d.mts → storage/TinyLocalStorage.d.mts} +0 -0
- /package/dist/v1/libs/{TinyClipboard.cjs → text/TinyClipboard.cjs} +0 -0
- /package/dist/v1/libs/{TinyClipboard.d.mts → text/TinyClipboard.d.mts} +0 -0
- /package/dist/v1/libs/{TinyClipboard.mjs → text/TinyClipboard.mjs} +0 -0
- /package/dist/v1/libs/{TinyI18.d.mts → text/TinyI18.d.mts} +0 -0
- /package/dist/v1/libs/{TinyTextDiffer.d.mts → text/TinyTextDiffer.d.mts} +0 -0
- /package/dist/v1/libs/{TinyTextRangeEditor.cjs → text/TinyTextRangeEditor.cjs} +0 -0
- /package/dist/v1/libs/{TinyTextRangeEditor.d.mts → text/TinyTextRangeEditor.d.mts} +0 -0
- /package/dist/v1/libs/{TinyTextRangeEditor.mjs → text/TinyTextRangeEditor.mjs} +0 -0
- /package/dist/v1/libs/{TinyTextarea.cjs → text/TinyTextarea.cjs} +0 -0
- /package/dist/v1/libs/{TinyTextarea.d.mts → text/TinyTextarea.d.mts} +0 -0
- /package/dist/v1/libs/{TinyTextarea.mjs → text/TinyTextarea.mjs} +0 -0
- /package/dist/v1/libs/{TinyClassManager → tools/TinyClassManager}/TinyPluginInliner.d.mts +0 -0
- /package/dist/v1/libs/{TinyClassManager → tools/TinyClassManager}/TinyPluginInliner.mjs +0 -0
- /package/dist/v1/libs/{TinyClassManager.cjs → tools/TinyClassManager.cjs} +0 -0
- /package/dist/v1/libs/{TinyClassManager.d.mts → tools/TinyClassManager.d.mts} +0 -0
- /package/dist/v1/libs/{TinyClassManager.mjs → tools/TinyClassManager.mjs} +0 -0
- /package/dist/v1/libs/{TinyDebugger.d.mts → tools/TinyDebugger.d.mts} +0 -0
- /package/dist/v1/libs/{examples → tools/examples}/TinyClassManager.cjs +0 -0
- /package/dist/v1/libs/{examples → tools/examples}/TinyClassManager.d.mts +0 -0
- /package/dist/v1/libs/{examples → tools/examples}/TinyClassManager.mjs +0 -0
- /package/dist/v1/libs/{TinyPromiseQueue.cjs → utils/TinyPromiseQueue.cjs} +0 -0
- /package/dist/v1/libs/{TinyPromiseQueue.d.mts → utils/TinyPromiseQueue.d.mts} +0 -0
- /package/dist/v1/libs/{TinyPromiseQueue.mjs → utils/TinyPromiseQueue.mjs} +0 -0
- /package/dist/v1/libs/{UltraRandomMsgGen.d.mts → utils/UltraRandomMsgGen.d.mts} +0 -0
- /package/dist/v1/libs/{utils.cjs → utils/tools.cjs} +0 -0
- /package/dist/v1/libs/{utils.mjs → utils/tools.mjs} +0 -0
- /package/docs/v1/libs/{TinyColorConverter.md → color/TinyColorConverter.md} +0 -0
- /package/docs/v1/libs/{TinyColorValidator.md → color/TinyColorValidator.md} +0 -0
- /package/docs/v1/libs/{TinyDayNightCycle.md → game/TinyDayNightCycle.md} +0 -0
- /package/docs/v1/libs/{TinyGamepad.md → game/TinyGamepad.md} +0 -0
- /package/docs/v1/libs/{TinyInventory.md → game/TinyInventory.md} +0 -0
- /package/docs/v1/libs/{TinyInventoryTrader.md → game/TinyInventoryTrader.md} +0 -0
- /package/docs/v1/libs/{TinyNeedBar.md → game/TinyNeedBar.md} +0 -0
- /package/docs/v1/libs/{TinyHtml.md → html/TinyHtml.md} +0 -0
- /package/docs/v1/libs/{TinyHtmlTips.md → html/TinyHtmlTips.md} +0 -0
- /package/docs/v1/libs/{TinyNotifyCenter.md → html/notification/TinyNotifyCenter.md} +0 -0
- /package/docs/v1/libs/{TinyToastNotify.md → html/notification/TinyToastNotify.md} +0 -0
- /package/docs/v1/libs/{TinySmartScroller.md → html/scroll/TinySmartScroller.md} +0 -0
- /package/docs/v1/libs/{TinyUploadClicker.md → html/upload/TinyUploadClicker.md} +0 -0
- /package/docs/v1/libs/{TinyAdvancedRaffle.md → math/TinyAdvancedRaffle.md} +0 -0
- /package/docs/v1/libs/{TinyMamdaniInferenceSystem.md → math/TinyMamdaniInferenceSystem.md} +0 -0
- /package/docs/v1/libs/{TinyRateLimiter.md → math/TinyRateLimiter.md} +0 -0
- /package/docs/v1/libs/{TinySimpleDice.md → math/TinySimpleDice.md} +0 -0
- /package/docs/v1/libs/{TinyTimeout.md → math/TinyTimeout.md} +0 -0
- /package/docs/v1/libs/{TinyRadioFm.md → media/TinyRadioFm.md} +0 -0
- /package/docs/v1/libs/{TinyLocalStorage.md → storage/TinyLocalStorage.md} +0 -0
- /package/docs/v1/libs/{TinyI18.md → text/TinyI18.md} +0 -0
- /package/docs/v1/libs/{TinyTextRangeEditor.md → text/TinyTextRangeEditor.md} +0 -0
- /package/docs/v1/libs/{UltraRandomMsgGen.md → utils/UltraRandomMsgGen.md} +0 -0
package/TinyFork.mjs
CHANGED
|
@@ -132,23 +132,43 @@ async function resolveSourceFile(targetVersion, basePath) {
|
|
|
132
132
|
for (let v = startVersion; v >= endVersion; v--) {
|
|
133
133
|
const versionDir = path.join(PATHS.cliRoot, 'dist', `v${v}`);
|
|
134
134
|
|
|
135
|
-
// If it's a direct file path without functions (which means basePath might be the full path)
|
|
136
135
|
for (const ext of extensions) {
|
|
137
|
-
//
|
|
138
|
-
const
|
|
139
|
-
if (existsSync(
|
|
136
|
+
// 1. Exact file match (path/to/folder/file.mjs)
|
|
137
|
+
const exactPathFile = path.join(versionDir, `${basePath}${ext}`);
|
|
138
|
+
if (existsSync(exactPathFile)) {
|
|
139
|
+
return { filePath: exactPathFile, ext, versionDir };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// 2. Exact file match for directory index (path/to/folder/index.mjs)
|
|
143
|
+
const exactPathFolder = path.join(versionDir, basePath, `index${ext}`);
|
|
144
|
+
if (existsSync(exactPathFolder)) {
|
|
145
|
+
return { filePath: exactPathFolder, ext, versionDir };
|
|
146
|
+
}
|
|
140
147
|
|
|
141
|
-
//
|
|
142
|
-
// but didn't have commas. (e.g., folder/module/func1)
|
|
148
|
+
// 3. Intercepted function match (path/to/module/function -> path/to/module.mjs or path/to/folder/index.mjs)
|
|
143
149
|
const parts = basePath.split('/');
|
|
144
150
|
if (parts.length > 1) {
|
|
145
151
|
const funcNameCandidate = parts.pop();
|
|
146
152
|
const modulePath = parts.join('/');
|
|
147
|
-
const nestedPath = path.join(versionDir, `${modulePath}${ext}`);
|
|
148
153
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return {
|
|
154
|
+
const nestedPathFile = path.join(versionDir, `${modulePath}${ext}`);
|
|
155
|
+
if (existsSync(nestedPathFile)) {
|
|
156
|
+
return {
|
|
157
|
+
filePath: nestedPathFile,
|
|
158
|
+
ext,
|
|
159
|
+
versionDir,
|
|
160
|
+
interceptedFunction: funcNameCandidate,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const nestedPathFolder = path.join(versionDir, modulePath, `index${ext}`);
|
|
165
|
+
if (existsSync(nestedPathFolder)) {
|
|
166
|
+
return {
|
|
167
|
+
filePath: nestedPathFolder,
|
|
168
|
+
ext,
|
|
169
|
+
versionDir,
|
|
170
|
+
interceptedFunction: funcNameCandidate,
|
|
171
|
+
};
|
|
152
172
|
}
|
|
153
173
|
}
|
|
154
174
|
}
|
|
@@ -238,6 +258,8 @@ class MultiFileExtractor {
|
|
|
238
258
|
if (!path.extname(resolved)) {
|
|
239
259
|
for (const ext of ['.mjs', '.js']) {
|
|
240
260
|
if (existsSync(resolved + ext)) return resolved + ext;
|
|
261
|
+
if (existsSync(path.join(resolved, `index${ext}`)))
|
|
262
|
+
return path.join(resolved, `index${ext}`);
|
|
241
263
|
}
|
|
242
264
|
}
|
|
243
265
|
return resolved;
|
|
@@ -297,26 +319,26 @@ class MultiFileExtractor {
|
|
|
297
319
|
// Tracing Static Methods on any Class
|
|
298
320
|
ClassDeclaration(classPath) {
|
|
299
321
|
if (req.full) return;
|
|
300
|
-
classPath.
|
|
322
|
+
const bodyPaths = classPath.get('body.body');
|
|
323
|
+
|
|
324
|
+
bodyPaths.forEach((itemPath) => {
|
|
325
|
+
const item = itemPath.node;
|
|
301
326
|
const keyName = t.isIdentifier(item.key) ? item.key.name : null;
|
|
327
|
+
|
|
302
328
|
if (
|
|
303
329
|
keyName &&
|
|
304
330
|
item.static &&
|
|
305
|
-
(
|
|
331
|
+
(itemPath.isClassMethod() || itemPath.isClassProperty()) &&
|
|
306
332
|
req.names.has(keyName)
|
|
307
333
|
) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
{
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
},
|
|
334
|
+
// Fixed Babel parent context mapping by traversing the specific Path node
|
|
335
|
+
itemPath.traverse({
|
|
336
|
+
Identifier(idPath) {
|
|
337
|
+
if (idPath.isReferencedIdentifier() && bindings[idPath.node.name]) {
|
|
338
|
+
addToKeep(idPath.node.name);
|
|
339
|
+
}
|
|
316
340
|
},
|
|
317
|
-
|
|
318
|
-
astPath,
|
|
319
|
-
);
|
|
341
|
+
});
|
|
320
342
|
}
|
|
321
343
|
});
|
|
322
344
|
},
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## 🚀 Release: Major Library Reorganization
|
|
2
|
+
|
|
3
|
+
### 📂 What's New?
|
|
4
|
+
We have performed a complete overhaul of the `tiny-essentials/libs` directory structure. To improve maintainability and discoverability, the libraries are now **categorized by type** instead of being in a flat list. This makes the codebase much more organized and intuitive! 🛠️
|
|
5
|
+
|
|
6
|
+
### 📝 Key Changes
|
|
7
|
+
* **Categorized Structure:** `tiny-essentials/libs` is now organized into folders based on the specific type of library. 📁
|
|
8
|
+
* **Updated Exports:** The `package.json` `exports` field has been fully updated to match the new directory structure. 📦
|
|
9
|
+
* **Documentation Refresh:** The `docs/` folder has been updated to reflect these structural changes. 📚
|
|
10
|
+
|
|
11
|
+
### ⚠️ IMPORTANT: Action Required (Breaking Change) 🚨
|
|
12
|
+
**Please read this carefully to avoid errors!**
|
|
13
|
+
|
|
14
|
+
If your project maps sub-modules from `tiny-essentials/libs`, **you must review your import paths immediately.**
|
|
15
|
+
|
|
16
|
+
Because the folder structure has changed, the old paths are no longer valid. Failing to update your paths to the new categorized structure will result in `Module Not Found` errors. 🛠️✅
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
*Happy tiny coding!* ✨
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../../src/_/numbers.mjs"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAHrB,MAGqB,GAFnB,MAAM,CAMlB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,MAHnB,MAAM,KACJ,MAE0C,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,MAHnB,MAAM,KACJ,MAEsC,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,MAHzB,MAAM,KACJ,MAEoD,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,cAAc,MAHhB,MAAM,KACJ,MAEmC,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,cAAc,MAHhB,MAAM,KACJ,MAE4D,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAHxB,MAAM,KACJ,MAEyD,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,MAH7B,MAAM,KACJ,MAE4D,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,MAHrB,MAAM,KACJ,MAEkD,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,eAAe,MAHjB,MAAM,KACJ,MAEwC,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,eAAe,MAHjB,MAAM,KACJ,MAEoC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,WAAW,MAHb,MAAM,KACJ,MAEoC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,MAHV,MAAM,KACJ,MAEiC,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,eAAe,MAHjB,MAAM,KACJ,MAE6C,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAHxB,MAAM,KACJ,MAEmE,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,MAHrB,MAAM,KACJ,MAEwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={705(e,t,r){r.d(t,{TinyAdvancedRaffle:()=>n});var i=r.cjs(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))}c(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&c(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 u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var s,o,n,a;if(u(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=f(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 p(){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 y(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=p.bind(i);return s.listener=r,i.wrapFn=s,s}function m(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):l(s,s.length)}function d(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 l(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function c(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 f(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 u=o[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var f=u.length,h=l(u,f);for(r=0;r<f;++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 u(t),this.on(e,y(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,y(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,s,o,n;if(u(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 m(this,e,!0)},n.prototype.rawListeners=function(e){return m(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},n.prototype.listenerCount=d,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});const s=e=>{if(e)throw new Error("This TinyAdvancedRaffle instance has been destroyed and can no longer be used.")};class o extends i.EventEmitter{#e=!1;#t;#r;#i=[];#s=[];#o=[];#n=new Map;#a=new Set;#u=new Map;#f;#h=new Map;#p=new Map;get isDestroyed(){return this.#e}get freq(){return s(this.#e),Object.fromEntries(this.#p)}get size(){return s(this.#e),this.#h.size}get normalization(){return s(this.#e),this.#t}set normalization(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("normalization must be a non-empty string (e.g., 'relative', 'softmax').");this.#t=e}get seed(){return s(this.#e),this.#r}set seed(e){if(s(this.#e),null!==e&&("number"!=typeof e||!Number.isFinite(e)))throw new TypeError("seed must be a finite number or null.");this.#r=e,null!==e&&(this.#f=this._makeSeededRng(e))}get globalModifiers(){return s(this.#e),[...this.#i]}set globalModifiers(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("globalModifiers must be an array of functions (WeightsCallback).");this.#i=e}get temporaryModifiers(){return s(this.#e),[...this.#s]}set temporaryModifiers(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>e&&"function"==typeof e.fn&&Number.isInteger(e.uses)&&e.uses>0))throw new TypeError("temporaryModifiers must be an array of objects { fn: function, uses: positive integer }.");this.#s=e}get conditionalRules(){return s(this.#e),[...this.#o]}set conditionalRules(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("conditionalRules must be an array of functions (WeightsCallback).");this.#o=e}get pitySystems(){return s(this.#e),Object.fromEntries(this.#n)}set pitySystems(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"number"==typeof e.threshold&&"number"==typeof e.increment&&"number"==typeof e.cap&&"number"==typeof e.counter&&"number"==typeof e.currentAdd)))throw new TypeError("pitySystems must be a Map<string, Pity> with all numeric fields.");this.#n=e}get exclusions(){return s(this.#e),Array.from(this.#a)}set exclusions(e){if(s(this.#e),!(e instanceof Set&&[...e].every(e=>"string"==typeof e)))throw new TypeError("exclusions must be a Set<string>.");this.#a=e}get groups(){s(this.#e);const e={};return this.#u.forEach((t,r)=>e[r]=Array.from(t)),e}set groups(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e instanceof Set&&[...e].every(e=>"string"==typeof e))))throw new TypeError("groups must be a Map<string, Set<string>>.");this.#u=e}get rng(){return s(this.#e),this.#f}set rng(e){if(s(this.#e),"function"!=typeof e||"number"!=typeof e())throw new TypeError("rng must be a function returning a number (RngGenerator).");this.#f=e}get items(){s(this.#e);const e={};return this.#h.forEach((t,r)=>{e[r]={...t,groups:Array.from(t.groups)}}),e}set items(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"string"==typeof e.id&&"string"==typeof e.label&&"number"==typeof e.baseWeight&&e.groups instanceof Set&&"boolean"==typeof e.locked&&"object"==typeof e.meta)))throw new TypeError("items must be a Map<string, ItemData> with valid item structures.");this.clearList(),this.#h=e}constructor(e={}){super();const{rng:t=null,seed:r=null,normalization:i="relative"}=e;this.#t=i,this.#r=r,"function"==typeof t?this.#f=t:null!==this.#r?this.#f=this._makeSeededRng(this.#r):this.#f=Math.random,this.#r=r??null}hasItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#h.has(e)}addItem(e,t={}){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("object"!=typeof t||null===t)throw new TypeError("opts must be an object");let{weight:r=1,label:i=e,meta:o={},groups:n=[]}=t;if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError("weight must be a non-negative number");if("string"!=typeof i)throw new TypeError("label must be a string");if("object"!=typeof o||null===o)throw new TypeError("meta must be an object");if(!(Array.isArray(n)||n instanceof Set))throw new TypeError("groups must be an array or a Set of strings");n=Array.isArray(n)?n:[...n];for(const e of n)if("string"!=typeof e)throw new TypeError("groups must contain only strings");const a={id:e,label:i,baseWeight:Math.max(0,Number(r)||0),meta:{...o},groups:new Set(n),locked:!1};this.#h.set(e,a);for(const t of n)this._ensureGroup(t).add(e);return this.emit("itemAdded",a),a}removeItem(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");const t=this.#h.get(e);if(!t)return!1;for(const r of t.groups){const t=this.#u.get(r);t&&t.delete(e)}return this.#h.delete(e),this.emit("itemRemoved",e),this.resetFreq(e),this.resetPity(e),!0}setBaseWeight(e,t){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("number"!=typeof t||!Number.isFinite(t)||t<0)throw new TypeError("weight must be a non-negative number");const r=this.#h.get(e);if(!r)throw new Error("Item not found");r.baseWeight=Math.max(0,Number(t)||0),this.emit("weightChanged",{id:e,weight:r.baseWeight})}getItem(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");return this.#h.get(e)??null}listItems(){return s(this.#e),Array.from(this.#h.values()).map(e=>({...e}))}clearList(){s(this.#e),this.#h.clear(),this.clearFreqs(),this.clearPities()}hasGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#i.includes(e)}addGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i.push(e)}removeGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i=this.#i.filter(t=>t!==e)}hasTemporaryModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#s.some(t=>t.fn===e)}addTemporaryModifier(e,t=1){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");if("number"!=typeof t||Number.isNaN(t))throw new TypeError("uses must be a number");this.#s.push({fn:e,uses:Math.max(1,Math.floor(t))})}removeTemporaryModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");const t=this.#s.length;return this.#s=this.#s.filter(t=>t.fn!==e),this.#s.length!==t}hasConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");return this.#o.includes(e)}addConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");this.#o.push(e)}removeConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");const t=this.#o.length;return this.#o=this.#o.filter(t=>t!==e),this.#o.length!==t}hasPity(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#n.has(e)}configurePity(e,t){if(s(this.#e),!this.#h.has(e))throw new Error("Item not found");if("object"!=typeof t||null===t)throw new TypeError("cfg must be an object");const{threshold:r,increment:i,cap:o=1/0}=t;if("number"!=typeof r||r<=0)throw new TypeError("threshold must be a positive number");if("number"!=typeof i)throw new TypeError("increment must be a number");if("number"!=typeof o)throw new TypeError("cap must be a number");this.#n.set(e,{threshold:Math.max(1,r),increment:Number(i)||0,cap:Number(o)||1/0,counter:0,currentAdd:0})}resetPity(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("itemId must be a non-empty string");const t=this.#n.get(e);t&&(t.counter=0,t.currentAdd=0)}clearPities(){s(this.#e),this.#n.clear()}hasExclusion(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#a.has(e)}excludeItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.add(e)}includeItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.delete(e)}_ensureGroup(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("name must be a string");let t=this.#u.get(e);return t||(t=new Set,this.#u.set(e,t)),t}hasInGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);return!!r&&r.has(e)}addToGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#h.get(e);if(!r)throw new Error("Item missing");r.groups.add(t),this._ensureGroup(t).add(e)}removeFromGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);r&&r.delete(e);const i=this.#h.get(e);i&&i.groups.delete(t)}clearFreqs(){s(this.#e),this.#p.clear()}resetFreq(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#p.delete(e)}computeEffectiveWeights(e={}){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("computeEffectiveWeights: parameter 'context' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("computeEffectiveWeights: context.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("computeEffectiveWeights: context.metadata must be a non-null object if provided, got "+typeof e.metadata);const t=new Map;for(const[e,r]of this.#h)t.set(e,r.baseWeight);for(const r of this.#i){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#s){const i=r.fn(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#o){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const[e,r]of this.#n)if(t.has(e)&&r.counter>r.threshold){r.currentAdd=Math.min(r.cap,r.currentAdd+r.increment);const i=t.get(e);i&&t.set(e,i+r.currentAdd)}for(const e of this.#a)t.delete(e);for(const[e,r]of Array.from(t.entries()))r>0||t.delete(e);return t}_weightsToDistribution(e){if(!(e instanceof Map))throw new TypeError("_weightsToDistribution: parameter 'weights' must be a Map, got "+typeof e);for(const[t,r]of e){if("string"!=typeof t)throw new TypeError("_weightsToDistribution: weights Map key must be string, got "+typeof t);if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError(`_weightsToDistribution: weights Map value must be finite non-negative number, got ${r} for key ${t}`)}const t=Array.from(e.entries()).map(([e,t])=>({id:e,weight:t}));if(0===t.length)return[];if("softmax"===this.#t){const e=Math.max(...t.map(e=>e.weight)),r=t.map(t=>Math.exp(t.weight-e)),i=r.reduce((e,t)=>e+t,0);let s=0;return t.map((e,t)=>{const o=r[t]/i;return s+=o,{id:e.id,weight:e.weight,p:o,cumulative:s}})}{const e=t.reduce((e,t)=>e+t.weight,0);let r=0;return t.map(t=>{const i=t.weight/e;return r+=i,{id:t.id,weight:t.weight,p:i,cumulative:r}})}}drawOne(e={}){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("drawOne: parameter 'opts' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("drawOne: opts.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("drawOne: opts.metadata must be a non-null object if provided, got "+typeof e.metadata);const t={previousDraws:e.previousDraws??[],metadata:e.metadata??{},activeModifiers:[...this.#s]},r=this.computeEffectiveWeights(t),i=this._weightsToDistribution(r);if(!i.length)return null;const o=this.#f(),n=i.find(e=>o<=e.cumulative)??i[i.length-1];for(const[e,t]of this.#n)e===n.id?(t.counter=0,t.currentAdd=0):t.counter++;this._consumeTemporaryModifiers();const a=this.#h.get(n.id);if(!a)return null;const u={id:a.id,label:a.label,meta:{...a.meta},prob:n.p};return this.emit("draw",u),u&&this.#p.set(u.id,(this.#p.get(u.id)||0)+1),u}_consumeTemporaryModifiers(){for(let e=this.#s.length-1;e>=0;--e){const t=this.#s[e];t.uses-=1,t.uses<=0&&this.#s.splice(e,1)}}drawMany(e=1,t={}){if(s(this.#e),!Number.isInteger(e)||e<=0)throw new TypeError(`drawMany: parameter 'count' must be a positive integer, got ${e}`);if("object"!=typeof t||null===t)throw new TypeError("drawMany: parameter 'opts' must be a non-null object, got "+typeof t);if("withReplacement"in t&&"boolean"!=typeof t.withReplacement)throw new TypeError("drawMany: opts.withReplacement must be boolean if provided, got "+typeof t.withReplacement);if("ensureUnique"in t&&"boolean"!=typeof t.ensureUnique)throw new TypeError("drawMany: opts.ensureUnique must be boolean if provided, got "+typeof t.ensureUnique);if("metadata"in t&&void 0!==t.metadata&&("object"!=typeof t.metadata||null===t.metadata))throw new TypeError("drawMany: opts.metadata must be a non-null object if provided, got "+typeof t.metadata);if("previousDraws"in t&&!Array.isArray(t.previousDraws))throw new TypeError("drawMany: opts.previousDraws must be an array if provided, got "+typeof t.previousDraws);const r=t.withReplacement??!0,i=t.ensureUnique??!1,o=[],n=t.previousDraws??[];if(!r&&i){const r=new Set;for(let i=0;i<e;++i){const e=new Set(this.#a);for(const e of r)this.#a.add(e);const i=this.drawOne({previousDraws:n,metadata:t.metadata});if(this.#a=e,!i)break;o.push(i),r.add(i.id),n.push(i)}return o}for(let i=0;i<e;++i){const e=this.drawOne({previousDraws:n,metadata:t.metadata});if(!e)break;o.push(e),n.push(e),r||this.excludeItem(e.id)}if(!r)for(const e of o)this.includeItem(e.id);return o}exportToJson(){return s(this.#e),{items:Array.from(this.#h.values()).map(e=>({id:e.id,label:e.label,baseWeight:e.baseWeight,meta:e.meta,groups:Array.from(e.groups),locked:!1})),pity:Array.from(this.#n.entries()),exclusions:Array.from(this.#a),normalization:this.#t,seed:this.#r}}loadFromJson(e){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("data must be a non-null object");if(!Array.isArray(e.items)||!Array.isArray(e.pity)||!Array.isArray(e.exclusions))throw new TypeError("data must have items, pity, and exclusions arrays");if("string"!=typeof e.normalization)throw new TypeError("data.normalization must be a string");if(void 0!==e.seed&&null!==e.seed&&"number"!=typeof e.seed)throw new TypeError("data.seed must be a number, null, or undefined");this.clearList();for(const t of e.items){if("object"!=typeof t||null===t)throw new TypeError("Each item must be a non-null object");if("string"!=typeof t.id||!t.id.trim())throw new TypeError("Each item.id must be a non-empty string");if("string"!=typeof t.label)throw new TypeError(`Item with id "${t.id}" has invalid label; must be string`);if("number"!=typeof t.baseWeight||!Number.isFinite(t.baseWeight)||t.baseWeight<0)throw new TypeError(`Item with id "${t.id}" has invalid baseWeight; must be a finite non-negative number`);if(void 0!==t.groups&&!Array.isArray(t.groups))throw new TypeError(`Item with id "${t.id}" has invalid groups; must be an array of strings`);if(t.groups&&!t.groups.every(e=>"string"==typeof e))throw new TypeError(`Item with id "${t.id}" has groups containing non-string values`);if(void 0!==t.meta&&("object"!=typeof t.meta||null===t.meta))throw new TypeError(`Item with id "${t.id}" has invalid meta; must be an object`);this.#h.set(t.id,{id:t.id,label:t.label,baseWeight:t.baseWeight,meta:t.meta||{},groups:new Set(t.groups||[]),locked:!1});for(const e of t.groups||[])this._ensureGroup(e).add(t.id)}this.pitySystems=new Map(e.pity||[]),this.exclusions=new Set(e.exclusions||[]),this.normalization=e.normalization,void 0!==e.seed&&(this.seed=e.seed)}clone(){s(this.#e);const e=new o;return e.#t=this.#t,e.#r=this.#r,e.#i=[...this.#i],e.#s=this.#s.map(e=>({fn:e.fn,uses:e.uses})),e.#o=[...this.#o],e.#n=new Map([...this.#n.entries()].map(([e,t])=>[e,{...t}])),e.#a=new Set(this.#a),e.#u=new Map([...this.#u.entries()].map(([e,t])=>[e,new Set(t)])),e.#f=this.#f,e.#h=new Map([...this.#h.entries()].map(([e,t])=>[e,{...t,groups:new Set(t.groups),meta:{...t.meta}}])),e.#p=new Map(this.#p),e}_makeSeededRng(e){if("number"!=typeof e||!Number.isFinite(e))throw new TypeError("seed must be a finite number");let t=e>>>0;return function(){t+=1831565813;let e=Math.imul(t^t>>>15,1|t);return e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}destroy(){this.#e||(this.#n.clear(),this.#a.clear(),this.#u.clear(),this.#h.clear(),this.#p.clear(),this.#i=[],this.#s=[],this.#o=[],this.#r=null,this.#e=!0)}}const n=o}};const t={};function r(i){const s=t[i];if(void 0!==s)return s.exports;const o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var s=t[i++],o=t[i++];r.o(e,s)?0===o&&i++:0===o?Object.defineProperty(e,s,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,s,{enumerable:!0,get:o})}else for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let i=r(705);window.TinyAdvancedRaffle=i.TinyAdvancedRaffle})();
|
|
1
|
+
(()=>{"use strict";var e={159(e,t,r){r.d(t,{TinyAdvancedRaffle:()=>n});var i=r.cjs(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))}c(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&c(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 u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var s,o,n,a;if(u(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=f(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 p(){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 y(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=p.bind(i);return s.listener=r,i.wrapFn=s,s}function m(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):l(s,s.length)}function d(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 l(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function c(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 f(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 u=o[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var f=u.length,h=l(u,f);for(r=0;r<f;++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 u(t),this.on(e,y(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,y(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,s,o,n;if(u(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 m(this,e,!0)},n.prototype.rawListeners=function(e){return m(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},n.prototype.listenerCount=d,n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});const s=e=>{if(e)throw new Error("This TinyAdvancedRaffle instance has been destroyed and can no longer be used.")};class o extends i.EventEmitter{#e=!1;#t;#r;#i=[];#s=[];#o=[];#n=new Map;#a=new Set;#u=new Map;#f;#h=new Map;#p=new Map;get isDestroyed(){return this.#e}get freq(){return s(this.#e),Object.fromEntries(this.#p)}get size(){return s(this.#e),this.#h.size}get normalization(){return s(this.#e),this.#t}set normalization(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("normalization must be a non-empty string (e.g., 'relative', 'softmax').");this.#t=e}get seed(){return s(this.#e),this.#r}set seed(e){if(s(this.#e),null!==e&&("number"!=typeof e||!Number.isFinite(e)))throw new TypeError("seed must be a finite number or null.");this.#r=e,null!==e&&(this.#f=this._makeSeededRng(e))}get globalModifiers(){return s(this.#e),[...this.#i]}set globalModifiers(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("globalModifiers must be an array of functions (WeightsCallback).");this.#i=e}get temporaryModifiers(){return s(this.#e),[...this.#s]}set temporaryModifiers(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>e&&"function"==typeof e.fn&&Number.isInteger(e.uses)&&e.uses>0))throw new TypeError("temporaryModifiers must be an array of objects { fn: function, uses: positive integer }.");this.#s=e}get conditionalRules(){return s(this.#e),[...this.#o]}set conditionalRules(e){if(s(this.#e),!Array.isArray(e)||!e.every(e=>"function"==typeof e))throw new TypeError("conditionalRules must be an array of functions (WeightsCallback).");this.#o=e}get pitySystems(){return s(this.#e),Object.fromEntries(this.#n)}set pitySystems(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"number"==typeof e.threshold&&"number"==typeof e.increment&&"number"==typeof e.cap&&"number"==typeof e.counter&&"number"==typeof e.currentAdd)))throw new TypeError("pitySystems must be a Map<string, Pity> with all numeric fields.");this.#n=e}get exclusions(){return s(this.#e),Array.from(this.#a)}set exclusions(e){if(s(this.#e),!(e instanceof Set&&[...e].every(e=>"string"==typeof e)))throw new TypeError("exclusions must be a Set<string>.");this.#a=e}get groups(){s(this.#e);const e={};return this.#u.forEach((t,r)=>e[r]=Array.from(t)),e}set groups(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e instanceof Set&&[...e].every(e=>"string"==typeof e))))throw new TypeError("groups must be a Map<string, Set<string>>.");this.#u=e}get rng(){return s(this.#e),this.#f}set rng(e){if(s(this.#e),"function"!=typeof e||"number"!=typeof e())throw new TypeError("rng must be a function returning a number (RngGenerator).");this.#f=e}get items(){s(this.#e);const e={};return this.#h.forEach((t,r)=>{e[r]={...t,groups:Array.from(t.groups)}}),e}set items(e){if(s(this.#e),!(e instanceof Map&&[...e.values()].every(e=>e&&"string"==typeof e.id&&"string"==typeof e.label&&"number"==typeof e.baseWeight&&e.groups instanceof Set&&"boolean"==typeof e.locked&&"object"==typeof e.meta)))throw new TypeError("items must be a Map<string, ItemData> with valid item structures.");this.clearList(),this.#h=e}constructor(e={}){super();const{rng:t=null,seed:r=null,normalization:i="relative"}=e;this.#t=i,this.#r=r,"function"==typeof t?this.#f=t:null!==this.#r?this.#f=this._makeSeededRng(this.#r):this.#f=Math.random,this.#r=r??null}hasItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#h.has(e)}addItem(e,t={}){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("object"!=typeof t||null===t)throw new TypeError("opts must be an object");let{weight:r=1,label:i=e,meta:o={},groups:n=[]}=t;if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError("weight must be a non-negative number");if("string"!=typeof i)throw new TypeError("label must be a string");if("object"!=typeof o||null===o)throw new TypeError("meta must be an object");if(!(Array.isArray(n)||n instanceof Set))throw new TypeError("groups must be an array or a Set of strings");n=Array.isArray(n)?n:[...n];for(const e of n)if("string"!=typeof e)throw new TypeError("groups must contain only strings");const a={id:e,label:i,baseWeight:Math.max(0,Number(r)||0),meta:{...o},groups:new Set(n),locked:!1};this.#h.set(e,a);for(const t of n)this._ensureGroup(t).add(e);return this.emit("itemAdded",a),a}removeItem(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");const t=this.#h.get(e);if(!t)return!1;for(const r of t.groups){const t=this.#u.get(r);t&&t.delete(e)}return this.#h.delete(e),this.emit("itemRemoved",e),this.resetFreq(e),this.resetPity(e),!0}setBaseWeight(e,t){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");if("number"!=typeof t||!Number.isFinite(t)||t<0)throw new TypeError("weight must be a non-negative number");const r=this.#h.get(e);if(!r)throw new Error("Item not found");r.baseWeight=Math.max(0,Number(t)||0),this.emit("weightChanged",{id:e,weight:r.baseWeight})}getItem(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("id must be a non-empty string");return this.#h.get(e)??null}listItems(){return s(this.#e),Array.from(this.#h.values()).map(e=>({...e}))}clearList(){s(this.#e),this.#h.clear(),this.clearFreqs(),this.clearPities()}hasGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#i.includes(e)}addGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i.push(e)}removeGlobalModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");this.#i=this.#i.filter(t=>t!==e)}hasTemporaryModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");return this.#s.some(t=>t.fn===e)}addTemporaryModifier(e,t=1){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");if("number"!=typeof t||Number.isNaN(t))throw new TypeError("uses must be a number");this.#s.push({fn:e,uses:Math.max(1,Math.floor(t))})}removeTemporaryModifier(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("fn must be a function");const t=this.#s.length;return this.#s=this.#s.filter(t=>t.fn!==e),this.#s.length!==t}hasConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");return this.#o.includes(e)}addConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");this.#o.push(e)}removeConditionalRule(e){if(s(this.#e),"function"!=typeof e)throw new TypeError("ruleFn must be a function");const t=this.#o.length;return this.#o=this.#o.filter(t=>t!==e),this.#o.length!==t}hasPity(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#n.has(e)}configurePity(e,t){if(s(this.#e),!this.#h.has(e))throw new Error("Item not found");if("object"!=typeof t||null===t)throw new TypeError("cfg must be an object");const{threshold:r,increment:i,cap:o=1/0}=t;if("number"!=typeof r||r<=0)throw new TypeError("threshold must be a positive number");if("number"!=typeof i)throw new TypeError("increment must be a number");if("number"!=typeof o)throw new TypeError("cap must be a number");this.#n.set(e,{threshold:Math.max(1,r),increment:Number(i)||0,cap:Number(o)||1/0,counter:0,currentAdd:0})}resetPity(e){if(s(this.#e),"string"!=typeof e||!e.trim())throw new TypeError("itemId must be a non-empty string");const t=this.#n.get(e);t&&(t.counter=0,t.currentAdd=0)}clearPities(){s(this.#e),this.#n.clear()}hasExclusion(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");return this.#a.has(e)}excludeItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.add(e)}includeItem(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#a.delete(e)}_ensureGroup(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("name must be a string");let t=this.#u.get(e);return t||(t=new Set,this.#u.set(e,t)),t}hasInGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);return!!r&&r.has(e)}addToGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#h.get(e);if(!r)throw new Error("Item missing");r.groups.add(t),this._ensureGroup(t).add(e)}removeFromGroup(e,t){if(s(this.#e),"string"!=typeof e||"string"!=typeof t)throw new TypeError("itemId and groupName must be strings");const r=this.#u.get(t);r&&r.delete(e);const i=this.#h.get(e);i&&i.groups.delete(t)}clearFreqs(){s(this.#e),this.#p.clear()}resetFreq(e){if(s(this.#e),"string"!=typeof e)throw new TypeError("itemId must be a string");this.#p.delete(e)}computeEffectiveWeights(e={}){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("computeEffectiveWeights: parameter 'context' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("computeEffectiveWeights: context.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("computeEffectiveWeights: context.metadata must be a non-null object if provided, got "+typeof e.metadata);const t=new Map;for(const[e,r]of this.#h)t.set(e,r.baseWeight);for(const r of this.#i){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#s){const i=r.fn(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const r of this.#o){const i=r(t,e);if(i instanceof Map)for(const[e,r]of i)t.set(e,Math.max(0,(t.get(e)||0)+r))}for(const[e,r]of this.#n)if(t.has(e)&&r.counter>r.threshold){r.currentAdd=Math.min(r.cap,r.currentAdd+r.increment);const i=t.get(e);i&&t.set(e,i+r.currentAdd)}for(const e of this.#a)t.delete(e);for(const[e,r]of Array.from(t.entries()))r>0||t.delete(e);return t}_weightsToDistribution(e){if(!(e instanceof Map))throw new TypeError("_weightsToDistribution: parameter 'weights' must be a Map, got "+typeof e);for(const[t,r]of e){if("string"!=typeof t)throw new TypeError("_weightsToDistribution: weights Map key must be string, got "+typeof t);if("number"!=typeof r||!Number.isFinite(r)||r<0)throw new TypeError(`_weightsToDistribution: weights Map value must be finite non-negative number, got ${r} for key ${t}`)}const t=Array.from(e.entries()).map(([e,t])=>({id:e,weight:t}));if(0===t.length)return[];if("softmax"===this.#t){const e=Math.max(...t.map(e=>e.weight)),r=t.map(t=>Math.exp(t.weight-e)),i=r.reduce((e,t)=>e+t,0);let s=0;return t.map((e,t)=>{const o=r[t]/i;return s+=o,{id:e.id,weight:e.weight,p:o,cumulative:s}})}{const e=t.reduce((e,t)=>e+t.weight,0);let r=0;return t.map(t=>{const i=t.weight/e;return r+=i,{id:t.id,weight:t.weight,p:i,cumulative:r}})}}drawOne(e={}){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("drawOne: parameter 'opts' must be a non-null object, got "+typeof e);if("previousDraws"in e&&!Array.isArray(e.previousDraws))throw new TypeError("drawOne: opts.previousDraws must be an array if provided, got "+typeof e.previousDraws);if("metadata"in e&&void 0!==e.metadata&&("object"!=typeof e.metadata||null===e.metadata))throw new TypeError("drawOne: opts.metadata must be a non-null object if provided, got "+typeof e.metadata);const t={previousDraws:e.previousDraws??[],metadata:e.metadata??{},activeModifiers:[...this.#s]},r=this.computeEffectiveWeights(t),i=this._weightsToDistribution(r);if(!i.length)return null;const o=this.#f(),n=i.find(e=>o<=e.cumulative)??i[i.length-1];for(const[e,t]of this.#n)e===n.id?(t.counter=0,t.currentAdd=0):t.counter++;this._consumeTemporaryModifiers();const a=this.#h.get(n.id);if(!a)return null;const u={id:a.id,label:a.label,meta:{...a.meta},prob:n.p};return this.emit("draw",u),u&&this.#p.set(u.id,(this.#p.get(u.id)||0)+1),u}_consumeTemporaryModifiers(){for(let e=this.#s.length-1;e>=0;--e){const t=this.#s[e];t.uses-=1,t.uses<=0&&this.#s.splice(e,1)}}drawMany(e=1,t={}){if(s(this.#e),!Number.isInteger(e)||e<=0)throw new TypeError(`drawMany: parameter 'count' must be a positive integer, got ${e}`);if("object"!=typeof t||null===t)throw new TypeError("drawMany: parameter 'opts' must be a non-null object, got "+typeof t);if("withReplacement"in t&&"boolean"!=typeof t.withReplacement)throw new TypeError("drawMany: opts.withReplacement must be boolean if provided, got "+typeof t.withReplacement);if("ensureUnique"in t&&"boolean"!=typeof t.ensureUnique)throw new TypeError("drawMany: opts.ensureUnique must be boolean if provided, got "+typeof t.ensureUnique);if("metadata"in t&&void 0!==t.metadata&&("object"!=typeof t.metadata||null===t.metadata))throw new TypeError("drawMany: opts.metadata must be a non-null object if provided, got "+typeof t.metadata);if("previousDraws"in t&&!Array.isArray(t.previousDraws))throw new TypeError("drawMany: opts.previousDraws must be an array if provided, got "+typeof t.previousDraws);const r=t.withReplacement??!0,i=t.ensureUnique??!1,o=[],n=t.previousDraws??[];if(!r&&i){const r=new Set;for(let i=0;i<e;++i){const e=new Set(this.#a);for(const e of r)this.#a.add(e);const i=this.drawOne({previousDraws:n,metadata:t.metadata});if(this.#a=e,!i)break;o.push(i),r.add(i.id),n.push(i)}return o}for(let i=0;i<e;++i){const e=this.drawOne({previousDraws:n,metadata:t.metadata});if(!e)break;o.push(e),n.push(e),r||this.excludeItem(e.id)}if(!r)for(const e of o)this.includeItem(e.id);return o}exportToJson(){return s(this.#e),{items:Array.from(this.#h.values()).map(e=>({id:e.id,label:e.label,baseWeight:e.baseWeight,meta:e.meta,groups:Array.from(e.groups),locked:!1})),pity:Array.from(this.#n.entries()),exclusions:Array.from(this.#a),normalization:this.#t,seed:this.#r}}loadFromJson(e){if(s(this.#e),"object"!=typeof e||null===e)throw new TypeError("data must be a non-null object");if(!Array.isArray(e.items)||!Array.isArray(e.pity)||!Array.isArray(e.exclusions))throw new TypeError("data must have items, pity, and exclusions arrays");if("string"!=typeof e.normalization)throw new TypeError("data.normalization must be a string");if(void 0!==e.seed&&null!==e.seed&&"number"!=typeof e.seed)throw new TypeError("data.seed must be a number, null, or undefined");this.clearList();for(const t of e.items){if("object"!=typeof t||null===t)throw new TypeError("Each item must be a non-null object");if("string"!=typeof t.id||!t.id.trim())throw new TypeError("Each item.id must be a non-empty string");if("string"!=typeof t.label)throw new TypeError(`Item with id "${t.id}" has invalid label; must be string`);if("number"!=typeof t.baseWeight||!Number.isFinite(t.baseWeight)||t.baseWeight<0)throw new TypeError(`Item with id "${t.id}" has invalid baseWeight; must be a finite non-negative number`);if(void 0!==t.groups&&!Array.isArray(t.groups))throw new TypeError(`Item with id "${t.id}" has invalid groups; must be an array of strings`);if(t.groups&&!t.groups.every(e=>"string"==typeof e))throw new TypeError(`Item with id "${t.id}" has groups containing non-string values`);if(void 0!==t.meta&&("object"!=typeof t.meta||null===t.meta))throw new TypeError(`Item with id "${t.id}" has invalid meta; must be an object`);this.#h.set(t.id,{id:t.id,label:t.label,baseWeight:t.baseWeight,meta:t.meta||{},groups:new Set(t.groups||[]),locked:!1});for(const e of t.groups||[])this._ensureGroup(e).add(t.id)}this.pitySystems=new Map(e.pity||[]),this.exclusions=new Set(e.exclusions||[]),this.normalization=e.normalization,void 0!==e.seed&&(this.seed=e.seed)}clone(){s(this.#e);const e=new o;return e.#t=this.#t,e.#r=this.#r,e.#i=[...this.#i],e.#s=this.#s.map(e=>({fn:e.fn,uses:e.uses})),e.#o=[...this.#o],e.#n=new Map([...this.#n.entries()].map(([e,t])=>[e,{...t}])),e.#a=new Set(this.#a),e.#u=new Map([...this.#u.entries()].map(([e,t])=>[e,new Set(t)])),e.#f=this.#f,e.#h=new Map([...this.#h.entries()].map(([e,t])=>[e,{...t,groups:new Set(t.groups),meta:{...t.meta}}])),e.#p=new Map(this.#p),e}_makeSeededRng(e){if("number"!=typeof e||!Number.isFinite(e))throw new TypeError("seed must be a finite number");let t=e>>>0;return function(){t+=1831565813;let e=Math.imul(t^t>>>15,1|t);return e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}destroy(){this.#e||(this.#n.clear(),this.#a.clear(),this.#u.clear(),this.#h.clear(),this.#p.clear(),this.#i=[],this.#s=[],this.#o=[],this.#r=null,this.#e=!0)}}const n=o}};const t={};function r(i){const s=t[i];if(void 0!==s)return s.exports;const o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var s=t[i++],o=t[i++];r.o(e,s)?0===o&&i++:0===o?Object.defineProperty(e,s,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,s,{enumerable:!0,get:o})}else for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let i=r(159);window.TinyAdvancedRaffle=i.TinyAdvancedRaffle})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={861(e,t,r){r.d(t,{TinyDebugger:()=>s});var o=r.cjs(function(e,t){var r,o="object"==typeof Reflect?Reflect:null,n=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=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(r,o){function n(r){e.removeListener(t,i),o(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(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 a=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,o){var n,i,s,a;if(f(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=o?[r,s]:[s,r]:o?s.unshift(r):s.push(r),(n=u(e))>0&&s.length>n&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function g(){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 o={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=g.bind(o);return n.listener=r,o.wrapFn=n,n}function c(e,t,r){var o=e._events;if(void 0===o)return[];var n=o[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]: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}(n):p(n,n.length)}function h(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),o=0;o<t;++o)r[o]=e[o];return r}function m(e,t,r,o){if("function"==typeof e.on)o.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 n(i){o.once&&e.removeEventListener(t,n),r(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=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||i(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 u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var f=i[e];if(void 0===f)return!1;if("function"==typeof f)n(f,this,t);else{var u=f.length,l=p(f,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return f(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,o,n,i,s;if(f(t),void 0===(o=this._events))return this;if(void 0===(r=o[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,n=i;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(o[e]=r[0]),void 0!==o.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,o;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 n,i=Object.keys(r);for(o=0;o<i.length;++o)"removeListener"!==(n=i[o])&&this.removeAllListeners(n);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(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return c(this,e,!0)},s.prototype.rawListeners=function(e){return c(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});const n=["chrome","firefox","ie","edge","safari","opera","yandex","other"];class i extends o.EventEmitter{#e;#t;#r;#o;#n;#i=new Map([["log","[37m"],["info","[36m"],["warn","[33m"],["error","[31m"],["debug","[35m"],["reset","[0m"],["black","[30m"],["red","[31m"],["green","[32m"],["yellow","[33m"],["blue","[34m"],["magenta","[35m"],["cyan","[36m"],["white","[37m"],["gray","[90m"]]);#s=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:o=!1,useLogColors:i=!1}){if(super(),null===(s=e)||"object"!=typeof s||Array.isArray(s))throw new TypeError("Logger must be an object that implements the Console interface.");var s;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 o)throw new TypeError("canEmitLogs must be a boolean.");if("boolean"!=typeof i)throw new TypeError("useLogColors must be a boolean.");this.#t=t,this.#e=e,this.#o=r,this.#r=o,this.#n="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(){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=(Array.prototype.slice.call(window.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 o=function(){const e=!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,t="undefined"!=typeof InstallTrigger,r=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||"undefined"!=typeof safari&&safari.pushNotification).toString(),o=!!document.documentMode,n=!o&&!!window.StyleMedia,i=!!window.chrome;return{isOpera:e,isFirefox:t,isSafari:r,isIE:o,isEdge:n,isChrome:i,isBlink:(i||e)&&!!window.CSS}}();return o.isOpera&&e.indexOf("opera")<0&&t.opera++,o.isFirefox&&e.indexOf("firefox")<0&&t.firefox++,o.isSafari&&e.indexOf("safari")<0&&t.safari++,o.isIE&&e.indexOf("ie")<0&&t.ie++,o.isEdge&&e.indexOf("edge")<0&&t.edge++,o.isChrome&&e.indexOf("chrome")<0&&t.chrome++,t}(e);return Object.keys(t).reduce((e,r)=>t[r]>t[e]?r:e)}()&&i,this.log("info","Emit logs of debug mode set to: "+(this.#o?"ON":"OFF")),this.log("info","Custom logger assigned.")}get logId(){return this.#t}get canEmitLogs(){return this.#r}get useLogColors(){return this.#n}set useLogColors(e){if("boolean"!=typeof e)throw new TypeError("useLogColors must be a boolean.");this.#n=e,this.log("info","Log Colors usage mode set to: "+(this.#n?"ON":"OFF")),this.emit("setDebugMode",e)}get debugMode(){return this.#o}set debugMode(e){if("boolean"!=typeof e)throw new TypeError("debugMode must be a boolean.");this.#o=e,this.log("info","Debug mode set to: "+(this.#o?"ON":"OFF")),this.emit("setDebugMode",e)}_addLogColor(e,t){this.#i.set(e,t)}_removeLogColor(e){this.#i.delete(e)}_addLogPrefix(e,t){this.#s.set(e,t)}_removeLogPrefix(e){this.#s.delete(e)}#a(e){if("string"!=typeof e)return e;let t=e;for(const[e,r]of this.#s){const o=new RegExp(`\\:${e}\\:`,"g");t=t.replace(o,r)}for(const[e,r]of this.#i){const o=new RegExp(`\\_${e}\\_`,"g");t=t.replace(o,this.#n?r:"")}return t}logClear(){if(this.#o)return this.#r&&this.emit("debug:clear"),this.#e.clear?this.#e.clear():console.clear()}logGroupEnd(){if(this.#o)return this.#r&&this.emit("debug:groupEnd"),this.#e.groupEnd?this.#e.groupEnd():console.groupEnd()}logLabel(e,t){if(!this.#o)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 o=this.#e[e]?this.#e[e]:console[e];if(!o)throw new TypeError(`The log type "${e}" is not supported by the provided logger or console.`);return this.#r&&this.emit("debug:logLabel",e,t),o(t)}logTimeLabel(e,...t){if(this.#o)return this.#r&&this.emit("debug:timeLog",e,...t),this.#e.timeLog?this.#e.timeLog(e,...t):console.timeLog(e,...t)}logAssert(e,...t){if(this.#o)return this.#r&&this.emit("debug:assert",e,...t),this.#e.assert?this.#e.assert(e,...t):console.assert(e,...t)}logDir(e,t){if(this.#o)return this.#r&&this.emit("debug:dir",e,t),this.#e.dir?this.#e.dir(e,t):console.dir(e,t)}logTable(e,t){if(this.#o){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.#r&&this.emit("debug:table",e,t),this.#e.table?this.#e.table(e,t):console.table(e,t)}}log(e,t,...r){if(!this.#o)return;const o=["log","info","warn","error","debug","dirxml","group","groupCollapsed","trace"];if(!o.includes(e))throw new TypeError(`Invalid logType. Expected one of: ${o.join(", ")}`);if("string"!=typeof t)throw new TypeError("The message must be a string.");let n=this.#t,i=t;n=this.#a(n),i=this.#a(i);const s=this.#e[e]?this.#e[e]:console[e];return s?(this.#r&&this.emit("debug:log",n,i,...r),s(n,i,...r)):(this.#r&&this.emit("debug:log",n,i,...r),console.log(n,i,...r))}}const s=i}};const t={};function r(o){const n=t[o];if(void 0!==n)return n.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var n=t[o++],i=t[o++];r.o(e,n)?0===i&&o++:0===i?Object.defineProperty(e,n,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,n,{enumerable:!0,get:i})}else for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let o=r(861);window.TinyDebugger=o.TinyDebugger})();
|
|
1
|
+
(()=>{"use strict";var e={920(e,t,r){r.d(t,{TinyDebugger:()=>s});var o=r.cjs(function(e,t){var r,o="object"==typeof Reflect?Reflect:null,n=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=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(r,o){function n(r){e.removeListener(t,i),o(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(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 a=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,o){var n,i,s,a;if(f(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=o?[r,s]:[s,r]:o?s.unshift(r):s.push(r),(n=u(e))>0&&s.length>n&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function g(){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 o={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=g.bind(o);return n.listener=r,o.wrapFn=n,n}function c(e,t,r){var o=e._events;if(void 0===o)return[];var n=o[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]: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}(n):p(n,n.length)}function h(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),o=0;o<t;++o)r[o]=e[o];return r}function m(e,t,r,o){if("function"==typeof e.on)o.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 n(i){o.once&&e.removeEventListener(t,n),r(i)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=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||i(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 u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var f=i[e];if(void 0===f)return!1;if("function"==typeof f)n(f,this,t);else{var u=f.length,l=p(f,u);for(r=0;r<u;++r)n(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return f(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,o,n,i,s;if(f(t),void 0===(o=this._events))return this;if(void 0===(r=o[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,n=i;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(o[e]=r[0]),void 0!==o.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,o;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 n,i=Object.keys(r);for(o=0;o<i.length;++o)"removeListener"!==(n=i[o])&&this.removeAllListeners(n);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(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return c(this,e,!0)},s.prototype.rawListeners=function(e){return c(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});const n=["chrome","firefox","ie","edge","safari","opera","yandex","other"];class i extends o.EventEmitter{#e;#t;#r;#o;#n;#i=new Map([["log","[37m"],["info","[36m"],["warn","[33m"],["error","[31m"],["debug","[35m"],["reset","[0m"],["black","[30m"],["red","[31m"],["green","[32m"],["yellow","[33m"],["blue","[34m"],["magenta","[35m"],["cyan","[36m"],["white","[37m"],["gray","[90m"]]);#s=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:o=!1,useLogColors:i=!1}){if(super(),null===(s=e)||"object"!=typeof s||Array.isArray(s))throw new TypeError("Logger must be an object that implements the Console interface.");var s;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 o)throw new TypeError("canEmitLogs must be a boolean.");if("boolean"!=typeof i)throw new TypeError("useLogColors must be a boolean.");this.#t=t,this.#e=e,this.#o=r,this.#r=o,this.#n="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(){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=(Array.prototype.slice.call(window.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 o=function(){const e=!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,t="undefined"!=typeof InstallTrigger,r=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||"undefined"!=typeof safari&&safari.pushNotification).toString(),o=!!document.documentMode,n=!o&&!!window.StyleMedia,i=!!window.chrome;return{isOpera:e,isFirefox:t,isSafari:r,isIE:o,isEdge:n,isChrome:i,isBlink:(i||e)&&!!window.CSS}}();return o.isOpera&&e.indexOf("opera")<0&&t.opera++,o.isFirefox&&e.indexOf("firefox")<0&&t.firefox++,o.isSafari&&e.indexOf("safari")<0&&t.safari++,o.isIE&&e.indexOf("ie")<0&&t.ie++,o.isEdge&&e.indexOf("edge")<0&&t.edge++,o.isChrome&&e.indexOf("chrome")<0&&t.chrome++,t}(e);return Object.keys(t).reduce((e,r)=>t[r]>t[e]?r:e)}()&&i,this.log("info","Emit logs of debug mode set to: "+(this.#o?"ON":"OFF")),this.log("info","Custom logger assigned.")}get logId(){return this.#t}get canEmitLogs(){return this.#r}get useLogColors(){return this.#n}set useLogColors(e){if("boolean"!=typeof e)throw new TypeError("useLogColors must be a boolean.");this.#n=e,this.log("info","Log Colors usage mode set to: "+(this.#n?"ON":"OFF")),this.emit("setDebugMode",e)}get debugMode(){return this.#o}set debugMode(e){if("boolean"!=typeof e)throw new TypeError("debugMode must be a boolean.");this.#o=e,this.log("info","Debug mode set to: "+(this.#o?"ON":"OFF")),this.emit("setDebugMode",e)}_addLogColor(e,t){this.#i.set(e,t)}_removeLogColor(e){this.#i.delete(e)}_addLogPrefix(e,t){this.#s.set(e,t)}_removeLogPrefix(e){this.#s.delete(e)}#a(e){if("string"!=typeof e)return e;let t=e;for(const[e,r]of this.#s){const o=new RegExp(`\\:${e}\\:`,"g");t=t.replace(o,r)}for(const[e,r]of this.#i){const o=new RegExp(`\\_${e}\\_`,"g");t=t.replace(o,this.#n?r:"")}return t}logClear(){if(this.#o)return this.#r&&this.emit("debug:clear"),this.#e.clear?this.#e.clear():console.clear()}logGroupEnd(){if(this.#o)return this.#r&&this.emit("debug:groupEnd"),this.#e.groupEnd?this.#e.groupEnd():console.groupEnd()}logLabel(e,t){if(!this.#o)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 o=this.#e[e]?this.#e[e]:console[e];if(!o)throw new TypeError(`The log type "${e}" is not supported by the provided logger or console.`);return this.#r&&this.emit("debug:logLabel",e,t),o(t)}logTimeLabel(e,...t){if(this.#o)return this.#r&&this.emit("debug:timeLog",e,...t),this.#e.timeLog?this.#e.timeLog(e,...t):console.timeLog(e,...t)}logAssert(e,...t){if(this.#o)return this.#r&&this.emit("debug:assert",e,...t),this.#e.assert?this.#e.assert(e,...t):console.assert(e,...t)}logDir(e,t){if(this.#o)return this.#r&&this.emit("debug:dir",e,t),this.#e.dir?this.#e.dir(e,t):console.dir(e,t)}logTable(e,t){if(this.#o){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.#r&&this.emit("debug:table",e,t),this.#e.table?this.#e.table(e,t):console.table(e,t)}}log(e,t,...r){if(!this.#o)return;const o=["log","info","warn","error","debug","dirxml","group","groupCollapsed","trace"];if(!o.includes(e))throw new TypeError(`Invalid logType. Expected one of: ${o.join(", ")}`);if("string"!=typeof t)throw new TypeError("The message must be a string.");let n=this.#t,i=t;n=this.#a(n),i=this.#a(i);const s=this.#e[e]?this.#e[e]:console[e];return s?(this.#r&&this.emit("debug:log",n,i,...r),s(n,i,...r)):(this.#r&&this.emit("debug:log",n,i,...r),console.log(n,i,...r))}}const s=i}};const t={};function r(o){const n=t[o];if(void 0!==n)return n.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.d=(e,t)=>{if(Array.isArray(t))for(var o=0;o<t.length;){var n=t[o++],i=t[o++];r.o(e,n)?0===i&&o++:0===i?Object.defineProperty(e,n,{enumerable:!0,value:t[o++]}):Object.defineProperty(e,n,{enumerable:!0,get:i})}else for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let o=r(920);window.TinyDebugger=o.TinyDebugger})();
|