diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/assets/editor-ZU6HErFm.js b/assets/editor-ZU6HErFm.js new file mode 100644 index 00000000..3c5acd8f --- /dev/null +++ b/assets/editor-ZU6HErFm.js @@ -0,0 +1 @@ +import{a as U,A as u,s as O,S as h,L as j,t as w,j as e,O as G,C as I,D as L,p as E,R as V,b as A,U as B}from"./index-0wKaPtT5.js";import{c as M}from"./gistapi-W_qTkofq.js";import{l as D}from"./lrc-file-name-sR0E2KGQ.js";const r={autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:!1},c=(a,s)=>{const t=((i,d)=>i??d)(s,React.useRef(null));return React.useEffect(()=>{t.current&&(t.current.value=a)},[a,t]),{ref:t,defaultValue:a}},P=({lrcState:a,lrcDispatch:s})=>{const{prefState:m,lang:t,trimOptions:i}=React.useContext(U),d=React.useCallback(o=>{s({type:u.parse,payload:{text:o.target.value,options:i}})},[s,i]),R=React.useCallback(o=>{const{name:l,value:N}=o.target;s({type:u.info,payload:{name:l,value:N}})},[s]),g=O(a,m),f=React.useRef(null),b=React.useCallback(()=>{sessionStorage.setItem(h.editorDetailsOpen,f.current.open.toString())},[]),C=React.useMemo(()=>sessionStorage.getItem(h.editorDetailsOpen)!=="false",[]),n=React.useRef(null),[y,k]=React.useState(void 0),F=React.useCallback(()=>{k(o=>(o&&URL.revokeObjectURL(o),URL.createObjectURL(new Blob([n.current.value],{type:"text/plain;charset=UTF-8"}))))},[]),S=React.useCallback(o=>{if(o.target.files===null||o.target.files.length===0)return;const l=new FileReader;l.addEventListener("load",()=>{s({type:u.parse,payload:{text:l.result,options:i}})}),l.readAsText(o.target.files[0],"UTF-8")},[s,i]),T=React.useCallback(()=>{var o;(o=n.current)==null||o.select(),document.execCommand("copy")},[]),p=React.useMemo(()=>D(a.info),[a.info]),x=React.useMemo(()=>localStorage.getItem(j.token)!==null&&localStorage.getItem(j.gistId)!==null,[]),v=React.useCallback(()=>{setTimeout(()=>{const o=prompt(t.editor.saveFileName,p);o&&M(o,n.current.value).catch(l=>{w.pub({type:"warning",text:l.message})})},500)},[p,t]);return e.jsxs("div",{className:"app-editor",children:[e.jsxs("details",{ref:f,open:C,onToggle:b,children:[e.jsx("summary",{children:t.editor.metaInfo}),e.jsxs("section",{className:"app-editor-infobox",onBlur:R,children:[e.jsx("label",{htmlFor:"info-ti",children:"[ti:"}),e.jsx("input",{id:"info-ti",name:"ti",placeholder:t.editor.title,...r,...c(a.info.get("ti")||"")}),e.jsx("label",{htmlFor:"info-ti",children:"]"}),e.jsx("label",{htmlFor:"info-ar",children:"[ar:"}),e.jsx("input",{id:"info-ar",name:"ar",placeholder:t.editor.artist,...r,...c(a.info.get("ar")||"")}),e.jsx("label",{htmlFor:"info-ar",children:"]"}),e.jsx("label",{htmlFor:"info-al",children:"[al:"}),e.jsx("input",{id:"info-al",name:"al",placeholder:t.editor.album,...r,...c(a.info.get("al")||"")}),e.jsx("label",{htmlFor:"info-al",children:"]"})]})]}),e.jsxs("section",{className:"editor-tools",children:[e.jsxs("label",{className:"editor-tools-item ripple",title:t.editor.uploadText,children:[e.jsx("input",{hidden:!0,type:"file",accept:"text/*, .txt, .lrc",onChange:S}),e.jsx(G,{})]}),e.jsx("button",{className:"editor-tools-item ripple",title:t.editor.copyText,onClick:T,children:e.jsx(I,{})}),e.jsx("a",{className:"editor-tools-item ripple",title:t.editor.downloadText,href:y,onClick:F,download:p,children:e.jsx(L,{})}),e.jsx("a",{title:t.editor.saveToGist,href:x?void 0:E(V.gist),className:"editor-tools-item ripple",onClick:x?v:void 0,children:e.jsx(A,{})}),e.jsx("a",{title:t.editor.utils,href:"/lrc-utils/",className:"editor-tools-item ripple",children:e.jsx(B,{})})]}),e.jsx("textarea",{className:"app-textarea","aria-label":"lrc input here",onBlur:d,...r,...c(g,n)})]})};export{P as Eidtor}; diff --git a/assets/en-US-zc2O-JdV.js b/assets/en-US-zc2O-JdV.js new file mode 100644 index 00000000..5f91436f --- /dev/null +++ b/assets/en-US-zc2O-JdV.js @@ -0,0 +1 @@ +const e={languageName:"English",app:{name:"LRC Maker",fullname:"Akari's LRC Maker"},header:{home:"home",editor:"editor",synchronizer:"synchronizer",gist:"Github Gist",preferences:"preferences"},audio:{loadAudio:"load audio",play:"play",pause:"pause",replay5s:"replay 5s",forward5s:"forward 5s",resetRate:"reset playback rate",error:["audio error","audio aborted by user","audio network error","audio decoding error","audio not supported"]},loadAudio:{file:"File",url:"URL",loadFile:"Click here or drop audio file in this page"},home:{tips:"Tips",tipForLyricText:"Navigate to the editor page and paste lyric text.",tipForUploadAudio:"Click the bottom left button to load audio file.",tipForSynchronizer:"Navigate to synchronizer page and make your lrc :)",tipTopLeft:"Click here come back to this page",tipTopRight:"Click here to navigate to other page",tipBottomLeft:"load audio here, and control the audio",tipBottomRight:"change the playback rate here"},editor:{metaInfo:"meta info",album:"album",title:"title",artist:"artist",uploadText:"upload text",copyText:"select all and copy",downloadText:"download",saveToGist:"save to Github Gist",saveFileName:"Filename",utils:"lrc utils"},gist:{newTokenTip:"LRC Maker use Github Token to fetch and store data to Github Gist",newTokenButton:"Generate a new Github Token",newGistTip:"Create a new Gist repository or assign an existing Gist id",newGistRepoButton:"Create a new Gist Repository",gistIdPlaceholder:"Or assign an existing Gist id",info:"info",clearTokenAndGist:"Clear token and Gist id"},preferences:{version:"Version",commitHash:"Commit hash",updateTime:"Update time",repo:"Repository",help:"Help & tips",language:"Language",builtInAudio:"Use browser built-in audio player",spaceButton:"On-screen space key",themeColor:"Theme color",lrcFormat:"Change output format",fixed:"Timestamp fixed",leftSpace:"Left space",rightSpace:"Right space",clearCache:"Clear caches",themeMode:{label:"Theme Mode",auto:"auto",light:"light",dark:"dark"}},notify:{audioLoaded:"Audio loaded."}};export{e as default}; diff --git a/assets/gist-XoEDJ46b.js b/assets/gist-XoEDJ46b.js new file mode 100644 index 00000000..6ee440cd --- /dev/null +++ b/assets/gist-XoEDJ46b.js @@ -0,0 +1 @@ +import{a as M,L as c,S as _,t as d,A as S,j as e,G as y,m as B,n as z,p as G,R as C,E as J,o as P}from"./index-0wKaPtT5.js";import{a as V,b as q,g as H,G as T,d as K}from"./gistapi-W_qTkofq.js";const U="https://github.com/settings/tokens/new?scopes=gist&description=https://lrc-maker.github.io",L={autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:!1},X=({lrcDispatch:g,langName:f})=>{const{lang:n,trimOptions:p}=React.useContext(M),[u,k]=React.useState(()=>localStorage.getItem(c.token)),[a,h]=React.useState(()=>localStorage.getItem(c.gistId)),[x,F]=React.useState(void 0),[r,v]=React.useState(()=>JSON.parse(localStorage.getItem(c.gistFile))),m=React.useMemo(()=>JSON.parse(sessionStorage.getItem(_.ratelimit)),[]),j=React.useCallback(t=>{t.preventDefault();const l=t.target.elements.namedItem("token").value;localStorage.setItem(c.token,l),k(l)},[]),b=React.useCallback(()=>{V().then(t=>{localStorage.setItem(c.gistId,t.id),h(t.id)}).catch(t=>{d.pub({type:"warning",text:t.message})})},[]),N=React.useCallback(t=>{t.preventDefault();const l=t.target.elements.namedItem("gist-id").value;localStorage.setItem(c.gistId,l),h(l),q().catch(o=>{d.pub({type:"warning",text:o.message})})},[]);React.useEffect(()=>{a!==null||u===null||"HTMLDataListElement"in window&&H().then(t=>{F(t.filter(s=>s.description===T.description&&T.fileName in s.files).map(({id:s})=>s))}).catch(t=>{d.pub({type:"warning",text:t.message})})},[u,a]),React.useEffect(()=>{a!==null&&K().then(t=>{if(t===null)return;const s=Object.values(t.files).filter(i=>i.filename.endsWith(".lrc"));localStorage.setItem(c.gistFile,JSON.stringify(s,["filename","content","truncated","raw_url"])),v(s)}).catch(t=>{d.pub({type:"warning",text:t.message})})},[a]);const I=React.useCallback(t=>{const s=t.target;if(!("key"in s.dataset))return;const i=Number.parseInt(s.dataset.key,10),l=r==null?void 0:r[i];l&&(l.truncated?fetch(l.raw_url).then(async o=>o.text()).then(o=>{g({type:S.parse,payload:{text:o,options:p}})}).catch(o=>{d.pub({type:"warning",text:o.message})}):g({type:S.parse,payload:{text:l.content,options:p}}))},[r,g,p]),w=React.useCallback(()=>{h(null),k(null)},[]),R=React.useMemo(()=>{if(m===null)return!1;const t=new Intl.DateTimeFormat(f,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).format(new Date(Number.parseInt(m["x-ratelimit-reset"],10)*1e3));return e.jsxs("section",{className:"ratelimit",children:[e.jsxs("p",{children:["ratelimit-limit: ",m["x-ratelimit-limit"]]}),e.jsxs("p",{children:["ratelimit-remaining: ",m["x-ratelimit-remaining"]]}),e.jsxs("p",{children:["ratelimit-reset: ",t]})]})},[m,f]),O=React.useCallback(()=>a!==null&&u!==null?e.jsxs("details",{className:"gist-details",children:[e.jsx("summary",{children:n.gist.info}),e.jsxs("section",{className:"gist-bar",children:[e.jsxs("section",{className:"gist-info",children:[e.jsxs("p",{children:["Gist id: ",e.jsx("a",{href:`https://gist.github.com/${a}`,target:"_blank",rel:"noopener noreferrer",className:"link",children:a})]}),e.jsx("button",{className:"button",onClick:w,children:n.gist.clearTokenAndGist})]}),R]})]}):null,[a,u,n.gist.info,n.gist.clearTokenAndGist,w,R]),E=React.useMemo(()=>{if(u===null)return e.jsxs("section",{className:"new-token",children:[e.jsx(y,{}),e.jsx("p",{className:"new-token-tip-text",children:n.gist.newTokenTip}),e.jsx("a",{className:"new-token-tip button",target:"_blank",rel:"noopener noreferrer",href:U,children:n.gist.newTokenButton}),e.jsxs("form",{className:"new-token-form",onSubmit:j,children:[e.jsx("label",{htmlFor:"github-token",children:"Token:"}),e.jsx("input",{type:"text",className:"new-token-input",id:"github-token",name:"token",minLength:40,maxLength:40,required:!0,...L},"token"),e.jsx("input",{className:"new-token-submit button",type:"submit"})]})]})},[u,n.gist.newTokenTip,n.gist.newTokenButton,j]),A=React.useMemo(()=>{if(a===null){const t=i=>e.jsx("option",{value:i},i),s=x&&e.jsxs("datalist",{id:"gist-list",children:[x.map(i=>t(i)),";"]});return e.jsxs("section",{className:"get-gist-id",children:[e.jsx(y,{}),e.jsx("p",{className:"gist-id-tip-text",children:n.gist.newGistTip}),e.jsx("button",{className:"create-new-gist button",onClick:b,children:n.gist.newGistRepoButton}),e.jsxs("form",{className:"gist-id-form",onSubmit:N,children:[e.jsx("label",{htmlFor:"gist-id",children:"Gist id:"}),e.jsx("input",{type:"text",className:"gist-id-input",id:"gist-id",name:"gist-id",list:"gist-list",placeholder:n.gist.gistIdPlaceholder,required:!0,...L},"gist-id"),e.jsx("input",{className:"button",type:"submit"}),s]})]})}},[a,x,n.gist.newGistTip,n.gist.newGistRepoButton,n.gist.gistIdPlaceholder,b,N]),D=React.useMemo(()=>{if(r!==null){const t=(s,i)=>e.jsxs("article",{className:"file-item",children:[e.jsx("section",{className:"file-content",children:s.content}),e.jsx("hr",{}),e.jsxs("section",{className:"file-bar",children:[e.jsx("span",{className:"file-title",children:s.filename}),e.jsxs("span",{className:"file-action",children:[e.jsx("a",{className:"file-load",href:G(C.editor),"data-key":i,children:e.jsx(J,{})}),e.jsx("a",{className:"file-load",href:G(C.synchronizer),"data-key":i,children:e.jsx(P,{})})]})]})]},s.raw_url);return r.length===0?e.jsx("section",{className:"gist-no-data",children:e.jsx(B,{})}):e.jsx("section",{className:"file-list",onClick:I,children:r.map(t)})}},[r,I]);return e.jsxs("div",{className:"gist",children:[e.jsx(O,{}),E||A||D||e.jsx(W,{})]})},W=()=>e.jsx("section",{className:"gist-loading",children:e.jsx(z,{})});export{X as Gist}; diff --git a/assets/gistapi-W_qTkofq.js b/assets/gistapi-W_qTkofq.js new file mode 100644 index 00000000..5db5d149 --- /dev/null +++ b/assets/gistapi-W_qTkofq.js @@ -0,0 +1 @@ +import{L as o,S as c}from"./index-0wKaPtT5.js";const a={description:"https://lrc-maker.github.io",fileName:".lrc-maker",fileContent:"This file is used to be tracked and identified by https://lrc-maker.github.io"},n="https://api.github.com/gists",g=async()=>{const s=localStorage.getItem(o.token),t=await fetch(n,{method:"GET",headers:{Authorization:`token ${s}`},mode:"cors"});if(!t.ok)throw new Error(t.statusText);return t.json()},m=async()=>{const s=localStorage.getItem(o.token),t=await fetch(n,{method:"POST",headers:{Authorization:`token ${s}`},body:JSON.stringify({description:a.description,public:!0,files:{[a.fileName]:{content:a.fileContent}}})});if(!t.ok)throw new Error(t.statusText);return t.json()},h=async()=>{const s=localStorage.getItem(o.token),t=localStorage.getItem(o.gistId),i=await fetch(`${n}/${t}`,{method:"PATCH",headers:{Authorization:`token ${s}`},body:JSON.stringify({description:a.description,files:{[a.fileName]:{content:a.fileContent}}})});if(!i.ok)throw new Error(i.statusText);return i.json()},d=async()=>{const s=localStorage.getItem(o.token),t=localStorage.getItem(o.gistId),i=localStorage.getItem(o.gistEtag),e=await fetch(`${n}/${t}`,{headers:{Authorization:`token ${s}`,"If-None-Match":i}});if(!e.ok&&e.status>=400)throw await e.json();localStorage.setItem(o.gistEtag,e.headers.get("etag"));const r={"x-ratelimit-limit":e.headers.get("x-ratelimit-limit"),"x-ratelimit-remaining":e.headers.get("x-ratelimit-remaining"),"x-ratelimit-reset":e.headers.get("x-ratelimit-reset")};return sessionStorage.setItem(c.ratelimit,JSON.stringify(r)),e.status===200?e.json():null},f=async(s,t)=>{const i=localStorage.getItem(o.token),e=localStorage.getItem(o.gistId),r=await fetch(`${n}/${e}`,{method:"PATCH",headers:{Authorization:`token ${i}`},body:JSON.stringify({files:{[s]:{content:t}}})});if(!r.ok)throw new Error(r.statusText);return r.json()};export{a as G,m as a,h as b,f as c,d,g}; diff --git a/assets/index-0wKaPtT5.js b/assets/index-0wKaPtT5.js new file mode 100644 index 00000000..af2f1d5e --- /dev/null +++ b/assets/index-0wKaPtT5.js @@ -0,0 +1,16 @@ +const de=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),he=function(e,n){return new URL(e,n).href},B={},y=function(n,s,r){if(!s||s.length===0)return n();const a=document.getElementsByTagName("link");return Promise.all(s.map(o=>{if(o=he(o,r),o in B)return;B[o]=!0;const c=o.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!r)for(let u=a.length-1;u>=0;u--){const f=a[u];if(f.href===o&&(!c||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${d}`))return;const l=document.createElement("link");if(l.rel=c?"stylesheet":de,c||(l.as="script",l.crossOrigin=""),l.href=o,document.head.appendChild(l),c)return new Promise((u,f)=>{l.addEventListener("load",u),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>n()).catch(o=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o})};var W={exports:{}},O={};const pe=React;/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var me=pe,fe=Symbol.for("react.element"),ge=Symbol.for("react.fragment"),xe=Object.prototype.hasOwnProperty,ye=me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,we={key:!0,ref:!0,__self:!0,__source:!0};function J(e,n,s){var r,a={},o=null,c=null;s!==void 0&&(o=""+s),n.key!==void 0&&(o=""+n.key),n.ref!==void 0&&(c=n.ref);for(r in n)xe.call(n,r)&&!we.hasOwnProperty(r)&&(a[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps,n)a[r]===void 0&&(a[r]=n[r]);return{$$typeof:fe,type:e,key:o,ref:c,props:a,_owner:ye.current}}O.Fragment=ge;O.jsx=J;O.jsxs=J;W.exports=O;var t=W.exports;const N={lyric:"lrc-maker-lyric",preferences:"lrc-maker-preferences",token:"lrc-maker-oauth-token",gistId:"lrc-maker-gist-id",gistEtag:"lrc-maker-gist-etag",gistFile:"lrc-maker-gist-file"},Q={emptyString:"",space:" "},ve={languageName:"English",app:{name:"LRC Maker",fullname:"Akari's LRC Maker"},header:{home:"home",editor:"editor",synchronizer:"synchronizer",gist:"Github Gist",preferences:"preferences"},audio:{loadAudio:"load audio",play:"play",pause:"pause",replay5s:"replay 5s",forward5s:"forward 5s",resetRate:"reset playback rate",error:["audio error","audio aborted by user","audio network error","audio decoding error","audio not supported"]},loadAudio:{file:"File",url:"URL",loadFile:"Click here or drop audio file in this page"},home:{tips:"Tips",tipForLyricText:"Navigate to the editor page and paste lyric text.",tipForUploadAudio:"Click the bottom left button to load audio file.",tipForSynchronizer:"Navigate to synchronizer page and make your lrc :)",tipTopLeft:"Click here come back to this page",tipTopRight:"Click here to navigate to other page",tipBottomLeft:"load audio here, and control the audio",tipBottomRight:"change the playback rate here"},editor:{metaInfo:"meta info",album:"album",title:"title",artist:"artist",uploadText:"upload text",copyText:"select all and copy",downloadText:"download",saveToGist:"save to Github Gist",saveFileName:"Filename",utils:"lrc utils"},gist:{newTokenTip:"LRC Maker use Github Token to fetch and store data to Github Gist",newTokenButton:"Generate a new Github Token",newGistTip:"Create a new Gist repository or assign an existing Gist id",newGistRepoButton:"Create a new Gist Repository",gistIdPlaceholder:"Or assign an existing Gist id",info:"info",clearTokenAndGist:"Clear token and Gist id"},preferences:{version:"Version",commitHash:"Commit hash",updateTime:"Update time",repo:"Repository",help:"Help & tips",language:"Language",builtInAudio:"Use browser built-in audio player",spaceButton:"On-screen space key",themeColor:"Theme color",lrcFormat:"Change output format",fixed:"Timestamp fixed",leftSpace:"Left space",rightSpace:"Right space",clearCache:"Clear caches",themeMode:{label:"Theme Mode",auto:"auto",light:"light",dark:"dark"}},notify:{audioLoaded:"Audio loaded."}},be=Object.assign({"./en-US.json":()=>y(()=>import("./en-US-zc2O-JdV.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default),"./ja.json":()=>y(()=>import("./ja-GcgVr18M.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default),"./ko-KR.json":()=>y(()=>import("./ko-KR-yW8HIalv.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default),"./pt-BR.json":()=>y(()=>import("./pt-BR-DSi-64D4.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default),"./zh-CN.json":()=>y(()=>import("./zh-CN-IS2wiGhF.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default),"./zh-HK.json":()=>y(()=>import("./zh-HK--aRTSL7g.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default),"./zh-TW.json":()=>y(()=>import("./zh-TW-FFP4ehVz.js"),__vite__mapDeps([]),import.meta.url).then(e=>e.default)}),je=()=>{const[e,n]=React.useState(ve),s=async r=>{const a=await be[`./${r}.json`]();n(a)};return[e,React.useCallback(async r=>s(r),[])]};var Re=["en-US","ja","ko-KR","pt-BR","zh-CN","zh-HK","zh-TW"];const ke={orange:"#ff691f",yellow:"#fab81e",lime:"#7fdbb6",green:"#19cf86",blue:"#91d2fa",navy:"#1b95e0",grey:"#abb8c2",red:"#e81c4f",pink:"#f58ea8",purple:"#c877fe"};var T=(e=>(e[e.auto=0]="auto",e[e.light=1]="light",e[e.dark=2]="dark",e))(T||{});const K={lang:"en-US",spaceStart:1,spaceEnd:0,fixed:3,builtInAudio:!1,screenButton:!1,themeColor:ke.pink,themeMode:0},Se=(e,n)=>{const s=n.payload;return{...e,[n.type]:typeof s=="function"?s(e):s}},Le=Re,Ee=e=>{const n=K,s=navigator.languages||[navigator.language||"en-US"];n.lang=s.map(r=>r==="zh"?"zh-CN":r.startsWith("en")?"en-US":r).find(r=>Le.includes(r))||"en-US";try{const r=JSON.parse(e()),a=Object.keys(K);for(const o of a)o in r&&(n[o]=r[o])}catch{}return n},ze=e=>React.useReducer(Se,e,Ee),U=()=>{const e=new Map;return{pub:r=>{e.forEach(a=>{a(r)})},sub:(r,a)=>(e.set(r,a),()=>{e.delete(r)})}},Ce=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"})]}),X=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})]}),Y=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),t.jsx("path",{d:"M4 21h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 9.21v5.59c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.8a.5.5 0 0 0-.85.36zM8.6 17H20c.55 0 1-.45 1-1s-.45-1-1-1H8.6c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1zm5.6 5H20c.55 0 1-.45 1-1s-.45-1-1-1H8.6c-.55 0-1 .45-1 1s.45 1 1 1zm0 4H20c.55 0 1-.45 1-1s-.45-1-1-1H8.6c-.55 0-1 .45-1 1s.45 1 1 1z"})]}),Ie=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z"})]}),Me=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M19.44 12.99l-.01.02c.04-.33.08-.67.08-1.01 0-.34-.03-.66-.07-.99l.01.02 2.44-1.92-2.43-4.22-2.87 1.16.01.01c-.52-.4-1.09-.74-1.71-1h.01L14.44 2H9.57l-.44 3.07h.01c-.62.26-1.19.6-1.71 1l.01-.01-2.88-1.17-2.44 4.22 2.44 1.92.01-.02c-.04.33-.07.65-.07.99 0 .34.03.68.08 1.01l-.01-.02-2.1 1.65-.33.26 2.43 4.2 2.88-1.15-.02-.04c.53.41 1.1.75 1.73 1.01h-.03L9.58 22h4.85s.03-.18.06-.42l.38-2.65h-.01c.62-.26 1.2-.6 1.73-1.01l-.02.04 2.88 1.15 2.43-4.2s-.14-.12-.33-.26l-2.11-1.66zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"})]}),_e=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"})}),Ne=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"})}),Te=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M12 5V2.21c0-.45-.54-.67-.85-.35l-3.8 3.79c-.2.2-.2.51 0 .71l3.79 3.79c.32.31.86.09.86-.36V7c3.73 0 6.68 3.42 5.86 7.29-.47 2.26-2.14 3.99-4.39 4.53-3.64.88-6.93-1.6-7.42-4.96-.06-.49-.48-.86-.97-.86-.6 0-1.08.53-1 1.13.63 4.47 4.94 7.75 9.77 6.67 3.09-.69 5.39-3.08 5.99-6.19C20.84 9.48 16.94 5 12 5zm-1.31 8.9l.25-2.17h2.39v.71h-1.7l-.11.92c.03-.02.07-.03.11-.05s.09-.04.15-.05.12-.03.18-.04.13-.02.2-.02c.21 0 .39.03.55.1s.3.16.41.28.2.27.25.45.09.38.09.6c0 .19-.03.37-.09.54s-.15.32-.27.45-.27.24-.45.31-.39.12-.64.12c-.18 0-.36-.03-.53-.08s-.32-.14-.46-.24-.24-.24-.32-.39-.13-.33-.13-.53h.84c.02.18.08.32.19.41s.25.15.42.15c.11 0 .2-.02.27-.06s.14-.1.18-.17.08-.15.11-.25.03-.2.03-.31-.01-.21-.04-.31-.07-.17-.13-.24-.13-.12-.21-.15-.19-.05-.3-.05c-.08 0-.15.01-.2.02s-.11.03-.15.05-.08.05-.12.07-.07.06-.1.09l-.67-.16z"})}),Ve=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M18.87 13c-.5 0-.91.37-.98.86-.48 3.37-3.77 5.84-7.42 4.96-2.25-.54-3.91-2.27-4.39-4.53C5.27 10.42 8.22 7 11.95 7v2.79c0 .45.54.67.85.35l3.79-3.79c.2-.2.2-.51 0-.71L12.8 1.85c-.31-.31-.85-.09-.85.35V5c-4.94 0-8.84 4.48-7.84 9.6.6 3.11 2.9 5.5 5.99 6.19 4.83 1.08 9.15-2.2 9.77-6.67.09-.59-.4-1.12-1-1.12zm-6.44 2.15c-.05.07-.11.13-.18.17s-.17.06-.27.06c-.17 0-.31-.05-.42-.15s-.17-.24-.19-.41h-.84c.01.2.05.37.13.53s.19.28.32.39.29.19.46.24.35.08.53.08c.24 0 .46-.04.64-.12s.33-.18.45-.31.21-.28.27-.45.09-.35.09-.54c0-.22-.03-.43-.09-.6s-.14-.33-.25-.45-.25-.22-.41-.28-.34-.1-.55-.1c-.07 0-.14.01-.2.02s-.13.02-.18.04-.1.03-.15.05-.08.04-.11.05l.11-.92h1.7v-.71H10.9l-.25 2.17.67.17c.03-.03.06-.06.1-.09s.07-.05.12-.07.1-.04.15-.05.13-.02.2-.02c.12 0 .22.02.3.05s.16.09.21.15.1.14.13.24.04.19.04.31-.01.22-.03.31-.06.17-.11.24z"})}),Z=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.9 2 2 2h3c.55 0 1-.45 1-1s-.45-1-1-1H5V8h14v10h-3c-.55 0-1 .45-1 1s.45 1 1 1h3c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7.35 6.35l-2.79 2.79c-.32.32-.1.86.35.86H11v5c0 .55.45 1 1 1s1-.45 1-1v-5h1.79c.45 0 .67-.54.35-.85l-2.79-2.79c-.19-.2-.51-.2-.7-.01z"})]}),He=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{opacity:".3",d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm4 10.59L14.59 16 12 13.41 9.41 16 8 14.59 10.59 12 8 9.41 9.41 8 12 10.59 14.59 8 16 9.41 13.41 12 16 14.59z"}),t.jsx("path",{d:"M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})]}),ct=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M19 13v5c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1v-5c0-.55-.45-1-1-1s-1 .45-1 1v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1zm-6-.33l1.88-1.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-3.59 3.59c-.39.39-1.02.39-1.41 0L7.7 12.2c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L11 12.67V4c0-.55.45-1 1-1s1 .45 1 1v8.67z"})]}),it=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{className:"lock-open",d:"M12 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6-5h-1V6c0-2.76-2.24-5-5-5-2.28 0-4.27 1.54-4.84 3.75-.14.54.18 1.08.72 1.22.53.14 1.08-.18 1.22-.72C9.44 3.93 10.63 3 12 3c1.65 0 3 1.35 3 3v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 11c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v8z"}),t.jsx("path",{className:"lock-close",d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z"})]}),lt=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})]}),ut=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M9.17 6l2 2H20v10H4V6h5.17M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})]}),dt=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"})]}),ht=()=>t.jsx("svg",{className:"github-svg",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 16 16",children:t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"})}),De=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"})]}),Oe=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"})]}),Fe=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0V0z"}),t.jsx("path",{d:"M2.73 21h18.53c.77 0 1.25-.83.87-1.5l-9.27-16c-.39-.67-1.35-.67-1.73 0l-9.27 16c-.38.67.1 1.5.87 1.5zM13 18h-2v-2h2v2zm-1-4c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1z"})]}),pt=()=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[t.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),t.jsx("path",{d:"M8.2 10.5c-.4-.3-1-.5-1.5-.4 0 0-3.6-3-4.3-4.3-.5-1-.6-2.8 0-3.4.6-.6 2.4-.5 3.4 0C7 3.1 10 6.7 10 6.7c0 .6 0 1.1.4 1.6l-2.3 2.2zM18.7 17.8l.3-.2 1 .9 2 3-.5.5-3-1.9-1-1.1.3-.3L14 15l1-1 3.7 3.9z"}),t.jsx("path",{d:"M13.2 7.8c-.5-1.6 0-3.3 1.1-4.5a4.5 4.5 0 0 1 4.4-1.1L16 4.7l.7 2.5 2.5.7 2.5-2.5c.4 1.5 0 3.1-1.1 4.3a4.5 4.5 0 0 1-4.6 1.1L5.6 21.4a2.1 2.1 0 0 1-3 0c-.8-.8-.8-2.2 0-3L13.2 7.8zM3.9 21c.5 0 .8-.3.8-.8a.8.8 0 1 0-1.6 0c0 .5.4.8.8.8z"})]}),S=U(),Pe={id:0},ee=()=>{const e=React.useRef(Symbol(ee.name)),[n,s]=React.useState([]);React.useEffect(()=>S.sub(e.current,o=>{s(c=>[{id:Pe.id++,...o},...c])}),[]);const r=React.useCallback(o=>{o.animationName==="slide-out-right"&&s(c=>c.slice(0,-1))},[]),a=React.useCallback(o=>{const c={info:t.jsx(Oe,{}),success:t.jsx(De,{}),warning:t.jsx(Fe,{})}[o.type];return t.jsxs("section",{className:"toast",children:[t.jsx("section",{className:`toast-badge toast-${o.type}`,children:c}),t.jsx("section",{className:"toast-text",children:o.text})]},o.id)},[]);return t.jsx("div",{className:"toast-queue",onAnimationEnd:r,children:n.map(a)})};var z=(e=>(e[e.lang=1]="lang",e[e.builtInAudio=2]="builtInAudio",e[e.prefState=4]="prefState",e))(z||{});const I=React.createContext(void 0,(e,n)=>{let s=0;return e.lang!==n.lang&&(s|=1),e.prefState.builtInAudio!==n.prefState.builtInAudio&&(s|=2),e.prefState!==n.prefState&&(s|=4),s}),Ae=({children:e})=>{const[n,s]=ze(()=>localStorage.getItem(N.preferences)||Q.emptyString),[r,a]=je();React.useEffect(()=>{a(n.lang).catch(c=>{S.pub({type:"warning",text:c.message})})},[n.lang,a]),React.useEffect(()=>{document.title=r.app.fullname,document.documentElement.lang=n.lang},[r,n,n.lang]);const o=React.useMemo(()=>({lang:r,prefState:n,prefDispatch:s,trimOptions:{trimStart:n.spaceStart>=0,trimEnd:n.spaceEnd>=0}}),[r,s,n]);return t.jsx(I.Provider,{value:o,children:e})},m={home:"/",editor:"/editor/",synchronizer:"/synchronizer/",gist:"/gist/",preferences:"/preferences/"},C={audioSrc:"audio-src",editorDetailsOpen:"editor-details-open",syncMode:"sync-mode",selectIndex:"select-index",ratelimit:"x-ratelimit"},te=(e,n={})=>{const{trimStart:s=!1,trimEnd:r=!1}=n,a=e.split(/\r\n|\n|\r/u),o=/\[\s*(\d{1,3}):(\d{1,2}(?:[:.]\d{1,3})?)\s*]/g,c=/\[\s*(\w{1,6})\s*:(.*?)]/,d=new Map,i=[];for(const l of a){if(l[0]!=="["){i.push({text:l});continue}o.lastIndex=0;const u=o.exec(l);if(u!==null){const x=Number.parseInt(u[1],10),L=Number.parseFloat(u[2].replace(":",".")),g=l.slice(o.lastIndex);i.push({time:x*60+L,text:g});continue}const f=c.exec(l);if(f!==null){const x=f[2].trim();if(x==="")continue;d.set(f[1],x);continue}i.push({text:l})}return s&&r?i.forEach(l=>{l.text=l.text.trim()}):s?i.forEach(l=>{l.text=l.text.trimStart()}):r&&i.forEach(l=>{l.text=l.text.trimEnd()}),{info:d,lyric:i}},A=new Map,Ge=e=>{if(A.has(e))return A.get(e);const n=new Intl.NumberFormat("en",{minimumIntegerDigits:2,minimumFractionDigits:e,maximumFractionDigits:e,useGrouping:!1});return A.set(e,n),n},D=(e,n,s=!0)=>{if(e===void 0)return"";const r=Ge(n),a=Math.floor(e/60).toString().padStart(2,"0"),o=r.format(e%60);return s?`[${a}:${o}]`:`${a}:${o}`},Ue=(e,n,s)=>{let r=e;return n>=0&&(r=" ".repeat(n)+r.trimStart()),s>=0&&(r=r.trimEnd()+" ".repeat(s)),r},Be=(e,n)=>{const{spaceStart:s,spaceEnd:r,fixed:a,endOfLine:o=`\r +`}=n,c=Array.from(e.info.entries()).map(([i,l])=>`[${i}: ${l}]`),d=e.lyric.map(i=>{if(i.time===void 0)return i.text;const l=Ue(i.text,s,r);return`${D(i.time,a)}${l}`});return c.concat(d).join(o)};var V=(e=>(e[e.parse=0]="parse",e[e.refresh=1]="refresh",e[e.next=2]="next",e[e.time=3]="time",e[e.info=4]="info",e[e.select=5]="select",e[e.deleteTime=6]="deleteTime",e[e.getState=7]="getState",e))(V||{});const H=(e,n,s)=>es?s:e,Ke=(e,n)=>{for(const s in n)if(e[s]!==n[s])return{...e,...n};return e},ne=(e,n)=>{switch(n.type){case 0:{const{text:s,options:r}=n.payload,a=te(s,r),o=H(e.selectIndex,0,a.lyric.length-1);return{...e,...a,selectIndex:o}}case 1:{const s=n.payload;if(s>=e.currentTime&&s(o.time&&(o.times&&(a.nextTime=o.time,a.nextIndex=c),o.time>a.currentTime&&o.time<=s&&(a.currentTime=o.time,a.currentIndex=c)),a),{currentTime:-1/0,currentIndex:-1/0,nextTime:1/0,nextIndex:1/0});return Ke(e,r)}case 2:{const s=e.selectIndex,r=e.lyric,a=H(s+1,0,r.length-1);return{...ne(e,{type:3,payload:n.payload}),selectIndex:a}}case 3:{const s=n.payload,r=e.selectIndex;let a=e.lyric;if(a[r].time!==s){const o=a.slice();o[r]={text:a[r].text,time:s},a=o}return{...e,lyric:a,currentTime:s,nextTime:-1/0}}case 4:{const{name:s,value:r}=n.payload,a=new Map(e.info);return r.trim()===""?a.delete(s):a.set(s,r.trim()),{...e,info:a}}case 5:{const s=H(n.payload(e.selectIndex),0,e.lyric.length-1);return e.selectIndex===s?e:{...e,selectIndex:s}}case 6:{const{selectIndex:s,currentIndex:r}=e;let a=e.lyric;if(a[s].time!==void 0){const o=a.slice();o[s]={text:a[s].text},a=o;let{currentTime:c,nextTime:d}=e;return s===r&&(c=1/0,d=-1/0),{...e,lyric:a,currentTime:c,nextTime:d}}return e}case 7:return n.payload(e),e}return e},$e=e=>{const{text:n,options:s,select:r}=e();return{...te(n,s),currentTime:1/0,currentIndex:1/0,nextTime:-1/0,nextIndex:-1/0,selectIndex:r}},qe=e=>React.useReducer(ne,e,$e),h={current:null,get src(){var e;return((e=this.current)==null?void 0:e.src)??""},get duration(){var e;return((e=this.current)==null?void 0:e.duration)??0},get paused(){var e;return((e=this.current)==null?void 0:e.paused)??!0},get playbackRate(){var e;return((e=this.current)==null?void 0:e.playbackRate)??1},set playbackRate(e){this.current!==null&&(this.current.playbackRate=e)},get currentTime(){var e;return((e=this.current)==null?void 0:e.currentTime)??0},set currentTime(e){this.current!==null&&this.current.duration!==0&&(this.current.currentTime=e)},step(e,n,s){return s===void 0&&(s=this.currentTime),e.altKey&&(n*=.2),e.shiftKey&&(n*=.5),this.currentTime=H(n+s,0,this.duration)},toggle(){var e;(e=this.current)!=null&&e.duration&&(this.current.paused?this.current.play():this.current.pause())}};var w=(e=>(e[e.pause=0]="pause",e[e.getDuration=1]="getDuration",e[e.rateChange=2]="rateChange",e))(w||{});const b=U(),G=U(),se=e=>{if(e===null)return!1;const n=e.type;return n==="textarea"||n==="text"||n==="url"};function R(e){return"#"+e}const k={current:null,get isOpen(){return this.current!==null&&this.current.open},open(){this.current===null||this.current.open||(this.current.open=!0)},close(){this.current===null||!this.current.open||(this.current.open=!1)}},re=({setAudioSrc:e,lang:n})=>{const s=React.useRef(Symbol(re.name));React.useEffect(()=>b.sub(s.current,c=>{c.type===w.getDuration&&k.close()}),[]);const r=React.useCallback(()=>{const c=d=>{(d.code==="Escape"||d.key==="Escape")&&k.close()};k.isOpen?window.addEventListener("keydown",c):window.removeEventListener("keydown",c)},[]),a=React.useCallback(c=>{c.preventDefault();const i=c.target.elements.namedItem("url"),l=ae(i.value);sessionStorage.setItem(C.audioSrc,l),e(l)},[e]),o=React.useCallback(c=>{c.target.select()},[]);return ReactDOM.createPortal(t.jsxs("details",{ref:k,className:"dialog fixed loadaudio-dialog",onToggle:r,children:[t.jsx("summary",{className:"dialog-close",children:t.jsx(He,{})}),t.jsxs("section",{className:"dialog-body loadaudio-body",children:[t.jsxs("div",{className:"loadaudio-tab loadaudio-via-file",children:[t.jsx("input",{type:"radio",name:"tabgroup",id:"tab-file",defaultChecked:!0}),t.jsx("label",{className:"ripple",htmlFor:"tab-file",children:n.loadAudio.file}),t.jsx("div",{className:"loadaudio-content",children:t.jsx("label",{className:"audio-input-tip",htmlFor:"audio-input",children:n.loadAudio.loadFile})})]}),t.jsxs("div",{className:"loadaudio-tab loadaudio-via-url",children:[t.jsx("input",{type:"radio",name:"tabgroup",id:"tab-url"}),t.jsx("label",{className:"ripple",htmlFor:"tab-url",children:n.loadAudio.url}),t.jsx("div",{className:"loadaudio-content",children:t.jsxs("form",{className:"audio-input-form",onSubmit:a,children:[t.jsx("input",{type:"url",name:"url",required:!0,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:!1,onFocus:o}),t.jsx("input",{className:"button",type:"submit"})]})})]})]})]}),document.body)},ae=e=>{if(e.includes("music.163.com")){const n=/\d{4,}/.exec(e);if(n!==null)return`https://music.163.com/song/media/outer/url?id=${n[0]}.mp3`}return e},We=()=>{const{lang:e}=React.useContext(I),n=()=>{k.open()};return t.jsxs("div",{className:"home",children:[t.jsx("p",{className:"home-tip home-tip-top-left",children:e.home.tipTopLeft}),t.jsx("p",{className:"home-tip home-tip-top-right",children:e.home.tipTopRight}),t.jsx("p",{className:"home-tip home-tip-bottom-left",children:e.home.tipBottomLeft}),t.jsx("p",{className:"home-tip home-tip-bottom-right",children:e.home.tipBottomRight}),t.jsxs("section",{className:"home-tip-section",children:[t.jsx("p",{children:e.home.tips}),t.jsxs("ol",{children:[t.jsx("li",{children:t.jsxs("a",{className:"home-tip-item",href:R(m.editor),children:[t.jsx(X,{}),t.jsx("span",{className:"home-tip-text",children:e.home.tipForLyricText})]})}),t.jsx("li",{children:t.jsxs("span",{className:"home-tip-item",onClick:n,children:[t.jsx(Z,{}),t.jsx("span",{className:"home-tip-text",children:e.home.tipForUploadAudio})]})}),t.jsx("li",{children:t.jsxs("a",{className:"home-tip-item",href:R(m.synchronizer),children:[t.jsx(Y,{}),t.jsx("span",{className:"home-tip-text",children:e.home.tipForSynchronizer})]})})]})]})]})};document.addEventListener("keydown",e=>{const{code:n,key:s,target:r}=e;se(r)||(s==="?"||n==="Slash"&&e.shiftKey)&&(location.hash=m.home)});const mt=()=>t.jsx("img",{className:"akari-hide-wall",alt:"akari-hide-wall",src:"./svg/akari-hide-wall.svg",crossOrigin:"anonymous"}),Je=()=>t.jsx("img",{className:"akari-not-found",alt:"not found",src:"./svg/akari-not-found.svg",crossOrigin:"anonymous"}),Qe=()=>t.jsx("img",{className:"akari-odango-loading start-loading",alt:"loading",src:"./svg/akari-odango-loading.svg",crossOrigin:"anonymous"}),Xe=React.lazy(async()=>y(()=>import("./editor-ZU6HErFm.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(({Eidtor:e})=>({default:e}))),Ye=React.lazy(async()=>y(()=>import("./synchronizer-yje8GbOz.js"),__vite__mapDeps([3,2]),import.meta.url).then(({Synchronizer:e})=>({default:e}))),Ze=React.lazy(async()=>y(()=>import("./gist-XoEDJ46b.js"),__vite__mapDeps([4,1]),import.meta.url).then(({Gist:e})=>({default:e}))),et=React.lazy(async()=>y(()=>import("./preferences--UITokjj.js"),__vite__mapDeps([]),import.meta.url).then(({Preferences:e})=>({default:e}))),oe=()=>{const e=React.useRef(Symbol(oe.name)),{prefState:n,trimOptions:s}=React.useContext(I,z.prefState),[r,a]=React.useState(location.hash);React.useEffect(()=>{function i(){a(location.hash)}return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]);const[o,c]=qe(()=>({text:localStorage.getItem(N.lyric)||Q.emptyString,options:s,select:Number.parseInt(sessionStorage.getItem(C.selectIndex),10)||0}));React.useEffect(()=>b.sub(e.current,i=>{i.type===w.getDuration&&c({type:V.info,payload:{name:"length",value:D(i.payload,n.fixed,!1)}})}),[c,n.fixed]),React.useEffect(()=>{function i(){c({type:V.getState,payload:u=>{localStorage.setItem(N.lyric,Be(u,n)),sessionStorage.setItem(C.selectIndex,u.selectIndex.toString())}}),localStorage.setItem(N.preferences,JSON.stringify(n))}function l(){document.hidden&&i()}return document.addEventListener("visibilitychange",l),window.addEventListener("beforeunload",i),()=>{document.removeEventListener("visibilitychange",l),window.removeEventListener("beforeunload",i)}},[c,n]),React.useEffect(()=>{function i(l){var f;const u=(f=l.dataTransfer)==null?void 0:f.files[0];if(u&&(u.type.startsWith("text/")||/(?:\.lrc|\.txt)$/i.test(u.name))){const x=new FileReader,L=()=>{c({type:V.parse,payload:{text:x.result,options:s}})};x.addEventListener("load",L,{once:!0}),location.hash=m.editor,x.readAsText(u,"utf-8")}}return document.documentElement.addEventListener("drop",i),()=>document.documentElement.removeEventListener("drop",i)},[c,s]),React.useEffect(()=>{const i={[T.auto]:"auto",[T.light]:"light",[T.dark]:"dark"};document.documentElement.dataset.theme=i[n.themeMode]},[n.themeMode]),React.useEffect(()=>{const i=nt(n.themeColor);document.documentElement.style.setProperty("--theme-rgb",i.join(", "));const u=tt(...i)+.05,f=u*u>.0525?"var(--black)":"var(--white)";document.documentElement.style.setProperty("--theme-contrast-color",f)},[n.themeColor]);const d=(()=>{switch(r.slice(1)){case m.editor:return t.jsx(Xe,{lrcState:o,lrcDispatch:c});case m.synchronizer:return o.lyric.length===0?t.jsx(Je,{}):t.jsx(Ye,{state:o,dispatch:c});case m.gist:return t.jsx(Ze,{lrcDispatch:c,langName:n.lang});case m.preferences:return t.jsx(et,{})}return t.jsx(We,{})})();return t.jsx("main",{className:"app-main",children:t.jsx(React.Suspense,{fallback:t.jsx(Qe,{}),children:d})})},tt=(...e)=>e.map(n=>n/255).map(n=>n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)).reduce((n,s,r)=>n+s*[.2126,.7152,.0722][r],0),nt=e=>{e=e.slice(1);const n=Number.parseInt(e,16),s=n>>16&255,r=n>>8&255,a=n>>0&255;return[s,r,a]},ce=({min:e,max:n,step:s,value:r,onInput:a,className:o})=>{const c=n-e||1,d=(r-e)/c;return t.jsxs("div",{className:`slider ${o}-slider`,children:[t.jsx("progress",{value:d}),t.jsx("input",{type:"range",className:o,"aria-label":o,min:e,max:n,step:s,value:r,onInput:a})]})},ie=({duration:e,paused:n})=>{const s=React.useRef(Symbol(ie.name)),[r,a]=React.useState(h.currentTime),[o,c]=React.useState(h.playbackRate);React.useEffect(()=>b.sub(s.current,u=>{u.type===w.rateChange&&c(u.payload)}),[]),React.useEffect(()=>{if(n)return G.sub(s.current,u=>{a(u)});{const u=setInterval(()=>{a(h.currentTime)},500/o);return()=>{clearInterval(u)}}},[n,o]);const d=React.useRef(0),i=React.useCallback(u=>{d.current&&cancelAnimationFrame(d.current);const f=u.target.value;d.current=requestAnimationFrame(()=>{const x=Number.parseInt(f,0);a(x),h.currentTime=x})},[]),l=React.useMemo(()=>e?" / "+D(e,0,!1):!1,[e]);return t.jsxs(t.Fragment,{children:[t.jsxs("time",{children:[D(r,0,!1),l]}),t.jsx(ce,{min:0,max:e,step:1,value:r,className:"timeline",onInput:i})]})},le=({lang:e})=>{const n=React.useRef(Symbol(le.name)),[s,r]=React.useState(h.playbackRate);React.useEffect(()=>b.sub(n.current,d=>{d.type===w.rateChange&&r(d.payload)}),[]);const a=React.useMemo(()=>Math.log(s),[s]),o=React.useCallback(d=>{const i=Math.exp(Number.parseFloat(d.target.value));r(i),h.playbackRate=i},[]),c=React.useCallback(()=>{h.playbackRate=1},[]);return t.jsxs(t.Fragment,{children:[t.jsxs("button",{className:"ripple glow",title:e.audio.resetRate,onClick:c,children:["X ",s.toFixed(2)]}),t.jsx(ce,{className:"playbackrate",min:-1,max:1,step:"any",value:a,onInput:o})]})},ue=({lang:e})=>{const n=React.useRef(Symbol(ue.name)),[s,r]=React.useState(h.paused),[a,o]=React.useState(h.duration);React.useEffect(()=>b.sub(n.current,u=>{switch(u.type){case w.getDuration:{o(u.payload),r(h.paused);break}case w.pause:{r(u.payload);break}}}),[]);const c=React.useCallback(u=>{h.step(u,-5)},[]),d=React.useCallback(u=>{h.step(u,5)},[]),i=React.useCallback(()=>{h.toggle()},[]),l=React.useCallback(()=>{k.open()},[]);return t.jsxs("section",{className:"lrc-audio"+(s?"":" playing"),children:[t.jsx("button",{className:"ripple glow loadaudio-button",title:e.audio.loadAudio,onClick:l,children:t.jsx(Z,{})}),t.jsx("button",{className:"ripple glow",title:e.audio.replay5s,onClick:c,disabled:!a,children:t.jsx(Te,{})}),t.jsx("button",{className:"ripple glow",title:s?e.audio.play:e.audio.pause,disabled:!a,onClick:i,children:s?t.jsx(_e,{}):t.jsx(Ne,{})}),t.jsx("button",{className:"ripple glow",title:e.audio.forward5s,onClick:d,disabled:!a,children:t.jsx(Ve,{})}),t.jsx(ie,{duration:a,paused:s}),t.jsx(le,{lang:e})]})},st=["audio/*",".ncm",".qmcflac",".qmc0",".qmc1",".qmc2",".qmc3","qmcogg"].join(", "),rt=()=>{const{prefState:e,lang:n}=React.useContext(I,z.lang|z.builtInAudio),[s,r]=React.useReducer((g,p)=>(URL.revokeObjectURL(g),p),void 0,()=>{let g=sessionStorage.getItem(C.audioSrc);if(g===null&&location.search&&URLSearchParams){const p=new URLSearchParams(location.search),v=p.get("url");if(v!==null)return v;const j=p.get("text")||p.get("title")||"",M=/https?:\/\/\S+/.exec(j);g=M&&ae(M[0])}return g});React.useEffect(()=>{function g(p){const{code:v,key:j,target:M}=p,E=v||j;if(!se(M)&&h.src)if(p.metaKey||p.ctrlKey)if(["ArrowUp","KeyJ","Up","J","j"].includes(E)){p.preventDefault();const F=h.playbackRate,P=Math.exp(Math.min(Math.log(F)+.2,1));h.playbackRate=P}else if(["ArrowDown","KeyK","Down","K","k"].includes(E)){p.preventDefault();const F=h.playbackRate,P=Math.exp(Math.max(Math.log(F)-.2,-1));h.playbackRate=P}else E==="Enter"&&(p.preventDefault(),h.toggle());else["ArrowLeft","KeyA","KeyH","Left","A","a","H","h"].includes(E)?(p.preventDefault(),h.step(p,-5)):["ArrowRight","KeyD","KeyL","Right","D","d","L","l"].includes(E)?(p.preventDefault(),h.step(p,5)):(v==="KeyR"||j==="R"||j==="r")&&(p.preventDefault(),h.playbackRate=1)}return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[]),React.useEffect(()=>{function g(p){const v=p.dataTransfer.files[0];$(v,r)}return document.documentElement.addEventListener("drop",g),()=>document.documentElement.removeEventListener("drop",g)},[]);const a=React.useCallback(g=>{const p=g.target.files[0];$(p,r)},[]),o=React.useRef(0),c=React.useCallback(()=>{cancelAnimationFrame(o.current),b.pub({type:w.getDuration,payload:h.duration}),S.pub({type:"success",text:n.notify.audioLoaded})},[n]),d=React.useCallback(()=>{G.pub(h.currentTime),o.current=requestAnimationFrame(d)},[]),i=React.useCallback(()=>{o.current=requestAnimationFrame(d),b.pub({type:w.pause,payload:!1})},[d]),l=React.useCallback(()=>{cancelAnimationFrame(o.current),b.pub({type:w.pause,payload:!0})},[]),u=React.useCallback(()=>{cancelAnimationFrame(o.current),b.pub({type:w.pause,payload:!0})},[]),f=React.useCallback(()=>{h.paused&&G.pub(h.currentTime)},[]),x=React.useCallback(()=>{b.pub({type:w.rateChange,payload:h.playbackRate})},[]),L=React.useCallback(g=>{const v=g.target.error,j=n.audio.error[v.code]||v.message||n.audio.error[0];S.pub({type:"warning",text:j})},[n]);return t.jsxs("footer",{className:"app-footer",children:[t.jsx("input",{id:"audio-input",type:"file",accept:st,hidden:!0,onChange:a}),t.jsx(re,{setAudioSrc:r,lang:n}),t.jsx("audio",{ref:h,src:s,controls:e.builtInAudio,hidden:!e.builtInAudio,onLoadedMetadata:c,onPlay:i,onPause:l,onEnded:u,onTimeUpdate:f,onRateChange:x,onError:L}),e.builtInAudio||t.jsx(ue,{lang:n})]})},$=(e,n)=>{if(sessionStorage.removeItem(C.audioSrc),e){if(e.type.startsWith("audio/")){n(URL.createObjectURL(e));return}if(e.name.endsWith(".ncm")){const s=new Worker(new URL(""+new URL("ncmc-worker-94pMDdCj.js",import.meta.url).href,import.meta.url));s.addEventListener("message",r=>{if(r.data.type==="success"){const a=r.data.payload,o=new Blob([a],{type:q(a)});n(URL.createObjectURL(o))}r.data.type==="error"&&S.pub({type:"warning",text:r.data.payload})},{once:!0}),s.addEventListener("error",r=>{S.pub({type:"warning",text:r.message}),s.terminate()},{once:!0}),s.postMessage(e);return}if(/\.qmc(?:flac|0|1|2|3)$/.test(e.name)){const s=new Worker(new URL(""+new URL("qmc-worker-whNXszNT.js",import.meta.url).href,import.meta.url));s.addEventListener("message",r=>{if(r.data.type==="success"){const a=r.data.payload,o=new Blob([a],{type:q(a)});n(URL.createObjectURL(o))}},{once:!0}),s.postMessage(e)}}},_={fLaC:1716281667,OggS:1332176723,RIFF:1380533830,WAVE:1463899717},q=e=>{switch(new DataView(e.buffer).getUint32(0,!1)){case _.fLaC:return"audio/flac";case _.OggS:return"audio/ogg";case _.RIFF:case _.WAVE:return"audio/wav";default:return"audio/mpeg"}};document.addEventListener("visibilitychange",()=>{h.paused||h.toggle()});const at=()=>{const{lang:e}=React.useContext(I,z.lang);return t.jsxs("header",{className:"app-header",children:[t.jsxs("a",{id:m.home,className:"app-title",title:e.header.home,href:R(m.home),children:[t.jsx("span",{className:"app-title-text",children:e.app.name}),t.jsx("span",{className:"app-title-svg",children:t.jsx(Ce,{})})]}),t.jsxs("nav",{className:"app-nav",children:[t.jsx("a",{id:m.editor,className:"app-tab",title:e.header.editor,href:R(m.editor),children:t.jsx(X,{})}),t.jsx("a",{id:m.synchronizer,className:"app-tab",title:e.header.synchronizer,href:R(m.synchronizer),children:t.jsx(Y,{})}),t.jsx("a",{id:m.gist,className:"app-tab",title:e.header.gist,href:R(m.gist),children:t.jsx(Ie,{})}),t.jsx("a",{id:m.preferences,className:"app-tab",title:e.header.preferences,href:R(m.preferences),children:t.jsx(Me,{})})]})]})},ot=()=>t.jsx(React.StrictMode,{children:t.jsxs(Ae,{children:[t.jsx(at,{}),t.jsx(oe,{}),t.jsx(rt,{}),t.jsx(ee,{})]})});"scrollBehavior"in document.documentElement.style||y(()=>import("./smooth-scroll-bCWoQaUd.js"),__vite__mapDeps([]),import.meta.url);ReactDOM.render(React.createElement(ot),document.querySelector(".app-container"),()=>{(navigator.standalone||window.matchMedia("(display-mode: standalone)").matches)&&document.addEventListener("click",e=>{const n=e.target.getAttribute("href");(n==null?void 0:n.startsWith("#"))===!0&&(e.preventDefault(),location.replace(n))}),window.addEventListener("dragover",e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"}),window.addEventListener("drop",e=>{e.preventDefault()})});export{V as A,lt as C,ct as D,X as E,ht as G,N as L,ut as O,m as R,C as S,T,pt as U,I as a,dt as b,it as c,Q as d,h as e,b as f,w as g,G as h,D as i,t as j,Ue as k,se as l,Je as m,Qe as n,Y as o,R as p,z as q,ke as r,Be as s,S as t,mt as u}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./editor-ZU6HErFm.js","./gistapi-W_qTkofq.js","./lrc-file-name-sR0E2KGQ.js","./synchronizer-yje8GbOz.js","./gist-XoEDJ46b.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} \ No newline at end of file diff --git a/assets/index-FuFUnZ6u.css b/assets/index-FuFUnZ6u.css new file mode 100644 index 00000000..cffcac80 --- /dev/null +++ b/assets/index-FuFUnZ6u.css @@ -0,0 +1 @@ +*{box-sizing:inherit}:root{-moz-tab-size:4;tab-size:4}html{-moz-text-size-adjust:100%;text-size-adjust:100%;line-height:1.15}*{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{margin:0}hr{height:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:100%;line-height:1.15}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner{border-style:none;padding:0}[type=button]::-moz-focus-inner{border-style:none;padding:0}[type=reset]::-moz-focus-inner{border-style:none;padding:0}[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring{outline:1px dotted ButtonText}[type=button]:-moz-focusring{outline:1px dotted ButtonText}[type=reset]:-moz-focusring{outline:1px dotted ButtonText}[type=submit]:-moz-focusring{outline:1px dotted ButtonText}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button{height:auto}[type=number]::-webkit-outer-spin-button{height:auto}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:root{--white:#eee;--black:#111;--theme-rgb:245,142,168;--theme-color:rgb(var(--theme-rgb));--theme-contrast-color:var(--black);--font-color:var(--black);--background-color:#f1f3f4;--semi-black-color:#202020cc;--semi-white-color:#e0e0e0cc;--border-radius:8px;--text-shadow:0 0 2px var(--black);--drop-shadow:drop-shadow(0 0 4px currentColor);--transition-duration:.25s;--animation-duration:.25s;--animation-durationx2:.5s;--animation-out-back:cubic-bezier(.18,.89,.32,1.28)}@media (prefers-color-scheme:dark){:root{--font-color:var(--white);--background-color:var(--black)}}[data-theme=light]{--font-color:var(--black);--background-color:#f1f3f4}[data-theme=dark]{--font-color:var(--white);--background-color:var(--black)}@media (prefers-reduced-motion:reduce){:root{--transition-duration:10ms;--animation-duration:.1s;--animation-durationx2:.1s}}@font-face{font-family:Akari Fallback UI;src:local(Segoe UI),local(Roboto),local(Oxygen),local(Ubuntu),local(Cantarell),local(Open Sans),local(Helvetica Neue),local(Helvetica)}:root{color:var(--font-color);background-color:var(--background-color);font-feature-settings:"kern" 1;font-kerning:normal;caret-color:var(--theme-color);overscroll-behavior-y:contain;font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Akari Fallback UI,sans-serif,Apple Color Emoji,Segoe UI Emoji}:root,textarea,input{font-variant-numeric:tabular-nums}[lang]:lang(zh){font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Akari Fallback UI,PingFang SC,Microsoft YaHei UI,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif,Apple Color Emoji,Segoe UI Emoji}[lang]:lang(zh-HK){font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Akari Fallback UI,PingFang HK,Microsoft JhengHei UI,Microsoft JhengHei,Source Han Sans HK,Noto Sans CJK TC,sans-serif,Apple Color Emoji,Segoe UI Emoji}[lang]:lang(zh-TW){font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Akari Fallback UI,PingFang TC,Microsoft JhengHei UI,Microsoft JhengHei,Source Han Sans TW,Noto Sans CJK TC,sans-serif,Apple Color Emoji,Segoe UI Emoji}[lang]:lang(ja){font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Akari Fallback UI,Hiragino Kaku Gothic Pro,Yu Gothic UI,Yu Gothic,Meiryo UI,Meiryo,Source Han Sans JP,Noto Sans CJK JP,sans-serif,Apple Color Emoji,Segoe UI Emoji}select,input,textarea{color:inherit}svg{fill:currentColor}::selection{color:var(--theme-contrast-color);background-color:var(--theme-color)}@supports (-ms-ime-align:auto) and (not (position:sticky)){::selection{color:unset;background-color:unset}}:focus{outline:none}a{color:currentColor;text-decoration:none}a,button,[type=submit]{cursor:default;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;background:0;border:0;padding:0 8px}ul{margin:0;padding:0;list-style:none}.link{cursor:pointer;text-decoration:underline}.link:hover{-webkit-text-decoration-color:var(--theme-color);-webkit-text-decoration-color:var(--theme-color);text-decoration-color:var(--theme-color)}.link:hover:after{content:"🔗";margin-left:4px;position:absolute}a>*{pointer-events:none}.button{color:var(--black);border-radius:var(--border-radius);opacity:.8;background-color:#fff;padding:8px}.button:hover{opacity:1}.glow{transition:text-shadow var(--transition-duration)ease}.glow:hover{text-shadow:0 0 4px}.glow>svg{transition:filter var(--transition-duration)ease}.glow:hover>svg{filter:var(--drop-shadow)}.ripple{position:relative;overflow:hidden;transform:translate(0)}.ripple:after{opacity:0;content:"";pointer-events:none;background-image:radial-gradient(circle,#000 10%,#0000 10%);background-position:50%;background-repeat:no-repeat;width:100%;height:100%;transition:transform .5s,opacity 1s;display:block;position:absolute;top:0;left:0;transform:scale(10)}.ripple:active:after{opacity:.2;transition:all;transform:scale(0)}.select-all{-webkit-user-select:all;user-select:all}.page-loading:before{background-color:var(--background-color);opacity:.5;content:"";position:fixed;top:0;bottom:0;left:0;right:0}.akari-odango-loading{text-align:center;width:50vmin;height:50vmin;margin:auto;position:fixed;top:0;bottom:0;left:0;right:0}.start-loading{animation:2s linear infinite akari-loading}@keyframes akari-loading{0%{transform:rotate(0)translate(-2vmin)rotate(0)}to{transform:rotate(360deg)translate(-2vmin)rotate(-360deg)}}.akari-not-found{opacity:.2;filter:var(--drop-shadow);flex:auto;align-self:center;max-width:100vw;max-height:80vh;margin-top:auto}.app-header{z-index:233;padding:0 8px;padding-right:env(safe-area-inset-right);padding-left:env(safe-area-inset-left);color:var(--theme-color);background-color:var(--semi-black-color);box-shadow:0 1px 1px var(--theme-color);animation:slide-in-down var(--animation-duration)ease-in-out forwards;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;width:100%;height:60px;display:flex;position:fixed;top:0}@media (max-width:768px){.app-header{padding:0 4px}}.app-title{font-size:1.5rem;font-weight:500}.app-title-text{margin-left:1rem;display:none}.app-title-svg{display:inline-flex}@media (min-width:768px){.app-title-text{display:inline-flex}.app-title-svg{display:none}}.app-header a{color:#fff;transition:color var(--transition-duration)ease-in-out;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;min-width:60px;min-height:60px;padding:0;display:inline-flex}.app-tab{animation-name:slide-in-down;animation-duration:var(--animation-durationx2);animation-timing-function:ease-out;animation-fill-mode:forwards;position:relative;transform:translateY(-100%)}.app-tab:first-child{animation-delay:.1s}.app-tab:nth-child(2){animation-delay:.2s}.app-tab:nth-child(3){animation-delay:.3s}.app-tab:nth-child(4){animation-delay:.4s}.app-nav:hover .app-tab{color:#fff}.app-nav .app-tab:hover,.app-nav>a:target{color:currentColor}.app-tab:before{z-index:-1;background-color:var(--theme-contrast-color);transform-origin:50% 0;transition:transform var(--transition-duration)ease-in-out;content:"";width:100%;height:100%;position:absolute;top:0;left:0;transform:scaleY(0)}.app-tab:target:before,.app-tab:hover:before{transform:scaleY(1)}:hover>.app-tab:target:before{transform:scaleY(0)}.app-tab:hover:target:before{transform:scaleY(1)}.app-title-svg>svg,.app-tab>svg{width:30px;height:30px;margin:0}.app-footer{z-index:233;animation:slide-in-up var(--animation-duration)ease forwards;width:100%;position:fixed;bottom:0}html{box-sizing:content-box;padding-bottom:env(safe-area-inset-bottom);min-height:100vh;min-height:-webkit-fill-available}body{box-sizing:border-box}html,body,.app-container,.app-main{flex-direction:column;display:flex}body,.app-container,.app-main{flex:1 0 auto}body,.app-container{contain:size;display:contents}@media not all and (-webkit-min-device-pixel-ratio:.0000264583),not all and (-webkit-min-device-pixel-ratio:.0000264583),not all and (min-resolution:.001dpcm){@supports not (((-webkit-appearance:none)) and (stroke-color:transparent)){body,.app-container{display:flex}}}.app-main{width:80%;margin:auto;padding-top:60px;padding-bottom:32px}@media (max-width:1280px){.app-main{width:1024px;max-width:100%}}@media (max-width:1024px){.app-main{padding-right:env(safe-area-inset-right);padding-left:env(safe-area-inset-left);width:100%}}.home{margin-top:env(safe-area-inset-top);margin-bottom:env(safe-area-inset-bottom);margin-left:env(safe-area-inset-left);-webkit-user-select:none;user-select:none;flex-direction:column;justify-content:center;align-items:center;display:flex;position:fixed;top:60px;bottom:32px;left:0;right:0}.home-tip{color:var(--white);background-color:var(--semi-black-color);border-radius:var(--border-radius);max-width:45%;margin:16px;padding:16px}.home-tip-top-left{position:absolute;top:0;left:0}.home-tip-top-right{position:absolute;top:0;right:0}.home-tip-bottom-left{position:absolute;bottom:0;left:0}.home-tip-bottom-right{position:absolute;bottom:0;right:0}.home-tip:after{content:"";border-style:solid;border-width:8px;margin-left:-8px;position:absolute;left:50%}.home-tip-top-left:after,.home-tip-bottom-left:after{left:32px}.home-tip-top-left:after,.home-tip-top-right:after{border-color:transparent transparent var(--semi-black-color)transparent;bottom:100%}.home-tip-bottom-left:after,.home-tip-bottom-right:after{border-color:var(--semi-black-color)transparent transparent transparent;top:100%}.home-tip-section{font-size:1.2rem;line-height:1.5}.home-tip-item{cursor:default;margin:8px;padding:0}.home-tip-item>svg{margin-right:8px}.home-tip-text,.home-tip-item>svg{vertical-align:middle}.app-editor{border:1px solid var(--theme-color);border-radius:var(--border-radius);transition:box-shadow var(--transition-duration)ease-in-out;background-color:#0000;flex-direction:column;flex:1 0 auto;margin:16px;padding:8px;font-size:1.2rem;display:flex;position:relative}.app-editor:hover,.app-editor:focus-within{box-shadow:0 0 10px var(--theme-color)}@media (max-width:768px){.app-editor{border:0;border-radius:0;margin:0}.app-editor:hover,.app-editor:focus-within{box-shadow:none}}.app-editor-infobox{display:none}@supports (display:grid){.app-editor-infobox{grid-template-rows:1fr 1fr 1fr;grid-template-columns:auto 1fr auto}[open]>.app-editor-infobox{display:grid}}@supports not (display:grid){.app-editor-infobox{flex-wrap:wrap}[open]>.app-editor-infobox{display:flex}.app-editor-infobox>input{flex:calc(100% - 38px)}.app-editor-infobox>label:nth-child(3n+1){flex:0 0 30px}.app-editor-infobox>label:nth-child(3n+3){text-align:right;flex:0 0 8px}}.app-textarea{overscroll-behavior-y:contain;border:none;flex:1 0 auto}.app-editor input,.app-editor textarea{resize:none;background-color:#0000;border:none;padding:0}.app-editor>details{opacity:.6;padding-bottom:4px}.app-editor summary{-webkit-user-select:none;user-select:none}.editor-tools{padding:8px;display:flex;position:absolute;top:0;right:0}.editor-tools-item{color:var(--font-color);border-radius:50%;flex-direction:column;justify-content:center;align-items:center;padding:8px;display:inline-flex}.editor-tools-item:active{color:currentColor}.editor-tools-item>svg{color:currentColor;width:24px;height:24px}.editor-tools-item:hover>svg{filter:drop-shadow(0 0 2px var(--theme-color))}.lyric-list{-webkit-user-select:none;user-select:none;width:100%;line-height:1.4;position:relative}.lyric-list.on-screen-button{margin-bottom:40px}.space-button{margin-bottom:env(safe-area-inset-bottom);color:var(--white);background-color:var(--semi-black-color);border-bottom:1px dashed var(--theme-color);width:100%;height:40px;position:fixed;bottom:32px;left:0}.space-button:active{border-bottom-style:solid}.line{white-space:pre-wrap;border-top:2px solid #0000;border-bottom:2px solid #0000;align-items:baseline;padding:8px 0 8px 8rem;font-size:1.2rem}.line:after{content:"";display:inline-block}.line:nth-child(2n){background-color:#0002}.line:nth-child(odd){background-color:#fff2}.line>.line-time,.line>.line-text{pointer-events:none}.select{border-color:var(--theme-color)}.curser{contain:content;position:absolute;left:0}.curser:after{content:"➤"}.line.highlight{color:var(--theme-contrast-color);background-color:var(--theme-color)}.error:before{content:"⚠️";position:absolute;left:-2rem}@media (max-width:1080px){.error:before{left:6rem}.select.error:before{visibility:hidden}}@media (max-width:768px){.line{border-width:1px;padding-left:6rem;font-size:1rem}.error:before{left:4rem}}.aside-panel{margin-bottom:env(safe-area-inset-bottom);background-color:var(--semi-black-color);animation:slide-in-right var(--animation-duration)ease 1s forwards;border-radius:8px 0 0 8px;position:fixed;bottom:64px;right:0;transform:translate(100%)}.on-screen-button+.aside-panel{bottom:100px}.aside-button{box-sizing:content-box;padding:0;padding-right:env(safe-area-inset-right);color:var(--white);flex-direction:column;justify-content:center;align-items:center;width:50px;height:50px;margin:0;line-height:1;display:flex}.aside-button>svg{fill:currentColor;width:30px;height:30px;margin:auto}.aside-button:hover>svg{filter:drop-shadow(0 0 4px var(--theme-color))}.syncmode-button{border-bottom:1px solid var(--white);border-top-left-radius:8px}.syncmode-button.highlight{color:var(--theme-contrast-color);background-color:var(--theme-color)}.syncmode-button.highlight .lock-open,.syncmode-button.select .lock-close{visibility:hidden}audio{margin-bottom:env(safe-area-inset-bottom);background-color:var(--semi-black-color);width:100%;height:32px;position:absolute;bottom:0}audio::-webkit-media-controls-enclosure{border-radius:0}[disabled]{opacity:.5;pointer-events:none}.lrc-audio{padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);color:var(--white);background-color:var(--semi-black-color);-webkit-user-select:none;user-select:none;justify-content:space-around;align-items:center;font-size:14px;display:flex}.lrc-audio>button,.lrc-audio>span{flex:none}.slider{--slider-height:32px;height:var(--slider-height);margin:0 5px;position:relative}.slider>progress,.slider>input{width:100%;position:absolute;left:0;right:0}@media (max-width:768px){.timeline-slider{--slider-height:4px;width:100%;margin:0;position:absolute;bottom:100%}}.lrc-audio>button{color:#eee;height:32px}audio+.lrc-audio>.loadaudio-button>svg{animation:1s ease-in-out infinite drop-shadow-flash}audio[src]+.lrc-audio>.loadaudio-button>svg{animation:none}@keyframes drop-shadow-flash{0%{filter:0}50%{filter:var(--drop-shadow)}}.lrc-audio section{margin:0 5px}.timeline-slider{flex:4 0 auto}.playbackrate-slider{flex:auto;max-width:150px}input[type=range]{--thumb-size:16px;height:var(--slider-height);color:var(--theme-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;margin:0;padding:0}input[type=range]:focus{outline:none}input[type=range]::-webkit-slider-runnable-track{height:var(--slider-height);background-color:#0000;border:0}input[type=range]::-moz-range-track{height:var(--slider-height);background-color:#0000;border:0}input[type=range]::-ms-track{color:#0000;background-color:#0000;border-color:#0000;top:-6px}input[type=range]::-webkit-slider-thumb{z-index:10;width:var(--thumb-size);height:var(--thumb-size);margin-top:calc((var(--slider-height) - var(--thumb-size))/2);box-shadow:0 0 4px 1px var(--black);filter:brightness(120%);transition:box-shadow var(--transition-duration)ease-in-out;-webkit-appearance:none;background-color:currentColor;border:0;border-radius:50%}input[type=range]:hover::-webkit-slider-thumb{box-shadow:0 0 4px 1px var(--white)}input[type=range]::-moz-range-thumb{z-index:10;width:var(--thumb-size);height:var(--thumb-size);margin-top:calc((var(--slider-height) - var(--thumb-size))/2);box-shadow:0 0 4px 1px var(--black);filter:brightness(120%);transition:box-shadow var(--transition-duration)ease-in-out;-moz-appearance:none;background-color:currentColor;border:0;border-radius:50%}input[type=range]:hover::-moz-range-thumb{box-shadow:0 0 4px var(--white)}input[type=range]::-ms-fill-upper{background-color:#0000}input[type=range]::-ms-fill-lower{background-color:#0000}input[type=range]::-ms-thumb{background-color:currentColor;border-radius:50%;width:16px;height:16px;margin-top:-1px}input[type=range]::-ms-tooltip{display:none}.slider>progress{--progress-meter-color:var(--theme-color);box-sizing:border-box;margin:calc(var(--slider-height)/2 - 2px)0;color:var(--progress-meter-color);vertical-align:0;background:var(--white);box-shadow:0 0 4px var(--black);transition:box-shadow var(--transition-duration)ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;border-radius:2px;height:4px;display:inline-block}.slider:hover progress{box-shadow:0 0 4px var(--white)}progress::-moz-progress-bar{background-color:var(--progress-meter-color);background-image:linear-gradient(-45deg,#fff0 0 50%,#fffc 62.5%,#fff0 75%);background-size:35px 20px,100% 100%,100% 100%;border-radius:2px}progress::-webkit-progress-bar{background-color:#eee;border-radius:2px;box-shadow:inset 0 2px 5px #0004}progress::-webkit-progress-value{background-color:var(--progress-meter-color);background-image:linear-gradient(-45deg,#fff0 0 50%,#fffc 62.5%,#fff0 75%);background-repeat:repeat-x;background-size:40px 40px,100% 100%,100% 100%;border-radius:2px}.dialog{z-index:1000;border-radius:var(--border-radius);margin:auto;display:none;position:fixed;top:0;bottom:0;left:0;right:0}.dialog[open]{animation:dialog-slide-in var(--animation-duration)var(--animation-out-back);display:block}.dialog-close{color:var(--theme-color);width:48px;height:48px;padding:0;list-style-type:none;position:absolute;top:-24px;left:-24px}.dialog-close::-webkit-details-marker{display:none}.dialog-close::marker{display:none}.dialog-close:before{z-index:-1;content:"";position:fixed;top:0;bottom:0;left:0;right:0}.dialog-close>svg{width:36px;height:36px;margin:auto;position:absolute;top:0;bottom:0;left:0;right:0}.loadaudio-dialog{color:var(--black);background-color:var(--semi-white-color);border:1px solid var(--theme-color);box-shadow:0 0 1rem var(--theme-color),0 0 0 100vmax #0008;width:500px;max-width:calc(100% - 36px);height:10rem;max-height:100%}.loadaudio-body{box-sizing:border-box;justify-content:space-around;padding:10px;display:flex}.tab{display:inline-block}.loadaudio-tab{text-align:center;width:100%}.loadaudio-tab>[type=radio]{display:none}.loadaudio-content{visibility:hidden;width:100%;height:100px;position:absolute;left:0}.loadaudio-tab>label{border:1px solid #0000;border-bottom:1px solid var(--theme-color);-webkit-user-select:none;user-select:none;border-top-left-radius:6px;border-top-right-radius:6px;width:100%;padding:8px 0;display:inline-block}.loadaudio-tab :checked~label{border:1px solid var(--theme-color);background-color:#fffd;border-bottom-color:#0000}.loadaudio-tab :checked~label~.loadaudio-content{visibility:visible}.audio-input-tip,.audio-input-form{transition:transform var(--transition-duration)ease-in-out;justify-content:center;align-items:center;width:100%;height:100%;padding:16px;display:flex}.audio-input-tip:hover{transform:scale(1.2)}.audio-input-form>input[type=url]{border:0;border-bottom:1px solid var(--theme-color);background:0;flex:1 0 auto;width:60%;margin:8px;font-size:1.5rem}.audio-input-form>input[type=submit]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0}@keyframes dialog-slide-in{0%{opacity:0;transform:translateY(100%)}50%{opacity:1}}.toggle-switch{--bar-height:14px;--bar-width:32px;--bar-color:#eee;--knob-size:20px;--knob-color:#fff;--switch-offset:calc(var(--knob-size) - var(--bar-height));--switch-width:calc(var(--bar-width) + var(--switch-offset));--transition-duration:.2s;--switch-transition:all var(--transition-duration)ease-in-out;--switch-theme-rgb:26,115,232;--switch-theme-color:rgb(var(--switch-theme-rgb));--switch-box-shadow:0 0 var(--switch-offset)#11111180;--switch-margin:8px;box-sizing:border-box;min-width:var(--bar-width);min-height:var(--bar-height);margin:var(--switch-margin);-webkit-user-select:none;user-select:none;align-items:center;display:inline-flex;position:relative}.toggle-switch.disabled{opacity:.5;pointer-events:none}.toggle-switch>input,.toggle-switch-input{opacity:0;width:0;height:0;position:absolute}.toggle-switch>label,.toggle-switch-label{--knob-x:calc((var(--bar-height) - var(--bar-width))/2);box-sizing:border-box;width:var(--bar-width);height:var(--bar-height);margin:var(--switch-margin);-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;display:inline-flex;position:relative}.toggle-switch>:checked+label,:checked+.toggle-switch-label{--knob-x:calc((var(--bar-width) - var(--bar-height))/2)}.toggle-switch>label:before,.toggle-switch-label:before{box-sizing:border-box;width:var(--bar-width);height:var(--bar-height);background:var(--bar-color);border:1px solid var(--switch-theme-color);border-radius:var(--bar-height);opacity:.5;transition:var(--switch-transition);content:"";position:absolute;top:0;left:0}.toggle-switch>:checked+label:before,:checked+.toggle-switch-label:before{background:var(--switch-theme-color)}.toggle-switch>label:after,.toggle-switch-label:after{box-sizing:border-box;width:var(--knob-size);height:var(--knob-size);background:var(--knob-color);box-shadow:var(--switch-box-shadow);transform:translateX(var(--knob-x));transition:var(--switch-transition);content:"";border-radius:50%}.toggle-switch>:checked+label:after,:checked+.toggle-switch-label:after{background:var(--switch-theme-color)}.toggle-switch>:focus+label:after,:focus+.toggle-switch-label:after,.toggle-switch:hover>label:after,:hover>.toggle-switch-label:after{box-shadow:var(--switch-box-shadow),0 0 0 calc(var(--knob-size)/2)rgba(var(--switch-theme-rgb),.2)}.preferences{-webkit-user-select:none;user-select:none;width:100%}.preferences>ul{max-width:1024px;margin:auto}.preferences li{width:100%;padding:0 8px}.preferences li:nth-child(2n){background-color:#0002}.list-item{flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:768px;min-height:3.5rem;margin:auto;display:flex}.list-item>span,.list-item>form{margin:8px 0}.list-item>.link{padding:0}.toggle-switch{--switch-theme-rgb:var(--theme-rgb);--switch-margin:0;--bar-height:20px;--bar-width:52px;--knob-size:28px;width:var(--switch-width);height:var(--knob-size);justify-content:center}@supports (-ms-ime-align:auto){.toggle-switch{--switch-offset:8px;--switch-width:60px}.toggle-switch-label:after{box-shadow:0 0 8px #1118}:hover>.toggle-switch-label:after{box-shadow:0 0 8px #1118,0 0 0 14px rgb(var(--theme-rgb)/20%)}.toggle-switch-label{--knob-x:-16px}:checked+.toggle-switch-label{--knob-x:16px}}.color-picker{vertical-align:middle;border-radius:var(--border-radius);justify-content:center;align-items:center;min-width:30px;height:30px;margin:2px;line-height:normal;display:inline-flex}.color-picker.hash{color:var(--theme-contrast-color)}.color-picker.checked:before{color:var(--theme-contrast-color);content:"✔️"}.user-color-input-text{border:0;border-bottom:1px solid var(--theme-color);background:0;flex:74px;grid-column:span 2;place-self:stretch stretch;min-width:60px;margin:2px}.user-color-label{color:var(--theme-contrast-color)}.theme-color-span,.user-color-label,.user-color-input-text{display:none}@media (min-width:768px){.user-color-label,.user-color-input-text{display:inline-flex}}.format-example-time,.format-example-text{vertical-align:middle}.format-example-text{color:var(--theme-contrast-color);white-space:pre-wrap;background-color:var(--theme-color);display:inline}.option-select>select{text-align-last:right;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;outline:0;padding-right:16px}.option-select>select>option{color:var(--font-color);background-color:var(--background-color)}::-ms-expand{display:none}.option-select{position:relative}.option-select:after{color:var(--theme-color);content:"▼";pointer-events:none;position:absolute;right:0}input[type=number]{text-align:right;border:0;border-bottom:1px solid var(--theme-color);background:0;border-radius:0;width:4rem;height:30px}.akari-hide-wall{z-index:-1;opacity:.8;animation:akari-slide-in .5s var(--animation-out-back)3s forwards,akari-float 20s ease-in-out 4s infinite;stroke-width:4px;width:256px;height:256px;position:fixed;bottom:32px;right:0;transform:translate(100%)}@keyframes akari-slide-in{0%{transform:translate(100%)}to{transform:translate(34%)}}@keyframes akari-float{0%{transform:translate(34%)}50%{transform:translate(34%,1rem)}to{transform:translate(34%)}}.current-theme-color{vertical-align:middle;font-family:Consolas,Monaco,monospace}.dropdown{position:relative}.dropdown>summary{list-style-type:none}.dropdown>summary::-webkit-details-marker{display:none}.dropdown>summary::marker{display:none}.dropdown>summary:after{color:var(--theme-color);vertical-align:middle;content:"▼";pointer-events:none}.dropdown[open]>summary:before{z-index:80;cursor:default;content:"";display:block;position:fixed;top:0;bottom:0;left:0;right:0}.dropdown-body{z-index:100;background-color:var(--background-color);border:1px solid var(--theme-color);border-radius:var(--border-radius);box-shadow:0 0 1rem var(--theme-color);margin:8px;padding:8px;position:absolute;top:100%;right:0}.dropdown-body:before{border-color:transparent transparent var(--theme-color)transparent;content:"";border-style:solid;border-width:8px;margin-left:-8px;position:absolute;bottom:100%;right:74px}.color-wall{grid-gap:4px;grid-template-columns:repeat(5,1fr);place-items:center;width:200px;display:none}[open]>.color-wall{flex-wrap:wrap;display:grid}.pseudo-hidden{visibility:hidden;position:absolute}.gist{flex-direction:column;flex:1 0 auto;justify-content:center;align-items:center;width:100%;display:flex}.new-token,.get-gist-id{flex-direction:column;justify-content:center;align-items:center;width:100%;max-width:768px;margin:0 auto;display:flex}.new-token-tip,.create-new-gist{text-align:center;flex:1 0 auto;width:100%;max-width:500px;margin:1rem;padding:1rem}@media (max-width:500px){.new-token-tip{border-radius:0}}.new-token-tip-text,.gist-id-tip-text{text-align:center;max-width:500px;margin:1rem;font-size:1.2rem}.github-svg{width:100px;height:100px;margin:1rem}.new-token-input,.gist-id-input{border:0;border-bottom:1px solid var(--theme-color);background:0;border-radius:0;flex:1 0 auto;margin:0 .5rem}.new-token-form,.gist-id-form{flex:1 0 auto;justify-content:center;align-items:center;width:100%;max-width:500px;margin:1rem 0;padding:1rem 0;display:flex}.file-list{grid-gap:1rem;flex:1 0 auto;grid-template-rows:min-content;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));width:100%;display:grid}.file-item{border-radius:var(--border-radius);box-shadow:0 0 2px var(--font-color);transition:box-shadow var(--transition-duration)ease-in-out;-webkit-user-select:none;user-select:none;padding:.5rem}.file-item:hover{box-shadow:0 0 1rem var(--theme-color)}.file-content{white-space:pre;height:15rem;line-height:1.6;overflow:hidden}.file-bar{justify-content:space-between;align-items:flex-start;display:flex}.file-title{padding:.5rem}.file-action{flex:none}.file-load{justify-content:center;align-items:center;width:32px;height:32px;padding:0;transition:color .25s ease-in-out;display:inline-flex}.file-load>svg{pointer-events:none}.file-load:hover{color:var(--theme-color)}.gist-details{-webkit-user-select:none;user-select:none;width:100%;padding:1rem}@media (min-width:1024px){.gist-details{padding:1rem 0}}.gist-bar{justify-content:space-between;width:100%;display:flex}@media (max-width:768px){.gist-bar{flex-direction:column}}.gist-info,.ratelimit{flex:auto;padding:.5rem}.ratelimit>p{margin:0;line-height:1.5}.gist-loading{flex:1 0 auto;justify-content:center;align-items:center;display:flex}.gist-no-data{flex:auto;display:flex}.toast-queue{width:100%;max-width:320px;position:fixed;top:60px;right:0}.toast{color:var(--black);background-color:var(--semi-white-color);border:1px solid var(--theme-color);border-radius:var(--border-radius);box-shadow:0 0 1rem var(--theme-color);animation:height-change var(--animation-duration)ease forwards,slide-in-right var(--animation-duration)ease-in forwards,slide-out-right var(--animation-duration)ease-out 5s forwards;background-color:#fffd;max-height:320px;margin:1rem;display:flex}.toast-badge{flex:none;width:32px;height:32px;margin:8px}.toast-info{color:#1b95e0}.toast-success{color:#19cf86}.toast-warning{color:#fab81e}.toast-badge>svg{width:100%;height:100%}.toast-text{margin:1rem .5rem}@keyframes height-change{0%{max-height:0}to{max-height:320px}}@keyframes slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes slide-in-up{0%{transform:translateY(100%)}to{transform:translate(0)}}@keyframes slide-in-down{0%{transform:translateY(-100%)}to{transform:translate(0)}} diff --git a/assets/ja-GcgVr18M.js b/assets/ja-GcgVr18M.js new file mode 100644 index 00000000..68b0731a --- /dev/null +++ b/assets/ja-GcgVr18M.js @@ -0,0 +1 @@ +const e={languageName:"日本語",app:{name:"歌詞スクロールちゃん",fullname:"あかりの歌詞スクロールちゃん"},header:{home:"ホームページ",editor:"編集",synchronizer:"同期",gist:"Github Gist",preferences:"設定"},audio:{loadAudio:"オーディオファイルを読み込む",play:"再生",pause:"停止",replay5s:"5秒戻る",forward5s:"5秒進む",resetRate:"再生速度をリセット",error:["オーディオエラー","オーディオダウンロードエラー","オーディオネットワークエラー","オーディオデコードエラー","ブラウザでサポートされていないオーディオ"]},loadAudio:{file:"ファイル",url:"URL",loadFile:"ここをクリックするか、このページにオーディオファイルをドロップしてください"},home:{tips:"プロンプト",tipForLyricText:"編集ページに切り替えて歌詞のテキストを貼り付けます。",tipForUploadAudio:"左下のボタンをクリックしてオーディオファイルをロードします。",tipForSynchronizer:"同期ページに切り替えてスクロール歌詞を作り始めます〜",tipTopLeft:"このヘルプページに戻るにはここをクリック",tipTopRight:"ページを切り替えるにはここをクリック",tipBottomLeft:"ここでオーディオをロードして再生を制御できます。",tipBottomRight:"ここでは再生速度を変更できます"},editor:{metaInfo:"メタ情報",album:"アルバム",title:"曲名",artist:"アーティスト名",uploadText:"テキストを読み込む",copyText:"すべて選択してコピー",downloadText:"ダウンロード",saveToGist:"Github Gistに保存",saveFileName:"ファイル名",utils:"lrc utils"},gist:{newTokenTip:"歌詞スクロールちゃんはGithub Gistにデータを取得して保存するためにGithubトークンを使用します",newTokenButton:"新しいGithubトークンを生成する",newGistTip:"新しいGistリポジトリを作成するか、既存のGist IDを割り当てます",newGistRepoButton:"新しいGistリポジトリを作成する",gistIdPlaceholder:"または既存のGist IDを割り当てる",info:"情報",clearTokenAndGist:"クリアトークンとGIST ID"},preferences:{version:"バージョン",commitHash:"Commit hash",updateTime:"更新時間",repo:"プロジェクトURL",help:"について&ヘルプ",language:"言語(language)",builtInAudio:"ブラウザ内蔵のオーディオプレーヤーを使用する",spaceButton:"画面上のスペースキー",themeColor:"テーマカラー",lrcFormat:"歌詞出力フォーマット制御",fixed:"タイムスタンプ小数点",leftSpace:"左側のスペース",rightSpace:"右側スペース",clearCache:"キャッシュをクリア",themeMode:{label:"テーマモード",auto:"自動",light:"ライト",dark:"ダーク"}},notify:{audioLoaded:"オーディオがロードされました"}};export{e as default}; diff --git a/assets/ko-KR-yW8HIalv.js b/assets/ko-KR-yW8HIalv.js new file mode 100644 index 00000000..f33eabdf --- /dev/null +++ b/assets/ko-KR-yW8HIalv.js @@ -0,0 +1 @@ +const e={languageName:"한국어",app:{name:"LRC 메이커",fullname:"Akari의 LRC 메이커"},header:{home:"홈",editor:"편집기",synchronizer:"동기화",gist:"Github Gist",preferences:"설정"},audio:{loadAudio:"음원 로드하기",play:"재생",pause:"일시 중지",replay5s:"5초 뒤로 가기",forward5s:"5초 건더 뛰기",resetRate:"재생 속도 다시 설정",error:["오디오 오류","사용자가 오디오를 중단됨","오디오 넷워크 오류","오디오 디코딩 오류","오디오 지원하지 앖습니다"]},loadAudio:{file:"파일",url:"링크",loadFile:"여기로 파일 선택하기 또는 오디오 파일을 이 페이지에 드롭하기"},home:{tips:"팁",tipForLyricText:"편집기 페이지에 가사 텍스트를 붙여넣기.",tipForUploadAudio:"왼쪽 하단에는 버튼 클릭하면 오디오 파일 로드하기.",tipForSynchronizer:"동기화 페이기에 당신의 가사를 만드세요 :)",tipTopLeft:"에기에 클릭하면 이 페이지 돌아와세요",tipTopRight:"에기에 다른 페이지 탐색하세요",tipBottomLeft:"여기에 오리오를 로드하고 제어하세요",tipBottomRight:"여기에 재생 속도를 조정하세요"},editor:{metaInfo:"메타 정보",album:"앨범",title:"트랙 이름",artist:"아티스트",uploadText:"텍스트 업로드",copyText:"모두 선택 및 복사",downloadText:"다운로드",saveToGist:"GitHub Gist에 저장하기",saveFileName:"파일 이름",utils:"lrc 도구"},gist:{newTokenTip:"LRC 메이커는 GitHub 토큰으로 GitHub Gist 에서 데이터를 접근하고 저장합니다",newTokenButton:"새로운 GitHub 토큰 생성하기",newGistTip:"Create a new Gist repository or assign an existing Gist id",newGistRepoButton:"Create a new Gist Repository",gistIdPlaceholder:"Or assign an existing Gist id",info:"info",clearTokenAndGist:"Clear token and Gist id"},preferences:{version:"버전",commitHash:"토밋 헤시",updateTime:"업데이트 시간",repo:"저장고",help:"도움말 및 팁",language:"언어(language)",builtInAudio:"브라우저 빌트인 오디오 재생기 사용하기",spaceButton:"온 스크린 스페이스 키",themeColor:"모양색",lrcFormat:"LRC 포멧 조정",fixed:"타임 스템 고치됨",leftSpace:"왼쪽 스페이스",rightSpace:"오른쪽 스페이스",clearCache:"캐시 제거",themeMode:{label:"모양 모드",auto:"자동",light:"라이트",dark:"다크"}},notify:{audioLoaded:"음원 로드됨"}};export{e as default}; diff --git a/assets/lrc-file-name-sR0E2KGQ.js b/assets/lrc-file-name-sR0E2KGQ.js new file mode 100644 index 00000000..b368451c --- /dev/null +++ b/assets/lrc-file-name-sR0E2KGQ.js @@ -0,0 +1 @@ +const i=t=>t.replace(/[<>:"/\\|?*]/g,"_").trim(),l=t=>{const e=[t.get("ti"),t.get("ar")].filter(a=>!!a);return e.length===0&&(t.has("al")&&e.push(t.get("al")),e.push(new Date().toLocaleString())),e.map(a=>i(a)).join(" - ")+".lrc"};export{l}; diff --git a/assets/ncmc-worker-94pMDdCj.js b/assets/ncmc-worker-94pMDdCj.js new file mode 100644 index 00000000..3fc3e0da --- /dev/null +++ b/assets/ncmc-worker-94pMDdCj.js @@ -0,0 +1 @@ +(function(){"use strict";const i=self,A=Uint8Array.of(104,122,72,82,65,109,115,111,53,107,73,110,98,97,120,87),g=async(f,y)=>{const l={name:"AES-CBC",iv:new Uint8Array(16)},s=await crypto.subtle.importKey("raw",f,"AES-CBC",!1,["encrypt","decrypt"]),n=y.byteLength-16,u=y.slice(n),d=await crypto.subtle.decrypt(l,s,u),a=new Uint8Array(n+d.byteLength);a.set(new Uint8Array(d),n);const e=new Uint8Array(16);e.fill(16);const c=new Uint8Array(32);for(let t=0;t{const y=f.data,l=new FileReaderSync().readAsArrayBuffer(y),s=new DataView(l);(s.getUint32(0,!0)!==1313166403||s.getUint32(4,!0)!==1296122950)&&(i.postMessage({type:"error",payload:"not ncm file"}),i.close());let n=10;const u=(await(()=>{const e=s.getUint32(n,!0);n+=4;const c=new Uint8Array(l,n,e).map(t=>t^100);return n+=e,g(A,c)})()).slice(17),d=(()=>{const e=new Uint8Array(Array(256).keys()),c=u.length;let t=0;for(let r=0;r<256;r++)t=e[r]+t+u[r%c]&255,[e[r],e[t]]=[e[t],e[r]];return e.map((r,o,p)=>{o=o+1&255;const w=p[o],U=p[o+w&255];return p[w+U&255]})})();n+=s.getUint32(n,!0)+4,n+=s.getUint32(n+5,!0)+13;const a=(()=>{const e=new Uint8Array(l,n),c=e.length;for(let t=0;tPromise.all(l.filter(a=>a.startsWith(t)).map(async a=>caches.delete(a)))),await navigator.serviceWorker.getRegistration().then(l=>{l&&l.unregister().then(()=>{location.reload()})}))}var W=[["en-US","English"],["ja","日本語"],["ko-KR","한국어"],["pt-BR","Português"],["zh-CN","简体中文"],["zh-HK","繁體中文(香港)"],["zh-TW","繁體中文"]],u={hash:"f77b198",updateTime:"2023-11-22T06:55:14+00:00",version:"5.6.10"};const q={type:"number",step:1},g=(t,l)=>{const a=React.useRef(null);React.useEffect(()=>{const n=a.current;if(n){const c=()=>{n.value=t.toString()};return n.addEventListener("change",c),()=>n.removeEventListener("change",c)}},[t]);const o=React.useCallback(n=>{n.target.validity.valid&&l(n)},[l]);return{...q,ref:a,onChange:o,defaultValue:t}},z=W,G=()=>{const{prefState:t,prefDispatch:l,lang:a}=React.useContext(E,j.lang||j.prefState),o=React.useCallback(s=>{l({type:"themeColor",payload:s.target.value})},[l]),n=React.useRef(null),c=React.useCallback(s=>{let r=s.value;if(!s.validity.valid){s.value=s.defaultValue;return}r.length===3&&(r=[].map.call(r,i=>i+i).join("")),r.length<6&&(r=r.padEnd(6,"0")),l({type:"themeColor",payload:"#"+r})},[l]),b=React.useCallback(s=>c(s.target),[c]),C=React.useCallback(s=>{s.preventDefault();const i=s.target.elements.namedItem("user-color-input-text");return c(i)},[c]);React.useEffect(()=>{n.current.value=t.themeColor.slice(1)},[t.themeColor]);const d=React.useCallback(s=>{l({type:s.target.name,payload:s.target.value})},[l]),k=React.useCallback(()=>{L()},[]),N=React.useMemo(()=>{const s=new Date(u.updateTime),r={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",hour12:!1};return new Intl.DateTimeFormat(t.lang,r).format(s)},[t.lang]),v=React.useCallback(s=>{l({type:"lang",payload:s.target.value})},[l]),y=React.useCallback(()=>l({type:"builtInAudio",payload:s=>!s.builtInAudio}),[l]),R=React.useCallback(()=>l({type:"screenButton",payload:s=>!s.screenButton}),[l]),T=React.useCallback(s=>{l({type:"themeMode",payload:Number.parseInt(s.target.value,10)})},[l]),I=React.useCallback(s=>{l({type:"fixed",payload:Number.parseInt(s.target.value,10)})},[l]),M=React.useMemo(()=>z.map(([s,r])=>e.jsx("option",{value:s,children:r},s)),[]),S=React.useMemo(()=>Object.values(B).map(s=>{const r=s===t.themeColor,i=["color-picker","ripple"];return r&&i.push("checked"),e.jsx("label",{className:i.join(_.space),style:{backgroundColor:s},children:e.jsx("input",{hidden:!0,type:"radio",name:"theme-color",value:s,checked:r,onChange:o})},s)}),[o,t.themeColor]),p=React.useMemo(()=>({backgroundColor:t.themeColor}),[t.themeColor]),w=React.useMemo(()=>A(" hello 世界~ ",t.spaceStart,t.spaceEnd),[t.spaceStart,t.spaceEnd]),m=React.useRef(null),x=React.useRef(null);return React.useEffect(()=>{x.current.type==="color"&&m.current.removeAttribute("for")},[]),e.jsxs("div",{className:"preferences",children:[e.jsxs("ul",{children:[e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.version}),e.jsx("span",{className:"select-all",children:u.version})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.commitHash}),e.jsx("span",{className:"select-all",children:u.hash})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.updateTime}),e.jsx("span",{children:N})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.repo}),e.jsx("a",{className:"link",href:f.url,target:"_blank",rel:"noopener noreferrer",children:"Github"})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.help}),e.jsx("a",{className:"link",href:f.wiki,target:"_blank",rel:"noopener noreferrer",children:"Github Wiki"})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.language}),e.jsx("div",{className:"option-select",children:e.jsx("select",{value:t.lang,onChange:v,"aria-label":a.preferences.language,children:M})})]})}),e.jsx("li",{children:e.jsxs("label",{className:"list-item",children:[e.jsx("span",{children:a.preferences.builtInAudio}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:t.builtInAudio,onChange:y,"aria-label":a.preferences.builtInAudio}),e.jsx("span",{className:"toggle-switch-label"})]})]})}),e.jsx("li",{children:e.jsxs("label",{className:"list-item",children:[e.jsx("span",{children:a.preferences.spaceButton}),e.jsxs("label",{className:"toggle-switch",children:[e.jsx("input",{type:"checkbox",checked:t.screenButton,onChange:R,"aria-label":a.preferences.spaceButton}),e.jsx("span",{className:"toggle-switch-label"})]})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.themeMode.label}),e.jsx("div",{className:"option-select",children:e.jsxs("select",{name:"theme-mode",value:t.themeMode,onChange:T,"aria-label":a.preferences.themeMode.label,children:[e.jsx("option",{value:h.auto,children:a.preferences.themeMode.auto}),e.jsx("option",{value:h.light,children:a.preferences.themeMode.light}),e.jsx("option",{value:h.dark,children:a.preferences.themeMode.dark})]})})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.themeColor}),e.jsxs("details",{className:"dropdown",children:[e.jsxs("summary",{children:[e.jsx("span",{className:"color-picker ripple hash",style:p,children:"#"}),e.jsx("span",{className:"current-theme-color",children:t.themeColor.slice(1)})]}),e.jsxs("form",{className:"dropdown-body color-wall",onSubmit:C,children:[S,e.jsxs("label",{className:"color-picker ripple user-color-label hash",htmlFor:"user-color-input-text",style:p,ref:m,children:["#",e.jsx("input",{type:"color",className:"color-picker pseudo-hidden",value:t.themeColor,onChange:o,ref:x})]}),e.jsx("input",{ref:n,id:"user-color-input-text",name:"user-color-input-text",className:"user-color-input-text",type:"text",pattern:"[\\da-f]{3,6}",required:!0,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:!1,defaultValue:t.themeColor.slice(1),onBlur:b})]})]})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.lrcFormat}),e.jsxs("span",{children:[e.jsx("time",{className:"format-example-time",children:P(83.456,t.fixed)}),e.jsx("span",{className:"format-example-text",children:w})]})]})}),e.jsx("li",{children:e.jsxs("section",{className:"list-item",children:[e.jsx("span",{children:a.preferences.fixed}),e.jsx("div",{className:"option-select",children:e.jsxs("select",{name:"fixed",value:t.fixed,onChange:I,"aria-label":a.preferences.lrcFormat,children:[e.jsx("option",{value:0,children:"0"}),e.jsx("option",{value:1,children:"1"}),e.jsx("option",{value:2,children:"2"}),e.jsx("option",{value:3,children:"3"})]})})]})}),e.jsx("li",{children:e.jsxs("label",{className:"list-item",children:[e.jsx("label",{htmlFor:"space-start",children:a.preferences.leftSpace}),e.jsx("input",{name:"spaceStart",id:"space-start",required:!0,min:-1,...g(t.spaceStart,d)})]})}),e.jsx("li",{children:e.jsxs("label",{className:"list-item",children:[e.jsx("label",{htmlFor:"space-end",children:a.preferences.rightSpace}),e.jsx("input",{name:"spaceEnd",id:"space-end",required:!0,min:-1,...g(t.spaceEnd,d)})]})}),e.jsx("li",{className:"ripple",onTransitionEnd:k,children:e.jsx("section",{className:"list-item",children:a.preferences.clearCache})})]}),e.jsx(F,{})]})};export{G as Preferences}; diff --git a/assets/pt-BR-DSi-64D4.js b/assets/pt-BR-DSi-64D4.js new file mode 100644 index 00000000..78d73ea6 --- /dev/null +++ b/assets/pt-BR-DSi-64D4.js @@ -0,0 +1 @@ +const e={languageName:"Português",app:{name:"Criador de LRC",fullname:"Criador de LRC de Akari"},header:{home:"início",editor:"editor",synchronizer:"sincronizador",gist:"Github Gist",preferences:"preferências"},audio:{loadAudio:"carregar áudio",play:"play",pause:"pausar",replay5s:"repetir 5s",forward5s:"avançar 5s",resetRate:"redefinir a taxa de reprodução",error:["erro de áudio","áudio abortado pelo usuário","erro de rede de áudio","erro de decodificação de áudio","áudio não suportado"]},loadAudio:{file:"Arquivo",url:"URL",loadFile:"Clique aqui ou solte um arquivo de áudio nesta página"},home:{tips:"Dicas",tipForLyricText:"Navegue até a página do editor e cole o texto da letra.",tipForUploadAudio:"Clique no botão inferior esquerdo para carregar o arquivo de áudio.",tipForSynchronizer:"Navegue até a página do sincronizador e faça seu lrc :)",tipTopLeft:"Clique aqui para voltar a esta página",tipTopRight:"Clique aqui para navegar para outra página",tipBottomLeft:"carregue o áudio aqui e controle o áudio",tipBottomRight:"altere a taxa de reprodução aqui"},editor:{metaInfo:"informações meta",album:"álbum",title:"título",artist:"artista",uploadText:"enviar texto",copyText:"selecione tudo e copie",downloadText:"baixar",saveToGist:"salvar no Github Gist",saveFileName:"Nome do arquivo",utils:"lrc utils"},gist:{newTokenTip:"o Criador de LRC usa o Token do Github para recolher e armazenar dados para o Github Gist",newTokenButton:"Gerar um novo Token do Github",newGistTip:"Criar um novo repositório Gist ou atribuir um id Gist existente",newGistRepoButton:"Criar um novo Repositório Gist",gistIdPlaceholder:"Ou atribuir um id Gist existente",info:"informação",clearTokenAndGist:"Limpar Token e id Gist"},preferences:{version:"Versão",commitHash:"Commit hash",updateTime:"Tempo de atualização",repo:"Repositório",help:"Ajuda e dicas",language:"Linguagem",builtInAudio:"Use o player de áudio integrado do navegador",spaceButton:"Tecla de espaço na tela",themeColor:"Cor do tema",lrcFormat:"Ajuste de formato LRC",fixed:"Data-de-tempo fixo",leftSpace:"Espaço esquerdo",rightSpace:"Espaço direito",clearCache:"Limpar cache",themeMode:{label:"Modo de tema",auto:"auto",light:"claro",dark:"escuro"}},notify:{audioLoaded:"Áudio carregado"}};export{e as default}; diff --git a/assets/qmc-worker-whNXszNT.js b/assets/qmc-worker-whNXszNT.js new file mode 100644 index 00000000..67c78f6a --- /dev/null +++ b/assets/qmc-worker-whNXszNT.js @@ -0,0 +1 @@ +(function(){"use strict";const s=self,n=[195,74,214,202,144,103,247,82,216,161,102,98,159,91,9,0,195,94,149,35,159,19,17,126,216,146,63,188,144,187,116,14,195,71,116,61,144,170,63,81,216,244,17,132,159,222,149,29,195,198,9,213,159,250,102,249,216,240,247,160,144,161,214,243];s.addEventListener("message",a=>{const c=a.data,f=new FileReaderSync().readAsArrayBuffer(c),r=new Uint8Array(f).map((o,t)=>{let e=(t>32767?t%32767:t)&127;return e>63&&(e=128-e&63),o^n[e]});s.postMessage({type:"success",payload:r},[r.buffer]),s.close()})})(); diff --git a/assets/smooth-scroll-bCWoQaUd.js b/assets/smooth-scroll-bCWoQaUd.js new file mode 100644 index 00000000..8f983d53 --- /dev/null +++ b/assets/smooth-scroll-bCWoQaUd.js @@ -0,0 +1 @@ +const f=(()=>{const u=performance||Date,v=t=>.5*(1-Math.cos(Math.PI*t)),i={current:0},n=()=>{cancelAnimationFrame(i.current),d()},w={passive:!0,once:!0},E=()=>{window.addEventListener("wheel",n,w),window.addEventListener("touchmove",n,w)},d=()=>{window.removeEventListener("wheel",n),window.removeEventListener("touchmove",n)},h=t=>{const a=u.now(),{startTime:l,startX:o,startY:s,stopY:e}=t,r=(a-l)/468;if(r>=1){t.method(o,e),d();return}const m=v(r),c=s+(e-s)*m;t.method(o,c),c!==e&&(i.current=requestAnimationFrame(()=>h(t)))},p=document.scrollingElement||document.documentElement;Element.prototype.scrollIntoView=function(){const{top:t,bottom:a}=this.getBoundingClientRect(),l=(t+a)/2,o=window.visualViewport?window.visualViewport.height:innerHeight,s=p.scrollLeft,e=p.scrollTop,r=e+l-o/2;cancelAnimationFrame(i.current),E(),h({method:(m,c)=>window.scroll(m,c),startTime:u.now(),startX:s,startY:e,stopY:r})}})();export{f as default}; diff --git a/assets/synchronizer-yje8GbOz.js b/assets/synchronizer-yje8GbOz.js new file mode 100644 index 00000000..f2669518 --- /dev/null +++ b/assets/synchronizer-yje8GbOz.js @@ -0,0 +1 @@ +import{A as u,s as F,j as a,c as G,D as V,d as E,e as m,f as H,g as L,h as I,i as K,a as J,S as N,k as M,l as W}from"./index-0wKaPtT5.js";import{l as $}from"./lrc-file-name-sR0E2KGQ.js";const T=React.memo(({syncMode:n,setSyncMode:t,lrcDispatch:d,prefState:c})=>{const[l,b]=React.useState(),[p,S]=React.useState(),i=React.useCallback(()=>{t(g=>g===h.select?h.highlight:h.select)},[t]),k=React.useCallback(()=>{d({type:u.getState,payload:g=>{const R=F(g,c);b(D=>(D&&URL.revokeObjectURL(D),URL.createObjectURL(new Blob([R],{type:"text/plain;charset=UTF-8"})))),S($(g.info))}})},[d,c]),x=n===h.select?"select":"highlight",C=["aside-button","syncmode-button","ripple","glow ",x].join(E.space);return a.jsxs("aside",{className:"aside-panel",children:[a.jsx("button",{className:C,onClick:i,"aria-label":`${x} mode`,children:a.jsx(G,{})}),a.jsx("a",{href:l,download:p,className:"aside-button ripple glow",onClick:k,children:a.jsx(V,{})})]})});T.displayName=T.name;const P=({fixed:n})=>{const t=React.useRef(Symbol(P.name)),[d,c]=React.useState(m.currentTime),[l,b]=React.useState(m.paused),[p,S]=React.useState(m.playbackRate);return React.useEffect(()=>H.sub(t.current,i=>{switch(i.type){case L.pause:{b(i.payload);break}case L.rateChange:{S(i.payload);break}}}),[]),React.useEffect(()=>{const i=[1,10,100,1e3][n]*p;if(l||2*i>60)return I.sub(t.current,k=>{c(k)});{const k=setInterval(()=>{c(m.currentTime)},1e3/(2*i));return()=>{clearInterval(k)}}},[n,l,p]),a.jsx("time",{className:"curser",children:K(d,n)})},q=({sync:n})=>a.jsx("button",{className:"space-button",onClick:n,children:"space"});var h=(n=>(n[n.select=0]="select",n[n.highlight=1]="highlight",n))(h||{});const z=({state:n,dispatch:t})=>{const d=React.useRef(Symbol(z.name)),{selectIndex:c,currentIndex:l,lyric:b}=n,{prefState:p,lang:S}=React.useContext(J);React.useEffect(()=>{t({type:u.info,payload:{name:"tool",value:`${S.app.name} https://lrc-maker.github.io`}})},[t,S]);const[i,k]=React.useState(()=>sessionStorage.getItem(N.syncMode)===1 .toString()?1:0);React.useEffect(()=>{sessionStorage.setItem(N.syncMode,i.toString())},[i]);const x=React.useRef(null),C={0:c,1:l}[i];React.useEffect(()=>{var e;const s=(e=x.current)==null?void 0:e.children[C];s!==void 0&&s.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},[C]),React.useEffect(()=>I.sub(d.current,s=>{t({type:u.refresh,payload:s})}),[t]);const g=React.useCallback(()=>{m.duration&&t({type:u.next,payload:m.currentTime})},[t]),R=React.useCallback((s,e,r)=>{var j;if(!m.duration)return;const o=(j=b[r])==null?void 0:j.time;o!==void 0&&t({type:u.time,payload:m.step(s,e,o)})},[t,b]);React.useEffect(()=>{function s(e){const{code:r,key:o,target:j}=e,f=r||o;if(!W(j)){if(f==="Backspace"||f==="Delete"||f==="Del"){e.preventDefault(),t({type:u.deleteTime,payload:void 0});return}if(r==="Digit0"||o==="0"){e.preventDefault(),R(e,0,c);return}if(r==="Minus"||o==="-"||o==="_"){e.preventDefault(),R(e,-.5,c);return}if(r==="Equal"||o==="+"||o==="="){e.preventDefault(),R(e,.5,c);return}e.metaKey||e.ctrlKey||(r==="Space"||o===" "||o==="Spacebar"?(e.preventDefault(),g()):["ArrowUp","KeyW","KeyJ","Up","W","w","J","j"].includes(f)?(e.preventDefault(),t({type:u.select,payload:y=>y-1})):["ArrowDown","KeyS","KeyK","Down","S","s","K","k"].includes(f)?(e.preventDefault(),t({type:u.select,payload:y=>y+1})):f==="Home"?(e.preventDefault(),t({type:u.select,payload:()=>0})):f==="End"?(e.preventDefault(),t({type:u.select,payload:()=>1/0})):f==="PageUp"?(e.preventDefault(),t({type:u.select,payload:y=>y-10})):f==="PageDown"&&(e.preventDefault(),t({type:u.select,payload:y=>y+10})))}}return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[R,t,c,g]);const D=React.useCallback(s=>{s.stopPropagation();const e=s.target;if(e.classList.contains("line")){const r=Number.parseInt(e.dataset.key,10)||0;t({type:u.select,payload:()=>r})}},[t]),U=React.useCallback(s=>{if(s.stopPropagation(),!m.duration)return;const e=s.target;if(e.classList.contains("line")){const r=Number.parseInt(e.dataset.key,10);R(s,0,r)}},[R]),A=React.useCallback((s,e,r)=>{const o=e===c,j=e===l,f=e>0&&r[e].time<=r[e-1].time,y=Object.entries({line:!0,select:o,highlight:j,error:f}).reduce((w,[v,O])=>(O&&w.push(v),w),[]).join(E.space);return a.jsx(_,{index:e,className:y,line:s,select:o,prefState:p},e)},[c,l,p]),B=p.screenButton?"lyric-list on-screen-button":"lyric-list";return a.jsxs(a.Fragment,{children:[a.jsx("ul",{ref:x,className:B,onClickCapture:D,onDoubleClickCapture:U,children:n.lyric.map(A)}),a.jsx(T,{syncMode:i,setSyncMode:k,lrcDispatch:t,prefState:p}),p.screenButton&&a.jsx(q,{sync:g})]})},_=({line:n,index:t,select:d,className:c,prefState:l})=>{const b=K(n.time,l.fixed),p=M(n.text,l.spaceStart,l.spaceEnd);return a.jsxs("li",{"data-key":t,className:c,children:[d&&a.jsx(P,{fixed:l.fixed}),a.jsx("time",{className:"line-time",children:b}),a.jsx("span",{className:"line-text",children:p})]},t)};export{h as SyncMode,z as Synchronizer}; diff --git a/assets/zh-CN-IS2wiGhF.js b/assets/zh-CN-IS2wiGhF.js new file mode 100644 index 00000000..7fd681d3 --- /dev/null +++ b/assets/zh-CN-IS2wiGhF.js @@ -0,0 +1 @@ +const e={languageName:"简体中文",app:{name:"歌词滚动姬",fullname:"灯里的歌词滚动姬"},header:{home:"主页",editor:"编辑",synchronizer:"打轴",gist:"Github Gist",preferences:"设置"},audio:{loadAudio:"加载音频",play:"播放",pause:"暂停",replay5s:"后退 5 秒",forward5s:"前进 5 秒",resetRate:"重置播放速度",error:["音频错误","音频请求被用户终止","音频网络请求错误","音频解码错误","浏览器无法支持此音频格式"]},loadAudio:{file:"文件",url:"外链",loadFile:"点击这里或直接拖放音频到这个页面"},home:{tips:"提示",tipForLyricText:"切换到编辑页面,粘贴歌词文本。",tipForUploadAudio:"点击左下方按钮,载入音频文件。",tipForSynchronizer:"切换到打轴页面,开始制作滚动歌词吧~",tipTopLeft:"点击这里可以回到这个帮助页面",tipTopRight:"点击这里切换页面",tipBottomLeft:"这里可以加载音频,控制播放",tipBottomRight:"这里可以调节播放速度"},editor:{metaInfo:"元信息",album:"所属专辑",title:"歌曲名",artist:"艺人名",uploadText:"加载文本",copyText:"全选复制",downloadText:"下载",saveToGist:"保存到 Github Gist",saveFileName:"文件名",utils:"实用工具"},gist:{newTokenTip:"歌词滚动姬使用 Github Token 来存取 Github Gist 上的数据",newTokenButton:"生成新的 Github Token",newGistTip:"创建一个新的 Gist 仓库或指定一个已存在的 Gist id",newGistRepoButton:"创建一个新的 Gist 仓库",gistIdPlaceholder:"或指定一个已存在的 Gist id",info:"信息",clearTokenAndGist:"清除 Github Token 和 Gist id"},preferences:{version:"版本",commitHash:"Commit hash",updateTime:"更新时间",repo:"项目地址",help:"关于 & 帮助",language:"语言(language)",builtInAudio:"使用浏览器内建音频播放器",spaceButton:"启用虚拟空格键",themeColor:"主题颜色",lrcFormat:"歌词输出格式控制",fixed:"时间标签小数点",leftSpace:"左侧空格",rightSpace:"右侧空格",clearCache:"清除缓存",themeMode:{label:"主题模式",auto:"跟随系统",light:"亮色模式",dark:"暗色模式"}},notify:{audioLoaded:"音频已载入"}};export{e as default}; diff --git a/assets/zh-HK--aRTSL7g.js b/assets/zh-HK--aRTSL7g.js new file mode 100644 index 00000000..021a2759 --- /dev/null +++ b/assets/zh-HK--aRTSL7g.js @@ -0,0 +1 @@ +const e={languageName:"繁體中文(香港)",app:{name:"歌詞滾動姬",fullname:"小明的歌詞滾動姬"},header:{home:"主頁",editor:"編輯",synchronizer:"同步",gist:"Github Gist",preferences:"設定"},audio:{loadAudio:"匯入音訊",play:"播放",pause:"暫停",replay5s:"倒轉 5s",forward5s:"快轉 5s",resetRate:"重設播放速度",error:["音訊錯誤","音訊請求被用戶終止","音訊網絡請求錯誤","音訊解碼錯誤","瀏覽器無法支援此音訊格式"]},loadAudio:{file:"檔案",url:"URL",loadFile:"點選這裏或直接拖放音訊檔案到這個頁面"},home:{tips:"提示",tipForLyricText:"切換到編輯頁面,黏貼歌詞文本。",tipForUploadAudio:"點選左下方按鈕,匯入音訊檔案。",tipForSynchronizer:"切換到同步頁面,開始製作滾動歌詞吧~",tipTopLeft:"點選這裏可以回到這個幫助頁面",tipTopRight:"點選這裏切換頁面",tipBottomLeft:"這裏可以加載音訊,控制播放",tipBottomRight:"這裏可以調節播放速度"},editor:{metaInfo:"元數據",album:"所屬專輯",title:"歌曲名",artist:"藝人名",uploadText:"匯入文本",copyText:"全選拷貝",downloadText:"下載",saveToGist:"保存到 Github Gist",saveFileName:"檔名",utils:"實用工具"},gist:{newTokenTip:"歌詞滾動姬使用 Github Token 來存取 Github Gist 上的數據",newTokenButton:"生成新的 Github Token",newGistTip:"創建一個新的 Gist 儲存庫或指定一個已存在的 Gist id",newGistRepoButton:"創建一個新的 Gist 儲存庫",gistIdPlaceholder:"或指定一個已存在的 Gist id",info:"資訊",clearTokenAndGist:"清除 Github Token 和 Gist id"},preferences:{version:"版本",commitHash:"Commit hash",updateTime:"更新時間",repo:"專案地址",help:"關於 & 幫助",language:"語言(language)",builtInAudio:"使用瀏覽器內建音訊播放器",spaceButton:"啓用螢幕 Space 鍵",themeColor:"主題顏色",lrcFormat:"歌詞輸出格式控制",fixed:"時間標籤小數點",leftSpace:"左側空格",rightSpace:"右側空格",clearCache:"清除快取",themeMode:{label:"主題模式",auto:"跟隨系統",light:"亮色模式",dark:"暗色模式"}},notify:{audioLoaded:"音訊已匯入"}};export{e as default}; diff --git a/assets/zh-TW-FFP4ehVz.js b/assets/zh-TW-FFP4ehVz.js new file mode 100644 index 00000000..ec1aab36 --- /dev/null +++ b/assets/zh-TW-FFP4ehVz.js @@ -0,0 +1 @@ +const e={languageName:"繁體中文",app:{name:"歌詞滾動姬",fullname:"小明的歌詞滾動姬"},header:{home:"主頁",editor:"編輯",synchronizer:"同步",gist:"Github Gist",preferences:"設定"},audio:{loadAudio:"匯入音訊",play:"播放",pause:"暫停",replay5s:"倒轉 5s",forward5s:"快轉 5s",resetRate:"重設播放速度",error:["音訊錯誤","音訊請求被用戶終止","音訊網路請求錯誤","音訊解碼錯誤","瀏覽器無法支援此音訊格式"]},loadAudio:{file:"檔案",url:"URL",loadFile:"點選這裡或直接拖放音訊檔案到這個頁面"},home:{tips:"提示",tipForLyricText:"切換到編輯頁面,黏貼歌詞文本。",tipForUploadAudio:"點選左下方按鈕,匯入音訊檔案。",tipForSynchronizer:"切換到同步頁面,開始製作滾動歌詞吧~",tipTopLeft:"點選這裡可以回到這個幫助頁面",tipTopRight:"點選這裡切換頁面",tipBottomLeft:"這裡可以加載音訊,控制播放",tipBottomRight:"這裡可以調節播放速度"},editor:{metaInfo:"元數據",album:"所屬專輯",title:"歌曲名",artist:"藝人名",uploadText:"匯入文本",copyText:"全選拷貝",downloadText:"下載",saveToGist:"保存到 Github Gist",saveFileName:"檔名",utils:"實用工具"},gist:{newTokenTip:"歌詞滾動姬使用 Github Token 來存取 Github Gist 上的數據",newTokenButton:"生成新的 Github Token",newGistTip:"創建一個新的 Gist 儲存庫或指定一個已存在的 Gist id",newGistRepoButton:"創建一個新的 Gist 儲存庫",gistIdPlaceholder:"或指定一個已存在的 Gist id",info:"資訊",clearTokenAndGist:"清除 Github Token 和 Gist id"},preferences:{version:"版本",commitHash:"Commit hash",updateTime:"更新時間",repo:"專案地址",help:"關於 & 幫助",language:"語言(language)",builtInAudio:"使用瀏覽器內建音訊播放器",spaceButton:"啓用螢幕 Space 鍵",themeColor:"主題顏色",lrcFormat:"歌詞輸出格式控制",fixed:"時間標籤小數點",leftSpace:"左側空格",rightSpace:"右側空格",clearCache:"清除快取",themeMode:{label:"主題模式",auto:"跟隨系統",light:"亮色模式",dark:"暗色模式"}},notify:{audioLoaded:"音訊已匯入"}};export{e as default}; diff --git a/favicons/android-chrome-192x192.png b/favicons/android-chrome-192x192.png new file mode 100644 index 00000000..c2c2f361 Binary files /dev/null and b/favicons/android-chrome-192x192.png differ diff --git a/favicons/android-chrome-512x512.png b/favicons/android-chrome-512x512.png new file mode 100644 index 00000000..7b1b2844 Binary files /dev/null and b/favicons/android-chrome-512x512.png differ diff --git a/favicons/apple-touch-icon.png b/favicons/apple-touch-icon.png new file mode 100644 index 00000000..3287c390 Binary files /dev/null and b/favicons/apple-touch-icon.png differ diff --git a/favicons/browserconfig.xml b/favicons/browserconfig.xml new file mode 100644 index 00000000..fb113953 --- /dev/null +++ b/favicons/browserconfig.xml @@ -0,0 +1,10 @@ + + + + + + + #ffffff + + + diff --git a/favicons/favicon-16x16.png b/favicons/favicon-16x16.png new file mode 100644 index 00000000..c9f66488 Binary files /dev/null and b/favicons/favicon-16x16.png differ diff --git a/favicons/favicon-32x32.png b/favicons/favicon-32x32.png new file mode 100644 index 00000000..715ebaaa Binary files /dev/null and b/favicons/favicon-32x32.png differ diff --git a/favicons/favicon.ico b/favicons/favicon.ico new file mode 100644 index 00000000..15b682fc Binary files /dev/null and b/favicons/favicon.ico differ diff --git a/favicons/mstile-150x150.png b/favicons/mstile-150x150.png new file mode 100644 index 00000000..99783a85 Binary files /dev/null and b/favicons/mstile-150x150.png differ diff --git a/favicons/mstile-310x310.png b/favicons/mstile-310x310.png new file mode 100644 index 00000000..eaeac22b Binary files /dev/null and b/favicons/mstile-310x310.png differ diff --git a/favicons/safari-pinned-tab.svg b/favicons/safari-pinned-tab.svg new file mode 100644 index 00000000..10422113 --- /dev/null +++ b/favicons/safari-pinned-tab.svg @@ -0,0 +1 @@ + diff --git a/index.html b/index.html new file mode 100644 index 00000000..7676117b --- /dev/null +++ b/index.html @@ -0,0 +1,54 @@ + + + + + LRC Maker + + + + + + + + + + + + + + + + + + + + + +
+
+ loading +
+
+ + + + + diff --git a/site.webmanifest b/site.webmanifest new file mode 100644 index 00000000..1c5428f3 --- /dev/null +++ b/site.webmanifest @@ -0,0 +1,31 @@ +{ + "background_color": "#f1f3f4", + "description": "歌词滚动姬|可能是你所能见到的最好用的歌词制作工具", + "display": "standalone", + "icons": [ + { + "sizes": "192x192", + "src": "./favicons/android-chrome-192x192.png", + "type": "image/png" + }, + { + "sizes": "512x512", + "src": "./favicons/android-chrome-512x512.png", + "type": "image/png" + } + ], + "name": "灯里的歌词滚动姬", + "short_name": "歌词滚动姬", + "start_url": "./", + "theme_color": "#484848", + "share_target": { + "action": "./", + "method": "GET", + "enctype": "application/x-www-form-urlencoded", + "params": { + "title": "title", + "text": "text", + "url": "url" + } + } +} diff --git a/svg/akari-hide-wall.svg b/svg/akari-hide-wall.svg new file mode 100644 index 00000000..4aa12221 --- /dev/null +++ b/svg/akari-hide-wall.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/svg/akari-not-found.svg b/svg/akari-not-found.svg new file mode 100644 index 00000000..5b96408f --- /dev/null +++ b/svg/akari-not-found.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/svg/akari-odango-loading.svg b/svg/akari-odango-loading.svg new file mode 100644 index 00000000..5189648f --- /dev/null +++ b/svg/akari-odango-loading.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sw.js b/sw.js new file mode 100644 index 00000000..656cb4cb --- /dev/null +++ b/sw.js @@ -0,0 +1 @@ +var n={hash:"f77b198",updateTime:"2023-11-22T06:55:14+00:00",version:"5.6.10"};const r=self,a="akari-lrc-maker",u=n.version,l=n.hash,c=`${a}-${u}-${l}`;r.addEventListener("install",()=>{r.skipWaiting()});r.addEventListener("activate",t=>{t.waitUntil(caches.keys().then(s=>Promise.all([r.clients.claim(),...s.filter(e=>e.startsWith(a)&&e!==c).map(e=>caches.delete(e))])))});r.addEventListener("fetch",t=>{if(t.request.method!=="GET")return;const s=new URL(t.request.url);!/(?:\.css|\.js|\.svg)$/i.test(s.pathname)&&s.origin!==r.location.origin||t.respondWith(caches.match(t.request).then(e=>e||caches.open(c).then(h=>fetch(t.request).then(i=>(i.status!==200||h.put(t.request,i.clone()),i)))))});