X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fcore%2Fadmin.js;h=000669e56d4213c3cbe3a8c898f8b4f60d81c8f5;hb=9f711ddcf84bdb5a5680e1b55afa83768014906d;hp=2d511662b6442a1ab80ff4fc2881162a41b5c6c2;hpb=ffb4eb9779ddd28ecee84c06e8dc58f4a4daaa38;p=akkoma
diff --git a/priv/static/packs/core/admin.js b/priv/static/packs/core/admin.js
index 2d511662b..000669e56 100644
--- a/priv/static/packs/core/admin.js
+++ b/priv/static/packs/core/admin.js
@@ -1,2 +1,2 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{75:function(e,t,n){var a,o;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var y=this.Rails;(function(){(function(){y.cspNonce=function(){var e;return(e=document.querySelector("meta[name=csp-nonce]"))&&e.content}}).call(this),function(){var a,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,y.matches=function(e,t){return null!=t.exclude?n.call(e,t.selector)&&!n.call(e,t.exclude):n.call(e,t)},a="_ujsData",y.getData=function(e,t){var n;return null!=(n=e[a])?n[t]:void 0},y.setData=function(e,t,n){return null==e[a]&&(e[a]={}),e[a][t]=n},y.$=function(e){return Array.prototype.slice.call(document.querySelectorAll(e))}}.call(this),function(){var n,a,o;n=y.$,o=y.csrfToken=function(){var e;return(e=document.querySelector("meta[name=csrf-token]"))&&e.content},a=y.csrfParam=function(){var e;return(e=document.querySelector("meta[name=csrf-param]"))&&e.content},y.CSRFProtection=function(e){var t;if(null!=(t=o()))return e.setRequestHeader("X-CSRF-Token",t)},y.refreshCSRFTokens=function(){var e,t;if(t=o(),e=a(),null!=t&&null!=e)return n('form input[name="'+e+'"]').forEach(function(e){return e.value=t})}}.call(this),function(){var o,t,r,n;r=y.matches,"function"!=typeof(o=window.CustomEvent)&&((o=function(e,t){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}).prototype=window.Event.prototype,n=o.prototype.preventDefault,o.prototype.preventDefault=function(){var e;return e=n.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),e}),t=y.fire=function(e,t,n){var a;return a=new o(t,{bubbles:!0,cancelable:!0,detail:n}),e.dispatchEvent(a),!a.defaultPrevented},y.stopEverything=function(e){return t(e.target,"ujs:everythingStopped"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},y.delegate=function(e,n,t,a){return e.addEventListener(t,function(e){var t;for(t=e.target;t instanceof Element&&!r(t,n);)t=t.parentNode;if(t instanceof Element&&!1===a.call(t,e))return e.preventDefault(),e.stopPropagation()})}}.call(this),function(){var t,a,e,o,r,i;o=y.cspNonce,a=y.CSRFProtection,y.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},y.ajax=function(n){var a;return n=r(n),a=e(n,function(){var e,t;return t=i(null!=(e=a.response)?e:a.responseText,a.getResponseHeader("Content-Type")),2===Math.floor(a.status/100)?"function"==typeof n.success&&n.success(t,a.statusText,a):"function"==typeof n.error&&n.error(t,a.statusText,a),"function"==typeof n.complete?n.complete(a,a.statusText):void 0}),!(null!=n.beforeSend&&!n.beforeSend(a,n))&&(a.readyState===XMLHttpRequest.OPENED?a.send(n.data):void 0)},r=function(e){return e.url=e.url||location.href,e.type=e.type.toUpperCase(),"GET"===e.type&&e.data&&(e.url.indexOf("?")<0?e.url+="?"+e.data:e.url+="&"+e.data),null==t[e.dataType]&&(e.dataType="*"),e.accept=t[e.dataType],"*"!==e.dataType&&(e.accept+=", */*; q=0.01"),e},e=function(e,t){var n;return(n=new XMLHttpRequest).open(e.type,e.url,!0),n.setRequestHeader("Accept",e.accept),"string"==typeof e.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.crossDomain||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),a(n),n.withCredentials=!!e.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return t(n)},n},i=function(e,t){var n,a;if("string"==typeof e&&"string"==typeof t)if(t.match(/\bjson\b/))try{e=JSON.parse(e)}catch(e){}else if(t.match(/\b(?:java|ecma)script\b/))(a=document.createElement("script")).setAttribute("nonce",o()),a.text=e,document.head.appendChild(a).parentNode.removeChild(a);else if(t.match(/\b(xml|html|svg)\b/)){n=new DOMParser,t=t.replace(/;.+/,"");try{e=n.parseFromString(e,t)}catch(e){}}return e},y.href=function(e){return e.href},y.isCrossDomain=function(e){var t,n;(t=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=e,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(e){return e,!0}}}.call(this),function(){var o,r;o=y.matches,r=function(e){return Array.prototype.slice.call(e)},y.serializeElement=function(e,t){var n,a;return n=[e],o(e,"form")&&(n=r(e.elements)),a=[],n.forEach(function(t){if(t.name&&!t.disabled)return o(t,"select")?r(t.options).forEach(function(e){if(e.selected)return a.push({name:t.name,value:e.value})}):t.checked||-1===["radio","checkbox","submit"].indexOf(t.type)?a.push({name:t.name,value:t.value}):void 0}),t&&a.push(t),a.map(function(e){return null!=e.name?encodeURIComponent(e.name)+"="+encodeURIComponent(e.value):e}).join("&")},y.formElements=function(e,t){return o(e,"form")?r(e.elements).filter(function(e){return o(e,t)}):r(e.querySelectorAll(t))}}.call(this),function(){var t,o,n;o=y.fire,n=y.stopEverything,y.handleConfirm=function(e){if(!t(this))return n(e)},t=function(e){var t,n,a;if(!(a=e.getAttribute("data-confirm")))return!0;if(t=!1,o(e,"confirm")){try{t=confirm(a)}catch(e){}n=o(e,"confirm:complete",[t])}return t&&n}}.call(this),function(){var n,a,o,r,i,l,t,c,u,s,d;u=y.matches,c=y.getData,s=y.setData,d=y.stopEverything,t=y.formElements,y.handleDisabledElement=function(e){if(this.disabled)return d(e)},y.enableElement=function(e){var t;return t=e instanceof Event?e.target:e,u(t,y.linkDisableSelector)?l(t):u(t,y.buttonDisableSelector)||u(t,y.formEnableSelector)?r(t):u(t,y.formSubmitSelector)?i(t):void 0},y.disableElement=function(e){var t;return t=e instanceof Event?e.target:e,u(t,y.linkDisableSelector)?o(t):u(t,y.buttonDisableSelector)||u(t,y.formDisableSelector)?n(t):u(t,y.formSubmitSelector)?a(t):void 0},o=function(e){var t;return null!=(t=e.getAttribute("data-disable-with"))&&(s(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t),e.addEventListener("click",d),s(e,"ujs:disabled",!0)},l=function(e){var t;return null!=(t=c(e,"ujs:enable-with"))&&(e.innerHTML=t,s(e,"ujs:enable-with",null)),e.removeEventListener("click",d),s(e,"ujs:disabled",null)},a=function(e){return t(e,y.formDisableSelector).forEach(n)},n=function(e){var t;return null!=(t=e.getAttribute("data-disable-with"))&&(u(e,"button")?(s(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t):(s(e,"ujs:enable-with",e.value),e.value=t)),e.disabled=!0,s(e,"ujs:disabled",!0)},i=function(e){return t(e,y.formEnableSelector).forEach(r)},r=function(e){var t;return null!=(t=c(e,"ujs:enable-with"))&&(u(e,"button")?e.innerHTML=t:e.value=t,s(e,"ujs:enable-with",null)),e.disabled=!1,s(e,"ujs:disabled",null)}}.call(this),function(){var l;l=y.stopEverything,y.handleMethod=function(e){var t,n,a,o,r,i;if(i=this.getAttribute("data-method"))return r=y.href(this),n=y.csrfToken(),t=y.csrfParam(),a=document.createElement("form"),o="",null==t||null==n||y.isCrossDomain(r)||(o+=""),o+='',a.method="post",a.action=r,a.target=this.target,a.innerHTML=o,a.style.display="none",document.body.appendChild(a),a.querySelector('[type="submit"]').click(),l(e)}}.call(this),function(){var c,u,s,d,m,f,p,b,h,v=[].slice;f=y.matches,s=y.getData,b=y.setData,u=y.fire,h=y.stopEverything,c=y.ajax,d=y.isCrossDomain,p=y.serializeElement,m=function(e){var t;return null!=(t=e.getAttribute("data-remote"))&&"false"!==t},y.handleRemote=function(e){var t,n,a,o,r,i,l;return!m(o=this)||(u(o,"ajax:before")?(l=o.getAttribute("data-with-credentials"),a=o.getAttribute("data-type")||"script",f(o,y.formSubmitSelector)?(t=s(o,"ujs:submit-button"),r=s(o,"ujs:submit-button-formmethod")||o.method,i=s(o,"ujs:submit-button-formaction")||o.getAttribute("action")||location.href,"GET"===r.toUpperCase()&&(i=i.replace(/\?.*$/,"")),"multipart/form-data"===o.enctype?(n=new FormData(o),null!=t&&n.append(t.name,t.value)):n=p(o,t),b(o,"ujs:submit-button",null),b(o,"ujs:submit-button-formmethod",null),b(o,"ujs:submit-button-formaction",null)):n=f(o,y.buttonClickSelector)||f(o,y.inputChangeSelector)?(r=o.getAttribute("data-method"),i=o.getAttribute("data-url"),p(o,o.getAttribute("data-params"))):(r=o.getAttribute("data-method"),i=y.href(o),o.getAttribute("data-params")),c({type:r||"GET",url:i,data:n,dataType:a,beforeSend:function(e,t){return u(o,"ajax:beforeSend",[e,t])?u(o,"ajax:send",[e]):(u(o,"ajax:stopped"),!1)},success:function(){var e;return e=1<=arguments.length?v.call(arguments,0):[],u(o,"ajax:success",e)},error:function(){var e;return e=1<=arguments.length?v.call(arguments,0):[],u(o,"ajax:error",e)},complete:function(){var e;return e=1<=arguments.length?v.call(arguments,0):[],u(o,"ajax:complete",e)},crossDomain:d(i),withCredentials:null!=l&&"false"!==l}),h(e)):(u(o,"ajax:stopped"),!1))},y.formSubmitButtonClick=function(e){var t,n;if(n=(t=this).form)return t.name&&b(n,"ujs:submit-button",{name:t.name,value:t.value}),b(n,"ujs:formnovalidate-button",t.formNoValidate),b(n,"ujs:submit-button-formaction",t.getAttribute("formaction")),b(n,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},y.handleMetaClick=function(e){var t,n;if(n=(this.getAttribute("data-method")||"GET").toUpperCase(),t=this.getAttribute("data-params"),(e.metaKey||e.ctrlKey)&&"GET"===n&&!t)return e.stopImmediatePropagation()}}.call(this),function(){var e,a,t,n,o,r,i,l,c,u,s,d,m,f;if(r=y.fire,t=y.delegate,l=y.getData,e=y.$,f=y.refreshCSRFTokens,a=y.CSRFProtection,o=y.enableElement,n=y.disableElement,u=y.handleDisabledElement,c=y.handleConfirm,m=y.handleRemote,i=y.formSubmitButtonClick,s=y.handleMetaClick,d=y.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=y,jQuery.ajaxPrefilter(function(e,t,n){if(!e.crossDomain)return a(n)})}y.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return e(y.formEnableSelector).forEach(function(e){if(l(e,"ujs:disabled"))return o(e)}),e(y.linkDisableSelector).forEach(function(e){if(l(e,"ujs:disabled"))return o(e)})}),t(document,y.linkDisableSelector,"ajax:complete",o),t(document,y.linkDisableSelector,"ajax:stopped",o),t(document,y.buttonDisableSelector,"ajax:complete",o),t(document,y.buttonDisableSelector,"ajax:stopped",o),t(document,y.linkClickSelector,"click",u),t(document,y.linkClickSelector,"click",c),t(document,y.linkClickSelector,"click",s),t(document,y.linkClickSelector,"click",n),t(document,y.linkClickSelector,"click",m),t(document,y.linkClickSelector,"click",d),t(document,y.buttonClickSelector,"click",u),t(document,y.buttonClickSelector,"click",c),t(document,y.buttonClickSelector,"click",n),t(document,y.buttonClickSelector,"click",m),t(document,y.inputChangeSelector,"change",u),t(document,y.inputChangeSelector,"change",c),t(document,y.inputChangeSelector,"change",m),t(document,y.formSubmitSelector,"submit",u),t(document,y.formSubmitSelector,"submit",c),t(document,y.formSubmitSelector,"submit",m),t(document,y.formSubmitSelector,"submit",function(e){return setTimeout(function(){return n(e)},13)}),t(document,y.formSubmitSelector,"ajax:send",n),t(document,y.formSubmitSelector,"ajax:complete",o),t(document,y.formInputClickSelector,"click",u),t(document,y.formInputClickSelector,"click",c),t(document,y.formInputClickSelector,"click",i),document.addEventListener("DOMContentLoaded",f),window._rails_loaded=!0},window.Rails===y&&r(document,"rails:attachBindings")&&y.start()}.call(this)}).call(this),e.exports?e.exports=y:void 0===(o="function"==typeof(a=y)?a.call(t,n,t,e):a)||(e.exports=o)}).call(this)},826:function(e,t,n){"use strict";n.r(t);var a=n(75),o='.batch-checkbox input[type="checkbox"]';Object(a.delegate)(document,"#batch_checkbox_all","change",function(e){var t=e.target;[].forEach.call(document.querySelectorAll(o),function(e){e.checked=t.checked})}),Object(a.delegate)(document,o,"change",function(){var e=document.querySelector("#batch_checkbox_all");e&&(e.checked=[].every.call(document.querySelectorAll(o),function(e){return e.checked}),e.indeterminate=!e.checked&&[].some.call(document.querySelectorAll(o),function(e){return e.checked}))}),Object(a.delegate)(document,".media-spoiler-show-button","click",function(){[].forEach.call(document.querySelectorAll("button.media-spoiler"),function(e){e.click()})}),Object(a.delegate)(document,".media-spoiler-hide-button","click",function(){[].forEach.call(document.querySelectorAll(".spoiler-button.spoiler-button--visible button"),function(e){e.click()})}),Object(a.delegate)(document,"#domain_block_severity","change",function(e){var t=e.target,n=document.querySelector(".input.with_label.domain_block_reject_media"),a=document.querySelector(".input.with_label.domain_block_reject_reports");n&&(n.style.display="suspend"===t.value?"none":"block"),a&&(a.style.display="suspend"===t.value?"none":"block")})}},[[826,0]]]);
+(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{116:function(e,t,n){"use strict";function a(e){["interactive","complete"].includes(document.readyState)?e():document.addEventListener("DOMContentLoaded",e)}n.r(t),n.d(t,"default",(function(){return a}))},61:function(e,t,n){var a,o;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var r=this.Rails;(function(){(function(){var e;e=null,r.loadCSPNonce=function(){var t;return e=null!=(t=document.querySelector("meta[name=csp-nonce]"))?t.content:void 0},r.cspNonce=function(){return null!=e?e:r.loadCSPNonce()}}).call(this),function(){var e;e=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,r.matches=function(t,n){return null!=n.exclude?e.call(t,n.selector)&&!e.call(t,n.exclude):e.call(t,n)},r.getData=function(e,t){var n;return null!=(n=e._ujsData)?n[t]:void 0},r.setData=function(e,t,n){return null==e._ujsData&&(e._ujsData={}),e._ujsData[t]=n},r.$=function(e){return Array.prototype.slice.call(document.querySelectorAll(e))}}.call(this),function(){var e,t,n;e=r.$,n=r.csrfToken=function(){var e;return(e=document.querySelector("meta[name=csrf-token]"))&&e.content},t=r.csrfParam=function(){var e;return(e=document.querySelector("meta[name=csrf-param]"))&&e.content},r.CSRFProtection=function(e){var t;if(null!=(t=n()))return e.setRequestHeader("X-CSRF-Token",t)},r.refreshCSRFTokens=function(){var a,o;if(o=n(),a=t(),null!=o&&null!=a)return e('form input[name="'+a+'"]').forEach((function(e){return e.value=o}))}}.call(this),function(){var e,t,n,a;n=r.matches,"function"!=typeof(e=window.CustomEvent)&&((e=function(e,t){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}).prototype=window.Event.prototype,a=e.prototype.preventDefault,e.prototype.preventDefault=function(){var e;return e=a.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),e}),t=r.fire=function(t,n,a){var o;return o=new e(n,{bubbles:!0,cancelable:!0,detail:a}),t.dispatchEvent(o),!o.defaultPrevented},r.stopEverything=function(e){return t(e.target,"ujs:everythingStopped"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()},r.delegate=function(e,t,a,o){return e.addEventListener(a,(function(e){var a;for(a=e.target;a instanceof Element&&!n(a,t);)a=a.parentNode;if(a instanceof Element&&!1===o.call(a,e))return e.preventDefault(),e.stopPropagation()}))}}.call(this),function(){var e,t,n,a,o,i;a=r.cspNonce,t=r.CSRFProtection,r.fire,e={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},r.ajax=function(e){var t;return e=o(e),t=n(e,(function(){var n,a;return a=i(null!=(n=t.response)?n:t.responseText,t.getResponseHeader("Content-Type")),2===Math.floor(t.status/100)?"function"==typeof e.success&&e.success(a,t.statusText,t):"function"==typeof e.error&&e.error(a,t.statusText,t),"function"==typeof e.complete?e.complete(t,t.statusText):void 0})),!(null!=e.beforeSend&&!e.beforeSend(t,e))&&(t.readyState===XMLHttpRequest.OPENED?t.send(e.data):void 0)},o=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),"GET"===t.type&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),null==e[t.dataType]&&(t.dataType="*"),t.accept=e[t.dataType],"*"!==t.dataType&&(t.accept+=", */*; q=0.01"),t},n=function(e,n){var a;return(a=new XMLHttpRequest).open(e.type,e.url,!0),a.setRequestHeader("Accept",e.accept),"string"==typeof e.data&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),e.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t(a),a.withCredentials=!!e.withCredentials,a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE)return n(a)},a},i=function(e,t){var n,o;if("string"==typeof e&&"string"==typeof t)if(t.match(/\bjson\b/))try{e=JSON.parse(e)}catch(e){}else if(t.match(/\b(?:java|ecma)script\b/))(o=document.createElement("script")).setAttribute("nonce",a()),o.text=e,document.head.appendChild(o).parentNode.removeChild(o);else if(t.match(/\b(xml|html|svg)\b/)){n=new DOMParser,t=t.replace(/;.+/,"");try{e=n.parseFromString(e,t)}catch(e){}}return e},r.href=function(e){return e.href},r.isCrossDomain=function(e){var t,n;(t=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=e,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(e){return e,!0}}}.call(this),function(){var e,t;e=r.matches,t=function(e){return Array.prototype.slice.call(e)},r.serializeElement=function(n,a){var o,r;return o=[n],e(n,"form")&&(o=t(n.elements)),r=[],o.forEach((function(n){if(n.name&&!n.disabled&&!e(n,"fieldset[disabled] *"))return e(n,"select")?t(n.options).forEach((function(e){if(e.selected)return r.push({name:n.name,value:e.value})})):n.checked||-1===["radio","checkbox","submit"].indexOf(n.type)?r.push({name:n.name,value:n.value}):void 0})),a&&r.push(a),r.map((function(e){return null!=e.name?encodeURIComponent(e.name)+"="+encodeURIComponent(e.value):e})).join("&")},r.formElements=function(n,a){return e(n,"form")?t(n.elements).filter((function(t){return e(t,a)})):t(n.querySelectorAll(a))}}.call(this),function(){var e,t,n;t=r.fire,n=r.stopEverything,r.handleConfirm=function(t){if(!e(this))return n(t)},r.confirm=function(e,t){return confirm(e)},e=function(e){var n,a,o;if(!(o=e.getAttribute("data-confirm")))return!0;if(n=!1,t(e,"confirm")){try{n=r.confirm(o,e)}catch(e){}a=t(e,"confirm:complete",[n])}return n&&a}}.call(this),function(){var e,t,n,a,o,i,l,c,u,s,d,m;s=r.matches,c=r.getData,d=r.setData,m=r.stopEverything,l=r.formElements,r.handleDisabledElement=function(e){if(this,this.disabled)return m(e)},r.enableElement=function(e){var t;if(e instanceof Event){if(u(e))return;t=e.target}else t=e;return s(t,r.linkDisableSelector)?i(t):s(t,r.buttonDisableSelector)||s(t,r.formEnableSelector)?a(t):s(t,r.formSubmitSelector)?o(t):void 0},r.disableElement=function(a){var o;return o=a instanceof Event?a.target:a,s(o,r.linkDisableSelector)?n(o):s(o,r.buttonDisableSelector)||s(o,r.formDisableSelector)?e(o):s(o,r.formSubmitSelector)?t(o):void 0},n=function(e){var t;if(!c(e,"ujs:disabled"))return null!=(t=e.getAttribute("data-disable-with"))&&(d(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t),e.addEventListener("click",m),d(e,"ujs:disabled",!0)},i=function(e){var t;return null!=(t=c(e,"ujs:enable-with"))&&(e.innerHTML=t,d(e,"ujs:enable-with",null)),e.removeEventListener("click",m),d(e,"ujs:disabled",null)},t=function(t){return l(t,r.formDisableSelector).forEach(e)},e=function(e){var t;if(!c(e,"ujs:disabled"))return null!=(t=e.getAttribute("data-disable-with"))&&(s(e,"button")?(d(e,"ujs:enable-with",e.innerHTML),e.innerHTML=t):(d(e,"ujs:enable-with",e.value),e.value=t)),e.disabled=!0,d(e,"ujs:disabled",!0)},o=function(e){return l(e,r.formEnableSelector).forEach(a)},a=function(e){var t;return null!=(t=c(e,"ujs:enable-with"))&&(s(e,"button")?e.innerHTML=t:e.value=t,d(e,"ujs:enable-with",null)),e.disabled=!1,d(e,"ujs:disabled",null)},u=function(e){var t,n;return null!=(null!=(n=null!=(t=e.detail)?t[0]:void 0)?n.getResponseHeader("X-Xhr-Redirect"):void 0)}}.call(this),function(){var e;e=r.stopEverything,r.handleMethod=function(t){var n,a,o,i,l,c;if(this,c=this.getAttribute("data-method"))return l=r.href(this),a=r.csrfToken(),n=r.csrfParam(),o=document.createElement("form"),i="",null==n||null==a||r.isCrossDomain(l)||(i+=""),i+='',o.method="post",o.action=l,o.target=this.target,o.innerHTML=i,o.style.display="none",document.body.appendChild(o),o.querySelector('[type="submit"]').click(),e(t)}}.call(this),function(){var e,t,n,a,o,i,l,c,u,s=[].slice;i=r.matches,n=r.getData,c=r.setData,t=r.fire,u=r.stopEverything,e=r.ajax,a=r.isCrossDomain,l=r.serializeElement,o=function(e){var t;return null!=(t=e.getAttribute("data-remote"))&&"false"!==t},r.handleRemote=function(d){var m,f,b,p,h,v,y;return!o(p=this)||(t(p,"ajax:before")?(y=p.getAttribute("data-with-credentials"),b=p.getAttribute("data-type")||"script",i(p,r.formSubmitSelector)?(m=n(p,"ujs:submit-button"),h=n(p,"ujs:submit-button-formmethod")||p.method,v=n(p,"ujs:submit-button-formaction")||p.getAttribute("action")||location.href,"GET"===h.toUpperCase()&&(v=v.replace(/\?.*$/,"")),"multipart/form-data"===p.enctype?(f=new FormData(p),null!=m&&f.append(m.name,m.value)):f=l(p,m),c(p,"ujs:submit-button",null),c(p,"ujs:submit-button-formmethod",null),c(p,"ujs:submit-button-formaction",null)):i(p,r.buttonClickSelector)||i(p,r.inputChangeSelector)?(h=p.getAttribute("data-method"),v=p.getAttribute("data-url"),f=l(p,p.getAttribute("data-params"))):(h=p.getAttribute("data-method"),v=r.href(p),f=p.getAttribute("data-params")),e({type:h||"GET",url:v,data:f,dataType:b,beforeSend:function(e,n){return t(p,"ajax:beforeSend",[e,n])?t(p,"ajax:send",[e]):(t(p,"ajax:stopped"),!1)},success:function(){var e;return e=1<=arguments.length?s.call(arguments,0):[],t(p,"ajax:success",e)},error:function(){var e;return e=1<=arguments.length?s.call(arguments,0):[],t(p,"ajax:error",e)},complete:function(){var e;return e=1<=arguments.length?s.call(arguments,0):[],t(p,"ajax:complete",e)},crossDomain:a(v),withCredentials:null!=y&&"false"!==y}),u(d)):(t(p,"ajax:stopped"),!1))},r.formSubmitButtonClick=function(e){var t;if(this,t=this.form)return this.name&&c(t,"ujs:submit-button",{name:this.name,value:this.value}),c(t,"ujs:formnovalidate-button",this.formNoValidate),c(t,"ujs:submit-button-formaction",this.getAttribute("formaction")),c(t,"ujs:submit-button-formmethod",this.getAttribute("formmethod"))},r.preventInsignificantClick=function(e){var t,n,a;if(this,a=(this.getAttribute("data-method")||"GET").toUpperCase(),t=this.getAttribute("data-params"),n=(e.metaKey||e.ctrlKey)&&"GET"===a&&!t,null!=e.button&&0!==e.button||n)return e.stopImmediatePropagation()}}.call(this),function(){var e,t,n,a,o,i,l,c,u,s,d,m,f,b,p;if(i=r.fire,n=r.delegate,c=r.getData,e=r.$,p=r.refreshCSRFTokens,t=r.CSRFProtection,f=r.loadCSPNonce,o=r.enableElement,a=r.disableElement,s=r.handleDisabledElement,u=r.handleConfirm,b=r.preventInsignificantClick,m=r.handleRemote,l=r.formSubmitButtonClick,d=r.handleMethod,"undefined"!=typeof jQuery&&null!==jQuery&&null!=jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=r,jQuery.ajaxPrefilter((function(e,n,a){if(!e.crossDomain)return t(a)}))}r.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){return e(r.formEnableSelector).forEach((function(e){if(c(e,"ujs:disabled"))return o(e)})),e(r.linkDisableSelector).forEach((function(e){if(c(e,"ujs:disabled"))return o(e)}))})),n(document,r.linkDisableSelector,"ajax:complete",o),n(document,r.linkDisableSelector,"ajax:stopped",o),n(document,r.buttonDisableSelector,"ajax:complete",o),n(document,r.buttonDisableSelector,"ajax:stopped",o),n(document,r.linkClickSelector,"click",b),n(document,r.linkClickSelector,"click",s),n(document,r.linkClickSelector,"click",u),n(document,r.linkClickSelector,"click",a),n(document,r.linkClickSelector,"click",m),n(document,r.linkClickSelector,"click",d),n(document,r.buttonClickSelector,"click",b),n(document,r.buttonClickSelector,"click",s),n(document,r.buttonClickSelector,"click",u),n(document,r.buttonClickSelector,"click",a),n(document,r.buttonClickSelector,"click",m),n(document,r.inputChangeSelector,"change",s),n(document,r.inputChangeSelector,"change",u),n(document,r.inputChangeSelector,"change",m),n(document,r.formSubmitSelector,"submit",s),n(document,r.formSubmitSelector,"submit",u),n(document,r.formSubmitSelector,"submit",m),n(document,r.formSubmitSelector,"submit",(function(e){return setTimeout((function(){return a(e)}),13)})),n(document,r.formSubmitSelector,"ajax:send",a),n(document,r.formSubmitSelector,"ajax:complete",o),n(document,r.formInputClickSelector,"click",b),n(document,r.formInputClickSelector,"click",s),n(document,r.formInputClickSelector,"click",u),n(document,r.formInputClickSelector,"click",l),document.addEventListener("DOMContentLoaded",p),document.addEventListener("DOMContentLoaded",f),window._rails_loaded=!0},window.Rails===r&&i(document,"rails:attachBindings")&&r.start()}.call(this)}).call(this),e.exports?e.exports=r:void 0===(o="function"==typeof(a=r)?a.call(t,n,t,e):a)||(e.exports=o)}).call(this)},942:function(e,t,n){"use strict";n.r(t);var a=n(61),o=n(116),r='.batch-checkbox input[type="checkbox"]';Object(a.delegate)(document,"#batch_checkbox_all","change",(function(e){var t=e.target;[].forEach.call(document.querySelectorAll(r),(function(e){e.checked=t.checked}))})),Object(a.delegate)(document,r,"change",(function(){var e=document.querySelector("#batch_checkbox_all");e&&(e.checked=[].every.call(document.querySelectorAll(r),(function(e){return e.checked})),e.indeterminate=!e.checked&&[].some.call(document.querySelectorAll(r),(function(e){return e.checked})))})),Object(a.delegate)(document,".media-spoiler-show-button","click",(function(){[].forEach.call(document.querySelectorAll("button.media-spoiler"),(function(e){e.click()}))})),Object(a.delegate)(document,".media-spoiler-hide-button","click",(function(){[].forEach.call(document.querySelectorAll(".spoiler-button.spoiler-button--visible button"),(function(e){e.click()}))})),Object(a.delegate)(document,".filter-subset--with-select select","change",(function(e){e.target.form.submit()}));var i=function(e){var t=document.querySelector(".input.with_label.domain_block_reject_media"),n=document.querySelector(".input.with_label.domain_block_reject_reports");t&&(t.style.display="suspend"===e.value?"none":"block"),n&&(n.style.display="suspend"===e.value?"none":"block")};Object(a.delegate)(document,"#domain_block_severity","change",(function(e){var t=e.target;return i(t)}));var l=function(e){var t=document.querySelector("#form_admin_settings_bootstrap_timeline_accounts");t&&(t.disabled=!e.checked,e.checked?t.parentElement.classList.remove("disabled"):t.parentElement.classList.add("disabled"))};Object(a.delegate)(document,"#form_admin_settings_enable_bootstrap_timeline_accounts","change",(function(e){var t=e.target;return l(t)})),Object(o.default)((function(){var e=document.getElementById("domain_block_severity");e&&i(e);var t=document.getElementById("form_admin_settings_enable_bootstrap_timeline_accounts");t&&l(t)}))}},[[942,0]]]);
//# sourceMappingURL=admin.js.map
\ No newline at end of file