/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ 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)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 0); /******/ }) /************************************************************************/ /******/ ({ /***/ "../deps/phoenix/priv/static/phoenix.js": /*!**********************************************!*\ !*** ../deps/phoenix/priv/static/phoenix.js ***! \**********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n!function (e, t) {\n \"object\" == ( false ? undefined : _typeof(exports)) && \"object\" == ( false ? undefined : _typeof(module)) ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;\n}(this, function () {\n return function (e) {\n var t = {};\n\n function n(i) {\n if (t[i]) return t[i].exports;\n var o = t[i] = {\n i: i,\n l: !1,\n exports: {}\n };\n return e[i].call(o.exports, o, o.exports, n), o.l = !0, o.exports;\n }\n\n return n.m = e, n.c = t, n.d = function (e, t, i) {\n n.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: i\n });\n }, n.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, n.t = function (e, t) {\n if (1 & t && (e = n(e)), 8 & t) return e;\n if (4 & t && \"object\" == _typeof(e) && e && e.__esModule) return e;\n var i = Object.create(null);\n if (n.r(i), Object.defineProperty(i, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var o in e) {\n n.d(i, o, function (t) {\n return e[t];\n }.bind(null, o));\n }\n return i;\n }, n.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e[\"default\"];\n } : function () {\n return e;\n };\n return n.d(t, \"a\", t), t;\n }, n.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, n.p = \"\", n(n.s = 0);\n }([function (e, t, n) {\n (function (t) {\n e.exports = t.Phoenix = n(2);\n }).call(this, n(1));\n }, function (e, t) {\n var n;\n\n n = function () {\n return this;\n }();\n\n try {\n n = n || new Function(\"return this\")();\n } catch (e) {\n \"object\" == (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) && (n = window);\n }\n\n e.exports = n;\n }, function (e, t, n) {\n \"use strict\";\n\n function i(e) {\n return function (e) {\n if (Array.isArray(e)) return a(e);\n }(e) || function (e) {\n if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);\n }(e) || s(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n\n function o(e) {\n return (o = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (e) {\n return _typeof(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : _typeof(e);\n })(e);\n }\n\n function r(e, t) {\n return function (e) {\n if (Array.isArray(e)) return e;\n }(e) || function (e, t) {\n if (\"undefined\" == typeof Symbol || !(Symbol.iterator in Object(e))) return;\n var n = [],\n i = !0,\n o = !1,\n r = void 0;\n\n try {\n for (var s, a = e[Symbol.iterator](); !(i = (s = a.next()).done) && (n.push(s.value), !t || n.length !== t); i = !0) {\n ;\n }\n } catch (e) {\n o = !0, r = e;\n } finally {\n try {\n i || null == a[\"return\"] || a[\"return\"]();\n } finally {\n if (o) throw r;\n }\n }\n\n return n;\n }(e, t) || s(e, t) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n\n function s(e, t) {\n if (e) {\n if (\"string\" == typeof e) return a(e, t);\n var n = Object.prototype.toString.call(e).slice(8, -1);\n return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(n) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? a(e, t) : void 0;\n }\n }\n\n function a(e, t) {\n (null == t || t > e.length) && (t = e.length);\n\n for (var n = 0, i = new Array(t); n < t; n++) {\n i[n] = e[n];\n }\n\n return i;\n }\n\n function c(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n\n function u(e, t) {\n for (var n = 0; n < t.length; n++) {\n var i = t[n];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n }\n }\n\n function h(e, t, n) {\n return t && u(e.prototype, t), n && u(e, n), e;\n }\n\n n.r(t), n.d(t, \"Channel\", function () {\n return _;\n }), n.d(t, \"Serializer\", function () {\n return H;\n }), n.d(t, \"Socket\", function () {\n return U;\n }), n.d(t, \"LongPoll\", function () {\n return D;\n }), n.d(t, \"Ajax\", function () {\n return M;\n }), n.d(t, \"Presence\", function () {\n return N;\n });\n\n var l = \"undefined\" != typeof self ? self : null,\n f = \"undefined\" != typeof window ? window : null,\n d = l || f || void 0,\n p = 0,\n v = 1,\n y = 2,\n m = 3,\n g = \"closed\",\n k = \"errored\",\n b = \"joined\",\n j = \"joining\",\n C = \"leaving\",\n E = \"phx_close\",\n R = \"phx_error\",\n T = \"phx_join\",\n S = \"phx_reply\",\n w = \"phx_leave\",\n A = [E, R, T, S, w],\n L = \"longpoll\",\n x = \"websocket\",\n O = function O(e) {\n if (\"function\" == typeof e) return e;\n return function () {\n return e;\n };\n },\n P = function () {\n function e(t, n, i, o) {\n c(this, e), this.channel = t, this.event = n, this.payload = i || function () {\n return {};\n }, this.receivedResp = null, this.timeout = o, this.timeoutTimer = null, this.recHooks = [], this.sent = !1;\n }\n\n return h(e, [{\n key: \"resend\",\n value: function value(e) {\n this.timeout = e, this.reset(), this.send();\n }\n }, {\n key: \"send\",\n value: function value() {\n this.hasReceived(\"timeout\") || (this.startTimeout(), this.sent = !0, this.channel.socket.push({\n topic: this.channel.topic,\n event: this.event,\n payload: this.payload(),\n ref: this.ref,\n join_ref: this.channel.joinRef()\n }));\n }\n }, {\n key: \"receive\",\n value: function value(e, t) {\n return this.hasReceived(e) && t(this.receivedResp.response), this.recHooks.push({\n status: e,\n callback: t\n }), this;\n }\n }, {\n key: \"reset\",\n value: function value() {\n this.cancelRefEvent(), this.ref = null, this.refEvent = null, this.receivedResp = null, this.sent = !1;\n }\n }, {\n key: \"matchReceive\",\n value: function value(e) {\n var t = e.status,\n n = e.response;\n e.ref;\n this.recHooks.filter(function (e) {\n return e.status === t;\n }).forEach(function (e) {\n return e.callback(n);\n });\n }\n }, {\n key: \"cancelRefEvent\",\n value: function value() {\n this.refEvent && this.channel.off(this.refEvent);\n }\n }, {\n key: \"cancelTimeout\",\n value: function value() {\n clearTimeout(this.timeoutTimer), this.timeoutTimer = null;\n }\n }, {\n key: \"startTimeout\",\n value: function value() {\n var e = this;\n this.timeoutTimer && this.cancelTimeout(), this.ref = this.channel.socket.makeRef(), this.refEvent = this.channel.replyEventName(this.ref), this.channel.on(this.refEvent, function (t) {\n e.cancelRefEvent(), e.cancelTimeout(), e.receivedResp = t, e.matchReceive(t);\n }), this.timeoutTimer = setTimeout(function () {\n e.trigger(\"timeout\", {});\n }, this.timeout);\n }\n }, {\n key: \"hasReceived\",\n value: function value(e) {\n return this.receivedResp && this.receivedResp.status === e;\n }\n }, {\n key: \"trigger\",\n value: function value(e, t) {\n this.channel.trigger(this.refEvent, {\n status: e,\n response: t\n });\n }\n }]), e;\n }(),\n _ = function () {\n function e(t, n, i) {\n var o = this;\n c(this, e), this.state = g, this.topic = t, this.params = O(n || {}), this.socket = i, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new P(this, T, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new J(function () {\n o.socket.isConnected() && o.rejoin();\n }, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(function () {\n return o.rejoinTimer.reset();\n })), this.stateChangeRefs.push(this.socket.onOpen(function () {\n o.rejoinTimer.reset(), o.isErrored() && o.rejoin();\n })), this.joinPush.receive(\"ok\", function () {\n o.state = b, o.rejoinTimer.reset(), o.pushBuffer.forEach(function (e) {\n return e.send();\n }), o.pushBuffer = [];\n }), this.joinPush.receive(\"error\", function () {\n o.state = k, o.socket.isConnected() && o.rejoinTimer.scheduleTimeout();\n }), this.onClose(function () {\n o.rejoinTimer.reset(), o.socket.hasLogger() && o.socket.log(\"channel\", \"close \".concat(o.topic, \" \").concat(o.joinRef())), o.state = g, o.socket.remove(o);\n }), this.onError(function (e) {\n o.socket.hasLogger() && o.socket.log(\"channel\", \"error \".concat(o.topic), e), o.isJoining() && o.joinPush.reset(), o.state = k, o.socket.isConnected() && o.rejoinTimer.scheduleTimeout();\n }), this.joinPush.receive(\"timeout\", function () {\n o.socket.hasLogger() && o.socket.log(\"channel\", \"timeout \".concat(o.topic, \" (\").concat(o.joinRef(), \")\"), o.joinPush.timeout), new P(o, w, O({}), o.timeout).send(), o.state = k, o.joinPush.reset(), o.socket.isConnected() && o.rejoinTimer.scheduleTimeout();\n }), this.on(S, function (e, t) {\n o.trigger(o.replyEventName(t), e);\n });\n }\n\n return h(e, [{\n key: \"join\",\n value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.timeout;\n if (this.joinedOnce) throw new Error(\"tried to join multiple times. 'join' can only be called a single time per channel instance\");\n return this.timeout = e, this.joinedOnce = !0, this.rejoin(), this.joinPush;\n }\n }, {\n key: \"onClose\",\n value: function value(e) {\n this.on(E, e);\n }\n }, {\n key: \"onError\",\n value: function value(e) {\n return this.on(R, function (t) {\n return e(t);\n });\n }\n }, {\n key: \"on\",\n value: function value(e, t) {\n var n = this.bindingRef++;\n return this.bindings.push({\n event: e,\n ref: n,\n callback: t\n }), n;\n }\n }, {\n key: \"off\",\n value: function value(e, t) {\n this.bindings = this.bindings.filter(function (n) {\n return !(n.event === e && (void 0 === t || t === n.ref));\n });\n }\n }, {\n key: \"canPush\",\n value: function value() {\n return this.socket.isConnected() && this.isJoined();\n }\n }, {\n key: \"push\",\n value: function value(e, t) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.timeout;\n if (!this.joinedOnce) throw new Error(\"tried to push '\".concat(e, \"' to '\").concat(this.topic, \"' before joining. Use channel.join() before pushing events\"));\n var i = new P(this, e, function () {\n return t;\n }, n);\n return this.canPush() ? i.send() : (i.startTimeout(), this.pushBuffer.push(i)), i;\n }\n }, {\n key: \"leave\",\n value: function value() {\n var e = this,\n t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.timeout;\n this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = C;\n\n var n = function n() {\n e.socket.hasLogger() && e.socket.log(\"channel\", \"leave \".concat(e.topic)), e.trigger(E, \"leave\");\n },\n i = new P(this, w, O({}), t);\n\n return i.receive(\"ok\", function () {\n return n();\n }).receive(\"timeout\", function () {\n return n();\n }), i.send(), this.canPush() || i.trigger(\"ok\", {}), i;\n }\n }, {\n key: \"onMessage\",\n value: function value(e, t, n) {\n return t;\n }\n }, {\n key: \"isLifecycleEvent\",\n value: function value(e) {\n return A.indexOf(e) >= 0;\n }\n }, {\n key: \"isMember\",\n value: function value(e, t, n, i) {\n return this.topic === e && (!i || i === this.joinRef() || !this.isLifecycleEvent(t) || (this.socket.hasLogger() && this.socket.log(\"channel\", \"dropping outdated message\", {\n topic: e,\n event: t,\n payload: n,\n joinRef: i\n }), !1));\n }\n }, {\n key: \"joinRef\",\n value: function value() {\n return this.joinPush.ref;\n }\n }, {\n key: \"rejoin\",\n value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.timeout;\n this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = j, this.joinPush.resend(e));\n }\n }, {\n key: \"trigger\",\n value: function value(e, t, n, i) {\n var o = this.onMessage(e, t, n, i);\n if (t && !o) throw new Error(\"channel onMessage callbacks must return the payload, modified or unmodified\");\n\n for (var r = this.bindings.filter(function (t) {\n return t.event === e;\n }), s = 0; s < r.length; s++) {\n r[s].callback(o, n, i || this.joinRef());\n }\n }\n }, {\n key: \"replyEventName\",\n value: function value(e) {\n return \"chan_reply_\".concat(e);\n }\n }, {\n key: \"isClosed\",\n value: function value() {\n return this.state === g;\n }\n }, {\n key: \"isErrored\",\n value: function value() {\n return this.state === k;\n }\n }, {\n key: \"isJoined\",\n value: function value() {\n return this.state === b;\n }\n }, {\n key: \"isJoining\",\n value: function value() {\n return this.state === j;\n }\n }, {\n key: \"isLeaving\",\n value: function value() {\n return this.state === C;\n }\n }]), e;\n }(),\n H = {\n HEADER_LENGTH: 1,\n META_LENGTH: 4,\n KINDS: {\n push: 0,\n reply: 1,\n broadcast: 2\n },\n encode: function encode(e, t) {\n if (e.payload.constructor === ArrayBuffer) return t(this.binaryEncode(e));\n var n = [e.join_ref, e.ref, e.topic, e.event, e.payload];\n return t(JSON.stringify(n));\n },\n decode: function decode(e, t) {\n if (e.constructor === ArrayBuffer) return t(this.binaryDecode(e));\n var n = r(JSON.parse(e), 5);\n return t({\n join_ref: n[0],\n ref: n[1],\n topic: n[2],\n event: n[3],\n payload: n[4]\n });\n },\n binaryEncode: function binaryEncode(e) {\n var t = e.join_ref,\n n = e.ref,\n i = e.event,\n o = e.topic,\n r = e.payload,\n s = this.META_LENGTH + t.length + n.length + o.length + i.length,\n a = new ArrayBuffer(this.HEADER_LENGTH + s),\n c = new DataView(a),\n u = 0;\n c.setUint8(u++, this.KINDS.push), c.setUint8(u++, t.length), c.setUint8(u++, n.length), c.setUint8(u++, o.length), c.setUint8(u++, i.length), Array.from(t, function (e) {\n return c.setUint8(u++, e.charCodeAt(0));\n }), Array.from(n, function (e) {\n return c.setUint8(u++, e.charCodeAt(0));\n }), Array.from(o, function (e) {\n return c.setUint8(u++, e.charCodeAt(0));\n }), Array.from(i, function (e) {\n return c.setUint8(u++, e.charCodeAt(0));\n });\n var h = new Uint8Array(a.byteLength + r.byteLength);\n return h.set(new Uint8Array(a), 0), h.set(new Uint8Array(r), a.byteLength), h.buffer;\n },\n binaryDecode: function binaryDecode(e) {\n var t = new DataView(e),\n n = t.getUint8(0),\n i = new TextDecoder();\n\n switch (n) {\n case this.KINDS.push:\n return this.decodePush(e, t, i);\n\n case this.KINDS.reply:\n return this.decodeReply(e, t, i);\n\n case this.KINDS.broadcast:\n return this.decodeBroadcast(e, t, i);\n }\n },\n decodePush: function decodePush(e, t, n) {\n var i = t.getUint8(1),\n o = t.getUint8(2),\n r = t.getUint8(3),\n s = this.HEADER_LENGTH + this.META_LENGTH - 1,\n a = n.decode(e.slice(s, s + i));\n s += i;\n var c = n.decode(e.slice(s, s + o));\n s += o;\n var u = n.decode(e.slice(s, s + r));\n return s += r, {\n join_ref: a,\n ref: null,\n topic: c,\n event: u,\n payload: e.slice(s, e.byteLength)\n };\n },\n decodeReply: function decodeReply(e, t, n) {\n var i = t.getUint8(1),\n o = t.getUint8(2),\n r = t.getUint8(3),\n s = t.getUint8(4),\n a = this.HEADER_LENGTH + this.META_LENGTH,\n c = n.decode(e.slice(a, a + i));\n a += i;\n var u = n.decode(e.slice(a, a + o));\n a += o;\n var h = n.decode(e.slice(a, a + r));\n a += r;\n var l = n.decode(e.slice(a, a + s));\n a += s;\n var f = e.slice(a, e.byteLength);\n return {\n join_ref: c,\n ref: u,\n topic: h,\n event: S,\n payload: {\n status: l,\n response: f\n }\n };\n },\n decodeBroadcast: function decodeBroadcast(e, t, n) {\n var i = t.getUint8(1),\n o = t.getUint8(2),\n r = this.HEADER_LENGTH + 2,\n s = n.decode(e.slice(r, r + i));\n r += i;\n var a = n.decode(e.slice(r, r + o));\n return r += o, {\n join_ref: null,\n ref: null,\n topic: s,\n event: a,\n payload: e.slice(r, e.byteLength)\n };\n }\n },\n U = function () {\n function e(t) {\n var n = this,\n i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};\n c(this, e), this.stateChangeCallbacks = {\n open: [],\n close: [],\n error: [],\n message: []\n }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = i.timeout || 1e4, this.transport = i.transport || d.WebSocket || D, this.defaultEncoder = H.encode.bind(H), this.defaultDecoder = H.decode.bind(H), this.closeWasClean = !1, this.unloaded = !1, this.binaryType = i.binaryType || \"arraybuffer\", this.transport !== D ? (this.encode = i.encode || this.defaultEncoder, this.decode = i.decode || this.defaultDecoder) : (this.encode = this.defaultEncoder, this.decode = this.defaultDecoder), f && f.addEventListener && f.addEventListener(\"unload\", function (e) {\n n.conn && (n.unloaded = !0, n.abnormalClose(\"unloaded\"));\n }), this.heartbeatIntervalMs = i.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = function (e) {\n return i.rejoinAfterMs ? i.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4;\n }, this.reconnectAfterMs = function (e) {\n return n.unloaded ? 100 : i.reconnectAfterMs ? i.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3;\n }, this.logger = i.logger || null, this.longpollerTimeout = i.longpollerTimeout || 2e4, this.params = O(i.params || {}), this.endPoint = \"\".concat(t, \"/\").concat(x), this.vsn = i.vsn || \"2.0.0\", this.heartbeatTimer = null, this.pendingHeartbeatRef = null, this.reconnectTimer = new J(function () {\n n.teardown(function () {\n return n.connect();\n });\n }, this.reconnectAfterMs);\n }\n\n return h(e, [{\n key: \"protocol\",\n value: function value() {\n return location.protocol.match(/^https/) ? \"wss\" : \"ws\";\n }\n }, {\n key: \"endPointURL\",\n value: function value() {\n var e = M.appendParams(M.appendParams(this.endPoint, this.params()), {\n vsn: this.vsn\n });\n return \"/\" !== e.charAt(0) ? e : \"/\" === e.charAt(1) ? \"\".concat(this.protocol(), \":\").concat(e) : \"\".concat(this.protocol(), \"://\").concat(location.host).concat(e);\n }\n }, {\n key: \"disconnect\",\n value: function value(e, t, n) {\n this.closeWasClean = !0, this.reconnectTimer.reset(), this.teardown(e, t, n);\n }\n }, {\n key: \"connect\",\n value: function value(e) {\n var t = this;\n e && (console && console.log(\"passing params to connect is deprecated. Instead pass :params to the Socket constructor\"), this.params = O(e)), this.conn || (this.closeWasClean = !1, this.conn = new this.transport(this.endPointURL()), this.conn.binaryType = this.binaryType, this.conn.timeout = this.longpollerTimeout, this.conn.onopen = function () {\n return t.onConnOpen();\n }, this.conn.onerror = function (e) {\n return t.onConnError(e);\n }, this.conn.onmessage = function (e) {\n return t.onConnMessage(e);\n }, this.conn.onclose = function (e) {\n return t.onConnClose(e);\n });\n }\n }, {\n key: \"log\",\n value: function value(e, t, n) {\n this.logger(e, t, n);\n }\n }, {\n key: \"hasLogger\",\n value: function value() {\n return null !== this.logger;\n }\n }, {\n key: \"onOpen\",\n value: function value(e) {\n var t = this.makeRef();\n return this.stateChangeCallbacks.open.push([t, e]), t;\n }\n }, {\n key: \"onClose\",\n value: function value(e) {\n var t = this.makeRef();\n return this.stateChangeCallbacks.close.push([t, e]), t;\n }\n }, {\n key: \"onError\",\n value: function value(e) {\n var t = this.makeRef();\n return this.stateChangeCallbacks.error.push([t, e]), t;\n }\n }, {\n key: \"onMessage\",\n value: function value(e) {\n var t = this.makeRef();\n return this.stateChangeCallbacks.message.push([t, e]), t;\n }\n }, {\n key: \"onConnOpen\",\n value: function value() {\n this.hasLogger() && this.log(\"transport\", \"connected to \".concat(this.endPointURL())), this.unloaded = !1, this.closeWasClean = !1, this.flushSendBuffer(), this.reconnectTimer.reset(), this.resetHeartbeat(), this.stateChangeCallbacks.open.forEach(function (e) {\n return (0, r(e, 2)[1])();\n });\n }\n }, {\n key: \"resetHeartbeat\",\n value: function value() {\n var e = this;\n this.conn && this.conn.skipHeartbeat || (this.pendingHeartbeatRef = null, clearInterval(this.heartbeatTimer), this.heartbeatTimer = setInterval(function () {\n return e.sendHeartbeat();\n }, this.heartbeatIntervalMs));\n }\n }, {\n key: \"teardown\",\n value: function value(e, t, n) {\n var i = this;\n if (!this.conn) return e && e();\n this.waitForBufferDone(function () {\n i.conn && (t ? i.conn.close(t, n || \"\") : i.conn.close()), i.waitForSocketClosed(function () {\n i.conn && (i.conn.onclose = function () {}, i.conn = null), e && e();\n });\n });\n }\n }, {\n key: \"waitForBufferDone\",\n value: function value(e) {\n var t = this,\n n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;\n 5 !== n && this.conn && this.conn.bufferedAmount ? setTimeout(function () {\n t.waitForBufferDone(e, n + 1);\n }, 150 * n) : e();\n }\n }, {\n key: \"waitForSocketClosed\",\n value: function value(e) {\n var t = this,\n n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;\n 5 !== n && this.conn && this.conn.readyState !== m ? setTimeout(function () {\n t.waitForSocketClosed(e, n + 1);\n }, 150 * n) : e();\n }\n }, {\n key: \"onConnClose\",\n value: function value(e) {\n this.hasLogger() && this.log(\"transport\", \"close\", e), this.triggerChanError(), clearInterval(this.heartbeatTimer), this.closeWasClean || this.reconnectTimer.scheduleTimeout(), this.stateChangeCallbacks.close.forEach(function (t) {\n return (0, r(t, 2)[1])(e);\n });\n }\n }, {\n key: \"onConnError\",\n value: function value(e) {\n this.hasLogger() && this.log(\"transport\", e), this.triggerChanError(), this.stateChangeCallbacks.error.forEach(function (t) {\n return (0, r(t, 2)[1])(e);\n });\n }\n }, {\n key: \"triggerChanError\",\n value: function value() {\n this.channels.forEach(function (e) {\n e.isErrored() || e.isLeaving() || e.isClosed() || e.trigger(R);\n });\n }\n }, {\n key: \"connectionState\",\n value: function value() {\n switch (this.conn && this.conn.readyState) {\n case p:\n return \"connecting\";\n\n case v:\n return \"open\";\n\n case y:\n return \"closing\";\n\n default:\n return \"closed\";\n }\n }\n }, {\n key: \"isConnected\",\n value: function value() {\n return \"open\" === this.connectionState();\n }\n }, {\n key: \"remove\",\n value: function value(e) {\n this.off(e.stateChangeRefs), this.channels = this.channels.filter(function (t) {\n return t.joinRef() !== e.joinRef();\n });\n }\n }, {\n key: \"off\",\n value: function value(e) {\n for (var t in this.stateChangeCallbacks) {\n this.stateChangeCallbacks[t] = this.stateChangeCallbacks[t].filter(function (t) {\n var n = r(t, 1)[0];\n return -1 === e.indexOf(n);\n });\n }\n }\n }, {\n key: \"channel\",\n value: function value(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n n = new _(e, t, this);\n return this.channels.push(n), n;\n }\n }, {\n key: \"push\",\n value: function value(e) {\n var t = this;\n\n if (this.hasLogger()) {\n var n = e.topic,\n i = e.event,\n o = e.payload,\n r = e.ref,\n s = e.join_ref;\n this.log(\"push\", \"\".concat(n, \" \").concat(i, \" (\").concat(s, \", \").concat(r, \")\"), o);\n }\n\n this.isConnected() ? this.encode(e, function (e) {\n return t.conn.send(e);\n }) : this.sendBuffer.push(function () {\n return t.encode(e, function (e) {\n return t.conn.send(e);\n });\n });\n }\n }, {\n key: \"makeRef\",\n value: function value() {\n var e = this.ref + 1;\n return e === this.ref ? this.ref = 0 : this.ref = e, this.ref.toString();\n }\n }, {\n key: \"sendHeartbeat\",\n value: function value() {\n if (this.isConnected()) {\n if (this.pendingHeartbeatRef) return this.pendingHeartbeatRef = null, this.hasLogger() && this.log(\"transport\", \"heartbeat timeout. Attempting to re-establish connection\"), void this.abnormalClose(\"heartbeat timeout\");\n this.pendingHeartbeatRef = this.makeRef(), this.push({\n topic: \"phoenix\",\n event: \"heartbeat\",\n payload: {},\n ref: this.pendingHeartbeatRef\n });\n }\n }\n }, {\n key: \"abnormalClose\",\n value: function value(e) {\n this.closeWasClean = !1, this.conn.readyState === v && this.conn.close(1e3, e);\n }\n }, {\n key: \"flushSendBuffer\",\n value: function value() {\n this.isConnected() && this.sendBuffer.length > 0 && (this.sendBuffer.forEach(function (e) {\n return e();\n }), this.sendBuffer = []);\n }\n }, {\n key: \"onConnMessage\",\n value: function value(e) {\n var t = this;\n this.decode(e.data, function (e) {\n var n = e.topic,\n i = e.event,\n o = e.payload,\n s = e.ref,\n a = e.join_ref;\n s && s === t.pendingHeartbeatRef && (t.pendingHeartbeatRef = null), t.hasLogger() && t.log(\"receive\", \"\".concat(o.status || \"\", \" \").concat(n, \" \").concat(i, \" \").concat(s && \"(\" + s + \")\" || \"\"), o);\n\n for (var c = 0; c < t.channels.length; c++) {\n var u = t.channels[c];\n u.isMember(n, i, o, a) && u.trigger(i, o, s, a);\n }\n\n for (var h = 0; h < t.stateChangeCallbacks.message.length; h++) {\n (0, r(t.stateChangeCallbacks.message[h], 2)[1])(e);\n }\n });\n }\n }, {\n key: \"leaveOpenTopic\",\n value: function value(e) {\n var t = this.channels.find(function (t) {\n return t.topic === e && (t.isJoined() || t.isJoining());\n });\n t && (this.hasLogger() && this.log(\"transport\", 'leaving duplicate topic \"'.concat(e, '\"')), t.leave());\n }\n }]), e;\n }(),\n D = function () {\n function e(t) {\n c(this, e), this.endPoint = null, this.token = null, this.skipHeartbeat = !0, this.onopen = function () {}, this.onerror = function () {}, this.onmessage = function () {}, this.onclose = function () {}, this.pollEndpoint = this.normalizeEndpoint(t), this.readyState = p, this.poll();\n }\n\n return h(e, [{\n key: \"normalizeEndpoint\",\n value: function value(e) {\n return e.replace(\"ws://\", \"http://\").replace(\"wss://\", \"https://\").replace(new RegExp(\"(.*)/\" + x), \"$1/\" + L);\n }\n }, {\n key: \"endpointURL\",\n value: function value() {\n return M.appendParams(this.pollEndpoint, {\n token: this.token\n });\n }\n }, {\n key: \"closeAndRetry\",\n value: function value() {\n this.close(), this.readyState = p;\n }\n }, {\n key: \"ontimeout\",\n value: function value() {\n this.onerror(\"timeout\"), this.closeAndRetry();\n }\n }, {\n key: \"poll\",\n value: function value() {\n var e = this;\n this.readyState !== v && this.readyState !== p || M.request(\"GET\", this.endpointURL(), \"application/json\", null, this.timeout, this.ontimeout.bind(this), function (t) {\n if (t) {\n var n = t.status,\n i = t.token,\n o = t.messages;\n e.token = i;\n } else n = 0;\n\n switch (n) {\n case 200:\n o.forEach(function (t) {\n return e.onmessage({\n data: t\n });\n }), e.poll();\n break;\n\n case 204:\n e.poll();\n break;\n\n case 410:\n e.readyState = v, e.onopen(), e.poll();\n break;\n\n case 403:\n e.onerror(), e.close();\n break;\n\n case 0:\n case 500:\n e.onerror(), e.closeAndRetry();\n break;\n\n default:\n throw new Error(\"unhandled poll status \".concat(n));\n }\n });\n }\n }, {\n key: \"send\",\n value: function value(e) {\n var t = this;\n M.request(\"POST\", this.endpointURL(), \"application/json\", e, this.timeout, this.onerror.bind(this, \"timeout\"), function (e) {\n e && 200 === e.status || (t.onerror(e && e.status), t.closeAndRetry());\n });\n }\n }, {\n key: \"close\",\n value: function value(e, t) {\n this.readyState = m, this.onclose();\n }\n }]), e;\n }(),\n M = function () {\n function e() {\n c(this, e);\n }\n\n return h(e, null, [{\n key: \"request\",\n value: function value(e, t, n, i, o, r, s) {\n if (d.XDomainRequest) {\n var a = new XDomainRequest();\n this.xdomainRequest(a, e, t, i, o, r, s);\n } else {\n var c = new d.XMLHttpRequest();\n this.xhrRequest(c, e, t, n, i, o, r, s);\n }\n }\n }, {\n key: \"xdomainRequest\",\n value: function value(e, t, n, i, o, r, s) {\n var a = this;\n e.timeout = o, e.open(t, n), e.onload = function () {\n var t = a.parseJSON(e.responseText);\n s && s(t);\n }, r && (e.ontimeout = r), e.onprogress = function () {}, e.send(i);\n }\n }, {\n key: \"xhrRequest\",\n value: function value(e, t, n, i, o, r, s, a) {\n var c = this;\n e.open(t, n, !0), e.timeout = r, e.setRequestHeader(\"Content-Type\", i), e.onerror = function () {\n a && a(null);\n }, e.onreadystatechange = function () {\n if (e.readyState === c.states.complete && a) {\n var t = c.parseJSON(e.responseText);\n a(t);\n }\n }, s && (e.ontimeout = s), e.send(o);\n }\n }, {\n key: \"parseJSON\",\n value: function value(e) {\n if (!e || \"\" === e) return null;\n\n try {\n return JSON.parse(e);\n } catch (t) {\n return console && console.log(\"failed to parse JSON response\", e), null;\n }\n }\n }, {\n key: \"serialize\",\n value: function value(e, t) {\n var n = [];\n\n for (var i in e) {\n if (e.hasOwnProperty(i)) {\n var r = t ? \"\".concat(t, \"[\").concat(i, \"]\") : i,\n s = e[i];\n \"object\" === o(s) ? n.push(this.serialize(s, r)) : n.push(encodeURIComponent(r) + \"=\" + encodeURIComponent(s));\n }\n }\n\n return n.join(\"&\");\n }\n }, {\n key: \"appendParams\",\n value: function value(e, t) {\n if (0 === Object.keys(t).length) return e;\n var n = e.match(/\\?/) ? \"&\" : \"?\";\n return \"\".concat(e).concat(n).concat(this.serialize(t));\n }\n }]), e;\n }();\n\n M.states = {\n complete: 4\n };\n\n var N = function () {\n function e(t) {\n var n = this,\n i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};\n c(this, e);\n var o = i.events || {\n state: \"presence_state\",\n diff: \"presence_diff\"\n };\n this.state = {}, this.pendingDiffs = [], this.channel = t, this.joinRef = null, this.caller = {\n onJoin: function onJoin() {},\n onLeave: function onLeave() {},\n onSync: function onSync() {}\n }, this.channel.on(o.state, function (t) {\n var i = n.caller,\n o = i.onJoin,\n r = i.onLeave,\n s = i.onSync;\n n.joinRef = n.channel.joinRef(), n.state = e.syncState(n.state, t, o, r), n.pendingDiffs.forEach(function (t) {\n n.state = e.syncDiff(n.state, t, o, r);\n }), n.pendingDiffs = [], s();\n }), this.channel.on(o.diff, function (t) {\n var i = n.caller,\n o = i.onJoin,\n r = i.onLeave,\n s = i.onSync;\n n.inPendingSyncState() ? n.pendingDiffs.push(t) : (n.state = e.syncDiff(n.state, t, o, r), s());\n });\n }\n\n return h(e, [{\n key: \"onJoin\",\n value: function value(e) {\n this.caller.onJoin = e;\n }\n }, {\n key: \"onLeave\",\n value: function value(e) {\n this.caller.onLeave = e;\n }\n }, {\n key: \"onSync\",\n value: function value(e) {\n this.caller.onSync = e;\n }\n }, {\n key: \"list\",\n value: function value(t) {\n return e.list(this.state, t);\n }\n }, {\n key: \"inPendingSyncState\",\n value: function value() {\n return !this.joinRef || this.joinRef !== this.channel.joinRef();\n }\n }], [{\n key: \"syncState\",\n value: function value(e, t, n, i) {\n var o = this,\n r = this.clone(e),\n s = {},\n a = {};\n return this.map(r, function (e, n) {\n t[e] || (a[e] = n);\n }), this.map(t, function (e, t) {\n var n = r[e];\n\n if (n) {\n var i = t.metas.map(function (e) {\n return e.phx_ref;\n }),\n c = n.metas.map(function (e) {\n return e.phx_ref;\n }),\n u = t.metas.filter(function (e) {\n return c.indexOf(e.phx_ref) < 0;\n }),\n h = n.metas.filter(function (e) {\n return i.indexOf(e.phx_ref) < 0;\n });\n u.length > 0 && (s[e] = t, s[e].metas = u), h.length > 0 && (a[e] = o.clone(n), a[e].metas = h);\n } else s[e] = t;\n }), this.syncDiff(r, {\n joins: s,\n leaves: a\n }, n, i);\n }\n }, {\n key: \"syncDiff\",\n value: function value(e, t, n, o) {\n var r = t.joins,\n s = t.leaves,\n a = this.clone(e);\n return n || (n = function n() {}), o || (o = function o() {}), this.map(r, function (e, t) {\n var o = a[e];\n\n if (a[e] = t, o) {\n var r,\n s = a[e].metas.map(function (e) {\n return e.phx_ref;\n }),\n c = o.metas.filter(function (e) {\n return s.indexOf(e.phx_ref) < 0;\n });\n (r = a[e].metas).unshift.apply(r, i(c));\n }\n\n n(e, o, t);\n }), this.map(s, function (e, t) {\n var n = a[e];\n\n if (n) {\n var i = t.metas.map(function (e) {\n return e.phx_ref;\n });\n n.metas = n.metas.filter(function (e) {\n return i.indexOf(e.phx_ref) < 0;\n }), o(e, n, t), 0 === n.metas.length && delete a[e];\n }\n }), a;\n }\n }, {\n key: \"list\",\n value: function value(e, t) {\n return t || (t = function t(e, _t) {\n return _t;\n }), this.map(e, function (e, n) {\n return t(e, n);\n });\n }\n }, {\n key: \"map\",\n value: function value(e, t) {\n return Object.getOwnPropertyNames(e).map(function (n) {\n return t(n, e[n]);\n });\n }\n }, {\n key: \"clone\",\n value: function value(e) {\n return JSON.parse(JSON.stringify(e));\n }\n }]), e;\n }(),\n J = function () {\n function e(t, n) {\n c(this, e), this.callback = t, this.timerCalc = n, this.timer = null, this.tries = 0;\n }\n\n return h(e, [{\n key: \"reset\",\n value: function value() {\n this.tries = 0, clearTimeout(this.timer);\n }\n }, {\n key: \"scheduleTimeout\",\n value: function value() {\n var e = this;\n clearTimeout(this.timer), this.timer = setTimeout(function () {\n e.tries = e.tries + 1, e.callback();\n }, this.timerCalc(this.tries + 1));\n }\n }]), e;\n }();\n }]);\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../assets/node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack:///../deps/phoenix/priv/static/phoenix.js?"); /***/ }), /***/ "../deps/phoenix_html/priv/static/phoenix_html.js": /*!********************************************************!*\ !*** ../deps/phoenix_html/priv/static/phoenix_html.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\n(function () {\n var PolyfillEvent = eventConstructor();\n\n function eventConstructor() {\n if (typeof window.CustomEvent === \"function\") return window.CustomEvent; // IE<=9 Support\n\n function CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n\n CustomEvent.prototype = window.Event.prototype;\n return CustomEvent;\n }\n\n function buildHiddenInput(name, value) {\n var input = document.createElement(\"input\");\n input.type = \"hidden\";\n input.name = name;\n input.value = value;\n return input;\n }\n\n function handleClick(element) {\n var to = element.getAttribute(\"data-to\"),\n method = buildHiddenInput(\"_method\", element.getAttribute(\"data-method\")),\n csrf = buildHiddenInput(\"_csrf_token\", element.getAttribute(\"data-csrf\")),\n form = document.createElement(\"form\"),\n target = element.getAttribute(\"target\");\n form.method = element.getAttribute(\"data-method\") === \"get\" ? \"get\" : \"post\";\n form.action = to;\n form.style.display = \"hidden\";\n if (target) form.target = target;\n form.appendChild(csrf);\n form.appendChild(method);\n document.body.appendChild(form);\n form.submit();\n }\n\n window.addEventListener(\"click\", function (e) {\n var element = e.target;\n\n while (element && element.getAttribute) {\n var phoenixLinkEvent = new PolyfillEvent('phoenix.link.click', {\n \"bubbles\": true,\n \"cancelable\": true\n });\n\n if (!element.dispatchEvent(phoenixLinkEvent)) {\n e.preventDefault();\n e.stopImmediatePropagation();\n return false;\n }\n\n if (element.getAttribute(\"data-method\")) {\n handleClick(element);\n e.preventDefault();\n return false;\n } else {\n element = element.parentNode;\n }\n }\n }, false);\n window.addEventListener('phoenix.link.click', function (e) {\n var message = e.target.getAttribute(\"data-confirm\");\n\n if (message && !window.confirm(message)) {\n e.preventDefault();\n }\n }, false);\n})();\n\n//# sourceURL=webpack:///../deps/phoenix_html/priv/static/phoenix_html.js?"); /***/ }), /***/ "../deps/phoenix_live_view/priv/static/phoenix_live_view.js": /*!******************************************************************!*\ !*** ../deps/phoenix_live_view/priv/static/phoenix_live_view.js ***! \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n!function (e, t) {\n \"object\" == ( false ? undefined : _typeof(exports)) && \"object\" == ( false ? undefined : _typeof(module)) ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;\n}(this, function () {\n return function (e) {\n var t = {};\n\n function n(i) {\n if (t[i]) return t[i].exports;\n var r = t[i] = {\n i: i,\n l: !1,\n exports: {}\n };\n return e[i].call(r.exports, r, r.exports, n), r.l = !0, r.exports;\n }\n\n return n.m = e, n.c = t, n.d = function (e, t, i) {\n n.o(e, t) || Object.defineProperty(e, t, {\n configurable: !1,\n enumerable: !0,\n get: i\n });\n }, n.r = function (e) {\n Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, n.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e[\"default\"];\n } : function () {\n return e;\n };\n return n.d(t, \"a\", t), t;\n }, n.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, n.p = \"\", n(n.s = 2);\n }([function (e, t, n) {\n \"use strict\";\n\n n.r(t);\n var i,\n r = 11;\n var o = \"http://www.w3.org/1999/xhtml\",\n a = \"undefined\" == typeof document ? void 0 : document,\n u = !!a && \"content\" in a.createElement(\"template\"),\n s = !!a && a.createRange && \"createContextualFragment\" in a.createRange();\n\n function c(e) {\n return e = e.trim(), u ? function (e) {\n var t = a.createElement(\"template\");\n return t.innerHTML = e, t.content.childNodes[0];\n }(e) : s ? function (e) {\n return i || (i = a.createRange()).selectNode(a.body), i.createContextualFragment(e).childNodes[0];\n }(e) : function (e) {\n var t = a.createElement(\"body\");\n return t.innerHTML = e, t.childNodes[0];\n }(e);\n }\n\n function l(e, t) {\n var n,\n i,\n r = e.nodeName,\n o = t.nodeName;\n return r === o || (n = r.charCodeAt(0), i = o.charCodeAt(0), n <= 90 && i >= 97 ? r === o.toUpperCase() : i <= 90 && n >= 97 && o === r.toUpperCase());\n }\n\n function d(e, t, n) {\n e[n] !== t[n] && (e[n] = t[n], e[n] ? e.setAttribute(n, \"\") : e.removeAttribute(n));\n }\n\n var h = {\n OPTION: function OPTION(e, t) {\n var n = e.parentNode;\n\n if (n) {\n var i = n.nodeName.toUpperCase();\n \"OPTGROUP\" === i && (i = (n = n.parentNode) && n.nodeName.toUpperCase()), \"SELECT\" !== i || n.hasAttribute(\"multiple\") || (e.hasAttribute(\"selected\") && !t.selected && (e.setAttribute(\"selected\", \"selected\"), e.removeAttribute(\"selected\")), n.selectedIndex = -1);\n }\n\n d(e, t, \"selected\");\n },\n INPUT: function INPUT(e, t) {\n d(e, t, \"checked\"), d(e, t, \"disabled\"), e.value !== t.value && (e.value = t.value), t.hasAttribute(\"value\") || e.removeAttribute(\"value\");\n },\n TEXTAREA: function TEXTAREA(e, t) {\n var n = t.value;\n e.value !== n && (e.value = n);\n var i = e.firstChild;\n\n if (i) {\n var r = i.nodeValue;\n if (r == n || !n && r == e.placeholder) return;\n i.nodeValue = n;\n }\n },\n SELECT: function SELECT(e, t) {\n if (!t.hasAttribute(\"multiple\")) {\n for (var n, i, r = -1, o = 0, a = e.firstChild; a;) {\n if (\"OPTGROUP\" === (i = a.nodeName && a.nodeName.toUpperCase())) a = (n = a).firstChild;else {\n if (\"OPTION\" === i) {\n if (a.hasAttribute(\"selected\")) {\n r = o;\n break;\n }\n\n o++;\n }\n\n !(a = a.nextSibling) && n && (a = n.nextSibling, n = null);\n }\n }\n\n e.selectedIndex = r;\n }\n }\n },\n f = 1,\n v = 11,\n p = 3,\n g = 8;\n\n function m() {}\n\n function y(e) {\n if (e) return e.getAttribute && e.getAttribute(\"id\") || e.id;\n }\n\n var b = function (e) {\n return function (t, n, i) {\n if (i || (i = {}), \"string\" == typeof n) if (\"#document\" === t.nodeName || \"HTML\" === t.nodeName || \"BODY\" === t.nodeName) {\n var r = n;\n (n = a.createElement(\"html\")).innerHTML = r;\n } else n = c(n);\n var u = i.getNodeKey || y,\n s = i.onBeforeNodeAdded || m,\n d = i.onNodeAdded || m,\n b = i.onBeforeElUpdated || m,\n k = i.onElUpdated || m,\n w = i.onBeforeNodeDiscarded || m,\n A = i.onNodeDiscarded || m,\n E = i.onBeforeElChildrenUpdated || m,\n S = !0 === i.childrenOnly,\n x = Object.create(null),\n C = [];\n\n function P(e) {\n C.push(e);\n }\n\n function L(e, t, n) {\n !1 !== w(e) && (t && t.removeChild(e), A(e), function e(t, n) {\n if (t.nodeType === f) for (var i = t.firstChild; i;) {\n var r = void 0;\n n && (r = u(i)) ? P(r) : (A(i), i.firstChild && e(i, n)), i = i.nextSibling;\n }\n }(e, n));\n }\n\n function I(e) {\n d(e);\n\n for (var t = e.firstChild; t;) {\n var n = t.nextSibling,\n i = u(t);\n\n if (i) {\n var r = x[i];\n r && l(t, r) ? (t.parentNode.replaceChild(r, t), T(r, t)) : I(t);\n } else I(t);\n\n t = n;\n }\n }\n\n function T(t, n, i) {\n var r = u(n);\n\n if (r && delete x[r], !i) {\n if (!1 === b(t, n)) return;\n if (e(t, n), k(t), !1 === E(t, n)) return;\n }\n\n \"TEXTAREA\" !== t.nodeName ? function (e, t) {\n var n,\n i,\n r,\n o,\n c,\n d = t.firstChild,\n v = e.firstChild;\n\n e: for (; d;) {\n for (o = d.nextSibling, n = u(d); v;) {\n if (r = v.nextSibling, d.isSameNode && d.isSameNode(v)) {\n d = o, v = r;\n continue e;\n }\n\n i = u(v);\n var m = v.nodeType,\n y = void 0;\n\n if (m === d.nodeType && (m === f ? (n ? n !== i && ((c = x[n]) ? r === c ? y = !1 : (e.insertBefore(c, v), i ? P(i) : L(v, e, !0), v = c) : y = !1) : i && (y = !1), (y = !1 !== y && l(v, d)) && T(v, d)) : m !== p && m != g || (y = !0, v.nodeValue !== d.nodeValue && (v.nodeValue = d.nodeValue))), y) {\n d = o, v = r;\n continue e;\n }\n\n i ? P(i) : L(v, e, !0), v = r;\n }\n\n if (n && (c = x[n]) && l(c, d)) e.appendChild(c), T(c, d);else {\n var b = s(d);\n !1 !== b && (b && (d = b), d.actualize && (d = d.actualize(e.ownerDocument || a)), e.appendChild(d), I(d));\n }\n d = o, v = r;\n }\n\n !function (e, t, n) {\n for (; t;) {\n var i = t.nextSibling;\n (n = u(t)) ? P(n) : L(t, e, !0), t = i;\n }\n }(e, v, i);\n var k = h[e.nodeName];\n k && k(e, t);\n }(t, n) : h.TEXTAREA(t, n);\n }\n\n !function e(t) {\n if (t.nodeType === f || t.nodeType === v) for (var n = t.firstChild; n;) {\n var i = u(n);\n i && (x[i] = n), e(n), n = n.nextSibling;\n }\n }(t);\n var _ = t,\n D = _.nodeType,\n R = n.nodeType;\n if (!S) if (D === f) R === f ? l(t, n) || (A(t), _ = function (e, t) {\n for (var n = e.firstChild; n;) {\n var i = n.nextSibling;\n t.appendChild(n), n = i;\n }\n\n return t;\n }(t, function (e, t) {\n return t && t !== o ? a.createElementNS(t, e) : a.createElement(e);\n }(n.nodeName, n.namespaceURI))) : _ = n;else if (D === p || D === g) {\n if (R === D) return _.nodeValue !== n.nodeValue && (_.nodeValue = n.nodeValue), _;\n _ = n;\n }\n if (_ === n) A(t);else {\n if (n.isSameNode && n.isSameNode(_)) return;\n if (T(_, n, S), C) for (var N = 0, O = C.length; N < O; N++) {\n var H = x[C[N]];\n H && L(H, H.parentNode, !1);\n }\n }\n return !S && _ !== t && t.parentNode && (_.actualize && (_ = _.actualize(t.ownerDocument || a)), t.parentNode.replaceChild(_, t)), _;\n };\n }(function (e, t) {\n var n,\n i,\n o,\n a,\n u = t.attributes;\n\n if (t.nodeType !== r && e.nodeType !== r) {\n for (var s = u.length - 1; s >= 0; s--) {\n i = (n = u[s]).name, o = n.namespaceURI, a = n.value, o ? (i = n.localName || i, e.getAttributeNS(o, i) !== a && (\"xmlns\" === n.prefix && (i = n.name), e.setAttributeNS(o, i, a))) : e.getAttribute(i) !== a && e.setAttribute(i, a);\n }\n\n for (var c = e.attributes, l = c.length - 1; l >= 0; l--) {\n i = (n = c[l]).name, (o = n.namespaceURI) ? (i = n.localName || i, t.hasAttributeNS(o, i) || e.removeAttributeNS(o, i)) : t.hasAttribute(i) || e.removeAttribute(i);\n }\n }\n });\n\n function k(e) {\n return P(e) || S(e) || L(e) || C();\n }\n\n function w(e, t) {\n var n = Object.keys(e);\n\n if (Object.getOwnPropertySymbols) {\n var i = Object.getOwnPropertySymbols(e);\n t && (i = i.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), n.push.apply(n, i);\n }\n\n return n;\n }\n\n function A(e, t, n) {\n return t in e ? Object.defineProperty(e, t, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = n, e;\n }\n\n function E(e) {\n return function (e) {\n if (Array.isArray(e)) return I(e);\n }(e) || S(e) || L(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }();\n }\n\n function S(e) {\n if (\"undefined\" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e);\n }\n\n function x(e, t) {\n return P(e) || function (e, t) {\n if (\"undefined\" == typeof Symbol || !(Symbol.iterator in Object(e))) return;\n var n = [],\n i = !0,\n r = !1,\n o = void 0;\n\n try {\n for (var a, u = e[Symbol.iterator](); !(i = (a = u.next()).done) && (n.push(a.value), !t || n.length !== t); i = !0) {\n ;\n }\n } catch (e) {\n r = !0, o = e;\n } finally {\n try {\n i || null == u[\"return\"] || u[\"return\"]();\n } finally {\n if (r) throw o;\n }\n }\n\n return n;\n }(e, t) || L(e, t) || C();\n }\n\n function C() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n function P(e) {\n if (Array.isArray(e)) return e;\n }\n\n function L(e, t) {\n if (e) {\n if (\"string\" == typeof e) return I(e, t);\n var n = Object.prototype.toString.call(e).slice(8, -1);\n return \"Object\" === n && e.constructor && (n = e.constructor.name), \"Map\" === n || \"Set\" === n ? Array.from(e) : \"Arguments\" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? I(e, t) : void 0;\n }\n }\n\n function I(e, t) {\n (null == t || t > e.length) && (t = e.length);\n\n for (var n = 0, i = new Array(t); n < t; n++) {\n i[n] = e[n];\n }\n\n return i;\n }\n\n function T(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n\n function _(e, t) {\n for (var n = 0; n < t.length; n++) {\n var i = t[n];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);\n }\n }\n\n function D(e, t, n) {\n return t && _(e.prototype, t), n && _(e, n), e;\n }\n\n function R(e) {\n \"@babel/helpers - typeof\";\n\n return (R = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (e) {\n return _typeof(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : _typeof(e);\n })(e);\n }\n\n n.d(t, \"debug\", function () {\n return K;\n }), n.d(t, \"Rendered\", function () {\n return ue;\n }), n.d(t, \"LiveSocket\", function () {\n return se;\n }), n.d(t, \"Browser\", function () {\n return ce;\n }), n.d(t, \"DOM\", function () {\n return le;\n }), n.d(t, \"View\", function () {\n return fe;\n });\n\n var N = [1e3, 3e3],\n O = \"data-phx-view\",\n H = [\"phx-click-loading\", \"phx-change-loading\", \"phx-submit-loading\", \"phx-keydown-loading\", \"phx-keyup-loading\", \"phx-blur-loading\", \"phx-focus-loading\"],\n j = \"data-phx-component\",\n F = \"data-phx-ref\",\n M = \"[\".concat(O, \"]\"),\n B = [\"text\", \"textarea\", \"number\", \"email\", \"password\", \"search\", \"tel\", \"url\", \"date\", \"time\"],\n U = [\"checkbox\", \"radio\"],\n J = \"data-phx-static\",\n V = 1,\n W = \"phx-\",\n q = {\n debounce: 300,\n throttle: 300\n },\n z = function z(e, t) {\n return console.error && console.error(e, t);\n };\n\n var K = function K(e, t, n, i) {\n e.liveSocket.isDebugEnabled() && console.log(\"\".concat(e.id, \" \").concat(t, \": \").concat(n, \" - \"), i);\n },\n $ = function $(e) {\n return \"function\" == typeof e ? e : function () {\n return e;\n };\n },\n X = function X(e) {\n return JSON.parse(JSON.stringify(e));\n },\n G = function G(e, t, n) {\n do {\n if (e.matches(\"[\".concat(t, \"]\"))) return e;\n e = e.parentElement || e.parentNode;\n } while (null !== e && 1 === e.nodeType && !(n && n.isSameNode(e) || e.matches(M)));\n\n return null;\n },\n Y = function Y(e) {\n return null !== e && \"object\" === R(e) && !(e instanceof Array);\n },\n Q = function Q(e) {\n for (var t in e) {\n return !1;\n }\n\n return !0;\n },\n Z = function Z(e, t) {\n return e && t(e);\n },\n ee = function () {\n function e(t, n, i) {\n T(this, e), this.ref = ie.genFileRef(n), this.fileEl = t, this.file = n, this.view = i, this.meta = null, this._isCancelled = !1, this._isDone = !1, this._progress = 0, this._onDone = function () {};\n }\n\n return D(e, null, [{\n key: \"isActive\",\n value: function value(e, t) {\n var n = void 0 === t._phxRef,\n i = e.getAttribute(\"data-phx-active-refs\").split(\",\").indexOf(ie.genFileRef(t)) >= 0;\n return t.size > 0 && (n || i);\n }\n }, {\n key: \"isPreflighted\",\n value: function value(e, t) {\n var n = e.getAttribute(\"data-phx-preflighted-refs\").split(\",\").indexOf(ie.genFileRef(t)) >= 0;\n return n && this.isActive(e, t);\n }\n }]), D(e, [{\n key: \"metadata\",\n value: function value() {\n return this.meta;\n }\n }, {\n key: \"progress\",\n value: function value(e) {\n var t = this;\n this._progress = Math.floor(e), this._progress >= 100 ? (this._progress = 100, this._isDone = !0, this.view.pushFileProgress(this.fileEl, this.ref, 100, function () {\n ie.untrackFile(t.fileEl, t.file), t._onDone();\n })) : this.view.pushFileProgress(this.fileEl, this.ref, this._progress);\n }\n }, {\n key: \"cancel\",\n value: function value() {\n this._isCancelled = !0, this._isDone = !0, this._onDone();\n }\n }, {\n key: \"isDone\",\n value: function value() {\n return this._isDone;\n }\n }, {\n key: \"error\",\n value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : \"failed\";\n this.view.pushFileProgress(this.fileEl, this.ref, {\n error: e\n });\n }\n }, {\n key: \"onDone\",\n value: function value(e) {\n this._onDone = e;\n }\n }, {\n key: \"toPreflightPayload\",\n value: function value() {\n return {\n last_modified: this.file.lastModified,\n name: this.file.name,\n size: this.file.size,\n type: this.file.type,\n ref: this.ref\n };\n }\n }, {\n key: \"uploader\",\n value: function value(e) {\n if (this.meta.uploader) {\n var t = e[this.meta.uploader] || z(\"no uploader configured for \".concat(this.meta.uploader));\n return {\n name: this.meta.uploader,\n callback: t\n };\n }\n\n return {\n name: \"channel\",\n callback: re\n };\n }\n }, {\n key: \"zipPostFlight\",\n value: function value(e) {\n this.meta = e.entries[this.ref], this.meta || z(\"no preflight upload response returned with ref \".concat(this.ref), {\n input: this.fileEl,\n response: e\n });\n }\n }]), e;\n }(),\n te = {\n LiveFileUpload: {\n preflightedRefs: function preflightedRefs() {\n return this.el.getAttribute(\"data-phx-preflighted-refs\");\n },\n mounted: function mounted() {\n this.preflightedWas = this.preflightedRefs();\n },\n updated: function updated() {\n var e = this.preflightedRefs();\n this.preflightedWas !== e && (this.preflightedWas = e, \"\" === e && this.__view.cancelSubmit(this.el.form));\n }\n }\n };\n\n te.LiveImgPreview = {\n mounted: function mounted() {\n var e = this;\n this.ref = this.el.getAttribute(\"data-phx-entry-ref\"), this.inputEl = document.getElementById(this.el.getAttribute(\"data-phx-upload-ref\")), ie.getEntryDataURL(this.inputEl, this.ref, function (t) {\n return e.el.src = t;\n });\n }\n };\n\n var ne = 0,\n ie = function () {\n function e(t, n, i) {\n T(this, e), this.view = n, this.onComplete = i, this._entries = Array.from(e.filesAwaitingPreflight(t) || []).map(function (e) {\n return new ee(t, e, n);\n }), this.numEntriesInProgress = this._entries.length;\n }\n\n return D(e, null, [{\n key: \"genFileRef\",\n value: function value(e) {\n var t = e._phxRef;\n return void 0 !== t ? t : (e._phxRef = (ne++).toString(), e._phxRef);\n }\n }, {\n key: \"getEntryDataURL\",\n value: function value(e, t, n) {\n var i = this,\n r = this.activeFiles(e).find(function (e) {\n return i.genFileRef(e) === t;\n }),\n o = new FileReader();\n o.onload = function (e) {\n return n(e.target.result);\n }, o.readAsDataURL(r);\n }\n }, {\n key: \"hasUploadsInProgress\",\n value: function value(e) {\n var t = 0;\n return le.all(e, 'input[type=\"file\"]', function (e) {\n e.getAttribute(\"data-phx-preflighted-refs\") !== e.getAttribute(\"data-phx-done-refs\") && t++;\n }), t > 0;\n }\n }, {\n key: \"serializeUploads\",\n value: function value(e) {\n var t = this,\n n = {};\n return this.activeFiles(e, \"serialize\").forEach(function (i) {\n var r = {\n path: e.name\n },\n o = e.getAttribute(\"data-phx-upload-ref\");\n n[o] = n[o] || [], r.ref = t.genFileRef(i), r.name = i.name, r.type = i.type, r.size = i.size, n[o].push(r);\n }), n;\n }\n }, {\n key: \"clearFiles\",\n value: function value(e) {\n e.value = null, le.putPrivate(e, \"files\", []);\n }\n }, {\n key: \"untrackFile\",\n value: function value(e, t) {\n le.putPrivate(e, \"files\", le[\"private\"](e, \"files\").filter(function (e) {\n return !Object.is(e, t);\n }));\n }\n }, {\n key: \"trackFiles\",\n value: function value(e, t) {\n var n = this;\n\n if (null !== e.getAttribute(\"multiple\")) {\n var i = t.filter(function (t) {\n return !n.activeFiles(e).find(function (e) {\n return Object.is(e, t);\n });\n });\n le.putPrivate(e, \"files\", this.activeFiles(e).concat(i)), e.value = null;\n } else le.putPrivate(e, \"files\", t);\n }\n }, {\n key: \"activeFileInputs\",\n value: function value(e) {\n var t = this,\n n = e.querySelectorAll('input[type=\"file\"]');\n return Array.from(n).filter(function (e) {\n return e.files && t.activeFiles(e).length > 0;\n });\n }\n }, {\n key: \"activeFiles\",\n value: function value(e) {\n return (le[\"private\"](e, \"files\") || []).filter(function (t) {\n return ee.isActive(e, t);\n });\n }\n }, {\n key: \"inputsAwaitingPreflight\",\n value: function value(e) {\n var t = this,\n n = e.querySelectorAll('input[type=\"file\"]');\n return Array.from(n).filter(function (e) {\n return t.filesAwaitingPreflight(e).length > 0;\n });\n }\n }, {\n key: \"filesAwaitingPreflight\",\n value: function value(e) {\n return this.activeFiles(e).filter(function (t) {\n return !ee.isPreflighted(e, t);\n });\n }\n }]), D(e, [{\n key: \"entries\",\n value: function value() {\n return this._entries;\n }\n }, {\n key: \"initAdapterUpload\",\n value: function value(e, t, n) {\n var i = this;\n this._entries = this._entries.map(function (t) {\n return t.zipPostFlight(e), t.onDone(function () {\n i.numEntriesInProgress--, 0 === i.numEntriesInProgress && i.onComplete();\n }), t;\n });\n\n var r = this._entries.reduce(function (e, t) {\n var i = t.uploader(n.uploaders),\n r = i.name,\n o = i.callback;\n return e[r] = e[r] || {\n callback: o,\n entries: []\n }, e[r].entries.push(t), e;\n }, {});\n\n for (var o in r) {\n var a = r[o];\n (0, a.callback)(a.entries, t, e, n);\n }\n }\n }]), e;\n }(),\n re = function re(e, t, n, i) {\n e.forEach(function (e) {\n new oe(e, n.config.chunk_size, i).upload();\n });\n },\n oe = function () {\n function e(t, n, i) {\n T(this, e), this.liveSocket = i, this.entry = t, this.offset = 0, this.chunkSize = n, this.uploadChannel = i.channel(\"lvu:\".concat(t.ref), {\n token: t.metadata()\n });\n }\n\n return D(e, [{\n key: \"upload\",\n value: function value() {\n var e = this;\n this.uploadChannel.join().receive(\"ok\", function (t) {\n return e.readNextChunk();\n }).receive(\"error\", function (t) {\n e.uploadChannel.leave(), e.entry.error();\n });\n }\n }, {\n key: \"isDone\",\n value: function value() {\n return this.offset >= this.entry.file.size;\n }\n }, {\n key: \"readNextChunk\",\n value: function value() {\n var e = this,\n t = new window.FileReader(),\n n = this.entry.file.slice(this.offset, this.chunkSize + this.offset);\n t.onload = function (t) {\n if (null !== t.target.error) return z(\"Read error: \" + t.target.error);\n e.offset += t.target.result.byteLength, e.pushChunk(t.target.result);\n }, t.readAsArrayBuffer(n);\n }\n }, {\n key: \"pushChunk\",\n value: function value(e) {\n var t = this;\n this.uploadChannel.isJoined() && this.uploadChannel.push(\"chunk\", e).receive(\"ok\", function () {\n t.entry.progress(t.offset / t.entry.file.size * 100), t.isDone() || setTimeout(function () {\n return t.readNextChunk();\n }, t.liveSocket.getLatencySim() || 0);\n });\n }\n }]), e;\n }(),\n ae = function ae(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n n = new FormData(e),\n i = [];\n n.forEach(function (e, t, n) {\n e instanceof File && i.push(t);\n }), i.forEach(function (e) {\n return n[\"delete\"](e);\n });\n\n var r,\n o = new URLSearchParams(),\n a = function (e) {\n if (\"undefined\" == typeof Symbol || null == e[Symbol.iterator]) {\n if (Array.isArray(e) || (e = L(e))) {\n var t = 0,\n n = function n() {};\n\n return {\n s: n,\n n: function n() {\n return t >= e.length ? {\n done: !0\n } : {\n done: !1,\n value: e[t++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: n\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var i,\n r,\n o = !0,\n a = !1;\n return {\n s: function s() {\n i = e[Symbol.iterator]();\n },\n n: function n() {\n var e = i.next();\n return o = e.done, e;\n },\n e: function e(_e2) {\n a = !0, r = _e2;\n },\n f: function f() {\n try {\n o || null == i[\"return\"] || i[\"return\"]();\n } finally {\n if (a) throw r;\n }\n }\n };\n }(n.entries());\n\n try {\n for (a.s(); !(r = a.n()).done;) {\n var u = x(r.value, 2),\n s = u[0],\n c = u[1];\n o.append(s, c);\n }\n } catch (e) {\n a.e(e);\n } finally {\n a.f();\n }\n\n for (var l in t) {\n o.append(l, t[l]);\n }\n\n return o.toString();\n },\n ue = function () {\n function e(t, n) {\n T(this, e), this.viewId = t, this.rendered = {}, this.mergeDiff(n);\n }\n\n return D(e, null, [{\n key: \"extract\",\n value: function value(e) {\n var t = e.r,\n n = e.e,\n i = e.t;\n return delete e.r, delete e.e, delete e.t, {\n diff: e,\n title: i,\n reply: t || null,\n events: n || []\n };\n }\n }]), D(e, [{\n key: \"parentViewId\",\n value: function value() {\n return this.viewId;\n }\n }, {\n key: \"toString\",\n value: function value(e) {\n return this.recursiveToString(this.rendered, this.rendered.c, e);\n }\n }, {\n key: \"recursiveToString\",\n value: function value(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e.c,\n n = arguments.length > 2 ? arguments[2] : void 0,\n i = {\n buffer: \"\",\n components: t,\n onlyCids: n = n ? new Set(n) : null\n };\n return this.toOutputBuffer(e, i), i.buffer;\n }\n }, {\n key: \"componentCIDs\",\n value: function value(e) {\n return Object.keys(e.c || {}).map(function (e) {\n return parseInt(e);\n });\n }\n }, {\n key: \"isComponentOnlyDiff\",\n value: function value(e) {\n return !!e.c && 1 === Object.keys(e).length;\n }\n }, {\n key: \"getComponent\",\n value: function value(e, t) {\n return e.c[t];\n }\n }, {\n key: \"mergeDiff\",\n value: function value(e) {\n var t = e.c;\n\n if (delete e.c, this.rendered = this.recursiveMerge(this.rendered, e), this.rendered.c = this.rendered.c || {}, t) {\n var n = this.rendered.c;\n\n for (var i in t) {\n var r = t[i],\n o = r,\n a = o.s;\n\n if (\"number\" == typeof a) {\n for (; \"number\" == typeof a;) {\n a = (o = a > 0 ? t[a] : n[-a]).s;\n }\n\n o = X(o), this.doRecursiveMerge(o, r), o.s = a;\n } else o = n[i] || {}, o = this.recursiveMerge(o, r);\n\n t[i] = o;\n }\n\n for (var u in t) {\n n[u] = t[u];\n }\n\n e.c = t;\n }\n }\n }, {\n key: \"recursiveMerge\",\n value: function value(e, t) {\n return void 0 !== t.s ? t : (this.doRecursiveMerge(e, t), e);\n }\n }, {\n key: \"doRecursiveMerge\",\n value: function value(e, t) {\n for (var n in t) {\n var i = t[n],\n r = e[n];\n Y(i) && void 0 === i.s && Y(r) ? this.doRecursiveMerge(r, i) : e[n] = i;\n }\n }\n }, {\n key: \"componentToString\",\n value: function value(e) {\n return this.recursiveCIDToString(this.rendered.c, e);\n }\n }, {\n key: \"pruneCIDs\",\n value: function value(e) {\n var t = this;\n e.forEach(function (e) {\n return delete t.rendered.c[e];\n });\n }\n }, {\n key: \"get\",\n value: function value() {\n return this.rendered;\n }\n }, {\n key: \"isNewFingerprint\",\n value: function value() {\n return !!(arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).s;\n }\n }, {\n key: \"toOutputBuffer\",\n value: function value(e, t) {\n if (e.d) return this.comprehensionToBuffer(e, t);\n var n = e.s;\n t.buffer += n[0];\n\n for (var i = 1; i < n.length; i++) {\n this.dynamicToBuffer(e[i - 1], t), t.buffer += n[i];\n }\n }\n }, {\n key: \"comprehensionToBuffer\",\n value: function value(e, t) {\n for (var n = e.d, i = e.s, r = 0; r < n.length; r++) {\n var o = n[r];\n t.buffer += i[0];\n\n for (var a = 1; a < i.length; a++) {\n this.dynamicToBuffer(o[a - 1], t), t.buffer += i[a];\n }\n }\n }\n }, {\n key: \"dynamicToBuffer\",\n value: function value(e, t) {\n \"number\" == typeof e ? t.buffer += this.recursiveCIDToString(t.components, e, t.onlyCids) : Y(e) ? this.toOutputBuffer(e, t) : t.buffer += e;\n }\n }, {\n key: \"recursiveCIDToString\",\n value: function value(e, t, n) {\n var i = this,\n r = e[t] || z(\"no component for CID \".concat(t), e),\n o = document.createElement(\"template\");\n o.innerHTML = this.recursiveToString(r, e, n);\n var a = o.content,\n u = n && !n.has(t),\n s = x(Array.from(a.childNodes).reduce(function (e, n, r) {\n var a = x(e, 2),\n s = a[0],\n c = a[1];\n return n.nodeType === Node.ELEMENT_NODE ? n.getAttribute(j) ? [s, !0] : (n.setAttribute(j, t), n.id || (n.id = \"\".concat(i.parentViewId(), \"-\").concat(t, \"-\").concat(r)), u && (n.setAttribute(\"data-phx-skip\", \"\"), n.innerHTML = \"\"), [!0, c]) : \"\" !== n.nodeValue.trim() ? (z(\"only HTML element tags are allowed at the root of components.\\n\\n\" + 'got: \"'.concat(n.nodeValue.trim(), '\"\\n\\n') + \"within:\\n\", o.innerHTML.trim()), n.replaceWith(i.createSpan(n.nodeValue, t)), [!0, c]) : (n.remove(), [s, c]);\n }, [!1, !1]), 2),\n c = s[0],\n l = s[1];\n return c || l ? !c && l ? (z(\"expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.\", o.innerHTML.trim()), o.innerHTML) : o.innerHTML : (z(\"expected at least one HTML element tag inside a component, but the component is empty:\\n\", o.innerHTML.trim()), this.createSpan(\"\", t).outerHTML);\n }\n }, {\n key: \"createSpan\",\n value: function value(e, t) {\n var n = document.createElement(\"span\");\n return n.innerText = e, n.setAttribute(j, t), n;\n }\n }]), e;\n }(),\n se = function () {\n function e(t, n) {\n var i = this,\n r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};\n if (T(this, e), this.unloaded = !1, !n || \"Object\" === n.constructor.name) throw new Error('\\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\\n\\n import {Socket} from \"phoenix\"\\n import {LiveSocket} from \"phoenix_live_view\"\\n let liveSocket = new LiveSocket(\"/live\", Socket, {...})\\n ');\n this.socket = new n(t, r), this.bindingPrefix = r.bindingPrefix || W, this.opts = r, this.params = $(r.params || {}), this.viewLogger = r.viewLogger, this.metadataCallbacks = r.metadata || {}, this.defaults = Object.assign(X(q), r.defaults || {}), this.activeElement = null, this.prevActive = null, this.silenced = !1, this.main = null, this.linkRef = 0, this.roots = {}, this.href = window.location.href, this.pendingLink = null, this.currentLocation = X(window.location), this.hooks = r.hooks || {}, this.uploaders = r.uploaders || {}, this.loaderTimeout = r.loaderTimeout || V, this.boundTopLevelEvents = !1, this.domCallbacks = Object.assign({\n onNodeAdded: $(),\n onBeforeElUpdated: $()\n }, r.dom || {}), window.addEventListener(\"unload\", function (e) {\n i.unloaded = !0;\n }), this.socket.onOpen(function () {\n i.isUnloaded() && window.location.reload();\n });\n }\n\n return D(e, [{\n key: \"isProfileEnabled\",\n value: function value() {\n return \"true\" === sessionStorage.getItem(\"phx:live-socket:profiling\");\n }\n }, {\n key: \"isDebugEnabled\",\n value: function value() {\n return \"true\" === sessionStorage.getItem(\"phx:live-socket:debug\");\n }\n }, {\n key: \"enableDebug\",\n value: function value() {\n sessionStorage.setItem(\"phx:live-socket:debug\", \"true\");\n }\n }, {\n key: \"enableProfiling\",\n value: function value() {\n sessionStorage.setItem(\"phx:live-socket:profiling\", \"true\");\n }\n }, {\n key: \"disableDebug\",\n value: function value() {\n sessionStorage.removeItem(\"phx:live-socket:debug\");\n }\n }, {\n key: \"disableProfiling\",\n value: function value() {\n sessionStorage.removeItem(\"phx:live-socket:profiling\");\n }\n }, {\n key: \"enableLatencySim\",\n value: function value(e) {\n this.enableDebug(), console.log(\"latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable\"), sessionStorage.setItem(\"phx:live-socket:latency-sim\", e);\n }\n }, {\n key: \"disableLatencySim\",\n value: function value() {\n sessionStorage.removeItem(\"phx:live-socket:latency-sim\");\n }\n }, {\n key: \"getLatencySim\",\n value: function value() {\n var e = sessionStorage.getItem(\"phx:live-socket:latency-sim\");\n return e ? parseInt(e) : null;\n }\n }, {\n key: \"getSocket\",\n value: function value() {\n return this.socket;\n }\n }, {\n key: \"connect\",\n value: function value() {\n var e = this,\n t = function t() {\n e.joinRootViews() && (e.bindTopLevelEvents(), e.socket.connect());\n };\n\n [\"complete\", \"loaded\", \"interactive\"].indexOf(document.readyState) >= 0 ? t() : document.addEventListener(\"DOMContentLoaded\", function () {\n return t();\n });\n }\n }, {\n key: \"disconnect\",\n value: function value(e) {\n this.socket.disconnect(e);\n }\n }, {\n key: \"triggerDOM\",\n value: function value(e, t) {\n var n;\n (n = this.domCallbacks)[e].apply(n, E(t));\n }\n }, {\n key: \"time\",\n value: function value(e, t) {\n if (!this.isProfileEnabled() || !console.time) return t();\n console.time(e);\n var n = t();\n return console.timeEnd(e), n;\n }\n }, {\n key: \"log\",\n value: function value(e, t, n) {\n if (this.viewLogger) {\n var i = x(n(), 2),\n r = i[0],\n o = i[1];\n this.viewLogger(e, t, r, o);\n } else if (this.isDebugEnabled()) {\n var a = x(n(), 2),\n u = a[0],\n s = a[1];\n K(e, t, u, s);\n }\n }\n }, {\n key: \"onChannel\",\n value: function value(e, t, n) {\n var i = this;\n e.on(t, function (e) {\n var t = i.getLatencySim();\n t ? (console.log(\"simulating \".concat(t, \"ms of latency from server to client\")), setTimeout(function () {\n return n(e);\n }, t)) : n(e);\n });\n }\n }, {\n key: \"wrapPush\",\n value: function value(e, t, n) {\n var i = this,\n r = this.getLatencySim();\n if (!r) return t.timeout ? n().receive(\"timeout\", function () {\n e.isDestroyed() || i.reloadWithJitter(e, function () {\n i.log(e, \"timeout\", function () {\n return [\"received timeout while communicating with server. Falling back to hard refresh for recovery\"];\n });\n });\n }) : n();\n console.log(\"simulating \".concat(r, \"ms of latency from client to server\"));\n var o = {\n receives: [],\n receive: function receive(e, t) {\n this.receives.push([e, t]);\n }\n };\n return setTimeout(function () {\n o.receives.reduce(function (e, t) {\n var n = x(t, 2),\n i = n[0],\n r = n[1];\n return e.receive(i, r);\n }, n());\n }, r), o;\n }\n }, {\n key: \"reloadWithJitter\",\n value: function value(e, t) {\n var n = this;\n e.destroy(), this.disconnect();\n var i = N[0],\n r = N[1],\n o = Math.floor(Math.random() * (r - i + 1)) + i,\n a = ce.updateLocal(e.name(), \"consecutive-reloads\", 0, function (e) {\n return e + 1;\n });\n t ? t() : this.log(e, \"join\", function () {\n return [\"encountered \".concat(a, \" consecutive reloads\")];\n }), a > 10 && (this.log(e, \"join\", function () {\n return [\"exceeded \".concat(10, \" consecutive reloads. Entering failsafe mode\")];\n }), o = 3e4), setTimeout(function () {\n n.hasPendingLink() ? window.location = n.pendingLink : window.location.reload();\n }, o);\n }\n }, {\n key: \"getHookCallbacks\",\n value: function value(e) {\n return e && e.startsWith(\"Phoenix.\") ? te[e.split(\".\")[1]] : this.hooks[e];\n }\n }, {\n key: \"isUnloaded\",\n value: function value() {\n return this.unloaded;\n }\n }, {\n key: \"isConnected\",\n value: function value() {\n return this.socket.isConnected();\n }\n }, {\n key: \"getBindingPrefix\",\n value: function value() {\n return this.bindingPrefix;\n }\n }, {\n key: \"binding\",\n value: function value(e) {\n return \"\".concat(this.getBindingPrefix()).concat(e);\n }\n }, {\n key: \"channel\",\n value: function value(e, t) {\n return this.socket.channel(e, t);\n }\n }, {\n key: \"joinRootViews\",\n value: function value() {\n var e = this,\n t = !1;\n return le.all(document, \"\".concat(M, \":not([\").concat(\"data-phx-parent-id\", \"])\"), function (n) {\n if (!e.getRootById(n.id)) {\n var i = e.joinRootView(n, e.getHref());\n e.root = e.root || i, n.getAttribute(\"data-phx-main\") && (e.main = i);\n }\n\n t = !0;\n }), t;\n }\n }, {\n key: \"redirect\",\n value: function value(e, t) {\n this.disconnect(), ce.redirect(e, t);\n }\n }, {\n key: \"replaceMain\",\n value: function value(e, t) {\n var n = this,\n i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null,\n r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.setPendingLink(e),\n o = this.main.el;\n this.main.showLoader(this.loaderTimeout), this.main.destroy(), ce.fetchPage(e, function (a, u) {\n if (200 !== a) return n.redirect(e);\n var s = document.createElement(\"template\");\n s.innerHTML = u;\n var c = s.content.childNodes[0];\n if (!c || !n.isPhxView(c)) return n.redirect(e);\n n.joinRootView(c, e, t, function (e, t) {\n 1 === t && (n.commitPendingLink(r) ? (o.replaceWith(e.el), n.main = e, i && i()) : e.destroy());\n });\n });\n }\n }, {\n key: \"isPhxView\",\n value: function value(e) {\n return e.getAttribute && null !== e.getAttribute(O);\n }\n }, {\n key: \"joinRootView\",\n value: function value(e, t, n, i) {\n var r = new fe(e, this, null, t, n);\n return this.roots[r.id] = r, r.join(i), r;\n }\n }, {\n key: \"owner\",\n value: function value(e, t) {\n var n = this,\n i = Z(e.closest(M), function (e) {\n return n.getViewByEl(e);\n });\n i && t(i);\n }\n }, {\n key: \"withinOwners\",\n value: function value(e, t) {\n var n = this;\n this.owner(e, function (i) {\n var r = e.getAttribute(n.binding(\"target\"));\n null === r ? t(i, e) : i.withinTargets(r, t);\n });\n }\n }, {\n key: \"getViewByEl\",\n value: function value(e) {\n var t = e.getAttribute(\"data-phx-root-id\");\n return Z(this.getRootById(t), function (t) {\n return t.getDescendentByEl(e);\n });\n }\n }, {\n key: \"getRootById\",\n value: function value(e) {\n return this.roots[e];\n }\n }, {\n key: \"destroyAllViews\",\n value: function value() {\n for (var e in this.roots) {\n this.roots[e].destroy(), delete this.roots[e];\n }\n }\n }, {\n key: \"destroyViewByEl\",\n value: function value(e) {\n var t = this.getRootById(e.getAttribute(\"data-phx-root-id\"));\n t && t.destroyDescendent(e.id);\n }\n }, {\n key: \"setActiveElement\",\n value: function value(e) {\n var t = this;\n\n if (this.activeElement !== e) {\n this.activeElement = e;\n\n var n = function n() {\n e === t.activeElement && (t.activeElement = null), e.removeEventListener(\"mouseup\", t), e.removeEventListener(\"touchend\", t);\n };\n\n e.addEventListener(\"mouseup\", n), e.addEventListener(\"touchend\", n);\n }\n }\n }, {\n key: \"getActiveElement\",\n value: function value() {\n return document.activeElement === document.body ? this.activeElement || document.activeElement : document.activeElement || document.body;\n }\n }, {\n key: \"dropActiveElement\",\n value: function value(e) {\n this.prevActive && e.ownsElement(this.prevActive) && (this.prevActive = null);\n }\n }, {\n key: \"restorePreviouslyActiveFocus\",\n value: function value() {\n this.prevActive && this.prevActive !== document.body && this.prevActive.focus();\n }\n }, {\n key: \"blurActiveElement\",\n value: function value() {\n this.prevActive = this.getActiveElement(), this.prevActive !== document.body && this.prevActive.blur();\n }\n }, {\n key: \"bindTopLevelEvents\",\n value: function value() {\n var e = this;\n this.boundTopLevelEvents || (this.boundTopLevelEvents = !0, window.addEventListener(\"pageshow\", function (t) {\n t.persisted && (e.withPageLoading({\n to: window.location.href,\n kind: \"redirect\"\n }), window.location.reload());\n }), this.bindClicks(), this.bindNav(), this.bindForms(), this.bind({\n keyup: \"keyup\",\n keydown: \"keydown\"\n }, function (t, n, i, r, o, a, u) {\n var s = r.getAttribute(e.binding(\"key\")),\n c = t.key && t.key.toLowerCase();\n s && s.toLowerCase() !== c || i.pushKey(r, o, n, a, function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {};\n t % 2 ? w(Object(n), !0).forEach(function (t) {\n A(e, t, n[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : w(Object(n)).forEach(function (t) {\n Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));\n });\n }\n\n return e;\n }({\n key: t.key\n }, e.eventMeta(n, t, r)));\n }), this.bind({\n blur: \"focusout\",\n focus: \"focusin\"\n }, function (t, n, i, r, o, a, u) {\n u || i.pushEvent(n, r, o, a, e.eventMeta(n, t, r));\n }), this.bind({\n blur: \"blur\",\n focus: \"focus\"\n }, function (t, n, i, r, o, a, u) {\n u && \"window\" !== !u && i.pushEvent(n, r, o, a, e.eventMeta(n, t, r));\n }), window.addEventListener(\"dragover\", function (e) {\n return e.preventDefault();\n }), window.addEventListener(\"drop\", function (t) {\n t.preventDefault();\n var n = Z(G(t.target, e.binding(\"drop-target\")), function (t) {\n return t.getAttribute(e.binding(\"drop-target\"));\n }),\n i = n && document.getElementById(n),\n r = Array.from(t.dataTransfer.files || []);\n i && !i.disabled && 0 !== r.length && i.files instanceof FileList && (ie.trackFiles(i, r), i.dispatchEvent(new Event(\"input\", {\n bubbles: !0\n })));\n }));\n }\n }, {\n key: \"eventMeta\",\n value: function value(e, t, n) {\n var i = this.metadataCallbacks[e];\n return i ? i(t, n) : {};\n }\n }, {\n key: \"setPendingLink\",\n value: function value(e) {\n return this.linkRef++, this.pendingLink = e, this.linkRef;\n }\n }, {\n key: \"commitPendingLink\",\n value: function value(e) {\n return this.linkRef === e && (this.href = this.pendingLink, this.pendingLink = null, !0);\n }\n }, {\n key: \"getHref\",\n value: function value() {\n return this.href;\n }\n }, {\n key: \"hasPendingLink\",\n value: function value() {\n return !!this.pendingLink;\n }\n }, {\n key: \"bind\",\n value: function value(e, t) {\n var n = this,\n i = function i(_i) {\n var r = e[_i];\n n.on(r, function (e) {\n var r = n.binding(_i),\n o = n.binding(\"window-\".concat(_i)),\n a = e.target.getAttribute && e.target.getAttribute(r);\n a ? n.debounce(e.target, e, function () {\n n.withinOwners(e.target, function (n, r) {\n t(e, _i, n, e.target, r, a, null);\n });\n }) : le.all(document, \"[\".concat(o, \"]\"), function (r) {\n var a = r.getAttribute(o);\n n.debounce(r, e, function () {\n n.withinOwners(r, function (n, o) {\n t(e, _i, n, r, o, a, \"window\");\n });\n });\n });\n });\n };\n\n for (var r in e) {\n i(r);\n }\n }\n }, {\n key: \"bindClicks\",\n value: function value() {\n var e = this;\n [!0, !1].forEach(function (t) {\n var n = t ? e.binding(\"capture-click\") : e.binding(\"click\");\n window.addEventListener(\"click\", function (i) {\n var r = null,\n o = (r = t ? i.target.matches(\"[\".concat(n, \"]\")) ? i.target : i.target.querySelector(\"[\".concat(n, \"]\")) : G(i.target, n)) && r.getAttribute(n);\n o && (\"#\" === r.getAttribute(\"href\") && i.preventDefault(), e.debounce(r, i, function () {\n e.withinOwners(r, function (t, n) {\n t.pushEvent(\"click\", r, n, o, e.eventMeta(\"click\", i, r));\n });\n }));\n }, t);\n });\n }\n }, {\n key: \"bindNav\",\n value: function value() {\n var e = this;\n\n if (ce.canPushState()) {\n history.scrollRestoration && (history.scrollRestoration = \"manual\");\n var t = null;\n window.addEventListener(\"scroll\", function (e) {\n clearTimeout(t), t = setTimeout(function () {\n ce.updateCurrentState(function (e) {\n return Object.assign(e, {\n scroll: window.scrollY\n });\n });\n }, 100);\n }), window.addEventListener(\"popstate\", function (t) {\n if (e.registerNewLocation(window.location)) {\n var n = t.state || {},\n i = n.type,\n r = n.id,\n o = n.root,\n a = n.scroll,\n u = window.location.href;\n e.main.isConnected() && \"patch\" === i && r === e.main.id ? e.main.pushLinkPatch(u, null) : e.replaceMain(u, null, function () {\n o && e.replaceRootHistory(), \"number\" == typeof a && setTimeout(function () {\n window.scrollTo(0, a);\n }, 0);\n });\n }\n }, !1), window.addEventListener(\"click\", function (t) {\n var n = G(t.target, \"data-phx-link\"),\n i = n && n.getAttribute(\"data-phx-link\"),\n r = t.metaKey || t.ctrlKey || 1 === t.button;\n\n if (i && e.isConnected() && e.main && !r) {\n var o = n.href,\n a = n.getAttribute(\"data-phx-link-state\");\n if (t.preventDefault(), e.pendingLink !== o) if (\"patch\" === i) e.pushHistoryPatch(o, a, n);else {\n if (\"redirect\" !== i) throw new Error(\"expected \".concat(\"data-phx-link\", ' to be \"patch\" or \"redirect\", got: ').concat(i));\n e.historyRedirect(o, a);\n }\n }\n }, !1);\n }\n }\n }, {\n key: \"withPageLoading\",\n value: function value(e, t) {\n le.dispatchEvent(window, \"phx:page-loading-start\", e);\n\n var n = function n() {\n return le.dispatchEvent(window, \"phx:page-loading-stop\", e);\n };\n\n return t ? t(n) : n;\n }\n }, {\n key: \"pushHistoryPatch\",\n value: function value(e, t, n) {\n var i = this;\n this.withPageLoading({\n to: e,\n kind: \"patch\"\n }, function (r) {\n i.main.pushLinkPatch(e, n, function () {\n i.historyPatch(e, t), r();\n });\n });\n }\n }, {\n key: \"historyPatch\",\n value: function value(e, t) {\n ce.pushState(t, {\n type: \"patch\",\n id: this.main.id\n }, e), this.registerNewLocation(window.location);\n }\n }, {\n key: \"historyRedirect\",\n value: function value(e, t, n) {\n var i = this,\n r = window.scrollY;\n this.withPageLoading({\n to: e,\n kind: \"redirect\"\n }, function (o) {\n i.replaceMain(e, n, function () {\n ce.pushState(t, {\n type: \"redirect\",\n id: i.main.id,\n scroll: r\n }, e), i.registerNewLocation(window.location), o();\n });\n });\n }\n }, {\n key: \"replaceRootHistory\",\n value: function value() {\n ce.pushState(\"replace\", {\n root: !0,\n type: \"patch\",\n id: this.main.id\n });\n }\n }, {\n key: \"registerNewLocation\",\n value: function value(e) {\n var t = this.currentLocation;\n return t.pathname + t.search !== e.pathname + e.search && (this.currentLocation = X(e), !0);\n }\n }, {\n key: \"bindForms\",\n value: function value() {\n var e = this,\n t = 0;\n this.on(\"submit\", function (t) {\n var n = t.target.getAttribute(e.binding(\"submit\"));\n n && (t.preventDefault(), t.target.disabled = !0, e.withinOwners(t.target, function (e, i) {\n return e.submitForm(t.target, i, n);\n }));\n }, !1);\n\n for (var n = function n() {\n var n = r[i];\n e.on(n, function (i) {\n var r = i.target,\n o = r.form && r.form.getAttribute(e.binding(\"change\"));\n\n if (o && (\"number\" !== r.type || !r.validity || !r.validity.badInput)) {\n var a = t;\n t++;\n var u = le[\"private\"](r, \"prev-iteration\") || {},\n s = u.at,\n c = u.type;\n s === a - 1 && n !== c || (le.putPrivate(r, \"prev-iteration\", {\n at: a,\n type: n\n }), e.debounce(r, i, function () {\n e.withinOwners(r.form, function (t, n) {\n le.putPrivate(r, \"phx-has-focused\", !0), le.isTextualInput(r) || e.setActiveElement(r), t.pushInput(r, n, o, i.target);\n });\n }));\n }\n }, !1);\n }, i = 0, r = [\"change\", \"input\"]; i < r.length; i++) {\n n();\n }\n }\n }, {\n key: \"debounce\",\n value: function value(e, t, n) {\n var i = this.binding(\"debounce\"),\n r = this.binding(\"throttle\"),\n o = this.defaults.debounce.toString(),\n a = this.defaults.throttle.toString();\n le.debounce(e, t, i, o, r, a, n);\n }\n }, {\n key: \"silenceEvents\",\n value: function value(e) {\n this.silenced = !0, e(), this.silenced = !1;\n }\n }, {\n key: \"on\",\n value: function value(e, t) {\n var n = this;\n window.addEventListener(e, function (e) {\n n.silenced || t(e);\n });\n }\n }]), e;\n }(),\n ce = {\n canPushState: function canPushState() {\n return void 0 !== history.pushState;\n },\n dropLocal: function dropLocal(e, t) {\n return window.localStorage.removeItem(this.localKey(e, t));\n },\n updateLocal: function updateLocal(e, t, n, i) {\n var r = this.getLocal(e, t),\n o = this.localKey(e, t),\n a = null === r ? n : i(r);\n return window.localStorage.setItem(o, JSON.stringify(a)), a;\n },\n getLocal: function getLocal(e, t) {\n return JSON.parse(window.localStorage.getItem(this.localKey(e, t)));\n },\n fetchPage: function fetchPage(e, t) {\n var n = new XMLHttpRequest();\n n.open(\"GET\", e, !0), n.timeout = 3e4, n.setRequestHeader(\"content-type\", \"text/html\"), n.setRequestHeader(\"cache-control\", \"max-age=0, no-cache, no-store, must-revalidate, post-check=0, pre-check=0\"), n.setRequestHeader(\"x-requested-with\", \"live-link\"), n.onerror = function () {\n return t(400);\n }, n.ontimeout = function () {\n return t(504);\n }, n.onreadystatechange = function () {\n if (4 === n.readyState) {\n var i = new URL(e),\n r = i.pathname + i.search,\n o = Z(n.getResponseHeader(\"x-response-url\") || n.responseURL, function (e) {\n return new URL(e);\n }),\n a = o ? o.pathname + o.search : null;\n return \"live-link\" !== n.getResponseHeader(\"x-requested-with\") ? t(400) : null === o || a != r ? t(302) : 200 !== n.status ? t(n.status) : void t(200, n.responseText);\n }\n }, n.send();\n },\n updateCurrentState: function updateCurrentState(e) {\n this.canPushState() && history.replaceState(e(history.state || {}), \"\", window.location.href);\n },\n pushState: function pushState(e, t, n) {\n if (this.canPushState()) {\n if (n !== window.location.href) {\n if (\"redirect\" == t.type && t.scroll) {\n var i = history.state || {};\n i.scroll = t.scroll, history.replaceState(i, \"\", window.location.href);\n }\n\n delete t.scroll, history[e + \"State\"](t, \"\", n || null);\n var r = this.getHashTargetEl(window.location.hash);\n r ? r.scrollIntoView() : \"redirect\" === t.type && window.scroll(0, 0);\n }\n } else this.redirect(n);\n },\n setCookie: function setCookie(e, t) {\n document.cookie = \"\".concat(e, \"=\").concat(t);\n },\n getCookie: function getCookie(e) {\n return document.cookie.replace(new RegExp(\"(?:(?:^|.*;s*)\".concat(e, \"s*=s*([^;]*).*$)|^.*$\")), \"$1\");\n },\n redirect: function redirect(e, t) {\n t && ce.setCookie(\"__phoenix_flash__\", t + \"; max-age=60000; path=/\"), window.location = e;\n },\n localKey: function localKey(e, t) {\n return \"\".concat(e, \"-\").concat(t);\n },\n getHashTargetEl: function getHashTargetEl(e) {\n var t = e.toString().substring(1);\n if (\"\" !== t) return document.getElementById(t) || document.querySelector('a[name=\"'.concat(t, '\"]'));\n }\n },\n le = {\n byId: function byId(e) {\n return document.getElementById(e) || z(\"no id found for \".concat(e));\n },\n removeClass: function removeClass(e, t) {\n e.classList.remove(t), 0 === e.classList.length && e.removeAttribute(\"class\");\n },\n all: function all(e, t, n) {\n var i = Array.from(e.querySelectorAll(t));\n return n ? i.forEach(n) : i;\n },\n findComponentNodeList: function findComponentNodeList(e, t) {\n return this.filterWithinSameLiveView(this.all(e, \"[\".concat(j, '=\"').concat(t, '\"]')), e);\n },\n findPhxChildrenInFragment: function findPhxChildrenInFragment(e, t) {\n var n = document.createElement(\"template\");\n return n.innerHTML = e, this.findPhxChildren(n.content, t);\n },\n isIgnored: function isIgnored(e, t) {\n return \"ignore\" === (e.getAttribute(t) || e.getAttribute(\"data-phx-update\"));\n },\n isPhxUpdate: function isPhxUpdate(e, t, n) {\n return e.getAttribute && n.indexOf(e.getAttribute(t)) >= 0;\n },\n findPhxChildren: function findPhxChildren(e, t) {\n return this.all(e, \"\".concat(M, \"[\").concat(\"data-phx-parent-id\", '=\"').concat(t, '\"]'));\n },\n findParentCIDs: function findParentCIDs(e, t) {\n var n = this,\n i = new Set(t);\n return t.reduce(function (t, i) {\n var r = \"[\".concat(j, '=\"').concat(i, '\"] [').concat(j, \"]\");\n return n.filterWithinSameLiveView(n.all(e, r), e).map(function (e) {\n return parseInt(e.getAttribute(j));\n }).forEach(function (e) {\n return t[\"delete\"](e);\n }), t;\n }, i);\n },\n filterWithinSameLiveView: function filterWithinSameLiveView(e, t) {\n var n = this;\n return t.querySelector(M) ? e.filter(function (e) {\n return n.withinSameLiveView(e, t);\n }) : e;\n },\n withinSameLiveView: function withinSameLiveView(e, t) {\n for (; e = e.parentNode;) {\n if (e.isSameNode(t)) return !0;\n if (e.getAttribute(O)) return !1;\n }\n },\n \"private\": function _private(e, t) {\n return e.phxPrivate && e.phxPrivate[t];\n },\n deletePrivate: function deletePrivate(e, t) {\n e.phxPrivate && delete e.phxPrivate[t];\n },\n putPrivate: function putPrivate(e, t, n) {\n e.phxPrivate || (e.phxPrivate = {}), e.phxPrivate[t] = n;\n },\n copyPrivates: function copyPrivates(e, t) {\n t.phxPrivate && (e.phxPrivate = X(t.phxPrivate));\n },\n putTitle: function putTitle(e) {\n var t = document.querySelector(\"title\").dataset,\n n = t.prefix,\n i = t.suffix;\n document.title = \"\".concat(n || \"\").concat(e).concat(i || \"\");\n },\n debounce: function debounce(e, t, n, i, r, o, a) {\n var u = this,\n s = e.getAttribute(n),\n c = e.getAttribute(r);\n \"\" === s && (s = i), \"\" === c && (c = o);\n var l = s || c;\n\n switch (l) {\n case null:\n return a();\n\n case \"blur\":\n return void (this.once(e, \"debounce-blur\") && e.addEventListener(\"blur\", function () {\n return a();\n }));\n\n default:\n var d = parseInt(l),\n h = this.incCycle(e, \"debounce-trigger\", function () {\n return c ? u.deletePrivate(e, \"throttled\") : a();\n });\n if (isNaN(d)) return z(\"invalid throttle/debounce value: \".concat(l));\n\n if (c) {\n var f = !1;\n\n if (\"keydown\" === t.type) {\n var v = this[\"private\"](e, \"debounce-prev-key\");\n this.putPrivate(e, \"debounce-prev-key\", t.key), f = v !== t.key;\n }\n\n if (!f && this[\"private\"](e, \"throttled\")) return !1;\n a(), this.putPrivate(e, \"throttled\", !0), setTimeout(function () {\n return u.triggerCycle(e, \"debounce-trigger\");\n }, d);\n } else setTimeout(function () {\n return u.triggerCycle(e, \"debounce-trigger\", h);\n }, d);\n\n e.form && this.once(e.form, \"bind-debounce\") && e.form.addEventListener(\"submit\", function (t) {\n Array.from(new FormData(e.form).entries(), function (t) {\n var n = x(t, 2),\n i = n[0],\n r = (n[1], e.form.querySelector('[name=\"'.concat(i, '\"]')));\n u.incCycle(r, \"debounce-trigger\"), u.deletePrivate(r, \"throttled\");\n });\n }), this.once(e, \"bind-debounce\") && e.addEventListener(\"blur\", function (t) {\n return u.triggerCycle(e, \"debounce-trigger\");\n });\n }\n },\n triggerCycle: function triggerCycle(e, t, n) {\n var i = x(this[\"private\"](e, t), 2),\n r = i[0],\n o = i[1];\n n || (n = r), n === r && (this.incCycle(e, t), o());\n },\n once: function once(e, t) {\n return !0 !== this[\"private\"](e, t) && (this.putPrivate(e, t, !0), !0);\n },\n incCycle: function incCycle(e, t) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {},\n i = x(this[\"private\"](e, t) || [0, n], 2),\n r = i[0];\n i[1];\n return r++, this.putPrivate(e, t, [r, n]), r;\n },\n discardError: function discardError(e, t, n) {\n var i = t.getAttribute && t.getAttribute(n),\n r = i && e.querySelector(\"#\".concat(i));\n r && (this[\"private\"](r, \"phx-has-focused\") || this[\"private\"](r.form, \"phx-has-submitted\") || t.classList.add(\"phx-no-feedback\"));\n },\n isPhxChild: function isPhxChild(e) {\n return e.getAttribute && e.getAttribute(\"data-phx-parent-id\");\n },\n dispatchEvent: function dispatchEvent(e, t) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},\n i = new CustomEvent(t, {\n bubbles: !0,\n cancelable: !0,\n detail: n\n });\n e.dispatchEvent(i);\n },\n cloneNode: function cloneNode(e, t) {\n if (void 0 === t) return e.cloneNode(!0);\n var n = e.cloneNode(!1);\n return n.innerHTML = t, n;\n },\n mergeAttrs: function mergeAttrs(e, t) {\n for (var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, i = n.exclude || [], r = n.isIgnored, o = t.attributes, a = o.length - 1; a >= 0; a--) {\n var u = o[a].name;\n i.indexOf(u) < 0 && e.setAttribute(u, t.getAttribute(u));\n }\n\n for (var s = e.attributes, c = s.length - 1; c >= 0; c--) {\n var l = s[c].name;\n r ? l.startsWith(\"data-\") && !t.hasAttribute(l) && e.removeAttribute(l) : t.hasAttribute(l) || e.removeAttribute(l);\n }\n },\n mergeFocusedInput: function mergeFocusedInput(e, t) {\n e instanceof HTMLSelectElement || le.mergeAttrs(e, t, {\n except: [\"value\"]\n }), t.readOnly ? e.setAttribute(\"readonly\", !0) : e.removeAttribute(\"readonly\");\n },\n hasSelectionRange: function hasSelectionRange(e) {\n return e.setSelectionRange && (\"text\" === e.type || \"textarea\" === e.type);\n },\n restoreFocus: function restoreFocus(e, t, n) {\n if (le.isTextualInput(e)) {\n var i = e.matches(\":focus\");\n e.readOnly && e.blur(), i || e.focus(), this.hasSelectionRange(e) && e.setSelectionRange(t, n);\n }\n },\n isFormInput: function isFormInput(e) {\n return /^(?:input|select|textarea)$/i.test(e.tagName) && \"button\" !== e.type;\n },\n syncAttrsToProps: function syncAttrsToProps(e) {\n e instanceof HTMLInputElement && U.indexOf(e.type.toLocaleLowerCase()) >= 0 && (e.checked = null !== e.getAttribute(\"checked\"));\n },\n isTextualInput: function isTextualInput(e) {\n return B.indexOf(e.type) >= 0;\n },\n isNowTriggerFormExternal: function isNowTriggerFormExternal(e, t) {\n return e.getAttribute && null !== e.getAttribute(t);\n },\n syncPendingRef: function syncPendingRef(e, t, n) {\n var i = e.getAttribute(F);\n return null === i || (le.isFormInput(e) || null !== e.getAttribute(n) ? (\"file\" === e.type && le.mergeAttrs(e, t, {\n isIgnored: !0\n }), le.putPrivate(e, F, t), !1) : (H.forEach(function (n) {\n e.classList.contains(n) && t.classList.add(n);\n }), t.setAttribute(F, i), !0));\n },\n cleanChildNodes: function cleanChildNodes(e, t) {\n if (le.isPhxUpdate(e, t, [\"append\", \"prepend\"])) {\n var n = [];\n e.childNodes.forEach(function (e) {\n e.id || (e.nodeType === Node.TEXT_NODE && \"\" === e.nodeValue.trim() || z(\"only HTML element tags with an id are allowed inside containers with phx-update.\\n\\n\" + 'removing illegal node: \"'.concat((e.outerHTML || e.nodeValue).trim(), '\"\\n\\n')), n.push(e));\n }), n.forEach(function (e) {\n return e.remove();\n });\n }\n }\n },\n de = function () {\n function e(t, n, i) {\n T(this, e);\n var r = new Set(),\n o = new Set(E(n.children).map(function (e) {\n return e.id;\n })),\n a = [];\n Array.from(t.children).forEach(function (e) {\n if (e.id && (r.add(e.id), o.has(e.id))) {\n var t = e.previousElementSibling && e.previousElementSibling.id;\n a.push({\n elementId: e.id,\n previousElementId: t\n });\n }\n }), this.containerId = n.id, this.updateType = i, this.elementsToModify = a, this.elementIdsToAdd = E(o).filter(function (e) {\n return !r.has(e);\n });\n }\n\n return D(e, [{\n key: \"perform\",\n value: function value() {\n var e = le.byId(this.containerId);\n this.elementsToModify.forEach(function (t) {\n t.previousElementId ? Z(document.getElementById(t.previousElementId), function (e) {\n Z(document.getElementById(t.elementId), function (t) {\n t.previousElementSibling && t.previousElementSibling.id == e.id || e.insertAdjacentElement(\"afterend\", t);\n });\n }) : Z(document.getElementById(t.elementId), function (t) {\n null == t.previousElementSibling || e.insertAdjacentElement(\"afterbegin\", t);\n });\n }), \"prepend\" == this.updateType && this.elementIdsToAdd.reverse().forEach(function (t) {\n Z(document.getElementById(t), function (t) {\n return e.insertAdjacentElement(\"afterbegin\", t);\n });\n });\n }\n }]), e;\n }(),\n he = function () {\n function e(t, n, i, r, o) {\n T(this, e), this.view = t, this.liveSocket = t.liveSocket, this.container = n, this.id = i, this.rootID = t.root.id, this.html = r, this.targetCID = o, this.cidPatch = \"number\" == typeof this.targetCID, this.callbacks = {\n beforeadded: [],\n beforeupdated: [],\n beforediscarded: [],\n beforephxChildAdded: [],\n afteradded: [],\n afterupdated: [],\n afterdiscarded: [],\n afterphxChildAdded: []\n };\n }\n\n return D(e, null, [{\n key: \"patchEl\",\n value: function value(e, t, n) {\n b(e, t, {\n childrenOnly: !1,\n onBeforeElUpdated: function onBeforeElUpdated(e, t) {\n if (n && n.isSameNode(e) && le.isFormInput(e)) return le.mergeFocusedInput(e, t), !1;\n }\n });\n }\n }]), D(e, [{\n key: \"before\",\n value: function value(e, t) {\n this.callbacks[\"before\".concat(e)].push(t);\n }\n }, {\n key: \"after\",\n value: function value(e, t) {\n this.callbacks[\"after\".concat(e)].push(t);\n }\n }, {\n key: \"trackBefore\",\n value: function value(e) {\n for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) {\n n[i - 1] = arguments[i];\n }\n\n this.callbacks[\"before\".concat(e)].forEach(function (e) {\n return e.apply(void 0, n);\n });\n }\n }, {\n key: \"trackAfter\",\n value: function value(e) {\n for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++) {\n n[i - 1] = arguments[i];\n }\n\n this.callbacks[\"after\".concat(e)].forEach(function (e) {\n return e.apply(void 0, n);\n });\n }\n }, {\n key: \"markPrunableContentForRemoval\",\n value: function value() {\n le.all(this.container, \"[phx-update=append] > *, [phx-update=prepend] > *\", function (e) {\n e.setAttribute(\"data-phx-remove\", \"\");\n });\n }\n }, {\n key: \"perform\",\n value: function value() {\n var e = this,\n t = this.view,\n n = this.liveSocket,\n i = this.container,\n r = this.html,\n o = this.isCIDPatch() ? this.targetCIDContainer() : i;\n\n if (!this.isCIDPatch() || o) {\n var a = n.getActiveElement(),\n u = a && le.hasSelectionRange(a) ? a : {},\n s = u.selectionStart,\n c = u.selectionEnd,\n l = n.binding(\"update\"),\n d = n.binding(\"feedback-for\"),\n h = n.binding(\"disable-with\"),\n f = n.binding(\"trigger-action\"),\n v = [],\n p = [],\n g = [],\n m = null,\n y = n.time(\"premorph container prep\", function () {\n return e.buildDiffHTML(i, r, l, o);\n });\n return this.trackBefore(\"added\", i), this.trackBefore(\"updated\", i, i), n.time(\"morphdom\", function () {\n b(o, y, {\n childrenOnly: null === o.getAttribute(j),\n onBeforeNodeAdded: function onBeforeNodeAdded(t) {\n return le.discardError(o, t, d), e.trackBefore(\"added\", t), t;\n },\n onNodeAdded: function onNodeAdded(n) {\n le.isNowTriggerFormExternal(n, f) && (m = n), le.isPhxChild(n) && t.ownsElement(n) && e.trackAfter(\"phxChildAdded\", n), v.push(n);\n },\n onNodeDiscarded: function onNodeDiscarded(t) {\n le.isPhxChild(t) && n.destroyViewByEl(t), e.trackAfter(\"discarded\", t);\n },\n onBeforeNodeDiscarded: function onBeforeNodeDiscarded(t) {\n return !(!t.getAttribute || null === t.getAttribute(\"data-phx-remove\")) || (null === t.parentNode || !le.isPhxUpdate(t.parentNode, l, [\"append\", \"prepend\"]) || !t.id) && !e.skipCIDSibling(t) && (e.trackBefore(\"discarded\", t), !0);\n },\n onElUpdated: function onElUpdated(e) {\n le.isNowTriggerFormExternal(e, f) && (m = e), p.push(e);\n },\n onBeforeElUpdated: function onBeforeElUpdated(t, n) {\n if (le.cleanChildNodes(n, l), e.skipCIDSibling(n)) return !1;\n if (le.isIgnored(t, l)) return e.trackBefore(\"updated\", t, n), le.mergeAttrs(t, n, {\n isIgnored: !0\n }), p.push(t), !1;\n if (\"number\" === t.type && t.validity && t.validity.badInput) return !1;\n if (!le.syncPendingRef(t, n, h)) return \"file\" === t.type && (e.trackBefore(\"updated\", t, n), p.push(t)), !1;\n\n if (le.isPhxChild(n)) {\n var i = t.getAttribute(J);\n return le.mergeAttrs(t, n), t.setAttribute(J, i), t.setAttribute(\"data-phx-root-id\", e.rootID), !1;\n }\n\n return le.copyPrivates(n, t), le.discardError(o, n, d), a && t.isSameNode(a) && le.isFormInput(t) && !e.forceFocusedSelectUpdate(t, n) ? (e.trackBefore(\"updated\", t, n), le.mergeFocusedInput(t, n), le.syncAttrsToProps(t), p.push(t), !1) : (le.isPhxUpdate(n, l, [\"append\", \"prepend\"]) && g.push(new de(t, n, n.getAttribute(l))), le.syncAttrsToProps(n), e.trackBefore(\"updated\", t, n), !0);\n }\n });\n }), n.isDebugEnabled() && function () {\n for (var e = new Set(), t = document.querySelectorAll(\"*[id]\"), n = 0, i = t.length; n < i; n++) {\n e.has(t[n].id) ? console.error(\"Multiple IDs detected: \".concat(t[n].id, \". Ensure unique element ids.\")) : e.add(t[n].id);\n }\n }(), g.length > 0 && n.time(\"post-morph append/prepend restoration\", function () {\n g.forEach(function (e) {\n return e.perform();\n });\n }), n.silenceEvents(function () {\n return le.restoreFocus(a, s, c);\n }), le.dispatchEvent(document, \"phx:update\"), v.forEach(function (t) {\n return e.trackAfter(\"added\", t);\n }), p.forEach(function (t) {\n return e.trackAfter(\"updated\", t);\n }), m && (n.disconnect(), m.submit()), !0;\n }\n }\n }, {\n key: \"forceFocusedSelectUpdate\",\n value: function value(e, t) {\n return !0 === e.multiple || e.innerHTML != t.innerHTML;\n }\n }, {\n key: \"isCIDPatch\",\n value: function value() {\n return this.cidPatch;\n }\n }, {\n key: \"skipCIDSibling\",\n value: function value(e) {\n return e.nodeType === Node.ELEMENT_NODE && null !== e.getAttribute(\"data-phx-skip\");\n }\n }, {\n key: \"targetCIDContainer\",\n value: function value() {\n if (this.isCIDPatch()) {\n var e = k(le.findComponentNodeList(this.container, this.targetCID)),\n t = e[0];\n return 0 === e.slice(1).length ? t : t && t.parentNode;\n }\n }\n }, {\n key: \"buildDiffHTML\",\n value: function value(e, t, n, i) {\n var r = this,\n o = this.isCIDPatch(),\n a = o && i.getAttribute(j) === this.targetCID.toString();\n if (!o || a) return t;\n var u = null,\n s = document.createElement(\"template\");\n u = le.cloneNode(i);\n var c = k(le.findComponentNodeList(u, this.targetCID)),\n l = c[0],\n d = c.slice(1);\n return s.innerHTML = t, d.forEach(function (e) {\n return e.remove();\n }), Array.from(u.childNodes).forEach(function (e) {\n e.id && e.nodeType === Node.ELEMENT_NODE && e.getAttribute(j) !== r.targetCID.toString() && (e.setAttribute(\"data-phx-skip\", \"\"), e.innerHTML = \"\");\n }), Array.from(s.content.childNodes).forEach(function (e) {\n return u.insertBefore(e, l);\n }), l.remove(), u.outerHTML;\n }\n }]), e;\n }(),\n fe = function () {\n function e(t, n, i, r, o) {\n var a = this;\n T(this, e), this.liveSocket = n, this.flash = o, this.parent = i, this.root = i ? i.root : this, this.el = t, this.id = this.el.id, this.view = this.el.getAttribute(O), this.ref = 0, this.childJoins = 0, this.loaderTimer = null, this.pendingDiffs = [], this.pruningCIDs = [], this.href = r, this.joinCount = this.parent ? this.parent.joinCount - 1 : 0, this.joinPending = !0, this.destroyed = !1, this.joinCallback = function () {}, this.stopCallback = function () {}, this.pendingJoinOps = this.parent ? null : [], this.viewHooks = {}, this.uploaders = {}, this.formSubmits = [], this.children = this.parent ? null : {}, this.root.children[this.id] = {}, this.channel = this.liveSocket.channel(\"lv:\".concat(this.id), function () {\n return {\n url: a.href,\n params: a.connectParams(),\n session: a.getSession(),\n \"static\": a.getStatic(),\n flash: a.flash\n };\n }), this.showLoader(this.liveSocket.loaderTimeout), this.bindChannel();\n }\n\n return D(e, [{\n key: \"isMain\",\n value: function value() {\n return this.liveSocket.main === this;\n }\n }, {\n key: \"connectParams\",\n value: function value() {\n var e = this.liveSocket.params(this.view),\n t = le.all(document, \"[\".concat(this.binding(\"track-static\"), \"]\")).map(function (e) {\n return e.src || e.href;\n }).filter(function (e) {\n return \"string\" == typeof e;\n });\n return t.length > 0 && (e._track_static = t), e._mounts = this.joinCount, e;\n }\n }, {\n key: \"name\",\n value: function value() {\n return this.view;\n }\n }, {\n key: \"isConnected\",\n value: function value() {\n return this.channel.canPush();\n }\n }, {\n key: \"getSession\",\n value: function value() {\n return this.el.getAttribute(\"data-phx-session\");\n }\n }, {\n key: \"getStatic\",\n value: function value() {\n var e = this.el.getAttribute(J);\n return \"\" === e ? null : e;\n }\n }, {\n key: \"destroy\",\n value: function value() {\n var e = this,\n t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function () {};\n this.destroyAllChildren(), this.destroyed = !0, delete this.root.children[this.id], this.parent && delete this.root.children[this.parent.id][this.id], clearTimeout(this.loaderTimer);\n\n var n = function n() {\n for (var n in t(), e.viewHooks) {\n e.viewHooks[n].__trigger__(\"beforeDestroy\"), e.destroyHook(e.viewHooks[n]);\n }\n };\n\n this.log(\"destroyed\", function () {\n return [\"the child has been removed from the parent\"];\n }), this.channel.leave().receive(\"ok\", n).receive(\"error\", n).receive(\"timeout\", n);\n }\n }, {\n key: \"setContainerClasses\",\n value: function value() {\n var e;\n this.el.classList.remove(\"phx-connected\", \"phx-disconnected\", \"phx-error\"), (e = this.el.classList).add.apply(e, arguments);\n }\n }, {\n key: \"isLoading\",\n value: function value() {\n return this.el.classList.contains(\"phx-disconnected\");\n }\n }, {\n key: \"showLoader\",\n value: function value(e) {\n var t = this;\n if (clearTimeout(this.loaderTimer), e) this.loaderTimer = setTimeout(function () {\n return t.showLoader();\n }, e);else {\n for (var n in this.viewHooks) {\n this.viewHooks[n].__trigger__(\"disconnected\");\n }\n\n this.setContainerClasses(\"phx-disconnected\");\n }\n }\n }, {\n key: \"hideLoader\",\n value: function value() {\n clearTimeout(this.loaderTimer), this.setContainerClasses(\"phx-connected\");\n }\n }, {\n key: \"triggerReconnected\",\n value: function value() {\n for (var e in this.viewHooks) {\n this.viewHooks[e].__trigger__(\"reconnected\");\n }\n }\n }, {\n key: \"log\",\n value: function value(e, t) {\n this.liveSocket.log(this, e, t);\n }\n }, {\n key: \"withinTargets\",\n value: function value(e, t) {\n var n = this;\n\n if (/^(0|[1-9]\\d*)$/.test(e)) {\n var i = le.findComponentNodeList(this.el, e);\n 0 === i.length ? z(\"no component found matching phx-target of \".concat(e)) : t(this, i[0]);\n } else {\n var r = Array.from(document.querySelectorAll(e));\n 0 === r.length && z('nothing found matching the phx-target selector \"'.concat(e, '\"')), r.forEach(function (e) {\n return n.liveSocket.owner(e, function (n) {\n return t(n, e);\n });\n });\n }\n }\n }, {\n key: \"applyDiff\",\n value: function value(e, t, n) {\n this.log(e, function () {\n return [\"\", X(t)];\n });\n var i = ue.extract(t),\n r = i.diff,\n o = i.reply,\n a = i.events,\n u = i.title;\n return u && le.putTitle(u), n({\n diff: r,\n reply: o,\n events: a\n }), o;\n }\n }, {\n key: \"onJoin\",\n value: function value(e) {\n var t = this,\n n = e.rendered;\n this.childJoins = 0, this.joinPending = !0, this.flash = null, ce.dropLocal(this.name(), \"consecutive-reloads\"), this.applyDiff(\"mount\", n, function (n) {\n var i = n.diff,\n r = n.events;\n t.rendered = new ue(t.id, i);\n var o = t.renderContainer(null, \"join\");\n t.dropPendingRefs();\n var a = t.formsForRecovery(o);\n t.joinCount++, a.length > 0 ? a.forEach(function (e, n) {\n t.pushFormRecovery(e, function (e) {\n n === a.length - 1 && t.onJoinComplete(e, o, r);\n });\n }) : t.onJoinComplete(e, o, r);\n });\n }\n }, {\n key: \"dropPendingRefs\",\n value: function value() {\n le.all(this.el, \"[\".concat(F, \"]\"), function (e) {\n return e.removeAttribute(F);\n });\n }\n }, {\n key: \"onJoinComplete\",\n value: function value(e, t, n) {\n var i = this,\n r = e.live_patch;\n if (this.joinCount > 1 || this.parent && !this.parent.isJoinPending()) return this.applyJoinPatch(r, t, n);\n 0 === le.findPhxChildrenInFragment(t, this.id).filter(function (e) {\n var t = e.id && i.el.querySelector(\"#\".concat(e.id)),\n n = t && t.getAttribute(J);\n return n && e.setAttribute(J, n), i.joinChild(e);\n }).length ? this.parent ? (this.root.pendingJoinOps.push([this, function () {\n return i.applyJoinPatch(r, t, n);\n }]), this.parent.ackJoin(this)) : (this.onAllChildJoinsComplete(), this.applyJoinPatch(r, t, n)) : this.root.pendingJoinOps.push([this, function () {\n return i.applyJoinPatch(r, t, n);\n }]);\n }\n }, {\n key: \"attachTrueDocEl\",\n value: function value() {\n this.el = le.byId(this.id), this.el.setAttribute(\"data-phx-root-id\", this.root.id);\n }\n }, {\n key: \"dispatchEvents\",\n value: function value(e) {\n e.forEach(function (e) {\n var t = x(e, 2),\n n = t[0],\n i = t[1];\n window.dispatchEvent(new CustomEvent(\"phx:hook:\".concat(n), {\n detail: i\n }));\n });\n }\n }, {\n key: \"applyJoinPatch\",\n value: function value(e, t, n) {\n var i = this;\n this.attachTrueDocEl();\n var r = new he(this, this.el, this.id, t, null);\n\n if (r.markPrunableContentForRemoval(), this.performPatch(r, !1), this.joinNewChildren(), le.all(this.el, \"[\".concat(this.binding(\"hook\"), \"], [data-phx-\").concat(\"hook\", \"]\"), function (e) {\n var t = i.addHook(e);\n t && t.__trigger__(\"mounted\");\n }), this.joinPending = !1, this.dispatchEvents(n), this.applyPendingUpdates(), e) {\n var o = e.kind,\n a = e.to;\n this.liveSocket.historyPatch(a, o);\n }\n\n this.hideLoader(), this.joinCount > 1 && this.triggerReconnected(), this.stopCallback();\n }\n }, {\n key: \"triggerBeforeUpdateHook\",\n value: function value(e, t) {\n this.liveSocket.triggerDOM(\"onBeforeElUpdated\", [e, t]);\n var n = this.getHook(e),\n i = n && le.isIgnored(e, this.binding(\"update\"));\n if (n && !e.isEqualNode(t) && (!i || !function (e, t) {\n return JSON.stringify(e) === JSON.stringify(t);\n }(e.dataset, t.dataset))) return n.__trigger__(\"beforeUpdate\"), n;\n }\n }, {\n key: \"triggerUpdatedHook\",\n value: function value(e) {\n e.__trigger__(\"updated\");\n }\n }, {\n key: \"performPatch\",\n value: function value(e, t) {\n var n = this,\n i = [],\n r = !1,\n o = new Set();\n return e.after(\"added\", function (e) {\n n.liveSocket.triggerDOM(\"onNodeAdded\", [e]);\n var t = n.addHook(e);\n t && t.__trigger__(\"mounted\");\n }), e.after(\"phxChildAdded\", function (e) {\n return r = !0;\n }), e.before(\"updated\", function (e, t) {\n n.triggerBeforeUpdateHook(e, t) && o.add(e.id);\n }), e.after(\"updated\", function (e) {\n o.has(e.id) && n.triggerUpdatedHook(n.getHook(e));\n }), e.before(\"discarded\", function (e) {\n var t = n.getHook(e);\n t && t.__trigger__(\"beforeDestroy\");\n }), e.after(\"discarded\", function (e) {\n var t = n.componentID(e);\n \"number\" == typeof t && -1 === i.indexOf(t) && i.push(t);\n var r = n.getHook(e);\n r && n.destroyHook(r);\n }), e.perform(), t && this.maybePushComponentsDestroyed(i), r;\n }\n }, {\n key: \"joinNewChildren\",\n value: function value() {\n var e = this;\n le.findPhxChildren(this.el, this.id).forEach(function (t) {\n return e.joinChild(t);\n });\n }\n }, {\n key: \"getChildById\",\n value: function value(e) {\n return this.root.children[this.id][e];\n }\n }, {\n key: \"getDescendentByEl\",\n value: function value(e) {\n return e.id === this.id ? this : this.children[e.getAttribute(\"data-phx-parent-id\")][e.id];\n }\n }, {\n key: \"destroyDescendent\",\n value: function value(e) {\n for (var t in this.root.children) {\n for (var n in this.root.children[t]) {\n if (n === e) return this.root.children[t][n].destroy();\n }\n }\n }\n }, {\n key: \"joinChild\",\n value: function value(t) {\n if (!this.getChildById(t.id)) {\n var n = new e(t, this.liveSocket, this);\n return this.root.children[this.id][n.id] = n, n.join(), this.childJoins++, !0;\n }\n }\n }, {\n key: \"isJoinPending\",\n value: function value() {\n return this.joinPending;\n }\n }, {\n key: \"ackJoin\",\n value: function value(e) {\n this.childJoins--, 0 === this.childJoins && (this.parent ? this.parent.ackJoin(this) : this.onAllChildJoinsComplete());\n }\n }, {\n key: \"onAllChildJoinsComplete\",\n value: function value() {\n this.joinCallback(), this.pendingJoinOps.forEach(function (e) {\n var t = x(e, 2),\n n = t[0],\n i = t[1];\n n.isDestroyed() || i();\n }), this.pendingJoinOps = [];\n }\n }, {\n key: \"update\",\n value: function value(e, t) {\n var n = this;\n if (this.isJoinPending() || this.liveSocket.hasPendingLink()) return this.pendingDiffs.push({\n diff: e,\n events: t\n });\n this.rendered.mergeDiff(e);\n var i = !1;\n this.rendered.isComponentOnlyDiff(e) ? this.liveSocket.time(\"component patch complete\", function () {\n le.findParentCIDs(n.el, n.rendered.componentCIDs(e)).forEach(function (t) {\n n.componentPatch(n.rendered.getComponent(e, t), t) && (i = !0);\n });\n }) : Q(e) || this.liveSocket.time(\"full patch complete\", function () {\n var t = n.renderContainer(e, \"update\"),\n r = new he(n, n.el, n.id, t, null);\n i = n.performPatch(r, !0);\n }), this.dispatchEvents(t), i && this.joinNewChildren();\n }\n }, {\n key: \"renderContainer\",\n value: function value(e, t) {\n var n = this;\n return this.liveSocket.time(\"toString diff (\".concat(t, \")\"), function () {\n var t = n.el.tagName,\n i = e ? n.rendered.componentCIDs(e).concat(n.pruningCIDs) : null,\n r = n.rendered.toString(i);\n return \"<\".concat(t, \">\").concat(r, \"\");\n });\n }\n }, {\n key: \"componentPatch\",\n value: function value(e, t) {\n if (Q(e)) return !1;\n var n = this.rendered.componentToString(t),\n i = new he(this, this.el, this.id, n, t);\n return this.performPatch(i, !0);\n }\n }, {\n key: \"getHook\",\n value: function value(e) {\n return this.viewHooks[pe.elementID(e)];\n }\n }, {\n key: \"addHook\",\n value: function value(e) {\n if (!pe.elementID(e) && e.getAttribute) {\n var t = e.getAttribute(\"data-phx-\".concat(\"hook\")) || e.getAttribute(this.binding(\"hook\"));\n\n if (!t || this.ownsElement(e)) {\n var n = this.liveSocket.getHookCallbacks(t);\n\n if (n) {\n e.id || z('no DOM ID for hook \"'.concat(t, '\". Hooks require a unique ID on each element.'), e);\n var i = new pe(this, e, n);\n return this.viewHooks[pe.elementID(i.el)] = i, i;\n }\n\n null !== t && z('unknown hook found for \"'.concat(t, '\"'), e);\n }\n }\n }\n }, {\n key: \"destroyHook\",\n value: function value(e) {\n e.__trigger__(\"destroyed\"), e.__cleanup__(), delete this.viewHooks[pe.elementID(e.el)];\n }\n }, {\n key: \"applyPendingUpdates\",\n value: function value() {\n var e = this;\n this.pendingDiffs.forEach(function (t) {\n var n = t.diff,\n i = t.events;\n return e.update(n, i);\n }), this.pendingDiffs = [];\n }\n }, {\n key: \"onChannel\",\n value: function value(e, t) {\n var n = this;\n this.liveSocket.onChannel(this.channel, e, function (e) {\n n.isJoinPending() ? n.root.pendingJoinOps.push([n, function () {\n return t(e);\n }]) : t(e);\n });\n }\n }, {\n key: \"bindChannel\",\n value: function value() {\n var e = this;\n this.liveSocket.onChannel(this.channel, \"diff\", function (t) {\n e.applyDiff(\"update\", t, function (t) {\n var n = t.diff,\n i = t.events;\n return e.update(n, i);\n });\n }), this.onChannel(\"redirect\", function (t) {\n var n = t.to,\n i = t.flash;\n return e.onRedirect({\n to: n,\n flash: i\n });\n }), this.onChannel(\"live_patch\", function (t) {\n return e.onLivePatch(t);\n }), this.onChannel(\"live_redirect\", function (t) {\n return e.onLiveRedirect(t);\n }), this.channel.onError(function (t) {\n return e.onError(t);\n }), this.channel.onClose(function (t) {\n return e.onClose(t);\n });\n }\n }, {\n key: \"destroyAllChildren\",\n value: function value() {\n for (var e in this.root.children[this.id]) {\n this.getChildById(e).destroy();\n }\n }\n }, {\n key: \"onLiveRedirect\",\n value: function value(e) {\n var t = e.to,\n n = e.kind,\n i = e.flash,\n r = this.expandURL(t);\n this.liveSocket.historyRedirect(r, n, i);\n }\n }, {\n key: \"onLivePatch\",\n value: function value(e) {\n var t = e.to,\n n = e.kind;\n this.href = this.expandURL(t), this.liveSocket.historyPatch(t, n);\n }\n }, {\n key: \"expandURL\",\n value: function value(e) {\n return e.startsWith(\"/\") ? \"\".concat(window.location.protocol, \"//\").concat(window.location.host).concat(e) : e;\n }\n }, {\n key: \"onRedirect\",\n value: function value(e) {\n var t = e.to,\n n = e.flash;\n this.liveSocket.redirect(t, n);\n }\n }, {\n key: \"isDestroyed\",\n value: function value() {\n return this.destroyed;\n }\n }, {\n key: \"join\",\n value: function value(e) {\n var t = this;\n this.parent || (this.stopCallback = this.liveSocket.withPageLoading({\n to: this.href,\n kind: \"initial\"\n })), this.joinCallback = function () {\n return e && e(t, t.joinCount);\n }, this.liveSocket.wrapPush(this, {\n timeout: !1\n }, function () {\n return t.channel.join().receive(\"ok\", function (e) {\n return t.onJoin(e);\n }).receive(\"error\", function (e) {\n return t.onJoinError(e);\n }).receive(\"timeout\", function () {\n return t.onJoinError({\n reason: \"timeout\"\n });\n });\n });\n }\n }, {\n key: \"onJoinError\",\n value: function value(e) {\n return (e.redirect || e.live_redirect) && (this.joinPending = !1, this.channel.leave()), e.redirect ? this.onRedirect(e.redirect) : e.live_redirect ? this.onLiveRedirect(e.live_redirect) : (this.log(\"error\", function () {\n return [\"unable to join\", e];\n }), this.liveSocket.reloadWithJitter(this));\n }\n }, {\n key: \"onClose\",\n value: function value(e) {\n if (!this.isDestroyed()) {\n if (this.isJoinPending() || this.liveSocket.hasPendingLink() && \"leave\" !== e) return this.liveSocket.reloadWithJitter(this);\n this.destroyAllChildren(), this.liveSocket.dropActiveElement(this), document.activeElement && document.activeElement.blur(), this.liveSocket.isUnloaded() && this.showLoader(200);\n }\n }\n }, {\n key: \"onError\",\n value: function value(e) {\n this.onClose(e), this.log(\"error\", function () {\n return [\"view crashed\", e];\n }), this.liveSocket.isUnloaded() || this.displayError();\n }\n }, {\n key: \"displayError\",\n value: function value() {\n this.isMain() && le.dispatchEvent(window, \"phx:page-loading-start\", {\n to: this.href,\n kind: \"error\"\n }), this.showLoader(), this.setContainerClasses(\"phx-disconnected\", \"phx-error\");\n }\n }, {\n key: \"pushWithReply\",\n value: function value(e, t, n) {\n var i = this,\n r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {},\n o = x(e ? e() : [null, []], 2),\n a = o[0],\n u = x(o[1], 1)[0],\n s = function s() {};\n\n return u && null !== u.getAttribute(this.binding(\"page-loading\")) && (s = this.liveSocket.withPageLoading({\n kind: \"element\",\n target: u\n })), \"number\" != typeof n.cid && delete n.cid, this.liveSocket.wrapPush(this, {\n timeout: !0\n }, function () {\n return i.channel.push(t, n, 3e4).receive(\"ok\", function (e) {\n var t = null;\n null !== a && i.undoRefs(a), e.diff && (t = i.applyDiff(\"update\", e.diff, function (e) {\n var t = e.diff,\n n = e.events;\n i.update(t, n);\n })), e.redirect && i.onRedirect(e.redirect), e.live_patch && i.onLivePatch(e.live_patch), e.live_redirect && i.onLiveRedirect(e.live_redirect), s(), r(e, t);\n });\n });\n }\n }, {\n key: \"undoRefs\",\n value: function value(e) {\n var t = this;\n le.all(this.el, \"[\".concat(F, '=\"').concat(e, '\"]'), function (e) {\n e.removeAttribute(F), null !== e.getAttribute(\"data-phx-readonly\") && (e.readOnly = !1, e.removeAttribute(\"data-phx-readonly\")), null !== e.getAttribute(\"data-phx-disabled\") && (e.disabled = !1, e.removeAttribute(\"data-phx-disabled\")), H.forEach(function (t) {\n return le.removeClass(e, t);\n });\n var n = e.getAttribute(\"data-phx-disable-with-restore\");\n null !== n && (e.innerText = n, e.removeAttribute(\"data-phx-disable-with-restore\"));\n var i = le[\"private\"](e, F);\n\n if (i) {\n var r = t.triggerBeforeUpdateHook(e, i);\n he.patchEl(e, i, t.liveSocket.getActiveElement()), r && t.triggerUpdatedHook(r), le.deletePrivate(e, F);\n }\n });\n }\n }, {\n key: \"putRef\",\n value: function value(e, t) {\n var n = this.ref++,\n i = this.binding(\"disable-with\");\n return e.forEach(function (e) {\n e.classList.add(\"phx-\".concat(t, \"-loading\")), e.setAttribute(F, n);\n var r = e.getAttribute(i);\n null !== r && (e.getAttribute(\"data-phx-disable-with-restore\") || e.setAttribute(\"data-phx-disable-with-restore\", e.innerText), e.innerText = r);\n }), [n, e];\n }\n }, {\n key: \"componentID\",\n value: function value(e) {\n var t = e.getAttribute && e.getAttribute(j);\n return t ? parseInt(t) : null;\n }\n }, {\n key: \"targetComponentID\",\n value: function value(e, t) {\n return e.getAttribute(this.binding(\"target\")) ? this.closestComponentID(t) : null;\n }\n }, {\n key: \"closestComponentID\",\n value: function value(e) {\n var t = this;\n return e ? Z(e.closest(\"[\".concat(j, \"]\")), function (e) {\n return t.ownsElement(e) && t.componentID(e);\n }) : null;\n }\n }, {\n key: \"pushHookEvent\",\n value: function value(e, t, n, i) {\n var r = x(this.putRef([], \"hook\"), 2),\n o = r[0],\n a = r[1];\n return this.pushWithReply(function () {\n return [o, a];\n }, \"event\", {\n type: \"hook\",\n event: t,\n value: n,\n cid: this.closestComponentID(e)\n }, function (e, t) {\n return i(t, o);\n }), o;\n }\n }, {\n key: \"extractMeta\",\n value: function value(e, t) {\n for (var n = this.binding(\"value-\"), i = 0; i < e.attributes.length; i++) {\n var r = e.attributes[i].name;\n r.startsWith(n) && (t[r.replace(n, \"\")] = e.getAttribute(r));\n }\n\n return void 0 !== e.value && (t.value = e.value, \"INPUT\" === e.tagName && U.indexOf(e.type) >= 0 && !e.checked && delete t.value), t;\n }\n }, {\n key: \"pushEvent\",\n value: function value(e, t, n, i, r) {\n var o = this;\n this.pushWithReply(function () {\n return o.putRef([t], e);\n }, \"event\", {\n type: e,\n event: i,\n value: this.extractMeta(t, r),\n cid: this.targetComponentID(t, n)\n });\n }\n }, {\n key: \"pushKey\",\n value: function value(e, t, n, i, r) {\n var o = this;\n this.pushWithReply(function () {\n return o.putRef([e], n);\n }, \"event\", {\n type: n,\n event: i,\n value: this.extractMeta(e, r),\n cid: this.targetComponentID(e, t)\n });\n }\n }, {\n key: \"pushFileProgress\",\n value: function value(e, t, n) {\n var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {};\n this.liveSocket.withinOwners(e.form, function (r, o) {\n r.pushWithReply(null, \"progress\", {\n event: e.getAttribute(r.binding(\"progress\")),\n ref: e.getAttribute(\"data-phx-upload-ref\"),\n entry_ref: t,\n progress: n,\n cid: r.targetComponentID(e.form, o)\n }, i);\n });\n }\n }, {\n key: \"pushInput\",\n value: function value(e, t, n, i, r) {\n var o = this,\n a = this.targetComponentID(e.form, t),\n u = function u() {\n return o.putRef([e, e.form], \"change\");\n },\n s = ae(e.form, {\n _target: i.name\n });\n\n e.files && e.files.length > 0 && ie.trackFiles(e, Array.from(e.files));\n var c = {\n type: \"form\",\n event: n,\n value: s,\n uploads: ie.serializeUploads(e),\n cid: a\n };\n this.pushWithReply(u, \"event\", c, function (n) {\n if (\"file\" === e.type && null !== e.getAttribute(\"data-phx-auto-upload\")) {\n if (ie.filesAwaitingPreflight(e).length > 0) {\n var i = x(u(), 2),\n s = i[0];\n i[1];\n o.uploadFiles(e.form, t, s, a, function (t) {\n r && r(n), o.triggerAwaitingSubmit(e.form);\n });\n }\n } else r && r(n);\n });\n }\n }, {\n key: \"triggerAwaitingSubmit\",\n value: function value(e) {\n var t = this.getScheduledSubmit(e);\n\n if (t) {\n var n = x(t, 3),\n i = (n[0], n[1], n[2]);\n this.cancelSubmit(e), i();\n }\n }\n }, {\n key: \"getScheduledSubmit\",\n value: function value(e) {\n return this.formSubmits.find(function (t) {\n var n = x(t, 2),\n i = n[0];\n n[1];\n return i.isSameNode(e);\n });\n }\n }, {\n key: \"scheduleSubmit\",\n value: function value(e, t, n) {\n if (this.getScheduledSubmit(e)) return !0;\n this.formSubmits.push([e, t, n]);\n }\n }, {\n key: \"cancelSubmit\",\n value: function value(e) {\n var t = this;\n this.formSubmits = this.formSubmits.filter(function (n) {\n var i = x(n, 3),\n r = i[0],\n o = i[1];\n i[2];\n return !r.isSameNode(e) || (t.undoRefs(o), !1);\n });\n }\n }, {\n key: \"pushFormSubmit\",\n value: function value(e, t, n, i) {\n var r = this,\n o = function o(e) {\n return !(G(e, \"\".concat(r.binding(\"update\"), \"=ignore\"), e.form) || G(e, \"data-phx-update=ignore\", e.form));\n },\n a = function a() {\n var t = le.all(e, \"[\".concat(r.binding(\"disable-with\"), \"]\")),\n n = le.all(e, \"button\").filter(o),\n i = le.all(e, \"input,textarea,select\").filter(o);\n return n.forEach(function (e) {\n e.setAttribute(\"data-phx-disabled\", e.disabled), e.disabled = !0;\n }), i.forEach(function (e) {\n e.setAttribute(\"data-phx-readonly\", e.readOnly), e.readOnly = !0, e.files && (e.setAttribute(\"data-phx-disabled\", e.disabled), e.disabled = !0);\n }), e.setAttribute(r.binding(\"page-loading\"), \"\"), r.putRef([e].concat(t).concat(n).concat(i), \"submit\");\n },\n u = this.targetComponentID(e, t);\n\n if (ie.hasUploadsInProgress(e)) {\n var s = x(a(), 2),\n c = s[0];\n s[1];\n return this.scheduleSubmit(e, c, function () {\n return r.pushFormSubmit(e, t, n, i);\n });\n }\n\n if (ie.inputsAwaitingPreflight(e).length > 0) {\n var l = x(a(), 2),\n d = l[0],\n h = l[1],\n f = function f() {\n return [d, h];\n };\n\n this.uploadFiles(e, t, d, u, function (t) {\n var o = ae(e, {});\n r.pushWithReply(f, \"event\", {\n type: \"form\",\n event: n,\n value: o,\n cid: u\n }, i);\n });\n } else {\n var v = ae(e);\n this.pushWithReply(a, \"event\", {\n type: \"form\",\n event: n,\n value: v,\n cid: u\n }, i);\n }\n }\n }, {\n key: \"uploadFiles\",\n value: function value(e, t, n, i, r) {\n var o = this,\n a = this.joinCount;\n ie.activeFileInputs(e).forEach(function (e) {\n var i = new ie(e, o, r);\n o.uploaders[e] = i;\n var u = i.entries().map(function (e) {\n return e.toPreflightPayload();\n }),\n s = {\n ref: e.getAttribute(\"data-phx-upload-ref\"),\n entries: u,\n cid: o.targetComponentID(e.form, t)\n };\n o.log(\"upload\", function () {\n return [\"sending preflight request\", s];\n }), o.pushWithReply(null, \"allow_upload\", s, function (e) {\n if (o.log(\"upload\", function () {\n return [\"got preflight response\", e];\n }), e.error) {\n o.undoRefs(n);\n var t = x(e.error, 2),\n r = t[0],\n u = t[1];\n o.log(\"upload\", function () {\n return [\"error for entry \".concat(r), u];\n });\n } else {\n i.initAdapterUpload(e, function (e) {\n o.channel.onError(function () {\n o.joinCount === a && e();\n });\n }, o.liveSocket);\n }\n });\n });\n }\n }, {\n key: \"pushFormRecovery\",\n value: function value(e, t) {\n var n = this;\n this.liveSocket.withinOwners(e, function (i, r) {\n var o = e.elements[0],\n a = e.getAttribute(n.binding(\"auto-recover\")) || e.getAttribute(n.binding(\"change\"));\n i.pushInput(o, r, a, o, t);\n });\n }\n }, {\n key: \"pushLinkPatch\",\n value: function value(e, t, n) {\n var i = this,\n r = this.liveSocket.setPendingLink(e),\n o = t ? function () {\n return i.putRef([t], \"click\");\n } : null;\n this.pushWithReply(o, \"link\", {\n url: e\n }, function (t) {\n t.link_redirect ? i.liveSocket.replaceMain(e, null, n, r) : i.liveSocket.commitPendingLink(r) && (i.href = e, i.applyPendingUpdates(), n && n());\n }).receive(\"timeout\", function () {\n return i.liveSocket.redirect(window.location.href);\n });\n }\n }, {\n key: \"formsForRecovery\",\n value: function value(e) {\n var t = this;\n if (this.joinCount <= 1) return [];\n var n = this.binding(\"change\"),\n i = document.createElement(\"template\");\n return i.innerHTML = e, le.all(this.el, \"form[\".concat(n, \"]\")).filter(function (e) {\n return t.ownsElement(e);\n }).filter(function (e) {\n return e.elements.length > 0;\n }).filter(function (e) {\n return \"ignore\" !== e.getAttribute(t.binding(\"auto-recover\"));\n }).filter(function (e) {\n return i.content.querySelector(\"form[\".concat(n, '=\"').concat(e.getAttribute(n), '\"]'));\n });\n }\n }, {\n key: \"maybePushComponentsDestroyed\",\n value: function value(e) {\n var t,\n n = this,\n i = e.filter(function (e) {\n return 0 === le.findComponentNodeList(n.el, e).length;\n });\n i.length > 0 && ((t = this.pruningCIDs).push.apply(t, E(i)), this.pushWithReply(null, \"cids_will_destroy\", {\n cids: i\n }, function () {\n n.pruningCIDs = n.pruningCIDs.filter(function (e) {\n return -1 !== i.indexOf(e);\n });\n var e = i.filter(function (e) {\n return 0 === le.findComponentNodeList(n.el, e).length;\n });\n e.length > 0 && n.pushWithReply(null, \"cids_destroyed\", {\n cids: e\n }, function (e) {\n n.rendered.pruneCIDs(e.cids);\n });\n }));\n }\n }, {\n key: \"ownsElement\",\n value: function value(e) {\n return e.getAttribute(\"data-phx-parent-id\") === this.id || Z(e.closest(M), function (e) {\n return e.id;\n }) === this.id;\n }\n }, {\n key: \"submitForm\",\n value: function value(e, t, n) {\n var i = this;\n le.putPrivate(e, \"phx-has-submitted\", !0), this.liveSocket.blurActiveElement(this), this.pushFormSubmit(e, t, n, function () {\n i.liveSocket.restorePreviouslyActiveFocus();\n });\n }\n }, {\n key: \"binding\",\n value: function value(e) {\n return this.liveSocket.binding(e);\n }\n }]), e;\n }(),\n ve = 1,\n pe = function () {\n function e(t, n, i) {\n for (var r in T(this, e), this.__view = t, this.__liveSocket = t.liveSocket, this.__callbacks = i, this.__listeners = new Set(), this.el = n, this.viewName = t.name(), this.el.phxHookId = this.constructor.makeID(), this.__callbacks) {\n this[r] = this.__callbacks[r];\n }\n }\n\n return D(e, null, [{\n key: \"makeID\",\n value: function value() {\n return ve++;\n }\n }, {\n key: \"elementID\",\n value: function value(e) {\n return e.phxHookId;\n }\n }]), D(e, [{\n key: \"pushEvent\",\n value: function value(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {};\n return this.__view.pushHookEvent(null, e, t, n);\n }\n }, {\n key: \"pushEventTo\",\n value: function value(e, t) {\n var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},\n i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {};\n return this.__view.withinTargets(e, function (e, r) {\n return e.pushHookEvent(r, t, n, i);\n });\n }\n }, {\n key: \"handleEvent\",\n value: function value(e, t) {\n var n = function n(_n, i) {\n return i ? e : t(_n.detail);\n };\n\n return window.addEventListener(\"phx:hook:\".concat(e), n), this.__listeners.add(n), n;\n }\n }, {\n key: \"removeHandleEvent\",\n value: function value(e) {\n var t = e(null, !0);\n window.removeEventListener(\"phx:hook:\".concat(t), e), this.__listeners[\"delete\"](e);\n }\n }, {\n key: \"__cleanup__\",\n value: function value() {\n var e = this;\n\n this.__listeners.forEach(function (t) {\n return e.removeHandleEvent(t);\n });\n }\n }, {\n key: \"__trigger__\",\n value: function value(e) {\n var t = this.__callbacks[e];\n t && t.call(this);\n }\n }]), e;\n }();\n\n t[\"default\"] = se;\n }, function (e, t) {\n var n;\n\n n = function () {\n return this;\n }();\n\n try {\n n = n || Function(\"return this\")() || (0, eval)(\"this\");\n } catch (e) {\n \"object\" == (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) && (n = window);\n }\n\n e.exports = n;\n }, function (e, t, n) {\n (function (t) {\n t.Phoenix || (t.Phoenix = {}), e.exports = t.Phoenix.LiveView = n(0);\n }).call(this, n(1));\n }]);\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../assets/node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack:///../deps/phoenix_live_view/priv/static/phoenix_live_view.js?"); /***/ }), /***/ "./css/app.scss": /*!**********************!*\ !*** ./css/app.scss ***! \**********************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/app.scss?"); /***/ }), /***/ "./js/app.js": /*!*******************!*\ !*** ./js/app.js ***! \*******************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _css_app_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../css/app.scss */ \"./css/app.scss\");\n/* harmony import */ var _css_app_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_app_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var phoenix_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! phoenix_html */ \"../deps/phoenix_html/priv/static/phoenix_html.js\");\n/* harmony import */ var phoenix_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(phoenix_html__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var phoenix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! phoenix */ \"../deps/phoenix/priv/static/phoenix.js\");\n/* harmony import */ var phoenix__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(phoenix__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var nprogress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! nprogress */ \"./node_modules/nprogress/nprogress.js\");\n/* harmony import */ var nprogress__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nprogress__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var phoenix_live_view__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! phoenix_live_view */ \"../deps/phoenix_live_view/priv/static/phoenix_live_view.js\");\n/* harmony import */ var phoenix_live_view__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(phoenix_live_view__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\nfunction cookieValue(name) {\n if (document.cookie) {\n var cookie = document.cookie.split('; ').find(function (row) {\n return row.startsWith(name + '=');\n });\n\n if (cookie) {\n var value = cookie.split('=')[1];\n\n if (value) {\n return value.split(';')[0];\n } else {\n return null;\n }\n } else {\n return null;\n }\n } else {\n return null;\n }\n\n ;\n}\n\nvar socketPath = document.querySelector(\"html\").getAttribute(\"phx-socket\") || \"/live\";\nvar csrfToken = document.querySelector(\"meta[name='csrf-token']\").getAttribute(\"content\");\nvar Hooks = {};\nHooks.Actor = {\n mounted: function mounted() {\n this.handleEvent(\"set_actor\", function (payload) {\n document.cookie = 'actor_resource' + '=' + payload.resource + ';path=/';\n document.cookie = 'actor_primary_key' + '=' + payload.primary_key + ';path=/';\n document.cookie = 'actor_action' + '=' + payload.action + ';path=/';\n document.cookie = 'actor_api' + '=' + payload.api + ';path=/';\n });\n this.handleEvent(\"clear_actor\", function () {\n document.cookie = 'actor_resource' + '=' + ';path=/';\n document.cookie = 'actor_primary_key' + '=' + ';path=/';\n document.cookie = 'actor_action' + ';path=/';\n document.cookie = 'actor_api' + '=' + ';path=/';\n document.cookie = 'actor_authorizing=false;path=/';\n document.cookie = 'actor_paused=true;path=/';\n });\n this.handleEvent(\"toggle_authorizing\", function (payload) {\n document.cookie = 'actor_authorizing' + '=' + payload.authorizing + ';path=/';\n });\n this.handleEvent(\"toggle_actor_paused\", function (payload) {\n document.cookie = 'actor_paused' + '=' + payload.actor_paused + ';path=/';\n });\n }\n};\nHooks.Tenant = {\n mounted: function mounted() {\n this.handleEvent('set_tenant', function (payload) {\n document.cookie = 'tenant' + '=' + payload.tenant + ';path=/';\n });\n this.handleEvent('clear_tenant', function () {\n document.cookie = 'tenant' + '=' + ';path=/';\n });\n }\n};\nvar liveSocket = new phoenix_live_view__WEBPACK_IMPORTED_MODULE_4__[\"LiveSocket\"](socketPath, phoenix__WEBPACK_IMPORTED_MODULE_2__[\"Socket\"], {\n hooks: Hooks,\n params: {\n _csrf_token: csrfToken\n }\n}); // Show progress bar on live navigation and form submits\n\nwindow.addEventListener(\"phx:page-loading-start\", function (info) {\n return nprogress__WEBPACK_IMPORTED_MODULE_3___default.a.start();\n});\nwindow.addEventListener(\"phx:page-loading-stop\", function (info) {\n return nprogress__WEBPACK_IMPORTED_MODULE_3___default.a.done();\n}); // connect if there are any LiveViews on the page\n\nliveSocket.connect(); // expose liveSocket on window for web console debug logs and latency simulation:\n// >> liveSocket.enableDebug()\n// >> liveSocket.enableLatencySim(1000)\n\nwindow.liveSocket = liveSocket;\n\n//# sourceURL=webpack:///./js/app.js?"); /***/ }), /***/ "./node_modules/nprogress/nprogress.js": /*!*********************************************!*\ !*** ./node_modules/nprogress/nprogress.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress\n * @license MIT */\n\n;(function(root, factory) {\n\n if (true) {\n !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {}\n\n})(this, function() {\n var NProgress = {};\n\n NProgress.version = '0.2.0';\n\n var Settings = NProgress.settings = {\n minimum: 0.08,\n easing: 'ease',\n positionUsing: '',\n speed: 200,\n trickle: true,\n trickleRate: 0.02,\n trickleSpeed: 800,\n showSpinner: true,\n barSelector: '[role=\"bar\"]',\n spinnerSelector: '[role=\"spinner\"]',\n parent: 'body',\n template: '
'\n };\n\n /**\n * Updates configuration.\n *\n * NProgress.configure({\n * minimum: 0.1\n * });\n */\n NProgress.configure = function(options) {\n var key, value;\n for (key in options) {\n value = options[key];\n if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;\n }\n\n return this;\n };\n\n /**\n * Last number.\n */\n\n NProgress.status = null;\n\n /**\n * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.\n *\n * NProgress.set(0.4);\n * NProgress.set(1.0);\n */\n\n NProgress.set = function(n) {\n var started = NProgress.isStarted();\n\n n = clamp(n, Settings.minimum, 1);\n NProgress.status = (n === 1 ? null : n);\n\n var progress = NProgress.render(!started),\n bar = progress.querySelector(Settings.barSelector),\n speed = Settings.speed,\n ease = Settings.easing;\n\n progress.offsetWidth; /* Repaint */\n\n queue(function(next) {\n // Set positionUsing if it hasn't already been set\n if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();\n\n // Add transition\n css(bar, barPositionCSS(n, speed, ease));\n\n if (n === 1) {\n // Fade out\n css(progress, { \n transition: 'none', \n opacity: 1 \n });\n progress.offsetWidth; /* Repaint */\n\n setTimeout(function() {\n css(progress, { \n transition: 'all ' + speed + 'ms linear', \n opacity: 0 \n });\n setTimeout(function() {\n NProgress.remove();\n next();\n }, speed);\n }, speed);\n } else {\n setTimeout(next, speed);\n }\n });\n\n return this;\n };\n\n NProgress.isStarted = function() {\n return typeof NProgress.status === 'number';\n };\n\n /**\n * Shows the progress bar.\n * This is the same as setting the status to 0%, except that it doesn't go backwards.\n *\n * NProgress.start();\n *\n */\n NProgress.start = function() {\n if (!NProgress.status) NProgress.set(0);\n\n var work = function() {\n setTimeout(function() {\n if (!NProgress.status) return;\n NProgress.trickle();\n work();\n }, Settings.trickleSpeed);\n };\n\n if (Settings.trickle) work();\n\n return this;\n };\n\n /**\n * Hides the progress bar.\n * This is the *sort of* the same as setting the status to 100%, with the\n * difference being `done()` makes some placebo effect of some realistic motion.\n *\n * NProgress.done();\n *\n * If `true` is passed, it will show the progress bar even if its hidden.\n *\n * NProgress.done(true);\n */\n\n NProgress.done = function(force) {\n if (!force && !NProgress.status) return this;\n\n return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);\n };\n\n /**\n * Increments by a random amount.\n */\n\n NProgress.inc = function(amount) {\n var n = NProgress.status;\n\n if (!n) {\n return NProgress.start();\n } else {\n if (typeof amount !== 'number') {\n amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);\n }\n\n n = clamp(n + amount, 0, 0.994);\n return NProgress.set(n);\n }\n };\n\n NProgress.trickle = function() {\n return NProgress.inc(Math.random() * Settings.trickleRate);\n };\n\n /**\n * Waits for all supplied jQuery promises and\n * increases the progress as the promises resolve.\n *\n * @param $promise jQUery Promise\n */\n (function() {\n var initial = 0, current = 0;\n\n NProgress.promise = function($promise) {\n if (!$promise || $promise.state() === \"resolved\") {\n return this;\n }\n\n if (current === 0) {\n NProgress.start();\n }\n\n initial++;\n current++;\n\n $promise.always(function() {\n current--;\n if (current === 0) {\n initial = 0;\n NProgress.done();\n } else {\n NProgress.set((initial - current) / initial);\n }\n });\n\n return this;\n };\n\n })();\n\n /**\n * (Internal) renders the progress bar markup based on the `template`\n * setting.\n */\n\n NProgress.render = function(fromStart) {\n if (NProgress.isRendered()) return document.getElementById('nprogress');\n\n addClass(document.documentElement, 'nprogress-busy');\n \n var progress = document.createElement('div');\n progress.id = 'nprogress';\n progress.innerHTML = Settings.template;\n\n var bar = progress.querySelector(Settings.barSelector),\n perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),\n parent = document.querySelector(Settings.parent),\n spinner;\n \n css(bar, {\n transition: 'all 0 linear',\n transform: 'translate3d(' + perc + '%,0,0)'\n });\n\n if (!Settings.showSpinner) {\n spinner = progress.querySelector(Settings.spinnerSelector);\n spinner && removeElement(spinner);\n }\n\n if (parent != document.body) {\n addClass(parent, 'nprogress-custom-parent');\n }\n\n parent.appendChild(progress);\n return progress;\n };\n\n /**\n * Removes the element. Opposite of render().\n */\n\n NProgress.remove = function() {\n removeClass(document.documentElement, 'nprogress-busy');\n removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');\n var progress = document.getElementById('nprogress');\n progress && removeElement(progress);\n };\n\n /**\n * Checks if the progress bar is rendered.\n */\n\n NProgress.isRendered = function() {\n return !!document.getElementById('nprogress');\n };\n\n /**\n * Determine which positioning CSS rule to use.\n */\n\n NProgress.getPositioningCSS = function() {\n // Sniff on document.body.style\n var bodyStyle = document.body.style;\n\n // Sniff prefixes\n var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :\n ('MozTransform' in bodyStyle) ? 'Moz' :\n ('msTransform' in bodyStyle) ? 'ms' :\n ('OTransform' in bodyStyle) ? 'O' : '';\n\n if (vendorPrefix + 'Perspective' in bodyStyle) {\n // Modern browsers with 3D support, e.g. Webkit, IE10\n return 'translate3d';\n } else if (vendorPrefix + 'Transform' in bodyStyle) {\n // Browsers without 3D support, e.g. IE9\n return 'translate';\n } else {\n // Browsers without translate() support, e.g. IE7-8\n return 'margin';\n }\n };\n\n /**\n * Helpers\n */\n\n function clamp(n, min, max) {\n if (n < min) return min;\n if (n > max) return max;\n return n;\n }\n\n /**\n * (Internal) converts a percentage (`0..1`) to a bar translateX\n * percentage (`-100%..0%`).\n */\n\n function toBarPerc(n) {\n return (-1 + n) * 100;\n }\n\n\n /**\n * (Internal) returns the correct CSS for changing the bar's\n * position given an n percentage, and speed and ease from Settings\n */\n\n function barPositionCSS(n, speed, ease) {\n var barCSS;\n\n if (Settings.positionUsing === 'translate3d') {\n barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };\n } else if (Settings.positionUsing === 'translate') {\n barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };\n } else {\n barCSS = { 'margin-left': toBarPerc(n)+'%' };\n }\n\n barCSS.transition = 'all '+speed+'ms '+ease;\n\n return barCSS;\n }\n\n /**\n * (Internal) Queues a function to be executed.\n */\n\n var queue = (function() {\n var pending = [];\n \n function next() {\n var fn = pending.shift();\n if (fn) {\n fn(next);\n }\n }\n\n return function(fn) {\n pending.push(fn);\n if (pending.length == 1) next();\n };\n })();\n\n /**\n * (Internal) Applies css properties to an element, similar to the jQuery \n * css method.\n *\n * While this helper does assist with vendor prefixed property names, it \n * does not perform any manipulation of values prior to setting styles.\n */\n\n var css = (function() {\n var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],\n cssProps = {};\n\n function camelCase(string) {\n return string.replace(/^-ms-/, 'ms-').replace(/-([\\da-z])/gi, function(match, letter) {\n return letter.toUpperCase();\n });\n }\n\n function getVendorProp(name) {\n var style = document.body.style;\n if (name in style) return name;\n\n var i = cssPrefixes.length,\n capName = name.charAt(0).toUpperCase() + name.slice(1),\n vendorName;\n while (i--) {\n vendorName = cssPrefixes[i] + capName;\n if (vendorName in style) return vendorName;\n }\n\n return name;\n }\n\n function getStyleProp(name) {\n name = camelCase(name);\n return cssProps[name] || (cssProps[name] = getVendorProp(name));\n }\n\n function applyCss(element, prop, value) {\n prop = getStyleProp(prop);\n element.style[prop] = value;\n }\n\n return function(element, properties) {\n var args = arguments,\n prop, \n value;\n\n if (args.length == 2) {\n for (prop in properties) {\n value = properties[prop];\n if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);\n }\n } else {\n applyCss(element, args[1], args[2]);\n }\n }\n })();\n\n /**\n * (Internal) Determines if an element or space separated list of class names contains a class name.\n */\n\n function hasClass(element, name) {\n var list = typeof element == 'string' ? element : classList(element);\n return list.indexOf(' ' + name + ' ') >= 0;\n }\n\n /**\n * (Internal) Adds a class to an element.\n */\n\n function addClass(element, name) {\n var oldList = classList(element),\n newList = oldList + name;\n\n if (hasClass(oldList, name)) return; \n\n // Trim the opening space.\n element.className = newList.substring(1);\n }\n\n /**\n * (Internal) Removes a class from an element.\n */\n\n function removeClass(element, name) {\n var oldList = classList(element),\n newList;\n\n if (!hasClass(element, name)) return;\n\n // Replace the class name.\n newList = oldList.replace(' ' + name + ' ', ' ');\n\n // Trim the opening and closing spaces.\n element.className = newList.substring(1, newList.length - 1);\n }\n\n /**\n * (Internal) Gets a space separated list of the class names on the element. \n * The list is wrapped with a single space on each end to facilitate finding \n * matches within the list.\n */\n\n function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }\n\n /**\n * (Internal) Removes an element from the DOM.\n */\n\n function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n\n return NProgress;\n});\n\n\n\n//# sourceURL=webpack:///./node_modules/nprogress/nprogress.js?"); /***/ }), /***/ "./node_modules/webpack/buildin/module.js": /*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports) { eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack:///(webpack)/buildin/module.js?"); /***/ }), /***/ 0: /*!*************************!*\ !*** multi ./js/app.js ***! \*************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("module.exports = __webpack_require__(/*! ./js/app.js */\"./js/app.js\");\n\n\n//# sourceURL=webpack:///multi_./js/app.js?"); /***/ }) /******/ });