(()=>{var y=3.36;function f(e){let a=e*y,n=new Intl.NumberFormat(navigator.language||"en-US",{style:"currency",currency:"USD"}).format(a),s=document.getElementById("estimate-result");s.innerText=n.replace(".00","")}function w(e,a){let n=null;return function(s){let r=this;clearTimeout(n),n=setTimeout(()=>{e.apply(r,s)},a)}}function b(){let e=document.getElementById("navbar");window.scrollY>0?e.classList.add("sticky"):e.classList.remove("sticky")}var m={en:"English",zh:"\u7B80\u4F53\u4E2D\u6587",zh_tw:"\u7E41\u4F53\u4E2D\u6587",ja:"\u65E5\u672C\u8A9E"};function E(){let e=localStorage.getItem("quail-language");return e&&(e=e.replace("-","_")),e&&m[e]||(e=navigator.language.toLowerCase(),e.length>5&&(e=e.substring(0,5)),e&&m[e])?e:(e=e.substring(0,2),e&&m[e]?e:"en")}function x(e){e=e.replace("_","-"),localStorage.setItem("quail-language",e)}function g(e){let a=e.value||e.placeholder||"",n=window.getComputedStyle(e),s=[n.fontStyle,n.fontVariant,n.fontWeight,n.fontSize,n.fontFamily].join(" "),i=(g._canvas||(g._canvas=document.createElement("canvas"))).getContext("2d");i.font=s;let{width:l}=i.measureText(a),c=parseFloat(n.letterSpacing)||0;return l+c*a.length}document.addEventListener("scroll",function(){w(b,100)()});document.addEventListener("DOMContentLoaded",function(){location.search&&location.search.indexOf("hide_nav")!==-1&&(document.getElementById("navbar").style.display="none",document.querySelector(".footer").style.display="none");let a=document.getElementById("menu-trigger"),n=document.getElementById("navbar");a.addEventListener("click",function(){n.classList.toggle("expanded")});let r=new RegExp(/^\/(en|zh|zh_tw|ja)?\/?$/).test(location.pathname),i=E();if(location.pathname==="/"&&i!=="en"&&(location.href=`/${i}`),r){let c=document.querySelector(".estimate-fake-cursor"),o=document.querySelector(".estimate-input"),p=()=>{let t=g(o);c.style.marginLeft=`${parseInt(t/2)+2}px`,c.classList.add("show")};o.value===""&&(o.value="5000"),f(o.value),o.addEventListener("input",function(){let t=o.value||0;f(t)}),o.addEventListener("focus",function(){c.classList.remove("show"),o.select()}),o.addEventListener("blur",function(){p()}),setTimeout(()=>{p()},300);let v=location.pathname.split("/")[1]||"en",d=document.querySelector(`.language-switch-item[data-lang="${v}"]`);d&&(d.classList.add("q-c-dark"),d.classList.remove("q-c-dark-3"));let u=document.querySelectorAll(".language-switch-item");for(let t=0;t{x(u[t].getAttribute("data-lang"))});let h=document.getElementById("cookies-bar");if(document.getElementById("cookies-bar-accept-btn").addEventListener("click",function(){localStorage.setItem("cookies-bar-accepted","1"),h.classList.remove("show")}),localStorage.getItem("cookies-bar-accepted")!=="1"&&h.classList.add("show"),fetch("https://api.quail.ink/auxilia/proxy/discord?pathname=v9/invites/VRP27AhMKm&query=with_counts%3Dtrue%26with_expiration%3Dtrue",{method:"GET",headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>{document.getElementById("discord-online-count").innerText=`${t.approximate_presence_count}/${t.approximate_member_count}`}),fetch("https://api.quail.ink/probe/stat",{method:"GET",headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>{document.getElementById("probe-stat-users").innerText=t.data.users,document.getElementById("probe-stat-lists").innerText=t.data.lists,document.getElementById("probe-stat-posts").innerText=t.data.posts}),window.screen.width===1344){var l=FingerprintJS.load();l.then(t=>t.get()).then(t=>{fetch("https://api.quail.ink/auxilia/reports/abuse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:window.location.href,identifier:t.visitorId,user_agent:navigator.userAgent})}).then(()=>{})})}}});})();