Files
den-repo/build/den.min.js
2026-08-14 15:56:15 -04:00

2 lines
20 KiB
JavaScript

/* den.js - the owo.ing kobold. (c) 2026 owo.ing. hands off the hoard. */
!function(){if(!window.__denCritter){window.__denCritter=!0;var e=document.createElement("style");e.textContent='.paw-trail{position:fixed;pointer-events:none;z-index:9999;animation:pawfade 1s linear forwards;filter:drop-shadow(0 0 3px currentColor);}@keyframes pawfade{0%{opacity:.9;transform:scale(1);}100%{opacity:0;transform:scale(.5) translateY(10px);}}.emote{position:fixed;pointer-events:none;z-index:9999;font-size:15px;animation:emoterise 1.2s ease-out forwards;}.emote.say{font-size:12px;font-weight:bold;color:#c9b8ff;text-shadow:0 0 6px #8f7bff,1px 1px 0 #120a20;white-space:nowrap;font-family:"Comic Sans MS","Comic Sans",cursive;}@keyframes emoterise{0%{opacity:0;transform:translateY(0) scale(.6);}15%{opacity:1;}100%{opacity:0;transform:translateY(-34px) scale(1.15);}}.denbed{position:fixed;z-index:9998;pointer-events:none;animation:bedin .6s ease-out;transition:opacity .45s ease;}@keyframes bedin{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:translateY(0);}}.denbed .lump{animation:breathe 2.8s ease-in-out infinite;transform-origin:38px 24px;}@keyframes breathe{0%,100%{transform:scaleY(1);}50%{transform:scaleY(1.17);}}body.denzoom *,body.denzoom *::before,body.denzoom *::after{animation-duration:.22s !important;}.denhole{position:fixed;z-index:9997;pointer-events:none;transition:opacity .55s ease;animation:holein .5s ease-out;}@keyframes holein{from{opacity:0;transform:scale(.6);}to{opacity:1;transform:scale(1);}}.dentab{position:fixed;right:14px;bottom:0;text-align:left;z-index:10000;background:#1b1229;color:#8f7bff;border:2px ridge #6b5a8a;border-bottom:none;border-radius:8px 8px 0 0;font-family:"Courier New",monospace;font-size:11px;padding:3px 10px;cursor:pointer;opacity:.55;transition:opacity .2s;user-select:none;}.dentab:hover{opacity:1;}.denterm{position:fixed;right:8px;bottom:0;z-index:10000;width:300px;max-width:86vw;background:#0d0818;border:3px ridge #6b5a8a;border-bottom:none;border-radius:10px 10px 0 0;font-family:"Courier New",monospace;font-size:12px;padding:8px;display:none;text-align:left;}.denterm.open{display:block;}.denterm .dout{height:170px;overflow-y:auto;white-space:pre-wrap;word-break:break-word;color:#c9b8ff;}.denterm .dline{display:flex;gap:6px;margin-top:5px;align-items:center;}.denterm .dprompt{color:#ff6ec7;white-space:nowrap;}.denterm input{flex:1;background:transparent;border:none;outline:none;color:#a8ffe0;font-family:inherit;font-size:12px;}',document.head.appendChild(e);var t=null;if(window.denYip=Q,window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)window.denSay=function(){};else{var n,i,a=["#8f7bff","#4fc3ff"],o=Math.floor(4*Math.random());0===o?(n=70,i=80+Math.random()*Math.max(window.innerHeight-160,1)):1===o?(n=window.innerWidth-70,i=80+Math.random()*Math.max(window.innerHeight-160,1)):2===o?(n=80+Math.random()*Math.max(window.innerWidth-160,1),i=70):(n=80+Math.random()*Math.max(window.innerWidth-160,1),i=window.innerHeight-70);var r={x:n,y:i},s=Math.random()*Math.PI*2,l={x:r.x,y:r.y},d="rest",c=performance.now()+800,h=0,m=performance.now()+99999,p=0,f=1,u=0,y=performance.now(),w=performance.now(),x=0,v=0,g=0,M=!1,b=null,k=0,T=1,C=null,A=null,I=null,S=null,z=!1,L=0,q=null,E=0,P=null,Y=null,N=null,H={v:0,pets:0,name:null,last:0,id:null};try{var R=JSON.parse(localStorage.getItem("denmem"));R&&"object"==typeof R&&(H.v=0|R.v,H.pets=0|R.pets,H.name="string"==typeof R.name&&R.name?R.name.slice(0,16):null,H.last=R.last||0,"string"==typeof R.id&&/^[a-f0-9]{16}$/.test(R.id)&&(H.id=R.id))}catch(e){}var B=H.last;if(H.v++,H.last=Date.now(),!H.id){var F="";try{var W=new Uint8Array(8);crypto.getRandomValues(W);for(var O=0;O<8;O++)F+=("0"+W[O].toString(16)).slice(-2)}catch(e){for(var _=0;_<16;_++)F+=Math.floor(16*Math.random()).toString(16)}H.id=F}Z(),window.denSetName=function(e){return(e=String(e||"").replace(/[^\w \-]/g,"").trim().slice(0,16))?(H.name=e,Z(),ie("yip!! (i am "+e+")"),te("\ud83d\udc96",!0),N&&(N.textContent=$()),e):null},window.denGetName=function(){return H.name},window.denSay=ie,document.addEventListener("keydown",ae),document.addEventListener("scroll",ae,{passive:!0}),document.addEventListener("touchstart",ae,{passive:!0}),document.addEventListener("mousemove",function(e){if(l.x=e.clientX,l.y=e.clientY,ae(),"errand"!==d&&"mischief"!==d){var t=performance.now();t<h||t<v||("chase"!==d&&te("\u2757"),d="chase")}}),document.addEventListener("click",function(e){ae(),e.target.closest&&e.target.closest("a,button,input,textarea,label,select")||Math.hypot(e.clientX-r.x,e.clientY-r.y)>48||oe()}),window.denEvent=function(e,t){t=t||{};var n=performance.now();if(w=n,M&&ae(),"mischief"===d&&"mischief"!==e&&re(),"mischief"!==e)if("celebrate"===e)h=n+1100,d="rest",c=n+2800,m=n+99999,te("\u2728",!0),setTimeout(function(){te("\ud83d\udc95",!0)},300),setTimeout(function(){te("\u2728",!0)},650),setTimeout(function(){ie(t.text||"YIP!!")},180),Q();else if("investigate"===e){var i=function(e){var t=e.el;if("string"==typeof t&&(t=document.querySelector(t)),t&&t.getBoundingClientRect){var n=t.getBoundingClientRect();if(n.width>0)return le(n.left+.5*n.width,n.top+Math.min(.4*n.height,50))}return"number"==typeof e.x&&"number"==typeof e.y?le(e.x,e.y):null}(t);if(!i)return;I=i,S=t.text||null,z=!!t.run,L=n+9e3,d="errand"}else if("alarm"===e){te("\u26a0\ufe0f",!0),ie(t.text||"YIP?!");var a=Math.random()*Math.PI*2;I=le(r.x+260*Math.cos(a),r.y+260*Math.sin(a)),S=null,z=!0,L=n+4e3,d="errand"}else"sleepy"===e?(g=n+800,x=n+1400,ie("*yawn*")):"zoomies"===e?de():t.text&&ie(t.text);else se(!0)};var D=["ArrowUp","ArrowUp","ArrowDown","ArrowDown","ArrowLeft","ArrowRight","ArrowLeft","ArrowRight","b","a"],U=0;document.addEventListener("keydown",function(e){var t=1===e.key.length?e.key.toLowerCase():e.key;(U=t===D[U]?U+1:t===D[0]?1:0)===D.length&&(U=0,de())});var V="";document.addEventListener("keydown",function(e){var t=e.target;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)||1===e.key.length&&("yip"===(V=(V+e.key.toLowerCase()).slice(-12)).slice(-3)?(ie("yip!!"),V=""):"owo"===V.slice(-3)?(ie("*notices u*"),V=""):"uwu"===V.slice(-3)?(ie("yip (no)"),V=""):"kobold"===V.slice(-6)?(te("\ud83d\udc95",!0),ie("yip!! (that is me)"),V=""):"shrine"===V.slice(-6)?(ie("YIP?! (how do u know about that)"),V=""):"zoomies"===V.slice(-7)?(de(),V=""):"sleep"===V.slice(-5)&&(g=performance.now()+800,x=performance.now()+1400,ie("*yawn*"),V=""))});var j=document.createElement("div");j.className="dentab",j.textContent=">_ den";var X=document.createElement("div");X.className="denterm",X.innerHTML='<div class="dout">den shell v2 (now portable)\ntype "help"\n</div><div class="dline"><span class="dprompt"></span><input autocomplete="off" spellcheck="false" aria-label="den shell input"></div>';var G=0,J=document.createElement("div");J.className="denhole",J.innerHTML='<svg width="56" height="34" viewBox="0 0 56 34" xmlns="http://www.w3.org/2000/svg"><ellipse cx="28" cy="17" rx="26" ry="14" fill="#0d0818" stroke="#8f7bff" stroke-width="2.5"/><ellipse cx="28" cy="19" rx="18" ry="8" fill="#000"/><ellipse cx="20" cy="10" rx="4" ry="1.6" fill="#3d2a55"/></svg>',J.style.left=r.x-28+"px",J.style.top=r.y-17+"px",document.body?ye():document.addEventListener("DOMContentLoaded",ye),requestAnimationFrame(function e(t){var n=Math.min((t-y)/1e3,.05);y=t;var i=T;if(M)return t>k&&(te("\ud83d\udca4",!0),k=t+2600),void requestAnimationFrame(e);if(x){if(t<x){s+=7*n;var a=49*n;r.x+=Math.cos(s)*a,r.y+=Math.sin(s)*a,(u+=a)>=24*.8&&(u=0,me())}else x=0,M=!0,r.x=Math.min(Math.max(r.x,44),window.innerWidth-44),r.y=Math.min(Math.max(r.y,40),window.innerHeight-30),(b=document.createElement("div")).className="denbed",b.innerHTML='<svg width="64" height="42" viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="24" width="60" height="11" rx="5" fill="#3d2a55" stroke="#8f7bff" stroke-width="2"/><rect x="3" y="33" width="4" height="8" rx="1" fill="#8f7bff"/><rect x="57" y="33" width="4" height="8" rx="1" fill="#8f7bff"/><ellipse cx="13" cy="22" rx="9" ry="5" fill="#c9b8ff"/><path class="lump" d="M23 26 Q33 10 53 23 L53 26 Z" fill="#4fc3ff" stroke="#8f7bff" stroke-width="1.5"/></svg>',b.style.left=r.x-32+"px",b.style.top=r.y-26+"px",document.body.appendChild(b),ie("...zzz"),k=t+1800;requestAnimationFrame(e)}else{if(t-w>6e5&&t>h)return x=t+1400,ie("*yawn*"),void requestAnimationFrame(e);if(t<v)requestAnimationFrame(e);else{if(t<h){s+=9*n;var o=63*i*n;return r.x+=Math.cos(s)*o,r.y+=Math.sin(s)*o,(u+=o)>=24*.8&&(u=0,me()),void requestAnimationFrame(e)}if("mischief"!==d)if("errand"!==d){var p=l.x-r.x,f=l.y-r.y,g=Math.hypot(p,f);if("chase"===d?g<26&&(d="rest",c=t+(H.pets>=25?4200:2500),m=t+1700,Math.random()<.5&&te(H.pets>=10?"\ud83d\udc95":"\u2728")):"rest"===d?(t>m&&(te("\ud83d\udca4"),m=t+1600),t>c&&(se(!1)||(l=he(),d="wander"))):g<14&&(d="rest",m=t+99999,C?(c=t+1200+1600*Math.random(),ie(C),C=null):(c=t+600+1600*Math.random(),te(ne(["\ud83d\udc43","\u2753","\ud83c\udf38","\u2728","\ud83d\udc3e"])))),"rest"!==d&&g>1){var A=Math.atan2(f,p),E=4*n*("chase"===d?2.2:1);s+=Math.max(-E,Math.min(E,ce(s,A)));var P="chase"===d&&g>160,Y=("chase"===d?P?340:150:70)*i,N=P?38:24,R=Math.min(Y*n,g);r.x+=Math.cos(s)*R,r.y+=Math.sin(s)*R,(u+=R)>=N&&(u=0,me())}requestAnimationFrame(e)}else{if(!I||t>L)I=null,d="wander",l=he();else{var B=I.x-r.x,F=I.y-r.y,W=Math.hypot(B,F);if(W<16)S?ie(S):te(ne(["\ud83d\udc43","\u2753"])),I=null,S=null,d="rest",c=t+1500,m=t+99999;else{var O=Math.atan2(F,B),_=4*n*2.2;s+=Math.max(-_,Math.min(_,ce(s,O)));var D=(z?340:150)*i,U=z?38:24,V=Math.min(D*n,W);r.x+=Math.cos(s)*V,r.y+=Math.sin(s)*V,(u+=V)>=U&&(u=0,me())}}requestAnimationFrame(e)}else{if(!q)return d="wander",l=he(),void requestAnimationFrame(e);if(t>q.deadline){if("carry"!==q.phase)return re(),void requestAnimationFrame(e);q.phase="dropped",q.dropTime=t,q.deadline=t+12e3,ie(q.gift?"*wheeze* (u are fast. here)":"*wheeze* (fine)")}if("togo"===q.phase||"carry"===q.phase){var j,X=(j="togo"===q.phase?q.pt:q.gift?le(l.x,l.y):q.dropPt).x-r.x,G=j.y-r.y,J=Math.hypot(X,G);if(J<16)"togo"===q.phase?function(){var e=q.el.getBoundingClientRect();q.clone=document.createElement("div"),q.clone.style.cssText="position:fixed;z-index:9998;pointer-events:none;margin:0;left:"+e.left+"px;top:"+e.top+"px;width:"+e.width+"px;height:"+e.height+"px;";var t=q.el.cloneNode(!0);if(t.style.margin="0",q.clone.appendChild(t),document.body.appendChild(q.clone),q.el.style.visibility="hidden",q.cw=e.width/2,q.ch=e.height,q.gift)ie("yip!");else{var n=Math.random()*Math.PI*2;q.dropPt=le(r.x+300*Math.cos(n),r.y+300*Math.sin(n)),ie(ne(["yip yip yip (mine now)","(catch me)","yip!! (tax)"]))}q.phase="carry"}():(q.phase="dropped",q.dropTime=t,q.gift?(ie(ne(["uwu (for u)","yip (i brought u this)","(i love u)"])),te("\ud83d\udc95",!0),setTimeout(function(){te("\ud83d\udc96",!0)},300)):ie(ne(["yip (u can have it back)","(hehe)","yip yip (a good crime)"])));else{var Q=Math.atan2(G,X),Z=4*n*2.2;s+=Math.max(-Z,Math.min(Z,ce(s,Q)));var $=("carry"!==q.phase||q.gift?150:340)*i,K="carry"!==q.phase||q.gift?24:38,ee=Math.min($*n,J);r.x+=Math.cos(s)*ee,r.y+=Math.sin(s)*ee,(u+=ee)>=K&&(u=0,me())}q&&q.clone&&"carry"===q.phase&&(q.clone.style.left=r.x-q.cw+"px",q.clone.style.top=r.y-q.ch-14+"px")}else if("dropped"===q.phase){if(t>q.dropTime+(q.gift?4200:5200)){var ae=q.el.getBoundingClientRect();q.clone.style.transition="left .6s ease, top .6s ease, opacity .6s ease",q.clone.style.left=ae.left+"px",q.clone.style.top=ae.top+"px",q.phase="returning",q.retTime=t,q.gift||ie("yip (fine. take it back)")}}else"returning"===q.phase&&t>q.retTime+700&&(te("\u2728",!0),re());requestAnimationFrame(e)}}}})}}function Q(){try{t||(t=new(window.AudioContext||window.webkitAudioContext)),"suspended"===t.state&&t.resume();var e=t.createOscillator(),n=t.createGain(),i=t.currentTime;e.type="sine",e.frequency.setValueAtTime(700+200*Math.random(),i),e.frequency.exponentialRampToValueAtTime(1400+300*Math.random(),i+.07),e.frequency.exponentialRampToValueAtTime(600,i+.14),n.gain.setValueAtTime(.12,i),n.gain.exponentialRampToValueAtTime(.001,i+.16),e.connect(n),n.connect(t.destination),e.start(i),e.stop(i+.18)}catch(e){}}function Z(){try{localStorage.setItem("denmem",JSON.stringify(H))}catch(e){}}function $(){return(H.name||"guest")+"@den ~>"}function K(e){return e<=0?"just u + the kobold rn":1===e?"1 other is here rn":e+" others are here rn"}function ee(){window.fetch&&fetch("/den.php?id="+H.id,{cache:"no-store"}).then(function(e){return e.ok?e.json():null}).then(function(e){if(e){var t=0|e.others;window.denOthers=t;for(var n=document.querySelectorAll("[data-den-others]"),i=0;i<n.length;i++)n[i].textContent=K(t)}}).catch(function(){})}function te(e,t){var n=performance.now();if(t||!(n-p<500)){p=n;var i=document.createElement("span");i.className="emote",i.textContent=e,i.style.left=r.x+(16*Math.random()-8)+"px",i.style.top=r.y-18+"px",document.body.appendChild(i),setTimeout(function(){i.remove()},1250)}}function ne(e){return e[Math.floor(Math.random()*e.length)]}function ie(e){var t=document.createElement("span");t.className="emote say",t.textContent=e,t.style.left=r.x-10+"px",t.style.top=r.y-22+"px",document.body.appendChild(t),setTimeout(function(){t.remove()},1250)}function ae(){var e=performance.now();if(!(e<g)&&(w=e,x&&(x=0),M)){if(M=!1,b){var t=b;b=null,t.style.opacity="0",setTimeout(function(){t.remove()},500)}te("\u2728",!0),ie("...yip?"),v=e+900}}function oe(){var e=performance.now();"mischief"===d&&re(),h=e+800,d="rest",c=e+2e3,m=e+99999,te(ne(["\ud83d\udc95","\ud83d\udc96","\ud83d\udc97"]),!0),setTimeout(function(){te("\ud83d\udc95",!0)},240),Q(),H.pets++,Z(),10===H.pets?setTimeout(function(){ie("yip!! (we are friends now)")},420):25===H.pets?setTimeout(function(){ie("yip (best friend)")},420):50===H.pets?setTimeout(function(){ie("yip!! (bonded 4 life)")},420):100===H.pets&&setTimeout(function(){ie("yip (soulmates)")},420)}function re(){q&&q.clone&&(q.el.style.visibility="",q.clone.remove()),q&&(q=null,d="wander",l=he())}function se(e){var t=performance.now();if(q)return!1;if(!e&&t-E<15e4)return!1;var n=function(){for(var e=[],t=document.querySelectorAll("[data-den-steal]"),n=0;n<t.length;n++){var i=t[n].getBoundingClientRect();i.width<8||i.width>220||i.height<8||i.height>90||i.bottom<40||i.top>window.innerHeight-60||i.right<40||i.left>window.innerWidth-60||"hidden"!==t[n].style.visibility&&e.push(t[n])}return e}();if(!n.length)return!1;if(!e&&Math.random()>.07)return!1;var i=n[Math.floor(Math.random()*n.length)],a=i.getBoundingClientRect();return q={el:i,phase:"togo",pt:le(a.left+a.width/2,a.top+a.height/2),deadline:t+18e3,gift:H.pets>=25},E=t,d="mischief",!0}function le(e,t){return{x:Math.min(Math.max(e,20),window.innerWidth-20),y:Math.min(Math.max(t,20),window.innerHeight-20)}}function de(){document.body.classList.add("denzoom"),T=7.5;var e=document.title;document.title="YIP YIP YIP YIP YIP",ie("YIP YIP YIP YIP"),setTimeout(function(){document.body.classList.remove("denzoom"),T=1,document.title=e},1e4)}function ce(e,t){var n=(t-e)%(2*Math.PI);return n>Math.PI&&(n-=2*Math.PI),n<-Math.PI&&(n+=2*Math.PI),n}function he(){if(C=null,Math.random()<.45){var e=function(){for(var e=[],t=document.querySelectorAll("[data-den-poi]"),n=0;n<t.length;n++){var i=t[n].getBoundingClientRect();i.width<10||i.height<10||i.bottom<40||i.top>window.innerHeight-40||i.right<40||i.left>window.innerWidth-40||e.push({el:t[n],r:i})}return e}().filter(function(e){return e.el!==A});if(e.length){var t=e[Math.floor(Math.random()*e.length)];A=t.el;var n=(t.el.getAttribute("data-den-poi")||"").split("|").filter(Boolean);return n.length&&(C=n[Math.floor(Math.random()*n.length)]),{x:Math.min(Math.max(t.r.left+t.r.width*(.25+.5*Math.random()),20),window.innerWidth-20),y:Math.min(Math.max(t.r.top+Math.min(.4*t.r.height,60)+20*Math.random(),20),window.innerHeight-20)}}}var i=60+120*Math.random(),a=s+2.6*(Math.random()-.5);return{x:Math.min(Math.max(r.x+Math.cos(a)*i,20),window.innerWidth-20),y:Math.min(Math.max(r.y+Math.sin(a)*i,20),window.innerHeight-20)}}function me(){f=-f;var e=document.createElement("span");e.className="paw-trail",e.innerHTML='<svg width="14" height="15" viewBox="0 0 20 21" xmlns="http://www.w3.org/2000/svg"><ellipse cx="10" cy="14.5" rx="5.2" ry="4.6"/><ellipse cx="3.2" cy="8.6" rx="2.1" ry="2.7"/><ellipse cx="7.6" cy="5.4" rx="2.1" ry="2.8"/><ellipse cx="12.4" cy="5.4" rx="2.1" ry="2.8"/><ellipse cx="16.8" cy="8.6" rx="2.1" ry="2.7"/></svg>';var t=a[f>0?0:1];e.querySelector("svg").style.fill=t,e.style.color=t;var n=180*s/Math.PI+90,i=7*-Math.sin(s)*f,o=7*Math.cos(s)*f;e.style.left=r.x+i-7+"px",e.style.top=r.y+o-7+"px",e.querySelector("svg").style.transform="rotate("+n+"deg) scaleX("+f+")",e.querySelector("svg").style.display="block",document.body.appendChild(e),setTimeout(function(){e.remove()},1300)}function pe(e){P.textContent+=e+"\n",P.scrollTop=P.scrollHeight}function fe(){X.classList.add("open"),j.style.display="none",Y.focus()}function ue(){X.classList.remove("open"),j.style.display=""}function ye(){document.body.appendChild(j),document.body.appendChild(X),P=X.querySelector(".dout"),Y=X.querySelector("input"),(N=X.querySelector(".dprompt")).textContent=$(),j.addEventListener("click",fe),Y.addEventListener("keydown",function(e){if("Escape"!==e.key){if("Enter"===e.key){var t=Y.value.trim();Y.value="",t&&(pe($()+" "+t),function(e){var t=e.toLowerCase();if(0!==t.indexOf("name "))if("name"!==t)if(0!==t.indexOf("sudo"))if(0!==t.indexOf("rm ")&&"rm"!==t)switch(t){case"help":pe("commands: pet, come, sit, fetch, sleep, wake, zoomies, where, status, name <x>, ls, whoami, pwd, neofetch, yip, clear, exit");break;case"pet":case"pet kobold":G++,oe(),pe(G>=5?"*yip yip yip* (maximum happiness. further pets stored for later)":"*pets dispensed remotely* yip!");break;case"fetch":se(!0)?pe(H.pets>=25?"he goes to find u something":"oh no"):pe(q?"his paws are full":"nothing here worth taking. sad");break;case"come":var n=X.getBoundingClientRect();l={x:Math.min(Math.max(n.left+40,20),window.innerWidth-20),y:Math.min(Math.max(n.top-40,20),window.innerHeight-20)},M&&ae(),d="chase",pe("he is on his way");break;case"sit":d="rest",c=performance.now()+6e3,m=performance.now()+99999,ie("yip (sitting)"),pe("he sits. a good boy");break;case"sleep":g=performance.now()+800,x=performance.now()+1400,ie("*yawn*"),pe("bedtime initiated");break;case"wake":M?(ae(),pe("he stirs")):pe("he is already awake and probably watching u");break;case"zoomies":de(),pe("oh no");break;case"where":ie("yip!! (here)"),te("\u2728",!0),pe("listen for the yip");break;case"status":pe("mode: "+(M?"asleep":d)+" | pets: "+H.pets+" | name: "+(H.name||"(unnamed)")+" | visits: "+H.v);break;case"ls":pe("den/ hoard/ guestbook.txt do_not_open/ retopo_FINAL_v2/");break;case"whoami":pe("a guest in the den");break;case"pwd":pe("/home/den/u");break;case"yip":ie("yip!!"),pe("yip!!");break;case"neofetch":pe(" /\\_/\\ guest@den\n ( o.o ) ----------\n > ^ < OS: DenOS (yes it is just apache)\n kobold btw Shell: den shell 2.0\n Uptime: emotionally? unclear");break;case"clear":P.textContent="";break;case"exit":pe("u can check out any time u like..."),setTimeout(ue,600);break;default:pe("fish: Unknown command: '"+e.split(" ")[0].replace(/[^\w.-]/g,"")+"'")}else pe("rm: the hoard is load-bearing. request denied");else pe("no.");else pe(H.name?'the kobold is named "'+H.name+'"':"the kobold has no name yet. try: name <something>");else{var i=window.denSetName(e.slice(5));pe(i?'the kobold accepts the name "'+i+'". this is legally binding':"that name did not survive processing. try letters")}}(t))}}else ue()}),ee(),setInterval(ee,6e4),document.body.appendChild(J),setTimeout(function(){var e;te("\u2728",!0),ie((e=B?Date.now()-B:0,H.v<=1?"*yip* (hello)":e>6048e5?"YIP!! (where were u)":H.name?"*yip* ("+H.name+" missed u)":H.v>=8?"yip (welcome home)":"yip!! (u came back)"));var t=window.innerWidth/2,n=window.innerHeight/2,i=Math.atan2(n-r.y,t-r.x);s=i;var a=160+120*Math.random();l={x:Math.min(Math.max(r.x+Math.cos(i)*a,20),window.innerWidth-20),y:Math.min(Math.max(r.y+Math.sin(i)*a,20),window.innerHeight-20)},C=null,d="wander"},700),setTimeout(function(){J.style.opacity="0",setTimeout(function(){J.remove()},600)},2600),setTimeout(function(){var e=0|window.denOthers;e>0&&ie("yip ("+e+(1===e?" other is":" others are")+" here... i can smell them)")},9e3)}}();