Untitled diff

Created Diff never expires
The two files are identical
There is no difference to show between these two files
0 removals
Words removed0
Total words2193
Words removed (%)0.00
696 lines
0 additions
Words added0
Total words2193
Words added (%)0.00
696 lines
/******/ (function(modules) { // webpackBootstrap
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ // The module cache
/******/ var installedModules = {};
/******/ var installedModules = {};
/******/
/******/
/******/ // The require function
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ function __webpack_require__(moduleId) {
/******/
/******/
/******/ // Check if module is in cache
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ i: moduleId,
/******/ l: false,
/******/ l: false,
/******/ exports: {}
/******/ exports: {}
/******/ };
/******/ };
/******/
/******/
/******/ // Execute the module function
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/
/******/ // Flag the module as loaded
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ module.l = true;
/******/
/******/
/******/ // Return the exports of the module
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ return module.exports;
/******/ }
/******/ }
/******/
/******/
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ __webpack_require__.m = modules;
/******/
/******/
/******/ // expose the module cache
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ __webpack_require__.c = installedModules;
/******/
/******/
/******/ // define getter function for harmony exports
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ }
/******/ };
/******/ };
/******/
/******/
/******/ // define __esModule on exports
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ };
/******/
/******/
/******/ // create a fake namespace object
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ return ns;
/******/ };
/******/ };
/******/
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ return getter;
/******/ };
/******/ };
/******/
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/
/******/ // __webpack_public_path__
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/packs/";
/******/ __webpack_require__.p = "/packs/";
/******/
/******/
/******/
/******/
/******/ // Load entry module and return exports
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./app/javascript/packs/application.js");
/******/ return __webpack_require__(__webpack_require__.s = "./app/javascript/packs/application.js");
/******/ })
/******/ })
/************************************************************************/
/************************************************************************/
/******/ ({
/******/ ({


/***/ "./app/javascript/b.js":
/***/ "./app/javascript/b.js":
/*!*****************************!*\
/*!*****************************!*\
!*** ./app/javascript/b.js ***!
!*** ./app/javascript/b.js ***!
\*****************************/
\*****************************/
/*! exports provided: Thing */
/*! exports provided: Thing */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/***/ (function(module, __webpack_exports__, __webpack_require__) {


"use strict";
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Thing", function() { return Thing; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Thing", function() { return Thing; });
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }


console.log('b loaded');
console.log('b loaded');
var Thing = function Thing() {
var Thing = function Thing() {
_classCallCheck(this, Thing);
_classCallCheck(this, Thing);
};
};


/***/ }),
/***/ }),


/***/ "./app/javascript/packs/application.js":
/***/ "./app/javascript/packs/application.js":
/*!*********************************************!*\
/*!*********************************************!*\
!*** ./app/javascript/packs/application.js ***!
!*** ./app/javascript/packs/application.js ***!
\*********************************************/
\*********************************************/
/*! no exports provided */
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/***/ (function(module, __webpack_exports__, __webpack_require__) {


"use strict";
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../b */ "./app/javascript/b.js");
/* harmony import */ var _b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../b */ "./app/javascript/b.js");
// This file is automatically compiled by Webpack, along with any other files
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
// that code so it'll be compiled.
// import "core-js/stable";
// import "core-js/stable";
// import "regenerator-runtime/runtime";
// import "regenerator-runtime/runtime";
//
//
__webpack_require__(/*! @rails/ujs */ "./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js").start(); // require("turbolinks").start()
__webpack_require__(/*! @rails/ujs */ "./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js").start(); // require("turbolinks").start()
// require("channels")
// require("channels")
//
//
// require("@rails/activestorage").start();
// require("@rails/activestorage").start();
// import { DirectUpload } from "@rails/activestorage"
// import { DirectUpload } from "@rails/activestorage"
// console.log(DirectUpload);
// console.log(DirectUpload);
// console.log(new DirectUpload('file', 'url'));
// console.log(new DirectUpload('file', 'url'));
//
//




console.log('hi');
console.log('hi');


