tracman-server/static/js/.settings.bun.js

1 line
3.6 KiB
JavaScript

!function(e){function t(n){if(i[n])return i[n].exports;var u=i[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=62)}({62:function(e,t,i){"use strict";function n(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function u(e,t,i){$.get("/validate?"+e+"="+$(t).val()).done(function(e){$(t).val(e),i()})}$(function(){function e(e){function u(e){function u(){$("#email-help").is(":visible")&&"Unable to confirm unique "!==$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different email address. "):$("#slug-help").is(":visible")&&"Unable to confirm unique "!==$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different slug. "):"Unable to confirm unique "===$("#slug-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique slug with the server. This might not work... "):"Unable to confirm unique "===$("#email-help").text().substring(0,25)?$("#submit-group .main").prop("title","Unable to confirm unique email with the server. This might not work... "):$("#submit-group .main").prop("disabled",!1).prop("title","Click here to save your changes. ")}e&&$("#"+e+"-input").val()?("email"===!e||n($("#email-input").val()))&&$.ajax({url:"/validate?"+e+"="+$("#"+e+"-input").val(),type:"GET",statusCode:{200:function(){$("#"+e+"-help").hide(),"slug"===e?t=!1:"email"===e&&(i=!1),u()},400:function(){"slug"===e?t=!0:"email"===e&&(i=!0),$("#"+e+"-help").show().text("That "+e+" is already in use by another user. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to supply a different "+e+". ")}}}).error(function(){"slug"===e?t=void 0:"email"===e&&(i=void 0),$("#"+e+"-help").show().text("Unable to confirm unique "+e+". This might not work... "),u()}):u()}!function(e){var u=0;$("#slug-input").val()?(t||$("#slug-help").hide(),u>0?e():u++):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "),u>0?e():u++),$("#email-input").val()?n($("#email-input").val())?(i||$("#email-help").hide(),u>0?e():u++):($("#email-help").show().text("You must enter a valid email address. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a valid email address. "),u>0?e():u++):($("#email-help").show().text("An email is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter an email address. "),u>0?e():u++)}(function(){u(e)})}var t,i;$("#password").attr("href","/account/password?tz="+(new Date).getTimezoneOffset()),$("#delete").click(function(){confirm("Are you sure you want to delete your account? This CANNOT be undone! ")&&(window.location.href="/settings/delete")}),$("#slug-input").change(function(){$("#slug-input").val()?($("#slug-help").hide(),u("slugify","#slug-input",function(){e("slug")})):($("#slug-help").show().text("A slug is required. "),$("#submit-group .main").prop("disabled",!0).prop("title","You need to enter a slug. "))}),$("#email-input").change(function(){e("email")}),$("#name-input").change(function(){u("xss","#name-input",e)})})}});