mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-14 11:34:15 +00:00
2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[9,8],{13:function(t,e,n){"use strict";t.exports=function(){}},130:function(t,e,n){"use strict";function r(t){["interactive","complete"].includes(document.readyState)?t():document.addEventListener("DOMContentLoaded",t)}n.r(e),n.d(e,"default",function(){return r})},16:function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return o}),n.d(e,"e",function(){return a}),n.d(e,"c",function(){return i}),n.d(e,"g",function(){return u}),n.d(e,"h",function(){return c}),n.d(e,"f",function(){return l}),n.d(e,"d",function(){return s});var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},a=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},i=function(t,e){return e(window.confirm(t))},u=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},c=function(){return-1===window.navigator.userAgent.indexOf("Trident")},l=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},s=function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")}},17:function(t,e,n){"use strict";function m(t){return"/"===t.charAt(0)}function p(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}var a=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],o=t&&m(t),a=e&&m(e),i=o||a;if(t&&m(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var u=void 0;if(r.length){var c=r[r.length-1];u="."===c||".."===c||""===c}else u=!1;for(var l=0,s=r.length;0<=s;s--){var f=r[s];"."===f?p(r,s):".."===f?(p(r,s),l++):l&&(p(r,s),l--)}if(!i)for(;l--;l)r.unshift("..");!i||""===r[0]||r[0]&&m(r[0])||r.unshift("");var d=r.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d},c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var r=function n(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return Array.isArray(r)&&e.length===r.length&&e.every(function(t,e){return n(t,r[e])});var t=void 0===e?"undefined":c(e);if(t!==(void 0===r?"undefined":c(r)))return!1;if("object"!==t)return!1;var o=e.valueOf(),a=r.valueOf();if(o!==e||a!==r)return n(o,a);var i=Object.keys(e),u=Object.keys(r);return i.length===u.length&&i.every(function(t){return n(e[t],r[t])})},i=n(8);n.d(e,"a",function(){return o}),n.d(e,"b",function(){return l});var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(t,e,n,r){var o=void 0;"string"==typeof t?(o=Object(i.d)(t)).state=e:(void 0===(o=u({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},l=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&r(t.state,e.state)}},20:function(t,e,n){"use strict";t.exports=function(t,e,n,r,o,a,i,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],s=0;(c=new Error(e.replace(/%s/g,function(){return l[s++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}}},273:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toArray=function(t){if("string"==typeof t)return t.match(c.default)||[];throw new Error("A string is expected as input")},e.length=i,e.substring=u,e.substr=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2];if("string"!=typeof t)throw new Error("Input must be a string");var r=i(t);"number"!=typeof e&&(e=parseInt(e,10));if(r<=e)return"";e<0&&(e+=r);var o=void 0;o=void 0===n?r:("number"!=typeof n&&(n=parseInt(n,10)),0<=n?n+e:e);var a=t.match(c.default);return a?a.slice(e,o).join(""):""},e.limit=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:16,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"#",r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"right";if("string"!=typeof t||"number"!=typeof e)throw new Error("Invalid arguments specified");if(-1===["left","right"].indexOf(r))throw new Error("Pad position should be either left or right");"string"!=typeof n&&(n=String(n));var o=i(t);{if(e<o)return u(t,0,e);if(o<e){var a=n.repeat(e-o);return"left"===r?a+t:t+a}}return t},e.indexOf=function(t,e,n){if("string"!=typeof t)throw new Error("Input must be a string");if(""===t)return""===e?0:-1;n=parseInt(n,10),n=isNaN(n)?0:n,e=String(e);var r=t.match(c.default);if(n>=r.length)return""===e?r.length:-1;if(""===e)return n;var o=e.match(c.default),a=!1,i=void 0;for(i=n;i<r.length;i+=1){for(var u=0;u<o.length&&o[u]===r[i+u];)u+=1;if(u===o.length&&o[u-1]===r[i+u-1]){a=!0;break}}return a?i:-1};var r,o=n(403),c=(r=o)&&r.__esModule?r:{default:r};function i(t){if("string"!=typeof t)throw new Error("Input must be a string");var e=t.match(c.default);return null===e?0:e.length}function u(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2];if("string"!=typeof t)throw new Error("Input must be a string");("number"!=typeof e||e<0)&&(e=0),"number"==typeof n&&n<0&&(n=0);var r=t.match(c.default);return r?r.slice(e,n).join(""):""}},37:function(t,e,n){"use strict";var r=n(13),i=n.n(r);e.a=function(){var a=null,r=[];return{setPrompt:function(t){return i()(null==a,"A history supports only one prompt at a time"),a=t,function(){a===t&&(a=null)}},confirmTransitionTo:function(t,e,n,r){if(null!=a){var o="function"==typeof a?a(t,e):a;"string"==typeof o?"function"==typeof n?n(o,r):(i()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==o)}else r(!0)},appendListener:function(t){var e=!0,n=function(){e&&t.apply(void 0,arguments)};return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},notifyListeners:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})}}}},403:function(t,e){t.exports=/\ud83c[\udffb-\udfff](?=\ud83c[\udffb-\udfff])|(?:[^\ud800-\udfff][\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]?|[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0]|\ud83c[\udffb-\udfff])?)*/g},619:function(t,e,n){"use strict";n.r(e);n(66),n(130);var r=n(75).delegate;n(273).length;r(document,".webapp-btn","click",function(t){var e=t.target;return 0!==t.button||(window.location.href=e.href,!1)}),r(document,".status__content__spoiler-link","click",function(t){var e=t.target,n=e.parentNode.parentNode.querySelector(".e-content");return"block"===n.style.display?(n.style.display="none",e.parentNode.style.marginBottom=0):(n.style.display="block",e.parentNode.style.marginBottom=null),!1}),r(document,".modal-button","click",function(t){var e;t.preventDefault(),e="A"!==t.target.nodeName?t.target.parentNode.href:t.target.href,window.open(e,"mastodon-intent","width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes")});var o=function(r){return function(t){var e=t.target,n=e.getAttribute(r);"false"===e.getAttribute("data-autoplay")&&e.src!==n&&(e.src=n)}};r(document,"img#profile_page_avatar","mouseover",o("data-original")),r(document,"img#profile_page_avatar","mouseout",o("data-static")),r(document,"#account_header","change",function(t){var e=t.target,n=document.querySelector(".card .card__img img"),r=(e.files||[])[0],o=r?URL.createObjectURL(r):n.dataset.originalSrc;n.src=o})},66:function(t,e,n){"use strict";var r=n(13),A=n.n(r),o=n(20),T=n.n(o),D=n(17),L=n(8),P=n(37),R=n(16),M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_="popstate",H="hashchange",q=function(){try{return window.history.state||{}}catch(t){return{}}};e.a=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};T()(R.b,"Browser history needs a DOM");var u=window.history,c=Object(R.g)(),e=!Object(R.h)(),n=t.forceRefresh,l=void 0!==n&&n,r=t.getUserConfirmation,o=void 0===r?R.c:r,a=t.keyLength,i=void 0===a?6:a,s=t.basename?Object(L.g)(Object(L.a)(t.basename)):"",f=function(t){var e=t||{},n=e.key,r=e.state,o=window.location,a=o.pathname+o.search+o.hash;return A()(!s||Object(L.c)(a,s),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+s+'".'),s&&(a=Object(L.e)(a,s)),Object(D.a)(a,r,n)},d=function(){return Math.random().toString(36).substr(2,i)},m=Object(P.a)(),p=function(t){I(O,t),O.length=u.length,m.notifyListeners(O.location,O.action)},h=function(t){Object(R.d)(t)||y(f(t.state))},b=function(){y(f(q()))},v=!1,y=function(e){v?(v=!1,p()):m.confirmTransitionTo(e,"POP",o,function(t){t?p({action:"POP",location:e}):g(e)})},g=function(t){var e=O.location,n=S.indexOf(e.key);-1===n&&(n=0);var r=S.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(v=!0,k(o))},w=f(q()),S=[w.key],j=function(t){return s+Object(L.b)(t)},k=function(t){u.go(t)},E=0,x=function(t){1===(E+=t)?(Object(R.a)(window,_,h),e&&Object(R.a)(window,H,b)):0===E&&(Object(R.e)(window,_,h),e&&Object(R.e)(window,H,b))},C=!1,O={length:u.length,action:"POP",location:w,createHref:j,push:function(t,e){A()(!("object"===(void 0===t?"undefined":M(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=Object(D.a)(t,e,d(),O.location);m.confirmTransitionTo(i,"PUSH",o,function(t){if(t){var e=j(i),n=i.key,r=i.state;if(c)if(u.pushState({key:n,state:r},null,e),l)window.location.href=e;else{var o=S.indexOf(O.location.key),a=S.slice(0,-1===o?0:o+1);a.push(i.key),S=a,p({action:"PUSH",location:i})}else A()(void 0===r,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){A()(!("object"===(void 0===t?"undefined":M(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var a="REPLACE",i=Object(D.a)(t,e,d(),O.location);m.confirmTransitionTo(i,a,o,function(t){if(t){var e=j(i),n=i.key,r=i.state;if(c)if(u.replaceState({key:n,state:r},null,e),l)window.location.replace(e);else{var o=S.indexOf(O.location.key);-1!==o&&(S[o]=i.key),p({action:a,location:i})}else A()(void 0===r,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:k,goBack:function(){return k(-1)},goForward:function(){return k(1)},block:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=m.setPrompt(t);return C||(x(1),C=!0),function(){return C&&(C=!1,x(-1)),e()}},listen:function(t){var e=m.appendListener(t);return x(1),function(){x(-1),e()}}};return O}},75:function(t,e,n){var r,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 t;return(t=document.querySelector("meta[name=csp-nonce]"))&&t.content}}).call(this),function(){var r,n;n=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,y.matches=function(t,e){return null!=e.exclude?n.call(t,e.selector)&&!n.call(t,e.exclude):n.call(t,e)},r="_ujsData",y.getData=function(t,e){var n;return null!=(n=t[r])?n[e]:void 0},y.setData=function(t,e,n){return null==t[r]&&(t[r]={}),t[r][e]=n},y.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var n,r,o;n=y.$,o=y.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},r=y.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},y.CSRFProtection=function(t){var e;if(null!=(e=o()))return t.setRequestHeader("X-CSRF-Token",e)},y.refreshCSRFTokens=function(){var t,e;if(e=o(),t=r(),null!=e&&null!=t)return n('form input[name="'+t+'"]').forEach(function(t){return t.value=e})}}.call(this),function(){var o,e,a,n;a=y.matches,"function"!=typeof(o=window.CustomEvent)&&((o=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,n=o.prototype.preventDefault,o.prototype.preventDefault=function(){var t;return t=n.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=y.fire=function(t,e,n){var r;return r=new o(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(r),!r.defaultPrevented},y.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},y.delegate=function(t,n,e,r){return t.addEventListener(e,function(t){var e;for(e=t.target;e instanceof Element&&!a(e,n);)e=e.parentNode;if(e instanceof Element&&!1===r.call(e,t))return t.preventDefault(),t.stopPropagation()})}}.call(this),function(){var e,r,t,o,a,i;o=y.cspNonce,r=y.CSRFProtection,y.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"},y.ajax=function(n){var r;return n=a(n),r=t(n,function(){var t,e;return e=i(null!=(t=r.response)?t:r.responseText,r.getResponseHeader("Content-Type")),2===Math.floor(r.status/100)?"function"==typeof n.success&&n.success(e,r.statusText,r):"function"==typeof n.error&&n.error(e,r.statusText,r),"function"==typeof n.complete?n.complete(r,r.statusText):void 0}),!(null!=n.beforeSend&&!n.beforeSend(r,n))&&(r.readyState===XMLHttpRequest.OPENED?r.send(n.data):void 0)},a=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},t=function(t,e){var n;return(n=new XMLHttpRequest).open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),r(n),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},i=function(t,e){var n,r;if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(t){}else if(e.match(/\b(?:java|ecma)script\b/))(r=document.createElement("script")).setAttribute("nonce",o()),r.text=t,document.head.appendChild(r).parentNode.removeChild(r);else if(e.match(/\b(xml|html|svg)\b/)){n=new DOMParser,e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(t){}}return t},y.href=function(t){return t.href},y.isCrossDomain=function(t){var e,n;(e=document.createElement("a")).href=location.href,n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return t,!0}}}.call(this),function(){var o,a;o=y.matches,a=function(t){return Array.prototype.slice.call(t)},y.serializeElement=function(t,e){var n,r;return n=[t],o(t,"form")&&(n=a(t.elements)),r=[],n.forEach(function(e){if(e.name&&!e.disabled)return o(e,"select")?a(e.options).forEach(function(t){if(t.selected)return r.push({name:e.name,value:t.value})}):e.checked||-1===["radio","checkbox","submit"].indexOf(e.type)?r.push({name:e.name,value:e.value}):void 0}),e&&r.push(e),r.map(function(t){return null!=t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):t}).join("&")},y.formElements=function(t,e){return o(t,"form")?a(t.elements).filter(function(t){return o(t,e)}):a(t.querySelectorAll(e))}}.call(this),function(){var e,o,n;o=y.fire,n=y.stopEverything,y.handleConfirm=function(t){if(!e(this))return n(t)},e=function(t){var e,n,r;if(!(r=t.getAttribute("data-confirm")))return!0;if(e=!1,o(t,"confirm")){try{e=confirm(r)}catch(t){}n=o(t,"confirm:complete",[e])}return e&&n}}.call(this),function(){var n,r,o,a,i,u,e,c,l,s,f;l=y.matches,c=y.getData,s=y.setData,f=y.stopEverything,e=y.formElements,y.handleDisabledElement=function(t){if(this.disabled)return f(t)},y.enableElement=function(t){var e;return e=t instanceof Event?t.target:t,l(e,y.linkDisableSelector)?u(e):l(e,y.buttonDisableSelector)||l(e,y.formEnableSelector)?a(e):l(e,y.formSubmitSelector)?i(e):void 0},y.disableElement=function(t){var e;return e=t instanceof Event?t.target:t,l(e,y.linkDisableSelector)?o(e):l(e,y.buttonDisableSelector)||l(e,y.formDisableSelector)?n(e):l(e,y.formSubmitSelector)?r(e):void 0},o=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(s(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",f),s(t,"ujs:disabled",!0)},u=function(t){var e;return null!=(e=c(t,"ujs:enable-with"))&&(t.innerHTML=e,s(t,"ujs:enable-with",null)),t.removeEventListener("click",f),s(t,"ujs:disabled",null)},r=function(t){return e(t,y.formDisableSelector).forEach(n)},n=function(t){var e;return null!=(e=t.getAttribute("data-disable-with"))&&(l(t,"button")?(s(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(s(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,s(t,"ujs:disabled",!0)},i=function(t){return e(t,y.formEnableSelector).forEach(a)},a=function(t){var e;return null!=(e=c(t,"ujs:enable-with"))&&(l(t,"button")?t.innerHTML=e:t.value=e,s(t,"ujs:enable-with",null)),t.disabled=!1,s(t,"ujs:disabled",null)}}.call(this),function(){var u;u=y.stopEverything,y.handleMethod=function(t){var e,n,r,o,a,i;if(i=this.getAttribute("data-method"))return a=y.href(this),n=y.csrfToken(),e=y.csrfParam(),r=document.createElement("form"),o="<input name='_method' value='"+i+"' type='hidden' />",null==e||null==n||y.isCrossDomain(a)||(o+="<input name='"+e+"' value='"+n+"' type='hidden' />"),o+='<input type="submit" />',r.method="post",r.action=a,r.target=this.target,r.innerHTML=o,r.style.display="none",document.body.appendChild(r),r.querySelector('[type="submit"]').click(),u(t)}}.call(this),function(){var c,l,s,f,d,m,p,h,b,v=[].slice;m=y.matches,s=y.getData,h=y.setData,l=y.fire,b=y.stopEverything,c=y.ajax,f=y.isCrossDomain,p=y.serializeElement,d=function(t){var e;return null!=(e=t.getAttribute("data-remote"))&&"false"!==e},y.handleRemote=function(t){var e,n,r,o,a,i,u;return!d(o=this)||(l(o,"ajax:before")?(u=o.getAttribute("data-with-credentials"),r=o.getAttribute("data-type")||"script",m(o,y.formSubmitSelector)?(e=s(o,"ujs:submit-button"),a=s(o,"ujs:submit-button-formmethod")||o.method,i=s(o,"ujs:submit-button-formaction")||o.getAttribute("action")||location.href,"GET"===a.toUpperCase()&&(i=i.replace(/\?.*$/,"")),"multipart/form-data"===o.enctype?(n=new FormData(o),null!=e&&n.append(e.name,e.value)):n=p(o,e),h(o,"ujs:submit-button",null),h(o,"ujs:submit-button-formmethod",null),h(o,"ujs:submit-button-formaction",null)):n=m(o,y.buttonClickSelector)||m(o,y.inputChangeSelector)?(a=o.getAttribute("data-method"),i=o.getAttribute("data-url"),p(o,o.getAttribute("data-params"))):(a=o.getAttribute("data-method"),i=y.href(o),o.getAttribute("data-params")),c({type:a||"GET",url:i,data:n,dataType:r,beforeSend:function(t,e){return l(o,"ajax:beforeSend",[t,e])?l(o,"ajax:send",[t]):(l(o,"ajax:stopped"),!1)},success:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],l(o,"ajax:success",t)},error:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],l(o,"ajax:error",t)},complete:function(){var t;return t=1<=arguments.length?v.call(arguments,0):[],l(o,"ajax:complete",t)},crossDomain:f(i),withCredentials:null!=u&&"false"!==u}),b(t)):(l(o,"ajax:stopped"),!1))},y.formSubmitButtonClick=function(t){var e,n;if(n=(e=this).form)return e.name&&h(n,"ujs:submit-button",{name:e.name,value:e.value}),h(n,"ujs:formnovalidate-button",e.formNoValidate),h(n,"ujs:submit-button-formaction",e.getAttribute("formaction")),h(n,"ujs:submit-button-formmethod",e.getAttribute("formmethod"))},y.handleMetaClick=function(t){var e,n;if(n=(this.getAttribute("data-method")||"GET").toUpperCase(),e=this.getAttribute("data-params"),(t.metaKey||t.ctrlKey)&&"GET"===n&&!e)return t.stopImmediatePropagation()}}.call(this),function(){var t,r,e,n,o,a,i,u,c,l,s,f,d,m;if(a=y.fire,e=y.delegate,u=y.getData,t=y.$,m=y.refreshCSRFTokens,r=y.CSRFProtection,o=y.enableElement,n=y.disableElement,l=y.handleDisabledElement,c=y.handleConfirm,d=y.handleRemote,i=y.formSubmitButtonClick,s=y.handleMetaClick,f=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(t,e,n){if(!t.crossDomain)return r(n)})}y.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return t(y.formEnableSelector).forEach(function(t){if(u(t,"ujs:disabled"))return o(t)}),t(y.linkDisableSelector).forEach(function(t){if(u(t,"ujs:disabled"))return o(t)})}),e(document,y.linkDisableSelector,"ajax:complete",o),e(document,y.linkDisableSelector,"ajax:stopped",o),e(document,y.buttonDisableSelector,"ajax:complete",o),e(document,y.buttonDisableSelector,"ajax:stopped",o),e(document,y.linkClickSelector,"click",l),e(document,y.linkClickSelector,"click",c),e(document,y.linkClickSelector,"click",s),e(document,y.linkClickSelector,"click",n),e(document,y.linkClickSelector,"click",d),e(document,y.linkClickSelector,"click",f),e(document,y.buttonClickSelector,"click",l),e(document,y.buttonClickSelector,"click",c),e(document,y.buttonClickSelector,"click",n),e(document,y.buttonClickSelector,"click",d),e(document,y.inputChangeSelector,"change",l),e(document,y.inputChangeSelector,"change",c),e(document,y.inputChangeSelector,"change",d),e(document,y.formSubmitSelector,"submit",l),e(document,y.formSubmitSelector,"submit",c),e(document,y.formSubmitSelector,"submit",d),e(document,y.formSubmitSelector,"submit",function(t){return setTimeout(function(){return n(t)},13)}),e(document,y.formSubmitSelector,"ajax:send",n),e(document,y.formSubmitSelector,"ajax:complete",o),e(document,y.formInputClickSelector,"click",l),e(document,y.formInputClickSelector,"click",c),e(document,y.formInputClickSelector,"click",i),document.addEventListener("DOMContentLoaded",m),window._rails_loaded=!0},window.Rails===y&&a(document,"rails:attachBindings")&&y.start()}.call(this)}).call(this),t.exports?t.exports=y:void 0===(o="function"==typeof(r=y)?r.call(e,n,e,t):r)||(t.exports=o)}).call(this)},8:function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"f",function(){return o}),n.d(e,"c",function(){return a}),n.d(e,"e",function(){return i}),n.d(e,"g",function(){return u}),n.d(e,"d",function(){return c}),n.d(e,"b",function(){return l});var r=function(t){return"/"===t.charAt(0)?t:"/"+t},o=function(t){return"/"===t.charAt(0)?t.substr(1):t},a=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},i=function(t,e){return a(t,e)?t.substr(e.length):t},u=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},c=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var a=e.indexOf("?");return-1!==a&&(n=e.substr(a),e=e.substr(0,a)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},l=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}}},[[619,0]]]);
|
|
//# sourceMappingURL=public.js.map
|