console.log(_b__WEBPACK_IMPORTED_MODULE_0__["Thing"]); //
console.log(_b__WEBPACK_IMPORTED_MODULE_0__["Thing"]); //
// Uncomment to copy all static images under ../images to the output folder and reference
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
// or the `imagePath` JavaScript helper below.
//
//
// const images = require.context('../images', true)
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
// const imagePath = (name) => images(name, true)


/***/ }),
/***/ }),


/***/ "./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js":
/***/ "./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js":
/*!******************************************************************!*\
/*!******************************************************************!*\
!*** ./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js ***!
!*** ./node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js ***!
\******************************************************************/
\******************************************************************/
/*! no static exports found */
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {


var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
Unobtrusive JavaScript
Unobtrusive JavaScript
https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
Released under the MIT license
Released under the MIT license
*/
*/


(function() {
(function() {
var context = this;
var context = this;


(function() {
(function() {
(function() {
(function() {
this.Rails = {
this.Rails = {
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',
buttonClickSelector: {
buttonClickSelector: {
selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',
selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',
exclude: 'form button'
exclude: 'form button'
},
},
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
formSubmitSelector: 'form',
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])',
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',
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',
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])',
fileInputSelector: 'input[name][type=file]:not([disabled])',
linkDisableSelector: 'a[data-disable-with], a[data-disable]',
linkDisableSelector: 'a[data-disable-with], a[data-disable]',
buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'
buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'
};
};


}).call(this);
}).call(this);
}).call(context);
}).call(context);


var Rails = context.Rails;
var Rails = context.Rails;


(function() {
(function() {
(function() {
(function() {
var cspNonce;
var cspNonce;


cspNonce = Rails.cspNonce = function() {
cspNonce = Rails.cspNonce = function() {
var meta;
var meta;
meta = document.querySelector('meta[name=csp-nonce]');
meta = document.querySelector('meta[name=csp-nonce]');
return meta && meta.content;
return meta && meta.content;
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var expando, m;
var expando, m;


m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;
m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;


Rails.matches = function(element, selector) {
Rails.matches = function(element, selector) {
if (selector.exclude != null) {
if (selector.exclude != null) {
return m.call(element, selector.selector) && !m.call(element, selector.exclude);
return m.call(element, selector.selector) && !m.call(element, selector.exclude);
} else {
} else {
return m.call(element, selector);
return m.call(element, selector);
}
}
};
};


expando = '_ujsData';
expando = '_ujsData';


Rails.getData = function(element, key) {
Rails.getData = function(element, key) {
var ref;
var ref;
return (ref = element[expando]) != null ? ref[key] : void 0;
return (ref = element[expando]) != null ? ref[key] : void 0;
};
};


Rails.setData = function(element, key, value) {
Rails.setData = function(element, key, value) {
if (element[expando] == null) {
if (element[expando] == null) {
element[expando] = {};
element[expando] = {};
}
}
return element[expando][key] = value;
return element[expando][key] = value;
};
};


Rails.$ = function(selector) {
Rails.$ = function(selector) {
return Array.prototype.slice.call(document.querySelectorAll(selector));
return Array.prototype.slice.call(document.querySelectorAll(selector));
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var $, csrfParam, csrfToken;
var $, csrfParam, csrfToken;


$ = Rails.$;
$ = Rails.$;


csrfToken = Rails.csrfToken = function() {
csrfToken = Rails.csrfToken = function() {
var meta;
var meta;
meta = document.querySelector('meta[name=csrf-token]');
meta = document.querySelector('meta[name=csrf-token]');
return meta && meta.content;
return meta && meta.content;
};
};


csrfParam = Rails.csrfParam = function() {
csrfParam = Rails.csrfParam = function() {
var meta;
var meta;
meta = document.querySelector('meta[name=csrf-param]');
meta = document.querySelector('meta[name=csrf-param]');
return meta && meta.content;
return meta && meta.content;
};
};


Rails.CSRFProtection = function(xhr) {
Rails.CSRFProtection = function(xhr) {
var token;
var token;
token = csrfToken();
token = csrfToken();
if (token != null) {
if (token != null) {
return xhr.setRequestHeader('X-CSRF-Token', token);
return xhr.setRequestHeader('X-CSRF-Token', token);
}
}
};
};


Rails.refreshCSRFTokens = function() {
Rails.refreshCSRFTokens = function() {
var param, token;
var param, token;
token = csrfToken();
token = csrfToken();
param = csrfParam();
param = csrfParam();
if ((token != null) && (param != null)) {
if ((token != null) && (param != null)) {
return $('form input[name="' + param + '"]').forEach(function(input) {
return $('form input[name="' + param + '"]').forEach(function(input) {
return input.value = token;
return input.value = token;
});
});
}
}
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var CustomEvent, fire, matches, preventDefault;
var CustomEvent, fire, matches, preventDefault;


matches = Rails.matches;
matches = Rails.matches;


CustomEvent = window.CustomEvent;
CustomEvent = window.CustomEvent;


if (typeof CustomEvent !== 'function') {
if (typeof CustomEvent !== 'function') {
CustomEvent = function(event, params) {
CustomEvent = function(event, params) {
var evt;
var evt;
evt = document.createEvent('CustomEvent');
evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
return evt;
};
};
CustomEvent.prototype = window.Event.prototype;
CustomEvent.prototype = window.Event.prototype;
preventDefault = CustomEvent.prototype.preventDefault;
preventDefault = CustomEvent.prototype.preventDefault;
CustomEvent.prototype.preventDefault = function() {
CustomEvent.prototype.preventDefault = function() {
var result;
var result;
result = preventDefault.call(this);
result = preventDefault.call(this);
if (this.cancelable && !this.defaultPrevented) {
if (this.cancelable && !this.defaultPrevented) {
Object.defineProperty(this, 'defaultPrevented', {
Object.defineProperty(this, 'defaultPrevented', {
get: function() {
get: function() {
return true;
return true;
}
}
});
});
}
}
return result;
return result;
};
};
}
}


fire = Rails.fire = function(obj, name, data) {
fire = Rails.fire = function(obj, name, data) {
var event;
var event;
event = new CustomEvent(name, {
event = new CustomEvent(name, {
bubbles: true,
bubbles: true,
cancelable: true,
cancelable: true,
detail: data
detail: data
});
});
obj.dispatchEvent(event);
obj.dispatchEvent(event);
return !event.defaultPrevented;
return !event.defaultPrevented;
};
};


Rails.stopEverything = function(e) {
Rails.stopEverything = function(e) {
fire(e.target, 'ujs:everythingStopped');
fire(e.target, 'ujs:everythingStopped');
e.preventDefault();
e.preventDefault();
e.stopPropagation();
e.stopPropagation();
return e.stopImmediatePropagation();
return e.stopImmediatePropagation();
};
};


Rails.delegate = function(element, selector, eventType, handler) {
Rails.delegate = function(element, selector, eventType, handler) {
return element.addEventListener(eventType, function(e) {
return element.addEventListener(eventType, function(e) {
var target;
var target;
target = e.target;
target = e.target;
while (!(!(target instanceof Element) || matches(target, selector))) {
while (!(!(target instanceof Element) || matches(target, selector))) {
target = target.parentNode;
target = target.parentNode;
}
}
if (target instanceof Element && handler.call(target, e) === false) {
if (target instanceof Element && handler.call(target, e) === false) {
e.preventDefault();
e.preventDefault();
return e.stopPropagation();
return e.stopPropagation();
}
}
});
});
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;
var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;


cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;
cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;


AcceptHeaders = {
AcceptHeaders = {
'*': '*/*',
'*': '*/*',
text: 'text/plain',
text: 'text/plain',
html: 'text/html',
html: 'text/html',
xml: 'application/xml, text/xml',
xml: 'application/xml, text/xml',
json: 'application/json, text/javascript',
json: 'application/json, text/javascript',
script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'
script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'
};
};


Rails.ajax = function(options) {
Rails.ajax = function(options) {
var xhr;
var xhr;
options = prepareOptions(options);
options = prepareOptions(options);
xhr = createXHR(options, function() {
xhr = createXHR(options, function() {
var ref, response;
var ref, response;
response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));
response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));
if (Math.floor(xhr.status / 100) === 2) {
if (Math.floor(xhr.status / 100) === 2) {
if (typeof options.success === "function") {
if (typeof options.success === "function") {
options.success(response, xhr.statusText, xhr);
options.success(response, xhr.statusText, xhr);
}
}
} else {
} else {
if (typeof options.error === "function") {
if (typeof options.error === "function") {
options.error(response, xhr.statusText, xhr);
options.error(response, xhr.statusText, xhr);
}
}
}
}
return typeof options.complete === "function" ? options.complete(xhr, xhr.statusText) : void 0;
return typeof options.complete === "function" ? options.complete(xhr, xhr.statusText) : void 0;
});
});
if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {
if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {
return false;
return false;
}
}
if (xhr.readyState === XMLHttpRequest.OPENED) {
if (xhr.readyState === XMLHttpRequest.OPENED) {
return xhr.send(options.data);
return xhr.send(options.data);
}
}
};
};


prepareOptions = function(options) {
prepareOptions = function(options) {
options.url = options.url || location.href;
options.url = options.url || location.href;
options.type = options.type.toUpperCase();
options.type = options.type.toUpperCase();
if (options.type === 'GET' && options.data) {
if (options.type === 'GET' && options.data) {
if (options.url.indexOf('?') < 0) {
if (options.url.indexOf('?') < 0) {
options.url += '?' + options.data;
options.url += '?' + options.data;
} else {
} else {
options.url += '&' + options.data;
options.url += '&' + options.data;
}
}
}
}
if (AcceptHeaders[options.dataType] == null) {
if (AcceptHeaders[options.dataType] == null) {
options.dataType = '*';
options.dataType = '*';
}
}
options.accept = AcceptHeaders[options.dataType];
options.accept = AcceptHeaders[options.dataType];
if (options.dataType !== '*') {
if (options.dataType !== '*') {
options.accept += ', */*; q=0.01';
options.accept += ', */*; q=0.01';
}
}
return options;
return options;
};
};


createXHR = function(options, done) {
createXHR = function(options, done) {
var xhr;
var xhr;
xhr = new XMLHttpRequest();
xhr = new XMLHttpRequest();
xhr.open(options.type, options.url, true);
xhr.open(options.type, options.url, true);
xhr.setRequestHeader('Accept', options.accept);
xhr.setRequestHeader('Accept', options.accept);
if (typeof options.data === 'string') {
if (typeof options.data === 'string') {
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
}
}
if (!options.crossDomain) {
if (!options.crossDomain) {
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
}
}
CSRFProtection(xhr);
CSRFProtection(xhr);
xhr.withCredentials = !!options.withCredentials;
xhr.withCredentials = !!options.withCredentials;
xhr.onreadystatechange = function() {
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
if (xhr.readyState === XMLHttpRequest.DONE) {
return done(xhr);
return done(xhr);
}
}
};
};
return xhr;
return xhr;
};
};


processResponse = function(response, type) {
processResponse = function(response, type) {
var parser, script;
var parser, script;
if (typeof response === 'string' && typeof type === 'string') {
if (typeof response === 'string' && typeof type === 'string') {
if (type.match(/\bjson\b/)) {
if (type.match(/\bjson\b/)) {
try {
try {
response = JSON.parse(response);
response = JSON.parse(response);
} catch (error) {}
} catch (error) {}
} else if (type.match(/\b(?:java|ecma)script\b/)) {
} else if (type.match(/\b(?:java|ecma)script\b/)) {
script = document.createElement('script');
script = document.createElement('script');
script.setAttribute('nonce', cspNonce());
script.setAttribute('nonce', cspNonce());
script.text = response;
script.text = response;
document.head.appendChild(script).parentNode.removeChild(script);
document.head.appendChild(script).parentNode.removeChild(script);
} else if (type.match(/\bxml\b/)) {
} else if (type.match(/\bxml\b/)) {
parser = new DOMParser();
parser = new DOMParser();
type = type.replace(/;.+/, '');
type = type.replace(/;.+/, '');
try {
try {
response = parser.parseFromString(response, type);
response = parser.parseFromString(response, type);
} catch (error) {}
} catch (error) {}
}
}
}
}
return response;
return response;
};
};


Rails.href = function(element) {
Rails.href = function(element) {
return element.href;
return element.href;
};
};


Rails.isCrossDomain = function(url) {
Rails.isCrossDomain = function(url) {
var e, originAnchor, urlAnchor;
var e, originAnchor, urlAnchor;
originAnchor = document.createElement('a');
originAnchor = document.createElement('a');
originAnchor.href = location.href;
originAnchor.href = location.href;
urlAnchor = document.createElement('a');
urlAnchor = document.createElement('a');
try {
try {
urlAnchor.href = url;
urlAnchor.href = url;
return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));
return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));
} catch (error) {
} catch (error) {
e = error;
e = error;
return true;
return true;
}
}
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var matches, toArray;
var matches, toArray;


matches = Rails.matches;
matches = Rails.matches;


toArray = function(e) {
toArray = function(e) {
return Array.prototype.slice.call(e);
return Array.prototype.slice.call(e);
};
};


Rails.serializeElement = function(element, additionalParam) {
Rails.serializeElement = function(element, additionalParam) {
var inputs, params;
var inputs, params;
inputs = [element];
inputs = [element];
if (matches(element, 'form')) {
if (matches(element, 'form')) {
inputs = toArray(element.elements);
inputs = toArray(element.elements);
}
}
params = [];
params = [];
inputs.forEach(function(input) {
inputs.forEach(function(input) {
if (!input.name || input.disabled) {
if (!input.name || input.disabled) {
return;
return;
}
}
if (matches(input, 'select')) {
if (matches(input, 'select')) {
return toArray(input.options).forEach(function(option) {
return toArray(input.options).forEach(function(option) {
if (option.selected) {
if (option.selected) {
return params.push({
return params.push({
name: input.name,
name: input.name,
value: option.value
value: option.value
});
});
}
}
});
});
} else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {
} else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {
return params.push({
return params.push({
name: input.name,
name: input.name,
value: input.value
value: input.value
});
});
}
}
});
});
if (additionalParam) {
if (additionalParam) {
params.push(additionalParam);
params.push(additionalParam);
}
}
return params.map(function(param) {
return params.map(function(param) {
if (param.name != null) {
if (param.name != null) {
return (encodeURIComponent(param.name)) + "=" + (encodeURIComponent(param.value));
return (encodeURIComponent(param.name)) + "=" + (encodeURIComponent(param.value));
} else {
} else {
return param;
return param;
}
}
}).join('&');
}).join('&');
};
};


Rails.formElements = function(form, selector) {
Rails.formElements = function(form, selector) {
if (matches(form, 'form')) {
if (matches(form, 'form')) {
return toArray(form.elements).filter(function(el) {
return toArray(form.elements).filter(function(el) {
return matches(el, selector);
return matches(el, selector);
});
});
} else {
} else {
return toArray(form.querySelectorAll(selector));
return toArray(form.querySelectorAll(selector));
}
}
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var allowAction, fire, stopEverything;
var allowAction, fire, stopEverything;


fire = Rails.fire, stopEverything = Rails.stopEverything;
fire = Rails.fire, stopEverything = Rails.stopEverything;


Rails.handleConfirm = function(e) {
Rails.handleConfirm = function(e) {
if (!allowAction(this)) {
if (!allowAction(this)) {
return stopEverything(e);
return stopEverything(e);
}
}
};
};


Rails.confirm = function(message, element) {
Rails.confirm = function(message, element) {
return confirm(message);
return confirm(message);
};
};


allowAction = function(element) {
allowAction = function(element) {
var answer, callback, message;
var answer, callback, message;
message = element.getAttribute('data-confirm');
message = element.getAttribute('data-confirm');
if (!message) {
if (!message) {
return true;
return true;
}
}
answer = false;
answer = false;
if (fire(element, 'confirm')) {
if (fire(element, 'confirm')) {
try {
try {
answer = Rails.confirm(message, element);
answer = Rails.confirm(message, element);
} catch (error) {}
} catch (error) {}
callback = fire(element, 'confirm:complete', [answer]);
callback = fire(element, 'confirm:complete', [answer]);
}
}
return answer && callback;
return answer && callback;
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;
var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;


matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;
matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;


Rails.handleDisabledElement = function(e) {
Rails.handleDisabledElement = function(e) {
var element;
var element;
element = this;
element = this;
if (element.disabled) {
if (element.disabled) {
return stopEverything(e);
return stopEverything(e);
}
}
};
};


Rails.enableElement = function(e) {
Rails.enableElement = function(e) {
var element;
var element;
if (e instanceof Event) {
if (e instanceof Event) {
if (isXhrRedirect(e)) {
if (isXhrRedirect(e)) {
return;
return;
}
}
element = e.target;
element = e.target;
} else {
} else {
element = e;
element = e;
}
}
if (matches(element, Rails.linkDisableSelector)) {
if (matches(element, Rails.linkDisableSelector)) {
return enableLinkElement(element);
return enableLinkElement(element);
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {
return enableFormElement(element);
return enableFormElement(element);
} else if (matches(element, Rails.formSubmitSelector)) {
} else if (matches(element, Rails.formSubmitSelector)) {
return enableFormElements(element);
return enableFormElements(element);
}
}
};
};


Rails.disableElement = function(e) {
Rails.disableElement = function(e) {
var element;
var element;
element = e instanceof Event ? e.target : e;
element = e instanceof Event ? e.target : e;
if (matches(element, Rails.linkDisableSelector)) {
if (matches(element, Rails.linkDisableSelector)) {
return disableLinkElement(element);
return disableLinkElement(element);
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {
return disableFormElement(element);
return disableFormElement(element);
} else if (matches(element, Rails.formSubmitSelector)) {
} else if (matches(element, Rails.formSubmitSelector)) {
return disableFormElements(element);
return disableFormElements(element);
}
}
};
};


disableLinkElement = function(element) {
disableLinkElement = function(element) {
var replacement;
var replacement;
if (getData(element, 'ujs:disabled')) {
if (getData(element, 'ujs:disabled')) {
return;
return;
}
}
replacement = element.getAttribute('data-disable-with');
replacement = element.getAttribute('data-disable-with');
if (replacement != null) {
if (replacement != null) {
setData(element, 'ujs:enable-with', element.innerHTML);
setData(element, 'ujs:enable-with', element.innerHTML);
element.innerHTML = replacement;
element.innerHTML = replacement;
}
}
element.addEventListener('click', stopEverything);
element.addEventListener('click', stopEverything);
return setData(element, 'ujs:disabled', true);
return setData(element, 'ujs:disabled', true);
};
};


enableLinkElement = function(element) {
enableLinkElement = function(element) {
var originalText;
var originalText;
originalText = getData(element, 'ujs:enable-with');
originalText = getData(element, 'ujs:enable-with');
if (originalText != null) {
if (originalText != null) {
element.innerHTML = originalText;
element.innerHTML = originalText;
setData(element, 'ujs:enable-with', null);
setData(element, 'ujs:enable-with', null);
}
}
element.removeEventListener('click', stopEverything);
element.removeEventListener('click', stopEverything);
return setData(element, 'ujs:disabled', null);
return setData(element, 'ujs:disabled', null);
};
};


disableFormElements = function(form) {
disableFormElements = function(form) {
return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);
return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);
};
};


disableFormElement = function(element) {
disableFormElement = function(element) {
var replacement;
var replacement;
if (getData(element, 'ujs:disabled')) {
if (getData(element, 'ujs:disabled')) {
return;
return;
}
}
replacement = element.getAttribute('data-disable-with');
replacement = element.getAttribute('data-disable-with');
if (replacement != null) {
if (replacement != null) {
if (matches(element, 'button')) {
if (matches(element, 'button')) {
setData(element, 'ujs:enable-with', element.innerHTML);
setData(element, 'ujs:enable-with', element.innerHTML);
element.innerHTML = replacement;
element.innerHTML = replacement;
} else {
} else {
setData(element, 'ujs:enable-with', element.value);
setData(element, 'ujs:enable-with', element.value);
element.value = replacement;
element.value = replacement;
}
}
}
}
element.disabled = true;
element.disabled = true;
return setData(element, 'ujs:disabled', true);
return setData(element, 'ujs:disabled', true);
};
};


enableFormElements = function(form) {
enableFormElements = function(form) {
return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);
return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);
};
};


enableFormElement = function(element) {
enableFormElement = function(element) {
var originalText;
var originalText;
originalText = getData(element, 'ujs:enable-with');
originalText = getData(element, 'ujs:enable-with');
if (originalText != null) {
if (originalText != null) {
if (matches(element, 'button')) {
if (matches(element, 'button')) {
element.innerHTML = originalText;
element.innerHTML = originalText;
} else {
} else {
element.value = originalText;
element.value = originalText;
}
}
setData(element, 'ujs:enable-with', null);
setData(element, 'ujs:enable-with', null);
}
}
element.disabled = false;
element.disabled = false;
return setData(element, 'ujs:disabled', null);
return setData(element, 'ujs:disabled', null);
};
};


isXhrRedirect = function(event) {
isXhrRedirect = function(event) {
var ref, xhr;
var ref, xhr;
xhr = (ref = event.detail) != null ? ref[0] : void 0;
xhr = (ref = event.detail) != null ? ref[0] : void 0;
return (xhr != null ? xhr.getResponseHeader("X-Xhr-Redirect") : void 0) != null;
return (xhr != null ? xhr.getResponseHeader("X-Xhr-Redirect") : void 0) != null;
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var stopEverything;
var stopEverything;


stopEverything = Rails.stopEverything;
stopEverything = Rails.stopEverything;


Rails.handleMethod = function(e) {
Rails.handleMethod = function(e) {
var csrfParam, csrfToken, form, formContent, href, link, method;
var csrfParam, csrfToken, form, formContent, href, link, method;
link = this;
link = this;
method = link.getAttribute('data-method');
method = link.getAttribute('data-method');
if (!method) {
if (!method) {
return;
return;
}
}
href = Rails.href(link);
href = Rails.href(link);
csrfToken = Rails.csrfToken();
csrfToken = Rails.csrfToken();
csrfParam = Rails.csrfParam();
csrfParam = Rails.csrfParam();
form = document.createElement('form');
form = document.createElement('form');
formContent = "<input name='_method' value='" + method + "' type='hidden' />";
formContent = "<input name='_method' value='" + method + "' type='hidden' />";
if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {
if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {
formContent += "<input name='" + csrfParam + "' value='" + csrfToken + "' type='hidden' />";
formContent += "<input name='" + csrfParam + "' value='" + csrfToken + "' type='hidden' />";
}
}
formContent += '<input type="submit" />';
formContent += '<input type="submit" />';
form.method = 'post';
form.method = 'post';
form.action = href;
form.action = href;
form.target = link.target;
form.target = link.target;
form.innerHTML = formContent;
form.innerHTML = formContent;
form.style.display = 'none';
form.style.display = 'none';
document.body.appendChild(form);
document.body.appendChild(form);
form.querySelector('[type="submit"]').click();
form.querySelector('[type="submit"]').click();
return stopEverything(e);
return stopEverything(e);
};
};


}).call(this);
}).call(this);
(function() {
(function() {
var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,
var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,
slice = [].slice;
slice = [].slice;


matches = Rails.matches, getData = Rails.getData, setData = Rails.set
matches = Rails.matches, getData = Rails.getData, setData = Rails.set