Spaces:
Running
Running
| const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ar-init-dATIWkJY.js","./mediapipe-Ck-u_eH7.js","./three-WgMhLE1J.js","./rolldown-runtime-DK3Fl9T5.js"])))=>i.map(i=>d[i]); | |
| import{r as e}from"./mediapipe-Ck-u_eH7.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=`jarvis_omega_session_credentials_v1`,n=`/xr/ar_config`;function r(){try{return localStorage.getItem(t)||``}catch{return``}}function i(e){try{localStorage.setItem(t,String(e||``).trim())}catch{}}function a(){try{let e=new URLSearchParams(location.search),t=String(e.get(`omega`)||e.get(`omegaBridge`)||``).trim();if(t)return`${t.replace(/\/+$/,``)}${n}`}catch{}return n}async function o(e){try{return(await fetch(a(),{headers:{Authorization:`Bearer ${e}`},cache:`no-store`})).status===200}catch{return!1}}async function s(){await e(()=>import(`./ar-init-dATIWkJY.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)}function c(){let e=document.createElement(`div`);return e.id=`omega-access-gate`,e.innerHTML=` | |
| <style> | |
| #omega-access-gate { | |
| position: fixed; inset: 0; z-index: 100000; | |
| display: flex; align-items: center; justify-content: center; | |
| background: | |
| radial-gradient(120% 90% at 50% -10%, rgba(11,132,255,0.18), transparent 60%), | |
| radial-gradient(80% 70% at 50% 120%, rgba(0,224,198,0.10), transparent 55%), | |
| #05070b; | |
| font-family: 'Inter', system-ui, sans-serif; | |
| -webkit-tap-highlight-color: transparent; | |
| animation: gateFade .5s ease both; | |
| } | |
| @keyframes gateFade { from { opacity: 0 } to { opacity: 1 } } | |
| #omega-access-gate .card { | |
| width: min(92vw, 380px); | |
| padding: 34px 30px 28px; | |
| border-radius: 22px; | |
| background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); | |
| border: 1px solid rgba(120,180,255,0.18); | |
| box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06); | |
| backdrop-filter: blur(22px) saturate(140%); | |
| text-align: center; | |
| } | |
| #omega-access-gate .ring { | |
| width: 62px; height: 62px; margin: 0 auto 18px; | |
| border-radius: 50%; | |
| display: grid; place-items: center; | |
| background: radial-gradient(circle at 50% 35%, rgba(11,132,255,0.35), rgba(11,132,255,0.06)); | |
| border: 1px solid rgba(120,180,255,0.4); | |
| box-shadow: 0 0 30px rgba(11,132,255,0.35); | |
| } | |
| #omega-access-gate .ring svg { width: 26px; height: 26px; stroke: #cfe6ff; } | |
| #omega-access-gate h1 { | |
| margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .3px; color: #eaf2ff; | |
| } | |
| #omega-access-gate p { | |
| margin: 8px 0 22px; font-size: 12.5px; line-height: 1.5; color: rgba(200,216,240,0.62); | |
| } | |
| #omega-access-gate .field { | |
| display: flex; gap: 8px; align-items: center; | |
| background: rgba(0,0,0,0.35); | |
| border: 1px solid rgba(120,180,255,0.22); | |
| border-radius: 13px; padding: 4px 4px 4px 14px; | |
| transition: border-color .2s, box-shadow .2s; | |
| } | |
| #omega-access-gate .field.focus { border-color: rgba(11,132,255,0.7); box-shadow: 0 0 0 3px rgba(11,132,255,0.18); } | |
| #omega-access-gate .field.error { border-color: rgba(255,90,90,0.8); box-shadow: 0 0 0 3px rgba(255,90,90,0.16); } | |
| #omega-access-gate input { | |
| flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; | |
| color: #eaf2ff; font-size: 15px; letter-spacing: 1px; padding: 12px 0; | |
| } | |
| #omega-access-gate input::placeholder { color: rgba(200,216,240,0.35); letter-spacing: .3px; } | |
| #omega-access-gate button { | |
| border: 0; cursor: pointer; | |
| width: 46px; height: 42px; border-radius: 10px; | |
| background: linear-gradient(180deg, #1b8bff, #0a6be0); | |
| color: #fff; font-size: 18px; display: grid; place-items: center; | |
| transition: filter .15s, transform .1s; | |
| } | |
| #omega-access-gate button:hover { filter: brightness(1.08); } | |
| #omega-access-gate button:active { transform: scale(0.94); } | |
| #omega-access-gate button[disabled] { opacity: .55; cursor: default; } | |
| #omega-access-gate .msg { margin-top: 14px; font-size: 12px; min-height: 16px; color: rgba(255,120,120,0.9); } | |
| #omega-access-gate .foot { margin-top: 18px; font-size: 10.5px; color: rgba(200,216,240,0.32); letter-spacing: .4px; } | |
| #omega-access-gate .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color:#fff; border-radius:50%; animation: gateSpin .7s linear infinite; } | |
| @keyframes gateSpin { to { transform: rotate(360deg) } } | |
| </style> | |
| <div class="card" role="dialog" aria-label="OMEGA access"> | |
| <div class="ring"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"> | |
| <rect x="4.5" y="10.5" width="15" height="10" rx="2.2"></rect> | |
| <path d="M8 10.5V7.5a4 4 0 0 1 8 0v3"></path> | |
| <circle cx="12" cy="15.4" r="1.3"></circle> | |
| </svg> | |
| </div> | |
| <h1>OMEGA Access</h1> | |
| <p>Enter your cloud access key to unlock the AR system.</p> | |
| <div class="field" id="gate-field"> | |
| <input id="gate-input" type="password" inputmode="text" autocomplete="current-password" | |
| placeholder="Access key" aria-label="Access key" /> | |
| <button id="gate-go" aria-label="Unlock">→</button> | |
| </div> | |
| <div class="msg" id="gate-msg"></div> | |
| <div class="foot">JARVIS · FRIDAY · OMEGA</div> | |
| </div>`,e}async function l(e,{field:t,input:n,go:r,msg:a},c){let l=String(e||n?.value||``).trim();if(!l){u(t,a,`Enter your access key.`);return}if(r.innerHTML=`<span class="spin"></span>`,r.disabled=!0,!await o(l)){r.disabled=!1,r.textContent=`→`,u(t,a,`Incorrect access key.`),n&&(n.value=``,n.focus());return}i(l),a.style.color=`rgba(0,224,198,0.9)`,a.textContent=`Access granted.`,c.style.transition=`opacity .45s ease`,c.style.opacity=`0`,setTimeout(()=>c.remove(),460),await s()}function u(e,t,n){t.style.color=`rgba(255,120,120,0.9)`,t.textContent=n,e.classList.add(`error`),setTimeout(()=>e.classList.remove(`error`),900)}async function d(){let e=r();if(e&&await o(e)){await s();return}let t=c();document.body.appendChild(t);let n=t.querySelector(`#gate-field`),i=t.querySelector(`#gate-input`),a=t.querySelector(`#gate-go`),u=t.querySelector(`#gate-msg`),d={field:n,input:i,go:a,msg:u};i.addEventListener(`focus`,()=>n.classList.add(`focus`)),i.addEventListener(`blur`,()=>n.classList.remove(`focus`)),i.addEventListener(`input`,()=>{u.textContent=``}),i.addEventListener(`keydown`,e=>{e.key===`Enter`&&l(null,d,t)}),a.addEventListener(`click`,()=>l(null,d,t)),setTimeout(()=>i.focus(),300)}document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,d,{once:!0}):d(); |