2022-04-25 18:25:25 +08:00
|
|
|
var vi=Object.defineProperty;var Ei=(e,u,r)=>u in e?vi(e,u,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[u]=r;var _=(e,u,r)=>(Ei(e,typeof u!="symbol"?u+"":u,r),r);import{m as o,l as $e,s as hi,Q as mi,a as Fi,b as Nu,P as Di}from"./vendor.32e42528.js";const Ai=function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const t of i)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const t={};return i.integrity&&(t.integrity=i.integrity),i.referrerpolicy&&(t.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?t.credentials="include":i.crossorigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function n(i){if(i.ep)return;i.ep=!0;const t=r(i);fetch(i.href,t)}};Ai();var y;(function(e){e[e.Unknown=0]="Unknown",e[e.Alt=1]="Alt",e[e.Backspace=2]="Backspace",e[e.CapsLock=3]="CapsLock",e[e.Control=4]="Control",e[e.Delete=5]="Delete",e[e.DownArrow=6]="DownArrow",e[e.End=7]="End",e[e.Escape=8]="Escape",e[e.F1=9]="F1",e[e.F10=10]="F10",e[e.F11=11]="F11",e[e.F12=12]="F12",e[e.F2=13]="F2",e[e.F3=14]="F3",e[e.F4=15]="F4",e[e.F5=16]="F5",e[e.F6=17]="F6",e[e.F7=18]="F7",e[e.F8=19]="F8",e[e.F9=20]="F9",e[e.Home=21]="Home",e[e.LeftArrow=22]="LeftArrow",e[e.Meta=23]="Meta",e[e.Option=24]="Option",e[e.PageDown=25]="PageDown",e[e.PageUp=26]="PageUp",e[e.Return=27]="Return",e[e.RightArrow=28]="RightArrow",e[e.Shift=29]="Shift",e[e.Space=30]="Space",e[e.Tab=31]="Tab",e[e.UpArrow=32]="UpArrow",e[e.Numpad0=33]="Numpad0",e[e.Numpad1=34]="Numpad1",e[e.Numpad2=35]="Numpad2",e[e.Numpad3=36]="Numpad3",e[e.Numpad4=37]="Numpad4",e[e.Numpad5=38]="Numpad5",e[e.Numpad6=39]="Numpad6",e[e.Numpad7=40]="Numpad7",e[e.Numpad8=41]="Numpad8",e[e.Numpad9=42]="Numpad9",e[e.Cancel=43]="Cancel",e[e.Clear=44]="Clear",e[e.Menu=45]="Menu",e[e.Pause=46]="Pause",e[e.Kana=47]="Kana",e[e.Hangul=48]="Hangul",e[e.Junja=49]="Junja",e[e.Final=50]="Final",e[e.Hanja=51]="Hanja",e[e.Kanji=52]="Kanji",e[e.Convert=53]="Convert",e[e.Select=54]="Select",e[e.Print=55]="Print",e[e.Execute=56]="Execute",e[e.Snapshot=57]="Snapshot",e[e.Insert=58]="Insert",e[e.Help=59]="Help",e[e.Sleep=60]="Sleep",e[e.Separator=61]="Separator",e[e.Scroll=62]="Scroll",e[e.NumLock=63]="NumLock",e[e.RWin=64]="RWin",e[e.Apps=65]="Apps",e[e.Multiply=66]="Multiply",e[e.Add=67]="Add",e[e.Subtract=68]="Subtract",e[e.Decimal=69]="Decimal",e[e.Divide=70]="Divide",e[e.Equals=71]="Equals",e[e.NumpadEnter=72]="NumpadEnter",e[e.RShift=73]="RShift",e[e.RControl=74]="RControl",e[e.RAlt=75]="RAlt",e[e.CtrlAltDel=100]="CtrlAltDel",e[e.LockScreen=101]="LockScreen",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(y||(y={}));function je(e){switch(e){case 0:case"Unknown":return 0;case 1:case"Alt":return 1;case 2:case"Backspace":return 2;case 3:case"CapsLock":return 3;case 4:case"Control":return 4;case 5:case"Delete":return 5;case 6:case"DownArrow":return 6;case 7:case"End":return 7;case 8:case"Escape":return 8;case 9:case"F1":return 9;case 10:case"F10":return 10;case 11:case"F11":return 11;case 12:case"F12":return 12;case 13:case"F2":return 13;case 14:case"F3":return 14;case 15:case"F4":return 15;case 16:case"F5":return 16;case 17:case"F6":return 17;case 18:case"F7":return 18;case 19:case"F8":return 19;case 20:case"F9":return 20;case 21:case"Home":return 21;case 22:case"LeftArrow":return 22;case 23:case"Meta":return 23;case 24:case"Option":return 24;case 25:case"PageDown":return 25;case 26:case"PageUp":return 26;case 27:case"Return":return 27;case 28:case"RightArrow":return 28;case 29:case"Shift":return 29;case 30:case"Space":return 30;case 31:case"Tab":return 31;case 32:case"UpArrow":return 32;case 33:case"Numpad0":return 33;case 34:case"Numpad1":return 34;case 35:case"Numpad2":return 35;case 36:case"Numpad3":return 36;case 37:case"Numpad4":return 37;case 38:case"Numpad5":return 38;case 39:case"Numpad6":return 39;case 40:case"Numpad7
|
|
|
|
`;let e;window.init(),document.body.onload=()=>{const r=document.querySelector("#host");r.value=localStorage.getItem("custom-rendezvous-server");const n=document.querySelector("#id");n.value=localStorage.getItem("id");const i=document.querySelector("#key");i.value=localStorage.getItem("key"),e=YUVCanvas.attach(document.getElementById("player"))},window.connect=()=>{const r=document.querySelector("#host");localStorage.setItem("custom-rendezvous-server",r.value);const n=document.querySelector("#id");localStorage.setItem("id",n.value);const i=document.querySelector("#key");localStorage.setItem("key",i.value),(async()=>{const s=li();s.setMsgbox(u),s.setDraw(l=>{mu(l),e.drawFrame(l)}),document.querySelector("div#status").style.display="block",document.querySelector("div#connect").style.display="none",document.querySelector("div#text").innerHTML="Connecting ...",await s.start(n.value)})()},window.cancel=()=>{di(),document.querySelector("div#connect").style.display="block",document.querySelector("div#password").style.display="none",document.querySelector("div#status").style.display="none",document.querySelector("div#canvas").style.display="none"},window.confirm=()=>{const r=document.querySelector("input#password").value;r&&(document.querySelector("div#password").style.display="none",Fu().login(r))}}
|