mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 04:31:46 +02:00
2 lines
36 KiB
JavaScript
2 lines
36 KiB
JavaScript
!function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var o = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports } n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: r }) }, n.r = function (t) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }) }, n.t = function (t, e) { if (1 & e && (t = n(t)), 8 & e) return t; if (4 & e && "object" == typeof t && t && t.__esModule) return t; var r = Object.create(null); if (n.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: t }), 2 & e && "string" != typeof t) for (var o in t) n.d(r, o, function (e) { return t[e] }.bind(null, o)); return r }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "/dist/", n(n.s = 44) }([function (t, e) { var n = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); "number" == typeof __g && (__g = n) }, function (t, e, n) { var r = n(32)("wks"), o = n(33), i = n(0).Symbol, u = "function" == typeof i; (t.exports = function (t) { return r[t] || (r[t] = u && i[t] || (u ? i : o)("Symbol." + t)) }).store = r }, function (t, e) { var n = t.exports = { version: "2.6.10" }; "number" == typeof __e && (__e = n) }, function (t, e, n) { var r = n(9); t.exports = function (t) { if (!r(t)) throw TypeError(t + " is not an object!"); return t } }, function (t, e) { t.exports = {} }, function (t, e, n) { var r = n(8), o = n(30); t.exports = n(6) ? function (t, e, n) { return r.f(t, e, o(1, n)) } : function (t, e, n) { return t[e] = n, t } }, function (t, e, n) { t.exports = !n(29)((function () { return 7 != Object.defineProperty({}, "a", { get: function () { return 7 } }).a })) }, function (t, e, n) { var r = n(0), o = n(2), i = n(12), u = n(5), c = n(14), a = function (t, e, n) { var s, f, l, h = t & a.F, p = t & a.G, v = t & a.S, d = t & a.P, y = t & a.B, m = t & a.W, g = p ? o : o[e] || (o[e] = {}), x = g.prototype, _ = p ? r : v ? r[e] : (r[e] || {}).prototype; for (s in p && (n = e), n) (f = !h && _ && void 0 !== _[s]) && c(g, s) || (l = f ? _[s] : n[s], g[s] = p && "function" != typeof _[s] ? n[s] : y && f ? i(l, r) : m && _[s] == l ? function (t) { var e = function (e, n, r) { if (this instanceof t) { switch (arguments.length) { case 0: return new t; case 1: return new t(e); case 2: return new t(e, n) }return new t(e, n, r) } return t.apply(this, arguments) }; return e.prototype = t.prototype, e }(l) : d && "function" == typeof l ? i(Function.call, l) : l, d && ((g.virtual || (g.virtual = {}))[s] = l, t & a.R && x && !x[s] && u(x, s, l))) }; a.F = 1, a.G = 2, a.S = 4, a.P = 8, a.B = 16, a.W = 32, a.U = 64, a.R = 128, t.exports = a }, function (t, e, n) { var r = n(3), o = n(51), i = n(52), u = Object.defineProperty; e.f = n(6) ? Object.defineProperty : function (t, e, n) { if (r(t), e = i(e, !0), r(n), o) try { return u(t, e, n) } catch (t) { } if ("get" in n || "set" in n) throw TypeError("Accessors not supported!"); return "value" in n && (t[e] = n.value), t } }, function (t, e) { t.exports = function (t) { return "object" == typeof t ? null !== t : "function" == typeof t } }, function (t, e, n) { t.exports = n(83) }, function (t, e) { var n = {}.toString; t.exports = function (t) { return n.call(t).slice(8, -1) } }, function (t, e, n) { var r = n(13); t.exports = function (t, e, n) { if (r(t), void 0 === e) return t; switch (n) { case 1: return function (n) { return t.call(e, n) }; case 2: return function (n, r) { return t.call(e, n, r) }; case 3: return function (n, r, o) { return t.call(e, n, r, o) } }return function () { return t.apply(e, arguments) } } }, function (t, e) { t.exports = function (t) { if ("function" != typeof t) throw TypeError(t + " is not a function!"); return t } }, function (t, e) { var n = {}.hasOwnProperty; t.exports = function (t, e) { return n.call(t, e) } }, function (t, e, n) { n(47); for (var r = n(0), o = n(5), i = n(4), u = n(1)("toStringTag"), c = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), a = 0; a < c.length; a++) { var s = c[a], f = r[s], l = f && f.prototype; l && !l[u] && o(l, u, s), i[s] = i.Array } }, function (t, e, n) { var r = n(50), o = n(17); t.exports = function (t) { return r(o(t)) } }, function (t, e) { t.exports = function (t) { if (null == t) throw TypeError("Can't call method on " + t); return t } }, function (t, e) { t.exports = !0 }, function (t, e, n) { var r = n(9), o = n(0).document, i = r(o) && r(o.createElement); t.exports = function (t) { return i ? o.createElement(t) : {} } }, function (t, e) { var n = Math.ceil, r = Math.floor; t.exports = function (t) { return isNaN(t = +t) ? 0 : (t > 0 ? r : n)(t) } }, function (t, e, n) { var r = n(32)("keys"), o = n(33); t.exports = function (t) { return r[t] || (r[t] = o(t)) } }, function (t, e, n) { var r = n(8).f, o = n(14), i = n(1)("toStringTag"); t.exports = function (t, e, n) { t && !o(t = n ? t : t.prototype, i) && r(t, i, { configurable: !0, value: e }) } }, function (t, e, n) { "use strict"; var r = n(63)(!0); n(28)(String, "String", (function (t) { this._t = String(t), this._i = 0 }), (function () { var t, e = this._t, n = this._i; return n >= e.length ? { value: void 0, done: !0 } : (t = r(e, n), this._i += t.length, { value: t, done: !1 }) })) }, function (t, e, n) { var r = n(11), o = n(1)("toStringTag"), i = "Arguments" == r(function () { return arguments }()); t.exports = function (t) { var e, n, u; return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (n = function (t, e) { try { return t[e] } catch (t) { } }(e = Object(t), o)) ? n : i ? r(e) : "Object" == (u = r(e)) && "function" == typeof e.callee ? "Arguments" : u } }, function (t, e, n) { "use strict"; var r = n(13); function o(t) { var e, n; this.promise = new t((function (t, r) { if (void 0 !== e || void 0 !== n) throw TypeError("Bad Promise constructor"); e = t, n = r })), this.resolve = r(e), this.reject = r(n) } t.exports.f = function (t) { return new o(t) } }, function (t, e, n) { t.exports = { default: n(68), __esModule: !0 } }, function (t, e, n) { "use strict"; e.__esModule = !0; var r, o = n(26), i = (r = o) && r.__esModule ? r : { default: r }; e.default = function (t) { return function () { var e = t.apply(this, arguments); return new i.default((function (t, n) { return function r(o, u) { try { var c = e[o](u), a = c.value } catch (t) { return void n(t) } if (!c.done) return i.default.resolve(a).then((function (t) { r("next", t) }), (function (t) { r("throw", t) })); t(a) }("next") })) } } }, function (t, e, n) { "use strict"; var r = n(18), o = n(7), i = n(53), u = n(5), c = n(4), a = n(54), s = n(22), f = n(61), l = n(1)("iterator"), h = !([].keys && "next" in [].keys()), p = function () { return this }; t.exports = function (t, e, n, v, d, y, m) { a(n, e, v); var g, x, _, w = function (t) { if (!h && t in L) return L[t]; switch (t) { case "keys": case "values": return function () { return new n(this, t) } }return function () { return new n(this, t) } }, b = e + " Iterator", O = "values" == d, j = !1, L = t.prototype, S = L[l] || L["@@iterator"] || d && L[d], P = S || w(d), E = d ? O ? w("entries") : P : void 0, T = "Array" == e && L.entries || S; if (T && (_ = f(T.call(new t))) !== Object.prototype && _.next && (s(_, b, !0), r || "function" == typeof _[l] || u(_, l, p)), O && S && "values" !== S.name && (j = !0, P = function () { return S.call(this) }), r && !m || !h && !j && L[l] || u(L, l, P), c[e] = P, c[b] = p, d) if (g = { values: O ? P : w("values"), keys: y ? P : w("keys"), entries: E }, m) for (x in g) x in L || i(L, x, g[x]); else o(o.P + o.F * (h || j), e, g); return g } }, function (t, e) { t.exports = function (t) { try { return !!t() } catch (t) { return !0 } } }, function (t, e) { t.exports = function (t, e) { return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e } } }, function (t, e, n) { var r = n(20), o = Math.min; t.exports = function (t) { return t > 0 ? o(r(t), 9007199254740991) : 0 } }, function (t, e, n) { var r = n(2), o = n(0), i = o["__core-js_shared__"] || (o["__core-js_shared__"] = {}); (t.exports = function (t, e) { return i[t] || (i[t] = void 0 !== e ? e : {}) })("versions", []).push({ version: r.version, mode: n(18) ? "pure" : "global", copyright: "© 2019 Denis Pushkarev (zloirock.ru)" }) }, function (t, e) { var n = 0, r = Math.random(); t.exports = function (t) { return "Symbol(".concat(void 0 === t ? "" : t, ")_", (++n + r).toString(36)) } }, function (t, e) { t.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",") }, function (t, e, n) { var r = n(0).document; t.exports = r && r.documentElement }, function (t, e, n) { var r = n(24), o = n(1)("iterator"), i = n(4); t.exports = n(2).getIteratorMethod = function (t) { if (null != t) return t[o] || t["@@iterator"] || i[r(t)] } }, function (t, e, n) { var r = n(3), o = n(13), i = n(1)("species"); t.exports = function (t, e) { var n, u = r(t).constructor; return void 0 === u || null == (n = r(u)[i]) ? e : o(n) } }, function (t, e, n) { var r, o, i, u = n(12), c = n(75), a = n(35), s = n(19), f = n(0), l = f.process, h = f.setImmediate, p = f.clearImmediate, v = f.MessageChannel, d = f.Dispatch, y = 0, m = {}, g = function () { var t = +this; if (m.hasOwnProperty(t)) { var e = m[t]; delete m[t], e() } }, x = function (t) { g.call(t.data) }; h && p || (h = function (t) { for (var e = [], n = 1; arguments.length > n;)e.push(arguments[n++]); return m[++y] = function () { c("function" == typeof t ? t : Function(t), e) }, r(y), y }, p = function (t) { delete m[t] }, "process" == n(11)(l) ? r = function (t) { l.nextTick(u(g, t, 1)) } : d && d.now ? r = function (t) { d.now(u(g, t, 1)) } : v ? (i = (o = new v).port2, o.port1.onmessage = x, r = u(i.postMessage, i, 1)) : f.addEventListener && "function" == typeof postMessage && !f.importScripts ? (r = function (t) { f.postMessage(t + "", "*") }, f.addEventListener("message", x, !1)) : r = "onreadystatechange" in s("script") ? function (t) { a.appendChild(s("script")).onreadystatechange = function () { a.removeChild(this), g.call(t) } } : function (t) { setTimeout(u(g, t, 1), 0) }), t.exports = { set: h, clear: p } }, function (t, e) { t.exports = function (t) { try { return { e: !1, v: t() } } catch (t) { return { e: !0, v: t } } } }, function (t, e, n) { var r = n(3), o = n(9), i = n(25); t.exports = function (t, e) { if (r(t), o(e) && e.constructor === t) return e; var n = i.f(t); return (0, n.resolve)(e), n.promise } }, function (t, e, n) { "use strict"; e.__esModule = !0; var r = i(n(45)), o = i(n(65)); function i(t) { return t && t.__esModule ? t : { default: t } } e.default = function (t, e) { if (Array.isArray(t)) return t; if ((0, r.default)(Object(t))) return function (t, e) { var n = [], r = !0, i = !1, u = void 0; try { for (var c, a = (0, o.default)(t); !(r = (c = a.next()).done) && (n.push(c.value), !e || n.length !== e); r = !0); } catch (t) { i = !0, u = t } finally { try { !r && a.return && a.return() } finally { if (i) throw u } } return n }(t, e); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }, function (t, e, n) { "use strict"; e.__esModule = !0, e.default = function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } }, function (t, e, n) { "use strict"; e.__esModule = !0; var r, o = n(85), i = (r = o) && r.__esModule ? r : { default: r }; e.default = function () { function t(t, e) { for (var n = 0; n < e.length; n++) { var r = e[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), (0, i.default)(t, r.key, r) } } return function (e, n, r) { return n && t(e.prototype, n), r && t(e, r), e } }() }, function (t, e, n) { "use strict"; n.r(e), n.d(e, "imageCompressor", (function () { return m })); var r, o = n(41), i = n.n(o), u = n(26), c = n.n(u), a = n(10), s = n.n(a), f = n(27), l = n.n(f), h = n(42), p = n.n(h), v = n(43), d = n.n(v), y = (r = l()(s.a.mark((function t(e, n, r, o, u, a) { var f, l, h, p, v, d, y; return s.a.wrap((function (t) { for (; ;)switch (t.prev = t.next) { case 0: return o = o || "image/jpeg", u = u || .7, (f = new Image).src = e, t.next = 6, new c.a((function (t) { f.onload = function () { t() } })); case 6: return l = g(f.width, f.height, n, r), h = i()(l, 2), p = h[0], v = h[1], (d = document.createElement("canvas")).width = p, d.height = v, d.getContext("2d").drawImage(f, 0, 0, p, v), y = d.toDataURL(o, u), t.abrupt("return", y); case 15: case "end": return t.stop() } }), t, this) }))), function (t, e, n, o, i, u) { return r.apply(this, arguments) }); var m = function () { function t(e, n) { p()(this, t), this.quill = e, this.range = null, this.options = n, this.debug = null == n.debug || 1 == n.debug, function (t) { t.maxWidth = t.maxWidth || 1e3, t.maxHeight = t.maxHeight || 1e3, t.maxWidth && "number" != typeof t.maxWidth && (t.maxWidth = 1e3), t.maxHeight && "number" != typeof t.maxHeight && (t.maxHeight = 1e3), t.quality && "number" != typeof t.quality && (t.quality = .7), !t.imageType || "string" == typeof t.imageType && t.imageType.startsWith("image/") || (t.imageType = "image/jpeg") }(n), this.quill.getModule("toolbar").addHandler("image", this.selectLocalImage.bind(this)) } return d()(t, [{ key: "selectLocalImage", value: function () { var t = this; this.range = this.quill.getSelection(), this.fileHolder = document.createElement("input"), this.fileHolder.setAttribute("type", "file"), this.fileHolder.setAttribute("accept", "image/*"), this.fileHolder.setAttribute("style", "visibility:hidden"), this.fileHolder.onchange = this.fileChanged.bind(this), document.body.appendChild(this.fileHolder), this.fileHolder.click(), window.requestAnimationFrame((function () { document.body.removeChild(t.fileHolder) })) } }, { key: "fileChanged", value: function () { var t = this, e = this.fileHolder.files[0]; if (e) { var n = new FileReader; n.addEventListener("load", l()(s.a.mark((function e() { var r, o; return s.a.wrap((function (e) { for (; ;)switch (e.prev = e.next) { case 0: return r = n.result, e.next = 3, y(r, t.options.maxWidth, t.options.maxHeight, t.options.imageType, t.options.quality, t.debug); case 3: o = e.sent, t.insertToEditor(o); case 5: case "end": return e.stop() } }), e, t) }))), !1), n.readAsDataURL(e) } } }, { key: "insertToEditor", value: function (t) { var e = this.range; this.logFileSize(t), this.quill.insertEmbed(e.index, "image", "" + t), e.index++, this.quill.setSelection(e, "api") } }, { key: "logFileSize", value: function (t) { (Math.round(3 * (t.length - "data:image/png;base64,".length) / 4) / 1024).toFixed(0); this.debug } }]), t }(); function g(t, e, n, r) { if (t < n && e < r) return [t, e]; if (t > n) { var o = n, i = Math.floor(e / t * o); if (i > r) { var u = r; return [Math.floor(t / e * u), u] } return [o, i] } if (e > r) { var c = r; return [Math.floor(t / e * c), c] } } window.imageCompressor = m, e.default = m }, function (t, e, n) { t.exports = { default: n(46), __esModule: !0 } }, function (t, e, n) { n(15), n(23), t.exports = n(64) }, function (t, e, n) { "use strict"; var r = n(48), o = n(49), i = n(4), u = n(16); t.exports = n(28)(Array, "Array", (function (t, e) { this._t = u(t), this._i = 0, this._k = e }), (function () { var t = this._t, e = this._k, n = this._i++; return !t || n >= t.length ? (this._t = void 0, o(1)) : o(0, "keys" == e ? n : "values" == e ? t[n] : [n, t[n]]) }), "values"), i.Arguments = i.Array, r("keys"), r("values"), r("entries") }, function (t, e) { t.exports = function () { } }, function (t, e) { t.exports = function (t, e) { return { value: e, done: !!t } } }, function (t, e, n) { var r = n(11); t.exports = Object("z").propertyIsEnumerable(0) ? Object : function (t) { return "String" == r(t) ? t.split("") : Object(t) } }, function (t, e, n) { t.exports = !n(6) && !n(29)((function () { return 7 != Object.defineProperty(n(19)("div"), "a", { get: function () { return 7 } }).a })) }, function (t, e, n) { var r = n(9); t.exports = function (t, e) { if (!r(t)) return t; var n, o; if (e && "function" == typeof (n = t.toString) && !r(o = n.call(t))) return o; if ("function" == typeof (n = t.valueOf) && !r(o = n.call(t))) return o; if (!e && "function" == typeof (n = t.toString) && !r(o = n.call(t))) return o; throw TypeError("Can't convert object to primitive value") } }, function (t, e, n) { t.exports = n(5) }, function (t, e, n) { "use strict"; var r = n(55), o = n(30), i = n(22), u = {}; n(5)(u, n(1)("iterator"), (function () { return this })), t.exports = function (t, e, n) { t.prototype = r(u, { next: o(1, n) }), i(t, e + " Iterator") } }, function (t, e, n) { var r = n(3), o = n(56), i = n(34), u = n(21)("IE_PROTO"), c = function () { }, a = function () { var t, e = n(19)("iframe"), r = i.length; for (e.style.display = "none", n(35).appendChild(e), e.src = "javascript:", (t = e.contentWindow.document).open(), t.write("<script>document.F=Object<\/script>"), t.close(), a = t.F; r--;)delete a.prototype[i[r]]; return a() }; t.exports = Object.create || function (t, e) { var n; return null !== t ? (c.prototype = r(t), n = new c, c.prototype = null, n[u] = t) : n = a(), void 0 === e ? n : o(n, e) } }, function (t, e, n) { var r = n(8), o = n(3), i = n(57); t.exports = n(6) ? Object.defineProperties : function (t, e) { o(t); for (var n, u = i(e), c = u.length, a = 0; c > a;)r.f(t, n = u[a++], e[n]); return t } }, function (t, e, n) { var r = n(58), o = n(34); t.exports = Object.keys || function (t) { return r(t, o) } }, function (t, e, n) { var r = n(14), o = n(16), i = n(59)(!1), u = n(21)("IE_PROTO"); t.exports = function (t, e) { var n, c = o(t), a = 0, s = []; for (n in c) n != u && r(c, n) && s.push(n); for (; e.length > a;)r(c, n = e[a++]) && (~i(s, n) || s.push(n)); return s } }, function (t, e, n) { var r = n(16), o = n(31), i = n(60); t.exports = function (t) { return function (e, n, u) { var c, a = r(e), s = o(a.length), f = i(u, s); if (t && n != n) { for (; s > f;)if ((c = a[f++]) != c) return !0 } else for (; s > f; f++)if ((t || f in a) && a[f] === n) return t || f || 0; return !t && -1 } } }, function (t, e, n) { var r = n(20), o = Math.max, i = Math.min; t.exports = function (t, e) { return (t = r(t)) < 0 ? o(t + e, 0) : i(t, e) } }, function (t, e, n) { var r = n(14), o = n(62), i = n(21)("IE_PROTO"), u = Object.prototype; t.exports = Object.getPrototypeOf || function (t) { return t = o(t), r(t, i) ? t[i] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? u : null } }, function (t, e, n) { var r = n(17); t.exports = function (t) { return Object(r(t)) } }, function (t, e, n) { var r = n(20), o = n(17); t.exports = function (t) { return function (e, n) { var i, u, c = String(o(e)), a = r(n), s = c.length; return a < 0 || a >= s ? t ? "" : void 0 : (i = c.charCodeAt(a)) < 55296 || i > 56319 || a + 1 === s || (u = c.charCodeAt(a + 1)) < 56320 || u > 57343 ? t ? c.charAt(a) : i : t ? c.slice(a, a + 2) : u - 56320 + (i - 55296 << 10) + 65536 } } }, function (t, e, n) { var r = n(24), o = n(1)("iterator"), i = n(4); t.exports = n(2).isIterable = function (t) { var e = Object(t); return void 0 !== e[o] || "@@iterator" in e || i.hasOwnProperty(r(e)) } }, function (t, e, n) { t.exports = { default: n(66), __esModule: !0 } }, function (t, e, n) { n(15), n(23), t.exports = n(67) }, function (t, e, n) { var r = n(3), o = n(36); t.exports = n(2).getIterator = function (t) { var e = o(t); if ("function" != typeof e) throw TypeError(t + " is not iterable!"); return r(e.call(t)) } }, function (t, e, n) { n(69), n(23), n(15), n(70), n(81), n(82), t.exports = n(2).Promise }, function (t, e) { }, function (t, e, n) { "use strict"; var r, o, i, u, c = n(18), a = n(0), s = n(12), f = n(24), l = n(7), h = n(9), p = n(13), v = n(71), d = n(72), y = n(37), m = n(38).set, g = n(76)(), x = n(25), _ = n(39), w = n(77), b = n(40), O = a.TypeError, j = a.process, L = j && j.versions, S = L && L.v8 || "", P = a.Promise, E = "process" == f(j), T = function () { }, M = o = x.f, k = !!function () { try { var t = P.resolve(1), e = (t.constructor = {})[n(1)("species")] = function (t) { t(T, T) }; return (E || "function" == typeof PromiseRejectionEvent) && t.then(T) instanceof e && 0 !== S.indexOf("6.6") && -1 === w.indexOf("Chrome/66") } catch (t) { } }(), A = function (t) { var e; return !(!h(t) || "function" != typeof (e = t.then)) && e }, F = function (t, e) { if (!t._n) { t._n = !0; var n = t._c; g((function () { for (var r = t._v, o = 1 == t._s, i = 0, u = function (e) { var n, i, u, c = o ? e.ok : e.fail, a = e.resolve, s = e.reject, f = e.domain; try { c ? (o || (2 == t._h && H(t), t._h = 1), !0 === c ? n = r : (f && f.enter(), n = c(r), f && (f.exit(), u = !0)), n === e.promise ? s(O("Promise-chain cycle")) : (i = A(n)) ? i.call(n, a, s) : a(n)) : s(r) } catch (t) { f && !u && f.exit(), s(t) } }; n.length > i;)u(n[i++]); t._c = [], t._n = !1, e && !t._h && R(t) })) } }, R = function (t) { m.call(a, (function () { var e, n, r, o = t._v, i = C(t); if (i && (e = _((function () { E ? j.emit("unhandledRejection", o, t) : (n = a.onunhandledrejection) ? n({ promise: t, reason: o }) : (r = a.console) && r.error && r.error("Unhandled promise rejection", o) })), t._h = E || C(t) ? 2 : 1), t._a = void 0, i && e.e) throw e.v })) }, C = function (t) { return 1 !== t._h && 0 === (t._a || t._c).length }, H = function (t) { m.call(a, (function () { var e; E ? j.emit("rejectionHandled", t) : (e = a.onrejectionhandled) && e({ promise: t, reason: t._v }) })) }, I = function (t) { var e = this; e._d || (e._d = !0, (e = e._w || e)._v = t, e._s = 2, e._a || (e._a = e._c.slice()), F(e, !0)) }, N = function (t) { var e, n = this; if (!n._d) { n._d = !0, n = n._w || n; try { if (n === t) throw O("Promise can't be resolved itself"); (e = A(t)) ? g((function () { var r = { _w: n, _d: !1 }; try { e.call(t, s(N, r, 1), s(I, r, 1)) } catch (t) { I.call(r, t) } })) : (n._v = t, n._s = 1, F(n, !1)) } catch (t) { I.call({ _w: n, _d: !1 }, t) } } }; k || (P = function (t) { v(this, P, "Promise", "_h"), p(t), r.call(this); try { t(s(N, this, 1), s(I, this, 1)) } catch (t) { I.call(this, t) } }, (r = function (t) { this._c = [], this._a = void 0, this._s = 0, this._d = !1, this._v = void 0, this._h = 0, this._n = !1 }).prototype = n(78)(P.prototype, { then: function (t, e) { var n = M(y(this, P)); return n.ok = "function" != typeof t || t, n.fail = "function" == typeof e && e, n.domain = E ? j.domain : void 0, this._c.push(n), this._a && this._a.push(n), this._s && F(this, !1), n.promise }, catch: function (t) { return this.then(void 0, t) } }), i = function () { var t = new r; this.promise = t, this.resolve = s(N, t, 1), this.reject = s(I, t, 1) }, x.f = M = function (t) { return t === P || t === u ? new i(t) : o(t) }), l(l.G + l.W + l.F * !k, { Promise: P }), n(22)(P, "Promise"), n(79)("Promise"), u = n(2).Promise, l(l.S + l.F * !k, "Promise", { reject: function (t) { var e = M(this); return (0, e.reject)(t), e.promise } }), l(l.S + l.F * (c || !k), "Promise", { resolve: function (t) { return b(c && this === u ? P : this, t) } }), l(l.S + l.F * !(k && n(80)((function (t) { P.all(t).catch(T) }))), "Promise", { all: function (t) { var e = this, n = M(e), r = n.resolve, o = n.reject, i = _((function () { var n = [], i = 0, u = 1; d(t, !1, (function (t) { var c = i++, a = !1; n.push(void 0), u++, e.resolve(t).then((function (t) { a || (a = !0, n[c] = t, --u || r(n)) }), o) })), --u || r(n) })); return i.e && o(i.v), n.promise }, race: function (t) { var e = this, n = M(e), r = n.reject, o = _((function () { d(t, !1, (function (t) { e.resolve(t).then(n.resolve, r) })) })); return o.e && r(o.v), n.promise } }) }, function (t, e) { t.exports = function (t, e, n, r) { if (!(t instanceof e) || void 0 !== r && r in t) throw TypeError(n + ": incorrect invocation!"); return t } }, function (t, e, n) { var r = n(12), o = n(73), i = n(74), u = n(3), c = n(31), a = n(36), s = {}, f = {}; (e = t.exports = function (t, e, n, l, h) { var p, v, d, y, m = h ? function () { return t } : a(t), g = r(n, l, e ? 2 : 1), x = 0; if ("function" != typeof m) throw TypeError(t + " is not iterable!"); if (i(m)) { for (p = c(t.length); p > x; x++)if ((y = e ? g(u(v = t[x])[0], v[1]) : g(t[x])) === s || y === f) return y } else for (d = m.call(t); !(v = d.next()).done;)if ((y = o(d, g, v.value, e)) === s || y === f) return y }).BREAK = s, e.RETURN = f }, function (t, e, n) { var r = n(3); t.exports = function (t, e, n, o) { try { return o ? e(r(n)[0], n[1]) : e(n) } catch (e) { var i = t.return; throw void 0 !== i && r(i.call(t)), e } } }, function (t, e, n) { var r = n(4), o = n(1)("iterator"), i = Array.prototype; t.exports = function (t) { return void 0 !== t && (r.Array === t || i[o] === t) } }, function (t, e) { t.exports = function (t, e, n) { var r = void 0 === n; switch (e.length) { case 0: return r ? t() : t.call(n); case 1: return r ? t(e[0]) : t.call(n, e[0]); case 2: return r ? t(e[0], e[1]) : t.call(n, e[0], e[1]); case 3: return r ? t(e[0], e[1], e[2]) : t.call(n, e[0], e[1], e[2]); case 4: return r ? t(e[0], e[1], e[2], e[3]) : t.call(n, e[0], e[1], e[2], e[3]) }return t.apply(n, e) } }, function (t, e, n) { var r = n(0), o = n(38).set, i = r.MutationObserver || r.WebKitMutationObserver, u = r.process, c = r.Promise, a = "process" == n(11)(u); t.exports = function () { var t, e, n, s = function () { var r, o; for (a && (r = u.domain) && r.exit(); t;) { o = t.fn, t = t.next; try { o() } catch (r) { throw t ? n() : e = void 0, r } } e = void 0, r && r.enter() }; if (a) n = function () { u.nextTick(s) }; else if (!i || r.navigator && r.navigator.standalone) if (c && c.resolve) { var f = c.resolve(void 0); n = function () { f.then(s) } } else n = function () { o.call(r, s) }; else { var l = !0, h = document.createTextNode(""); new i(s).observe(h, { characterData: !0 }), n = function () { h.data = l = !l } } return function (r) { var o = { fn: r, next: void 0 }; e && (e.next = o), t || (t = o, n()), e = o } } }, function (t, e, n) { var r = n(0).navigator; t.exports = r && r.userAgent || "" }, function (t, e, n) { var r = n(5); t.exports = function (t, e, n) { for (var o in e) n && t[o] ? t[o] = e[o] : r(t, o, e[o]); return t } }, function (t, e, n) { "use strict"; var r = n(0), o = n(2), i = n(8), u = n(6), c = n(1)("species"); t.exports = function (t) { var e = "function" == typeof o[t] ? o[t] : r[t]; u && e && !e[c] && i.f(e, c, { configurable: !0, get: function () { return this } }) } }, function (t, e, n) { var r = n(1)("iterator"), o = !1; try { var i = [7][r](); i.return = function () { o = !0 }, Array.from(i, (function () { throw 2 })) } catch (t) { } t.exports = function (t, e) { if (!e && !o) return !1; var n = !1; try { var i = [7], u = i[r](); u.next = function () { return { done: n = !0 } }, i[r] = function () { return u }, t(i) } catch (t) { } return n } }, function (t, e, n) { "use strict"; var r = n(7), o = n(2), i = n(0), u = n(37), c = n(40); r(r.P + r.R, "Promise", { finally: function (t) { var e = u(this, o.Promise || i.Promise), n = "function" == typeof t; return this.then(n ? function (n) { return c(e, t()).then((function () { return n })) } : t, n ? function (n) { return c(e, t()).then((function () { throw n })) } : t) } }) }, function (t, e, n) { "use strict"; var r = n(7), o = n(25), i = n(39); r(r.S, "Promise", { try: function (t) { var e = o.f(this), n = i(t); return (n.e ? e.reject : e.resolve)(n.v), e.promise } }) }, function (t, e, n) { var r = function () { return this }() || Function("return this")(), o = r.regeneratorRuntime && Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime") >= 0, i = o && r.regeneratorRuntime; if (r.regeneratorRuntime = void 0, t.exports = n(84), o) r.regeneratorRuntime = i; else try { delete r.regeneratorRuntime } catch (t) { r.regeneratorRuntime = void 0 } }, function (t, e) { !function (e) { "use strict"; var n, r = Object.prototype, o = r.hasOwnProperty, i = "function" == typeof Symbol ? Symbol : {}, u = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", a = i.toStringTag || "@@toStringTag", s = "object" == typeof t, f = e.regeneratorRuntime; if (f) s && (t.exports = f); else { (f = e.regeneratorRuntime = s ? t.exports : {}).wrap = _; var l = "suspendedStart", h = "suspendedYield", p = "executing", v = "completed", d = {}, y = {}; y[u] = function () { return this }; var m = Object.getPrototypeOf, g = m && m(m(k([]))); g && g !== r && o.call(g, u) && (y = g); var x = j.prototype = b.prototype = Object.create(y); O.prototype = x.constructor = j, j.constructor = O, j[a] = O.displayName = "GeneratorFunction", f.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === O || "GeneratorFunction" === (e.displayName || e.name)) }, f.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, j) : (t.__proto__ = j, a in t || (t[a] = "GeneratorFunction")), t.prototype = Object.create(x), t }, f.awrap = function (t) { return { __await: t } }, L(S.prototype), S.prototype[c] = function () { return this }, f.AsyncIterator = S, f.async = function (t, e, n, r) { var o = new S(_(t, e, n, r)); return f.isGeneratorFunction(e) ? o : o.next().then((function (t) { return t.done ? t.value : o.next() })) }, L(x), x[a] = "Generator", x[u] = function () { return this }, x.toString = function () { return "[object Generator]" }, f.keys = function (t) { var e = []; for (var n in t) e.push(n); return e.reverse(), function n() { for (; e.length;) { var r = e.pop(); if (r in t) return n.value = r, n.done = !1, n } return n.done = !0, n } }, f.values = k, M.prototype = { constructor: M, reset: function (t) { if (this.prev = 0, this.next = 0, this.sent = this._sent = n, this.done = !1, this.delegate = null, this.method = "next", this.arg = n, this.tryEntries.forEach(T), !t) for (var e in this) "t" === e.charAt(0) && o.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = n) }, stop: function () { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval }, dispatchException: function (t) { if (this.done) throw t; var e = this; function r(r, o) { return c.type = "throw", c.arg = t, e.next = r, o && (e.method = "next", e.arg = n), !!o } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var u = this.tryEntries[i], c = u.completion; if ("root" === u.tryLoc) return r("end"); if (u.tryLoc <= this.prev) { var a = o.call(u, "catchLoc"), s = o.call(u, "finallyLoc"); if (a && s) { if (this.prev < u.catchLoc) return r(u.catchLoc, !0); if (this.prev < u.finallyLoc) return r(u.finallyLoc) } else if (a) { if (this.prev < u.catchLoc) return r(u.catchLoc, !0) } else { if (!s) throw new Error("try statement without catch or finally"); if (this.prev < u.finallyLoc) return r(u.finallyLoc) } } } }, abrupt: function (t, e) { for (var n = this.tryEntries.length - 1; n >= 0; --n) { var r = this.tryEntries[n]; if (r.tryLoc <= this.prev && o.call(r, "finallyLoc") && this.prev < r.finallyLoc) { var i = r; break } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var u = i ? i.completion : {}; return u.type = t, u.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, d) : this.complete(u) }, complete: function (t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), d }, finish: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n.finallyLoc === t) return this.complete(n.completion, n.afterLoc), T(n), d } }, catch: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n.tryLoc === t) { var r = n.completion; if ("throw" === r.type) { var o = r.arg; T(n) } return o } } throw new Error("illegal catch attempt") }, delegateYield: function (t, e, r) { return this.delegate = { iterator: k(t), resultName: e, nextLoc: r }, "next" === this.method && (this.arg = n), d } } } function _(t, e, n, r) { var o = e && e.prototype instanceof b ? e : b, i = Object.create(o.prototype), u = new M(r || []); return i._invoke = function (t, e, n) { var r = l; return function (o, i) { if (r === p) throw new Error("Generator is already running"); if (r === v) { if ("throw" === o) throw i; return A() } for (n.method = o, n.arg = i; ;) { var u = n.delegate; if (u) { var c = P(u, n); if (c) { if (c === d) continue; return c } } if ("next" === n.method) n.sent = n._sent = n.arg; else if ("throw" === n.method) { if (r === l) throw r = v, n.arg; n.dispatchException(n.arg) } else "return" === n.method && n.abrupt("return", n.arg); r = p; var a = w(t, e, n); if ("normal" === a.type) { if (r = n.done ? v : h, a.arg === d) continue; return { value: a.arg, done: n.done } } "throw" === a.type && (r = v, n.method = "throw", n.arg = a.arg) } } }(t, n, u), i } function w(t, e, n) { try { return { type: "normal", arg: t.call(e, n) } } catch (t) { return { type: "throw", arg: t } } } function b() { } function O() { } function j() { } function L(t) { ["next", "throw", "return"].forEach((function (e) { t[e] = function (t) { return this._invoke(e, t) } })) } function S(t) { var e; this._invoke = function (n, r) { function i() { return new Promise((function (e, i) { !function e(n, r, i, u) { var c = w(t[n], t, r); if ("throw" !== c.type) { var a = c.arg, s = a.value; return s && "object" == typeof s && o.call(s, "__await") ? Promise.resolve(s.__await).then((function (t) { e("next", t, i, u) }), (function (t) { e("throw", t, i, u) })) : Promise.resolve(s).then((function (t) { a.value = t, i(a) }), u) } u(c.arg) }(n, r, e, i) })) } return e = e ? e.then(i, i) : i() } } function P(t, e) { var r = t.iterator[e.method]; if (r === n) { if (e.delegate = null, "throw" === e.method) { if (t.iterator.return && (e.method = "return", e.arg = n, P(t, e), "throw" === e.method)) return d; e.method = "throw", e.arg = new TypeError("The iterator does not provide a 'throw' method") } return d } var o = w(r, t.iterator, e.arg); if ("throw" === o.type) return e.method = "throw", e.arg = o.arg, e.delegate = null, d; var i = o.arg; return i ? i.done ? (e[t.resultName] = i.value, e.next = t.nextLoc, "return" !== e.method && (e.method = "next", e.arg = n), e.delegate = null, d) : i : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, d) } function E(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e) } function T(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e } function M(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(E, this), this.reset(!0) } function k(t) { if (t) { var e = t[u]; if (e) return e.call(t); if ("function" == typeof t.next) return t; if (!isNaN(t.length)) { var r = -1, i = function e() { for (; ++r < t.length;)if (o.call(t, r)) return e.value = t[r], e.done = !1, e; return e.value = n, e.done = !0, e }; return i.next = i } } return { next: A } } function A() { return { value: n, done: !0 } } }(function () { return this }() || Function("return this")()) }, function (t, e, n) { t.exports = { default: n(86), __esModule: !0 } }, function (t, e, n) { n(87); var r = n(2).Object; t.exports = function (t, e, n) { return r.defineProperty(t, e, n) } }, function (t, e, n) { var r = n(7); r(r.S + r.F * !n(6), "Object", { defineProperty: n(8).f }) }]);
|