49 lines
294 KiB
JavaScript
49 lines
294 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatPage-C05pM21P.js","assets/chat-D6vURcTH.js","assets/ChatWindow.vue_vue_type_script_setup_true_lang-BS0iEVVD.js","assets/useNostr-CZatyrb1.js","assets/ChatWindow-CwFp9jEi.css","assets/FilmGrid.vue_vue_type_script_setup_true_lang-Cl2ukq8v.js","assets/useContentImages-CXWJDBMs.js","assets/SongGrid.vue_vue_type_script_setup_true_lang-Bx4BvItY.js","assets/FilmDetail.vue_vue_type_script_setup_true_lang-Ckw7Dobw.js","assets/SongDetail.vue_vue_type_script_setup_true_lang-D619ywdc.js","assets/ChatPage-sAXrmq0w.css","assets/WidgetDemoPage-D_rupeyB.js","assets/WidgetDemoPage-BSWX2CxO.css","assets/ConversationViewerPage-C6xLQlBZ.js","assets/GuidePage-CSUy4HaR.js","assets/GuidePage-iT99cF_4.css"])))=>i.map(i=>d[i]);
|
||
|
|
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(i){if(i.ep)return;i.ep=!0;const r=n(i);fetch(i.href,r)}})();const td="modulepreload",nd=function(e){return"/aiui/"+e},jl={},tn=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let a=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");i=a(n.map(c=>{if(c=nd(c),c in jl)return;jl[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":td,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((p,b)=>{d.addEventListener("load",p),d.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&r(l.reason);return t().catch(r)})};function Zo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Oe={},ys=[],sn=()=>{},Cc=()=>!1,_r=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),el=e=>e.startsWith("onUpdate:"),Je=Object.assign,tl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sd=Object.prototype.hasOwnProperty,Se=(e,t)=>sd.call(e,t),ie=Array.isArray,bs=e=>vi(e)==="[object Map]",Rs=e=>vi(e)==="[object Set]",Bl=e=>vi(e)==="[object Date]",ue=e=>typeof e=="function",Be=e=>typeof e=="string",Bt=e=>typeof e=="symbol",Ce=e=>e!==null&&typeof e=="object",kc=e=>(Ce(e)||ue(e))&&ue(e.then)&&ue(e.catch),Sc=Object.prototype.toString,vi=e=>Sc.call(e),id=e=>vi(e).slice(8,-1),Pc=e=>vi(e)==="[object Object]",Tr=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ws=Zo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Er=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},rd=/-\w/g,Lt=Er(e=>e.replace(rd,t=>t.slice(1).toUpperCase())),od=/\B([A-Z])/g,Fn=Er(e=>e.replace(od,"-$1").toLowerCase()),xr=Er(e=>e.charAt(0).toUpperCase()+e.slice(1)),qr=Er(e=>e?`on${xr(e)}`:""),Ln=(e,t)=>!Object.is(e,t),Wi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Rc=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ar=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ld=e=>{const t=Be(e)?Number(e):NaN;return isNaN(t)?e:t};let Vl;const Cr=()=>Vl||(Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $n(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=Be(s)?fd(s):$n(s);if(i)for(const r in i)t[r]=i[r]}return t}else if(Be(e)||Ce(e))return e}const ad=/;(?![^(]*\))/g,cd=/:([^]+)/,ud=/\/\*[^]*?\*\//g;function fd(e){const t={};return e.replace(ud,"").split(ad).forEach(n=>{if(n){const s=n.split(cd);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ze(e){let t="";if(Be(e))t=e;else if(ie(e))for(let n=0;n<e.length;n++){const s=ze(e[n]);s&&(t+=s+" ")}else if(Ce(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const dd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",hd=Zo(dd);functi
|
||
|
|
`);c.push(`**Installed apps on this node:**
|
||
|
|
${u}
|
||
|
|
You can view recent app logs by requesting the tail-logs action with an appId.`)}if(un.value.includes("system")&&Ui.value.name){const u=Ui.value;c.push(`**System:** ${u.name}${u.version?" v"+u.version:""}`)}if(un.value.includes("network")){const u=ao.value;c.push(`**Network:** ${u.connected?"Connected":"Disconnected"}`)}if(un.value.includes("wallet")&&Fi.value.available){const u=Fi.value,f=[];u.alias&&f.push(u.alias),u.num_active_channels!==void 0&&f.push(`${u.num_active_channels} channels`),u.num_peers!==void 0&&f.push(`${u.num_peers} peers`),u.balance_sats!==void 0&&f.push(`On-chain: ${u.balance_sats.toLocaleString()} sats`),u.channel_balance_sats!==void 0&&f.push(`In channels: ${u.channel_balance_sats.toLocaleString()} sats`),u.synced_to_chain!==void 0&&f.push(u.synced_to_chain?"synced":"syncing"),c.push(`**Lightning (LND):** ${f.join(" | ")}`)}if(un.value.includes("bitcoin")&&ji.value.available){const u=ji.value,f=u.sync_progress?(u.sync_progress*100).toFixed(2)+"%":"unknown",d=[`Block ${u.block_height?.toLocaleString()??"?"}`,`${f} synced`];u.chain&&d.push(u.chain),u.mempool_tx_count&&d.push(`mempool: ${u.mempool_tx_count.toLocaleString()} txs`),c.push(`**Bitcoin:** ${d.join(", ")}`)}if(un.value.includes("files")&&Hi.value.length>0){const u=Hi.value,d=u.slice(0,20).map(p=>p.name).join(", ");c.push(`**Files:** ${u.length} files in Nextcloud. Recent: ${d}
|
||
|
|
You can read file contents by requesting the read-file action with a file path.`)}return c.length===0?"":`
|
||
|
|
|
||
|
|
**Archy Node Context** (this user is running AIUI on their Archipelago node):
|
||
|
|
${c.join(`
|
||
|
|
`)}
|
||
|
|
|
||
|
|
You can help the user manage their node. Available actions: open an app (open-app), install an app (install-app), navigate in Archy (navigate). When recommending apps, check if they're already installed.`}function a(){for(const c of Bi)c();Bi=[],St.destroy(),Kn.value=!1}return{isEmbedded:Pt(tc),isInitialized:Pt(Kn),permissions:Pt(un),accentColor:Pt(nc),installedApps:Pt(Di),systemInfo:Pt(Ui),networkInfo:Pt(ao),walletInfo:Pt(Fi),fileList:Pt(Hi),bitcoinInfo:Pt(ji),init:e,destroy:a,refreshContext:n,requestAction:s,readFile:i,tailLogs:r,buildArchyContext:l}}function Wm(){const e=Q(0),t=Q(!1),n=Q(typeof window<"u"?window.innerHeight:0);let s=typeof window<"u"?window.innerHeight:0,i=null;function r(){i&&clearTimeout(i),i=setTimeout(()=>{const l=window.visualViewport;if(!l)return;const a=Math.max(0,s-l.height);e.value=a,t.value=a>100,n.value=l.height},50)}function o(){const l=window.visualViewport;l&&!t.value&&(s=l.height,n.value=l.height)}return is(()=>{const l=window.visualViewport;l&&(s=l.height,n.value=l.height,l.addEventListener("resize",r),l.addEventListener("scroll",r)),window.addEventListener("resize",o)}),Ir(()=>{const l=window.visualViewport;l&&(l.removeEventListener("resize",r),l.removeEventListener("scroll",r)),window.removeEventListener("resize",o)}),{keyboardHeight:e,isKeyboardOpen:t,viewportHeight:n}}const Km=/^https?:\/\//i,Gm=Gu("articleOverlay",()=>{const e=Q(!1),t=Q(null),n=Q(""),s=Q(null),i=Q(null);function r(l,a="",c,u){const f=String(l??"").trim();if(Km.test(f)){try{new URL(f)}catch{return}t.value=f,n.value=String(a??"Article").slice(0,200),s.value=typeof c=="string"&&c.trim().length>0?c.trim():null,i.value=typeof u=="string"&&u.trim().length>0?u.trim():null,e.value=!0}}function o(){e.value=!1,t.value=null,n.value="",s.value=null,i.value=null}return{isOpen:e,url:t,title:n,content:s,imgSrc:i,open:r,close:o}});const{entries:uf,setPrototypeOf:sc,isFrozen:Ym,getPrototypeOf:Xm,getOwnPropertyDescriptor:Jm}=Object;let{freeze:wt,seal:$t,create:Bo}=Object,{apply:Vo,construct:qo}=typeof Reflect<"u"&&Reflect;wt||(wt=function(t){return t});$t||($t=function(t){return t});Vo||(Vo=function(t,n){for(var s=arguments.length,i=new Array(s>2?s-2:0),r=2;r<s;r++)i[r-2]=arguments[r];return t.apply(n,i)});qo||(qo=function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];return new t(...s)});const Vi=_t(Array.prototype.forEach),Qm=_t(Array.prototype.lastIndexOf),ic=_t(Array.prototype.pop),Us=_t(Array.prototype.push),Zm=_t(Array.prototype.splice),tr=_t(String.prototype.toLowerCase),co=_t(String.prototype.toString),uo=_t(String.prototype.match),Fs=_t(String.prototype.replace),eg=_t(String.prototype.indexOf),tg=_t(String.prototype.trim),Dt=_t(Object.prototype.hasOwnProperty),gt=_t(RegExp.prototype.test),Hs=ng(TypeError);function _t(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];return Vo(e,t,s)}}function ng(e){return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return qo(e,n)}}function me(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tr;sc&&sc(e,null);let s=t.length;for(;s--;){let i=t[s];if(typeof i=="string"){const r=n(i);r!==i&&(Ym(t)||(t[s]=r),i=r)}e[i]=!0}return e}function sg(e){for(let t=0;t<e.length;t++)Dt(e,t)||(e[t]=null);return e}function Xt(e){const t=Bo(null);for(const[n,s]of uf(e))Dt(e,n)&&(Array.isArray(s)?t[n]=sg(s):s&&typeof s=="object"&&s.constructor===Object?t[n]=Xt(s):t[n]=s);return t}function js(e,t){for(;e!==null;){const s=Jm(e,t);if(s){if(s.get)return _t(s.get);if(typeof s.value=="function")return _t(s.value)}e=Xm(e)}function n(){return null}return n}const rc=wt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","
|
||
|
|
`+Et),g&&Vi([H,se,be],on=>{Et=Fs(Et,on," ")}),T&&F?T.createHTML(Et):Et},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jr(ne),O=!0},t.clearConfig=function(){ls=null,O=!1},t.isValidAttribute=function(ne,y,U){ls||jr({});const Z=Ge(ne),Le=Ge(y);return $l(Z,Le,U)},t.addHook=function(ne,y){typeof y=="function"&&Us(D[ne],y)},t.removeHook=function(ne,y){if(y!==void 0){const U=Qm(D[ne],y);return U===-1?void 0:Zm(D[ne],U,1)[0]}return ic(D[ne])},t.removeHooks=function(ne){D[ne]=[]},t.removeAllHooks=function(){D=uc()},t}var gg=hf();function yg(e){try{const t=new URL(e);return/^https?:$/i.test(t.protocol)}catch{return!1}}function Fv(e){return!!e&&typeof e=="string"&&/^https?:\/\//i.test(e.trim())}const bg=["p","br","a","strong","em","b","i","ul","ol","li","blockquote","h1","h2","h3","h4","span","div"];function vg(e){return gg.sanitize(e,{ALLOWED_TAGS:bg,ALLOWED_ATTR:["href","src","target","rel"]})}function wg(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Hv(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}const _g=["disabled"],Tg=["href"],Eg={class:"relative flex-1 min-h-0 bg-black/20 overflow-hidden"},xg={class:"[&_p]:mb-3 [&_ul]:list-disc [&_ol]:list-decimal [&_li]:ml-4 [&_a]:underline [&_a]:underline-offset-2 [&_h1]:text-lg [&_h2]:text-base [&_h3]:text-sm [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_blockquote]:italic"},Ag=["src","alt"],Cg=["innerHTML"],kg=["href"],Sg=["src"],Pg=Hn({__name:"ArticleOverlay",setup(e){const t=Gm(),{isDark:n}=cf(),s=je(()=>{const f=t.content;return f?/<[a-z][\s\S]*>/i.test(f)?vg(f):`<p class="whitespace-pre-wrap">${wg(f)}</p>`:""}),i=Q(null),r=Q(0),o=Q(!1);function l(){o.value=!0,r.value++}function a(){o.value=!1}function c(f){f.key==="Escape"&&t.isOpen&&(t.close(),f.preventDefault(),f.stopPropagation())}jt(()=>t.isOpen,f=>{f||(o.value=!1)}),is(()=>{window.addEventListener("keydown",c,!0)}),Rr(()=>{window.removeEventListener("keydown",c,!0)});const u=["w-full max-w-[calc(100vw-3rem)] h-[80vh] max-h-[calc(100vh-5rem)]","md:max-w-[calc(100vw-5rem)]"];return(f,d)=>(de(),Dn(fl,{to:"body"},[Ne(pr,{name:"app-launcher"},{default:oi(()=>[V(t).isOpen?(de(),ve("div",{key:0,class:"fixed inset-0 z-[2400] flex items-center justify-center p-6 md:p-10",onClick:d[2]||(d[2]=hn(p=>V(t).close(),["self"]))},[d[7]||(d[7]=A("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md"},null,-1)),A("div",{class:ze(["article-overlay-panel relative z-10 flex flex-col overflow-hidden rounded-2xl shadow-2xl path-glass-card",u])},[A("div",{class:"flex items-center gap-3 px-4 py-3 shrink-0",style:$n(V(n)?"border-bottom: 1px solid rgba(255, 255, 255, 0.08)":"border-bottom: 1px solid rgba(0, 0, 0, 0.06)")},[V(t).content?mt("",!0):(de(),ve("button",{key:0,type:"button",class:ze(["flex items-center justify-center w-9 h-9 rounded-lg transition-colors transition-transform duration-300 disabled:opacity-70 disabled:cursor-not-allowed",V(n)?"hover:bg-white/10 text-white/70":"hover:bg-black/5 text-gray-600"]),"aria-label":"Refresh page",title:"Refresh",disabled:o.value,onClick:l},[(de(),ve("svg",{class:ze(["w-5 h-5",{"animate-spin":o.value}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},[...d[3]||(d[3]=[A("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])],2))],10,_g)),A("span",{class:ze(["flex-1 truncate text-sm font-medium min-w-0",V(n)?"text-white/90":"text-gray-900"])},tt(V(t).title||"Article"),3),V(t).url?(de(),ve("a",{key:1,href:V(t).url,target:"_blank",rel:"noopener noreferrer",class:ze(["flex items-center justify-center w-9 h-9 rounded-lg transition-colors shrink-0",V(n)?"hover:bg-white/10 text-white/70":"hover:bg-black/5 text-gray-600"]),"aria-label":"Open in new tab",title:"Open in new tab",onClick:d[0]||(d[0]=hn(()=>{},["stop"]))},[...d[4]||(d[4]=[A("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[A("path",{"stroke-
|
||
|
|
`);if(n!==this.elements.captions.innerHTML){nr(this.elements.captions);const i=le("span",Qt(this.config.selectors.caption));i.innerHTML=n,this.elements.captions.appendChild(i),ae.call(this,this.media,"cuechange")}}},$f={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.8.4/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrappe
|
||
|
|
<rect width="200" height="200" fill="hsl(${s}, ${i}%, 28%)"/>
|
||
|
|
<rect x="3" y="3" width="194" height="194" rx="12" fill="none" stroke="hsl(${s}, ${i+5}%, 38%)" stroke-width="1"/>
|
||
|
|
<text x="100" y="82" text-anchor="middle" fill="hsl(${s}, ${i}%, 48%)" font-family="system-ui,sans-serif" font-size="10" font-weight="400" letter-spacing="4">${e}</text>
|
||
|
|
<line x1="60" y1="92" x2="140" y2="92" stroke="hsl(${s}, ${i+5}%, 40%)" stroke-width="1"/>
|
||
|
|
<text x="100" y="118" text-anchor="middle" fill="hsl(${s}, ${i+15}%, 78%)" font-family="system-ui,sans-serif" font-size="13" font-weight="700">${Ss(t.length>18?t.slice(0,16)+"…":t)}</text>
|
||
|
|
${n?`<text x="100" y="138" text-anchor="middle" fill="hsl(${s}, ${i}%, 60%)" font-family="system-ui,sans-serif" font-size="10" font-weight="300">${Ss(n.length>22?n.slice(0,20)+"…":n)}</text>`:""}
|
||
|
|
</svg>`;return`data:image/svg+xml,${encodeURIComponent(o)}`}function jv(e,t){const n=[...e+(t??"")].reduce((s,i)=>s+i.charCodeAt(0),0)%360;return Si("PODCAST",e,t,n,30)}function Bv(e,t){const n=[...e+(t??"")].reduce((s,i)=>s+i.charCodeAt(0),0)%360;return Si("MUSIC",e,t,n,30)}function Vv(e,t){const n=[...e+(t??"")].reduce((s,i)=>s+i.charCodeAt(0),0)%360;return Si("NEWS",e,t,n,22)}function qv(e,t){const n=[...e+(t??"")].reduce((s,i)=>s+i.charCodeAt(0),0)%360;return Si("WEBSITE",e,t,n,25)}function pb(e,t){const n=[...e].reduce((i,r)=>i+r.charCodeAt(0),0)%360,s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 342 513">
|
||
|
|
<rect width="342" height="513" fill="hsl(${n}, 25%, 28%)"/>
|
||
|
|
<rect x="3" y="3" width="336" height="507" rx="6" fill="none" stroke="hsl(${n}, 30%, 38%)" stroke-width="1"/>
|
||
|
|
<text x="171" y="210" text-anchor="middle" fill="hsl(${n}, 25%, 48%)" font-family="'Helvetica Neue',Helvetica,Arial,sans-serif" font-size="13" font-weight="400" letter-spacing="5">FILM</text>
|
||
|
|
<line x1="121" y1="225" x2="221" y2="225" stroke="hsl(${n}, 30%, 40%)" stroke-width="1"/>
|
||
|
|
<text x="171" y="265" text-anchor="middle" fill="hsl(${n}, 45%, 78%)" font-family="'Helvetica Neue',Helvetica,Arial,sans-serif" font-size="18" font-weight="700">
|
||
|
|
${Ss(e.length>20?e.slice(0,18)+"…":e)}
|
||
|
|
</text>
|
||
|
|
${t?`<text x="171" y="295" text-anchor="middle" fill="hsl(${n}, 30%, 60%)" font-family="'Helvetica Neue',Helvetica,Arial,sans-serif" font-size="14" font-weight="300">${t}</text>`:""}
|
||
|
|
</svg>`;return`data:image/svg+xml,${encodeURIComponent(s)}`}function zv(e,t){const n=[...e].reduce((i,r)=>i+r.charCodeAt(0),0)%360,s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 342 513">
|
||
|
|
<rect width="342" height="513" fill="hsl(${n}, 22%, 28%)"/>
|
||
|
|
<rect x="3" y="3" width="336" height="507" rx="6" fill="none" stroke="hsl(${n}, 28%, 38%)" stroke-width="1"/>
|
||
|
|
<text x="171" y="210" text-anchor="middle" fill="hsl(${n}, 22%, 48%)" font-family="'SF Pro Display',system-ui,sans-serif" font-size="13" font-weight="400" letter-spacing="5">SERIES</text>
|
||
|
|
<line x1="111" y1="225" x2="231" y2="225" stroke="hsl(${n}, 28%, 40%)" stroke-width="1"/>
|
||
|
|
<text x="171" y="265" text-anchor="middle" fill="hsl(${n}, 40%, 78%)" font-family="'SF Pro Display',system-ui,sans-serif" font-size="18" font-weight="700">
|
||
|
|
${Ss(e.length>20?e.slice(0,18)+"…":e)}
|
||
|
|
</text>
|
||
|
|
${t?`<text x="171" y="295" text-anchor="middle" fill="hsl(${n}, 28%, 60%)" font-family="'SF Pro Display',system-ui,sans-serif" font-size="14" font-weight="300">${t}</text>`:""}
|
||
|
|
</svg>`;return`data:image/svg+xml,${encodeURIComponent(s)}`}function Ss(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}async function Vf(e,t,n){const s=`${e}:${Bf(t,n)}`,i=bi.get(s);if(i)return i;const r={posterUrl:null,backdropUrl:null};try{const o=new URLSearchParams({q:t.trim()});n&&n>0&&o.set("y",String(n));const l=await kl(`/api/tmdb/${e}?${o}`);if(!l.ok)return r;const a=await l.json(),c={posterUrl:a.posterUrl??null,backdropUrl:a.backdropUrl??null};return(c.posterUrl||c.backdropUrl)&&(bi.set(s,c),fb()),c}catch{return r}}async function qf(e,t){return Vf("search",e,t)}async function Wv(e,t,n){const s=e.target;if(s.dataset.fallback==="done")return;const i=s.src;ob.add(i);const r=Bf(t,n),o=bi.get(r);if(o?.posterUrl&&o.posterUrl!==i){s.dataset.fallback="tmdb",s.src=o.posterUrl;return}if(s.dataset.fallback!=="tmdb"){const{posterUrl:l}=await qf(t,n);if(l&&l!==i){s.dataset.fallback="tmdb",s.src=l;return}}if(s.dataset.fallback!=="wiki"){const l=await Ps(t,"film");if(l){s.dataset.fallback="wiki",s.src=l;return}}s.dataset.fallback="done",s.src=pb(t,n)}async function mb(e,t){return Vf("search-tv",e,t)}async function Kv(e,t){const n=ab(e,t),s=vr.get(n);if(s)return s;try{const i=t?`${e} ${t}`:e,r=await fetch(`https://itunes.apple.com/search?term=${encodeURIComponent(i.trim())}&media=podcast&limit=3`);if(!r.ok)return null;const a=(await r.json()).results?.[0]?.artworkUrl100;if(!a)return null;const c=a.replace(/100x100/g,"600x600");return vr.set(n,c),hb(),c}catch{return null}}const wr=new Map,zf="aiui-book-cover-cache";function Wf(e,t){return`${e.toLowerCase().trim()}|${t.toLowerCase().trim()}`}function gb(){try{const e=sessionStorage.getItem(zf);if(e){const t=JSON.parse(e);Object.entries(t).forEach(([n,s])=>wr.set(n,s))}}catch{}}function yb(){try{const e=[...wr.entries()].slice(-200);sessionStorage.setItem(zf,JSON.stringify(Object.fromEntries(e)))}catch{}}gb();function Gv(e,t){const n=[...e+(t??"")].reduce((i,r)=>i+r.charCodeAt(0),0)%360,s=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 342 513">
|
||
|
|
<rect width="342" height="513" fill="hsl(${n}, 20%, 28%)"/>
|
||
|
|
<rect x="3" y="3" width="336" height="507" rx="6" fill="none" stroke="hsl(${n}, 25%, 38%)" stroke-width="1"/>
|
||
|
|
<text x="171" y="210" text-anchor="middle" fill="hsl(${n}, 18%, 48%)" font-family="Georgia,'Times New Roman',serif" font-size="13" font-weight="400" letter-spacing="5">BOOK</text>
|
||
|
|
<line x1="121" y1="225" x2="221" y2="225" stroke="hsl(${n}, 22%, 40%)" stroke-width="1"/>
|
||
|
|
<text x="171" y="265" text-anchor="middle" fill="hsl(${n}, 35%, 78%)" font-family="Georgia,'Times New Roman',serif" font-size="18" font-weight="700">
|
||
|
|
${Ss(e.length>20?e.slice(0,18)+"…":e)}
|
||
|
|
</text>
|
||
|
|
${t?`<text x="171" y="295" text-anchor="middle" fill="hsl(${n}, 22%, 60%)" font-family="Georgia,'Times New Roman',serif" font-size="14" font-weight="300">${Ss(t.length>24?t.slice(0,22)+"…":t)}</text>`:""}
|
||
|
|
</svg>`;return`data:image/svg+xml,${encodeURIComponent(s)}`}async function bb(e,t){const n=Wf(e,t),s=wr.get(n);if(s)return s;try{const i=`${e} ${t}`.trim(),r=await fetch(`https://openlibrary.org/search.json?q=${encodeURIComponent(i)}&limit=1&fields=cover_i`);if(!r.ok)return null;const l=(await r.json()).docs?.[0]?.cover_i;if(!l)return null;const a=`https://covers.openlibrary.org/b/id/${l}-L.jpg`;return wr.set(n,a),yb(),a}catch{return null}}function Yv(e,t){const n=[...e+(t??"")].reduce((s,i)=>s+i.charCodeAt(0),0)%360;return Si("PLACE",e,t,n,20)}async function Xv(e,t){if(t){const s=await Ps(e,t);if(s)return s}const n=await Ps(e,"restaurant");return n||null}async function vb(e,t,n){const s=lb(t,e),i=gs.get(s);if(i)return i;try{const r="/aiui/",o=new URLSearchParams({q:e,title:e,artist:t}),l=await kl(`${r}api/music/search?${o}`);if(l.ok){const a=await l.json();if(a.coverUrl)return gs.set(s,a.coverUrl),_o(),a.coverUrl}}catch{}try{const r=`${e} ${t}`.trim(),o=await fetch(`https://wavlake.com/api/v1/content/search?term=${encodeURIComponent(r)}`,{headers:{Accept:"application/json"}});if(o.ok){const l=await o.json();if(Array.isArray(l)){const a=l.find(u=>u.type==="track"),c=a?.albumArtUrl??a?.artistArtUrl;if(c)return gs.set(s,c),_o(),c}}}catch{}try{const r=`${t} ${e}`.trim().replace(/\s+/g,"+"),o=await fetch(`https://itunes.apple.com/search?term=${encodeURIComponent(r)}&media=music&limit=3`);if(!o.ok)return null;const c=(await o.json()).results?.[0]?.artworkUrl100;if(!c)return null;const u=c.replace(/100x100/g,"600x600");return gs.set(s,u),_o(),u}catch{return null}}const _s=new Map;async function Ps(e,t){const n=`${e.toLowerCase().trim()}|${(t??"").toLowerCase()}`;if(_s.has(n))return _s.get(n)??null;const s=async r=>{try{const o=encodeURIComponent(r.trim().replace(/\s+/g,"_")),l=await fetch(`https://en.wikipedia.org/api/rest_v1/page/summary/${o}`);if(!l.ok)return null;const a=await l.json();return a.originalimage?.source??a.thumbnail?.source??null}catch{return null}};let i=null;return t&&(i=await s(`${e} (${t})`)),i||(i=await s(e)),_s.set(n,i),i}async function wb(e,t){const s=`gbooks:${Wf(e,t??"")}`;if(_s.has(s))return _s.get(s)??null;try{const i=t?`intitle:${e}+inauthor:${t}`:`intitle:${e}`,r=await fetch(`https://www.googleapis.com/books/v1/volumes?q=${encodeURIComponent(i)}&maxResults=1`);if(!r.ok)return null;const l=(await r.json()).items?.[0]?.volumeInfo?.imageLinks;let a=l?.thumbnail??l?.smallThumbnail??null;return a&&(a=a.replace(/^http:/,"https:").replace(/&edge=curl/g,""),a.includes("zoom=")||(a+="&zoom=2")),_s.set(s,a),a}catch{return null}}async function Jv(e,t){const n=await qf(e,t);if(n.posterUrl||n.backdropUrl)return n;const s=await Ps(e,"film");return s?{posterUrl:s,backdropUrl:null}:{posterUrl:null,backdropUrl:null}}async function Qv(e,t){const n=await mb(e,t);if(n.posterUrl||n.backdropUrl)return n;const s=await Ps(e,"TV series");return s?{posterUrl:s,backdropUrl:null}:{posterUrl:null,backdropUrl:null}}async function Zv(e,t){const n=await bb(e,t??"");if(n)return n;const s=await wb(e,t);return s||await Ps(e,"novel")}const _b={key:0,class:"flex flex-col"},Tb={class:"flex items-center gap-3 px-3 py-2"},Eb={class:"w-10 h-10 rounded-lg overflow-hidden shrink-0 flex items-center justify-center path-glass-icon"},xb=["src","alt"],Ab={key:1,class:"text-base"},Cb={class:"min-w-0 flex-1"},kb={class:"text-sm font-semibold truncate text-white/90"},Sb={class:"text-xs truncate text-white/50"},Pb=["disabled"],Rb={key:0,class:"w-6 h-6 animate-spin text-white/90",fill:"none",viewBox:"0 0 24 24"},Ib={key:1,class:"w-6 h-6 text-white/90",fill:"currentColor",viewBox:"0 0 24 24"},Ob={key:2,class:"w-6 h-6 text-white/90",fill:"currentColor",viewBox:"0 0 24 24"},Mb=["disabled"],Nb={key:0,class:"text-xs text-red-400/60 px-3 pb-1 truncate"},Lb={key:1,class:"flex items-center gap-4 px-4 py-3"},$b={class:"flex items-center gap-3 min-w-0 flex-1 max-w-[280px]"},Db={class:"w-12 h-12 rounded-lg overflow-hidden shrink-0 flex items-center justify-center path-glass-icon"},Ub=["src","alt"],Fb={key:1,class:"text-lg"},Hb={class:"min-w-0"},jb={class:"t
|