\n \n \n ${i}\n `),r.appendChild(e),t=r.find("loader"),setTimeout((()=>{e.setAttribute("visible",!0),t.setAttribute("visible",!0)}),20),this.overlay=e,this.loader=t,this.is_second_overlay=!!__current_overlay,this.is_second_overlay?__current_second_overlay=this:__current_overlay=this}hide_loader(){setTimeout((()=>{this.loader.setAttribute("visible","false")}),21)}append(e){this.hide_loader(),setTimeout((()=>{this.overlay.insertAdjacentHTML("afterbegin",e),j()}),200)}delete(){this.overlay.setAttribute("visible",!1),setTimeout((()=>{this.overlay.remove(),document.find_all("overlay").length<1&&document.body.setAttribute("toggled",!1)}),600),this.is_second_overlay?__current_second_overlay=null:__current_overlay=null}}let g=a(733);document.addEventListener("keyup",(e=>{if(e.key&&"escape"===e.key.toLowerCase())return document.querySelector("overlay")&&A(),void(document.find("[notifications]")&&L())}));const _=e=>{v();let t=document.find_all("[submit-closest]");t&&t.forEach((e=>{e.enable()})),e.responseText.includes("exception-container")&&(document.body.innerHTML=e.responseText),(new m).add(document.body,e.statusText,"error")};$(document).on("click","[scroll-top]",(function(e){d()}));const k=async()=>{let e=document.find('[data-react="user:sign"]');await u(e,"/get/header/menu",null,!0)},x=async()=>{__page.is_loading=!0;let e=document.find_all("overlay");e.length>0?e[0].insertAdjacentHTML("afterbegin",'\n
\n '):document.body.querySelectorAll("[main-logo]").forEach((e=>{e.setAttribute("loading","")}))},w=async()=>{__page.is_loading=!1,document.find_all("[material-bar-loader]").forEach((e=>{e.remove()})),document.body.querySelectorAll("[main-logo]").forEach((e=>{e.removeAttribute("loading")}))},y=async()=>{x()},v=async()=>{z()},z=async()=>{w()},j=async()=>{const e=document.find_all("img:not([loaded])");await o(e)},A=()=>{let e=document.querySelectorAll("overlay");e&&(e.forEach((e=>{e.removeAttribute("visible"),setTimeout((()=>{e.remove(),document.body.hasAttribute("toggled")&&"true"==document.body.getAttribute("toggled")&&document.body.setAttribute("toggled","false")}),400)})),__current_overlay=null,__current_second_overlay=null)};i(document,"click","[close-overlay]",(async function(e){A()})),$(document).on("click",'[data-action="overlays:close"]',(function(e){e.preventDefault();let t=this.closest("overlay"),a=document.querySelectorAll("overlay");t.removeAttribute("visible"),setTimeout((()=>{t.remove()}),400),a.length<2&&document.body.hasAttribute("toggled")&&"true"==document.body.getAttribute("toggled")&&document.body.setAttribute("toggled","false")}));const T=()=>{let e=document.find_all("[menu-more");e&&e.forEach((e=>{if(e.hasAttribute("active")){e.unactivate();let t=e.closest("box-model");t&&t.unactivate()}}))};window.addEventListener("scroll",(function(){let e=document.querySelector("[scroll-changed]");e&&(window.scrollY>=200?e.setAttribute("active",""):e.removeAttribute("active"))})),i(document,"click","select-model",(function(e){const t=document.querySelectorAll("select-model"),a=this;let o,n,r=this.querySelector("[select-model-dropdown]"),i=r.querySelector("[get-height]").clientHeight,s=this.querySelector("[select-model-value]"),d=this.querySelector("input"),l=this.hasAttribute("only-select"),m=this.hasAttribute("join-values"),c=e.target.matches(".select_model__dropdown_option")||e.target.closest(".select_model__dropdown_option")&&e.target.closest(".select_model__dropdown_option").matches(".select_model__dropdown_option");if(t.forEach((e=>{e.removeAttribute("active"),e.querySelector("[select-model-dropdown]").removeAttribute("style")})),c){o=e.target.matches("[select-model-dropdown-option]")?e.target:e.target.closest("[select-model-dropdown-option]");let t=o.hasAttribute("data-value");if(e.target.closest("select-model").removeAttribute("active"),e.target.closest("[select-model-dropdown]").removeAttribute("style"),l||(s.innerHTML=o.innerHTML,d&&(d.value=t?o.dataset.value:o.innerHTML)),m){s=o.getAttribute("value"),n=d.value;let e=n.split(","),t=!0;e.forEach((e=>{e===s&&(t=!1)})),t&&(d.value=n?`${n},${s}`:s)}}else{if(a.hasAttribute("active"))return;this.setAttribute("active",!0),r.style.height=i+"px"}})),document.addEventListener("click",(function(e){const t=e.target,a=document.querySelectorAll("select-model");t.matches("select-model")||t.closest("select-model")||a.forEach((function(e){e.removeAttribute("active"),e.querySelector("[select-model-dropdown]").removeAttribute("style")}))})),HTMLDivElement.prototype.set_done=()=>{(void 0).setAttribute("done","")},HTMLElement.prototype.set_done=()=>{(void 0).setAttribute("done","")},i(document,"mousedown","[ripple-effect]",(function(e){let t=this.getBoundingClientRect(),a=e.clientX-t.left,o=e.clientY-t.top,n=getComputedStyle(this).getPropertyValue("border-radius");if(this.querySelector(".ripple-effect"))return;__material_button_ripple_effect_done=!1;let r=document.createElement("span");r.classList.add("ripple-effect"),r.style.top=`${o}px`,r.style.left=`${a}px`,r.style.borderRadius="50%"==n?"50%":"200px",this.insertBefore(r,this.firstChild),setTimeout((()=>{r.setAttribute("active",!0),r.style.top="-.6px",r.style.left="-.6px","50%"!=n&&(r.style.borderRadius=n),setTimeout((()=>{__material_button_ripple_effect_done=!0}),400)}),10)})),i(document,"mouseup","[ripple-effect]",(function(e){let t=this.querySelector(".ripple-effect");t&&__material_button_ripple_effect_done&&(t.setAttribute("active","false"),setTimeout((()=>{t.remove()}),400))}));const S=()=>{document.querySelectorAll("[ripple-effect]").forEach((e=>{e.addEventListener("mouseleave",(e=>{q(e.target)}))}))},q=e=>{let t,a=e.querySelector(".ripple-effect");a&&(t=setInterval((()=>{__material_button_ripple_effect_done&&(clearInterval(t),a.setAttribute("active","false"),setTimeout((()=>{a.remove()}),__material_button_ripple_effect_remove_interval))}),100))};$(document).on("click","theme-switcher",(function(e){let t=__page.theme,a=document.body;document.body.className.split(" ").forEach((e=>{e.startsWith("theme--")&&a.classList.remove(e)})),a.classList.add("theme--"+t+(__page.is_darkmode?"":"-dark")),this.hasAttribute("active")?document.querySelectorAll("theme-switcher").forEach((e=>{e.removeAttribute("active")})):document.querySelectorAll("theme-switcher").forEach((e=>{e.setAttribute("active","")})),g.set("DARKMODE",__page.is_darkmode?0:1,{expires:365,domain:r()}),__page.is_darkmode=__page.is_darkmode?0:1})),$(document).on("click",'[data-action="my:website,theme"]',(function(e){let t=this.getAttribute("chooser-option"),a=document.body;a.className.split(" ").forEach((e=>{e.startsWith("theme--")&&a.classList.remove(e)})),a.classList.add("theme--"+t+(__page.is_darkmode?"-dark":"")),g.set("THEME",t,{expires:365,domain:r()}),__page.theme=t})),i(document,"click",".carousel-shelf .carousel-shelf-button-group mbutton",(function(e){let t=this.closest(".carousel-shelf"),a=this.getAttribute("carousel-action"),o=t.find(".carousel"),n=t.find("[carousel-action='next']"),r=t.find("[carousel-action='previous']");const i=o.scrollWidth-o.clientWidth;let s=window.getComputedStyle(o.find(".carousel-item")).getPropertyValue("margin-right"),d=o.clientWidth+parseInt(s);"next"==a?o.scrollLeft+=d:"previous"==a&&(o.scrollLeft-=d),i-o.scrollLeft<=100?(n.setAttribute("disabled",""),r.removeAttribute("disabled")):n.hasAttribute("disabled")&&n.removeAttribute("disabled"),i-o.scrollLeft+100>i?(n.removeAttribute("disabled"),r.setAttribute("disabled","")):r.hasAttribute("disabled")&&r.removeAttribute("disabled")})),i(document,"click","[data-action='popup:open']",(async function(e){y(),E(this.dataset.href)}));const E=async e=>{y(),$.ajax({url:e,method:"GET",contentType:!1,processData:!1,success:function(e){v(),e.status?((new b).append(e.data),j()):(new m).add(document.body,e.message,"error")},error:function(e){_(e)}})};i(document,"click",'[data-action="get"]',(async function(e){e.preventDefault();let t=this,a=this.dataset.href;this.hasAttribute("open-composer")&&document.find("[composer]")||a&&(t.disable(),x(),$.ajax({url:a,contentType:!1,processData:!1,success:function(a){z(),t.enable(),a.status&&a.data?(__app.insertAdjacentHTML("beforeend",a.data),j()):(new m).add(__app,e.statusText,"error")},error:function(e){z(),t.enable(),(new m).add(__app,e.statusText,"error")}}))})),i(document,"click","toggle-sub-menu",(function(e){let t=document.find("sub-menu");t.hasAttribute("active")?(this.unactivate(),t.unactivate()):(this.activate(),t.activate("active",""))}));const D=e=>{let t=g.get("INFO_WINDOWS");g.set("INFO_WINDOWS",t+","+e,365)};$(document).on("click","[close-dialogue]",(function(e){let t=this.closest("[dialogue]");t&&t.remove(),t&&this.dataset.infoWindow&&D(this.dataset.infoWindow)})),$(document).on("click","[chooser] [chooser-option]",(function(e){let t=$(this).closest("[chooser]").find("[chooser-input]"),a=$(this).closest("[chooser]"),o=$(this).attr("chooser-option"),n=a[0].find_all("[chooser-option]");o&&(t.value=o),n.forEach((function(e){e.unactivate()})),this.activate()}));const O=async e=>{if(e){let t=e.querySelectorAll("[active=true]");t&&t.forEach((e=>{e.removeAttribute("active")})),await n(400),e.setAttribute("animation","zoom-out"),await n(400),e.remove()}},L=()=>{let e=document.find("[notifications-center]");if(!e)return;let t=document.find('[data-action="user:notifications,check"]');e.find_all("[data-category]").forEach((e=>{"all"==e.dataset.category?e.activate():e.unactivate()})),t&&(t.removeAttribute("active"),e.find("[append-notifications]").innerHTML="",e.removeAttribute("active"))},R=()=>{let e=document.find("user-menu");if(!e)return;let t=e.closest("user-menu-outer");e.remove(),t?.unactivate()};$(document).on("click","[data-action='filters:open']",(function(e){let t=new b(null,!0),a=document.find("filters");a?(t.hide_loader(),t.overlay.insertAdjacentHTML("afterbegin",a.innerHTML)):t.close()}));const C=()=>{let e=document.find("[composer]"),t=document.find("[reactions-window]");e&&(e.setAttribute("unactive",!0),setTimeout((()=>{e.remove()}),400)),t&&(t.setAttribute("unactive",!0),setTimeout((()=>{t.remove()}),400))};$(document).on("click","[close-responder]",(function(e){var t;e.preventDefault(),t=this.closest("responder"),(new m).close(t)}));const P=()=>{if(__page.current.length<1||"home"==__page.current)return;let e=document.find("footer");if(!e)return;let t=e.getBoundingClientRect(),a=[],o=document.find("[floating-action]");o&&a.push(o),0!==a.length&&a.forEach((e=>{"none"!==window.getComputedStyle(e).display&&(t.top-100<=window.innerHeight&&t.bottom>=0?e.unactivate():e.activate())}))};$(document).on("click","toggle-switch",(function(e){let t=this.find('input[type="hidden"]');"false"===this.getAttribute("toggled")?(this.setAttribute("toggled",!0),t&&(t.value="1")):(this.setAttribute("toggled",!1),t&&(t.value="0"))})),$(document).on("click","[update-cookie-bool]",(function(e){let t=this.getAttribute("update-cookie-bool").toUpperCase(),a=g.get(t),o=1==a||null==a;g.set(t,o?0:1,{domain:r(),expires:365}),"SOUNDS"===t?__page.is_sounds_enabled=o?0:1:"ANIMATIONS"===t&&(__page.is_animations_enabled=o?0:1)})),$((function(){$(document).on("click","[play-random-sound]",(function(e){let t=document.querySelectorAll("audio");t.length&&__page.is_sounds_enabled&&(e=>e[Math.floor(Math.random()*e.length)])(t).play()})),$(document).on("click","[toggle-animation]",(function(e){let t=this.getAttribute("toggle-animation");this.setAttribute(t,"");let a=window.getComputedStyle(this).getPropertyValue("animation-duration"),o=1e3*parseFloat(a);console.log(o),setTimeout((()=>{this.removeAttribute(t)}),o)})),$(document).on("click","mode-menu",(function(e){let t=this.hasAttribute("active");this.hasAttribute("loading")&&!t||(t?this.removeAttribute("active"):this.setAttribute("active",""))})),$(document).on("click","mode-menu [mm-menu] a",(function(e){let t=this.closest("mode-menu"),a=this.find("p").innerHTML,o=this.find("mi").className,n=t.find("[mm-open]");n.find("mi").className=o,n.find("p").innerHTML=a,t.setAttribute("loading","")})),$(document).on("click","[expand-more-show]",(function(e){const t=this.closest("[expand-more]");t.find("[expand-more-hidden]"),t.find("[expand-more-button-text]");let a=t.hasAttribute("active");console.log("ass"),a?t.unactivate():t.activate()})),$(window).on("scroll",(function(e){__page.is_loading||P()})),S(),$(document).on("click","[open-user-menu]",(function(e){e.preventDefault();let t=this,a=document.find("user-menu"),o=t.closest("user-menu-outer");if(o&&o.hasAttribute("active"))return a.remove(),void o?.unactivate();y(),t.disable(),$.ajax({url:"/get/ui/user-menu",processData:!1,contentType:!1,success:function(e){v(),t.enable(),e.status&&(o?.insertAdjacentHTML("beforeend",e.data),o?.activate(),j())},error:function(e){v(),t.enable()}})}))}));const F=async e=>{let t=document.body.querySelector(e);t.play(),t.volume=.38,t.onended=async()=>{t.currentTime=0}};let N;i(document,"click","[audio-player-control]",(function(e){let t=this.closest("audio-player"),a=t.querySelector("audio");clearTimeout(N),"pause"===this.getAttribute("control")&&("true"===this.getAttribute("active")?(this.setAttribute("active",!1),a.pause()):(a.play(),this.setAttribute("active",!0))),N=setTimeout((()=>{t.style.opacity=0,setTimeout((()=>{t.remove()}),200)}),3e4)})),document.addEventListener("keyup",(function(e){document.activeElement,e.key&&("escape"!=e.key.toLowerCase()||document.find("[notifications]")&&L())})),i(document,"submit",'[data-form="system:notification"]',(function(e){e.preventDefault();let t=this.querySelector("input[name=message]"),a=new FormData(this);axios.post("/do/manager/notification",a).then((async e=>{e.status&&(t.value="",t.blur()),(new m).add(document.body,e.data.message,e.data.status?"success":"error","system")}))})),document.addEventListener("DOMContentLoaded",(async()=>{let e=document.querySelectorAll("img"),t=document.querySelector("overlay[loading-app]");document.addEventListener("keyup",(e=>{if(e.key){if("escape"===e.key.toLowerCase()){let e=document.find("[reactions-window]");(document.find("[composer]")||e)&&C()}"e"===e.key.toLowerCase()&&"u"==__page.current&&document.find("[editor-action=begin]").click()}})),$(window).on("scroll",(function(e){C()})),await M(t,e,1),document.addEventListener("click",(async function(e){let t,a=e.target.closest("a");null!==a&&(t=a.getAttribute("href"),!a.hasAttribute("extern")&&t&&(e.preventDefault(),await p(t,!1,a)));let o=e.target.closest('[data-action="beatmap:set,play"]');o&&(async e=>{let t,a,o,n=e,r=document.body.querySelector("app").querySelector("menu-js-content"),i=r.querySelectorAll("audio-player");x(),await axios.get("/get/ui/audio_player?set_id="+n).then((e=>{i[0]&&i.forEach((e=>{e.remove()})),clearTimeout(N),w(),e.data?(r.querySelector("audio-player"),r.innerHTML=e.data,i=r.querySelector("audio-player"),t=i.querySelectorAll("[add-active]"),o=i.querySelector("[audio-player-controls]"),setTimeout((()=>{t.forEach((e=>{e.setAttribute("active",!0)})),a=r.querySelector("audio"),a.volume=.38,a.play(),__current_audio_element=a,N=setTimeout((()=>{i.style.opacity=0,setTimeout((()=>{i.remove()}),200)}),3e4),setTimeout((()=>{t.forEach((e=>{e.removeAttribute("active")}))}),4e3),a.onended=()=>{a.pause(),a.currentTime=0,o.querySelector('[control="pause"]').setAttribute("active",!1),document.querySelectorAll('[data-action="beatmaps:set,play"]').forEach((e=>{e.removeAttribute("active")}))}}),200)):(new Responder.Responder).add(document.body,"Could not load map audio. Try again")}))})(o.dataset.setId);let n=document.find("[notifications]"),r=e.target.closest("[notifications]");!n||r&&r.matches("[notifications]")||L();let i=e.target.closest("user-menu");i&&i.matches("user-menu")||R();let s=e.target.closest("mode-menu");s&&s.matches("mode-menu")||(()=>{let e=document.find("mode-menu");e&&e.hasAttribute("active")&&e.removeAttribute("active")})()})),document.addEventListener("keypress",(function(e){if(e.key&&("enter"===e.key.toLowerCase()&&e.preventDefault(),"enter"===e.key.toLowerCase()&&("input"===e.target.tagName.toLowerCase()||"textarea"===e.target.tagName.toLowerCase())&&e.target.hasAttribute("enter-submitable"))){e.preventDefault();let t=e.target.closest("form"),a=t.querySelector("[submit-closest]");t&&a&&!a.hasAttribute("disabled")&&a.click()}})),document.addEventListener("scroll",(e=>{let t=document.body.querySelectorAll("[scroll-manipulated]");t[0]&&(document.documentElement.scrollTop>=40||document.body.scrollTop>=40?t.forEach((e=>{e.setAttribute("scrolled",!0)})):t.forEach((e=>{e.setAttribute("scrolled",!1)})))})),window.addEventListener("popstate",(async e=>{e.state&&(A(),null!=e.state.href&&e.state.href&&await p(e.state.href,!0))}))}));const M=async(e,t,a)=>{if(function(){if(1==(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return!1;if(__current_user.id&&!__current_user.privacy.accepts_policies&&!window.location.pathname.includes("consent")){let e="index"==__current_user.privacy.policies_consent_page?"":"/"+__current_user.privacy.policies_consent_page;return p(`/legal/consent${e}`),!0}return!1}())return;console.log("%cIn case you wonder, why I load every image separately using JavaScript, try to take a deeper look at the overall appearance and animated behaviour of this project. Instead of each image building up frame by frame, they fade in on complete load up for a clean and nice look. It's the small things that make it a great project.","color:grey;"),await p(window.location.pathname+window.location.search,!0),A(),document.body.setAttribute("initialized",!0),console.log("%c🌞 Framework/Bruder loaded!","color:light-blue;font-size:1.32em;font-weight:800;","\nheia.kim ©️ 2022-"+(new Date).getFullYear());let o,n=document.body.querySelector("[cookie-notice]");n?(o=n.querySelectorAll("[active=false]"),n.removeAttribute("donotshow"),setTimeout((()=>{o.forEach((e=>{e.setAttribute("active",!0)}))}),400)):(async e=>{if(!e)return;e.removeAttribute("donotshow");let t=e.querySelector(".hover_card");t&&setTimeout((()=>{t.setAttribute("active","true")}),200)})(document.querySelector("[feedback-notice]"))};let H,I;document.addEventListener("keypress",(function(){__page.is_sounds_enabled&&((async e=>{let t=document.body.querySelector("[click-audio]");t.pause(),t.currentTime=0})(),F("[click-audio]"))})),$(document).on("click","[submit-closest]",(function(e){let t=this.closest("form");if(!t)return;let a=t.querySelector("button[type='submit']");a||(a=document.createElement("button"),a.setAttribute("type","submit")),t.appendChild(a),t.querySelector("button[type='submit']").click(),this.hasAttribute("confirm-submit-button")&&this.removeAttribute("submit-closest")})),$(document).on("click","[confirm-submit-button]",(function(e){this.hasAttribute("disabled")||this.setAttribute("submit-closest","")}));let U=!1;i(document,"click","[confirm]",(async function(e){if(e.preventDefault(),this.hasAttribute("disabled"))return;let t=this.querySelector(".text"),a=window.getComputedStyle(t,"::before");return this.hasAttribute("submit-closest")?(U?(U=!1,this.removeAttribute("sureconfirm")):t.innerHTML=H,this.removeAttribute("color"),this.setAttribute("disabled",""),this.setAttribute("background",I),H=null,void this.removeAttribute("submit-closest")):(I=this.getAttribute("background"),"none"!=a.content?(U=!0,this.setAttribute("sureconfirm","")):(H=t.innerHTML,t.innerHTML="Are you sure?",this.setAttribute("color","white")),this.setAttribute("submit-closest",""),void this.setAttribute("background","red"))})),i(document,"input","form",(function(e){e.preventDefault();let t=this.querySelector("[confirm]");if(!t)return;let a=e.target,o=a.dataset.backup;a.value===o?t.setAttribute("disabled",""):t.removeAttribute("disabled")})),i(document,"click",'[data-action="cookies"]',(async function(t){let a=this.dataset.decision;e("COOKIE_CONSENT","accept"===a,365),O(document.querySelector("[cookie-notice]"))})),i(document,"click",'[action="privacy:cookie-consent"]',(async function(a){"true"==t("COOKIE_CONSENT")?e("COOKIE_CONSENT",!1,14):e("COOKIE_CONSENT",!0,365)})),i(document,"click","[clipboard-copy]",(function(e){var t;t=this.getAttribute("clipboard-copy"),navigator.clipboard.writeText(t).then((()=>{(new m).add(document.body,"Copied to clipboard!","success","keyevent")}))})),i(document,"click",'[data-action="scrollable-wrapper"]',(function(e){let t=this.dataset.direction,a=this.closest('[data-structure="scrollable-wrapper"]').querySelector(".wrapper-inr");a.scrollWidth,a.clientWidth,"next"===t?a.scrollBy({left:228,behavior:"smooth"}):a.scrollBy({left:-228,behavior:"smooth"})})),i(document,"click",'[action="legal:set-language"]',(async function(a){if(t("LEGAL_LANG"))return;t("LEGAL_SEEN")||e("LEGAL_SEEN",!0,361);let r=this.closest(".page"),i=r.querySelectorAll("[active]"),s=r.querySelector(".hover_card"),d=document.querySelector("element-backup");await i.forEach((e=>{e.removeAttribute("active")})),r.setAttribute("no-hover",!0),await n(400),d.innerHTML=s.innerHTML,await n(100),s.innerHTML="",await s.insertAdjacentHTML("afterbegin",'\n \n
\n\n
Select the language, you want to view our legal section in.
\n\n
\n
\n \n
\n
\n English
\n \n\n
\n \n
\n
\n German
\n \n
\n
\n '),s=r.querySelector(".hover_card"),s.setAttribute("active",!0),i=r.querySelectorAll("[active]"),await n(100),await i.forEach((e=>{e.setAttribute("active",!0)}));const l=s.querySelectorAll("img");await o(l),await r.removeAttribute("no-hover")})),i(document,"click",'[action="legal:set-language,confirm"] mbutton',(async function(a){if(t("LEGAL_LANG"))return;let o=this.dataset.letAction,r=this.closest(".page"),i=this.closest(".hover_card"),s=document.body.querySelector("element-backup");r.setAttribute("no-hover",!0),i.removeAttribute("active"),e("LEGAL_LANG","de"===o||"en"===o?o:"en",365),r.querySelector("a").setAttribute("page",""),r.querySelector("a").setAttribute("href","/legal/"+o),i.querySelectorAll("[active]").forEach((e=>{e.setAttribute("active",!1)})),await n(100),i.innerHTML=s.innerHTML,r.removeAttribute("no-hover"),await p("/legal/"+o),r.removeAttribute("no-hover")})),$((function(){$(document).on("input","textarea[auto-resize]",(function(){this.style.height="auto",this.style.height="calc(3px + "+this.scrollHeight+"px)"}))})),$((function(){$(document).on("click","[select-choose-file]",(function(e){if(e.preventDefault(),this.hasAttribute("disabled"))return;let t=this.closest("form").querySelector("input[type=file]");console.log(t),t.click()})),$(document).on("click","[input-type=file]",(function(e){let t=this.find("input[type=file]");console.log(t),t&&t.click()})),$(document).on("change","[trigger=update-profile-image]",(function(e){e.preventDefault();let t=document.querySelector("[trigger=update-profile-image]"),a=document.find_all("img[update-profile-image]"),o=this.files[0];t&&a.length&&o&&a.forEach((e=>{let t=this.closest("form");if(t){let e=t.find("[submit-closest]"),a=t.find('[data-action="users:image,remove"]');a&&a.setAttribute("disabled",""),e&&(e.removeAttribute("disabled"),e.setAttribute("has-tooltip",""))}e.setAttribute("src",URL.createObjectURL(o));let a=e.closest("picture");a?.setAttribute("animation","changed-zoom");let n=window.getComputedStyle(a).getPropertyValue("animation-duration"),r=parseFloat(n.replace("s",""));setTimeout((()=>{a?.removeAttribute("animation"),a?.setAttribute("animation","pulse")}),1e3*r)}))})),document.addEventListener("scroll",(async e=>{let t,a,o,n=document.find('[scroll="infinite"]'),r=document.find('[data-form="infinite-scroll"]'),i=document.find("[scroll-type]"),s=document.find('[data-react="infinite-scroll-offset"]'),d=document.find('[data-react="scroll:reached-end"]'),l=document.find("[page-end-bird]"),c=document.body.scrollHeight-window.innerHeight;if(!n||!r||!i||__page.is_loading)return;i=i.getAttribute("scroll-type");let p=parseInt(s.value),u=r.find("input[name=limit]").value;t=new FormData(r),a=new URLSearchParams(t),"squad"===i&&(o="/get/squads/score/fetch"),"beatmaps"===i&&(o="/get/beatmaps/fetch"),"squads"===i&&(o="/get/squads/fetch"),window.scrollY>=c-__infinite_scroll.page_offset&&!__infinite_scroll.reached_end&&!__infinite_scroll.reached_full_end&&(__page.is_loading=!0,__infinite_scroll.reached_end=!0,d.setAttribute("show-loader",""),d.removeAttribute("style"),l.style.display="none",o=o+"?"+a,$.ajax({url:o,method:"GET",processData:!1,contentType:!1,success:function(e){__page.is_loading=!1,e.data?(n.insertAdjacentHTML("beforeend",e.data),s.value=p+parseInt(u),__infinite_scroll.reached_end=!1):(console.log("Reached full end! No more maps to fetch."),d.remove(),l.removeAttribute("style"),__infinite_scroll.reached_full_end=!0,e.notification&&document.find("footer").insertAdjacentHTML("beforebegin",e.notification)),j(),e.status||(new m).add(document.body,e.message,"error","beatmaps")},error:function(e){__page.is_loading=!1,l.removeAttribute("style"),l.style.display="none",d.removeAttribute("show-loader"),(new m).add(document.body,e.statusText,"error","beatmaps")}}))})),$(document).on("click",(function(e){$(e.target).closest("[open-more-menu]").is("[open-more-menu]")||$(e.target).closest("[menu-more]").is("[menu-more]")||T()})),$(document).on("click","[open-more-menu]",(function(e){let t=this.closest("[menu-outer]").find("[menu-more]"),a=this.closest("box-model");T(),t.activate(),a&&a.activate()})),$(document).on("click","[menu-more] .option",(function(e){T()})),i(document,"click",'[data-action="reactions:create"] [emoji]',(function(e){let t,a,o,n=this.closest("[reactions-window]")||this.closest("[reactions-outer]"),r=this.dataset.reaction,i=n.find("form"),s=i.find("input[name=reference_id]").value,d=i.find("input[name=reaction]"),l=document.find_all(`[reactions-container][data-id="${s}"]`),c=0;d.value=r;let p=new FormData(n.find("form"));x(),$.ajax({url:"/do/reaction/create",data:p,method:"POST",contentType:!1,processData:!1,success:function(e){C(),z(),e.status&&l.forEach((n=>{t=n,a=t.find(`[data-reaction="${r}"]`),a?(c=a.find("[count]"),a.hasAttribute("active")?(o=parseInt(c.innerHTML)-1,0===o?a.remove():(c.innerHTML=o,a.unactivate())):(o=parseInt(c.innerHTML)+1,c.innerHTML=o,a.activate())):t.insertAdjacentHTML("afterbegin",e.data)}))},error:function(e){(new m).add(document.body,e.message,"error","users")}})})),$(document).on("submit",'[data-form="reactions"]',(function(e){if(e.preventDefault(),document.find("[reactions-window]"))return;let t=new FormData(this),a=(this.closest("box-model"),this.find("[submit-closest]"));x(),a.disable(),$.ajax({url:"/get/ui/reactions",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){z(),a.enable(),e.status?document.find("app").insertAdjacentHTML("beforeend",e.data):(new m).add(document.body,e.message,"error","users")},error:function(e){z(),(new m).add(document.body,e.statusText,"error","users")}})})),$(document).on("click","[locale]",(function(e){let t=this.getAttribute("locale"),a=window.location.href;return x(),this.disable(),a.includes("&lang=")&&(a=a.replace(/&lang=[^&]*/,"")),window.location.replace(a.concat(`&lang=${t}`))})),$(document).on("click","[choose-drop-file] [choose], [choose-drop-file] [change]",(function(e){let t=this.closest("[choose-drop-file]"),a=t.find("input[type=file]"),o=t.find("video");a&&(a.click(),$(a).on("change",(function(e){let a=this.files[0],n=o.find("source")??document.createElement("source");n.src=URL.createObjectURL(a),o.find("source")||(o.innerHTML="",o.appendChild(n)),o.load(),t.activate()})))})),$(document).on("click","[choose-drop-file] [remove]",(function(e){let t=this.closest("[choose-drop-file]"),a=t.find("input[type=file]");t.unactivate(),a.value=""}))})),i(document,"click",'[data-action="jobs:execute"]',(function(e){B(this.dataset.url)}));const B=e=>{let t=e.split("/"),a=t[t.length-1].replace(/_/g," ");(new m).add(document.body,`Job ${a} has been started...`,"success","jobs"),x(),axios.post("/jobs/"+e+".php").then((e=>{w(),(new m).add(document.body,e.data.message,e.data.status?"success":"error","jobs")}))};i(document,"click",'[data-action="relationships:create"]',(function(e){let t=this.dataset.userId,a=new FormData,o=this.closest("[relationship-actions]"),n=this;a.append("user_id",t),a.append("type","friend"),n.disable(),n.setAttribute("loading-action",""),axios.post("/do/relationship/create",a).then((e=>{n.enable(),n.removeAttribute("loading-action"),e.data.status?(o.removeAttribute("refollow"),o.removeAttribute("unfollow"),o.removeAttribute("follow"),o.setAttribute("unfollow","")):(new m).add(document.body,e.data.message,"error","user")}))})),i(document,"click",'[data-action="relationships:remove"]',(function(e){let t=this.dataset.userId,a=new FormData,o=this.closest("[relationship-actions]"),n=this;a.append("user_id",t),a.append("type","friend"),n.disable(),n.setAttribute("loading-action",""),axios.post("/do/relationship/remove",a).then((e=>{n.enable(),n.removeAttribute("loading-action"),e.data.status?(o.removeAttribute("unfollow"),e.data.refollow?o.setAttribute("refollow",""):o.setAttribute("follow","")):(new m).add(document.body,e.data.message,"error","user")}))})),$(document).on("submit",'[data-form="reports:create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),$.ajax({url:"/do/report/create",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status?A():a.enable(),(new m).add(document.body,e.message,e.status?"success":"error","report")},error:function(e){a.enable(),z(),(new m).add(document.body,e.statusText,"error","report")}})}));const X='\n \n \n
\n';let W;$(document).on("submit",'[data-form="sessions:create"]',(function(e){e.preventDefault();let t,a=new FormData(this),o=new b(null,!1),n=this.find("mbutton[submit-closest]");n.disable(),axios.post("/do/session/create",a).then((async e=>{e.data.status?(__page.is_sounds_enabled&&await F("[bell-downtoup-audio]"),__current_user.id=e.data.user.id,o.hide_loader(),setTimeout((()=>{o.overlay.insertAdjacentHTML("beforeend",X),t=o.overlay.querySelector("dotlottie-player"),t.addEventListener("complete",(async()=>{e.data.user.priv<2?window.location.replace("/download"):window.location.replace("/home")}))}),200)):(__page.is_sounds_enabled&&await F("[bell-negative-audio]"),A(),n.enable())}))})),i(document,"submit",'[data-form="sessions:remove"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),$.ajax({url:"/do/session/remove",data:t,method:"POST",contentType:!1,processData:!1,success:async function(e){z(),e.status?e.current_session?(__page.is_sounds_enabled&&await F("[bell-uptodown-audio]"),setTimeout((()=>{window.location.replace("/home")}),2e3)):(console.log("Is not current session;"),c()):a.enable(),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){a.enable(),z(),(new m).add(document.body,e.message,"error")}})})),$(document).on("submit",'[data-form="comments:create,view"]',(function(e){if(e.preventDefault(),document.find("[composer]"))return;let t=new FormData(this),a="/get/comment/create?"+new URLSearchParams(t);u(document.find("app"),a)})),$(document).on("submit",'[data-form="comments:create"]',(function(e){e.preventDefault();let t,a,o=new FormData(this),n=this.find("[submit-closest]");document.find("[composer]"),n.disable(),x(),$.ajax({url:"/do/comment/create",data:o,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status?(A(),t=document.find(`[data-react="comments:create"][data-id="${e.id??0}"]`),t&&(t.insertAdjacentHTML("beforeend",e.data),a=t.closest(".timeline-object"),a&&a.find(".timeline-object--icon").removeAttribute("dno")),j(),C()):(n.enable(),(new m).add(document.body,e.message,"error","comments"))},error:function(e){n.enable(),z(),(new m).add(document.body,e.statusText,"error","comments")}})})),i(document,"click",'[data-action="comments:delete"]',(function(e){e.preventDefault();let t=new FormData,a=this.dataset.id,o=this.closest("[comment]"),n=this.closest("[comments-container]");t.append("id",a),x(),axios.post("/do/comments/remove",t).then((e=>{w(),e.data.status&&(o.remove(),n.style.height="calc(6.8em + "+n.find("[get-height]").clientHeight+"px)"),(new m).add(document.body,e.data.message,e.data.status?"success":"error","comments")}))})),$(document).on("submit",'[data-form="comments:fetch"]',(function(e){e.preventDefault();let t,a=new FormData(this),o=this.find("[submit-closest]"),n=this.find("input[name=limit]").value,r=this.find("input[name=offset]");o.disable(),x(),$.ajax({url:"/get/comment/fetch",data:a,type:"POST",contentType:!1,processData:!1,success:function(e){z(),e.end?(o.find("mi")&&(o.find("mi").innerHTML="done"),o.setAttribute("background","slight-green"),o.setAttribute("color","dark-green"),o.removeAttribute("submit-closest"),o.removeAttribute("filled")):(o.enable(),r.value=parseInt(r.value)+parseInt(n)),e.status?(A(),t=document.find(`[data-more="comments"][data-id="${e.id??0}"]`),t.insertAdjacentHTML("beforeend",e.data),j()):(new m).add(document.body,e.message,"error","comments")},error:function(e){o.enable(),z(),(new m).add(document.body,e.statusText,"error","comments")}})})),i(document,"click","[more-menu]",(async function(e){this.querySelector("[data-react='more-menu']").setAttribute("active","")})),$(document).on("click","[data-action='feedback'] mbutton",(function(e){let t=new FormData,a=this;t.append("type","update"),t.append("action",this.dataset.action),a.disable(),axios.post("/do/feedback/create",t).then((e=>{e.data.status?O(this.closest("[feedback-notice]")):(a.enable(),(new m).add(document.body,e.data.message,"error","feedback"))}))})),$(document).on("submit","[data-form='feedback:create']",(function(e){e.preventDefault();let t=new FormData(this),a=this.querySelector("[submit-closest]"),o=this.querySelector("[count]"),n=a.hasAttribute("active");a.disable(),axios.post("/do/feedback/create",t).then((async e=>{console.log(e),e.data.status&&(n?a.removeAttribute("active"):a.setAttribute("active",""),n?o&&(o.querySelector("p").innerHTML=parseInt(o.querySelector("p").innerHTML)-1):(o&&(o.querySelector("p").innerHTML=parseInt(o.querySelector("p").innerHTML)+1),a.setAttribute("clicked",""),setTimeout((()=>{a.removeAttribute("clicked")}),1e3))),a.enable(),e.data.status||(new m).add(document.body,e.data.message,e.data.status?"success":"error","feedback")}))})),$(document).on("submit",'[data-form="feedback:birthday,create"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=new FormData(this),o=t.find("[counter]"),n=this.closest("box-model");y(),t.disable(),$.ajax({url:"/do/feedback/create",data:a,method:"POST",contentType:!1,processData:!1,success:function(e){console.log(e),v(),e.status?(t.disable(),o.innerHTML=parseInt(o.innerHTML)+1,t.closest("[append-animation]").insertAdjacentHTML("beforeend",'\n \n \n
\n'),t.setAttribute("cheering",!0),n.removeAttribute("elevated")):t.enable()},error:function(e){v(),t.enable(),(new m).add(document.body,e.message,"error")}})})),document.addEventListener("keyup",(e=>{let t=document.activeElement.tagName.toLowerCase(),a=["input","textarea","button"];if(e.key&&"f"===e.key.toLowerCase()){if(a.includes(t))return;J()}})),i(document,"input",'[data-action="search:start"]',(async function(e){let t=this.value,a=new FormData,n=document.querySelector("[global-search]"),r=n.querySelector("[search-loader]"),i=n.querySelector(".global_search__result");if(clearTimeout(W),t.trim().length<1)return r.removeAttribute("active"),void(i&&i.remove());a.append("query",t),r.setAttribute("active",""),W=setTimeout((()=>{axios.post("/get/ui/search/fetch",a).then((e=>{i=n.querySelector(".global_search__result"),i&&i.remove(),n.insertAdjacentHTML("beforeend",e.data.data);const t=document.body.querySelectorAll("img");o(t),r.removeAttribute("active")}))}),600)})),i(document,"click","[data-action='search:open']",(async function(e){J()})),i(document,"click","[global-search] a",(async function(e){A()}));const J=()=>{let e;e=new b,axios.post("/get/ui/global-search").then((t=>{setTimeout((()=>{e.append(t.data.data),setTimeout((()=>{document.find('[data-action="search:start"]').focus()}),201)}),200)}))};i(document,"click","mselect",(function(e){let t=this.querySelector("mselect-dropdown"),a=t.querySelector("[get-size]"),o=a.clientHeight,n=a.clientWidth,r=this.getAttribute("mselect-type");if(e.target.closest("mselect-dropdown")||(t.setAttribute("active",""),t.style.height=o+"px",setTimeout((()=>{t.style.width=n+"px",setTimeout((()=>{a.setAttribute("active","")}),320)}),60)),e.target.closest("mselect-option")||"mselect-option"===e.target.tagName){t.removeAttribute("active"),t.removeAttribute("style"),a.removeAttribute("active");let o=e.target.closest("[mselect-change-visible-value]")?e.target.closest("[mselect-change-visible-value]"):e.target,n=this.querySelector("[mselect-visible-value]"),i=o.getAttribute("mselect-input-value"),s=this.querySelector("input[mselect-input]");"input-visible"==r?(n.innerHTML=o.innerHTML,s.value=i):"visible"==r&&(n.innerHTML=o.innerHTML)}})),document.addEventListener("click",(function(e){const t=e.target,a=document.querySelectorAll("mselect");t.matches("mselect")||t.closest("mselect")||a.forEach((e=>{e.querySelector("mselect-dropdown").removeAttribute("active"),e.querySelector("mselect-dropdown").removeAttribute("style"),e.querySelector("[get-size]").removeAttribute("active")}))})),a(898),document.addEventListener("scroll",(async e=>{let t,a,o=document.body.querySelector('[scroll="infinite"]'),n=document.body.scrollHeight-window.innerHeight;o&&!__infinite_scroll.reached_end&&window.location.pathname.includes("artist/")&&!__page.is_loading&&(t=new FormData(document.body.querySelector('[data-form="artists:scroll"]')),a=new URLSearchParams(t),window.scrollY>=n-__infinite_scroll.page_offset&&!__infinite_scroll.reached_end&&!__infinite_scroll.reached_full_end&&(__infinite_scroll.reached_end=!0,await G(a,o),__infinite_scroll.reached_end=!1))}));const G=async(e,t)=>{let a=document.body.querySelector('[data-react="infinite-scroll-offset"]'),o=parseInt(a.value),n=document.body.querySelector('[data-react="scroll:reached-end"]'),r=document.body.querySelector("[page-end-bird]");n&&(n.setAttribute("show-loader",""),n.removeAttribute("style","")),r&&(r.style.display="none"),await axios.get("/get/artists/sets/fetch?"+e).then((async e=>{e.data.status&&!e.data.end?(await t.insertAdjacentHTML("beforeend",e.data.data),a&&(a.value=o+parseInt(__infinite_scroll.limit)),j()):(console.log("Reached full end! No more maps to fetch."),n&&n.remove(),r&&r.removeAttribute("style"),__infinite_scroll.reached_full_end=!0)}))};document.addEventListener("keyup",(function(e){if(document.activeElement,e.key)return"escape"==e.key.toLowerCase()?(document.activeElement.blur(),void K()):void 0})),i(document,"input",'[data-action="beatmaps:search"]',(async function(e){let t=document.find('[data-form="infinite-scroll"]'),a=this.value,o=t.find("input[name=query]");this.value.trim().length<1?o.value="":o.value=a})),i(document,"keyup",'[data-action="beatmaps:search"]',(async function(e){let t=document.find('[data-form="infinite-scroll"]').querySelector("button[type=submit]");if(e.key)return"enter"===e.key.toLowerCase()?(this.blur(),void t.click()):void 0})),i(document,"submit",'[data-form="infinite-scroll"][data-form-type="beatmaps"]',(async function(e){e.preventDefault();let t=new FormData(this),a=t.get("submit_link"),o=t.get("query").replace("&"," ");if(t.get("backup").trim()===o.trim())return;let n=o.trim().length<1?a:a.concat(`?query=${encodeURIComponent(o)}`);if(await p(n),o.trim().length<1)return;let r=new FormData;r.append("query",o),r.append("type","beatmap"),await $.ajax({url:"/do/search/create",data:r,method:"POST",dataType:"JSON",contentType:!1,processData:!1,success:function(e){console.log(e)}}),__infinite_scroll.reached_full_end=!1})),i(document,"click",'[data-action="beatmaps:search,recent"]',(async function(e){let t=document.body.querySelector('[data-form="beatmaps:search"]').querySelector("input[name=query]"),a=this.querySelector("input[name=query]").value,o=this.closest("[search]").querySelector('input[data-action="beatmaps:search"]');o.value=t.value=a,await o.focus(),await document.dispatchEvent(new KeyboardEvent("keyup",{key:"Enter"})),await Y()}));const Y=async()=>{let e=document.body.querySelector("[search]");e&&e.hasAttribute("active")&&(e.setAttribute("closing",""),e.removeAttribute("active"),e.querySelector(".search_outer").removeAttribute("style"),setTimeout((()=>{e.removeAttribute("closing")}),600))};i(document,"click",'[data-action="beatmaps:set,play"]',(function(e){if(this.hasAttribute("active"))return __current_audio_element.pause(),void this.removeAttribute("active");this.setAttribute("active","");let t=this.dataset.id,a=this.closest(".play_button"),o=a.querySelector(".length"),n=document.createElement("audio");n.setAttribute("src",__osu.beatmap_preview_url+"/preview/"+t+".mp3"),document.querySelector("app").appendChild(n),__current_audio_element=n,n.play(),n.addEventListener("loadedmetadata",(()=>{const e=n.duration;a.setAttribute("active",""),this.setAttribute("active",""),n.addEventListener("timeupdate",(()=>{const t=n.currentTime/e*100;o.style.width=t+"%",n.ended&&(o.style.width="100%")}))})),n.addEventListener("ended",(()=>{this.removeAttribute("active"),o.removeAttribute("style"),a.removeAttribute("active"),n.remove()}))})),i(document,"click","[composer]",(function(e){let t=this.querySelector("textarea");this.setAttribute("active",""),t.focus()})),i(document,"submit",'[data-form="comments:create old"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.querySelector("textarea"),n=this.closest("[composer]"),r=this.closest("[comments-container]"),i=r.find("[get-scroll]"),s=r.querySelector('[data-react="comments:create"]'),d=s.find("[empty]");x(),axios.post("/do/comment/create",t).then((async e=>{if(w(),e.data.status){a.value="",a.blur(),n.removeAttribute("active"),d&&d.remove(),s.insertAdjacentHTML("beforeend",e.data.data);let t=window.getComputedStyle(r).getPropertyValue("padding-top"),l=s.clientHeight,m=n.clientHeight+l+2*parseInt(t.replace("px",""));r.style.height=m+"px",i.scrollTop=i.scrollHeight,await o(document.body.querySelectorAll("img"))}else(new m).add(document.body,e.data.message,"error","comments")}))})),$(document).on("click",'[data-action="beatmaps:comments,open"]',(function(e){e.preventDefault();let t=new FormData,a=this.dataset.id,n=document.querySelector("[comments-container]"),r=this.closest("[has-info-window]");r&&(r.removeAttribute("has-info-window"),D("beatmap_comments")),n?K():(t.append("id",a),x(),axios.post("/get/beatmapsets/comments",t).then((async e=>{w(),document.querySelector("app").insertAdjacentHTML("beforeend",e.data.data),await o(document.body.querySelectorAll("img"));let t=document.querySelector("[comments-container]"),a=t.find("[composer]"),n=t.querySelector(".comments"),r=document.querySelectorAll("textarea[auto-resize]"),i=window.getComputedStyle(t).getPropertyValue("padding-top"),s=n.querySelector("[get-height]").clientHeight,d=a.clientHeight+s+2*parseInt(i.replace("px",""));d>window.innerHeight&&(d=window.innerHeight),t.setAttribute("active",""),t.style.height=d+"px",n.scrollTop=n.scrollHeight,r.forEach((e=>{e.addEventListener("input",(t=>{e.value.trim().length<1?e.style.height="auto":e.style.height=`${e.scrollHeight}px`})),e.addEventListener("blur",(t=>{e.closest("[composer]").removeAttribute("active")}))}))})))}));const K=()=>{let e=document.find("[comments-container]");e&&e.hasAttribute("active")&&(e.removeAttribute("active"),setTimeout((()=>{e.remove()}),400))};let V=null,Z=!1,Q=0,ee=0;i(document,"mousedown","[dragme]",(function(e){Z=!0,Q=e.clientX,ee=this.parentNode.offsetLeft,V=this.parentNode,document.body.setAttribute("disable-user-selection",""),document.addEventListener("mousemove",(e=>{if(!Z)return;let t=e.clientX-Q,a=ee+t,o=window.innerWidth-V.offsetWidth;a=Math.max(0,Math.min(a,o)),V.style.left=a+"px"})),document.addEventListener("mouseup",(e=>{Z=!1,document.body.removeAttribute("disable-user-selection")}))})),$(document).on("submit",'[data-form="requests:create"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=this.hasAttribute("radio"),o=this.hasAttribute("responder");clearTimeout(__submit),!a&&t&&t.disable(),this.hasAttribute("delayed")&&(__submit_timeout=__submit_timeout_delay),__submit=setTimeout((()=>{let e=new FormData(this);$.ajax({url:"/do/request/create",data:e,method:"POST",contentType:!1,processData:!1,success:function(e){z(),t.enable(),e.status&&(c(),k()),!o&&e.status||(new m).add(document.body,e.message,e.status?"success":"error","settings")},error:function(e){t.enable(),(new m).add(document.body,e.statusText,"error","settings")}})}),__submit_timeout),__submit_timeout=0}));let te,ae,oe=!1;i(document,"click","[action=policies-consent-prompt]",(async function(a){let o,r,i=t("POLICIES_CONSENT_STEP"),s=document.body.querySelector("[prompt=policies-consent]"),d=s.querySelectorAll("box-model:not(.spacer):not(.changed-mind)"),l=s.querySelector(".spacer"),m=d.length;"true"!=i&&"false"!=i&&parseInt(i)!==m-2&&(parseInt(i)===m-3&&(s.querySelector("[more]").style.opacity="0",s.querySelector("[more]").style.visibility="hidden"),oe||(oe=!0,i?(o=d[parseInt(i)],r=d[parseInt(i)+1],e("POLICIES_CONSENT_STEP",parseInt(i)+1,365)):(e("POLICIES_CONSENT_STEP",1,365),o=d[0],r=d[1]),o.removeAttribute("visible"),await n(600),l.innerHTML=r.innerHTML,r.setAttribute("visible",""),r.style.height=r.querySelector("bm-inr").clientHeight+"px",await n(400),r.style.height="auto",oe=!1))})),i(document,"click","[action='policies-consent-prompt,decide'] buttonmon",(async function(a){let o=new FormData,n="accept"===this.dataset.letAction?1:0;o.append("accepts_policies",n),axios.post("/do/legal/give_consent",o).then((async a=>{a.data.status&&(p("/legal/"+t("LEGAL_LANG")),e("POLICIES_CONSENT_STEP",!!n,365)),(new m).add(document.body,a.data.message,a.data.status?"success":"error","privacy")}))})),$(document).on("submit",'[data-form="users:appeal,create"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=new FormData(this);y(),t.disable(),$.ajax({url:"/do/restriction/appeal/create",data:a,method:"POST",processData:!1,contentType:!1,success:function(e){v(),e.status?c():t.enable(),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){_(e)}})})),$(document).on("submit",'[data-form="users:appeal,update"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=new FormData(this);y(),t.disable(),$.ajax({url:"/do/restriction/appeal/edit",data:a,method:"POST",processData:!1,contentType:!1,success:function(e){v(),e.status?c():t.enable(),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){_(e)}})})),$(document).on("submit",'[data-form="users:edit"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=this.hasAttribute("radio"),o=this.hasAttribute("responder"),n=this.getAttribute("redirect-to");clearTimeout(__submit),!a&&t&&t.disable(),this.hasAttribute("delayed")&&(__submit_timeout=__submit_timeout_delay),y(),__submit=setTimeout((()=>{let e=new FormData(this);$.ajax({url:"/do/user/edit",data:e,method:"POST",contentType:!1,processData:!1,success:function(e){v(),t.enable(),console.log(n),e.status&&(n?p(n):c(),k()),!o&&e.status||(new m).add(document.body,e.message,e.status?"success":"error","settings")},error:function(e){v(),t.enable(),(new m).add(document.body,e.statusText,"error","settings")}})}),__submit_timeout),__submit_timeout=0})),$(document).on("submit",'[data-form="users:settings,edit"], [data-form="users:settings,privacy,edit"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=this.hasAttribute("radio"),o=this.hasAttribute("responder"),n="/do/user/settings/edit";clearTimeout(__submit),this.dataset.form.includes("privacy")&&(n="/do/user/settings/privacy/edit"),!a&&t&&t.disable(),this.hasAttribute("delayed")&&(__submit_timeout=__submit_timeout_delay),__submit=setTimeout((()=>{let e=new FormData(this);$.ajax({url:n,data:e,method:"POST",contentType:!1,processData:!1,success:function(e){z(),t.enable(),e.status&&("my"!=__page.current&&"u"!=__page.current||(c(),k())),!o&&e.status||(new m).add(document.body,e.message,e.status?"success":"error","settings")},error:function(e){t.enable(),(new m).add(document.body,e.statusText,"error","settings")}})}),__submit_timeout),__submit_timeout=0})),i(document,"submit",'[data-form="users:edit,image"]',(function(e){e.preventDefault();let t=this.closest("box-model"),a=new FormData(this),o=this.querySelector("[submit-closest]");t.style.overflow="hidden",t.style.position="relative";let n=new b(t,!1);o.disable(),x(),axios.post("/do/user/settings/edit",a).then((async e=>{z(),n.delete(),e.data.status?(c(),k()):o.enable(),(new m).add(document.body,e.data.message,e.data.status?"success":"error","settings")})).catch((e=>{n.delete(),o.enable(),(new m).add(document.body,e.response.statusText,"error","settings")}))})),i(document,"click",'[data-action="users:edit,image,remove"]',(function(e){if(this.hasAttribute("disabled"))return;let t=this.closest("box-model"),a=document.querySelectorAll('[trigger="user:image,change"]'),o=new FormData,n=this;t.style.overflow="hidden",t.style.position="relative";let r=new b(t,!1);o.append("remove_current_profile_picture",1),axios.post("/do/user/settings/edit",o).then((async e=>{r.delete(),e.data.status&&(a.forEach((t=>{t.setAttribute("src",e.data.full_image_path)})),n.disable()),(new m).add(document.body,e.data.message,e.data.status?"success":"error","settings")}))})),$(document).on("submit",'[data-form="users:email,create"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=new FormData(this);y(),t.disable(),$.ajax({url:"/do/user/edit",data:a,method:"POST",contentType:!1,processData:!1,success:function(e){console.log(e),v(),e.status?e.verified?(p("/my/personal"),(new m).add(document.body,e.message,"success")):p(`/my/personal/mail/${encodeURIComponent(e.email)}`):(t.enable(),(new m).add(document.body,e.message,"error"))},error:function(e){v(),t.enable(),(new m).add(document.body,e.message,"error")}})})),$(document).on("submit",'[data-form="users:scores,wipe"]',(function(e){e.preventDefault();let t=this.find("[confirm-submit-button]")??this.find("[submit-closest]"),a=new FormData;a.append("wipe",!0),t.disable(),axios.post("/do/score/remove",a).then((async e=>{e.data.status?p("/my/game"):t.enable(),(new m).add(document.body,e.data.message,e.data.status?"success":"error","settings")}))})),i(document,"submit","[data-form='users:settings,privacy']",(async function(e){e.preventDefault(),setTimeout((async()=>{let e=new FormData(this);x(),axios.post("/do/users/settings/privacy/edit",e).then((async e=>{console.log(e.data),w(),e.data.status||(new m).add(document.body,e.data.message,"error","settings")}))}),100)})),i(document,"submit","[data-form='squads:privacy']",(async function(e){e.preventDefault(),setTimeout((async()=>{let e=new FormData(this);x(),axios.post("/do/squads/edit",e).then((async e=>{console.log(e.data),w(),e.data.status||(new m).add(document.body,e.data.message,"error","settings")}))}),100)})),i(document,"click","radio .r__option",(function(e){let t=this.dataset.value,a=this.closest("radio"),o=a.find("input"),n=a.closest("setter");if(a.find_all(".r__option").forEach((e=>{e.unactivate()})),this.activate(),a.hasAttribute("mode")&&n){let e=n.find("radio[mod]"),a=e.find("input");n.setAttribute("mode",t),("taiko"==t&&"autopilot"==a.value||"ctb"==t&&"autopilot"==a.value||"mania"==t&&"relax"==a.value||"mania"==t&&"autopilot"==a.value)&&e.find(".r__option[mod=vanilla]").click()}o&&(o.value=t)})),i(document,"submit",'[data-form="password-resets:create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]"),o=this.getAttribute("redirect-to"),n=this.hasAttribute("reload");a.disable(),y(),axios.post("/do/password-reset/create",t).then((async e=>{console.log(e),v(),e.data.status?(__page.is_sounds_enabled&&await F("[bell-highpitch-audio]"),o?p(o):n?c():await p("/login")):(a.enable(),__page.is_sounds_enabled&&await F("[bell-negative-audio]")),(new m).add(document.body,e.data.message,e.data.status?"success":"error")}))})),i(document,"submit",'[data-form="password-resets:edit"]',(async function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]"),o=this.getAttribute("redirect-to"),n=this.hasAttribute("reload");a.disable(),y(),$.ajax({url:"/do/password-reset/edit",data:t,method:"POST",processData:!1,contentType:!1,success:function(e){console.log(e),z(),e.status?(__page.is_sounds_enabled&&F("[bell-downtoup-audio]"),o?p(o):n?c():p("/login")):(__page.is_sounds_enabled&&F("[bell-negative-audio]"),a.enable()),(new m).add(document.body,e.message,e.status?"success":"error","security")},error:function(e){z(),a.enable(),(new m).add(document.body,e.statusText,"error","security")}})})),i(document,"submit",'[data-form="clan:create"]',(function(e){e.preventDefault();let t=this.querySelector("[submit-closest]"),a=new FormData(this);t.setAttribute("disabled",""),a.append("csrf_token",document.querySelector("meta[name=csrf_token]").getAttribute("content")),axios.post("/do/squad/create",a).then((async e=>{e.data.status?(__current_overlay&&!__current_second_overlay?__current_overlay.delete():__current_second_overlay&&__current_second_overlay.delete(),setTimeout((async()=>{await p("/manage/squad")}),400),await k()):t.removeAttribute("disabled"),(new m).add(document.body,e.data.message,e.data.status?"success":"error","squad")}))})),i(document,"submit","[data-form='squads:edit']",(async function(e){e.preventDefault();let t=this.hasAttribute("radio"),a=this.find("[submit-closest]"),o=this.hasAttribute("responder");clearTimeout(__submit),!t&&a&&a.disable(),this.hasAttribute("delayed")&&(__submit_timeout=__submit_timeout_delay),__submit=setTimeout((()=>{let e=new FormData(this);x(),$.ajax({url:"/do/squad/edit",data:e,method:"POST",contentType:!1,processData:!1,success:async function(e){console.log(e),z(),e.status&&c(),!t&&a&&a.enable(),e.status&&!o||(new m).add(document.body,e.message,e.status?"success":"error","squad")},error:function(e){z(),a&&a.enable(),(new m).add(document.body,e.statusText,"error","squad")}})}),__submit_timeout),__submit_timeout=0})),$(document).on("submit",'[data-form="squads:request,create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),$.ajax({url:"/do/squad/request/create",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status?setTimeout((()=>{c(),k()}),400):a.enable(),(new m).add(document.body,e.message,e.status?"success":"error","squad")},error:function(e){a.enable(),z(),(new m).add(document.body,e.statusText,"error","squad")}})})),$(document).on("submit",'[data-form="squads:request,remove"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),$.ajax({url:"/do/squad/request/remove",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){a.enable(),z(),e.status?c():(new m).add(document.body,e.message,"error","squad")},error:function(e){a.enable(),z(),(new m).add(document.body,e.statusText,"error","squad")}})})),$(document).on("submit",'[data-form="squads:user,create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),$.ajax({url:"/do/squad/user/create",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status?(c(),k()):a.enable(),(new m).add(document.body,e.message,e.status?"success":"error","squad")},error:function(e){a.enable(),z(),(new m).add(document.body,e.statusText,"error","squad")}})})),$(document).on("change",'[data-form="squad:imagery"]',(async function(e){e.preventDefault();let t=this.dataset.type,a=this.querySelector("a"),o=new FormData(this);o.append("update_image",!0),o.append("image_type",t),await a.disable(),await x(),$.ajax({url:"/do/squad/edit",data:o,method:"POST",contentType:!1,processData:!1,success:async function(e){console.log(e),z(),e.status&&(await c(),await k()),await a.enable(),(new m).add(document.body,e.message,e.status?"success":"error","squad")},error:function(e){z(),a.enable(),(new m).add(document.body,e.statusText,"error","squad")}})})),$(document).on("click","[update-squad-mode]",(async function(e){e.preventDefault(),clearTimeout(te),te=setTimeout((async()=>{let e=this.closest('[data-form="squad:modes"]'),t=new FormData(e);x(),$.ajax({url:"/do/squad/mode/edit",data:t,method:"POST",contentType:!1,processData:!1,success:async function(e){console.log(e),z(),e.status||(new m).add(document.body,e.message,e.status?"success":"error","squad")},error:function(e){z(),(new m).add(document.body,e.statusText,"error","squad")}})}),100)})),i(document,"submit",'[data-form="squads:users,remove"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),axios.post("/do/squad/user/remove",t).then((e=>{console.log(e),z(),e.data.status?p("/my/overview"):a.enable(),(new m).add(document.body,e.data.message,e.data.status?"success":"error","squad")}))})),i(document,"submit","[data-form='squads:filter']",(async function(e){e.preventDefault(),setTimeout((async()=>{let e=new FormData(this),t=new URLSearchParams(e).toString(),a=document.querySelector("[filtered-data]"),o=this.closest("[filter]").querySelector("[data-react='squads:filter']");x(),axios.post(`/get/squads/filter?${t}`).then((async e=>{o.insertAdjacentHTML("beforeend",'\n \n
\n remove_circle\n
\n
Public
\n
\n '),a.innerHTML=e.data,await j(),w()}))}),200)})),i(document,"input",'[data-action="squads:members,search"]',(async function(e){e.preventDefault(),clearTimeout(ae);let t=new FormData,a=document.find('[data-react="squads:members,search"]'),o=a.find("[append]"),n=this.value,r=this.closest("form").find("[confirm-submit-button]");if(n=n.trim(),!n)return a.setAttribute("react-hidden",""),void r.disable();t.append("query",this.value),ae=setTimeout((async()=>{axios.post("/get/squads/members",t).then((e=>{console.log(e),e.status&&(o.innerHTML=e.data.data,j(),a.hasAttribute("react-hidden")&&a.removeAttribute("react-hidden"))}))}),200)})),i(document,"click",'[data-action="squads:members,choose"] [option]',(async function(e){let t=this.dataset.id,a=document.find('[data-react="squads:members,search"]'),o=this.closest("form"),n=o.find('input[data-react="squads:members,choose"]'),r=o.find('[data-action="squads:members,search"]'),i=o.find("[confirm-submit-button]");n.value=t,a.setAttribute("react-hidden",""),r.value=this.dataset.name,i.enable()})),$(document).on("submit",'[data-form="profiles:edit"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.activate(),a.set_loading(),$.ajax({url:"/do/profile/edit",method:"POST",dataType:"JSON",data:t,processData:!1,contentType:!1,success:async function(e){console.log(e),e.status&&__current_user?.id?(await p(`/u/${__current_user.id}`),re()):(a.unset_loading(),a.unactivate()),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){a.unset_loading(),a.unactivate(),_(e)}})})),$(document).on("click","[editor-action=begin]",(async function(e){ne()}));const ne=async()=>{document.find("[editor-save]");let e=document.querySelectorAll("editor-overlay");if(0==__current_user.id)return;let t=new b(null,!1),a=document.find("mode-menu");a?.set_inactive(),await p("/editor"),e.forEach((e=>{e.activate()})),setTimeout((()=>{t.delete()}),400)},re=()=>{let e=document.find("[editor-save]"),t=document.querySelectorAll("editor-overlay"),a=document.find("mode-menu");t.forEach((e=>{e.unactivate()})),a?.unset_inactive(),e?.unset_loading()};$(document).on("submit",'[data-form="users:create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]"),o=new b(null,!1);x(),a.disable(),$.ajax({url:"/do/user/create",method:"POST",dataType:"JSON",data:t,processData:!1,contentType:!1,success:async function(e){console.log(e),z(),a.enable(),e.status?(o.append(X),__page.is_sounds_enabled&&await F("[bell-downtoup-audio]"),setTimeout((()=>{window.location.replace("/download")}),3e3)):(a.enable(),o.delete(),(new m).add(document.body,e.message,"error","user"))},error:function(){a.enable(),(new m).add(document.body,"An unknown error occured! Try again.","error","user")}})})),$(document).on("submit",'[data-form="users:remove"]',(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=new FormData(this);y(),t.disable(),$.ajax({url:"/do/user/remove",data:a,method:"POST",processData:!1,contentType:!1,success:function(e){v(),e.status?c():t.enable(),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){_(e)}})})),$(document).on("click",'[data-action="user:notifications,check"]',(function(e){this.closest("[menu-option]");let t=this.find("[notification-dot]"),a=document.find("[notifications-center]"),o=a.find("[append-notifications]"),n=this;if(this.is_activated())return L();x(),$.ajax({url:"/get/notifications",method:"GET",contentType:!1,processData:!1,success:function(e){z(),e.status&&(n.activate(),t.set_not_active(),a.activate(),o.innerHTML=e.data,j())},error:function(e){z()}})})),$(document).on("click",'[data-action="notifications:category"] [data-category]',(async function(e){if(this.is_activated())return;let t=this.dataset.category,a=this.closest("[notifications]"),o=a.find("[append-notifications]");a.querySelectorAll("[data-category]").forEach((e=>{e.unactivate()})),this.activate(),x(),$.ajax({url:`/get/notifications?category=${t}`,method:"GET",contentType:!1,processData:!1,success:function(e){z(),e.status&&(o.innerHTML=e.data,j())},error:function(e){z()}})})),$(document).on("submit",'[data-form="users:pin,create"]',(function(e){e.preventDefault();let t=this,a=new FormData(this),o=this.find("[submit-closest]"),n=document.find("[pinned]");o.disable(),x(),$.ajax({url:"/do/user/pin/create",data:a,method:"POST",contentType:!1,processData:!1,success:function(e){o.enable(),z(),e.status&&(t.setAttribute("data-form","users:pin,remove"),o.find("mi").innerHTML="link_off",o.find("p").innerHTML="Unpin from profile",n&&c()),(new m).add(document.body,e.message,e.status?"success":"error","user")},error:function(e){o.enable(),z(),(new m).add(document.body,e.statusText,"error","user")}})})),$(document).on("submit",'[data-form="users:pin,remove"]',(function(e){e.preventDefault();let t=this,a=new FormData(this),o=this.find("[submit-closest]"),n=this.closest("[pinned]");o.disable(),x(),$.ajax({url:"/do/user/pin/remove",data:a,method:"POST",contentType:!1,processData:!1,success:function(e){o.enable(),z(),e.status&&(t.setAttribute("data-form","users:pin,create"),o.find("mi").innerHTML="add_link",o.find("p").innerHTML="Pin to profile",n&&c()),(new m).add(document.body,e.message,e.status?"success":"error","user")},error:function(e){o.enable(),z(),(new m).add(document.body,e.statusText,"error","user")}})}));let ie=!1;$(document).on("submit","[data-form='orders:paypal,create']",(async function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]"),o=!1,n=!1,r=!1,i=new b(null,!1);a.disable(),x();let s=window.open("","buyppremiumplus","width=700,height=900,resizable=yes,scrollbars=yes");$.ajax({url:"/do/order/paypal/create",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){if(z(),e.status){let a=0,d=setInterval((()=>{if(s&&!s.closed)clearInterval(d),s.location.href=e.links[1].href;else if(!s.closed){if(!(a<10))return clearInterval(d),echo("Too many tries, failing..."),c(),s&&s.close(),(new m).add(document.body,"Opening a popup for the request has failed. Try again!","error","orders");echo("trying again..."),a++}}),500),l=e.id;t=new FormData,t.append("capture_url",e.links[3].href),t.append("id",l);let u=setInterval((()=>{$.ajax({url:"/do/order/paypal/capture",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){if(4==e.status)return clearInterval(u),ie=!0,void(s&&s.close());10==e.status?(n=!0,s&&s.close(),i.append(X),setTimeout((()=>{p("/my/premium"),k()}),2e3)):((8==e.status||s.closed)&&(o=!0,s&&s.close(),i.append('\n \n \n
\n'),setTimeout((()=>{c()}),2e3)),s.closed&&(r=!0)),(n||r||o)&&!ie&&(clearInterval(u),ie=!0,r||(new m).add(document.body,e.message,e.status?"success":"error","orders"))},error:function(e){return c(),(new m).add(document.body,e.statusText,"error","orders")}})}),1200)}else c(),s&&s.close(),(new m).add(document.body,e.message,"error","orders")},error:function(e){z(),c(),s&&s.close(),(new m).add(document.body,e.statusText,"error","orders")}})})),$(document).on("submit","[data-form='users:settings,premium,edit']",(function(e){e.preventDefault();let t=this.find("[submit-closest]"),a=this.hasAttribute("radio"),o=this.hasAttribute("responder");clearTimeout(__submit),!a&&t&&t.disable(),this.hasAttribute("delayed")&&(__submit_timeout=__submit_timeout_delay),x(),__submit=setTimeout((()=>{let e=new FormData(this);$.ajax({url:"/do/user/settings/premium/edit",data:e,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status&&("my"!=__page.current&&"u"!=__page.current||(c(),k())),!o&&e.status||(new m).add(document.body,e.message,e.status?"success":"error","premium")},error:function(e){z(),(new m).add(document.body,e.statusText,"error","premium")}})}),__submit_timeout),__submit_timeout=0}));const se=["delete_user","wipe_user","reset_password"];$(document).on("submit",'[data-form="authentications:create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this;a.disable(),$.ajax({url:"/do/authentication/create",method:"POST",data:t,processData:!1,contentType:!1,success:function(e){if(v(),a.enable(),console.log(e),e.status){let a=t.get("type");se.includes(a)&&E(`/get/authentication?type=${a}`),"signup"===a&&(p("/login"),(new m).add(document.body,e.message,"success"))}else(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){_(e)}})})),$(document).on("submit",'[data-form="authentications:validate"]',(function(e){e.preventDefault();let t=new FormData(this),a=this;a.disable(),$.ajax({url:"/do/authentication/validate",method:"POST",data:t,processData:!1,contentType:!1,success:function(e){if(v(),e.status){let e=t.get("type");"delete_user"==e?setTimeout((()=>{window.location.replace("/")}),3e3):"wipe_user"==e&&p("/my/game")}else a.enable();(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){_(e)}})})),$(document).on("click",'[data-action="authentications:remove"]',(function(e){let t=new FormData;t.append("token",this.dataset.token),this.disable(),$.ajax({url:"/do/authentication/remove",method:"POST",dataType:"JSON",data:t,processData:!1,contentType:!1,success:function(e){p("/login")},error:function(){p("/login")}})})),$(document).on("submit",'[data-form="threads:create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this.find("[submit-closest]");a.disable(),x(),$.ajax({url:"/do/thread/create",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status?p(`/squad/${e.squad_id}/thread/${e.thread_id}`):a.enable(),!e.has_error&&e.status||(new m).add(document.body,e.message,e.status?"success":"error","squad")},error:function(e){a.enable(),z(),(new m).add(document.body,e.statusText,"error","squad")}})})),$(document).on("submit",'[data-form="threads:post,create"]',(function(e){e.preventDefault();let t,a=new FormData(this),o=this.find("[submit-closest]"),n=document.find("[threads-container]"),r=document.find("[thread-post-count]");r&&(t=parseInt(r.innerHTML)),o.disable(),x(),$.ajax({url:"/do/thread/post/create",data:a,method:"POST",contentType:!1,processData:!1,success:function(e){z(),e.status?(n&&(n.removeAttribute("empty-objects"),n.insertAdjacentHTML("beforeend",e.data)),C(),j(),r&&(r.innerHTML=t+1)):o.enable(),!e.has_error&&e.status&&n||(new m).add(__app,e.message,e.status?"success":"error","squad")},error:function(e){o.enable(),z(),(new m).add(__app,e.statusText,"error","squad")}})})),$((function(){$(document).on("submit",'[data-form="vendors:users,create"]',(function(e){e.preventDefault();let t=new FormData(this),a=this,o=new b(null,!1);a.disable(),x(),$.ajax({url:"/do/connect/user/create",data:t,method:"POST",contentType:!1,processData:!1,success:async function(e){console.log(e),z(),e.status?(o.append(X),__page.is_sounds_enabled&&await F("[bell-downtoup-audio]"),setTimeout((()=>{window.location.replace("/download")}),3e3)):(a.enable(),o.delete(),__page.is_sounds_enabled&&await F("[bell-negative-audio]"),(new m).add(document.body,e.message,"error"))},error:function(e){z(),a.enable(),o.delete()}})})),$(document).on("click",'[data-action="vendors:login"]',(function(e){e.preventDefault();let t=this,a=new FormData,o=this.dataset.vendor;a.append("return_uri","login"),t.disable(),x(),$.ajax({url:`/do/connect/${o}/auth`,data:a,method:"POST",contentType:!1,processData:!1,success:function(e){console.log(e),e.status?window.location.replace(e.url):(z(),t.enable(),(new m).add(document.body,e.message,"error"))},error:function(e){z(),t.enable()}})}))})),$((function(){$(document).on("click",'[data-action="vendors:discord,auth,create"]',(function(e){e.preventDefault();let t=this;t.disable(),x(),$.ajax({url:"/do/connect/discord/auth",contentType:!1,processData:!1,success:function(e){console.log(e),e.status?window.location.replace(e.url):(z(),t.enable(),(new m).add(document.body,e.message,"error"))},error:function(e){z(),t.enable()}})})),$(document).on("submit",'[data-form="vendors:discord,remove"]',(function(e){e.preventDefault();let t=new FormData(this),a=this;a.disable(),x(),$.ajax({url:"/do/connect/discord/remove",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){console.log(e),e.status?c():(z(),a.enable()),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){z(),a.enable()}})}))})),$((function(){$(document).on("click",'[data-action="vendors:google,auth,create"]',(function(e){e.preventDefault();let t=this;t.disable(),x(),$.ajax({url:"/do/connect/google/auth",contentType:!1,processData:!1,success:function(e){console.log(e),e.status?window.location.replace(e.url):(z(),t.enable(),(new m).add(document.body,e.message,"error"))},error:function(e){z(),t.enable()}})})),$(document).on("submit",'[data-form="vendors:google,remove"]',(function(e){e.preventDefault();let t=new FormData(this),a=this;a.disable(),x(),$.ajax({url:"/do/connect/google/remove",data:t,method:"POST",contentType:!1,processData:!1,success:function(e){console.log(e),e.status?c():(z(),a.enable()),(new m).add(document.body,e.message,e.status?"success":"error")},error:function(e){z(),a.enable()}})}))})),$((function(){$(document).on("click",'[data-action="vendors:osu,auth,create"]',(function(e){e.preventDefault();let t=this;t.disable(),x(),$.ajax({url:"/do/connect/osu/auth",contentType:!1,processData:!1,success:function(e){console.log(e),e.status?window.location.replace(e.url):(z(),t.enable(),(new m).add(document.body,e.message,"error"))},error:function(e){z(),t.enable()}})}))}));var de=a(72),le=a.n(de),me=a(825),ce=a.n(me),pe=a(659),ue=a.n(pe),he=a(56),fe=a.n(he),be=a(540),ge=a.n(be),_e=a(113),ke=a.n(_e),xe=a(117),we={};we.styleTagTransform=ke(),we.setAttributes=fe(),we.insert=ue().bind(null,"head"),we.domAPI=ce(),we.insertStyleElement=ge(),le()(xe.A,we),xe.A&&xe.A.locals&&xe.A.locals;const ye=a(425);a(733),window.axios=ye,window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest"})()})();Not a member?
Join us now!
refresh
browse
Back to your journey's start
emoji_events
Rankings of all modes, updated weekly
web_stories
Scroll through our huge collection of beatmaps
stars
All the artists you can find through our beatmap collection
workspaces
Join a squad and enjoy playing together
cookie
Cookies?
Tasty! We feed them to your browser to offer you the best possible experience.
pageless
Nothing
This page is unavailable