tiny-essentials 1.28.14 → 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/14.md +3 -3
- package/changelog/1/28/15.md +11 -0
- 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/TinyBasicsEs.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.cjs +208 -212
- package/dist/v1/basics/mediaContent.d.mts +22 -14
- package/dist/v1/basics/mediaContent.d.mts.map +1 -0
- package/dist/v1/basics/mediaContent.mjs +190 -191
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={73(t,e,r){r.d(e,{TinyRadioFm:()=>L});var n=r.cjs(function(t,e){var r,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise(function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&y(t,"error",e,{once:!0})}(t,i)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,a,s;if(l(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function f(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function y(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.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},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)i(l,this,e);else{var c=l.length,u=p(l,c);for(r=0;r<c;++r)i(u[r],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){return l(e),this.on(t,m(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return l(e),this.prependListener(t,m(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,o,a;if(l(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;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[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return f(this,t,!0)},a.prototype.rawListeners=function(t){return f(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});function i(t){if(!Array.isArray(t)&&!o(t))throw new TypeError("Argument must be either an Array or a pure JSON Object.");return Array.isArray(t)?t.length:Object.keys(t).length}function o(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"===Object.prototype.toString.call(t)}const a=(t,e)=>{if("string"!=typeof e)throw new TypeError('Expected "name" to be a string.');if("string"!=typeof t)throw new TypeError(`Expected "${e}" to be a string, but received ${typeof t}.`)},s=(t,e)=>{if("string"!=typeof e)throw new TypeError('Expected "name" to be a string.');if("function"!=typeof t)throw new TypeError(`Expected "${e}" to be a function, but received ${typeof t}.`)},l=(t,e)=>{if("string"!=typeof e)throw new TypeError('Expected "name" to be a string.');if("object"!=typeof t||null===t||Array.isArray(t))throw new TypeError(`Expected "${e}" to be a plain object, but received ${null===t?"null":Array.isArray(t)?"array":typeof t}.`)},c=(t,e=!1)=>!e&&void 0===t,u=(t,e=!1)=>c(t,e)||"string"==typeof t||!e&&null===t,d=(t,e=!1)=>c(t,e)||"number"==typeof t||!e&&null===t,m=(t,e=!1)=>c(t,e)||"boolean"==typeof t||!e&&null===t,f=(t,e)=>!!c(t)||(s(e,"valueValidator"),Array.isArray(t)&&t.every(e)),h=new Map;class p extends Error{constructor(t,e,r){if(a(t,"message"),a(e,"url"),"string"!=typeof r)throw new TypeError(`Expected "stage" to be a string, but received ${typeof r}.`);super(t),this.name="MediaLoadingError",this.url=e,this.stage=r}}const y=async t=>{a(t,"str");const e=(new TextEncoder).encode(t),r=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join("").substring(0,8)},v=(t,e="image/jpeg")=>{if(!(t instanceof Uint8Array)&&"string"!=typeof t)throw new TypeError(`Expected "data" to be an instance of Uint8Array or a string, but received ${typeof t}.`);a(e,"format");const r=t=>{const e=URL.createObjectURL(t),r=h.get(e);return h.set(e,"number"==typeof r?r+1:1),e};if(t instanceof Uint8Array)return r(new Blob([t],{type:e}));if("string"==typeof t&&t.startsWith("data:")){const n=t.split(",")[1],i=atob(n),o=new Uint8Array(i.length);for(let t=0;t<i.length;t++)o[t]=i.charCodeAt(t);return r(new Blob([o],{type:e}))}return"string"==typeof t?t:""},g=async t=>{if(a(t,"url"),!t.startsWith("blob:"))return t;try{const e=await fetch(t),r=await e.blob();return await new Promise((t,e)=>{const n=new FileReader;n.onloadend=()=>t(String(n.result)),n.onerror=e,n.readAsDataURL(r)})}catch(e){return console.warn(`[TinyAudioUtils] Failed to convert Blob URL to Base64 on export: ${t}`,e),t}},w=t=>{l(t,"content"),t&&Array.isArray(t.picture)&&t.picture.forEach(t=>{if("string"==typeof t.data&&t.data.startsWith("blob:")){const e=h.get(t.data)??0;e>1?h.set(t.data,e-1):h.delete(t.data),e<=1&&URL.revokeObjectURL(t.data)}})},b=(t,e=!1)=>{if(o(t)){if(4!==i(t)){if(e)return!1;throw new TypeError("Invalid fetch data: Object must be an MediaContentFetchData.")}E(t.common),l(t.native,"_fetchData.native"),l(t.format,"_fetchData.format"),l(t.quality,"_fetchData.quality");for(const r in t.native){const n=t.native[r];if(!f(n,t=>"string"==typeof t.id)){if(e)return!1;throw new TypeError(`Invalid native data: "${r}" must be an array of native fetch data.`)}}}return!0},E=t=>{if(l(t,"common"),b(t._fetchData),!u(t.title))throw new TypeError('Invalid metadata: "title" must be a string or null.');if(!u(t.album))throw new TypeError('Invalid metadata: "album" must be a string or null.');if(!u(t.albumartist))throw new TypeError('Invalid metadata: "albumartist" must be a a string or null.');if(!u(t.artist))throw new TypeError('Invalid metadata: "artist" must be a string or null.');if(!m(t.compilation))throw new TypeError('Invalid metadata: "compilation" must be a boolean or null.');if(!m(t.podcast))throw new TypeError('Invalid metadata: "podcast" must be a boolean or null.');if(!m(t.gapless))throw new TypeError('Invalid metadata: "gapless" must be a boolean or null.');if(!m(t.showMovement))throw new TypeError('Invalid metadata: "showMovement" must be a boolean or null.');if(!d(t.averageLevel))throw new TypeError('Invalid metadata: "averageLevel" must be a number or null.');if(!d(t.peakLevel))throw new TypeError('Invalid metadata: "peakLevel" must be a number or null.');if(!d(t.hdVideo))throw new TypeError('Invalid metadata: "hdVideo" must be a number or null.');if(!d(t.stik))throw new TypeError('Invalid metadata: "stik" must be a number or null.');if(!d(t.playCounter))throw new TypeError('Invalid metadata: "playCounter" must be a number or null.');if(!d(t.tvSeason))throw new TypeError('Invalid metadata: "tvSeason" must be a number or null.');if(!d(t.tvEpisode))throw new TypeError('Invalid metadata: "tvEpisode" must be a number or null.');if(!d(t.year))throw new TypeError('Invalid metadata: "year" must be a number or null.');if(!d(t.bpm))throw new TypeError('Invalid metadata: "bpm" must be a number or null.');if(!d(t.originalyear))throw new TypeError('Invalid metadata: "originalyear" must be a number or null.');if(!d(t.movementTotal))throw new TypeError('Invalid metadata: "movementTotal" must be a number or null.');if(!u(t.date))throw new TypeError('Invalid metadata: "date" must be a string or null.');if(!u(t.originaldate))throw new TypeError('Invalid metadata: "originaldate" must be a string or null.');if(!u(t.releasedate))throw new TypeError('Invalid metadata: "releasedate" must be a string or null.');if(!u(t.albumsort))throw new TypeError('Invalid metadata: "albumsort" must be a string or null.');if(!u(t.titlesort))throw new TypeError('Invalid metadata: "titlesort" must be a string or null.');if(!u(t.work))throw new TypeError('Invalid metadata: "work" must be a string or null.');if(!u(t.artistsort))throw new TypeError('Invalid metadata: "artistsort" must be a string or null.');if(!u(t.albumartistsort))throw new TypeError('Invalid metadata: "albumartistsort" must be a string or null.');if(!u(t.composersort))throw new TypeError('Invalid metadata: "composersort" must be a string or null.');if(!u(t.grouping))throw new TypeError('Invalid metadata: "grouping" must be a string or null.');if(!u(t.longDescription))throw new TypeError('Invalid metadata: "longDescription" must be a string or null.');if(!u(t.totaltracks))throw new TypeError('Invalid metadata: "totaltracks" must be a string or null.');if(!u(t.totaldiscs))throw new TypeError('Invalid metadata: "totaldiscs" must be a string or null.');if(!u(t.mood))throw new TypeError('Invalid metadata: "mood" must be a string or null.');if(!u(t.media))throw new TypeError('Invalid metadata: "media" must be a string or null.');if(!u(t.tvShow))throw new TypeError('Invalid metadata: "tvShow" must be a string or null.');if(!u(t.tvShowSort))throw new TypeError('Invalid metadata: "tvShowSort" must be a string or null.');if(!u(t.tvEpisodeId))throw new TypeError('Invalid metadata: "tvEpisodeId" must be a string or null.');if(!u(t.tvNetwork))throw new TypeError('Invalid metadata: "tvNetwork" must be a string or null.');if(!u(t.podcasturl))throw new TypeError('Invalid metadata: "podcasturl" must be a string or null.');if(!u(t.releasestatus))throw new TypeError('Invalid metadata: "releasestatus" must be a string or null.');if(!u(t.releasecountry))throw new TypeError('Invalid metadata: "releasecountry" must be a string or null.');if(!u(t.script))throw new TypeError('Invalid metadata: "script" must be a string or null.');if(!u(t.language))throw new TypeError('Invalid metadata: "language" must be a string or null.');if(!u(t.copyright))throw new TypeError('Invalid metadata: "copyright" must be a string or null.');if(!u(t.license))throw new TypeError('Invalid metadata: "license" must be a string or null.');if(!u(t.encodedby))throw new TypeError('Invalid metadata: "encodedby" must be a string or null.');if(!u(t.encodersettings))throw new TypeError('Invalid metadata: "encodersettings" must be a string or null.');if(!u(t.barcode))throw new TypeError('Invalid metadata: "barcode" must be a string or null.');if(!u(t.asin))throw new TypeError('Invalid metadata: "asin" must be a string or null.');if(!u(t.website))throw new TypeError('Invalid metadata: "website" must be a string or null.');if(!u(t.originalalbum))throw new TypeError('Invalid metadata: "originalalbum" must be a string or null.');if(!u(t.originalartist))throw new TypeError('Invalid metadata: "originalartist" must be a string or null.');if(!u(t.key))throw new TypeError('Invalid metadata: "key" must be a string or null.');if(!u(t.movement))throw new TypeError('Invalid metadata: "movement" must be a string or null.');if(!u(t.podcastId))throw new TypeError('Invalid metadata: "podcastId" must be a string or null.');if(!f(t.albumartists,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "albumartists" must be an array of strings.');if(!f(t.genre,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "genre" must be an array of strings.');if(!f(t.label,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "label" must be an array of strings.');if(!f(t.composer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "composer" must be an array of strings.');if(!f(t.artists,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "artists" must be an array of strings.');if(!f(t.lyricist,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "lyricist" must be an array of strings.');if(!f(t.writer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "writer" must be an array of strings.');if(!f(t.conductor,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "conductor" must be an array of strings.');if(!f(t.remixer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "remixer" must be an array of strings.');if(!f(t.arranger,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "arranger" must be an array of strings.');if(!f(t.engineer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "engineer" must be an array of strings.');if(!f(t.publisher,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "publisher" must be an array of strings.');if(!f(t.producer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "producer" must be an array of strings.');if(!f(t.djmixer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "djmixer" must be an array of strings.');if(!f(t.mixer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "mixer" must be an array of strings.');if(!f(t.technician,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "technician" must be an array of strings.');if(!f(t.subtitle,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "subtitle" must be an array of strings.');if(!f(t.description,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "description" must be an array of strings.');if(!f(t.discsubtitle,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "discsubtitle" must be an array of strings.');if(!f(t.releasetype,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "releasetype" must be an array of strings.');if(!f(t.isrc,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "isrc" must be an array of strings.');if(!f(t.performer_instrument,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "performer_instrument" must be an array of strings.');if(!f(t.notes,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "notes" must be an array of strings.');if(!f(t.category,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "category" must be an array of strings.');if(!f(t.keywords,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "keywords" must be an array of strings.');if(!f(t.catalognumber,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "catalognumber" must be an array of strings.');if(!f(t.picture,t=>t&&"object"==typeof t&&(void 0===t.description||"string"==typeof t.description)&&(void 0===t.name||"string"==typeof t.name)&&(void 0===t.type||"string"==typeof t.type)&&"string"==typeof t.format&&(t.data instanceof Uint8Array||"string"==typeof t.data)))throw new TypeError('Invalid metadata: "picture" must be an array of pictures.');if(!f(t.comment,t=>null!==t&&"object"==typeof t&&u(t.descriptor)&&u(t.language)&&u(t.text)))throw new TypeError('Invalid metadata: "comment" must be an array of valid IComment objects.');if(!f(t.lyrics,t=>null!==t&&"object"==typeof t&&u(t.text)&&f(t.syncText,t=>null!==t&&"object"==typeof t&&u(t.text,!0)&&d(t.timestamp))&&(t=>null!==t&&"object"==typeof t&&d(t.notSynchronized,!0)&&d(t.mpegFrameNumber,!0)&&d(t.milliseconds,!0))(t.timeStampFormat)&&(t=>null!==t&&"object"==typeof t&&d(t.other,!0)&&d(t.lyrics,!0)&&d(t.text,!0)&&d(t.movement_part,!0)&&d(t.events,!0)&&d(t.chord,!0)&&d(t.trivia_pop,!0))(t.contentType)))throw new TypeError('Invalid metadata: "lyrics" must be an array of valid ILyricsTag objects.');if(!f(t.rating,t=>null!==t&&"object"==typeof t&&u(t.source)&&d(t.rating)))throw new TypeError('Invalid metadata: "rating" must be an array of valid IRating objects.');const e=(t,e)=>{if(!c(e)&&null!==e){if("object"!=typeof e)throw new TypeError(`Invalid metadata: "${t}" must be an object or null.`);if("number"!=typeof e.no&&null!==e.no)throw new TypeError(`Invalid metadata: "${t}.no" must be a number or null.`);if("number"!=typeof e.of&&null!==e.of)throw new TypeError(`Invalid metadata: "${t}.of" must be a number or null.`)}};e("disk",t.disk),e("track",t.track),e("movementIndex",t.movementIndex)},T=t=>{if(t)throw new Error("This TinyRadioFm instance has been destroyed and can no longer be used.")};class I extends n.EventEmitter{static async parseContent(t,e,r,n,c,u=!0){return(async(t,e={},r={},n=t=>{if(!(t instanceof Blob))throw new TypeError('Expected "data" to be a Blob.');return new Promise((t,e)=>e(new TypeError("parseFile library not found.")))},c={},u=!0,d="null")=>{if("string"!=typeof t&&!(t instanceof HTMLMediaElement))throw new TypeError("Source must be a string or an HTMLMediaElement.");if(l(e,"defaultMetadata"),l(r,"metadata"),s(n,"parseFile"),l(c,"callbacks"),c.onProgress&&"function"!=typeof c.onProgress)throw new TypeError("callbacks.onProgress must be a function.");if(c.onError&&"function"!=typeof c.onError)throw new TypeError("callbacks.onError must be a function.");if("string"!=typeof d&&"function"!=typeof d)throw new TypeError("unknownArtist must be a string or a function returning a string.");let m,f="";const h=(e,r)=>{if(a(e,"stage"),void 0!==r&&!(r instanceof Event))throw new TypeError('Expected "event" to be an Event or undefined.');c.onProgress&&c.onProgress({event:r,status:"loading",stage:e,url:f||(t instanceof HTMLMediaElement?t.src:"unknown")})},g=(e,r)=>{if(!(e instanceof Error))throw new TypeError('Expected "error" to be an Error.');a(r,"stage"),c.onError&&c.onError({error:e instanceof Error?e:new Error(String(e)),url:f||(t instanceof HTMLMediaElement?t.src:"unknown"),stage:r})};try{h("INITIALIZING"),"string"==typeof t?(f=t,m=new Audio(f)):(m=t,f=m.src);try{await new Promise((t,e)=>{const r=t=>h("DOWNLOADING",t),n=()=>{o(),t(void 0)},i=t=>{o(),e(new Error(`HTMLMediaElement failed to load: ${t.message||"Unknown error"}`))},o=()=>{m.removeEventListener("progress",r),m.removeEventListener("loadedmetadata",n),m.removeEventListener("error",i)};m.addEventListener("progress",r),m.addEventListener("loadedmetadata",n),m.addEventListener("error",i),m.readyState>=1&&(o(),t(void 0))}),h("METADATA_LOADED")}catch(t){throw new p(t instanceof Error?t.message:"UNKNOWN ERROR",f,"METADATA")}const l={id:r.id||await y(f),duration:Math.floor(1e3*m.duration),url:f,weight:r.weight??1};let w={};h("EXTRACTING_ID3");try{w=await(async(t,e,r=!0)=>{a(t,"url"),s(e,"parseFile");try{const n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch audio file: ${n.status} ${n.statusText}`);const a=await n.blob(),s=await e(a);if(!s||"object"!=typeof s.common)throw new TypeError('Invalid metadata: "common" property is missing.');void 0!==typeof s.common["performer:instrument"]&&(s.common.performer_instrument=s.common["performer:instrument"]),b(s);const l=s.common;E(l);const c=([t,e])=>Array.isArray(e)?e.length>0:o(e)?i(Object.fromEntries(Object.entries(e).filter(c)))>0:null!==e,u=l?.picture?.map(t=>({...t,data:r?v(t.data,t.format):t.data}))??[];s.common={...s.common,picture:u.map(t=>({...t,data:""}))},r&&Object.keys(s.native).forEach(t=>{s.native[t]=s.native[t].map(t=>{if(t.value&&"object"==typeof t.value&&t.value.data instanceof Uint8Array){const e=l?.picture?.findIndex(e=>e.data===t.value.data&&e.format===t.value.format&&e.description===t.value.description&&e.name===t.value.name)??-1;if(u[e])return{...t,value:{...t.value,data:""}}}return t})});const d=Object.fromEntries(Object.entries({title:l?.title??null,album:l?.album??null,albumartist:l?.albumartist??null,albumartists:l?.albumartists??[],genre:l?.genre??[],label:l?.label??[],composer:l?.composer??[],year:l?.year??null,artist:l?.artist??null,artists:l?.artists??[],disk:l?.disk?{no:l.disk.no,of:l.disk.of}:null,track:l?.track?{no:l.track.no,of:l.track.of}:null,movementIndex:l?.movementIndex?{no:l.movementIndex.no,of:l.movementIndex.of}:null,picture:u,date:l?.date??null,originaldate:l?.originaldate??null,originalyear:l?.originalyear??null,releasedate:l?.releasedate??null,comment:l?.comment??[],lyrics:l?.lyrics??[],albumsort:l?.albumsort??null,titlesort:l?.titlesort??null,work:l?.work??null,artistsort:l?.artistsort??null,albumartistsort:l?.albumartistsort??null,composersort:l?.composersort??null,lyricist:l?.lyricist??[],writer:l?.writer??[],conductor:l?.conductor??[],remixer:l?.remixer??[],arranger:l?.arranger??[],engineer:l?.engineer??[],publisher:l?.publisher??[],producer:l?.producer??[],djmixer:l?.djmixer??[],mixer:l?.mixer??[],technician:l?.technician??[],grouping:l?.grouping??null,subtitle:l?.subtitle??[],description:l?.description??[],longDescription:l?.longDescription??null,discsubtitle:l?.discsubtitle??[],totaltracks:l?.totaltracks??null,totaldiscs:l?.totaldiscs??null,movementTotal:l?.movementTotal??null,compilation:l?.compilation??null,rating:l?.rating??[],bpm:l?.bpm??null,mood:l?.mood??null,media:l?.media??null,catalognumber:l?.catalognumber??[],tvShow:l?.tvShow??null,tvShowSort:l?.tvShowSort??null,tvSeason:l?.tvSeason??null,tvEpisode:l?.tvEpisode??null,tvEpisodeId:l?.tvEpisodeId??null,tvNetwork:l?.tvNetwork??null,podcast:l?.podcast??null,podcasturl:l?.podcasturl??null,releasestatus:l?.releasestatus??null,releasetype:l?.releasetype??[],releasecountry:l?.releasecountry??null,script:l?.script??null,language:l?.language??null,copyright:l?.copyright??null,license:l?.license??null,encodedby:l?.encodedby??null,encodersettings:l?.encodersettings??null,gapless:l?.gapless??null,barcode:l?.barcode??null,isrc:l?.isrc??[],asin:l?.asin??null,website:l?.website??null,performer_instrument:l?.performer_instrument??[],averageLevel:l?.averageLevel??null,peakLevel:l?.peakLevel??null,notes:l?.notes??[],originalalbum:l?.originalalbum??null,originalartist:l?.originalartist??null,key:l?.key??null,category:l?.category??[],hdVideo:l?.hdVideo??null,keywords:l?.keywords??[],movement:l?.movement??null,podcastId:l?.podcastId??null,showMovement:l?.showMovement??null,stik:l?.stik??null,playCounter:l?.playCounter??null}).filter(c));return d._fetchData=s,d}catch(t){throw t}})(f,n,u)}catch(t){g(t instanceof Error?t:new Error("Unknown Error"),"ID3"),console.warn(`[TinyAudioUtils] ID3 extraction failed for ${f}. Falling back to filename.`)}const T=t=>{a(t,"url");try{return(t.split(/[?#]/)[0].split("/").pop()??"").replace(/\.[^/.]+$/,"")||"Unknown Track"}catch{return"Unknown Track"}},I=t=>{const e={...t};return o(e._fetchData)&&(o(w._fetchData)&&(e._fetchData={...w._fetchData}),o(t._fetchData)&&(void 0!==t._fetchData.common&&(e._fetchData.common=t._fetchData.common),void 0!==t._fetchData.native&&(e._fetchData.native=t._fetchData.native),void 0!==t._fetchData.format&&(e._fetchData.format=t._fetchData.format),void 0!==t._fetchData.quality&&(e._fetchData.quality=t._fetchData.quality))),e},L={...l,...I(e),...w,...I(r),title:w.title||r.title||T(f),artist:w.artist||r.artist||("string"==typeof d?d:String(d()))};return c.onProgress&&c.onProgress({status:"success",stage:"COMPLETE",url:f}),L}catch(t){if(t instanceof p)throw t;const e=new p(t instanceof Error?t.message:"UNKNOWN ERROR",f,"INITIALIZING");throw g(e,"INITIALIZING"),e}})(t,e,r,n,c,u,I.#t)}static#t="Unknown Artist";static get unknownArtist(){return I.#t}static set unknownArtist(t){if("string"!=typeof t&&"function"!=typeof t)throw new TypeError("unknownArtist must have an string or function.");I.#t=t}#e=!1;get destroyed(){return this.#e}get size(){return T(this.#e),this.#r.length+this.#n.length}get musicSize(){return T(this.#e),this.#r.length}get voiceSize(){return T(this.#e),this.#n.length}get customPosSize(){return T(this.#e),this.#i.length}get tasksSize(){return T(this.#e),this.#o.length}get cycleCacheSize(){return T(this.#e),this.#a.size}#r=[];get musicList(){return T(this.#e),structuredClone(this.#r)}#n=[];get voiceList(){return T(this.#e),structuredClone(this.#n)}#i=[];get customPositions(){return T(this.#e),structuredClone(this.#i)}#o=[];get scheduledTasks(){return T(this.#e),structuredClone(this.#o)}get allList(){return T(this.#e),[...this.musicList,...this.voiceList]}#s=0;get seed(){return T(this.#e),this.#s}set seed(t){if(T(this.#e),"number"!=typeof t)throw new TypeError("Seed must be a number.");this.#s=t,this.#a.clear(),this.emit("seedChanged",{seed:t})}#l=Date.now();get anchorDate(){return T(this.#e),this.#l}#a=new Map;#c={mode:"playlist",voiceMode:"playlist",silenceDuration:0,queryLimit:1e5,voiceAfterMusic:!0,voiceMin:0,voiceMax:1,musicMaxConsecutive:0,musicMinConsecutive:0,voiceMaxConsecutive:0,voiceMinConsecutive:0};get config(){return T(this.#e),structuredClone(this.#c)}set config(t){T(this.#e),this.#u(t),this.#c=structuredClone(t),this.#a.clear(),this.emit("configChanged",{config:this.config})}#u(t){if("object"!=typeof t||null===t)throw new TypeError("Configuration must be a valid object.");const e=["playlist","random"];if(void 0!==t.mode&&!e.includes(t.mode))throw new TypeError(`Invalid mode: "${t.mode}". Must be one of: ${e.join(", ")}.`);if(void 0!==t.voiceMode&&!e.includes(t.voiceMode))throw new TypeError(`Invalid voiceMode: "${t.voiceMode}". Must be one of: ${e.join(", ")}.`);if(void 0!==t.silenceDuration&&("number"!=typeof t.silenceDuration||t.silenceDuration<0))throw new TypeError("silenceDuration must be a non-negative number.");if(void 0!==t.queryLimit&&("number"!=typeof t.queryLimit||t.queryLimit<=0))throw new TypeError("queryLimit must be a positive number.");if(void 0!==t.voiceAfterMusic&&"boolean"!=typeof t.voiceAfterMusic)throw new TypeError("voiceAfterMusic must be a boolean.");const r=(t,e)=>{if(void 0!==t&&("number"!=typeof t||t<0))throw new TypeError(`${e} must be a non-negative number.`)};r(t.voiceMin,"voiceMin"),r(t.voiceMax,"voiceMax"),r(t.musicMinConsecutive,"musicMinConsecutive"),r(t.musicMaxConsecutive,"musicMaxConsecutive"),r(t.voiceMinConsecutive,"voiceMinConsecutive"),r(t.voiceMaxConsecutive,"voiceMaxConsecutive");const n=t.voiceMin??this.#c.voiceMin,i=t.voiceMax??this.#c.voiceMax;if(i<n)throw new RangeError(`Logical error: voiceMax (${i}) cannot be less than voiceMin (${n}).`);const o=t.musicMinConsecutive??this.#c.musicMinConsecutive,a=t.musicMaxConsecutive??this.#c.musicMaxConsecutive;if(-1!==a&&o>a)throw new RangeError(`Logical error: musicMinConsecutive (${o}) cannot be greater than musicMaxConsecutive (${a}).`)}#d=!0;get optimizeMediaMemory(){return T(this.#e),this.#d}set optimizeMediaMemory(t){if(T(this.#e),"boolean"!=typeof t)throw new TypeError("optimizeMediaMemory must be a boolean.");this.#d=t}#m=!0;get optimizePictureMemory(){return T(this.#e),this.#m}set optimizePictureMemory(t){if(T(this.#e),"boolean"!=typeof t)throw new TypeError("optimizePictureMemory must be a boolean.");this.#m=t}constructor(t=null,e=0){if(super(),null!==t&&"object"!=typeof t)throw new TypeError("initialData must be an object or null.");if("number"!=typeof e)throw new TypeError("seed must be a number.");this.#s=e,t?this.#f(t):this.#l=Date.now()}_ccBase64ToBlobUrl(t){this.#d&&"string"==typeof t.url&&t.url.startsWith("data:")&&(t.url=v(t.url)),t.picture&&Array.isArray(t.picture)&&(t.picture=t.picture.map(t=>{if(this.#m){const e="string"==typeof t.data&&t.data.startsWith("data:"),r=t.data instanceof Uint8Array;if(e||r)return{...t,data:v(t.data,t.format)}}return t}))}async _rcblobUrlToBase64(t){this.#d&&"string"==typeof t.url&&t.url.startsWith("blob:")&&(t.url=await g(t.url)),this.#m&&t.picture&&Array.isArray(t.picture)&&(t.picture=await Promise.all(t.picture.map(async t=>"string"==typeof t.data&&t.data.startsWith("blob:")?{...t,data:await g(t.data)}:t)))}add(t,e,r=!0){if(T(this.#e),!["music","voice","custom"].includes(t))throw new TypeError('Type must be "music", "voice", or "custom".');if(!e||"string"!=typeof e.id||"number"!=typeof e.duration)throw new TypeError("Content must have a string ID and a valid numerical duration in milliseconds.");if("boolean"!=typeof r)throw new TypeError("smartQueue must be a boolean.");E(e);const n=structuredClone(e);this._ccBase64ToBlobUrl(n),"music"===t?(this.#r.push(n),this.#a.clear()):"voice"===t?(this.#n.push(n),this.#a.clear()):"custom"===t&&this.#h(n,r),this.#p(Date.now()),this.emit("contentAdded",{type:t,data:structuredClone(n)})}scheduleTask(t,e,r,n,i=!0){if(T(this.#e),"number"!=typeof t||isNaN(t))throw new TypeError("timestamp must be a valid number.");if(!["add","remove","move"].includes(e))throw new TypeError('action must be "add", "remove", or "move".');if(!["music","voice"].includes(r))throw new TypeError('type must be "music" or "voice".');if("boolean"!=typeof i)throw new TypeError("smartQueue must be a boolean.");if("add"===e){if("object"!=typeof n||null===n||"string"!=typeof n.id||"number"!=typeof n.duration)throw new TypeError('Payload for "add" must be a MediaContent object (id: string, duration: number).')}else if("remove"===e){if("string"!=typeof n)throw new TypeError('Payload for "remove" must be a string (the content ID).')}else if("move"===e&&("object"!=typeof n||null===n||"string"!=typeof n.id||"number"!=typeof n.newIndex))throw new TypeError('Payload for "move" must be a ScheduledMovePayload (id: string, newIndex: number).');let a=t;if(i){const e=this.#y(t,t);e&&(a=e.absoluteEnd)}o(n)&&"number"!=typeof n.newIndex&&E(n);const s={timestamp:a,action:e,type:r,payload:n};this.#o.push(s),this.#p(Date.now()),this.emit("taskScheduled",structuredClone(s))}remove(t){if(T(this.#e),"string"!=typeof t)throw new TypeError("id must be a string.");this.#r.filter(e=>e.id===t).forEach(t=>w(t)),this.#n.filter(e=>e.id===t).forEach(t=>w(t)),this.#i.filter(e=>e.content?.id===t).forEach(t=>w(t.content));const e=e=>e.id!==t&&e.content?.id!==t;this.#r=this.#r.filter(e),this.#n=this.#n.filter(e),this.#i=this.#i.filter(e),this.#o=this.#o.filter(e=>"add"===e.action&&"object"==typeof e.payload&&null!==e.payload&&"id"in e.payload?e.payload.id!==t||(w(e.payload),!1):e.payload!==t),this.#a.clear(),this.emit("contentRemoved",{id:t})}setConfig(t){T(this.#e),this.#u(t);const e={...this.#c,...t};this.#u(e),this.#c=e,this.#a.clear(),this.emit("configChanged",{config:this.config})}getCurrentEvent(){T(this.#e);const t=Date.now();return this.#p(t),this.#y(t,t)}queryTimeline(t,e=10){if(T(this.#e),"number"!=typeof e||isNaN(e))throw new TypeError("Invalid query limit value. Ensure it is a number.");if(e>this.#c.queryLimit||e<=0)throw new RangeError(`Invalid query limit. Ensure it is > 0 and <= ${this.#c.queryLimit}.`);const r=new I(JSON.parse(this._exportState())),n=[];let i=t;for(let o=0;o<e;o++){r.#p(i);const e=r.#v(i,t);if(!e)break;n.push(e),i=e.absoluteEnd}return r.destroy(!1),this.emit("timelineQueried",{targetDate:t,limit:e,resultCount:n.length}),n}searchCustomPositions(){return T(this.#e),this.#p(Date.now()),[...this.#i]}async _processListForExport(t){return Promise.all(t.map(async t=>{E(t);const e=structuredClone(t);return await this._rcblobUrlToBase64(e),e}))}_exportState(){return JSON.stringify({music:this.#r,voice:this.#n,custom:this.#i,tasks:this.#o,seed:this.#s,anchorDate:this.#l,config:this.#c})}async exportState(){T(this.#e);const t=await this._processListForExport(this.#r),e=await this._processListForExport(this.#n),r=await Promise.all(this.#i.map(async t=>{const e=await this._processListForExport([t.content]);return{...t,content:e[0]}})),n=await Promise.all(this.#o.map(async t=>{if("add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload){const e=await this._processListForExport([t.payload]);return{...t,payload:e[0]}}return t}));return JSON.stringify({music:t,voice:e,custom:r,tasks:n,seed:this.#s,anchorDate:this.#l,config:this.#c})}importState(t){let e;if(T(this.#e),"string"==typeof t)try{e=JSON.parse(t)}catch{throw new TypeError("Provided string is not valid JSON.")}else{if("object"!=typeof t||null===t)throw new TypeError("Import data must be a valid JSON string or an object.");e=t}this.#f(e),this.emit("stateImported",{data:structuredClone(e)})}_prng(t){return function(){let e=t+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}#g(t,e,r,n=0,i=0,o=null,a=0){if(0===t.length)return{items:[],lastId:o,consecutiveCount:a};if("random"!==r){const e=[...t],r=e[e.length-1];return{items:e,lastId:r.id,consecutiveCount:o===r.id?a+1:1}}const s=t.map(t=>({...t,weight:t.weight??1})),l=this._prng(e),c=[];let u=o,d=a;for(;s.length>0;){let t=null,e=-1;if(null!==u&&d<n&&(e=s.findIndex(t=>t.id===u),-1!==e?t=s[e]:c.length>0&&(t=c[c.length-1])),!t){let r=s;null!==u&&-1!==i&&d>=i&&(r=s.filter(t=>t.id!==u)),0===r.length&&(r=s);const n=r.reduce((t,e)=>t+e.weight,0);if(n<=0)t=r[0],e=s.findIndex(e=>e.id===t?.id);else{const i=l()*n;let o=0;for(let n=0;n<r.length;n++)if(o+=r[n].weight,i<=o){t=r[n],e=s.findIndex(e=>e.id===t?.id);break}}}t||(t=s[0],e=0),c.push(t),-1!==e&&s.splice(e,1),t.id===u?d++:(u=t.id,d=1)}return{items:c,lastId:u,consecutiveCount:d}}#w(t){const e=this.#s+t,r=this._prng(10*e);let n=null,i=0,o=null,a=0;if(t>0){const e=this.#a.get(t-1);e&&(n=e.lastMusicId??null,i=e.musicConsecutiveCount??0,o=e.lastVoiceId??null,a=e.voiceConsecutiveCount??0)}const s=this.#g(this.#r,e+1,this.#c.mode,this.#c.musicMinConsecutive,this.#c.musicMaxConsecutive,n,i),l=s.items,c=this.#g(this.#n,e+2,this.#c.voiceMode,this.#c.voiceMinConsecutive,this.#c.voiceMaxConsecutive,o,a),u=c.items,d=[];let m=0,f=0;for(let t=0;t<l.length;t++){const e=l[t];if(d.push({...e,cycleStart:m,cycleEnd:m+e.duration}),m+=e.duration+this.#c.silenceDuration,this.#c.voiceAfterMusic&&u.length>0){const t=this.#c.voiceMax-this.#c.voiceMin+1,e=Math.floor(r()*t)+this.#c.voiceMin;for(let t=0;t<e;t++){const t=u[f%u.length];f++,d.push({...t,cycleStart:m,cycleEnd:m+t.duration}),m+=t.duration+this.#c.silenceDuration}}}return{items:d,duration:m,lastMusicId:s.lastId,musicConsecutiveCount:s.consecutiveCount,lastVoiceId:c.lastId,voiceConsecutiveCount:c.consecutiveCount}}#b(t){if(0===this.#r.length)return null;let e=this.#l,r=0;for(;;){if(r>this.#c.queryLimit)throw new Error("Safety limit hit during cycle location.");let n=this.#a.get(r);if(n||(n=this.#w(r),this.#a.set(r,n)),0===n.duration)return null;if(t>=e&&t<e+n.duration)return{block:n,startTimestamp:e,loopIndex:r};e+=n.duration,r++}}#v(t,e){const r=this.#i.filter(e=>e.intendedTimestamp+e.content.duration>t).sort((t,e)=>t.intendedTimestamp-e.intendedTimestamp)[0];let n=null;if(r){const t=Math.max(e,r.intendedTimestamp);n=this.#E(r.content,r.intendedTimestamp,t,!0)}const i=this.#T(t,e);return i||n?i?n?n.absoluteStart<=i.absoluteStart?n:(n.absoluteStart<i.absoluteEnd&&(i.absoluteEnd=n.absoluteStart,i.duration=i.absoluteEnd-i.absoluteStart,i.remainingTime=Math.max(0,i.absoluteEnd-e),i.progress=Math.min(1,i.elapsedTime/i.duration)),i):i:n:null}#T(t,e){let r=this.#b(t);if(!r)return null;const{block:n,startTimestamp:i}=r,o=t-i;let a,s=n.items.find(t=>t.cycleEnd>o);if(s)a=i+s.cycleStart;else{if(r=this.#b(i+n.duration),!r||0===r.block.items.length)return null;s=r.block.items[0],a=r.startTimestamp+s.cycleStart}const l=Math.max(e,a);return this.#E(s,a,l,!1)}#y(t,e){const r=this.#i.find(e=>t>=e.intendedTimestamp&&t<e.intendedTimestamp+e.content.duration);if(r)return this.#E(r.content,r.intendedTimestamp,e,!0);const n=this.#b(t);if(!n)return null;const{block:i,startTimestamp:o}=n,a=t-o,s=i.items.find(t=>a>=t.cycleStart&&a<t.cycleEnd);return s?this.#E(s,o+s.cycleStart,e,!1):null}#E(t,e,r,n){const i=r-e;return{id:t.id,title:t.title,artist:t.artist,duration:t.duration,url:t.url,absoluteStart:e,absoluteEnd:e+t.duration,elapsedTime:i,remainingTime:t.duration-i,progress:Math.min(1,i/t.duration),isCustom:n}}#h(t,e){let r=t.timestamp||Date.now();const n=t.duration;if(e){const t=this.#y(r,r);t&&(r=t.absoluteEnd)}const i=[...this.#i].sort((t,e)=>t.intendedTimestamp-e.intendedTimestamp);let o=r;if(i.some(t=>r<t.intendedTimestamp+t.content.duration&&r+n>t.intendedTimestamp)){const t=[];let e=Date.now();for(const r of i)r.intendedTimestamp>e&&t.push({start:e,end:r.intendedTimestamp}),e=Math.max(e,r.intendedTimestamp+r.content.duration+this.#c.silenceDuration);t.push({start:e,end:1/0});let a=1/0;for(const e of t)if(e.end-e.start>=n){let t=null;if(r>=e.start&&r+n<=e.end?t=r:r<e.start?t=e.start:r>e.end&&(t=e.end-n),null!==t){const e=Math.abs(r-t);e<a&&(a=e,o=t)}}}this.#i.push({content:t,intendedTimestamp:o,originalTimestamp:t.timestamp||Date.now()})}#p(t){const e=this.#o.filter(e=>e.timestamp<=t);this.#o=this.#o.filter(e=>e.timestamp>t);const r=this.#i.filter(e=>e.intendedTimestamp+e.content.duration<=t);this.#i=this.#i.filter(e=>e.intendedTimestamp+e.content.duration>t);let n=!1;r.forEach(t=>{w(t.content),this.#s+=t.content.id.length,n=!0,this.emit("customPositionExpired",{contentId:t.content.id})}),e.length>0&&e.sort((t,e)=>t.timestamp-e.timestamp).forEach(t=>{const e="music"===t.type?this.#r:this.#n;if("add"===t.action)e.push(t.payload);else if("remove"===t.action){const r=e.findIndex(e=>e.id===t.payload);if(-1!==r){const[t]=e.splice(r,1);w(t)}}else if("move"===t.action){const r=t.payload,n=e.findIndex(t=>t.id===r.id);if(-1!==n){const[t]=e.splice(n,1);e.splice(r.newIndex,0,t)}}this.#l=t.timestamp,this.#s+=1,n=!0,this.emit("taskExecuted",structuredClone(t))}),n&&this.#a.clear()}#f(t){this.#r.forEach(t=>w(t)),this.#n.forEach(t=>w(t)),this.#i.forEach(t=>w(t.content)),this.#o.forEach(t=>{"add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload&&w(t.payload)});const e=t=>t.map(t=>{E(t);const e=structuredClone(t);return this._ccBase64ToBlobUrl(e),e});this.#r=e(t.music),this.#n=e(t.voice),this.#s=t.seed||0,this.#l=t.anchorDate||Date.now(),this.#c={...this.#c,...t.config||{}},this.#i=t.custom.map(t=>({...t,content:e([t.content])[0]})),this.#o=t.tasks.map(t=>"add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload?{...t,payload:e([t.payload])[0]}:t)}destroy(t=!0){this.#e||(t&&(this.#r.forEach(t=>w(t)),this.#n.forEach(t=>w(t)),this.#i.forEach(t=>w(t.content)),this.#o.forEach(t=>{"add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload&&w(t.payload)})),this.#r=[],this.#n=[],this.#i=[],this.#o=[],this.#a.clear(),this.emit("destroyed",{timestamp:Date.now()}),this.removeAllListeners(),this.#e=!0)}}const L=I}};const e={};function r(n){const i=e[n];if(void 0!==i)return i.exports;const o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{if(Array.isArray(e))for(var n=0;n<e.length;){var i=e[n++],o=e[n++];r.o(t,i)?0===o&&n++:0===o?Object.defineProperty(t,i,{enumerable:!0,value:e[n++]}):Object.defineProperty(t,i,{enumerable:!0,get:o})}else for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.cjs=t=>{const e={exports:{}};return t.call(e.exports,e,e.exports),e.exports};let n=r(73);window.TinyRadioFm=n.TinyRadioFm})();
|
|
1
|
+
(()=>{"use strict";var t={294(t,e,r){r.d(e,{TinyRadioFm:()=>L});var n=r.cjs(function(t,e){var r,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise(function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&y(t,"error",e,{once:!0})}(t,i)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,a,s;if(l(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=c(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function f(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):h(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function h(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function y(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.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},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[t];if(void 0===l)return!1;if("function"==typeof l)i(l,this,e);else{var c=l.length,u=h(l,c);for(r=0;r<c;++r)i(u[r],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){return l(e),this.on(t,m(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return l(e),this.prependListener(t,m(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,o,a;if(l(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;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[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return f(this,t,!0)},a.prototype.rawListeners=function(t){return f(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}});function i(t){if(!Array.isArray(t)&&!o(t))throw new TypeError("Argument must be either an Array or a pure JSON Object.");return Array.isArray(t)?t.length:Object.keys(t).length}function o(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"===Object.prototype.toString.call(t)}const a=(t,e)=>{if("string"!=typeof e)throw new TypeError('Expected "name" to be a string.');if("string"!=typeof t)throw new TypeError(`Expected "${e}" to be a string, but received ${typeof t}.`)},s=(t,e)=>{if("string"!=typeof e)throw new TypeError('Expected "name" to be a string.');if("function"!=typeof t)throw new TypeError(`Expected "${e}" to be a function, but received ${typeof t}.`)},l=(t,e)=>{if("string"!=typeof e)throw new TypeError('Expected "name" to be a string.');if("object"!=typeof t||null===t||Array.isArray(t))throw new TypeError(`Expected "${e}" to be a plain object, but received ${null===t?"null":Array.isArray(t)?"array":typeof t}.`)},c=(t,e=!1)=>!e&&void 0===t,u=(t,e=!1)=>c(t,e)||"string"==typeof t||!e&&null===t,d=(t,e=!1)=>c(t,e)||"number"==typeof t||!e&&null===t,m=(t,e=!1)=>c(t,e)||"boolean"==typeof t||!e&&null===t,f=(t,e)=>!!c(t)||(s(e,"valueValidator"),Array.isArray(t)&&t.every(e)),p=new Map;class h extends Error{constructor(t,e,r){if(a(t,"message"),a(e,"url"),"string"!=typeof r)throw new TypeError(`Expected "stage" to be a string, but received ${typeof r}.`);super(t),this.name="MediaLoadingError",this.url=e,this.stage=r}}const y=async t=>{a(t,"str");const e=(new TextEncoder).encode(t),r=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join("").substring(0,8)},v=(t,e="image/jpeg")=>{if(!(t instanceof Uint8Array)&&"string"!=typeof t)throw new TypeError(`Expected "data" to be an instance of Uint8Array or a string, but received ${typeof t}.`);a(e,"format");const r=t=>{const e=URL.createObjectURL(t),r=p.get(e);return p.set(e,"number"==typeof r?r+1:1),e};if(t instanceof Uint8Array)return r(new Blob([t],{type:e}));if("string"==typeof t&&t.startsWith("data:")){const n=t.split(",")[1],i=atob(n),o=new Uint8Array(i.length);for(let t=0;t<i.length;t++)o[t]=i.charCodeAt(t);return r(new Blob([o],{type:e}))}return"string"==typeof t?t:""},g=async t=>{if(a(t,"url"),!t.startsWith("blob:"))return t;try{const e=await fetch(t),r=await e.blob();return await new Promise((t,e)=>{const n=new FileReader;n.onloadend=()=>t(String(n.result)),n.onerror=e,n.readAsDataURL(r)})}catch(e){return console.warn(`[TinyAudioUtils] Failed to convert Blob URL to Base64 on export: ${t}`,e),t}},w=t=>{l(t,"content"),t&&Array.isArray(t.picture)&&t.picture.forEach(t=>{if("string"==typeof t.data&&t.data.startsWith("blob:")){const e=p.get(t.data)??0;e>1?p.set(t.data,e-1):p.delete(t.data),e<=1&&URL.revokeObjectURL(t.data)}})},b=(t,e=!1)=>{if(o(t)){if(4!==i(t)){if(e)return!1;throw new TypeError("Invalid fetch data: Object must be an MediaContentFetchData.")}E(t.common),l(t.native,"_fetchData.native"),l(t.format,"_fetchData.format"),l(t.quality,"_fetchData.quality");for(const r in t.native){const n=t.native[r];if(!f(n,t=>"string"==typeof t.id)){if(e)return!1;throw new TypeError(`Invalid native data: "${r}" must be an array of native fetch data.`)}}}return!0},E=t=>{if(l(t,"common"),b(t._fetchData),!u(t.title))throw new TypeError('Invalid metadata: "title" must be a string or null.');if(!u(t.album))throw new TypeError('Invalid metadata: "album" must be a string or null.');if(!u(t.albumartist))throw new TypeError('Invalid metadata: "albumartist" must be a a string or null.');if(!u(t.artist))throw new TypeError('Invalid metadata: "artist" must be a string or null.');if(!m(t.compilation))throw new TypeError('Invalid metadata: "compilation" must be a boolean or null.');if(!m(t.podcast))throw new TypeError('Invalid metadata: "podcast" must be a boolean or null.');if(!m(t.gapless))throw new TypeError('Invalid metadata: "gapless" must be a boolean or null.');if(!m(t.showMovement))throw new TypeError('Invalid metadata: "showMovement" must be a boolean or null.');if(!d(t.averageLevel))throw new TypeError('Invalid metadata: "averageLevel" must be a number or null.');if(!d(t.peakLevel))throw new TypeError('Invalid metadata: "peakLevel" must be a number or null.');if(!d(t.hdVideo))throw new TypeError('Invalid metadata: "hdVideo" must be a number or null.');if(!d(t.stik))throw new TypeError('Invalid metadata: "stik" must be a number or null.');if(!d(t.playCounter))throw new TypeError('Invalid metadata: "playCounter" must be a number or null.');if(!d(t.tvSeason))throw new TypeError('Invalid metadata: "tvSeason" must be a number or null.');if(!d(t.tvEpisode))throw new TypeError('Invalid metadata: "tvEpisode" must be a number or null.');if(!d(t.year))throw new TypeError('Invalid metadata: "year" must be a number or null.');if(!d(t.bpm))throw new TypeError('Invalid metadata: "bpm" must be a number or null.');if(!d(t.originalyear))throw new TypeError('Invalid metadata: "originalyear" must be a number or null.');if(!d(t.movementTotal))throw new TypeError('Invalid metadata: "movementTotal" must be a number or null.');if(!u(t.date))throw new TypeError('Invalid metadata: "date" must be a string or null.');if(!u(t.originaldate))throw new TypeError('Invalid metadata: "originaldate" must be a string or null.');if(!u(t.releasedate))throw new TypeError('Invalid metadata: "releasedate" must be a string or null.');if(!u(t.albumsort))throw new TypeError('Invalid metadata: "albumsort" must be a string or null.');if(!u(t.titlesort))throw new TypeError('Invalid metadata: "titlesort" must be a string or null.');if(!u(t.work))throw new TypeError('Invalid metadata: "work" must be a string or null.');if(!u(t.artistsort))throw new TypeError('Invalid metadata: "artistsort" must be a string or null.');if(!u(t.albumartistsort))throw new TypeError('Invalid metadata: "albumartistsort" must be a string or null.');if(!u(t.composersort))throw new TypeError('Invalid metadata: "composersort" must be a string or null.');if(!u(t.grouping))throw new TypeError('Invalid metadata: "grouping" must be a string or null.');if(!u(t.longDescription))throw new TypeError('Invalid metadata: "longDescription" must be a string or null.');if(!u(t.totaltracks))throw new TypeError('Invalid metadata: "totaltracks" must be a string or null.');if(!u(t.totaldiscs))throw new TypeError('Invalid metadata: "totaldiscs" must be a string or null.');if(!u(t.mood))throw new TypeError('Invalid metadata: "mood" must be a string or null.');if(!u(t.media))throw new TypeError('Invalid metadata: "media" must be a string or null.');if(!u(t.tvShow))throw new TypeError('Invalid metadata: "tvShow" must be a string or null.');if(!u(t.tvShowSort))throw new TypeError('Invalid metadata: "tvShowSort" must be a string or null.');if(!u(t.tvEpisodeId))throw new TypeError('Invalid metadata: "tvEpisodeId" must be a string or null.');if(!u(t.tvNetwork))throw new TypeError('Invalid metadata: "tvNetwork" must be a string or null.');if(!u(t.podcasturl))throw new TypeError('Invalid metadata: "podcasturl" must be a string or null.');if(!u(t.releasestatus))throw new TypeError('Invalid metadata: "releasestatus" must be a string or null.');if(!u(t.releasecountry))throw new TypeError('Invalid metadata: "releasecountry" must be a string or null.');if(!u(t.script))throw new TypeError('Invalid metadata: "script" must be a string or null.');if(!u(t.language))throw new TypeError('Invalid metadata: "language" must be a string or null.');if(!u(t.copyright))throw new TypeError('Invalid metadata: "copyright" must be a string or null.');if(!u(t.license))throw new TypeError('Invalid metadata: "license" must be a string or null.');if(!u(t.encodedby))throw new TypeError('Invalid metadata: "encodedby" must be a string or null.');if(!u(t.encodersettings))throw new TypeError('Invalid metadata: "encodersettings" must be a string or null.');if(!u(t.barcode))throw new TypeError('Invalid metadata: "barcode" must be a string or null.');if(!u(t.asin))throw new TypeError('Invalid metadata: "asin" must be a string or null.');if(!u(t.website))throw new TypeError('Invalid metadata: "website" must be a string or null.');if(!u(t.originalalbum))throw new TypeError('Invalid metadata: "originalalbum" must be a string or null.');if(!u(t.originalartist))throw new TypeError('Invalid metadata: "originalartist" must be a string or null.');if(!u(t.key))throw new TypeError('Invalid metadata: "key" must be a string or null.');if(!u(t.movement))throw new TypeError('Invalid metadata: "movement" must be a string or null.');if(!u(t.podcastId))throw new TypeError('Invalid metadata: "podcastId" must be a string or null.');if(!f(t.albumartists,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "albumartists" must be an array of strings.');if(!f(t.genre,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "genre" must be an array of strings.');if(!f(t.label,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "label" must be an array of strings.');if(!f(t.composer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "composer" must be an array of strings.');if(!f(t.artists,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "artists" must be an array of strings.');if(!f(t.lyricist,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "lyricist" must be an array of strings.');if(!f(t.writer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "writer" must be an array of strings.');if(!f(t.conductor,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "conductor" must be an array of strings.');if(!f(t.remixer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "remixer" must be an array of strings.');if(!f(t.arranger,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "arranger" must be an array of strings.');if(!f(t.engineer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "engineer" must be an array of strings.');if(!f(t.publisher,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "publisher" must be an array of strings.');if(!f(t.producer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "producer" must be an array of strings.');if(!f(t.djmixer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "djmixer" must be an array of strings.');if(!f(t.mixer,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "mixer" must be an array of strings.');if(!f(t.technician,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "technician" must be an array of strings.');if(!f(t.subtitle,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "subtitle" must be an array of strings.');if(!f(t.description,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "description" must be an array of strings.');if(!f(t.discsubtitle,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "discsubtitle" must be an array of strings.');if(!f(t.releasetype,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "releasetype" must be an array of strings.');if(!f(t.isrc,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "isrc" must be an array of strings.');if(!f(t.performer_instrument,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "performer_instrument" must be an array of strings.');if(!f(t.notes,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "notes" must be an array of strings.');if(!f(t.category,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "category" must be an array of strings.');if(!f(t.keywords,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "keywords" must be an array of strings.');if(!f(t.catalognumber,t=>"string"==typeof t))throw new TypeError('Invalid metadata: "catalognumber" must be an array of strings.');if(!f(t.picture,t=>t&&"object"==typeof t&&(void 0===t.description||"string"==typeof t.description)&&(void 0===t.name||"string"==typeof t.name)&&(void 0===t.type||"string"==typeof t.type)&&"string"==typeof t.format&&(t.data instanceof Uint8Array||"string"==typeof t.data)))throw new TypeError('Invalid metadata: "picture" must be an array of pictures.');if(!f(t.comment,t=>null!==t&&"object"==typeof t&&u(t.descriptor)&&u(t.language)&&u(t.text)))throw new TypeError('Invalid metadata: "comment" must be an array of valid IComment objects.');if(!f(t.lyrics,t=>null!==t&&"object"==typeof t&&u(t.text)&&u(t.descriptor)&&u(t.language)&&(!Array.isArray(t)||f(t.syncText,t=>null!==t&&"object"==typeof t&&u(t.text)&&d(t.timestamp)))&&(t=>void 0===t||null!==t&&"object"==typeof t&&d(t.notSynchronized)&&d(t.mpegFrameNumber)&&d(t.milliseconds))(t.timeStampFormat)&&(t=>void 0===t||null!==t&&"object"==typeof t&&d(t.other)&&d(t.lyrics)&&d(t.text)&&d(t.movement_part)&&d(t.events)&&d(t.chord)&&d(t.trivia_pop))(t.contentType)))throw new TypeError('Invalid metadata: "lyrics" must be an array of valid ILyricsTag objects.');if(!f(t.rating,t=>null!==t&&"object"==typeof t&&u(t.source)&&d(t.rating)))throw new TypeError('Invalid metadata: "rating" must be an array of valid IRating objects.');const e=(t,e)=>{if(!c(e)&&null!==e){if("object"!=typeof e)throw new TypeError(`Invalid metadata: "${t}" must be an object or null.`);if("number"!=typeof e.no&&null!==e.no)throw new TypeError(`Invalid metadata: "${t}.no" must be a number or null.`);if("number"!=typeof e.of&&null!==e.of)throw new TypeError(`Invalid metadata: "${t}.of" must be a number or null.`)}};e("disk",t.disk),e("track",t.track),e("movementIndex",t.movementIndex)},T=t=>{if(t)throw new Error("This TinyRadioFm instance has been destroyed and can no longer be used.")};class I extends n.EventEmitter{static async parseContent(t,e,r,n,c,u=!0){return(async(t,e={},r={},n=t=>{if(!(t instanceof Blob))throw new TypeError('Expected "data" to be a Blob.');return new Promise((t,e)=>e(new TypeError("parseFile library not found.")))},c={},u=!0,d="null")=>{if("string"!=typeof t&&!(t instanceof HTMLMediaElement))throw new TypeError("Source must be a string or an HTMLMediaElement.");if(l(e,"defaultMetadata"),l(r,"metadata"),s(n,"parseFile"),l(c,"callbacks"),c.onProgress&&"function"!=typeof c.onProgress)throw new TypeError("callbacks.onProgress must be a function.");if(c.onError&&"function"!=typeof c.onError)throw new TypeError("callbacks.onError must be a function.");if("string"!=typeof d&&"function"!=typeof d)throw new TypeError("unknownArtist must be a string or a function returning a string.");let m,f="";const p=(e,r)=>{if(a(e,"stage"),void 0!==r&&!(r instanceof Event))throw new TypeError('Expected "event" to be an Event or undefined.');c.onProgress&&c.onProgress({event:r,status:"loading",stage:e,url:f||(t instanceof HTMLMediaElement?t.src:"unknown")})},g=(e,r)=>{if(!(e instanceof Error))throw new TypeError('Expected "error" to be an Error.');a(r,"stage"),c.onError&&c.onError({error:e instanceof Error?e:new Error(String(e)),url:f||(t instanceof HTMLMediaElement?t.src:"unknown"),stage:r})};try{p("INITIALIZING"),"string"==typeof t?(f=t,m=new Audio(f)):(m=t,f=m.src);try{await new Promise((t,e)=>{const r=t=>p("DOWNLOADING",t),n=()=>{o(),t(void 0)},i=t=>{o(),e(new Error(`HTMLMediaElement failed to load: ${t.message||"Unknown error"}`))},o=()=>{m.removeEventListener("progress",r),m.removeEventListener("loadedmetadata",n),m.removeEventListener("error",i)};m.addEventListener("progress",r),m.addEventListener("loadedmetadata",n),m.addEventListener("error",i),m.readyState>=1&&(o(),t(void 0))}),p("METADATA_LOADED")}catch(t){throw new h(t instanceof Error?t.message:"UNKNOWN ERROR",f,"METADATA")}const l={id:r.id||await y(f),duration:Math.floor(1e3*m.duration),url:f,weight:r.weight??1};let w={};p("EXTRACTING_ID3");try{w=await(async(t,e,r=!0)=>{a(t,"url"),s(e,"parseFile");const n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch audio file: ${n.status} ${n.statusText}`);const l=await n.blob(),c=await e(l);if(!c||"object"!=typeof c.common)throw new TypeError('Invalid metadata: "common" property is missing.');void 0!==typeof c.common["performer:instrument"]&&(c.common.performer_instrument=c.common["performer:instrument"]),b(c);const u=c.common;E(u);const d=([t,e])=>Array.isArray(e)?e.length>0:o(e)?i(Object.fromEntries(Object.entries(e).filter(d)))>0:null!==e,m=u?.picture?.map(t=>({...t,data:r?v(t.data,t.format):t.data}))??[];c.common={...c.common,picture:m.map(t=>({...t,data:""}))},r&&Object.keys(c.native).forEach(t=>{c.native[t]=c.native[t].map(t=>{if(t.value&&"object"==typeof t.value&&t.value.data instanceof Uint8Array){const e=u?.picture?.findIndex(e=>e.data===t.value.data&&e.format===t.value.format&&e.description===t.value.description&&e.name===t.value.name)??-1;if(m[e])return{...t,value:{...t.value,data:""}}}return t})});const f=Object.fromEntries(Object.entries({title:u?.title??null,album:u?.album??null,albumartist:u?.albumartist??null,albumartists:u?.albumartists??[],genre:u?.genre??[],label:u?.label??[],composer:u?.composer??[],year:u?.year??null,artist:u?.artist??null,artists:u?.artists??[],disk:u?.disk?{no:u.disk.no,of:u.disk.of}:null,track:u?.track?{no:u.track.no,of:u.track.of}:null,movementIndex:u?.movementIndex?{no:u.movementIndex.no,of:u.movementIndex.of}:null,picture:m,date:u?.date??null,originaldate:u?.originaldate??null,originalyear:u?.originalyear??null,releasedate:u?.releasedate??null,comment:u?.comment??[],lyrics:u?.lyrics??[],albumsort:u?.albumsort??null,titlesort:u?.titlesort??null,work:u?.work??null,artistsort:u?.artistsort??null,albumartistsort:u?.albumartistsort??null,composersort:u?.composersort??null,lyricist:u?.lyricist??[],writer:u?.writer??[],conductor:u?.conductor??[],remixer:u?.remixer??[],arranger:u?.arranger??[],engineer:u?.engineer??[],publisher:u?.publisher??[],producer:u?.producer??[],djmixer:u?.djmixer??[],mixer:u?.mixer??[],technician:u?.technician??[],grouping:u?.grouping??null,subtitle:u?.subtitle??[],description:u?.description??[],longDescription:u?.longDescription??null,discsubtitle:u?.discsubtitle??[],totaltracks:u?.totaltracks??null,totaldiscs:u?.totaldiscs??null,movementTotal:u?.movementTotal??null,compilation:u?.compilation??null,rating:u?.rating??[],bpm:u?.bpm??null,mood:u?.mood??null,media:u?.media??null,catalognumber:u?.catalognumber??[],tvShow:u?.tvShow??null,tvShowSort:u?.tvShowSort??null,tvSeason:u?.tvSeason??null,tvEpisode:u?.tvEpisode??null,tvEpisodeId:u?.tvEpisodeId??null,tvNetwork:u?.tvNetwork??null,podcast:u?.podcast??null,podcasturl:u?.podcasturl??null,releasestatus:u?.releasestatus??null,releasetype:u?.releasetype??[],releasecountry:u?.releasecountry??null,script:u?.script??null,language:u?.language??null,copyright:u?.copyright??null,license:u?.license??null,encodedby:u?.encodedby??null,encodersettings:u?.encodersettings??null,gapless:u?.gapless??null,barcode:u?.barcode??null,isrc:u?.isrc??[],asin:u?.asin??null,website:u?.website??null,performer_instrument:u?.performer_instrument??[],averageLevel:u?.averageLevel??null,peakLevel:u?.peakLevel??null,notes:u?.notes??[],originalalbum:u?.originalalbum??null,originalartist:u?.originalartist??null,key:u?.key??null,category:u?.category??[],hdVideo:u?.hdVideo??null,keywords:u?.keywords??[],movement:u?.movement??null,podcastId:u?.podcastId??null,showMovement:u?.showMovement??null,stik:u?.stik??null,playCounter:u?.playCounter??null}).filter(d));return f._fetchData=c,f})(f,n,u)}catch(t){g(t instanceof Error?t:new Error("Unknown Error"),"ID3"),console.warn(`[TinyAudioUtils] ID3 extraction failed for ${f}. Falling back to filename.`)}const T=t=>{a(t,"url");try{return(t.split(/[?#]/)[0].split("/").pop()??"").replace(/\.[^/.]+$/,"")||"Unknown Track"}catch{return"Unknown Track"}},I=t=>{const e={...t};return o(e._fetchData)&&(o(w._fetchData)&&(e._fetchData={...w._fetchData}),o(t._fetchData)&&(void 0!==t._fetchData.common&&(e._fetchData.common=t._fetchData.common),void 0!==t._fetchData.native&&(e._fetchData.native=t._fetchData.native),void 0!==t._fetchData.format&&(e._fetchData.format=t._fetchData.format),void 0!==t._fetchData.quality&&(e._fetchData.quality=t._fetchData.quality))),e},L={...l,...I(e),...w,...I(r),title:w.title||r.title||T(f),artist:w.artist||r.artist||("string"==typeof d?d:String(d()))};return c.onProgress&&c.onProgress({status:"success",stage:"COMPLETE",url:f}),L}catch(t){if(t instanceof h)throw t;const e=new h(t instanceof Error?t.message:"UNKNOWN ERROR",f,"INITIALIZING");throw g(e,"INITIALIZING"),e}})(t,e,r,n,c,u,I.#t)}static#t="Unknown Artist";static get unknownArtist(){return I.#t}static set unknownArtist(t){if("string"!=typeof t&&"function"!=typeof t)throw new TypeError("unknownArtist must have an string or function.");I.#t=t}#e=!1;get destroyed(){return this.#e}get size(){return T(this.#e),this.#r.length+this.#n.length}get musicSize(){return T(this.#e),this.#r.length}get voiceSize(){return T(this.#e),this.#n.length}get customPosSize(){return T(this.#e),this.#i.length}get tasksSize(){return T(this.#e),this.#o.length}get cycleCacheSize(){return T(this.#e),this.#a.size}#r=[];get musicList(){return T(this.#e),structuredClone(this.#r)}#n=[];get voiceList(){return T(this.#e),structuredClone(this.#n)}#i=[];get customPositions(){return T(this.#e),structuredClone(this.#i)}#o=[];get scheduledTasks(){return T(this.#e),structuredClone(this.#o)}get allList(){return T(this.#e),[...this.musicList,...this.voiceList]}#s=0;get seed(){return T(this.#e),this.#s}set seed(t){if(T(this.#e),"number"!=typeof t)throw new TypeError("Seed must be a number.");this.#s=t,this.#a.clear(),this.emit("seedChanged",{seed:t})}#l=Date.now();get anchorDate(){return T(this.#e),this.#l}#a=new Map;#c={mode:"playlist",voiceMode:"playlist",silenceDuration:0,queryLimit:1e5,voiceAfterMusic:!0,voiceMin:0,voiceMax:1,musicMaxConsecutive:0,musicMinConsecutive:0,voiceMaxConsecutive:0,voiceMinConsecutive:0};get config(){return T(this.#e),structuredClone(this.#c)}set config(t){T(this.#e),this.#u(t),this.#c=structuredClone(t),this.#a.clear(),this.emit("configChanged",{config:this.config})}#u(t){if("object"!=typeof t||null===t)throw new TypeError("Configuration must be a valid object.");const e=["playlist","random"];if(void 0!==t.mode&&!e.includes(t.mode))throw new TypeError(`Invalid mode: "${t.mode}". Must be one of: ${e.join(", ")}.`);if(void 0!==t.voiceMode&&!e.includes(t.voiceMode))throw new TypeError(`Invalid voiceMode: "${t.voiceMode}". Must be one of: ${e.join(", ")}.`);if(void 0!==t.silenceDuration&&("number"!=typeof t.silenceDuration||t.silenceDuration<0))throw new TypeError("silenceDuration must be a non-negative number.");if(void 0!==t.queryLimit&&("number"!=typeof t.queryLimit||t.queryLimit<=0))throw new TypeError("queryLimit must be a positive number.");if(void 0!==t.voiceAfterMusic&&"boolean"!=typeof t.voiceAfterMusic)throw new TypeError("voiceAfterMusic must be a boolean.");const r=(t,e)=>{if(void 0!==t&&("number"!=typeof t||t<0))throw new TypeError(`${e} must be a non-negative number.`)};r(t.voiceMin,"voiceMin"),r(t.voiceMax,"voiceMax"),r(t.musicMinConsecutive,"musicMinConsecutive"),r(t.musicMaxConsecutive,"musicMaxConsecutive"),r(t.voiceMinConsecutive,"voiceMinConsecutive"),r(t.voiceMaxConsecutive,"voiceMaxConsecutive");const n=t.voiceMin??this.#c.voiceMin,i=t.voiceMax??this.#c.voiceMax;if(i<n)throw new RangeError(`Logical error: voiceMax (${i}) cannot be less than voiceMin (${n}).`);const o=t.musicMinConsecutive??this.#c.musicMinConsecutive,a=t.musicMaxConsecutive??this.#c.musicMaxConsecutive;if(-1!==a&&o>a)throw new RangeError(`Logical error: musicMinConsecutive (${o}) cannot be greater than musicMaxConsecutive (${a}).`)}#d=!0;get optimizeMediaMemory(){return T(this.#e),this.#d}set optimizeMediaMemory(t){if(T(this.#e),"boolean"!=typeof t)throw new TypeError("optimizeMediaMemory must be a boolean.");this.#d=t}#m=!0;get optimizePictureMemory(){return T(this.#e),this.#m}set optimizePictureMemory(t){if(T(this.#e),"boolean"!=typeof t)throw new TypeError("optimizePictureMemory must be a boolean.");this.#m=t}constructor(t=null,e=0){if(super(),null!==t&&"object"!=typeof t)throw new TypeError("initialData must be an object or null.");if("number"!=typeof e)throw new TypeError("seed must be a number.");this.#s=e,t?this.#f(t):this.#l=Date.now()}_ccBase64ToBlobUrl(t){this.#d&&"string"==typeof t.url&&t.url.startsWith("data:")&&(t.url=v(t.url)),t.picture&&Array.isArray(t.picture)&&(t.picture=t.picture.map(t=>{if(this.#m){const e="string"==typeof t.data&&t.data.startsWith("data:"),r=t.data instanceof Uint8Array;if(e||r)return{...t,data:v(t.data,t.format)}}return t}))}async _rcblobUrlToBase64(t){this.#d&&"string"==typeof t.url&&t.url.startsWith("blob:")&&(t.url=await g(t.url)),this.#m&&t.picture&&Array.isArray(t.picture)&&(t.picture=await Promise.all(t.picture.map(async t=>"string"==typeof t.data&&t.data.startsWith("blob:")?{...t,data:await g(t.data)}:t)))}add(t,e,r=!0){if(T(this.#e),!["music","voice","custom"].includes(t))throw new TypeError('Type must be "music", "voice", or "custom".');if(!e||"string"!=typeof e.id||"number"!=typeof e.duration)throw new TypeError("Content must have a string ID and a valid numerical duration in milliseconds.");if("boolean"!=typeof r)throw new TypeError("smartQueue must be a boolean.");E(e);const n=structuredClone(e);this._ccBase64ToBlobUrl(n),"music"===t?(this.#r.push(n),this.#a.clear()):"voice"===t?(this.#n.push(n),this.#a.clear()):"custom"===t&&this.#p(n,r),this.#h(Date.now()),this.emit("contentAdded",{type:t,data:structuredClone(n)})}scheduleTask(t,e,r,n,i=!0){if(T(this.#e),"number"!=typeof t||isNaN(t))throw new TypeError("timestamp must be a valid number.");if(!["add","remove","move"].includes(e))throw new TypeError('action must be "add", "remove", or "move".');if(!["music","voice"].includes(r))throw new TypeError('type must be "music" or "voice".');if("boolean"!=typeof i)throw new TypeError("smartQueue must be a boolean.");if("add"===e){if("object"!=typeof n||null===n||"string"!=typeof n.id||"number"!=typeof n.duration)throw new TypeError('Payload for "add" must be a MediaContent object (id: string, duration: number).')}else if("remove"===e){if("string"!=typeof n)throw new TypeError('Payload for "remove" must be a string (the content ID).')}else if("move"===e&&("object"!=typeof n||null===n||"string"!=typeof n.id||"number"!=typeof n.newIndex))throw new TypeError('Payload for "move" must be a ScheduledMovePayload (id: string, newIndex: number).');let a=t;if(i){const e=this.#y(t,t);e&&(a=e.absoluteEnd)}o(n)&&"number"!=typeof n.newIndex&&E(n);const s={timestamp:a,action:e,type:r,payload:n};this.#o.push(s),this.#h(Date.now()),this.emit("taskScheduled",structuredClone(s))}remove(t){if(T(this.#e),"string"!=typeof t)throw new TypeError("id must be a string.");this.#r.filter(e=>e.id===t).forEach(t=>w(t)),this.#n.filter(e=>e.id===t).forEach(t=>w(t)),this.#i.filter(e=>e.content?.id===t).forEach(t=>w(t.content));const e=e=>e.id!==t&&e.content?.id!==t;this.#r=this.#r.filter(e),this.#n=this.#n.filter(e),this.#i=this.#i.filter(e),this.#o=this.#o.filter(e=>"add"===e.action&&"object"==typeof e.payload&&null!==e.payload&&"id"in e.payload?e.payload.id!==t||(w(e.payload),!1):e.payload!==t),this.#a.clear(),this.emit("contentRemoved",{id:t})}setConfig(t){T(this.#e),this.#u(t);const e={...this.#c,...t};this.#u(e),this.#c=e,this.#a.clear(),this.emit("configChanged",{config:this.config})}getCurrentEvent(){T(this.#e);const t=Date.now();return this.#h(t),this.#y(t,t)}queryTimeline(t,e=10){if(T(this.#e),"number"!=typeof e||isNaN(e))throw new TypeError("Invalid query limit value. Ensure it is a number.");if(e>this.#c.queryLimit||e<=0)throw new RangeError(`Invalid query limit. Ensure it is > 0 and <= ${this.#c.queryLimit}.`);const r=new I(JSON.parse(this._exportState())),n=[];let i=t;for(let o=0;o<e;o++){r.#h(i);const e=r.#v(i,t);if(!e)break;n.push(e),i=e.absoluteEnd}return r.destroy(!1),this.emit("timelineQueried",{targetDate:t,limit:e,resultCount:n.length}),n}searchCustomPositions(){return T(this.#e),this.#h(Date.now()),[...this.#i]}async _processListForExport(t){return Promise.all(t.map(async t=>{E(t);const e=structuredClone(t);return await this._rcblobUrlToBase64(e),e}))}_exportState(){return JSON.stringify({music:this.#r,voice:this.#n,custom:this.#i,tasks:this.#o,seed:this.#s,anchorDate:this.#l,config:this.#c})}async exportState(){T(this.#e);const t=await this._processListForExport(this.#r),e=await this._processListForExport(this.#n),r=await Promise.all(this.#i.map(async t=>{const e=await this._processListForExport([t.content]);return{...t,content:e[0]}})),n=await Promise.all(this.#o.map(async t=>{if("add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload){const e=await this._processListForExport([t.payload]);return{...t,payload:e[0]}}return t}));return JSON.stringify({music:t,voice:e,custom:r,tasks:n,seed:this.#s,anchorDate:this.#l,config:this.#c})}importState(t){let e;if(T(this.#e),"string"==typeof t)try{e=JSON.parse(t)}catch{throw new TypeError("Provided string is not valid JSON.")}else{if("object"!=typeof t||null===t)throw new TypeError("Import data must be a valid JSON string or an object.");e=t}this.#f(e),this.emit("stateImported",{data:structuredClone(e)})}_prng(t){return function(){let e=t+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296}}#g(t,e,r,n=0,i=0,o=null,a=0){if(0===t.length)return{items:[],lastId:o,consecutiveCount:a};if("random"!==r){const e=[...t],r=e[e.length-1];return{items:e,lastId:r.id,consecutiveCount:o===r.id?a+1:1}}const s=t.map(t=>({...t,weight:t.weight??1})),l=this._prng(e),c=[];let u=o,d=a;for(;s.length>0;){let t=null,e=-1;if(null!==u&&d<n&&(e=s.findIndex(t=>t.id===u),-1!==e?t=s[e]:c.length>0&&(t=c[c.length-1])),!t){let r=s;null!==u&&-1!==i&&d>=i&&(r=s.filter(t=>t.id!==u)),0===r.length&&(r=s);const n=r.reduce((t,e)=>t+e.weight,0);if(n<=0)t=r[0],e=s.findIndex(e=>e.id===t?.id);else{const i=l()*n;let o=0;for(let n=0;n<r.length;n++)if(o+=r[n].weight,i<=o){t=r[n],e=s.findIndex(e=>e.id===t?.id);break}}}t||(t=s[0],e=0),c.push(t),-1!==e&&s.splice(e,1),t.id===u?d++:(u=t.id,d=1)}return{items:c,lastId:u,consecutiveCount:d}}#w(t){const e=this.#s+t,r=this._prng(10*e);let n=null,i=0,o=null,a=0;if(t>0){const e=this.#a.get(t-1);e&&(n=e.lastMusicId??null,i=e.musicConsecutiveCount??0,o=e.lastVoiceId??null,a=e.voiceConsecutiveCount??0)}const s=this.#g(this.#r,e+1,this.#c.mode,this.#c.musicMinConsecutive,this.#c.musicMaxConsecutive,n,i),l=s.items,c=this.#g(this.#n,e+2,this.#c.voiceMode,this.#c.voiceMinConsecutive,this.#c.voiceMaxConsecutive,o,a),u=c.items,d=[];let m=0,f=0;for(let t=0;t<l.length;t++){const e=l[t];if(d.push({...e,cycleStart:m,cycleEnd:m+e.duration}),m+=e.duration+this.#c.silenceDuration,this.#c.voiceAfterMusic&&u.length>0){const t=this.#c.voiceMax-this.#c.voiceMin+1,e=Math.floor(r()*t)+this.#c.voiceMin;for(let t=0;t<e;t++){const t=u[f%u.length];f++,d.push({...t,cycleStart:m,cycleEnd:m+t.duration}),m+=t.duration+this.#c.silenceDuration}}}return{items:d,duration:m,lastMusicId:s.lastId,musicConsecutiveCount:s.consecutiveCount,lastVoiceId:c.lastId,voiceConsecutiveCount:c.consecutiveCount}}#b(t){if(0===this.#r.length)return null;let e=this.#l,r=0;for(;;){if(r>this.#c.queryLimit)throw new Error("Safety limit hit during cycle location.");let n=this.#a.get(r);if(n||(n=this.#w(r),this.#a.set(r,n)),0===n.duration)return null;if(t>=e&&t<e+n.duration)return{block:n,startTimestamp:e,loopIndex:r};e+=n.duration,r++}}#v(t,e){const r=this.#i.filter(e=>e.intendedTimestamp+e.content.duration>t).sort((t,e)=>t.intendedTimestamp-e.intendedTimestamp)[0];let n=null;if(r){const t=Math.max(e,r.intendedTimestamp);n=this.#E(r.content,r.intendedTimestamp,t,!0)}const i=this.#T(t,e);return i||n?i?n?n.absoluteStart<=i.absoluteStart?n:(n.absoluteStart<i.absoluteEnd&&(i.absoluteEnd=n.absoluteStart,i.duration=i.absoluteEnd-i.absoluteStart,i.remainingTime=Math.max(0,i.absoluteEnd-e),i.progress=Math.min(1,i.elapsedTime/i.duration)),i):i:n:null}#T(t,e){let r=this.#b(t);if(!r)return null;const{block:n,startTimestamp:i}=r,o=t-i;let a,s=n.items.find(t=>t.cycleEnd>o);if(s)a=i+s.cycleStart;else{if(r=this.#b(i+n.duration),!r||0===r.block.items.length)return null;s=r.block.items[0],a=r.startTimestamp+s.cycleStart}const l=Math.max(e,a);return this.#E(s,a,l,!1)}#y(t,e){const r=this.#i.find(e=>t>=e.intendedTimestamp&&t<e.intendedTimestamp+e.content.duration);if(r)return this.#E(r.content,r.intendedTimestamp,e,!0);const n=this.#b(t);if(!n)return null;const{block:i,startTimestamp:o}=n,a=t-o,s=i.items.find(t=>a>=t.cycleStart&&a<t.cycleEnd);return s?this.#E(s,o+s.cycleStart,e,!1):null}#E(t,e,r,n){const i=r-e;return{id:t.id,title:t.title,artist:t.artist,duration:t.duration,url:t.url,absoluteStart:e,absoluteEnd:e+t.duration,elapsedTime:i,remainingTime:t.duration-i,progress:Math.min(1,i/t.duration),isCustom:n}}#p(t,e){let r=t.timestamp||Date.now();const n=t.duration;if(e){const t=this.#y(r,r);t&&(r=t.absoluteEnd)}const i=[...this.#i].sort((t,e)=>t.intendedTimestamp-e.intendedTimestamp);let o=r;if(i.some(t=>r<t.intendedTimestamp+t.content.duration&&r+n>t.intendedTimestamp)){const t=[];let e=Date.now();for(const r of i)r.intendedTimestamp>e&&t.push({start:e,end:r.intendedTimestamp}),e=Math.max(e,r.intendedTimestamp+r.content.duration+this.#c.silenceDuration);t.push({start:e,end:1/0});let a=1/0;for(const e of t)if(e.end-e.start>=n){let t=null;if(r>=e.start&&r+n<=e.end?t=r:r<e.start?t=e.start:r>e.end&&(t=e.end-n),null!==t){const e=Math.abs(r-t);e<a&&(a=e,o=t)}}}this.#i.push({content:t,intendedTimestamp:o,originalTimestamp:t.timestamp||Date.now()})}#h(t){const e=this.#o.filter(e=>e.timestamp<=t);this.#o=this.#o.filter(e=>e.timestamp>t);const r=this.#i.filter(e=>e.intendedTimestamp+e.content.duration<=t);this.#i=this.#i.filter(e=>e.intendedTimestamp+e.content.duration>t);let n=!1;r.forEach(t=>{w(t.content),this.#s+=t.content.id.length,n=!0,this.emit("customPositionExpired",{contentId:t.content.id})}),e.length>0&&e.sort((t,e)=>t.timestamp-e.timestamp).forEach(t=>{const e="music"===t.type?this.#r:this.#n;if("add"===t.action)e.push(t.payload);else if("remove"===t.action){const r=e.findIndex(e=>e.id===t.payload);if(-1!==r){const[t]=e.splice(r,1);w(t)}}else if("move"===t.action){const r=t.payload,n=e.findIndex(t=>t.id===r.id);if(-1!==n){const[t]=e.splice(n,1);e.splice(r.newIndex,0,t)}}this.#l=t.timestamp,this.#s+=1,n=!0,this.emit("taskExecuted",structuredClone(t))}),n&&this.#a.clear()}#f(t){this.#r.forEach(t=>w(t)),this.#n.forEach(t=>w(t)),this.#i.forEach(t=>w(t.content)),this.#o.forEach(t=>{"add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload&&w(t.payload)});const e=t=>t.map(t=>{E(t);const e=structuredClone(t);return this._ccBase64ToBlobUrl(e),e});this.#r=e(t.music),this.#n=e(t.voice),this.#s=t.seed||0,this.#l=t.anchorDate||Date.now(),this.#c={...this.#c,...t.config||{}},this.#i=t.custom.map(t=>({...t,content:e([t.content])[0]})),this.#o=t.tasks.map(t=>"add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload?{...t,payload:e([t.payload])[0]}:t)}destroy(t=!0){this.#e||(t&&(this.#r.forEach(t=>w(t)),this.#n.forEach(t=>w(t)),this.#i.forEach(t=>w(t.content)),this.#o.forEach(t=>{"add"===t.action&&t.payload&&"object"==typeof t.payload&&"title"in t.payload&&w(t.payload)})),this.#r=[],this.#n=[],this.#i=[],this.#o=[],this.#a.clear(),this.emit("destroyed",{timestamp:Date.now()}),this.removeAllListeners(),this.#e=!0)}}const L=I}};const e={};function r(n){const i=e[n];if(void 0!==i)return i.exports;const o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{if(Array.isArray(e))for(var n=0;n<e.length;){var i=e[n++],o=e[n++];r.o(t,i)?0===o&&n++:0===o?Object.defineProperty(t,i,{enumerable:!0,value:e[n++]}):Object.defineProperty(t,i,{enumerable:!0,get:o})}else for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.cjs=t=>{const e={exports:{}};return t.call(e.exports,e,e.exports),e.exports};let n=r(294);window.TinyRadioFm=n.TinyRadioFm})();
|