ecplayer 1.0.3 → 1.0.4
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/dist/ecplayer.es.js +916 -1421
- package/dist/ecplayer.umd.js +45 -169
- package/dist/index.d.ts +2 -2
- package/package.json +3 -2
- package/dist/style.css +0 -1
package/dist/ecplayer.es.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ecp-full-width{width:100%}.ecp-h-full{height:100%}.ecp-relative{position:relative}.ecp-absolute{position:absolute}.ecp-inset-0{top:0;right:0;bottom:0;left:0}.ecp-z-10{z-index:10}.ecp-flex{display:flex}.ecp-inline-flex{display:inline-flex}.ecp-flex-col{flex-direction:column}.ecp-flex-wrap{flex-wrap:wrap}.ecp-flex-1{flex:1 1 0%}.ecp-flex-shrink-0{flex-shrink:0}.ecp-grid{display:grid}.ecp-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ecp-hidden{display:none}.ecp-items-center{align-items:center}.ecp-items-end{align-items:flex-end}.ecp-items-start{align-items:flex-start}.ecp-justify-center{justify-content:center}.ecp-justify-between{justify-content:space-between}.ecp-justify-end{justify-content:flex-end}.ecp-justify-start{justify-content:flex-start}.ecp-text-center{text-align:center}.ecp-text-right{text-align:right}.ecp-self-center{align-self:center}.ecp-gap-1{gap:.25rem}.ecp-gap-2{gap:.5rem}.ecp-gap-3{gap:.75rem}.ecp-gap-px{gap:1px}.ecp-gap-05{gap:2px}.ecp-mb-1{margin-bottom:.25rem}.ecp-mb-2{margin-bottom:.5rem}.ecp-mb-4{margin-bottom:1rem}.ecp-mb-6{margin-bottom:1.5rem}.ecp-mr-2{margin-right:.5rem}.ecp-mt-4{margin-top:1rem}.ecp-mt-6{margin-top:1.5rem}.ecp-ml-auto{margin-left:auto}.ecp-p-1{padding:.25rem}.ecp-p-1-5{padding:.375rem}.ecp-p-2{padding:.5rem}.ecp-p-3{padding:.75rem}.ecp-p-4{padding:1rem}.ecp-p-6{padding:1.5rem}.ecp-p-8{padding:2rem}.ecp-px-2{padding-left:.5rem;padding-right:.5rem}.ecp-px-3{padding-left:.75rem;padding-right:.75rem}.ecp-px-4{padding-left:1rem;padding-right:1rem}.ecp-px-6{padding-left:1.5rem;padding-right:1.5rem}.ecp-py-1{padding-top:.25rem;padding-bottom:.25rem}.ecp-py-2{padding-top:.5rem;padding-bottom:.5rem}.ecp-py-3{padding-top:.75rem;padding-bottom:.75rem}.ecp-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.ecp-pb-2{padding-bottom:.5rem}.ecp-pt-2{padding-top:.5rem}.ecp-w-1{width:.25rem}.ecp-w-3{width:.75rem}.ecp-w-4{width:1rem}.ecp-w-10{width:2.5rem}.ecp-w-12{width:3rem}.ecp-w-20{width:5rem}.ecp-w-24{width:6rem}.ecp-w-px{width:1px}.ecp-w-full{width:100%}.ecp-max-w-xs{max-width:20rem}.ecp-max-w-lg{max-width:32rem}.ecp-max-w-4xl{max-width:56rem}.ecp-h-0-5{height:.125rem}.ecp-h-1{height:.25rem}.ecp-h-1-5{height:.375rem}.ecp-h-2{height:.5rem}.ecp-h-3{height:.75rem}.ecp-h-4{height:1rem}.ecp-h-6{height:1.5rem}.ecp-h-8{height:2rem}.ecp-h-10{height:2.5rem}.ecp-h-12{height:3rem}.ecp-h-20{height:5rem}.ecp-h-40{width:10rem;height:40px}.ecp-h-64{height:16rem}.ecp-h-screen{height:100vh}.ecp-min-h-screen{min-height:100vh}.ecp-min-h-0{min-height:0}.ecp-min-w-12{min-width:3rem}.ecp-min-w-0{min-width:0}.ecp-aspect-square{aspect-ratio:1 / 1}.ecp-text-xs{font-size:.75rem;line-height:1rem}.ecp-text-sm{font-size:.875rem;line-height:1.25rem}.ecp-text-lg{font-size:1.125rem;line-height:1.75rem}.ecp-text-2xl{font-size:1.5rem;line-height:2rem}.ecp-font-medium{font-weight:500}.ecp-font-semibold{font-weight:600}.ecp-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-text-white{color:#fff}.ecp-text-transparent{color:transparent}.ecp-text-gray-400{color:#9ca3af}.ecp-text-gray-500{color:#6b7280}.ecp-text-gray-600{color:#4b5563}.ecp-text-gray-700{color:#374151}.ecp-text-gray-800{color:#1f2937}.ecp-text-gray-100{color:#f3f4f6}.ecp-text-gray-200{color:#e5e7eb}.ecp-text-gray-300{color:#d1d5db}.ecp-text-red-500{color:#ef4444}.ecp-dark .ecp-text-dark-100{color:#f3f4f6}.ecp-dark .ecp-text-dark-200{color:#e5e7eb}.ecp-dark .ecp-text-dark-300{color:#d1d5db}.ecp-bg-white{background-color:#fff}.ecp-bg-black-20{background-color:#0003}.ecp-bg-black-30{background-color:#0000004d}.ecp-bg-black-40{background-color:#0006}.ecp-bg-black-50{background-color:#00000080}.ecp-bg-gray-100{background-color:#f3f4f6}.ecp-bg-gray-200{background-color:#e5e7eb}.ecp-bg-gray-300{background-color:#d1d5db}.ecp-bg-gray-700{background-color:#374151}.ecp-bg-gray-800{background-color:#1f2937}.ecp-bg-red-50{background-color:#fef2f2}.ecp-bg-transparent{background-color:transparent}.ecp-border{border-width:1px}.ecp-border-2{border-width:2px}.ecp-border-r{border-right-width:1px}.ecp-border-transparent{border-color:transparent}.ecp-border-gray-300{border-color:#d1d5db}.ecp-border-red-300{border-color:#fca5a5}.ecp-border-current{border-color:currentColor}.ecp-border-none{border:none}.ecp-outline-none{outline:none}.ecp-rounded{border-radius:.25rem}.ecp-rounded-lg{border-radius:.5rem}.ecp-rounded-xl{border-radius:.75rem}.ecp-rounded-2xl{border-radius:1rem}.ecp-rounded-full{border-radius:9999px}.ecp-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ecp-shadow-sm{box-shadow:0 1px 2px #0000000d}.ecp-shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}.ecp-shadow-2xl{box-shadow:0 25px 50px -12px #00000040}.ecp-opacity-20{opacity:.2}.ecp-opacity-40{opacity:.4}.ecp-opacity-70{opacity:.7}.ecp-opacity-80{opacity:.8}.ecp-cursor-pointer{cursor:pointer}.ecp-cursor-not-allowed{cursor:not-allowed}.ecp-pointer-events-none{pointer-events:none}.ecp-transition{transition-property:color,background-color,border-color,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ecp-transition-all{transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-duration-75{transition-duration:75ms}.ecp-duration-100{transition-duration:.1s}.ecp-duration-150{transition-duration:.15s}.ecp-duration-300{transition-duration:.3s}.ecp-scale-0{transform:scale(0)}.ecp-translate-y-10{transform:translateY(2.5rem)}.ecp--translate-y-10{transform:translateY(-2.5rem)}.ecp-rotate-180{transform:rotate(180deg)}.ecp-hover-scale-105:hover{transform:scale(1.05)}.ecp-hover-scale-110:hover{transform:scale(1.1)}@keyframes ecp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ecp-animation-spin{animation:ecp-spin 15s infinite linear}.ecp-object-contain{-o-object-fit:contain;object-fit:contain}.ecp-backdrop-blur-xl{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-overflow-hidden{overflow:hidden}.ecp-top-0{top:0}.ecp-left-0{left:0}.ecp-fixed{position:fixed}.ecp-z-9999{z-index:9999}.ecp-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.ecp-page-wrapper{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}@media (min-width: 768px){.ecp-page-wrapper{padding:2rem}}.ecp-demo-container{width:100%;height:100%}@media (min-width: 768px){.ecp-demo-container{height:auto;max-width:56rem}}.ecp-container-glass{border-radius:.75rem;padding:2rem}.ecp-demo-header{margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:flex-start}.ecp-demo-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin-bottom:.25rem}.ecp-demo-title--dark{color:#e5e7eb}.ecp-demo-subtitle{font-size:.875rem;color:#6b7280}.ecp-theme-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-theme-btn:hover{background:#f9fafb}.ecp-demo-actions{margin-top:1.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-action-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1.5rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-action-btn:hover{background:#f9fafb}.ecp-file-input-hidden{display:none}.ecp-theme-selector-panel{border-radius:.75rem;padding:1.5rem;margin-bottom:1.5rem}.ecp-theme-selector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.ecp-theme-selector-title{font-size:1.125rem;font-weight:600;color:#1f2937}.ecp-theme-selector-close{color:#6b7280;font-size:.875rem;font-weight:500;background:none;border:none;cursor:pointer}.ecp-theme-selector-close:hover{color:#374151}.ecp-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}@media (min-width: 640px){.ecp-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 768px){.ecp-theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.ecp-theme-card{background:#fff;padding:1rem;border-radius:.5rem;cursor:pointer;border:2px solid transparent;transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-theme-card--active{border-color:currentColor;box-shadow:0 10px 15px -3px #0000001a}.ecp-theme-color-preview{height:2.5rem;border-radius:.25rem;margin-bottom:.5rem}.ecp-theme-name{font-size:.875rem;font-weight:500;color:#374151}.ecp-vp-wrapper{width:100%;border-radius:.75rem;overflow:hidden}.ecp-vp-bg{padding:1rem}.ecp-vp-vu-outer{position:relative}.ecp-vp-vu-bg{border-radius:.5rem;margin-bottom:1.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d}.ecp-vp-vu-bg--light{background:#ffffffb3}.ecp-vp-vu-bg--dark{background:#0006}.ecp-vp-vu-bg--dimmed{opacity:.3}.ecp-vp-vu-bg--no-margin{margin-bottom:0}.ecp-vp-vu-bars{display:flex;justify-content:center;align-items:flex-end;gap:.25rem;height:16rem}.ecp-vp-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-vp-eq-overlay--light{background:#fffc}.ecp-vp-eq-overlay--dark{background:#00000080}.ecp-vp-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-vp-eq-title--light{color:#374151}.ecp-vp-eq-title--dark{color:#e5e7eb}.ecp-vp-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-vp-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-vp-eq-band-label{font-size:.75rem}.ecp-vp-eq-band-label--light{color:#4b5563}.ecp-vp-eq-band-label--dark{color:#d1d5db}.ecp-vp-eq-band-range{display:flex;align-items:center;gap:.75rem}.ecp-vp-eq-range-bound{font-size:.75rem}.ecp-vp-eq-range-bound--light{color:#6b7280}.ecp-vp-eq-range-bound--dark{color:#9ca3af}.ecp-vp-eq-slider{flex:1;height:2rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-footer{display:flex;justify-content:flex-end;margin-top:1rem}.ecp-vp-eq-reset{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;transition:all .15s;border:none}.ecp-vp-eq-reset--light{background:#e5e7eb;color:#374151}.ecp-vp-eq-reset--light:hover{background:#d1d5db}.ecp-vp-eq-reset--dark{background:#374151;color:#e5e7eb}.ecp-vp-eq-reset--dark:hover{background:#4b5563}.ecp-vp-track{margin-bottom:1.5rem;display:flex;align-items:center}.ecp-vp-thumbnail-wrap{margin-right:.5rem;width:3rem;flex-shrink:0}.ecp-vp-thumbnail{height:3rem;width:3rem;border-radius:9999px}.ecp-vp-track-info{width:100%;min-width:0}.ecp-vp-track-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-vp-track-name--light{color:#374151}.ecp-vp-track-name--dark{color:#f3f4f6}.ecp-vp-track-author{font-size:.75rem}.ecp-vp-track-author--light{color:#6b7280}.ecp-vp-track-author--dark{color:#d1d5db}.ecp-vp-seekbar{margin-bottom:1.5rem}.ecp-vp-seekbar-row{display:flex;align-items:center;gap:.25rem}.ecp-vp-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-vp-time--right{text-align:right}.ecp-vp-time--light{color:#4b5563}.ecp-vp-time--dark{color:#f3f4f6}.ecp-vp-seek-input{flex:1;height:.5rem;background:#e5e7eb;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-seek-input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-vp-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-vp-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-vp-controls--sm{gap:.5rem}.ecp-vp-play-btn{padding:.5rem 1rem;min-width:6rem;border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s}.ecp-vp-play-btn:hover{opacity:.9}.ecp-vp-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-play-btn--compact{padding:1.25rem .75rem;min-width:unset}.ecp-vp-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-vp-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-stop-btn--light{background:#374151;color:#fff}.ecp-vp-stop-btn--light:hover{background:#1f2937}.ecp-vp-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-vp-stop-btn--dark:hover{background:#d1d5db}.ecp-vp-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-stop-btn--wide{padding:.5rem 1rem}.ecp-vp-eq-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-eq-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-eq-btn--off:hover{background:#d1d5db}.ecp-vp-eq-btn--on{color:#fff}.ecp-vp-eq-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-eq-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-loop-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-loop-btn--off:hover{background:#d1d5db}.ecp-vp-loop-btn--on{color:#fff}.ecp-vp-loop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-loop-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-icon--active{transform:rotate(180deg)}.ecp-vp-speed-wrap{display:flex;align-items:center}.ecp-vp-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;transition:all .15s;background:transparent}.ecp-vp-speed-select--light{color:#1f2937}.ecp-vp-speed-select--dark{color:#e5e7eb}.ecp-vp-speed-option--light{background:#fff;color:#1f2937}.ecp-vp-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-vp-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-vp-volume{gap:.75rem}}.ecp-vp-mute-btn{padding:.5rem;border-radius:9999px;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-vp-mute-btn:hover{background:#f3f4f680}.ecp-vp-mute-icon--light{color:#4b5563}.ecp-vp-mute-icon--dark{color:#f3f4f6}.ecp-vp-volume-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-vp-volume-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-vp-volume-slider{display:none}}.ecp-vp-volume-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-vp-volume-pct--light{color:#374151}.ecp-vp-volume-pct--dark{color:#f3f4f6}.ecp-vp-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-wave-outer{width:100%;max-width:32rem;position:relative}.ecp-wave-audio-el{display:none}.ecp-wave-card{border-radius:1rem;box-shadow:0 25px 50px -12px #00000040}.ecp-wave-card-inner{border-radius:1rem;padding:1.5rem;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-wave-thumbnail-wrap{width:100%;padding:1rem}.ecp-wave-thumbnail{width:100%;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-wave-seek{position:relative;height:5rem;margin-bottom:1.5rem;cursor:pointer}.ecp-wave-bars{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:center;height:100%;width:100%;gap:1px}.ecp-wave-bar{width:.25rem;border-radius:.25rem .25rem 0 0;transition:all .15s}.ecp-wave-progress-line{position:absolute;top:0;height:100%;width:.25rem;background:#fff;border-right:1px solid black;border-radius:9999px;transition:all .15s;transform:translate(-50%)}.ecp-wave-times{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:1.5rem}.ecp-wave-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;justify-content:space-between;margin-bottom:1rem}.ecp-wave-left-controls{display:flex;align-items:center;gap:.5rem}.ecp-wave-vol-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-vol-slider{width:5rem;height:.375rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 1px 3px #0003}.ecp-wave-vol-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;cursor:pointer;border:2px solid white}.ecp-wave-center-controls{display:flex;justify-content:center}.ecp-wave-play-btn{padding:1rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s;box-shadow:0 10px 15px -3px #0000001a}.ecp-wave-play-btn:hover{transform:scale(1.05)}.ecp-wave-right-controls{display:flex;align-items:center;gap:.75rem}.ecp-wave-speed-select{padding:.25rem .5rem;border-radius:.5rem;font-size:.875rem;border:none;cursor:pointer}.ecp-wave-speed-select--light{background:#f3f4f6;color:#374151}.ecp-wave-speed-select--dark{background:#1f2937;color:#f3f4f6}.ecp-wave-eq-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0003;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:1rem;padding:1rem}.ecp-wave-eq-panel{max-width:20rem;width:100%;padding:.5rem 1rem 1rem;border-radius:.75rem}.ecp-wave-eq-panel--light{background:#fff}.ecp-wave-eq-panel--dark{background:#1f2937}.ecp-wave-eq-title{font-size:1.125rem;font-weight:500;margin-bottom:.5rem}.ecp-wave-eq-title--light{color:#374151}.ecp-wave-eq-title--dark{color:#e5e7eb}.ecp-wave-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-wave-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-wave-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-wave-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-wave-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-wave-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-wave-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-wave-eq-slider{flex:1;height:1rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-wave-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-wave-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-wave-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-wave-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-wave-eq-footer-btn--light:hover{background:#d1d5db}.ecp-wave-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-wave-eq-footer-btn--dark:hover{background:#4b5563}.ecp-wave-error{padding:1.5rem;border-radius:.75rem;text-align:center}.ecp-wave-error-title{font-weight:500}.ecp-wave-error-msg{font-size:.875rem}.ecp-wave-error--light{color:#dc2626}.ecp-wave-error--dark{color:#fca5a5}.ecp-nano-wrapper{position:relative;overflow:hidden;display:inline-flex;flex-direction:column;padding:.5rem .75rem;box-shadow:0 10px 15px -3px #0000001a}.ecp-nano-wrapper--pill{border-radius:9999px;width:110px;height:40px}.ecp-nano-wrapper--card{border-radius:1rem;width:120px;height:150px}.ecp-nano-progress-bg{position:absolute;top:0;left:0;height:100%;opacity:.2}.ecp-nano-content{position:absolute;display:flex;flex-direction:column}.ecp-nano-thumbnail-wrap{width:6rem;padding-bottom:.5rem}.ecp-nano-thumbnail{width:6rem;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-nano-row{display:flex;align-items:center;gap:.5rem}.ecp-nano-play-btn{padding:.375rem;border-radius:9999px;border:none;cursor:pointer;flex-shrink:0;transition:transform .15s}.ecp-nano-play-btn:hover{transform:scale(1.1)}.ecp-nano-waveform{display:flex;width:100%;min-width:3rem;align-items:center;gap:2px;height:1.5rem}.ecp-nano-wave-bar{border-radius:9999px;width:100%;transition:height .2s}.ecp-video-wrapper{border-radius:.75rem;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-video-wrapper--fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;height:100vh;width:100vw;background:#000}.ecp-video-inner{height:auto}.ecp-video-inner--fullscreen{display:flex;flex-direction:column;flex:1}.ecp-video-inner--padded{padding:1rem}.ecp-video-name{margin-bottom:1rem;font-weight:500}.ecp-video-name--light{color:#374151}.ecp-video-name--dark{color:#f3f4f6}.ecp-video-layout{position:relative;margin-bottom:1rem}.ecp-video-layout--row{display:flex;gap:.75rem}.ecp-video-layout--col{display:flex;flex-direction:column;gap:.75rem}.ecp-video-layout--fullscreen{flex:1;min-height:0}.ecp-video-vu-top,.ecp-video-vu-bottom{width:100%;height:3rem}.ecp-video-vu-side{width:3rem;background:#00000080;border-radius:.5rem;padding:.25rem}.ecp-video-el-wrap{flex:1;border-radius:.5rem;overflow:hidden;position:relative}.ecp-video-el-wrap--light{background:#ffffffb3}.ecp-video-el-wrap--dark{background:#000000b3}.ecp-video-el{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ecp-video-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel{max-width:600px;width:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:center;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel--light{background:#fffc}.ecp-video-eq-panel--dark{background:#000000b3}.ecp-video-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-video-eq-title--light{color:#374151}.ecp-video-eq-title--dark{color:#e5e7eb}.ecp-video-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-video-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-video-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-video-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-video-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-video-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-video-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-video-eq-slider{flex:1;height:1.5rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-video-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-video-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-video-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-video-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-video-eq-footer-btn--light:hover{background:#d1d5db}.ecp-video-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-video-eq-footer-btn--dark:hover{background:#4b5563}.ecp-video-seekbar{margin-bottom:1rem}.ecp-video-seekbar--fullscreen{margin-top:.75rem}.ecp-video-seekbar-row{display:flex;align-items:center;gap:.75rem}.ecp-video-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-video-time--right{text-align:right}.ecp-video-time--light{color:#4b5563}.ecp-video-time--dark{color:#f3f4f6}.ecp-video-seek-input{flex:1;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-video-seek-input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-video-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-video-play-btn{border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s;padding:.5rem 1rem}.ecp-video-play-btn:hover{opacity:.9}.ecp-video-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-play-btn--compact{padding:1.25rem .75rem}.ecp-video-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-video-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-stop-btn--light{background:#374151;color:#fff}.ecp-video-stop-btn--light:hover{background:#1f2937}.ecp-video-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-video-stop-btn--dark:hover{background:#d1d5db}.ecp-video-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-fullscreen-btn{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s;padding:.75rem}.ecp-video-fullscreen-btn--light{background:#374151;color:#fff}.ecp-video-fullscreen-btn--light:hover{background:#1f2937}.ecp-video-fullscreen-btn--dark{background:#f3f4f6;color:#000}.ecp-video-fullscreen-btn--dark:hover{background:#d1d5db}.ecp-video-fullscreen-btn--wide{padding:.5rem 1rem}.ecp-video-eq-toggle-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-eq-toggle-btn--off{background:#f3f4f6;color:#374151}.ecp-video-eq-toggle-btn--off:hover{background:#d1d5db}.ecp-video-eq-toggle-btn--on{color:#fff}.ecp-video-eq-toggle-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-eq-toggle-btn--wide{padding:.5rem 1rem}.ecp-video-speed-wrap{display:flex;align-items:center}.ecp-video-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;background:transparent;transition:all .15s}.ecp-video-speed-select--light{color:#1f2937}.ecp-video-speed-select--dark{color:#e5e7eb}.ecp-video-speed-option--light{background:#f3f4f6;color:#1f2937}.ecp-video-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-video-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-video-volume{gap:.75rem}}.ecp-video-mute-btn{padding:.5rem;border-radius:.5rem;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-video-mute-btn:hover{background:#f3f4f6}.ecp-video-mute-icon--light{color:#4b5563}.ecp-video-mute-icon--dark{color:#f3f4f6}.ecp-video-vol-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-video-vol-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-video-vol-slider{display:none}}.ecp-video-vol-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-video-vol-pct--light{color:#374151}.ecp-video-vol-pct--dark{color:#f3f4f6}.ecp-video-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-vu-bar-wrap{flex:1;height:100%;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.ecp-vu-bar-fill{border-radius:.25rem .25rem 0 0;transition:height 75ms}.ecp-vu-peak-line{position:absolute;width:100%;height:2px;transition:top .1s}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
import { jsx as e, Fragment as Ve, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as Qe, createElement as Ie, useState as m, useRef as h, useEffect as $ } from "react";
|
|
3
4
|
/**
|
|
4
5
|
* @license lucide-react v0.540.0 - ISC
|
|
5
6
|
*
|
|
6
7
|
* This source code is licensed under the ISC license.
|
|
7
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
8
9
|
*/
|
|
9
|
-
const
|
|
10
|
+
const Ke = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xe = (s) => s.replace(
|
|
10
11
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
11
|
-
(
|
|
12
|
-
),
|
|
13
|
-
const
|
|
14
|
-
return
|
|
15
|
-
},
|
|
16
|
-
for (const
|
|
17
|
-
if (
|
|
12
|
+
(l, u, v) => v ? v.toUpperCase() : u.toLowerCase()
|
|
13
|
+
), We = (s) => {
|
|
14
|
+
const l = Xe(s);
|
|
15
|
+
return l.charAt(0).toUpperCase() + l.slice(1);
|
|
16
|
+
}, Ye = (...s) => s.filter((l, u, v) => !!l && l.trim() !== "" && v.indexOf(l) === u).join(" ").trim(), Ze = (s) => {
|
|
17
|
+
for (const l in s)
|
|
18
|
+
if (l.startsWith("aria-") || l === "role" || l === "title")
|
|
18
19
|
return !0;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
@@ -23,7 +24,7 @@ const We = (i) => i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Qe = (
|
|
|
23
24
|
* This source code is licensed under the ISC license.
|
|
24
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
26
|
*/
|
|
26
|
-
var
|
|
27
|
+
var Je = {
|
|
27
28
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28
29
|
width: 24,
|
|
29
30
|
height: 24,
|
|
@@ -40,32 +41,32 @@ var Ke = {
|
|
|
40
41
|
* This source code is licensed under the ISC license.
|
|
41
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
43
|
*/
|
|
43
|
-
const
|
|
44
|
+
const et = Qe(
|
|
44
45
|
({
|
|
45
|
-
color:
|
|
46
|
-
size:
|
|
47
|
-
strokeWidth:
|
|
48
|
-
absoluteStrokeWidth:
|
|
49
|
-
className:
|
|
50
|
-
children:
|
|
51
|
-
iconNode:
|
|
52
|
-
...
|
|
53
|
-
},
|
|
46
|
+
color: s = "currentColor",
|
|
47
|
+
size: l = 24,
|
|
48
|
+
strokeWidth: u = 2,
|
|
49
|
+
absoluteStrokeWidth: v,
|
|
50
|
+
className: C = "",
|
|
51
|
+
children: f,
|
|
52
|
+
iconNode: y,
|
|
53
|
+
...O
|
|
54
|
+
}, x) => Ie(
|
|
54
55
|
"svg",
|
|
55
56
|
{
|
|
56
|
-
ref:
|
|
57
|
-
...
|
|
58
|
-
width:
|
|
59
|
-
height:
|
|
60
|
-
stroke:
|
|
61
|
-
strokeWidth:
|
|
62
|
-
className:
|
|
63
|
-
...!
|
|
64
|
-
...
|
|
57
|
+
ref: x,
|
|
58
|
+
...Je,
|
|
59
|
+
width: l,
|
|
60
|
+
height: l,
|
|
61
|
+
stroke: s,
|
|
62
|
+
strokeWidth: v ? Number(u) * 24 / Number(l) : u,
|
|
63
|
+
className: Ye("lucide", C),
|
|
64
|
+
...!f && !Ze(O) && { "aria-hidden": "true" },
|
|
65
|
+
...O
|
|
65
66
|
},
|
|
66
67
|
[
|
|
67
|
-
...
|
|
68
|
-
...Array.isArray(
|
|
68
|
+
...y.map(([j, I]) => Ie(j, I)),
|
|
69
|
+
...Array.isArray(f) ? f : [f]
|
|
69
70
|
]
|
|
70
71
|
)
|
|
71
72
|
);
|
|
@@ -75,20 +76,20 @@ const Xe = Oe(
|
|
|
75
76
|
* This source code is licensed under the ISC license.
|
|
76
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
78
|
*/
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
({ className:
|
|
81
|
-
ref:
|
|
82
|
-
iconNode:
|
|
83
|
-
className:
|
|
84
|
-
`lucide-${We(
|
|
85
|
-
`lucide-${
|
|
86
|
-
|
|
79
|
+
const le = (s, l) => {
|
|
80
|
+
const u = Qe(
|
|
81
|
+
({ className: v, ...C }, f) => Ie(et, {
|
|
82
|
+
ref: f,
|
|
83
|
+
iconNode: l,
|
|
84
|
+
className: Ye(
|
|
85
|
+
`lucide-${Ke(We(s))}`,
|
|
86
|
+
`lucide-${s}`,
|
|
87
|
+
v
|
|
87
88
|
),
|
|
88
|
-
...
|
|
89
|
+
...C
|
|
89
90
|
})
|
|
90
91
|
);
|
|
91
|
-
return
|
|
92
|
+
return u.displayName = We(s), u;
|
|
92
93
|
};
|
|
93
94
|
/**
|
|
94
95
|
* @license lucide-react v0.540.0 - ISC
|
|
@@ -96,41 +97,41 @@ const ce = (i, c) => {
|
|
|
96
97
|
* This source code is licensed under the ISC license.
|
|
97
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
99
|
*/
|
|
99
|
-
const
|
|
100
|
+
const tt = [
|
|
100
101
|
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
101
102
|
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
102
103
|
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
103
104
|
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
104
|
-
],
|
|
105
|
+
], rt = le("maximize", tt);
|
|
105
106
|
/**
|
|
106
107
|
* @license lucide-react v0.540.0 - ISC
|
|
107
108
|
*
|
|
108
109
|
* This source code is licensed under the ISC license.
|
|
109
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
111
|
*/
|
|
111
|
-
const
|
|
112
|
+
const nt = [
|
|
112
113
|
["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
|
|
113
114
|
["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
|
|
114
115
|
["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
|
|
115
116
|
["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
|
|
116
|
-
],
|
|
117
|
+
], at = le("minimize", nt);
|
|
117
118
|
/**
|
|
118
119
|
* @license lucide-react v0.540.0 - ISC
|
|
119
120
|
*
|
|
120
121
|
* This source code is licensed under the ISC license.
|
|
121
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
123
|
*/
|
|
123
|
-
const
|
|
124
|
+
const ct = [
|
|
124
125
|
["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
|
|
125
126
|
["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
|
|
126
|
-
],
|
|
127
|
+
], Pe = le("pause", ct);
|
|
127
128
|
/**
|
|
128
129
|
* @license lucide-react v0.540.0 - ISC
|
|
129
130
|
*
|
|
130
131
|
* This source code is licensed under the ISC license.
|
|
131
132
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
133
|
*/
|
|
133
|
-
const
|
|
134
|
+
const st = [
|
|
134
135
|
[
|
|
135
136
|
"path",
|
|
136
137
|
{
|
|
@@ -138,26 +139,26 @@ const rt = [
|
|
|
138
139
|
key: "10ikf1"
|
|
139
140
|
}
|
|
140
141
|
]
|
|
141
|
-
],
|
|
142
|
+
], Me = le("play", st);
|
|
142
143
|
/**
|
|
143
144
|
* @license lucide-react v0.540.0 - ISC
|
|
144
145
|
*
|
|
145
146
|
* This source code is licensed under the ISC license.
|
|
146
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
148
|
*/
|
|
148
|
-
const
|
|
149
|
+
const it = [
|
|
149
150
|
["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
|
|
150
151
|
["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
|
|
151
152
|
["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
|
|
152
153
|
["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }]
|
|
153
|
-
],
|
|
154
|
+
], ot = le("repeat", it);
|
|
154
155
|
/**
|
|
155
156
|
* @license lucide-react v0.540.0 - ISC
|
|
156
157
|
*
|
|
157
158
|
* This source code is licensed under the ISC license.
|
|
158
159
|
* See the LICENSE file in the root directory of this source tree.
|
|
159
160
|
*/
|
|
160
|
-
const
|
|
161
|
+
const lt = [
|
|
161
162
|
["line", { x1: "4", x2: "4", y1: "21", y2: "14", key: "1p332r" }],
|
|
162
163
|
["line", { x1: "4", x2: "4", y1: "10", y2: "3", key: "gb41h5" }],
|
|
163
164
|
["line", { x1: "12", x2: "12", y1: "21", y2: "12", key: "hf2csr" }],
|
|
@@ -167,34 +168,34 @@ const st = [
|
|
|
167
168
|
["line", { x1: "2", x2: "6", y1: "14", y2: "14", key: "1uebub" }],
|
|
168
169
|
["line", { x1: "10", x2: "14", y1: "8", y2: "8", key: "1yglbp" }],
|
|
169
170
|
["line", { x1: "18", x2: "22", y1: "16", y2: "16", key: "1jxqpz" }]
|
|
170
|
-
],
|
|
171
|
+
], Fe = le("sliders-vertical", lt);
|
|
171
172
|
/**
|
|
172
173
|
* @license lucide-react v0.540.0 - ISC
|
|
173
174
|
*
|
|
174
175
|
* This source code is licensed under the ISC license.
|
|
175
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
177
|
*/
|
|
177
|
-
const
|
|
178
|
+
const dt = [
|
|
178
179
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
179
|
-
],
|
|
180
|
+
], Ge = le("square", dt);
|
|
180
181
|
/**
|
|
181
182
|
* @license lucide-react v0.540.0 - ISC
|
|
182
183
|
*
|
|
183
184
|
* This source code is licensed under the ISC license.
|
|
184
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
185
186
|
*/
|
|
186
|
-
const
|
|
187
|
+
const ut = [
|
|
187
188
|
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
188
189
|
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
189
190
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
190
|
-
],
|
|
191
|
+
], pt = le("upload", ut);
|
|
191
192
|
/**
|
|
192
193
|
* @license lucide-react v0.540.0 - ISC
|
|
193
194
|
*
|
|
194
195
|
* This source code is licensed under the ISC license.
|
|
195
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
197
|
*/
|
|
197
|
-
const
|
|
198
|
+
const mt = [
|
|
198
199
|
[
|
|
199
200
|
"path",
|
|
200
201
|
{
|
|
@@ -204,14 +205,14 @@ const ot = [
|
|
|
204
205
|
],
|
|
205
206
|
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
|
|
206
207
|
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
|
|
207
|
-
],
|
|
208
|
+
], De = le("volume-2", mt);
|
|
208
209
|
/**
|
|
209
210
|
* @license lucide-react v0.540.0 - ISC
|
|
210
211
|
*
|
|
211
212
|
* This source code is licensed under the ISC license.
|
|
212
213
|
* See the LICENSE file in the root directory of this source tree.
|
|
213
214
|
*/
|
|
214
|
-
const
|
|
215
|
+
const ft = [
|
|
215
216
|
[
|
|
216
217
|
"path",
|
|
217
218
|
{
|
|
@@ -221,7 +222,7 @@ const dt = [
|
|
|
221
222
|
],
|
|
222
223
|
["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
|
|
223
224
|
["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
|
|
224
|
-
],
|
|
225
|
+
], _e = le("volume-x", ft), ge = {
|
|
225
226
|
rainbow: {
|
|
226
227
|
name: "Rainbow",
|
|
227
228
|
bg: "linear-gradient(135deg, #ef444422 0%, #f9731622 15%, #f59e0b22 30%, #10b98122 45%, #06b6d422 60%, #3b82f622 75%, #6366f122 85%, #a855f722 92%, #ec489922 100%)",
|
|
@@ -321,46 +322,45 @@ const dt = [
|
|
|
321
322
|
slider: "#ec4899"
|
|
322
323
|
}
|
|
323
324
|
};
|
|
324
|
-
function
|
|
325
|
-
const
|
|
326
|
-
key:
|
|
327
|
-
name:
|
|
328
|
-
colors:
|
|
325
|
+
function vt({ theme: s, setTheme: l, close: u }) {
|
|
326
|
+
const v = Object.keys(ge).map((C) => ({
|
|
327
|
+
key: C,
|
|
328
|
+
name: ge[C].name,
|
|
329
|
+
colors: ge[C].bars
|
|
329
330
|
}));
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */ e("h2", { className: "
|
|
333
|
-
/* @__PURE__ */ e(
|
|
334
|
-
"button",
|
|
335
|
-
{
|
|
336
|
-
onClick: () => g(),
|
|
337
|
-
className: "text-gray-500 hover:text-gray-700 text-sm font-medium",
|
|
338
|
-
children: "Close"
|
|
339
|
-
}
|
|
340
|
-
)
|
|
331
|
+
return /* @__PURE__ */ c("div", { className: "ecp-theme-selector-panel", children: [
|
|
332
|
+
/* @__PURE__ */ c("div", { className: "ecp-theme-selector-header", children: [
|
|
333
|
+
/* @__PURE__ */ e("h2", { className: "ecp-theme-selector-title", children: "Choose Color Palette" }),
|
|
334
|
+
/* @__PURE__ */ e("button", { onClick: () => u(), className: "ecp-theme-selector-close", children: "Close" })
|
|
341
335
|
] }),
|
|
342
|
-
/* @__PURE__ */ e("div", { className: "theme-
|
|
336
|
+
/* @__PURE__ */ e("div", { className: "ecp-theme-grid", children: v.map((C) => /* @__PURE__ */ c(
|
|
343
337
|
"div",
|
|
344
338
|
{
|
|
345
|
-
className: `theme-card
|
|
346
|
-
onClick: () =>
|
|
339
|
+
className: `ecp-theme-card${s === C.key ? " ecp-theme-card--active" : ""}`,
|
|
340
|
+
onClick: () => l(C.key),
|
|
347
341
|
children: [
|
|
348
|
-
/* @__PURE__ */ e(
|
|
349
|
-
|
|
342
|
+
/* @__PURE__ */ e(
|
|
343
|
+
"div",
|
|
344
|
+
{
|
|
345
|
+
className: "ecp-theme-color-preview",
|
|
346
|
+
style: { background: `linear-gradient(to right, ${C.colors.join(", ")})` }
|
|
347
|
+
}
|
|
348
|
+
),
|
|
349
|
+
/* @__PURE__ */ e("div", { className: "ecp-theme-name", children: C.name })
|
|
350
350
|
]
|
|
351
351
|
},
|
|
352
|
-
|
|
352
|
+
C.key
|
|
353
353
|
)) })
|
|
354
354
|
] });
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
audio:
|
|
358
|
-
name:
|
|
359
|
-
author:
|
|
360
|
-
theme:
|
|
361
|
-
volume:
|
|
362
|
-
thumbnail:
|
|
363
|
-
controls:
|
|
356
|
+
function ht({
|
|
357
|
+
audio: s,
|
|
358
|
+
name: l = "No track loaded",
|
|
359
|
+
author: u,
|
|
360
|
+
theme: v = "rainbow",
|
|
361
|
+
volume: C = 100,
|
|
362
|
+
thumbnail: f = null,
|
|
363
|
+
controls: y = {
|
|
364
364
|
play: !0,
|
|
365
365
|
pause: !0,
|
|
366
366
|
stop: !0,
|
|
@@ -371,45 +371,39 @@ function gt({
|
|
|
371
371
|
equalizer: !0,
|
|
372
372
|
speed: !0
|
|
373
373
|
},
|
|
374
|
-
mode:
|
|
375
|
-
bands:
|
|
376
|
-
transparent:
|
|
377
|
-
autoPlay:
|
|
378
|
-
equalizer:
|
|
379
|
-
bass: 0,
|
|
380
|
-
mid: 0,
|
|
381
|
-
treble: 0
|
|
382
|
-
}
|
|
374
|
+
mode: O = "light",
|
|
375
|
+
bands: x = null,
|
|
376
|
+
transparent: j = !1,
|
|
377
|
+
autoPlay: I = !1,
|
|
378
|
+
equalizer: M = { bass: 0, mid: 0, treble: 0 }
|
|
383
379
|
}) {
|
|
384
|
-
const [
|
|
385
|
-
bass:
|
|
386
|
-
mid:
|
|
387
|
-
treble:
|
|
388
|
-
}), [ue,
|
|
389
|
-
|
|
390
|
-
const t =
|
|
380
|
+
const [L, H] = m(!1), [B, F] = m(0), [P, D] = m(0), [k, z] = m(C || 100), [ae, me] = m(!1), [V, ee] = m(!1), [se, ie] = m(!1), [ce, de] = m([]), [R, Q] = m(!1), [Y, oe] = m({
|
|
381
|
+
bass: M.bass || 0,
|
|
382
|
+
mid: M.mid || 0,
|
|
383
|
+
treble: M.treble || 0
|
|
384
|
+
}), [ue, te] = m(1), [G, w] = m(0), p = h(null), A = h(null), K = h(null), fe = h(null), W = h(null), re = h(null), X = h(null), N = h(null), T = h(null), Z = h(null);
|
|
385
|
+
$(() => {
|
|
386
|
+
const t = Z.current;
|
|
391
387
|
if (!t) return;
|
|
392
|
-
const
|
|
393
|
-
for (let
|
|
394
|
-
k(l.contentRect.width);
|
|
388
|
+
const a = new ResizeObserver((o) => {
|
|
389
|
+
for (let i of o) w(i.contentRect.width);
|
|
395
390
|
});
|
|
396
|
-
return
|
|
397
|
-
}, []),
|
|
391
|
+
return a.observe(t), () => a.disconnect();
|
|
392
|
+
}, []), $(() => {
|
|
398
393
|
const t = [];
|
|
399
|
-
if (
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
s in p || t.push(["ThemeError", `theme object missing key: ${s}`]);
|
|
394
|
+
if (s && typeof s != "string" && t.push(["TypeError", "audio must be a string (URL or path)"]), l && typeof l != "string" && t.push(["TypeError", "name must be a string"]), v && typeof v != "string" && typeof v != "object") t.push(["TypeError", "theme must be a string or a valid theme object"]);
|
|
395
|
+
else if (typeof v == "object") {
|
|
396
|
+
const a = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
|
|
397
|
+
for (const o of a)
|
|
398
|
+
o in v || t.push(["ThemeError", `theme object missing key: ${o}`]);
|
|
405
399
|
}
|
|
406
|
-
(typeof
|
|
407
|
-
|
|
408
|
-
}),
|
|
409
|
-
typeof
|
|
410
|
-
}) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (de(t), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), t.forEach((
|
|
411
|
-
}, [
|
|
412
|
-
const
|
|
400
|
+
(typeof C != "number" || C < 0 || C > 100) && t.push(["TypeError", "volume must be a number between 0 and 100"]), typeof y != "object" || Array.isArray(y) ? t.push(["TypeError", "controls must be an object"]) : ["play", "pause", "stop", "seekbar", "volume", "loop", "trackName", "equalizer"].forEach((o) => {
|
|
401
|
+
y && o in y && typeof y[o] != "boolean" && t.push(["TypeError", `controls.${o} must be a boolean`]);
|
|
402
|
+
}), x && (Array.isArray(x) ? x.length === 0 ? t.push(["ValueError", "bands array cannot be empty"]) : x.forEach((a, o) => {
|
|
403
|
+
typeof a.freq != "number" && t.push(["TypeError", `bands[${o}].freq must be a number`]);
|
|
404
|
+
}) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (de(t), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), t.forEach((a) => console.error(`${a[0]}: ${a[1]}`)), console.groupEnd()) : de([]);
|
|
405
|
+
}, [s, l, v, C, y, O, x]);
|
|
406
|
+
const r = x || [
|
|
413
407
|
{ freq: 0 },
|
|
414
408
|
{ freq: 10 },
|
|
415
409
|
{ freq: 20 },
|
|
@@ -441,636 +435,444 @@ function gt({
|
|
|
441
435
|
{ freq: 8e3 },
|
|
442
436
|
{ freq: 1e4 },
|
|
443
437
|
{ freq: 12500 }
|
|
444
|
-
], d =
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Q || (_(!1), $.current && cancelAnimationFrame($.current));
|
|
457
|
-
}, w = () => _(!0), L = () => _(!1);
|
|
458
|
-
return t.addEventListener("timeupdate", n), t.addEventListener("loadedmetadata", s), t.addEventListener("ended", l), t.addEventListener("play", w), t.addEventListener("pause", L), () => {
|
|
459
|
-
t.removeEventListener("timeupdate", n), t.removeEventListener("loadedmetadata", s), t.removeEventListener("ended", l), t.removeEventListener("play", w), t.removeEventListener("pause", L);
|
|
438
|
+
], d = h(r.map(() => 0)), g = h(r.map(() => 0)), S = h(r.map(() => 0)), _ = h(!1), J = h(typeof v == "string" ? v : "purple"), b = typeof v == "string" ? ge[v] || ge.purple : typeof v == "object" ? v : ge.purple, E = O === "dark", ke = typeof y == "object" && Object.keys(y).length === 0;
|
|
439
|
+
$(() => {
|
|
440
|
+
typeof v == "string" ? J.current = v : J.current = "purple", he();
|
|
441
|
+
}, [v]), $(() => {
|
|
442
|
+
p.current || (p.current = new Audio());
|
|
443
|
+
const t = p.current, a = () => {
|
|
444
|
+
se || F(t.currentTime);
|
|
445
|
+
}, o = () => D(t.duration), i = () => {
|
|
446
|
+
V || (H(!1), N.current && cancelAnimationFrame(N.current));
|
|
447
|
+
}, q = () => H(!0), U = () => H(!1);
|
|
448
|
+
return t.addEventListener("timeupdate", a), t.addEventListener("loadedmetadata", o), t.addEventListener("ended", i), t.addEventListener("play", q), t.addEventListener("pause", U), () => {
|
|
449
|
+
t.removeEventListener("timeupdate", a), t.removeEventListener("loadedmetadata", o), t.removeEventListener("ended", i), t.removeEventListener("play", q), t.removeEventListener("pause", U);
|
|
460
450
|
};
|
|
461
|
-
}, [se,
|
|
462
|
-
|
|
463
|
-
}, []),
|
|
464
|
-
if (
|
|
465
|
-
const t =
|
|
466
|
-
if (
|
|
451
|
+
}, [se, V]), $(() => () => {
|
|
452
|
+
p.current && (p.current.pause(), p.current.src = "", p.current.load()), A.current && A.current.close().catch((t) => console.warn("AudioContext cleanup error:", t)), N.current && cancelAnimationFrame(N.current);
|
|
453
|
+
}, []), $(() => {
|
|
454
|
+
if (s) {
|
|
455
|
+
const t = L, a = k, o = V;
|
|
456
|
+
if (N.current && (cancelAnimationFrame(N.current), N.current = null), fe.current) {
|
|
467
457
|
try {
|
|
468
|
-
|
|
469
|
-
} catch
|
|
470
|
-
console.warn("Source disconnect error:", W);
|
|
458
|
+
fe.current.disconnect();
|
|
459
|
+
} catch {
|
|
471
460
|
}
|
|
472
|
-
|
|
461
|
+
fe.current = null;
|
|
473
462
|
}
|
|
474
|
-
if (
|
|
463
|
+
if (K.current) {
|
|
475
464
|
try {
|
|
476
|
-
|
|
477
|
-
} catch
|
|
478
|
-
console.warn("Analyser disconnect error:", W);
|
|
465
|
+
K.current.disconnect();
|
|
466
|
+
} catch {
|
|
479
467
|
}
|
|
480
|
-
|
|
468
|
+
K.current = null;
|
|
481
469
|
}
|
|
482
|
-
if (
|
|
470
|
+
if (W.current) {
|
|
483
471
|
try {
|
|
484
|
-
|
|
485
|
-
} catch
|
|
486
|
-
console.warn("Bass filter disconnect error:", W);
|
|
472
|
+
W.current.disconnect();
|
|
473
|
+
} catch {
|
|
487
474
|
}
|
|
488
|
-
|
|
475
|
+
W.current = null;
|
|
489
476
|
}
|
|
490
|
-
if (
|
|
477
|
+
if (re.current) {
|
|
491
478
|
try {
|
|
492
|
-
|
|
493
|
-
} catch
|
|
494
|
-
console.warn("Mid filter disconnect error:", W);
|
|
479
|
+
re.current.disconnect();
|
|
480
|
+
} catch {
|
|
495
481
|
}
|
|
496
|
-
|
|
482
|
+
re.current = null;
|
|
497
483
|
}
|
|
498
|
-
if (
|
|
484
|
+
if (X.current) {
|
|
499
485
|
try {
|
|
500
|
-
|
|
501
|
-
} catch
|
|
502
|
-
console.warn("Treble filter disconnect error:", W);
|
|
486
|
+
X.current.disconnect();
|
|
487
|
+
} catch {
|
|
503
488
|
}
|
|
504
|
-
|
|
489
|
+
X.current = null;
|
|
505
490
|
}
|
|
506
|
-
A.current && (A.current.close().catch((
|
|
491
|
+
A.current && (A.current.close().catch((ne) => console.warn("AudioContext close error:", ne)), A.current = null), p.current && (p.current.pause(), p.current.src = "", p.current.load()), p.current = new Audio();
|
|
507
492
|
try {
|
|
508
|
-
|
|
509
|
-
} catch
|
|
510
|
-
console.debug("Could not set crossOrigin on audio element", W);
|
|
493
|
+
p.current.crossOrigin = "anonymous";
|
|
494
|
+
} catch {
|
|
511
495
|
}
|
|
512
|
-
|
|
513
|
-
const
|
|
514
|
-
se ||
|
|
515
|
-
},
|
|
516
|
-
N(
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
}, xe = () => _(!0), Ce = () => _(!1);
|
|
520
|
-
l.addEventListener("timeupdate", w), l.addEventListener("loadedmetadata", L), l.addEventListener("ended", ne), l.addEventListener("play", xe), l.addEventListener("pause", Ce), z(0), _(!1), console.debug("Audio element created", { src: u.current.src, volume: u.current.volume, loop: u.current.loop }), d.current = a.map(() => 0), b.current = a.map(() => 0), B.current = a.map(() => 0), pe(), t && u.current.play().catch((W) => console.error("Play failed:", W));
|
|
496
|
+
p.current.src = s, p.current.preload = "auto", p.current.muted = !1, p.current.volume = ae ? 0 : a / 100, p.current.loop = o, p.current.load();
|
|
497
|
+
const i = p.current, q = () => {
|
|
498
|
+
se || F(i.currentTime);
|
|
499
|
+
}, U = () => D(i.duration), pe = () => {
|
|
500
|
+
V || (H(!1), N.current && cancelAnimationFrame(N.current));
|
|
501
|
+
}, ye = () => H(!0), $e = () => H(!1);
|
|
502
|
+
i.addEventListener("timeupdate", q), i.addEventListener("loadedmetadata", U), i.addEventListener("ended", pe), i.addEventListener("play", ye), i.addEventListener("pause", $e), F(0), H(!1), d.current = r.map(() => 0), g.current = r.map(() => 0), S.current = r.map(() => 0), he(), t && p.current.play().catch((ne) => console.error("Play failed:", ne));
|
|
521
503
|
}
|
|
522
|
-
}, [
|
|
523
|
-
|
|
524
|
-
}, [
|
|
525
|
-
|
|
526
|
-
}, [
|
|
527
|
-
|
|
528
|
-
}, [ue]),
|
|
529
|
-
A.current && (
|
|
530
|
-
}, [
|
|
531
|
-
|
|
532
|
-
}, [
|
|
533
|
-
const
|
|
534
|
-
if (!A.current &&
|
|
504
|
+
}, [s]), $(() => {
|
|
505
|
+
p.current && (p.current.volume = ae ? 0 : k / 100);
|
|
506
|
+
}, [k, ae]), $(() => {
|
|
507
|
+
p.current && (p.current.loop = V);
|
|
508
|
+
}, [V]), $(() => {
|
|
509
|
+
p.current && (p.current.playbackRate = ue);
|
|
510
|
+
}, [ue]), $(() => {
|
|
511
|
+
A.current && (W.current && (W.current.gain.value = Y.bass), re.current && (re.current.gain.value = Y.mid), X.current && (X.current.gain.value = Y.treble));
|
|
512
|
+
}, [Y]), $(() => {
|
|
513
|
+
_.current = L, N.current && (cancelAnimationFrame(N.current), N.current = null), L ? (A.current || Ce(), Ne()) : ve();
|
|
514
|
+
}, [L]);
|
|
515
|
+
const Ce = () => {
|
|
516
|
+
if (!A.current && p.current)
|
|
535
517
|
try {
|
|
536
518
|
const t = window.AudioContext || window.webkitAudioContext;
|
|
537
519
|
if (t) {
|
|
538
|
-
const
|
|
539
|
-
A.current =
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
|
|
520
|
+
const a = new t();
|
|
521
|
+
A.current = a;
|
|
522
|
+
const o = a.createBiquadFilter();
|
|
523
|
+
o.type = "lowshelf", o.frequency.value = 320, o.gain.value = Y.bass;
|
|
524
|
+
const i = a.createBiquadFilter();
|
|
525
|
+
i.type = "peaking", i.frequency.value = 1e3, i.Q.value = 0.5, i.gain.value = Y.mid;
|
|
526
|
+
const q = a.createBiquadFilter();
|
|
527
|
+
q.type = "highshelf", q.frequency.value = 3200, q.gain.value = Y.treble;
|
|
528
|
+
const U = a.createAnalyser();
|
|
529
|
+
U.fftSize = 8192, U.smoothingTimeConstant = 0.7;
|
|
530
|
+
const pe = a.createMediaElementSource(p.current);
|
|
531
|
+
pe.connect(o), o.connect(i), i.connect(q), q.connect(U), U.connect(a.destination), W.current = o, re.current = i, X.current = q, K.current = U, fe.current = pe;
|
|
550
532
|
}
|
|
551
533
|
} catch (t) {
|
|
552
534
|
console.error("Failed to setup audio context:", t);
|
|
553
535
|
}
|
|
554
536
|
}, we = (t) => {
|
|
555
|
-
const
|
|
556
|
-
if (!
|
|
557
|
-
const
|
|
558
|
-
return Math.min(
|
|
559
|
-
},
|
|
560
|
-
if (
|
|
561
|
-
d.current = d.current.map((
|
|
537
|
+
const a = A.current, o = K.current;
|
|
538
|
+
if (!a || !o) return 0;
|
|
539
|
+
const i = a.sampleRate / 2, q = Math.round(t / i * o.frequencyBinCount);
|
|
540
|
+
return Math.min(q, o.frequencyBinCount - 1);
|
|
541
|
+
}, ve = () => {
|
|
542
|
+
if (_.current) return;
|
|
543
|
+
d.current = d.current.map((i) => i * 0.7);
|
|
562
544
|
const t = Date.now();
|
|
563
|
-
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
},
|
|
567
|
-
if (!
|
|
568
|
-
const t =
|
|
569
|
-
|
|
570
|
-
const
|
|
571
|
-
let
|
|
572
|
-
for (let
|
|
573
|
-
|
|
574
|
-
let
|
|
575
|
-
|
|
576
|
-
const
|
|
577
|
-
d.current[
|
|
578
|
-
}),
|
|
579
|
-
},
|
|
580
|
-
if (!
|
|
581
|
-
const t =
|
|
582
|
-
let
|
|
583
|
-
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
<div class="
|
|
587
|
-
<div class="
|
|
588
|
-
${
|
|
545
|
+
g.current = g.current.map((i, q) => t - S.current[q] > 1500 ? i * 0.95 : i), he();
|
|
546
|
+
const a = Math.max(...d.current), o = Math.max(...g.current);
|
|
547
|
+
a > 0.01 || o > 0.01 ? N.current = requestAnimationFrame(ve) : (_.current || (d.current = r.map(() => 0), g.current = r.map(() => 0), S.current = r.map(() => 0), he()), N.current && cancelAnimationFrame(N.current), N.current = null);
|
|
548
|
+
}, Ne = () => {
|
|
549
|
+
if (!K.current || !_.current) return;
|
|
550
|
+
const t = K.current.frequencyBinCount, a = new Uint8Array(t);
|
|
551
|
+
K.current.getByteFrequencyData(a), r.forEach((o, i) => {
|
|
552
|
+
const q = we(o.freq), U = i < r.length - 1 ? we(r[i + 1].freq) : a.length;
|
|
553
|
+
let pe = 0, ye = 0;
|
|
554
|
+
for (let He = q; He < U; He++)
|
|
555
|
+
pe += a[He], ye++;
|
|
556
|
+
let $e = ye > 0 ? pe / ye / 255 : 0;
|
|
557
|
+
$e = Math.pow($e, 0.6), d.current[i] = d.current[i] * 0.8 + $e * 0.2;
|
|
558
|
+
const ne = Date.now();
|
|
559
|
+
d.current[i] > g.current[i] ? (g.current[i] = d.current[i], S.current[i] = ne) : ne - S.current[i] > 1500 && (g.current[i] *= 0.95);
|
|
560
|
+
}), he(), N.current = requestAnimationFrame(Ne);
|
|
561
|
+
}, he = () => {
|
|
562
|
+
if (!T.current) return;
|
|
563
|
+
const t = ge[J.current] || ge.rainbow;
|
|
564
|
+
let a = "";
|
|
565
|
+
r.forEach((o, i) => {
|
|
566
|
+
const q = d.current[i] * 100, U = 100 - g.current[i] * 100, pe = Math.floor(i / r.length * t.bars.length), ye = t.bars[Math.min(pe, t.bars.length - 1)];
|
|
567
|
+
a += `
|
|
568
|
+
<div class="ecp-vu-bar-wrap">
|
|
569
|
+
<div class="ecp-vu-bar-fill" style="height: ${q}%; background: ${ye};">
|
|
570
|
+
${g.current[i] > 0.1 ? `<div class="ecp-vu-peak-line" style="top: ${U}%; background: ${t.peak};"></div>` : ""}
|
|
589
571
|
</div>
|
|
590
572
|
</div>
|
|
591
573
|
`;
|
|
592
|
-
}),
|
|
574
|
+
}), T.current.innerHTML = a;
|
|
575
|
+
}, xe = () => {
|
|
576
|
+
!p.current || !s || (L ? p.current.pause() : (A.current && A.current.state === "suspended" && A.current.resume(), p.current.play().catch((t) => console.error("Play failed:", t))));
|
|
593
577
|
}, Ee = () => {
|
|
594
|
-
|
|
595
|
-
}, Te = () => {
|
|
596
|
-
u.current && (u.current.pause(), u.current.currentTime = 0, _(!1), z(0), d.current = a.map(() => 0), b.current = a.map(() => 0), B.current = a.map(() => 0), pe());
|
|
578
|
+
p.current && (p.current.pause(), p.current.currentTime = 0, H(!1), F(0), d.current = r.map(() => 0), g.current = r.map(() => 0), S.current = r.map(() => 0), he());
|
|
597
579
|
}, Le = (t) => {
|
|
598
|
-
const
|
|
599
|
-
|
|
600
|
-
},
|
|
601
|
-
|
|
602
|
-
},
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
ee(parseFloat(t.target.value));
|
|
611
|
-
}, Se = () => {
|
|
612
|
-
G(!Q);
|
|
613
|
-
}, ve = (t, n) => {
|
|
614
|
-
ie((s) => ({
|
|
615
|
-
...s,
|
|
616
|
-
[t]: n
|
|
617
|
-
}));
|
|
618
|
-
}, ye = () => {
|
|
619
|
-
ie({ bass: 0, mid: 0, treble: 0 });
|
|
620
|
-
};
|
|
621
|
-
C(() => {
|
|
622
|
-
((typeof x == "object" && Object.keys(x).length === 0 || !x) && !M || U) && Ee();
|
|
623
|
-
}, [x]);
|
|
624
|
-
const $e = (t) => {
|
|
580
|
+
const o = parseFloat(t.target.value) / 100 * P;
|
|
581
|
+
F(o), p.current && !se && (p.current.currentTime = o);
|
|
582
|
+
}, Ae = () => ie(!0), Re = () => {
|
|
583
|
+
p.current && (p.current.currentTime = B), ie(!1);
|
|
584
|
+
}, ze = (t) => {
|
|
585
|
+
const a = parseInt(t.target.value);
|
|
586
|
+
z(a), me(a === 0);
|
|
587
|
+
}, Se = () => me(!ae), Be = (t) => te(parseFloat(t.target.value)), je = () => ee(!V), Te = (t, a) => oe((o) => ({ ...o, [t]: a })), be = () => oe({ bass: 0, mid: 0, treble: 0 });
|
|
588
|
+
$(() => {
|
|
589
|
+
((typeof y == "object" && Object.keys(y).length === 0 || !y) && !L || I) && xe();
|
|
590
|
+
}, [y]);
|
|
591
|
+
const qe = (t) => {
|
|
625
592
|
if (isNaN(t)) return "0:00";
|
|
626
|
-
const
|
|
627
|
-
return `${
|
|
593
|
+
const a = Math.floor(t / 60), o = Math.floor(t % 60);
|
|
594
|
+
return `${a}:${o.toString().padStart(2, "0")}`;
|
|
628
595
|
};
|
|
629
|
-
|
|
630
|
-
/* @__PURE__ */
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
]
|
|
649
|
-
|
|
650
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
651
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
652
|
-
/* @__PURE__ */ e(
|
|
653
|
-
"input",
|
|
654
|
-
{
|
|
655
|
-
type: "range",
|
|
656
|
-
min: "-20",
|
|
657
|
-
max: "20",
|
|
658
|
-
value: j.bass,
|
|
659
|
-
onChange: (t) => ve("bass", parseInt(t.target.value)),
|
|
660
|
-
className: "flex-1 h-8 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
661
|
-
style: {
|
|
662
|
-
background: `linear-gradient(to right, ${o.slider} ${(j.bass + 20) / 40 * 100}%, ${o.slider + "30"} ${(j.bass + 20) / 40 * 100}%)`
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
),
|
|
666
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
667
|
-
] })
|
|
668
|
-
] }),
|
|
669
|
-
/* @__PURE__ */ r("div", { children: [
|
|
670
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
671
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
|
|
672
|
-
/* @__PURE__ */ r("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
673
|
-
j.mid,
|
|
674
|
-
" dB"
|
|
675
|
-
] })
|
|
676
|
-
] }),
|
|
677
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
678
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
679
|
-
/* @__PURE__ */ e(
|
|
680
|
-
"input",
|
|
681
|
-
{
|
|
682
|
-
type: "range",
|
|
683
|
-
min: "-20",
|
|
684
|
-
max: "20",
|
|
685
|
-
value: j.mid,
|
|
686
|
-
onChange: (t) => ve("mid", parseInt(t.target.value)),
|
|
687
|
-
className: "flex-1 h-8 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
688
|
-
style: {
|
|
689
|
-
background: `linear-gradient(to right, ${o.slider} ${(j.mid + 20) / 40 * 100}%, ${o.slider + "30"} ${(j.mid + 20) / 40 * 100}%)`
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
),
|
|
693
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
596
|
+
if (ce && ce.length > 0)
|
|
597
|
+
return /* @__PURE__ */ e(Ve, { children: ce.map((t, a) => /* @__PURE__ */ c("div", { className: "ecp-vp-error", children: [
|
|
598
|
+
/* @__PURE__ */ c("strong", { children: [
|
|
599
|
+
t[0],
|
|
600
|
+
":"
|
|
601
|
+
] }),
|
|
602
|
+
" ",
|
|
603
|
+
t[1]
|
|
604
|
+
] }, a)) });
|
|
605
|
+
const Ue = ke || j ? void 0 : E ? "#6060606a" : "#ffffffab", Oe = ke || j ? void 0 : b.bg;
|
|
606
|
+
return /* @__PURE__ */ e("div", { ref: Z, className: "ecp-vp-wrapper", style: { backgroundColor: Ue }, children: /* @__PURE__ */ c("div", { className: "ecp-vp-bg", style: { background: Oe }, children: [
|
|
607
|
+
/* @__PURE__ */ c("div", { className: "ecp-vp-vu-outer", children: [
|
|
608
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-vu-bg${E ? " ecp-vp-vu-bg--dark" : " ecp-vp-vu-bg--light"}${R && j ? " ecp-vp-vu-bg--dimmed" : ""}${ke ? " ecp-vp-vu-bg--no-margin" : ""}`, children: /* @__PURE__ */ e("div", { className: "ecp-vp-vu-bars", ref: T }) }),
|
|
609
|
+
R && /* @__PURE__ */ c("div", { className: `ecp-vp-eq-overlay${E ? " ecp-vp-eq-overlay--dark" : " ecp-vp-eq-overlay--light"}`, children: [
|
|
610
|
+
/* @__PURE__ */ e("h3", { className: `ecp-vp-eq-title${E ? " ecp-vp-eq-title--dark" : " ecp-vp-eq-title--light"}`, children: "Equalizer" }),
|
|
611
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bands", children: ["bass", "mid", "treble"].map((t) => /* @__PURE__ */ c("div", { className: "ecp-vp-eq-band", children: [
|
|
612
|
+
/* @__PURE__ */ c("div", { className: "ecp-vp-eq-band-header", children: [
|
|
613
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-band-label${E ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: t.charAt(0).toUpperCase() + t.slice(1) }),
|
|
614
|
+
/* @__PURE__ */ c("span", { className: `ecp-vp-eq-band-label${E ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: [
|
|
615
|
+
Y[t],
|
|
616
|
+
" dB"
|
|
694
617
|
] })
|
|
695
618
|
] }),
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
"
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
max: "20",
|
|
712
|
-
value: j.treble,
|
|
713
|
-
onChange: (t) => ve("treble", parseInt(t.target.value)),
|
|
714
|
-
className: "flex-1 h-8 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
715
|
-
style: {
|
|
716
|
-
background: `linear-gradient(to right, ${o.slider} ${(j.treble + 20) / 40 * 100}%, ${o.slider + "30"} ${(j.treble + 20) / 40 * 100}%)`
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
),
|
|
720
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
721
|
-
] })
|
|
619
|
+
/* @__PURE__ */ c("div", { className: "ecp-vp-eq-band-range", children: [
|
|
620
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${E ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "-20" }),
|
|
621
|
+
/* @__PURE__ */ e(
|
|
622
|
+
"input",
|
|
623
|
+
{
|
|
624
|
+
type: "range",
|
|
625
|
+
min: "-20",
|
|
626
|
+
max: "20",
|
|
627
|
+
value: Y[t],
|
|
628
|
+
onChange: (a) => Te(t, parseInt(a.target.value)),
|
|
629
|
+
className: "ecp-vp-eq-slider",
|
|
630
|
+
style: { background: `linear-gradient(to right, ${b.slider} ${(Y[t] + 20) / 40 * 100}%, ${b.slider + "30"} ${(Y[t] + 20) / 40 * 100}%)` }
|
|
631
|
+
}
|
|
632
|
+
),
|
|
633
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${E ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "+20" })
|
|
722
634
|
] })
|
|
723
|
-
] }),
|
|
724
|
-
/* @__PURE__ */ e("div", { className: "
|
|
725
|
-
"button",
|
|
726
|
-
{
|
|
727
|
-
onClick: ye,
|
|
728
|
-
className: `px-3 py-1 rounded text-xs ${h ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
729
|
-
children: "Reset"
|
|
730
|
-
}
|
|
731
|
-
) })
|
|
635
|
+
] }, t)) }),
|
|
636
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick: be, className: `ecp-vp-eq-reset${E ? " ecp-vp-eq-reset--dark" : " ecp-vp-eq-reset--light"}`, children: "Reset" }) })
|
|
732
637
|
] })
|
|
733
638
|
] }),
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */ e("div", { className:
|
|
738
|
-
|
|
639
|
+
y.trackName && /* @__PURE__ */ c("div", { className: "ecp-vp-track", children: [
|
|
640
|
+
f && /* @__PURE__ */ e("div", { className: "ecp-vp-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: f, alt: "", className: `ecp-vp-thumbnail${L ? " ecp-animation-spin" : ""}` }) }),
|
|
641
|
+
/* @__PURE__ */ c("div", { className: "ecp-vp-track-info", children: [
|
|
642
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-track-name${E ? " ecp-vp-track-name--dark" : " ecp-vp-track-name--light"}`, children: l }),
|
|
643
|
+
u && typeof u == "string" && /* @__PURE__ */ e("div", { className: `ecp-vp-track-author${E ? " ecp-vp-track-author--dark" : " ecp-vp-track-author--light"}`, children: u })
|
|
739
644
|
] })
|
|
740
645
|
] }),
|
|
741
|
-
|
|
742
|
-
/* @__PURE__ */ e("span", { className: `
|
|
646
|
+
y.seekbar && /* @__PURE__ */ e("div", { className: "ecp-vp-seekbar", children: /* @__PURE__ */ c("div", { className: "ecp-vp-seekbar-row", children: [
|
|
647
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-time${E ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: qe(B) }),
|
|
743
648
|
/* @__PURE__ */ e(
|
|
744
649
|
"input",
|
|
745
650
|
{
|
|
746
651
|
type: "range",
|
|
747
652
|
min: "0",
|
|
748
653
|
max: "100",
|
|
749
|
-
value:
|
|
654
|
+
value: P > 0 ? B / P * 100 : 0,
|
|
750
655
|
onChange: Le,
|
|
751
|
-
onMouseDown:
|
|
752
|
-
onMouseUp:
|
|
753
|
-
onTouchStart:
|
|
754
|
-
onTouchEnd:
|
|
755
|
-
disabled: !
|
|
756
|
-
className: "
|
|
656
|
+
onMouseDown: Ae,
|
|
657
|
+
onMouseUp: Re,
|
|
658
|
+
onTouchStart: Ae,
|
|
659
|
+
onTouchEnd: Re,
|
|
660
|
+
disabled: !s,
|
|
661
|
+
className: "ecp-vp-seek-input",
|
|
757
662
|
style: {
|
|
758
|
-
background:
|
|
663
|
+
background: s && P > 0 ? `linear-gradient(to right, ${b.slider} ${B / P * 100}%, ${b.slider + "30"} ${B / P * 100}%)` : b.slider + "30",
|
|
664
|
+
"--thumb-color": b.slider
|
|
759
665
|
}
|
|
760
666
|
}
|
|
761
667
|
),
|
|
762
|
-
/* @__PURE__ */ e("span", { className: `
|
|
668
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-time ecp-vp-time--right${E ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: qe(P) })
|
|
763
669
|
] }) }),
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
|
|
670
|
+
/* @__PURE__ */ c("div", { className: `ecp-vp-controls${G < 330 ? " ecp-vp-controls--sm" : ""}`, children: [
|
|
671
|
+
y.play && /* @__PURE__ */ c(
|
|
766
672
|
"button",
|
|
767
673
|
{
|
|
768
|
-
onClick:
|
|
769
|
-
disabled: !
|
|
770
|
-
className:
|
|
771
|
-
style: { backgroundColor:
|
|
674
|
+
onClick: xe,
|
|
675
|
+
disabled: !s,
|
|
676
|
+
className: `ecp-vp-play-btn${G < 350 ? " ecp-vp-play-btn--compact" : ""}`,
|
|
677
|
+
style: { backgroundColor: b.button },
|
|
772
678
|
children: [
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */ e(
|
|
775
|
-
/* @__PURE__ */ e(
|
|
679
|
+
/* @__PURE__ */ c("div", { className: "ecp-vp-play-icon-wrap", children: [
|
|
680
|
+
/* @__PURE__ */ e(Pe, { size: 16, style: { position: "absolute", transform: L ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
|
|
681
|
+
/* @__PURE__ */ e(Me, { size: 16, style: { position: "absolute", transform: L ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
|
|
776
682
|
] }),
|
|
777
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
683
|
+
/* @__PURE__ */ e("span", { style: { display: G < 350 ? "none" : "block" }, children: L ? "Pause" : "Play" })
|
|
778
684
|
]
|
|
779
685
|
}
|
|
780
686
|
),
|
|
781
|
-
|
|
687
|
+
y.stop && /* @__PURE__ */ c(
|
|
782
688
|
"button",
|
|
783
689
|
{
|
|
784
|
-
onClick:
|
|
785
|
-
disabled: !
|
|
786
|
-
className:
|
|
690
|
+
onClick: Ee,
|
|
691
|
+
disabled: !s,
|
|
692
|
+
className: `ecp-vp-stop-btn${E ? " ecp-vp-stop-btn--dark" : " ecp-vp-stop-btn--light"}${G >= 600 ? " ecp-vp-stop-btn--wide" : ""}`,
|
|
787
693
|
children: [
|
|
788
|
-
/* @__PURE__ */ e(
|
|
789
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
694
|
+
/* @__PURE__ */ e(Ge, { size: 16 }),
|
|
695
|
+
/* @__PURE__ */ e("span", { style: { display: G < 600 ? "none" : "block" }, children: "Stop" })
|
|
790
696
|
]
|
|
791
697
|
}
|
|
792
698
|
),
|
|
793
|
-
|
|
699
|
+
y.equalizer && /* @__PURE__ */ c(
|
|
794
700
|
"button",
|
|
795
701
|
{
|
|
796
|
-
onClick: () =>
|
|
797
|
-
disabled: !
|
|
798
|
-
className:
|
|
799
|
-
style: R ? { backgroundColor:
|
|
702
|
+
onClick: () => Q(!R),
|
|
703
|
+
disabled: !s,
|
|
704
|
+
className: `ecp-vp-eq-btn${R ? " ecp-vp-eq-btn--on" : " ecp-vp-eq-btn--off"}${G >= 600 ? " ecp-vp-eq-btn--wide" : ""}`,
|
|
705
|
+
style: R ? { backgroundColor: b.button } : {},
|
|
800
706
|
children: [
|
|
801
|
-
/* @__PURE__ */ e(
|
|
802
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
707
|
+
/* @__PURE__ */ e(Fe, { size: 16 }),
|
|
708
|
+
/* @__PURE__ */ e("span", { style: { display: G < 600 ? "none" : "block" }, children: "EQ" })
|
|
803
709
|
]
|
|
804
710
|
}
|
|
805
711
|
),
|
|
806
|
-
|
|
712
|
+
y.loop && /* @__PURE__ */ c(
|
|
807
713
|
"button",
|
|
808
714
|
{
|
|
809
|
-
onClick:
|
|
810
|
-
disabled: !
|
|
811
|
-
className:
|
|
812
|
-
style:
|
|
715
|
+
onClick: je,
|
|
716
|
+
disabled: !s,
|
|
717
|
+
className: `ecp-vp-loop-btn${V ? " ecp-vp-loop-btn--on" : " ecp-vp-loop-btn--off"}${G >= 700 ? " ecp-vp-loop-btn--wide" : ""}`,
|
|
718
|
+
style: V ? { backgroundColor: b.button } : {},
|
|
813
719
|
children: [
|
|
814
|
-
/* @__PURE__ */ e(
|
|
815
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
720
|
+
/* @__PURE__ */ e(ot, { size: 16, className: V ? "ecp-vp-loop-icon--active" : "" }),
|
|
721
|
+
/* @__PURE__ */ e("span", { style: { display: G < 700 ? "none" : "block" }, children: "Loop" })
|
|
816
722
|
]
|
|
817
723
|
}
|
|
818
724
|
),
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
children: [
|
|
826
|
-
/* @__PURE__ */ e("option", { value: "0.5", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.5x" }),
|
|
827
|
-
/* @__PURE__ */ e("option", { value: "0.75", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.75x" }),
|
|
828
|
-
/* @__PURE__ */ e("option", { value: "1", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1x" }),
|
|
829
|
-
/* @__PURE__ */ e("option", { value: "1.25", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.25x" }),
|
|
830
|
-
/* @__PURE__ */ e("option", { value: "1.5", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.5x" }),
|
|
831
|
-
/* @__PURE__ */ e("option", { value: "2", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "2x" })
|
|
832
|
-
]
|
|
833
|
-
}
|
|
834
|
-
) }),
|
|
835
|
-
x.volume && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 md:gap-3 ml-auto", children: [
|
|
836
|
-
/* @__PURE__ */ e(
|
|
837
|
-
"button",
|
|
838
|
-
{
|
|
839
|
-
onClick: ze,
|
|
840
|
-
className: "p-2 rounded-full hover:bg-gray-100/50 transition-all",
|
|
841
|
-
children: ae || E === 0 ? /* @__PURE__ */ e(De, { size: 20, className: h ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e(He, { size: 20, className: h ? "text-gray-100" : "text-gray-600" })
|
|
842
|
-
}
|
|
843
|
-
),
|
|
725
|
+
y.speed && /* @__PURE__ */ e("div", { className: "ecp-vp-speed-wrap", children: /* @__PURE__ */ e("select", { value: ue, onChange: Be, className: `ecp-vp-speed-select${E ? " ecp-vp-speed-select--dark" : " ecp-vp-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((t) => /* @__PURE__ */ c("option", { value: t, className: E ? "ecp-vp-speed-option--dark" : "ecp-vp-speed-option--light", children: [
|
|
726
|
+
t,
|
|
727
|
+
"x"
|
|
728
|
+
] }, t)) }) }),
|
|
729
|
+
y.volume && /* @__PURE__ */ c("div", { className: "ecp-vp-volume", children: [
|
|
730
|
+
/* @__PURE__ */ e("button", { onClick: Se, className: "ecp-vp-mute-btn", children: ae || k === 0 ? /* @__PURE__ */ e(_e, { size: 20, className: E ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) : /* @__PURE__ */ e(De, { size: 20, className: E ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) }),
|
|
844
731
|
/* @__PURE__ */ e(
|
|
845
732
|
"input",
|
|
846
733
|
{
|
|
847
734
|
type: "range",
|
|
848
735
|
min: "0",
|
|
849
736
|
max: "100",
|
|
850
|
-
value:
|
|
851
|
-
onChange:
|
|
852
|
-
className: "
|
|
737
|
+
value: k,
|
|
738
|
+
onChange: ze,
|
|
739
|
+
className: "ecp-vp-volume-slider",
|
|
853
740
|
style: {
|
|
854
|
-
background: `linear-gradient(to right, ${
|
|
855
|
-
display:
|
|
741
|
+
background: `linear-gradient(to right, ${b.slider} ${k}%, ${b.slider + "30"} ${k}%)`,
|
|
742
|
+
display: G < 460 ? "none" : "block"
|
|
856
743
|
}
|
|
857
744
|
}
|
|
858
745
|
),
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
746
|
+
/* @__PURE__ */ c(
|
|
747
|
+
"span",
|
|
748
|
+
{
|
|
749
|
+
className: `ecp-vp-volume-pct${E ? " ecp-vp-volume-pct--dark" : " ecp-vp-volume-pct--light"}`,
|
|
750
|
+
style: { display: G < 800 ? "none" : "block" },
|
|
751
|
+
children: [
|
|
752
|
+
k,
|
|
753
|
+
"%"
|
|
754
|
+
]
|
|
755
|
+
}
|
|
756
|
+
)
|
|
863
757
|
] })
|
|
864
|
-
] })
|
|
865
|
-
/* @__PURE__ */ e("style", { children: `
|
|
866
|
-
input[type="range"]::-webkit-slider-thumb {
|
|
867
|
-
-webkit-appearance: none;
|
|
868
|
-
appearance: none;
|
|
869
|
-
width: 16px;
|
|
870
|
-
height: 16px;
|
|
871
|
-
border-radius: 50%;
|
|
872
|
-
background: ${o.slider};
|
|
873
|
-
cursor: pointer;
|
|
874
|
-
border: 2px solid white;
|
|
875
|
-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
input[type="range"]::-moz-range-thumb {
|
|
879
|
-
width: 16px;
|
|
880
|
-
height: 16px;
|
|
881
|
-
border-radius: 50%;
|
|
882
|
-
background: ${o.slider};
|
|
883
|
-
cursor: pointer;
|
|
884
|
-
border: 2px solid white;
|
|
885
|
-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
886
|
-
}
|
|
887
|
-
input[type="range"].eq-slider::-webkit-slider-thumb {
|
|
888
|
-
-webkit-appearance: none;
|
|
889
|
-
appearance: none;
|
|
890
|
-
width: 0;
|
|
891
|
-
height: 0;
|
|
892
|
-
background: transparent;
|
|
893
|
-
border: none;
|
|
894
|
-
box-shadow: none;
|
|
895
|
-
}
|
|
896
|
-
input[type="range"].eq-slider::-moz-range-thumb {
|
|
897
|
-
width: 0;
|
|
898
|
-
height: 0;
|
|
899
|
-
background: transparent;
|
|
900
|
-
border: none;
|
|
901
|
-
box-shadow: none;
|
|
902
|
-
}
|
|
903
|
-
.hide-for-xs {
|
|
904
|
-
display: flex;
|
|
905
|
-
}
|
|
906
|
-
@media (max-width: 480px) {
|
|
907
|
-
.hide-for-xs {
|
|
908
|
-
display: none;
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
.animation-spin {
|
|
912
|
-
animation: spin 15s infinite linear;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
@keyframes spin {
|
|
916
|
-
from {
|
|
917
|
-
transform: rotate(0deg);
|
|
918
|
-
}
|
|
919
|
-
to {
|
|
920
|
-
transform: rotate(360deg)
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
` })
|
|
758
|
+
] })
|
|
924
759
|
] }) });
|
|
925
760
|
}
|
|
926
|
-
function
|
|
927
|
-
audio:
|
|
928
|
-
gradient:
|
|
929
|
-
background:
|
|
930
|
-
autoPlay:
|
|
931
|
-
thumbnail:
|
|
932
|
-
width:
|
|
933
|
-
equalizer:
|
|
934
|
-
|
|
935
|
-
mid: 0,
|
|
936
|
-
treble: 0
|
|
937
|
-
},
|
|
938
|
-
mode: v = "light"
|
|
761
|
+
function bt({
|
|
762
|
+
audio: s,
|
|
763
|
+
gradient: l = ["#cd7eff", "#ff00f2"],
|
|
764
|
+
background: u = "#f4e4ffff",
|
|
765
|
+
autoPlay: v = !1,
|
|
766
|
+
thumbnail: C = null,
|
|
767
|
+
width: f,
|
|
768
|
+
equalizer: y = { bass: 0, mid: 0, treble: 0 },
|
|
769
|
+
mode: O = "light"
|
|
939
770
|
}) {
|
|
940
|
-
const [
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
}), R = y(null), F = y(null), j = y(null), ie = y(null), ue = y(null), ee = y(null), K = () => {
|
|
945
|
-
const a = [];
|
|
946
|
-
for (let d = 0; d < 100; d++) {
|
|
947
|
-
const b = 20 + Math.random() * 60;
|
|
948
|
-
a.push(b);
|
|
949
|
-
}
|
|
950
|
-
return a;
|
|
771
|
+
const [x, j] = m(!1), [I, M] = m(0), [L, H] = m(0), [B, F] = m(!1), [P, D] = m(80), [k, z] = m(1), [ae, me] = m([]), [V, ee] = m(null), [se, ie] = m(!1), [ce, de] = m({ bass: y.bass || 0, mid: y.mid || 0, treble: y.treble || 0 }), R = h(null), Q = h(null), Y = h(null), oe = h(null), ue = h(null), te = h(null), G = () => {
|
|
772
|
+
const r = [];
|
|
773
|
+
for (let d = 0; d < 100; d++) r.push(20 + Math.random() * 60);
|
|
774
|
+
return r;
|
|
951
775
|
};
|
|
952
|
-
|
|
953
|
-
if (!
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
G("Gradient must be an array with at least 2 colors");
|
|
776
|
+
$(() => {
|
|
777
|
+
if (!s) return;
|
|
778
|
+
if (!Array.isArray(l) || l.length < 2) {
|
|
779
|
+
ee("Gradient must be an array with at least 2 colors");
|
|
957
780
|
return;
|
|
958
781
|
}
|
|
959
|
-
const
|
|
960
|
-
if (!
|
|
961
|
-
const d = () =>
|
|
962
|
-
|
|
963
|
-
},
|
|
964
|
-
var
|
|
965
|
-
|
|
782
|
+
const r = R.current;
|
|
783
|
+
if (!r) return;
|
|
784
|
+
const d = () => M(r.currentTime), g = () => {
|
|
785
|
+
H(r.duration), me(G());
|
|
786
|
+
}, S = () => j(!1), _ = (J) => {
|
|
787
|
+
var b, E;
|
|
788
|
+
return ee(`Audio error: ${((E = (b = J.target) == null ? void 0 : b.error) == null ? void 0 : E.message) || "Failed to load audio"}`);
|
|
966
789
|
};
|
|
967
|
-
return
|
|
968
|
-
|
|
790
|
+
return r.addEventListener("timeupdate", d), r.addEventListener("loadedmetadata", g), r.addEventListener("ended", S), r.addEventListener("error", _), () => {
|
|
791
|
+
r.removeEventListener("timeupdate", d), r.removeEventListener("loadedmetadata", g), r.removeEventListener("ended", S), r.removeEventListener("error", _);
|
|
969
792
|
};
|
|
970
|
-
}, [
|
|
971
|
-
|
|
972
|
-
console.error("Play failed:",
|
|
973
|
-
}),
|
|
974
|
-
}, [
|
|
975
|
-
if (R.current && !
|
|
976
|
-
const
|
|
977
|
-
if (
|
|
978
|
-
const d = new
|
|
979
|
-
|
|
980
|
-
const
|
|
981
|
-
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
const
|
|
985
|
-
|
|
793
|
+
}, [s, l, O]), $(() => {
|
|
794
|
+
s && R.current && v && (R.current.play().catch((r) => {
|
|
795
|
+
console.error("Play failed:", r), j(!1);
|
|
796
|
+
}), j(!0));
|
|
797
|
+
}, [s]), $(() => {
|
|
798
|
+
if (R.current && !Q.current && R.current) {
|
|
799
|
+
const r = window.AudioContext || window.webkitAudioContext;
|
|
800
|
+
if (r) {
|
|
801
|
+
const d = new r();
|
|
802
|
+
Q.current = d;
|
|
803
|
+
const g = d.createMediaElementSource(R.current);
|
|
804
|
+
Y.current = g;
|
|
805
|
+
const S = d.createBiquadFilter();
|
|
806
|
+
S.type = "lowshelf", S.frequency.value = 200, oe.current = S;
|
|
807
|
+
const _ = d.createBiquadFilter();
|
|
808
|
+
_.type = "peaking", _.frequency.value = 1e3, _.Q.value = 1, ue.current = _;
|
|
986
809
|
const J = d.createBiquadFilter();
|
|
987
|
-
J.type = "highshelf", J.frequency.value = 3e3,
|
|
810
|
+
J.type = "highshelf", J.frequency.value = 3e3, te.current = J, g.connect(S).connect(_).connect(J).connect(d.destination);
|
|
988
811
|
}
|
|
989
812
|
}
|
|
990
|
-
}, [
|
|
991
|
-
R.current && (R.current.volume =
|
|
992
|
-
}, [
|
|
993
|
-
R.current && (R.current.playbackRate =
|
|
994
|
-
}, [
|
|
995
|
-
const
|
|
996
|
-
R.current && (
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
},
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
},
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
children: [
|
|
1034
|
-
/* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-end justify-center h-full w-full gap-px", children: ae.map((a, d) => {
|
|
1035
|
-
const B = d / ae.length * 100 <= $;
|
|
1036
|
-
return /* @__PURE__ */ e(
|
|
1037
|
-
"div",
|
|
1038
|
-
{
|
|
1039
|
-
className: "w-1 rounded-t transition-all duration-150",
|
|
1040
|
-
style: {
|
|
1041
|
-
height: `${a}%`,
|
|
1042
|
-
background: B ? c[0] : c[1],
|
|
1043
|
-
opacity: B ? 1 : 0.4
|
|
1044
|
-
}
|
|
1045
|
-
},
|
|
1046
|
-
d
|
|
1047
|
-
);
|
|
1048
|
-
}) }),
|
|
1049
|
-
/* @__PURE__ */ e(
|
|
1050
|
-
"div",
|
|
1051
|
-
{
|
|
1052
|
-
className: "absolute top-0 h-full w-1 bg-white border-r border-black rounded-full transition-all duration-150",
|
|
1053
|
-
style: { left: `${$}%`, transform: "translateX(-50%)" }
|
|
813
|
+
}, [s]), $(() => {
|
|
814
|
+
R.current && (R.current.volume = B ? 0 : P / 100);
|
|
815
|
+
}, [P, B]), $(() => {
|
|
816
|
+
R.current && (R.current.playbackRate = k);
|
|
817
|
+
}, [k]);
|
|
818
|
+
const w = () => {
|
|
819
|
+
R.current && (x ? R.current.pause() : R.current.play().catch((r) => ee(`Playback failed: ${r instanceof Error ? r.message : String(r)}`)), j(!x));
|
|
820
|
+
}, p = () => F(!B), A = (r) => {
|
|
821
|
+
D(parseInt(r.target.value)), B && parseInt(r.target.value) > 0 && F(!1);
|
|
822
|
+
}, K = (r) => z(parseFloat(r.target.value)), fe = (r) => {
|
|
823
|
+
const d = r.currentTarget.getBoundingClientRect(), S = (r.clientX - d.left) / d.width * L;
|
|
824
|
+
R.current && (R.current.currentTime = S, M(S));
|
|
825
|
+
}, W = (r, d) => {
|
|
826
|
+
de((g) => ({ ...g, [r]: d })), r === "bass" && oe.current && (oe.current.gain.value = d), r === "mid" && ue.current && (ue.current.gain.value = d), r === "treble" && te.current && (te.current.gain.value = d);
|
|
827
|
+
}, re = () => {
|
|
828
|
+
W("bass", 0), W("mid", 0), W("treble", 0);
|
|
829
|
+
}, X = (r) => {
|
|
830
|
+
if (isNaN(r)) return "0:00";
|
|
831
|
+
const d = Math.floor(r / 60), g = Math.floor(r % 60);
|
|
832
|
+
return `${d}:${g.toString().padStart(2, "0")}`;
|
|
833
|
+
}, N = L > 0 ? I / L * 100 : 0, T = O === "dark";
|
|
834
|
+
if (V)
|
|
835
|
+
return /* @__PURE__ */ c("div", { className: "ecp-wave-error", style: { background: u }, children: [
|
|
836
|
+
/* @__PURE__ */ e("p", { className: `ecp-wave-error-title${T ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: "Error" }),
|
|
837
|
+
/* @__PURE__ */ e("p", { className: `ecp-wave-error-msg${T ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: V })
|
|
838
|
+
] });
|
|
839
|
+
if (!s) return null;
|
|
840
|
+
const Z = T ? "#9ca3af" : "#6b7280";
|
|
841
|
+
return /* @__PURE__ */ c("div", { className: "ecp-wave-outer", style: { width: f ? `${f}px` : void 0 }, children: [
|
|
842
|
+
/* @__PURE__ */ e("audio", { ref: R, src: s, className: "ecp-wave-audio-el" }),
|
|
843
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-card", children: /* @__PURE__ */ c("div", { className: "ecp-wave-card-inner", style: { background: u }, children: [
|
|
844
|
+
C && /* @__PURE__ */ e("div", { className: "ecp-wave-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: C, alt: "", className: "ecp-wave-thumbnail" }) }),
|
|
845
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-seek", onClick: fe, children: [
|
|
846
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-bars", children: ae.map((r, d) => {
|
|
847
|
+
const g = d / ae.length * 100 <= N;
|
|
848
|
+
return /* @__PURE__ */ e(
|
|
849
|
+
"div",
|
|
850
|
+
{
|
|
851
|
+
className: "ecp-wave-bar",
|
|
852
|
+
style: {
|
|
853
|
+
height: `${r}%`,
|
|
854
|
+
background: g ? l[0] : l[1],
|
|
855
|
+
opacity: g ? 1 : 0.4
|
|
1054
856
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
/* @__PURE__ */ e("span", { children: Z(U) }),
|
|
1061
|
-
/* @__PURE__ */ e("span", { children: Z(M) })
|
|
857
|
+
},
|
|
858
|
+
d
|
|
859
|
+
);
|
|
860
|
+
}) }),
|
|
861
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-progress-line", style: { left: `${N}%` } })
|
|
1062
862
|
] }),
|
|
1063
|
-
/* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-times", style: { color: Z }, children: [
|
|
864
|
+
/* @__PURE__ */ e("span", { children: X(I) }),
|
|
865
|
+
/* @__PURE__ */ e("span", { children: X(L) })
|
|
866
|
+
] }),
|
|
867
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-controls", children: [
|
|
868
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-left-controls", children: [
|
|
1065
869
|
/* @__PURE__ */ e(
|
|
1066
870
|
"button",
|
|
1067
871
|
{
|
|
1068
|
-
onClick:
|
|
1069
|
-
className: "
|
|
1070
|
-
style: {
|
|
1071
|
-
|
|
1072
|
-
},
|
|
1073
|
-
children: H || S === 0 ? /* @__PURE__ */ e(De, { className: "w-4 h-4 text-white" }) : /* @__PURE__ */ e(He, { className: "w-4 h-4 text-white" })
|
|
872
|
+
onClick: p,
|
|
873
|
+
className: "ecp-wave-vol-btn",
|
|
874
|
+
style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
|
|
875
|
+
children: B || P === 0 ? /* @__PURE__ */ e(_e, { style: { width: "1rem", height: "1rem", color: "white" } }) : /* @__PURE__ */ e(De, { style: { width: "1rem", height: "1rem", color: "white" } })
|
|
1074
876
|
}
|
|
1075
877
|
),
|
|
1076
878
|
/* @__PURE__ */ e(
|
|
@@ -1079,285 +881,156 @@ function ft({
|
|
|
1079
881
|
type: "range",
|
|
1080
882
|
min: "0",
|
|
1081
883
|
max: "100",
|
|
1082
|
-
value:
|
|
884
|
+
value: P,
|
|
1083
885
|
onChange: A,
|
|
1084
|
-
className:
|
|
886
|
+
className: "ecp-wave-vol-slider",
|
|
1085
887
|
style: {
|
|
1086
|
-
background: `linear-gradient(to right, ${
|
|
1087
|
-
display:
|
|
888
|
+
background: `linear-gradient(to right, ${l[0]} ${P}%, ${T ? "#374151" : "#d1d5db"} ${P}%)`,
|
|
889
|
+
display: f && f < 400 ? "none" : void 0
|
|
1088
890
|
}
|
|
1089
891
|
}
|
|
1090
892
|
),
|
|
1091
|
-
|
|
893
|
+
f && f < 400 && /* @__PURE__ */ e(
|
|
1092
894
|
"button",
|
|
1093
895
|
{
|
|
1094
|
-
onClick: () =>
|
|
1095
|
-
className: "
|
|
1096
|
-
style: {
|
|
1097
|
-
|
|
1098
|
-
},
|
|
1099
|
-
children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4 text-white" })
|
|
896
|
+
onClick: () => ie(!se),
|
|
897
|
+
className: "ecp-wave-eq-btn",
|
|
898
|
+
style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
|
|
899
|
+
children: /* @__PURE__ */ e(Fe, { style: { width: "1rem", height: "1rem", color: "white" } })
|
|
1100
900
|
}
|
|
1101
|
-
)
|
|
901
|
+
)
|
|
1102
902
|
] }),
|
|
1103
|
-
/* @__PURE__ */ e("div", { className: "
|
|
903
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-center-controls", children: /* @__PURE__ */ e(
|
|
1104
904
|
"button",
|
|
1105
905
|
{
|
|
1106
|
-
onClick:
|
|
1107
|
-
className: "
|
|
1108
|
-
style: {
|
|
1109
|
-
|
|
1110
|
-
},
|
|
1111
|
-
children: P ? /* @__PURE__ */ e(Re, { className: "w-6 h-6 text-white fill-white" }) : /* @__PURE__ */ e(Fe, { className: "w-6 h-6 text-white fill-white" })
|
|
906
|
+
onClick: w,
|
|
907
|
+
className: "ecp-wave-play-btn",
|
|
908
|
+
style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
|
|
909
|
+
children: x ? /* @__PURE__ */ e(Pe, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } }) : /* @__PURE__ */ e(Me, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } })
|
|
1112
910
|
}
|
|
1113
911
|
) }),
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */ e(
|
|
912
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-right-controls", children: [
|
|
913
|
+
/* @__PURE__ */ e(
|
|
1116
914
|
"select",
|
|
1117
915
|
{
|
|
1118
|
-
value:
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
children: [
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
/* @__PURE__ */ e("option", { value: "1.25", children: "1.25x" }),
|
|
1127
|
-
/* @__PURE__ */ e("option", { value: "1.5", children: "1.5x" }),
|
|
1128
|
-
/* @__PURE__ */ e("option", { value: "2", children: "2x" })
|
|
1129
|
-
]
|
|
916
|
+
value: k,
|
|
917
|
+
onChange: K,
|
|
918
|
+
className: `ecp-wave-speed-select${T ? " ecp-wave-speed-select--dark" : " ecp-wave-speed-select--light"}`,
|
|
919
|
+
style: { background: u, color: l[0] },
|
|
920
|
+
children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((r) => /* @__PURE__ */ c("option", { value: r, children: [
|
|
921
|
+
r,
|
|
922
|
+
"x"
|
|
923
|
+
] }, r))
|
|
1130
924
|
}
|
|
1131
|
-
)
|
|
1132
|
-
!(
|
|
925
|
+
),
|
|
926
|
+
!(f && f < 400) && /* @__PURE__ */ e(
|
|
1133
927
|
"button",
|
|
1134
928
|
{
|
|
1135
|
-
onClick: () =>
|
|
1136
|
-
className: "
|
|
1137
|
-
style: {
|
|
1138
|
-
|
|
1139
|
-
},
|
|
1140
|
-
children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4 text-white" })
|
|
929
|
+
onClick: () => ie(!se),
|
|
930
|
+
className: "ecp-wave-eq-btn",
|
|
931
|
+
style: { background: `linear-gradient(135deg, ${l[0]}, ${l[1]})` },
|
|
932
|
+
children: /* @__PURE__ */ e(Fe, { style: { width: "1rem", height: "1rem", color: "white" } })
|
|
1141
933
|
}
|
|
1142
|
-
)
|
|
934
|
+
)
|
|
1143
935
|
] })
|
|
1144
936
|
] })
|
|
1145
937
|
] }) }),
|
|
1146
|
-
se && /* @__PURE__ */ e("div", { className: "
|
|
1147
|
-
/* @__PURE__ */ e("h3", { className: `
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
" dB"
|
|
1155
|
-
] })
|
|
1156
|
-
] }),
|
|
1157
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1158
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1159
|
-
/* @__PURE__ */ e(
|
|
1160
|
-
"input",
|
|
1161
|
-
{
|
|
1162
|
-
type: "range",
|
|
1163
|
-
min: "-20",
|
|
1164
|
-
max: "20",
|
|
1165
|
-
value: O.bass,
|
|
1166
|
-
onChange: (a) => V("bass", parseInt(a.target.value)),
|
|
1167
|
-
className: "flex-1 h-4 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1168
|
-
style: {
|
|
1169
|
-
background: `linear-gradient(to right, ${c[0]} ${(O.bass + 20) / 40 * 100}%, ${c[1] + "30"} ${(O.bass + 20) / 40 * 100}%)`
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
),
|
|
1173
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
938
|
+
se && /* @__PURE__ */ e("div", { className: "ecp-wave-eq-overlay", children: /* @__PURE__ */ c("div", { className: `ecp-wave-eq-panel${T ? " ecp-wave-eq-panel--dark" : " ecp-wave-eq-panel--light"}`, children: [
|
|
939
|
+
/* @__PURE__ */ e("h3", { className: `ecp-wave-eq-title${T ? " ecp-wave-eq-title--dark" : " ecp-wave-eq-title--light"}`, children: "Equalizer" }),
|
|
940
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-eq-bands", children: ["bass", "mid", "treble"].map((r) => /* @__PURE__ */ c("div", { children: [
|
|
941
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-eq-band-header", children: [
|
|
942
|
+
/* @__PURE__ */ e("span", { className: T ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: r.charAt(0).toUpperCase() + r.slice(1) }),
|
|
943
|
+
/* @__PURE__ */ c("span", { className: T ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: [
|
|
944
|
+
ce[r],
|
|
945
|
+
" dB"
|
|
1174
946
|
] })
|
|
1175
947
|
] }),
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
"
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
max: "20",
|
|
1192
|
-
value: O.mid,
|
|
1193
|
-
onChange: (a) => V("mid", parseInt(a.target.value)),
|
|
1194
|
-
className: "flex-1 h-4 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1195
|
-
style: {
|
|
1196
|
-
background: `linear-gradient(to right, ${c[0]} ${(O.mid + 20) / 40 * 100}%, ${c[1] + "30"} ${(O.mid + 20) / 40 * 100}%)`
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
),
|
|
1200
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1201
|
-
] })
|
|
1202
|
-
] }),
|
|
1203
|
-
/* @__PURE__ */ r("div", { children: [
|
|
1204
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1205
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
|
|
1206
|
-
/* @__PURE__ */ r("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
1207
|
-
O.treble,
|
|
1208
|
-
" dB"
|
|
1209
|
-
] })
|
|
1210
|
-
] }),
|
|
1211
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1212
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1213
|
-
/* @__PURE__ */ e(
|
|
1214
|
-
"input",
|
|
1215
|
-
{
|
|
1216
|
-
type: "range",
|
|
1217
|
-
min: "-20",
|
|
1218
|
-
max: "20",
|
|
1219
|
-
value: O.treble,
|
|
1220
|
-
onChange: (a) => V("treble", parseInt(a.target.value)),
|
|
1221
|
-
className: "flex-1 h-4 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1222
|
-
style: {
|
|
1223
|
-
background: `linear-gradient(to right, ${c[0]} ${(O.treble + 20) / 40 * 100}%, ${c[1] + "30"} ${(O.treble + 20) / 40 * 100}%)`
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
),
|
|
1227
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1228
|
-
] })
|
|
948
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-eq-range-row", children: [
|
|
949
|
+
/* @__PURE__ */ e("span", { className: T ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "-20" }),
|
|
950
|
+
/* @__PURE__ */ e(
|
|
951
|
+
"input",
|
|
952
|
+
{
|
|
953
|
+
type: "range",
|
|
954
|
+
min: "-20",
|
|
955
|
+
max: "20",
|
|
956
|
+
value: ce[r],
|
|
957
|
+
onChange: (d) => W(r, parseInt(d.target.value)),
|
|
958
|
+
className: "ecp-wave-eq-slider",
|
|
959
|
+
style: { background: `linear-gradient(to right, ${l[0]} ${(ce[r] + 20) / 40 * 100}%, ${l[1] + "30"} ${(ce[r] + 20) / 40 * 100}%)` }
|
|
960
|
+
}
|
|
961
|
+
),
|
|
962
|
+
/* @__PURE__ */ e("span", { className: T ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "+20" })
|
|
1229
963
|
] })
|
|
1230
|
-
] }),
|
|
1231
|
-
/* @__PURE__ */
|
|
1232
|
-
/* @__PURE__ */ e(
|
|
1233
|
-
|
|
1234
|
-
{
|
|
1235
|
-
onClick: te,
|
|
1236
|
-
className: `px-3 py-1 rounded text-xs ${v === "dark" ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1237
|
-
children: "Reset"
|
|
1238
|
-
}
|
|
1239
|
-
),
|
|
1240
|
-
/* @__PURE__ */ e(
|
|
1241
|
-
"button",
|
|
1242
|
-
{
|
|
1243
|
-
onClick: () => le(!1),
|
|
1244
|
-
className: `px-3 py-1 rounded text-xs ${v === "dark" ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1245
|
-
children: "Close"
|
|
1246
|
-
}
|
|
1247
|
-
)
|
|
964
|
+
] }, r)) }),
|
|
965
|
+
/* @__PURE__ */ c("div", { className: "ecp-wave-eq-footer", children: [
|
|
966
|
+
/* @__PURE__ */ e("button", { onClick: re, className: `ecp-wave-eq-footer-btn${T ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Reset" }),
|
|
967
|
+
/* @__PURE__ */ e("button", { onClick: () => ie(!1), className: `ecp-wave-eq-footer-btn${T ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Close" })
|
|
1248
968
|
] })
|
|
1249
|
-
] }) })
|
|
1250
|
-
/* @__PURE__ */ e("style", { children: `
|
|
1251
|
-
input[type="range"].eq-slider::-webkit-slider-thumb {
|
|
1252
|
-
-webkit-appearance: none;
|
|
1253
|
-
appearance: none;
|
|
1254
|
-
width: 0;
|
|
1255
|
-
height: 0;
|
|
1256
|
-
background: transparent;
|
|
1257
|
-
border: none;
|
|
1258
|
-
box-shadow: none;
|
|
1259
|
-
}
|
|
1260
|
-
input[type="range"].eq-slider::-moz-range-thumb {
|
|
1261
|
-
width: 0;
|
|
1262
|
-
height: 0;
|
|
1263
|
-
background: transparent;
|
|
1264
|
-
border: none;
|
|
1265
|
-
box-shadow: none;
|
|
1266
|
-
}
|
|
1267
|
-
` })
|
|
969
|
+
] }) })
|
|
1268
970
|
] });
|
|
1269
971
|
}
|
|
1270
|
-
function
|
|
1271
|
-
const [
|
|
1272
|
-
|
|
1273
|
-
const
|
|
1274
|
-
if (!
|
|
1275
|
-
const
|
|
1276
|
-
return
|
|
1277
|
-
}, []),
|
|
1278
|
-
const
|
|
1279
|
-
|
|
972
|
+
function gt({ audio: s, thumbnail: l, gradient: u = ["#cd7eff", "#fe59f6"], background: v = "#1f273a", autoPlay: C = !1 }) {
|
|
973
|
+
const [f, y] = m(!1), [, O] = m(0), x = h(null), [j, I] = m(0), [M, L] = m(0), [H, B] = m(0);
|
|
974
|
+
$(() => {
|
|
975
|
+
const k = x.current;
|
|
976
|
+
if (!k) return;
|
|
977
|
+
const z = () => O(k.currentTime);
|
|
978
|
+
return k.addEventListener("timeupdate", z), () => k.removeEventListener("timeupdate", z);
|
|
979
|
+
}, []), $(() => {
|
|
980
|
+
const k = setInterval(() => {
|
|
981
|
+
f && I((z) => z + 0.1);
|
|
1280
982
|
}, 100);
|
|
1281
|
-
return () => clearInterval(
|
|
1282
|
-
}, [
|
|
1283
|
-
const
|
|
1284
|
-
|
|
983
|
+
return () => clearInterval(k);
|
|
984
|
+
}, [f]), $(() => {
|
|
985
|
+
const k = setInterval(() => {
|
|
986
|
+
f && B((z) => z + 0.1);
|
|
1285
987
|
}, 100);
|
|
1286
|
-
return () => clearInterval(
|
|
1287
|
-
}, [
|
|
1288
|
-
|
|
1289
|
-
}, [
|
|
1290
|
-
const
|
|
1291
|
-
if (!
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
};
|
|
1298
|
-
}, [i]);
|
|
1299
|
-
const z = () => {
|
|
1300
|
-
P.current && (m ? P.current.pause() : P.current.play().catch((N) => console.error("NanoPlayer play failed:", N)), x(!m));
|
|
1301
|
-
};
|
|
1302
|
-
if (!i) return null;
|
|
1303
|
-
const S = {
|
|
1304
|
-
background: `linear-gradient(135deg, ${g[0]}, ${g[1]})`
|
|
988
|
+
return () => clearInterval(k);
|
|
989
|
+
}, [f]), $(() => {
|
|
990
|
+
s && x.current && C && (x.current.play().catch(() => y(!1)), y(!0));
|
|
991
|
+
}, [s]), $(() => {
|
|
992
|
+
const k = x.current;
|
|
993
|
+
if (!k) return;
|
|
994
|
+
const z = () => L(k.duration);
|
|
995
|
+
return B(0), k.addEventListener("loadedmetadata", z), () => k.removeEventListener("loadedmetadata", z);
|
|
996
|
+
}, [s]);
|
|
997
|
+
const F = () => {
|
|
998
|
+
x.current && (f ? x.current.pause() : x.current.play().catch((k) => console.error("NanoPlayer play failed:", k)), y(!f));
|
|
1305
999
|
};
|
|
1306
|
-
|
|
1000
|
+
if (!s) return null;
|
|
1001
|
+
const P = `linear-gradient(135deg, ${u[0]}, ${u[1]})`, D = `${(M > 0 ? H / M : 0) * 100}%`;
|
|
1002
|
+
return /* @__PURE__ */ c(
|
|
1307
1003
|
"div",
|
|
1308
1004
|
{
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
relative overflow-hidden inline-flex flex-col
|
|
1312
|
-
${c ? "rounded-2xl" : "rounded-full"}
|
|
1313
|
-
px-3 py-2 shadow-lg
|
|
1314
|
-
${c ? "w-[120px] h-[150px]" : "w-[110px] h-[40px]"}
|
|
1315
|
-
`,
|
|
1005
|
+
className: `ecp-nano-wrapper${l ? " ecp-nano-wrapper--card" : " ecp-nano-wrapper--pill"}`,
|
|
1006
|
+
style: { backgroundColor: v },
|
|
1316
1007
|
children: [
|
|
1317
1008
|
/* @__PURE__ */ e(
|
|
1318
1009
|
"audio",
|
|
1319
1010
|
{
|
|
1320
|
-
ref:
|
|
1321
|
-
src:
|
|
1011
|
+
ref: x,
|
|
1012
|
+
src: s,
|
|
1322
1013
|
onEnded: () => {
|
|
1323
|
-
|
|
1014
|
+
y(!1), B(0);
|
|
1324
1015
|
}
|
|
1325
1016
|
}
|
|
1326
1017
|
),
|
|
1327
|
-
/* @__PURE__ */ e(
|
|
1328
|
-
|
|
1329
|
-
{
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
},
|
|
1334
|
-
className: "absolute top-0 left-0 h-full opacity-20"
|
|
1335
|
-
}
|
|
1336
|
-
),
|
|
1337
|
-
/* @__PURE__ */ r("div", { className: "absolute flex flex-col", children: [
|
|
1338
|
-
c && /* @__PURE__ */ e("div", { className: "w-24 pb-2", children: /* @__PURE__ */ e("img", { src: c, alt: "", className: "w-24 aspect-square rounded-xl" }) }),
|
|
1339
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1340
|
-
/* @__PURE__ */ e(
|
|
1341
|
-
"button",
|
|
1342
|
-
{
|
|
1343
|
-
onClick: z,
|
|
1344
|
-
style: S,
|
|
1345
|
-
className: "p-1.5 rounded-full hover:scale-110 transition-transform flex-shrink-0",
|
|
1346
|
-
children: m ? /* @__PURE__ */ e(Re, { fill: p, className: "w-3 h-3 text-transparent" }) : /* @__PURE__ */ e(Fe, { fill: p, className: "w-3 h-3 text-transparent" })
|
|
1347
|
-
}
|
|
1348
|
-
),
|
|
1349
|
-
/* @__PURE__ */ e("div", { className: "flex w-full min-w-12 items-center gap-0.5 h-6", children: [...Array(12)].map((N, E) => /* @__PURE__ */ e(
|
|
1018
|
+
/* @__PURE__ */ e("div", { className: "ecp-nano-progress-bg", style: { width: D, backgroundImage: P } }),
|
|
1019
|
+
/* @__PURE__ */ c("div", { className: "ecp-nano-content", children: [
|
|
1020
|
+
l && /* @__PURE__ */ e("div", { className: "ecp-nano-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: l, alt: "", className: "ecp-nano-thumbnail" }) }),
|
|
1021
|
+
/* @__PURE__ */ c("div", { className: "ecp-nano-row", children: [
|
|
1022
|
+
/* @__PURE__ */ e("button", { onClick: F, className: "ecp-nano-play-btn", style: { background: P }, children: f ? /* @__PURE__ */ e(Pe, { fill: v, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) : /* @__PURE__ */ e(Me, { fill: v, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) }),
|
|
1023
|
+
/* @__PURE__ */ e("div", { className: "ecp-nano-waveform", children: [...Array(12)].map((k, z) => /* @__PURE__ */ e(
|
|
1350
1024
|
"div",
|
|
1351
1025
|
{
|
|
1352
|
-
className: "
|
|
1026
|
+
className: "ecp-nano-wave-bar",
|
|
1353
1027
|
style: {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
opacity: m ? 0.8 : 0.4
|
|
1028
|
+
background: `linear-gradient(to top, ${u[0]}, ${u[1]})`,
|
|
1029
|
+
height: f ? `${8 + Math.sin((j * 8 + z) * 0.6) * 10}px` : "8px",
|
|
1030
|
+
opacity: f ? 0.8 : 0.4
|
|
1358
1031
|
}
|
|
1359
1032
|
},
|
|
1360
|
-
|
|
1033
|
+
z
|
|
1361
1034
|
)) })
|
|
1362
1035
|
] })
|
|
1363
1036
|
] })
|
|
@@ -1365,13 +1038,13 @@ function mt({ audio: i, thumbnail: c, gradient: g = ["#cd7eff", "#fe59f6"], back
|
|
|
1365
1038
|
}
|
|
1366
1039
|
);
|
|
1367
1040
|
}
|
|
1368
|
-
function
|
|
1369
|
-
video:
|
|
1370
|
-
name:
|
|
1371
|
-
audioVisual:
|
|
1372
|
-
volume:
|
|
1373
|
-
thumbnail:
|
|
1374
|
-
controls:
|
|
1041
|
+
function wt({
|
|
1042
|
+
video: s,
|
|
1043
|
+
name: l = "No video loaded",
|
|
1044
|
+
audioVisual: u = null,
|
|
1045
|
+
volume: v = 100,
|
|
1046
|
+
thumbnail: C = null,
|
|
1047
|
+
controls: f = {
|
|
1375
1048
|
play: !0,
|
|
1376
1049
|
pause: !0,
|
|
1377
1050
|
stop: !0,
|
|
@@ -1382,526 +1055,359 @@ function yt({
|
|
|
1382
1055
|
equalizer: !0,
|
|
1383
1056
|
speed: !0
|
|
1384
1057
|
},
|
|
1385
|
-
mode:
|
|
1386
|
-
transparent:
|
|
1387
|
-
autoPlay:
|
|
1388
|
-
color:
|
|
1389
|
-
equalizer:
|
|
1390
|
-
bass: 0,
|
|
1391
|
-
mid: 0,
|
|
1392
|
-
treble: 0
|
|
1393
|
-
}
|
|
1058
|
+
mode: y = "light",
|
|
1059
|
+
transparent: O = !1,
|
|
1060
|
+
autoPlay: x = !1,
|
|
1061
|
+
color: j = "#3b82f6",
|
|
1062
|
+
equalizer: I = { bass: 0, mid: 0, treble: 0 }
|
|
1394
1063
|
}) {
|
|
1395
|
-
const [
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
const t = u.current;
|
|
1402
|
-
if (!t) return;
|
|
1403
|
-
const n = new ResizeObserver((s) => {
|
|
1404
|
-
for (let l of s)
|
|
1405
|
-
K(l.contentRect.width);
|
|
1064
|
+
const [M, L] = m(!1), [H, B] = m(0), [F, P] = m(0), [D, k] = m(v || 100), [z, ae] = m(!1), [me, V] = m(!1), [ee, se] = m(!1), [ie, ce] = m([]), [de, R] = m(!1), [Q, Y] = m({ bass: I.bass || 0, mid: I.mid || 0, treble: I.treble || 0 }), [oe, ue] = m(1), [te, G] = m(0), w = h(null), p = h(null), A = h(null), K = h(null), fe = h(null), W = h(null), re = h(null), X = h(null), N = h(null), T = h(null), Z = h(0), r = h(0), d = h(0), g = h(0), S = h(0), _ = h(0), J = h(!1), b = y === "dark" || ee, E = typeof f == "object" && Object.keys(f).length === 0;
|
|
1065
|
+
$(() => {
|
|
1066
|
+
const n = p.current;
|
|
1067
|
+
if (!n) return;
|
|
1068
|
+
const t = new ResizeObserver((a) => {
|
|
1069
|
+
for (let o of a) G(o.contentRect.width);
|
|
1406
1070
|
});
|
|
1407
|
-
return
|
|
1408
|
-
}, []),
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
}, [
|
|
1412
|
-
if (!
|
|
1413
|
-
const
|
|
1414
|
-
|
|
1415
|
-
},
|
|
1416
|
-
|
|
1417
|
-
},
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
return t.addEventListener("timeupdate", n), t.addEventListener("loadedmetadata", s), t.addEventListener("ended", l), t.addEventListener("play", w), t.addEventListener("pause", L), () => {
|
|
1421
|
-
t.removeEventListener("timeupdate", n), t.removeEventListener("loadedmetadata", s), t.removeEventListener("ended", l), t.removeEventListener("play", w), t.removeEventListener("pause", L);
|
|
1071
|
+
return t.observe(n), () => t.disconnect();
|
|
1072
|
+
}, []), $(() => {
|
|
1073
|
+
const n = [];
|
|
1074
|
+
s && typeof s != "string" && n.push(["TypeError", "video must be a string (URL or path)"]), l && typeof l != "string" && n.push(["TypeError", "name must be a string"]), (typeof v != "number" || v < 0 || v > 100) && n.push(["TypeError", "volume must be a number between 0 and 100"]), u && typeof u != "object" ? n.push(["TypeError", "audioVisual must be an object"]) : u && !["left", "right", "top", "bottom"].includes(u.side) && n.push(["ValueError", "audioVisual.side must be 'left', 'right', 'top', or 'bottom'"]), n.length > 0 ? ce(n) : ce([]);
|
|
1075
|
+
}, [s, l, v, u, f, y]), $(() => {
|
|
1076
|
+
if (!w.current) return;
|
|
1077
|
+
const n = w.current, t = () => {
|
|
1078
|
+
me || B(n.currentTime);
|
|
1079
|
+
}, a = () => P(n.duration), o = () => {
|
|
1080
|
+
L(!1), N.current && cancelAnimationFrame(N.current);
|
|
1081
|
+
}, i = () => L(!0), q = () => L(!1);
|
|
1082
|
+
return n.addEventListener("timeupdate", t), n.addEventListener("loadedmetadata", a), n.addEventListener("ended", o), n.addEventListener("play", i), n.addEventListener("pause", q), () => {
|
|
1083
|
+
n.removeEventListener("timeupdate", t), n.removeEventListener("loadedmetadata", a), n.removeEventListener("ended", o), n.removeEventListener("play", i), n.removeEventListener("pause", q);
|
|
1422
1084
|
};
|
|
1423
|
-
}, [
|
|
1424
|
-
if (
|
|
1425
|
-
const
|
|
1426
|
-
if (
|
|
1427
|
-
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1085
|
+
}, [me]), $(() => {
|
|
1086
|
+
if (s) {
|
|
1087
|
+
const n = M, t = D;
|
|
1088
|
+
if (w.current) {
|
|
1089
|
+
w.current.pause(), w.current.src = s, w.current.volume = z ? 0 : t / 100;
|
|
1090
|
+
const a = () => {
|
|
1091
|
+
n && w.current && w.current.play().catch((o) => console.error("Play failed:", o)), w.current && w.current.removeEventListener("canplay", a);
|
|
1430
1092
|
};
|
|
1431
|
-
|
|
1093
|
+
w.current.addEventListener("canplay", a), w.current.load();
|
|
1432
1094
|
}
|
|
1433
|
-
|
|
1095
|
+
B(0), L(!1), Z.current = 0, r.current = 0, d.current = 0, g.current = 0, S.current = 0, _.current = 0, ve();
|
|
1434
1096
|
}
|
|
1435
|
-
}, [
|
|
1436
|
-
|
|
1437
|
-
}, [
|
|
1438
|
-
|
|
1439
|
-
}, [
|
|
1440
|
-
A.current && (
|
|
1441
|
-
}, [
|
|
1442
|
-
J.current =
|
|
1443
|
-
}, [
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
}, []), C(() => () => {
|
|
1449
|
-
$.current && cancelAnimationFrame($.current), A.current && A.current.close().catch((t) => console.warn("AudioContext cleanup error:", t));
|
|
1097
|
+
}, [s]), $(() => {
|
|
1098
|
+
w.current && (w.current.volume = z ? 0 : D / 100);
|
|
1099
|
+
}, [D, z]), $(() => {
|
|
1100
|
+
w.current && (w.current.playbackRate = oe);
|
|
1101
|
+
}, [oe]), $(() => {
|
|
1102
|
+
A.current && (W.current && (W.current.gain.value = Q.bass), re.current && (re.current.gain.value = Q.mid), X.current && (X.current.gain.value = Q.treble));
|
|
1103
|
+
}, [Q]), $(() => {
|
|
1104
|
+
J.current = M, N.current && (cancelAnimationFrame(N.current), N.current = null), M && u ? (A.current || ke(), we()) : !M && u && Ce();
|
|
1105
|
+
}, [M, u]), $(() => {
|
|
1106
|
+
const n = () => se(!!document.fullscreenElement);
|
|
1107
|
+
return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
|
|
1108
|
+
}, []), $(() => () => {
|
|
1109
|
+
N.current && cancelAnimationFrame(N.current), A.current && A.current.close().catch((n) => console.warn("AudioContext cleanup error:", n));
|
|
1450
1110
|
}, []);
|
|
1451
|
-
const
|
|
1452
|
-
if (!A.current &&
|
|
1111
|
+
const ke = () => {
|
|
1112
|
+
if (!A.current && w.current)
|
|
1453
1113
|
try {
|
|
1454
|
-
const
|
|
1455
|
-
if (
|
|
1456
|
-
const
|
|
1457
|
-
A.current =
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1462
|
-
const
|
|
1463
|
-
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1114
|
+
const n = window.AudioContext || window.webkitAudioContext;
|
|
1115
|
+
if (n) {
|
|
1116
|
+
const t = new n();
|
|
1117
|
+
A.current = t;
|
|
1118
|
+
const a = t.createBiquadFilter();
|
|
1119
|
+
a.type = "lowshelf", a.frequency.value = 320, a.gain.value = Q.bass;
|
|
1120
|
+
const o = t.createBiquadFilter();
|
|
1121
|
+
o.type = "peaking", o.frequency.value = 1e3, o.Q.value = 0.5, o.gain.value = Q.mid;
|
|
1122
|
+
const i = t.createBiquadFilter();
|
|
1123
|
+
i.type = "highshelf", i.frequency.value = 3200, i.gain.value = Q.treble;
|
|
1124
|
+
const q = t.createAnalyser();
|
|
1125
|
+
q.fftSize = 2048, q.smoothingTimeConstant = 0.8;
|
|
1126
|
+
const U = t.createMediaElementSource(w.current);
|
|
1127
|
+
U.connect(a), a.connect(o), o.connect(i), i.connect(q), i.connect(t.destination), W.current = a, re.current = o, X.current = i, K.current = q, fe.current = U;
|
|
1468
1128
|
}
|
|
1469
|
-
} catch (
|
|
1470
|
-
console.error("Failed to setup audio context:",
|
|
1129
|
+
} catch (n) {
|
|
1130
|
+
console.error("Failed to setup audio context:", n);
|
|
1471
1131
|
}
|
|
1472
|
-
},
|
|
1132
|
+
}, Ce = () => {
|
|
1473
1133
|
if (J.current) return;
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1134
|
+
Z.current *= 0.7, r.current *= 0.7;
|
|
1135
|
+
const n = Date.now();
|
|
1136
|
+
n - S.current > 1500 && (d.current *= 0.95), n - _.current > 1500 && (g.current *= 0.95), ve();
|
|
1137
|
+
const t = Math.max(Z.current, r.current), a = Math.max(d.current, g.current);
|
|
1138
|
+
t > 0.01 || a > 0.01 ? N.current = requestAnimationFrame(Ce) : (J.current || (Z.current = 0, r.current = 0, d.current = 0, g.current = 0, ve()), N.current && cancelAnimationFrame(N.current), N.current = null);
|
|
1479
1139
|
}, we = () => {
|
|
1480
|
-
if (!
|
|
1481
|
-
const
|
|
1482
|
-
|
|
1483
|
-
let
|
|
1484
|
-
for (let
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
<div
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
${d.current > 0.1 ? `<div class="absolute top-0 w-1 h-full transition-all duration-100" style="right: ${d.current * 100}%; background: ${n};"></div>` : ""}
|
|
1140
|
+
if (!K.current || !J.current) return;
|
|
1141
|
+
const n = K.current.frequencyBinCount, t = new Uint8Array(n);
|
|
1142
|
+
K.current.getByteFrequencyData(t);
|
|
1143
|
+
let a = 0;
|
|
1144
|
+
for (let q = 0; q < n; q++) a += t[q];
|
|
1145
|
+
let o = Math.pow(a / n / 255, 0.5);
|
|
1146
|
+
Z.current = Z.current * 0.7 + o * 0.3, r.current = r.current * 0.7 + o * 0.3;
|
|
1147
|
+
const i = Date.now();
|
|
1148
|
+
Z.current > d.current ? (d.current = Z.current, S.current = i) : i - S.current > 1500 && (d.current *= 0.95), r.current > g.current ? (g.current = r.current, _.current = i) : i - _.current > 1500 && (g.current *= 0.95), ve(), N.current = requestAnimationFrame(we);
|
|
1149
|
+
}, ve = () => {
|
|
1150
|
+
if (!T.current || !u) return;
|
|
1151
|
+
const n = u.color || "#00ff00", t = u.peak || "#ff0000", a = Z.current * 100, o = r.current * 100, i = 100 - d.current * 100, q = 100 - g.current * 100;
|
|
1152
|
+
u.side === "top" || u.side === "bottom" ? T.current.innerHTML = `
|
|
1153
|
+
<div style="display:flex;flex-direction:column;gap:0.25rem;height:100%;justify-content:center;">
|
|
1154
|
+
<div style="display:flex;align-items:center;justify-content:center;gap:0.5rem;">
|
|
1155
|
+
<div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${b ? "#f3f4f6" : "#111827"}">L</div>
|
|
1156
|
+
<div style="position:relative;flex:1;height:0.75rem;background:rgba(0,0,0,0.4);border-radius:9999px;overflow:hidden;display:flex;justify-content:flex-end;">
|
|
1157
|
+
<div style="height:100%;border-radius:9999px 0 0 9999px;transition:width 75ms;width:${a}%;background:${n};"></div>
|
|
1158
|
+
${d.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:right 100ms;right:${d.current * 100}%;background:${t};"></div>` : ""}
|
|
1500
1159
|
</div>
|
|
1501
|
-
<div
|
|
1502
|
-
<div
|
|
1503
|
-
<div
|
|
1504
|
-
${
|
|
1160
|
+
<div style="width:1px;height:1rem;background:rgba(255,255,255,0.2)"></div>
|
|
1161
|
+
<div style="position:relative;flex:1;height:0.75rem;background:rgba(0,0,0,0.4);border-radius:9999px;overflow:hidden;display:flex;justify-content:flex-start;">
|
|
1162
|
+
<div style="height:100%;border-radius:0 9999px 9999px 0;transition:width 75ms;width:${o}%;background:${n};"></div>
|
|
1163
|
+
${g.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:left 100ms;left:${g.current * 100}%;background:${t};"></div>` : ""}
|
|
1505
1164
|
</div>
|
|
1506
|
-
<div
|
|
1165
|
+
<div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${b ? "#f3f4f6" : "#111827"}">R</div>
|
|
1507
1166
|
</div>
|
|
1508
1167
|
</div>
|
|
1509
|
-
` :
|
|
1510
|
-
<div
|
|
1511
|
-
<div
|
|
1512
|
-
<div
|
|
1513
|
-
<div
|
|
1514
|
-
<div
|
|
1515
|
-
${d.current > 0.1 ? `<div
|
|
1168
|
+
` : T.current.innerHTML = `
|
|
1169
|
+
<div style="display:flex;gap:0.5rem;height:100%;">
|
|
1170
|
+
<div style="flex:1;display:flex;flex-direction:column;">
|
|
1171
|
+
<div style="font-size:0.75rem;color:white;opacity:0.7;text-align:center;margin-bottom:0.25rem;">L</div>
|
|
1172
|
+
<div style="flex:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(0,0,0,0.3);border-radius:0.5rem;overflow:hidden;">
|
|
1173
|
+
<div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${a}%;background:${n};">
|
|
1174
|
+
${d.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${i}%;background:${t};"></div>` : ""}
|
|
1516
1175
|
</div>
|
|
1517
1176
|
</div>
|
|
1518
1177
|
</div>
|
|
1519
|
-
<div
|
|
1520
|
-
<div
|
|
1521
|
-
<div
|
|
1522
|
-
<div
|
|
1523
|
-
${
|
|
1178
|
+
<div style="flex:1;display:flex;flex-direction:column;">
|
|
1179
|
+
<div style="font-size:0.75rem;color:white;opacity:0.7;text-align:center;margin-bottom:0.25rem;">R</div>
|
|
1180
|
+
<div style="flex:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(0,0,0,0.3);border-radius:0.5rem;overflow:hidden;">
|
|
1181
|
+
<div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${o}%;background:${n};">
|
|
1182
|
+
${g.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${q}%;background:${t};"></div>` : ""}
|
|
1183
|
+
</div>
|
|
1524
1184
|
</div>
|
|
1525
1185
|
</div>
|
|
1526
1186
|
</div>
|
|
1527
1187
|
`;
|
|
1528
|
-
},
|
|
1529
|
-
!
|
|
1530
|
-
},
|
|
1531
|
-
|
|
1532
|
-
},
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
},
|
|
1536
|
-
|
|
1537
|
-
},
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
},
|
|
1541
|
-
|
|
1542
|
-
},
|
|
1543
|
-
|
|
1544
|
-
},
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
})), A.current && (t === "bass" && V.current && (V.current.gain.value = n), t === "mid" && te.current && (te.current.gain.value = n), t === "treble" && Z.current && (Z.current.gain.value = n));
|
|
1549
|
-
}, Se = () => {
|
|
1550
|
-
j({ bass: 0, mid: 0, treble: 0 });
|
|
1551
|
-
}, ve = (t) => {
|
|
1552
|
-
if (isNaN(t)) return "0:00";
|
|
1553
|
-
const n = Math.floor(t / 60), s = Math.floor(t % 60);
|
|
1554
|
-
return `${n}:${s.toString().padStart(2, "0")}`;
|
|
1188
|
+
}, Ne = () => {
|
|
1189
|
+
!w.current || !s || (M ? w.current.pause() : (A.current && A.current.state === "suspended" && A.current.resume(), w.current.play().catch((n) => console.error("Play failed:", n))));
|
|
1190
|
+
}, he = () => {
|
|
1191
|
+
w.current && (w.current.pause(), w.current.currentTime = 0, L(!1), B(0), Z.current = 0, r.current = 0, d.current = 0, g.current = 0, ve());
|
|
1192
|
+
}, xe = (n) => {
|
|
1193
|
+
const a = parseFloat(n.target.value) / 100 * F;
|
|
1194
|
+
B(a), w.current && !me && (w.current.currentTime = a);
|
|
1195
|
+
}, Ee = () => V(!0), Le = () => {
|
|
1196
|
+
w.current && (w.current.currentTime = H), V(!1);
|
|
1197
|
+
}, Ae = (n) => {
|
|
1198
|
+
const t = parseInt(n.target.value);
|
|
1199
|
+
k(t), ae(t === 0);
|
|
1200
|
+
}, Re = (n) => ue(parseFloat(n.target.value)), ze = () => ae(!z), Se = () => {
|
|
1201
|
+
p.current && (document.fullscreenElement ? document.exitFullscreen() : p.current.requestFullscreen().catch((n) => console.error("Fullscreen failed:", n)));
|
|
1202
|
+
}, Be = (n, t) => {
|
|
1203
|
+
Y((a) => ({ ...a, [n]: t })), A.current && (n === "bass" && W.current && (W.current.gain.value = t), n === "mid" && re.current && (re.current.gain.value = t), n === "treble" && X.current && (X.current.gain.value = t));
|
|
1204
|
+
}, je = () => Y({ bass: 0, mid: 0, treble: 0 }), Te = (n) => {
|
|
1205
|
+
if (isNaN(n)) return "0:00";
|
|
1206
|
+
const t = Math.floor(n / 60), a = Math.floor(n % 60);
|
|
1207
|
+
return `${t}:${a.toString().padStart(2, "0")}`;
|
|
1555
1208
|
};
|
|
1556
|
-
if (
|
|
1557
|
-
(
|
|
1558
|
-
}, [
|
|
1559
|
-
return
|
|
1560
|
-
/* @__PURE__ */
|
|
1561
|
-
|
|
1209
|
+
if ($(() => {
|
|
1210
|
+
(E && !M || x) && Ne();
|
|
1211
|
+
}, [f]), ie && ie.length > 0)
|
|
1212
|
+
return /* @__PURE__ */ e(Ve, { children: ie.map((n, t) => /* @__PURE__ */ c("div", { className: "ecp-video-error", children: [
|
|
1213
|
+
/* @__PURE__ */ c("strong", { children: [
|
|
1214
|
+
n[0],
|
|
1562
1215
|
":"
|
|
1563
1216
|
] }),
|
|
1564
1217
|
" ",
|
|
1565
|
-
|
|
1566
|
-
] },
|
|
1567
|
-
const
|
|
1218
|
+
n[1]
|
|
1219
|
+
] }, t)) });
|
|
1220
|
+
const be = u ? u.side : null, qe = be === "top" || be === "bottom";
|
|
1568
1221
|
return /* @__PURE__ */ e(
|
|
1569
1222
|
"div",
|
|
1570
1223
|
{
|
|
1571
|
-
ref:
|
|
1572
|
-
className: `
|
|
1573
|
-
style: { backgroundColor:
|
|
1574
|
-
children: /* @__PURE__ */
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
poster:
|
|
1587
|
-
|
|
1588
|
-
i && /* @__PURE__ */ e("source", { src: i }),
|
|
1224
|
+
ref: p,
|
|
1225
|
+
className: `ecp-video-wrapper${ee ? " ecp-video-wrapper--fullscreen" : ""}`,
|
|
1226
|
+
style: { backgroundColor: E || O ? void 0 : b ? "#49494937" : "white" },
|
|
1227
|
+
children: /* @__PURE__ */ c(
|
|
1228
|
+
"div",
|
|
1229
|
+
{
|
|
1230
|
+
className: `ecp-video-inner${ee ? " ecp-video-inner--fullscreen" : ""}${E || O ? "" : " ecp-video-inner--padded"}`,
|
|
1231
|
+
style: { background: E || O ? void 0 : b ? "#1a1a1ab0" : "#f5f5f5" },
|
|
1232
|
+
children: [
|
|
1233
|
+
f.videoName && !ee && /* @__PURE__ */ e("div", { className: `ecp-video-name${b ? " ecp-video-name--dark" : " ecp-video-name--light"}`, children: l }),
|
|
1234
|
+
/* @__PURE__ */ c("div", { className: `ecp-video-layout${qe ? " ecp-video-layout--col" : " ecp-video-layout--row"}${ee ? " ecp-video-layout--fullscreen" : ""}`, children: [
|
|
1235
|
+
u && be === "top" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-top", ref: T }),
|
|
1236
|
+
/* @__PURE__ */ c("div", { style: { display: "flex", flex: qe ? void 0 : 1, gap: "0.75rem" }, children: [
|
|
1237
|
+
u && be === "left" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: T }),
|
|
1238
|
+
/* @__PURE__ */ c("div", { className: `ecp-video-el-wrap${b ? " ecp-video-el-wrap--dark" : " ecp-video-el-wrap--light"}`, children: [
|
|
1239
|
+
/* @__PURE__ */ c("video", { ref: w, className: "ecp-video-el", poster: C || void 0, children: [
|
|
1240
|
+
s && /* @__PURE__ */ e("source", { src: s }),
|
|
1589
1241
|
"Your browser does not support the video tag."
|
|
1590
|
-
]
|
|
1591
|
-
}
|
|
1592
|
-
),
|
|
1593
|
-
de && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex flex-col w-full justify-center z-10 rounded-lg p-4 shadow-sm transition-all duration-300", children: /* @__PURE__ */ r("div", { className: `max-w-[600px] w-full mx-auto flex flex-col justify-center z-10 ${o ? "bg-black/70" : "bg-white/80"} rounded-lg p-4 shadow-sm transition-all duration-300`, children: [
|
|
1594
|
-
/* @__PURE__ */ e("h3", { className: `text-sm font-medium mb-4 ${o ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
|
|
1595
|
-
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
1596
|
-
/* @__PURE__ */ r("div", { children: [
|
|
1597
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1598
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
|
|
1599
|
-
/* @__PURE__ */ r("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
1600
|
-
F.bass,
|
|
1601
|
-
" dB"
|
|
1602
|
-
] })
|
|
1603
|
-
] }),
|
|
1604
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1605
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1606
|
-
/* @__PURE__ */ e(
|
|
1607
|
-
"input",
|
|
1608
|
-
{
|
|
1609
|
-
type: "range",
|
|
1610
|
-
min: "-20",
|
|
1611
|
-
max: "20",
|
|
1612
|
-
value: F.bass,
|
|
1613
|
-
onChange: (t) => Ne("bass", parseInt(t.target.value)),
|
|
1614
|
-
className: "flex-1 h-6 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1615
|
-
style: {
|
|
1616
|
-
background: `linear-gradient(to right, ${T} ${(F.bass + 20) / 40 * 100}%, #e5e7eb ${(F.bass + 20) / 40 * 100}%)`
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
),
|
|
1620
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1621
|
-
] })
|
|
1622
1242
|
] }),
|
|
1623
|
-
/* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
|
|
1628
|
-
"
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
/* @__PURE__ */
|
|
1634
|
-
"
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1243
|
+
de && /* @__PURE__ */ e("div", { className: "ecp-video-eq-overlay", children: /* @__PURE__ */ c("div", { className: `ecp-video-eq-panel${b ? " ecp-video-eq-panel--dark" : " ecp-video-eq-panel--light"}`, children: [
|
|
1244
|
+
/* @__PURE__ */ e("h3", { className: `ecp-video-eq-title${b ? " ecp-video-eq-title--dark" : " ecp-video-eq-title--light"}`, children: "Equalizer" }),
|
|
1245
|
+
/* @__PURE__ */ e("div", { className: "ecp-video-eq-bands", children: ["bass", "mid", "treble"].map((n) => /* @__PURE__ */ c("div", { children: [
|
|
1246
|
+
/* @__PURE__ */ c("div", { className: "ecp-video-eq-band-header", children: [
|
|
1247
|
+
/* @__PURE__ */ e("span", { className: b ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: n.charAt(0).toUpperCase() + n.slice(1) }),
|
|
1248
|
+
/* @__PURE__ */ c("span", { className: b ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: [
|
|
1249
|
+
Q[n],
|
|
1250
|
+
" dB"
|
|
1251
|
+
] })
|
|
1252
|
+
] }),
|
|
1253
|
+
/* @__PURE__ */ c("div", { className: "ecp-video-eq-range-row", children: [
|
|
1254
|
+
/* @__PURE__ */ e("span", { className: b ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "-20" }),
|
|
1255
|
+
/* @__PURE__ */ e(
|
|
1256
|
+
"input",
|
|
1257
|
+
{
|
|
1258
|
+
type: "range",
|
|
1259
|
+
min: "-20",
|
|
1260
|
+
max: "20",
|
|
1261
|
+
value: Q[n],
|
|
1262
|
+
onChange: (t) => Be(n, parseInt(t.target.value)),
|
|
1263
|
+
className: "ecp-video-eq-slider",
|
|
1264
|
+
style: { background: `linear-gradient(to right, ${j} ${(Q[n] + 20) / 40 * 100}%, #e5e7eb ${(Q[n] + 20) / 40 * 100}%)` }
|
|
1644
1265
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1648
|
-
] })
|
|
1649
|
-
] }),
|
|
1650
|
-
/* @__PURE__ */ r("div", { children: [
|
|
1651
|
-
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1652
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
|
|
1653
|
-
/* @__PURE__ */ r("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
1654
|
-
F.treble,
|
|
1655
|
-
" dB"
|
|
1266
|
+
),
|
|
1267
|
+
/* @__PURE__ */ e("span", { className: b ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "+20" })
|
|
1656
1268
|
] })
|
|
1657
|
-
] }),
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */ e("
|
|
1660
|
-
/* @__PURE__ */ e(
|
|
1661
|
-
"input",
|
|
1662
|
-
{
|
|
1663
|
-
type: "range",
|
|
1664
|
-
min: "-20",
|
|
1665
|
-
max: "20",
|
|
1666
|
-
value: F.treble,
|
|
1667
|
-
onChange: (t) => Ne("treble", parseInt(t.target.value)),
|
|
1668
|
-
className: "flex-1 h-6 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1669
|
-
style: {
|
|
1670
|
-
background: `linear-gradient(to right, ${T} ${(F.treble + 20) / 40 * 100}%, #e5e7eb ${(F.treble + 20) / 40 * 100}%)`
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
),
|
|
1674
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1269
|
+
] }, n)) }),
|
|
1270
|
+
/* @__PURE__ */ c("div", { className: "ecp-video-eq-footer", children: [
|
|
1271
|
+
/* @__PURE__ */ e("button", { onClick: je, className: `ecp-video-eq-footer-btn${b ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, children: "Reset" }),
|
|
1272
|
+
/* @__PURE__ */ e("button", { onClick: () => R(!1), className: `ecp-video-eq-footer-btn${b ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, style: { marginLeft: "0.5rem" }, children: "Close" })
|
|
1675
1273
|
] })
|
|
1676
|
-
] })
|
|
1274
|
+
] }) })
|
|
1677
1275
|
] }),
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
{
|
|
1682
|
-
onClick: Se,
|
|
1683
|
-
className: `px-3 py-1 rounded text-xs ${o ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1684
|
-
children: "Reset"
|
|
1685
|
-
}
|
|
1686
|
-
),
|
|
1687
|
-
/* @__PURE__ */ e(
|
|
1688
|
-
"button",
|
|
1689
|
-
{
|
|
1690
|
-
onClick: () => R(!1),
|
|
1691
|
-
className: `ml-2 px-3 py-1 rounded text-xs ${o ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1692
|
-
children: "Close"
|
|
1693
|
-
}
|
|
1694
|
-
)
|
|
1695
|
-
] })
|
|
1696
|
-
] }) })
|
|
1276
|
+
u && be === "right" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: T })
|
|
1277
|
+
] }),
|
|
1278
|
+
u && be === "bottom" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-bottom", ref: T })
|
|
1697
1279
|
] }),
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
className: "flex-1 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",
|
|
1718
|
-
style: {
|
|
1719
|
-
background: i && z > 0 ? `linear-gradient(to right, ${T} ${_ / z * 100}%, #e5e7eb ${_ / z * 100}%)` : "#e5e7eb"
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
),
|
|
1723
|
-
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-100" : "text-gray-600"} font-mono w-12 text-right`, children: ve(z) })
|
|
1724
|
-
] }) }),
|
|
1725
|
-
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
1726
|
-
m.play && /* @__PURE__ */ r(
|
|
1727
|
-
"button",
|
|
1728
|
-
{
|
|
1729
|
-
onClick: ke,
|
|
1730
|
-
disabled: !i,
|
|
1731
|
-
style: { backgroundColor: T },
|
|
1732
|
-
className: `${ee > 400 ? " px-4 py-2" : "px-3 py-5"} rounded-full text-sm font-medium text-white hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all`,
|
|
1733
|
-
children: [
|
|
1734
|
-
/* @__PURE__ */ r("div", { className: "relative w-4 flex items-center", children: [
|
|
1735
|
-
/* @__PURE__ */ e(Re, { size: 16, className: `${I ? "" : "scale-0 translate-y-10"} transition-all absolute` }),
|
|
1736
|
-
/* @__PURE__ */ e(Fe, { size: 16, className: `${I ? "scale-0 -translate-y-10" : ""} transition-all absolute` })
|
|
1737
|
-
] }),
|
|
1738
|
-
ee > 400 && (I ? "Pause" : "Play")
|
|
1739
|
-
]
|
|
1740
|
-
}
|
|
1741
|
-
),
|
|
1742
|
-
m.stop && /* @__PURE__ */ e(
|
|
1743
|
-
"button",
|
|
1744
|
-
{
|
|
1745
|
-
onClick: pe,
|
|
1746
|
-
disabled: !i,
|
|
1747
|
-
className: `${o ? "bg-gray-100 text-black hover:bg-gray-300" : "bg-gray-700 text-white hover:bg-gray-800"} px-3 py-3 rounded-full text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all`,
|
|
1748
|
-
children: /* @__PURE__ */ e(Ue, { size: 16 })
|
|
1749
|
-
}
|
|
1750
|
-
),
|
|
1751
|
-
m.fullscreen && /* @__PURE__ */ r(
|
|
1752
|
-
"button",
|
|
1753
|
-
{
|
|
1754
|
-
onClick: ze,
|
|
1755
|
-
className: `${ee < 800 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${o ? "bg-gray-100 text-black hover:bg-gray-300" : "bg-gray-700 text-white hover:bg-gray-800"}`,
|
|
1756
|
-
children: [
|
|
1757
|
-
G ? /* @__PURE__ */ e(et, { size: 16 }) : /* @__PURE__ */ e(Ye, { size: 16 }),
|
|
1758
|
-
/* @__PURE__ */ e("span", { style: { display: ee < 800 ? "none" : "block" }, children: G ? "Exit" : "Full" })
|
|
1759
|
-
]
|
|
1760
|
-
}
|
|
1761
|
-
),
|
|
1762
|
-
m.equalizer && /* @__PURE__ */ r(
|
|
1763
|
-
"button",
|
|
1764
|
-
{
|
|
1765
|
-
onClick: () => R(!de),
|
|
1766
|
-
disabled: !i,
|
|
1767
|
-
className: `${ee < 700 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${de ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
|
|
1768
|
-
style: de ? { backgroundColor: T } : {},
|
|
1769
|
-
children: [
|
|
1770
|
-
/* @__PURE__ */ e(Ae, { size: 16 }),
|
|
1771
|
-
/* @__PURE__ */ e("span", { style: { display: ee < 700 ? "none" : "block" }, children: "EQ" })
|
|
1772
|
-
]
|
|
1773
|
-
}
|
|
1774
|
-
),
|
|
1775
|
-
m.speed && /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ r(
|
|
1776
|
-
"select",
|
|
1777
|
-
{
|
|
1778
|
-
value: ie,
|
|
1779
|
-
onChange: Me,
|
|
1780
|
-
className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${o ? "text-gray-200" : "text-gray-800"}`,
|
|
1781
|
-
children: [
|
|
1782
|
-
/* @__PURE__ */ e("option", { value: "0.5", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "0.5x" }),
|
|
1783
|
-
/* @__PURE__ */ e("option", { value: "0.75", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "0.75x" }),
|
|
1784
|
-
/* @__PURE__ */ e("option", { value: "1", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1x" }),
|
|
1785
|
-
/* @__PURE__ */ e("option", { value: "1.25", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1.25x" }),
|
|
1786
|
-
/* @__PURE__ */ e("option", { value: "1.5", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1.5x" }),
|
|
1787
|
-
/* @__PURE__ */ e("option", { value: "2", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "2x" })
|
|
1788
|
-
]
|
|
1789
|
-
}
|
|
1790
|
-
) }),
|
|
1791
|
-
m.volume && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 md:gap-3 ml-auto", children: [
|
|
1792
|
-
/* @__PURE__ */ e(
|
|
1793
|
-
"button",
|
|
1794
|
-
{
|
|
1795
|
-
onClick: je,
|
|
1796
|
-
className: "p-2 rounded-lg hover:bg-gray-100 transition-all",
|
|
1797
|
-
children: oe || N === 0 ? /* @__PURE__ */ e(De, { size: 20, className: o ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e(He, { size: 20, className: o ? "text-gray-100" : "text-gray-600" })
|
|
1798
|
-
}
|
|
1799
|
-
),
|
|
1800
|
-
/* @__PURE__ */ e(
|
|
1801
|
-
"input",
|
|
1802
|
-
{
|
|
1803
|
-
type: "range",
|
|
1804
|
-
min: "0",
|
|
1805
|
-
max: "100",
|
|
1806
|
-
value: N,
|
|
1807
|
-
onChange: Pe,
|
|
1808
|
-
className: "hide-for-xs w-24 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer",
|
|
1809
|
-
style: {
|
|
1810
|
-
background: `linear-gradient(to right, ${T} ${N}%, #e5e7eb ${N}%)`,
|
|
1811
|
-
display: ee < 460 ? "none" : "block"
|
|
1280
|
+
f.seekbar && /* @__PURE__ */ e("div", { className: `ecp-video-seekbar${ee ? " ecp-video-seekbar--fullscreen" : ""}`, children: /* @__PURE__ */ c("div", { className: "ecp-video-seekbar-row", children: [
|
|
1281
|
+
/* @__PURE__ */ e("span", { className: `ecp-video-time${b ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: Te(H) }),
|
|
1282
|
+
/* @__PURE__ */ e(
|
|
1283
|
+
"input",
|
|
1284
|
+
{
|
|
1285
|
+
type: "range",
|
|
1286
|
+
min: "0",
|
|
1287
|
+
max: "100",
|
|
1288
|
+
value: F > 0 ? H / F * 100 : 0,
|
|
1289
|
+
onChange: xe,
|
|
1290
|
+
onMouseDown: Ee,
|
|
1291
|
+
onMouseUp: Le,
|
|
1292
|
+
onTouchStart: Ee,
|
|
1293
|
+
onTouchEnd: Le,
|
|
1294
|
+
disabled: !s,
|
|
1295
|
+
className: "ecp-video-seek-input",
|
|
1296
|
+
style: {
|
|
1297
|
+
background: s && F > 0 ? `linear-gradient(to right, ${j} ${H / F * 100}%, #e5e7eb ${H / F * 100}%)` : "#e5e7eb"
|
|
1298
|
+
}
|
|
1812
1299
|
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1300
|
+
),
|
|
1301
|
+
/* @__PURE__ */ e("span", { className: `ecp-video-time ecp-video-time--right${b ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: Te(F) })
|
|
1302
|
+
] }) }),
|
|
1303
|
+
/* @__PURE__ */ c("div", { className: "ecp-video-controls", children: [
|
|
1304
|
+
f.play && /* @__PURE__ */ c(
|
|
1305
|
+
"button",
|
|
1306
|
+
{
|
|
1307
|
+
onClick: Ne,
|
|
1308
|
+
disabled: !s,
|
|
1309
|
+
className: `ecp-video-play-btn${te <= 400 ? " ecp-video-play-btn--compact" : ""}`,
|
|
1310
|
+
style: { backgroundColor: j },
|
|
1311
|
+
children: [
|
|
1312
|
+
/* @__PURE__ */ c("div", { className: "ecp-video-play-icon-wrap", children: [
|
|
1313
|
+
/* @__PURE__ */ e(Pe, { size: 16, style: { position: "absolute", transform: M ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
|
|
1314
|
+
/* @__PURE__ */ e(Me, { size: 16, style: { position: "absolute", transform: M ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
|
|
1315
|
+
] }),
|
|
1316
|
+
te > 400 && (M ? "Pause" : "Play")
|
|
1317
|
+
]
|
|
1318
|
+
}
|
|
1319
|
+
),
|
|
1320
|
+
f.stop && /* @__PURE__ */ e("button", { onClick: he, disabled: !s, className: `ecp-video-stop-btn${b ? " ecp-video-stop-btn--dark" : " ecp-video-stop-btn--light"}`, children: /* @__PURE__ */ e(Ge, { size: 16 }) }),
|
|
1321
|
+
f.fullscreen && /* @__PURE__ */ c(
|
|
1322
|
+
"button",
|
|
1323
|
+
{
|
|
1324
|
+
onClick: Se,
|
|
1325
|
+
className: `ecp-video-fullscreen-btn${b ? " ecp-video-fullscreen-btn--dark" : " ecp-video-fullscreen-btn--light"}${te >= 800 ? " ecp-video-fullscreen-btn--wide" : ""}`,
|
|
1326
|
+
children: [
|
|
1327
|
+
ee ? /* @__PURE__ */ e(at, { size: 16 }) : /* @__PURE__ */ e(rt, { size: 16 }),
|
|
1328
|
+
/* @__PURE__ */ e("span", { style: { display: te < 800 ? "none" : "block" }, children: ee ? "Exit" : "Full" })
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1331
|
+
),
|
|
1332
|
+
f.equalizer && /* @__PURE__ */ c(
|
|
1333
|
+
"button",
|
|
1334
|
+
{
|
|
1335
|
+
onClick: () => R(!de),
|
|
1336
|
+
disabled: !s,
|
|
1337
|
+
className: `ecp-video-eq-toggle-btn${de ? " ecp-video-eq-toggle-btn--on" : " ecp-video-eq-toggle-btn--off"}${te >= 700 ? " ecp-video-eq-toggle-btn--wide" : ""}`,
|
|
1338
|
+
style: de ? { backgroundColor: j } : {},
|
|
1339
|
+
children: [
|
|
1340
|
+
/* @__PURE__ */ e(Fe, { size: 16 }),
|
|
1341
|
+
/* @__PURE__ */ e("span", { style: { display: te < 700 ? "none" : "block" }, children: "EQ" })
|
|
1342
|
+
]
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
f.speed && /* @__PURE__ */ e("div", { className: "ecp-video-speed-wrap", children: /* @__PURE__ */ e("select", { value: oe, onChange: Re, className: `ecp-video-speed-select${b ? " ecp-video-speed-select--dark" : " ecp-video-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((n) => /* @__PURE__ */ c("option", { value: n, className: b ? "ecp-video-speed-option--dark" : "ecp-video-speed-option--light", children: [
|
|
1346
|
+
n,
|
|
1347
|
+
"x"
|
|
1348
|
+
] }, n)) }) }),
|
|
1349
|
+
f.volume && /* @__PURE__ */ c("div", { className: "ecp-video-volume", children: [
|
|
1350
|
+
/* @__PURE__ */ e("button", { onClick: ze, className: "ecp-video-mute-btn", children: z || D === 0 ? /* @__PURE__ */ e(_e, { size: 20, className: b ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) : /* @__PURE__ */ e(De, { size: 20, className: b ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) }),
|
|
1351
|
+
/* @__PURE__ */ e(
|
|
1352
|
+
"input",
|
|
1353
|
+
{
|
|
1354
|
+
type: "range",
|
|
1355
|
+
min: "0",
|
|
1356
|
+
max: "100",
|
|
1357
|
+
value: D,
|
|
1358
|
+
onChange: Ae,
|
|
1359
|
+
className: "ecp-video-vol-slider",
|
|
1360
|
+
style: {
|
|
1361
|
+
background: `linear-gradient(to right, ${j} ${D}%, #e5e7eb ${D}%)`,
|
|
1362
|
+
display: te < 460 ? "none" : "block"
|
|
1866
1363
|
}
|
|
1867
|
-
|
|
1868
|
-
|
|
1364
|
+
}
|
|
1365
|
+
),
|
|
1366
|
+
/* @__PURE__ */ c(
|
|
1367
|
+
"span",
|
|
1368
|
+
{
|
|
1369
|
+
className: `ecp-video-vol-pct${b ? " ecp-video-vol-pct--dark" : " ecp-video-vol-pct--light"}`,
|
|
1370
|
+
style: { display: te < 800 ? "none" : "block" },
|
|
1371
|
+
children: [
|
|
1372
|
+
D,
|
|
1373
|
+
"%"
|
|
1374
|
+
]
|
|
1375
|
+
}
|
|
1376
|
+
)
|
|
1377
|
+
] })
|
|
1378
|
+
] })
|
|
1379
|
+
]
|
|
1380
|
+
}
|
|
1381
|
+
)
|
|
1869
1382
|
}
|
|
1870
1383
|
);
|
|
1871
1384
|
}
|
|
1872
|
-
function
|
|
1873
|
-
const [
|
|
1874
|
-
return /* @__PURE__ */ e("div", { className: "
|
|
1875
|
-
|
|
1876
|
-
/* @__PURE__ */
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
/* @__PURE__ */
|
|
1879
|
-
/* @__PURE__ */ e("h1", { className: `
|
|
1880
|
-
/* @__PURE__ */ e("p", { className: "
|
|
1385
|
+
function Nt() {
|
|
1386
|
+
const [s, l] = m(null), [u, v] = m("No track loaded"), [C, f] = m("purple"), [y, O] = m(!1), [x, j] = m(!1), [I, M] = m("light"), L = h(null);
|
|
1387
|
+
return /* @__PURE__ */ e("div", { className: "ecp-page-wrapper", style: { backgroundColor: I === "dark" ? "#222" : "white" }, children: /* @__PURE__ */ c("div", { className: "ecp-demo-container", children: [
|
|
1388
|
+
y && /* @__PURE__ */ e(vt, { theme: C, setTheme: f, close: () => O(!1) }),
|
|
1389
|
+
/* @__PURE__ */ c("div", { className: "ecp-container-glass", children: [
|
|
1390
|
+
/* @__PURE__ */ c("div", { className: "ecp-demo-header", children: [
|
|
1391
|
+
/* @__PURE__ */ c("div", { children: [
|
|
1392
|
+
/* @__PURE__ */ e("h1", { className: `ecp-demo-title${I === "dark" ? " ecp-demo-title--dark" : ""}`, children: "Audio Visualizer" }),
|
|
1393
|
+
/* @__PURE__ */ e("p", { className: "ecp-demo-subtitle", children: "Professional frequency analyzer" })
|
|
1881
1394
|
] }),
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
"
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
className: "bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
1887
|
-
children: [
|
|
1888
|
-
/* @__PURE__ */ e("span", { children: "🎨" }),
|
|
1889
|
-
" Themes"
|
|
1890
|
-
]
|
|
1891
|
-
}
|
|
1892
|
-
)
|
|
1395
|
+
/* @__PURE__ */ c("button", { onClick: () => O(!y), className: "ecp-theme-btn", children: [
|
|
1396
|
+
/* @__PURE__ */ e("span", { children: "🎨" }),
|
|
1397
|
+
" Themes"
|
|
1398
|
+
] })
|
|
1893
1399
|
] }),
|
|
1894
1400
|
/* @__PURE__ */ e(
|
|
1895
|
-
|
|
1401
|
+
ht,
|
|
1896
1402
|
{
|
|
1897
|
-
audio:
|
|
1898
|
-
name:
|
|
1403
|
+
audio: s || void 0,
|
|
1404
|
+
name: u || void 0,
|
|
1899
1405
|
author: "K.Prabhasha",
|
|
1900
|
-
theme:
|
|
1406
|
+
theme: C,
|
|
1901
1407
|
autoPlay: !1,
|
|
1902
1408
|
thumbnail: "https://cdn-icons-png.flaticon.com/512/3845/3845874.png",
|
|
1903
|
-
mode:
|
|
1904
|
-
transparent:
|
|
1409
|
+
mode: I,
|
|
1410
|
+
transparent: x,
|
|
1905
1411
|
volume: 70,
|
|
1906
1412
|
controls: {
|
|
1907
1413
|
play: !0,
|
|
@@ -1914,69 +1420,58 @@ function bt() {
|
|
|
1914
1420
|
}
|
|
1915
1421
|
}
|
|
1916
1422
|
),
|
|
1917
|
-
/* @__PURE__ */ e(
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
children: [
|
|
1946
|
-
/* @__PURE__ */ e(ct, { size: 16 }),
|
|
1947
|
-
"Load Audio"
|
|
1948
|
-
]
|
|
1949
|
-
}
|
|
1950
|
-
),
|
|
1951
|
-
/* @__PURE__ */ e(
|
|
1952
|
-
"button",
|
|
1953
|
-
{
|
|
1954
|
-
onClick: () => I(U === "dark" ? "light" : "dark"),
|
|
1955
|
-
className: "bg-white border border-gray-300 text-gray-700 px-6 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
1956
|
-
children: U === "dark" ? "Light" : "Dark"
|
|
1957
|
-
}
|
|
1958
|
-
),
|
|
1959
|
-
/* @__PURE__ */ r(
|
|
1960
|
-
"button",
|
|
1961
|
-
{
|
|
1962
|
-
onClick: () => T(!P),
|
|
1963
|
-
className: "bg-white border border-gray-300 text-gray-700 px-6 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
1964
|
-
children: [
|
|
1965
|
-
"Transparent: ",
|
|
1966
|
-
String(P)
|
|
1967
|
-
]
|
|
1423
|
+
/* @__PURE__ */ e(
|
|
1424
|
+
bt,
|
|
1425
|
+
{
|
|
1426
|
+
audio: s || "",
|
|
1427
|
+
width: 400,
|
|
1428
|
+
thumbnail: "https://cdn-icons-png.flaticon.com/512/8316/8316619.png",
|
|
1429
|
+
autoPlay: !1,
|
|
1430
|
+
gradient: ["#26ce3aff", "#39eed9ff"],
|
|
1431
|
+
background: "#c0ffefff"
|
|
1432
|
+
}
|
|
1433
|
+
),
|
|
1434
|
+
/* @__PURE__ */ e(
|
|
1435
|
+
gt,
|
|
1436
|
+
{
|
|
1437
|
+
audio: s || "",
|
|
1438
|
+
thumbnail: "https://cdn-icons-png.flaticon.com/512/17524/17524837.png",
|
|
1439
|
+
autoPlay: !1,
|
|
1440
|
+
gradient: ["#26ce3aff", "#39eed9ff"],
|
|
1441
|
+
background: "#c0ffefff"
|
|
1442
|
+
}
|
|
1443
|
+
),
|
|
1444
|
+
/* @__PURE__ */ c("div", { className: "ecp-demo-actions", children: [
|
|
1445
|
+
/* @__PURE__ */ e("input", { type: "file", ref: L, onChange: (F) => {
|
|
1446
|
+
var D;
|
|
1447
|
+
const P = (D = F.target.files) == null ? void 0 : D[0];
|
|
1448
|
+
if (P) {
|
|
1449
|
+
const k = URL.createObjectURL(P);
|
|
1450
|
+
l(k), v(P.name);
|
|
1968
1451
|
}
|
|
1969
|
-
)
|
|
1452
|
+
}, accept: "audio/*", className: "ecp-file-input-hidden" }),
|
|
1453
|
+
/* @__PURE__ */ c("button", { onClick: () => {
|
|
1454
|
+
var F;
|
|
1455
|
+
return (F = L.current) == null ? void 0 : F.click();
|
|
1456
|
+
}, className: "ecp-action-btn", children: [
|
|
1457
|
+
/* @__PURE__ */ e(pt, { size: 16 }),
|
|
1458
|
+
"Load Audio"
|
|
1459
|
+
] }),
|
|
1460
|
+
/* @__PURE__ */ e("button", { onClick: () => M(I === "dark" ? "light" : "dark"), className: "ecp-action-btn", children: I === "dark" ? "Light" : "Dark" }),
|
|
1461
|
+
/* @__PURE__ */ c("button", { onClick: () => j(!x), className: "ecp-action-btn", children: [
|
|
1462
|
+
"Transparent: ",
|
|
1463
|
+
String(x)
|
|
1464
|
+
] })
|
|
1970
1465
|
] })
|
|
1971
1466
|
] })
|
|
1972
1467
|
] }) });
|
|
1973
1468
|
}
|
|
1974
1469
|
export {
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1470
|
+
Nt as DemoVisualizePlayer,
|
|
1471
|
+
gt as NanoAudioPlayer,
|
|
1472
|
+
vt as ThemeSelector,
|
|
1473
|
+
wt as VideoPlayer,
|
|
1474
|
+
ht as VisualizePlayer,
|
|
1475
|
+
bt as WaveAudioPlayer,
|
|
1476
|
+
ge as themes
|
|
1982
1477
|
};
|