sockjs.min.js 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956
  1. /* sockjs-client v1.1.1 | http://sockjs.org | MIT license */
  2. !function (t) {
  3. if ("object" == typeof exports && "undefined" != typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else {
  4. var e;
  5. "undefined" != typeof window ? e = window : "undefined" != typeof global ? e = global : "undefined" != typeof self && (e = self), e.SockJS = t()
  6. }
  7. }(function () {
  8. var t;
  9. return function e(t, n, r) {
  10. function i(s, a) {
  11. if (!n[s]) {
  12. if (!t[s]) {
  13. var u = "function" == typeof require && require;
  14. if (!a && u) return u(s, !0);
  15. if (o) return o(s, !0);
  16. var l = new Error("Cannot find module '" + s + "'");
  17. throw l.code = "MODULE_NOT_FOUND", l
  18. }
  19. var c = n[s] = {exports: {}};
  20. t[s][0].call(c.exports, function (e) {
  21. var n = t[s][1][e];
  22. return i(n ? n : e)
  23. }, c, c.exports, e, t, n, r)
  24. }
  25. return n[s].exports
  26. }
  27. for (var o = "function" == typeof require && require, s = 0; s < r.length; s++) i(r[s]);
  28. return i
  29. }({
  30. 1: [function (t, e) {
  31. (function (n) {
  32. "use strict";
  33. var r = t("./transport-list");
  34. e.exports = t("./main")(r), "_sockjs_onload" in n && setTimeout(n._sockjs_onload, 1)
  35. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  36. }, {"./main": 14, "./transport-list": 16}],
  37. 2: [function (t, e) {
  38. "use strict";
  39. function n() {
  40. i.call(this), this.initEvent("close", !1, !1), this.wasClean = !1, this.code = 0, this.reason = ""
  41. }
  42. var r = t("inherits"), i = t("./event");
  43. r(n, i), e.exports = n
  44. }, {"./event": 4, inherits: 54}],
  45. 3: [function (t, e) {
  46. "use strict";
  47. function n() {
  48. i.call(this)
  49. }
  50. var r = t("inherits"), i = t("./eventtarget");
  51. r(n, i), n.prototype.removeAllListeners = function (t) {
  52. t ? delete this._listeners[t] : this._listeners = {}
  53. }, n.prototype.once = function (t, e) {
  54. function n() {
  55. r.removeListener(t, n), i || (i = !0, e.apply(this, arguments))
  56. }
  57. var r = this, i = !1;
  58. this.on(t, n)
  59. }, n.prototype.emit = function () {
  60. var t = arguments[0], e = this._listeners[t];
  61. if (e) {
  62. for (var n = arguments.length, r = new Array(n - 1), i = 1; n > i; i++) r[i - 1] = arguments[i];
  63. for (var o = 0; o < e.length; o++) e[o].apply(this, r)
  64. }
  65. }, n.prototype.on = n.prototype.addListener = i.prototype.addEventListener, n.prototype.removeListener = i.prototype.removeEventListener, e.exports.EventEmitter = n
  66. }, {"./eventtarget": 5, inherits: 54}],
  67. 4: [function (t, e) {
  68. "use strict";
  69. function n(t) {
  70. this.type = t
  71. }
  72. n.prototype.initEvent = function (t, e, n) {
  73. return this.type = t, this.bubbles = e, this.cancelable = n, this.timeStamp = +new Date, this
  74. }, n.prototype.stopPropagation = function () {
  75. }, n.prototype.preventDefault = function () {
  76. }, n.CAPTURING_PHASE = 1, n.AT_TARGET = 2, n.BUBBLING_PHASE = 3, e.exports = n
  77. }, {}],
  78. 5: [function (t, e) {
  79. "use strict";
  80. function n() {
  81. this._listeners = {}
  82. }
  83. n.prototype.addEventListener = function (t, e) {
  84. t in this._listeners || (this._listeners[t] = []);
  85. var n = this._listeners[t];
  86. -1 === n.indexOf(e) && (n = n.concat([e])), this._listeners[t] = n
  87. }, n.prototype.removeEventListener = function (t, e) {
  88. var n = this._listeners[t];
  89. if (n) {
  90. var r = n.indexOf(e);
  91. return -1 !== r ? void (n.length > 1 ? this._listeners[t] = n.slice(0, r).concat(n.slice(r + 1)) : delete this._listeners[t]) : void 0
  92. }
  93. }, n.prototype.dispatchEvent = function () {
  94. var t = arguments[0], e = t.type, n = 1 === arguments.length ? [t] : Array.apply(null, arguments);
  95. if (this["on" + e] && this["on" + e].apply(this, n), e in this._listeners) for (var r = this._listeners[e], i = 0; i < r.length; i++) r[i].apply(this, n)
  96. }, e.exports = n
  97. }, {}],
  98. 6: [function (t, e) {
  99. "use strict";
  100. function n(t) {
  101. i.call(this), this.initEvent("message", !1, !1), this.data = t
  102. }
  103. var r = t("inherits"), i = t("./event");
  104. r(n, i), e.exports = n
  105. }, {"./event": 4, inherits: 54}],
  106. 7: [function (t, e) {
  107. "use strict";
  108. function n(t) {
  109. this._transport = t, t.on("message", this._transportMessage.bind(this)), t.on("close", this._transportClose.bind(this))
  110. }
  111. var r = t("json3"), i = t("./utils/iframe");
  112. n.prototype._transportClose = function (t, e) {
  113. i.postMessage("c", r.stringify([t, e]))
  114. }, n.prototype._transportMessage = function (t) {
  115. i.postMessage("t", t)
  116. }, n.prototype._send = function (t) {
  117. this._transport.send(t)
  118. }, n.prototype._close = function () {
  119. this._transport.close(), this._transport.removeAllListeners()
  120. }, e.exports = n
  121. }, {"./utils/iframe": 47, json3: 55}],
  122. 8: [function (t, e) {
  123. "use strict";
  124. var n = t("./utils/url"), r = t("./utils/event"), i = t("json3"), o = t("./facade"),
  125. s = t("./info-iframe-receiver"), a = t("./utils/iframe"), u = t("./location");
  126. e.exports = function (t, e) {
  127. var l = {};
  128. e.forEach(function (t) {
  129. t.facadeTransport && (l[t.facadeTransport.transportName] = t.facadeTransport)
  130. }), l[s.transportName] = s;
  131. var c;
  132. t.bootstrap_iframe = function () {
  133. var e;
  134. a.currentWindowId = u.hash.slice(1);
  135. var s = function (r) {
  136. if (r.source === parent && ("undefined" == typeof c && (c = r.origin), r.origin === c)) {
  137. var s;
  138. try {
  139. s = i.parse(r.data)
  140. } catch (f) {
  141. return
  142. }
  143. if (s.windowId === a.currentWindowId) switch (s.type) {
  144. case"s":
  145. var h;
  146. try {
  147. h = i.parse(s.data)
  148. } catch (f) {
  149. break
  150. }
  151. var d = h[0], p = h[1], v = h[2], m = h[3];
  152. if (d !== t.version) throw new Error('Incompatible SockJS! Main site uses: "' + d + '", the iframe: "' + t.version + '".');
  153. if (!n.isOriginEqual(v, u.href) || !n.isOriginEqual(m, u.href)) throw new Error("Can't connect to different domain from within an iframe. (" + u.href + ", " + v + ", " + m + ")");
  154. e = new o(new l[p](v, m));
  155. break;
  156. case"m":
  157. e._send(s.data);
  158. break;
  159. case"c":
  160. e && e._close(), e = null
  161. }
  162. }
  163. };
  164. r.attachEvent("message", s), a.postMessage("s")
  165. }
  166. }
  167. }, {
  168. "./facade": 7,
  169. "./info-iframe-receiver": 10,
  170. "./location": 13,
  171. "./utils/event": 46,
  172. "./utils/iframe": 47,
  173. "./utils/url": 52,
  174. debug: void 0,
  175. json3: 55
  176. }],
  177. 9: [function (t, e) {
  178. "use strict";
  179. function n(t, e) {
  180. r.call(this);
  181. var n = this, i = +new Date;
  182. this.xo = new e("GET", t), this.xo.once("finish", function (t, e) {
  183. var r, a;
  184. if (200 === t) {
  185. if (a = +new Date - i, e) try {
  186. r = o.parse(e)
  187. } catch (u) {
  188. }
  189. s.isObject(r) || (r = {})
  190. }
  191. n.emit("finish", r, a), n.removeAllListeners()
  192. })
  193. }
  194. var r = t("events").EventEmitter, i = t("inherits"), o = t("json3"), s = t("./utils/object");
  195. i(n, r), n.prototype.close = function () {
  196. this.removeAllListeners(), this.xo.close()
  197. }, e.exports = n
  198. }, {"./utils/object": 49, debug: void 0, events: 3, inherits: 54, json3: 55}],
  199. 10: [function (t, e) {
  200. "use strict";
  201. function n(t) {
  202. var e = this;
  203. i.call(this), this.ir = new a(t, s), this.ir.once("finish", function (t, n) {
  204. e.ir = null, e.emit("message", o.stringify([t, n]))
  205. })
  206. }
  207. var r = t("inherits"), i = t("events").EventEmitter, o = t("json3"), s = t("./transport/sender/xhr-local"),
  208. a = t("./info-ajax");
  209. r(n, i), n.transportName = "iframe-info-receiver", n.prototype.close = function () {
  210. this.ir && (this.ir.close(), this.ir = null), this.removeAllListeners()
  211. }, e.exports = n
  212. }, {"./info-ajax": 9, "./transport/sender/xhr-local": 37, events: 3, inherits: 54, json3: 55}],
  213. 11: [function (t, e) {
  214. (function (n) {
  215. "use strict";
  216. function r(t, e) {
  217. var r = this;
  218. i.call(this);
  219. var o = function () {
  220. var n = r.ifr = new u(l.transportName, e, t);
  221. n.once("message", function (t) {
  222. if (t) {
  223. var e;
  224. try {
  225. e = s.parse(t)
  226. } catch (n) {
  227. return r.emit("finish"), void r.close()
  228. }
  229. var i = e[0], o = e[1];
  230. r.emit("finish", i, o)
  231. }
  232. r.close()
  233. }), n.once("close", function () {
  234. r.emit("finish"), r.close()
  235. })
  236. };
  237. n.document.body ? o() : a.attachEvent("load", o)
  238. }
  239. var i = t("events").EventEmitter, o = t("inherits"), s = t("json3"), a = t("./utils/event"),
  240. u = t("./transport/iframe"), l = t("./info-iframe-receiver");
  241. o(r, i), r.enabled = function () {
  242. return u.enabled()
  243. }, r.prototype.close = function () {
  244. this.ifr && this.ifr.close(), this.removeAllListeners(), this.ifr = null
  245. }, e.exports = r
  246. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  247. }, {
  248. "./info-iframe-receiver": 10,
  249. "./transport/iframe": 22,
  250. "./utils/event": 46,
  251. debug: void 0,
  252. events: 3,
  253. inherits: 54,
  254. json3: 55
  255. }],
  256. 12: [function (t, e) {
  257. "use strict";
  258. function n(t, e) {
  259. var n = this;
  260. r.call(this), setTimeout(function () {
  261. n.doXhr(t, e)
  262. }, 0)
  263. }
  264. var r = t("events").EventEmitter, i = t("inherits"), o = t("./utils/url"), s = t("./transport/sender/xdr"),
  265. a = t("./transport/sender/xhr-cors"), u = t("./transport/sender/xhr-local"),
  266. l = t("./transport/sender/xhr-fake"), c = t("./info-iframe"), f = t("./info-ajax");
  267. i(n, r), n._getReceiver = function (t, e, n) {
  268. return n.sameOrigin ? new f(e, u) : a.enabled ? new f(e, a) : s.enabled && n.sameScheme ? new f(e, s) : c.enabled() ? new c(t, e) : new f(e, l)
  269. }, n.prototype.doXhr = function (t, e) {
  270. var r = this, i = o.addPath(t, "/info");
  271. this.xo = n._getReceiver(t, i, e), this.timeoutRef = setTimeout(function () {
  272. r._cleanup(!1), r.emit("finish")
  273. }, n.timeout), this.xo.once("finish", function (t, e) {
  274. r._cleanup(!0), r.emit("finish", t, e)
  275. })
  276. }, n.prototype._cleanup = function (t) {
  277. clearTimeout(this.timeoutRef), this.timeoutRef = null, !t && this.xo && this.xo.close(), this.xo = null
  278. }, n.prototype.close = function () {
  279. this.removeAllListeners(), this._cleanup(!1)
  280. }, n.timeout = 8e3, e.exports = n
  281. }, {
  282. "./info-ajax": 9,
  283. "./info-iframe": 11,
  284. "./transport/sender/xdr": 34,
  285. "./transport/sender/xhr-cors": 35,
  286. "./transport/sender/xhr-fake": 36,
  287. "./transport/sender/xhr-local": 37,
  288. "./utils/url": 52,
  289. debug: void 0,
  290. events: 3,
  291. inherits: 54
  292. }],
  293. 13: [function (t, e) {
  294. (function (t) {
  295. "use strict";
  296. e.exports = t.location || {
  297. origin: "http://localhost:80",
  298. protocol: "http",
  299. host: "localhost",
  300. port: 80,
  301. href: "http://localhost/",
  302. hash: ""
  303. }
  304. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  305. }, {}],
  306. 14: [function (t, e) {
  307. (function (n) {
  308. "use strict";
  309. function r(t, e, n) {
  310. if (!(this instanceof r)) return new r(t, e, n);
  311. if (arguments.length < 1) throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");
  312. b.call(this), this.readyState = r.CONNECTING, this.extensions = "", this.protocol = "", n = n || {}, n.protocols_whitelist && m.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."), this._transportsWhitelist = n.transports, this._transportOptions = n.transportOptions || {};
  313. var i = n.sessionId || 8;
  314. if ("function" == typeof i) this._generateSessionId = i; else {
  315. if ("number" != typeof i) throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");
  316. this._generateSessionId = function () {
  317. return l.string(i)
  318. }
  319. }
  320. this._server = n.server || l.numberString(1e3);
  321. var o = new s(t);
  322. if (!o.host || !o.protocol) throw new SyntaxError("The URL '" + t + "' is invalid");
  323. if (o.hash) throw new SyntaxError("The URL must not contain a fragment");
  324. if ("http:" !== o.protocol && "https:" !== o.protocol) throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + o.protocol + "' is not allowed.");
  325. var a = "https:" === o.protocol;
  326. if ("https" === g.protocol && !a) throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");
  327. e ? Array.isArray(e) || (e = [e]) : e = [];
  328. var u = e.sort();
  329. u.forEach(function (t, e) {
  330. if (!t) throw new SyntaxError("The protocols entry '" + t + "' is invalid.");
  331. if (e < u.length - 1 && t === u[e + 1]) throw new SyntaxError("The protocols entry '" + t + "' is duplicated.")
  332. });
  333. var c = f.getOrigin(g.href);
  334. this._origin = c ? c.toLowerCase() : null, o.set("pathname", o.pathname.replace(/\/+$/, "")), this.url = o.href, this._urlInfo = {
  335. nullOrigin: !v.hasDomain(),
  336. sameOrigin: f.isOriginEqual(this.url, g.href),
  337. sameScheme: f.isSchemeEqual(this.url, g.href)
  338. }, this._ir = new _(this.url, this._urlInfo), this._ir.once("finish", this._receiveInfo.bind(this))
  339. }
  340. function i(t) {
  341. return 1e3 === t || t >= 3e3 && 4999 >= t
  342. }
  343. t("./shims");
  344. var o, s = t("url-parse"), a = t("inherits"), u = t("json3"), l = t("./utils/random"),
  345. c = t("./utils/escape"), f = t("./utils/url"), h = t("./utils/event"), d = t("./utils/transport"),
  346. p = t("./utils/object"), v = t("./utils/browser"), m = t("./utils/log"), y = t("./event/event"),
  347. b = t("./event/eventtarget"), g = t("./location"), w = t("./event/close"),
  348. x = t("./event/trans-message"), _ = t("./info-receiver");
  349. a(r, b), r.prototype.close = function (t, e) {
  350. if (t && !i(t)) throw new Error("InvalidAccessError: Invalid code");
  351. if (e && e.length > 123) throw new SyntaxError("reason argument has an invalid length");
  352. if (this.readyState !== r.CLOSING && this.readyState !== r.CLOSED) {
  353. var n = !0;
  354. this._close(t || 1e3, e || "Normal closure", n)
  355. }
  356. }, r.prototype.send = function (t) {
  357. if ("string" != typeof t && (t = "" + t), this.readyState === r.CONNECTING) throw new Error("InvalidStateError: The connection has not been established yet");
  358. this.readyState === r.OPEN && this._transport.send(c.quote(t))
  359. }, r.version = t("./version"), r.CONNECTING = 0, r.OPEN = 1, r.CLOSING = 2, r.CLOSED = 3, r.prototype._receiveInfo = function (t, e) {
  360. if (this._ir = null, !t) return void this._close(1002, "Cannot connect to server");
  361. this._rto = this.countRTO(e), this._transUrl = t.base_url ? t.base_url : this.url, t = p.extend(t, this._urlInfo);
  362. var n = o.filterToEnabled(this._transportsWhitelist, t);
  363. this._transports = n.main, this._connect()
  364. }, r.prototype._connect = function () {
  365. for (var t = this._transports.shift(); t; t = this._transports.shift()) {
  366. if (t.needBody && (!n.document.body || "undefined" != typeof n.document.readyState && "complete" !== n.document.readyState && "interactive" !== n.document.readyState)) return this._transports.unshift(t), void h.attachEvent("load", this._connect.bind(this));
  367. var e = this._rto * t.roundTrips || 5e3;
  368. this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), e);
  369. var r = f.addPath(this._transUrl, "/" + this._server + "/" + this._generateSessionId()),
  370. i = this._transportOptions[t.transportName], o = new t(r, this._transUrl, i);
  371. return o.on("message", this._transportMessage.bind(this)), o.once("close", this._transportClose.bind(this)), o.transportName = t.transportName, void (this._transport = o)
  372. }
  373. this._close(2e3, "All transports failed", !1)
  374. }, r.prototype._transportTimeout = function () {
  375. this.readyState === r.CONNECTING && this._transportClose(2007, "Transport timed out")
  376. }, r.prototype._transportMessage = function (t) {
  377. var e, n = this, r = t.slice(0, 1), i = t.slice(1);
  378. switch (r) {
  379. case"o":
  380. return void this._open();
  381. case"h":
  382. return void this.dispatchEvent(new y("heartbeat"))
  383. }
  384. if (i) try {
  385. e = u.parse(i)
  386. } catch (o) {
  387. }
  388. if ("undefined" != typeof e) switch (r) {
  389. case"a":
  390. Array.isArray(e) && e.forEach(function (t) {
  391. n.dispatchEvent(new x(t))
  392. });
  393. break;
  394. case"m":
  395. this.dispatchEvent(new x(e));
  396. break;
  397. case"c":
  398. Array.isArray(e) && 2 === e.length && this._close(e[0], e[1], !0)
  399. }
  400. }, r.prototype._transportClose = function (t, e) {
  401. return this._transport && (this._transport.removeAllListeners(), this._transport = null, this.transport = null), i(t) || 2e3 === t || this.readyState !== r.CONNECTING ? void this._close(t, e) : void this._connect()
  402. }, r.prototype._open = function () {
  403. this.readyState === r.CONNECTING ? (this._transportTimeoutId && (clearTimeout(this._transportTimeoutId), this._transportTimeoutId = null), this.readyState = r.OPEN, this.transport = this._transport.transportName, this.dispatchEvent(new y("open"))) : this._close(1006, "Server lost session")
  404. }, r.prototype._close = function (t, e, n) {
  405. var i = !1;
  406. if (this._ir && (i = !0, this._ir.close(), this._ir = null), this._transport && (this._transport.close(), this._transport = null, this.transport = null), this.readyState === r.CLOSED) throw new Error("InvalidStateError: SockJS has already been closed");
  407. this.readyState = r.CLOSING, setTimeout(function () {
  408. this.readyState = r.CLOSED, i && this.dispatchEvent(new y("error"));
  409. var o = new w("close");
  410. o.wasClean = n || !1, o.code = t || 1e3, o.reason = e, this.dispatchEvent(o), this.onmessage = this.onclose = this.onerror = null
  411. }.bind(this), 0)
  412. }, r.prototype.countRTO = function (t) {
  413. return t > 100 ? 4 * t : 300 + t
  414. }, e.exports = function (e) {
  415. return o = d(e), t("./iframe-bootstrap")(r, e), r
  416. }
  417. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  418. }, {
  419. "./event/close": 2,
  420. "./event/event": 4,
  421. "./event/eventtarget": 5,
  422. "./event/trans-message": 6,
  423. "./iframe-bootstrap": 8,
  424. "./info-receiver": 12,
  425. "./location": 13,
  426. "./shims": 15,
  427. "./utils/browser": 44,
  428. "./utils/escape": 45,
  429. "./utils/event": 46,
  430. "./utils/log": 48,
  431. "./utils/object": 49,
  432. "./utils/random": 50,
  433. "./utils/transport": 51,
  434. "./utils/url": 52,
  435. "./version": 53,
  436. debug: void 0,
  437. inherits: 54,
  438. json3: 55,
  439. "url-parse": 56
  440. }],
  441. 15: [function () {
  442. "use strict";
  443. function t(t) {
  444. var e = +t;
  445. return e !== e ? e = 0 : 0 !== e && e !== 1 / 0 && e !== -(1 / 0) && (e = (e > 0 || -1) * Math.floor(Math.abs(e))), e
  446. }
  447. function e(t) {
  448. return t >>> 0
  449. }
  450. function n() {
  451. }
  452. var r, i = Array.prototype, o = Object.prototype, s = Function.prototype, a = String.prototype, u = i.slice,
  453. l = o.toString, c = function (t) {
  454. return "[object Function]" === o.toString.call(t)
  455. }, f = function (t) {
  456. return "[object Array]" === l.call(t)
  457. }, h = function (t) {
  458. return "[object String]" === l.call(t)
  459. }, d = Object.defineProperty && function () {
  460. try {
  461. return Object.defineProperty({}, "x", {}), !0
  462. } catch (t) {
  463. return !1
  464. }
  465. }();
  466. r = d ? function (t, e, n, r) {
  467. !r && e in t || Object.defineProperty(t, e, {configurable: !0, enumerable: !1, writable: !0, value: n})
  468. } : function (t, e, n, r) {
  469. !r && e in t || (t[e] = n)
  470. };
  471. var p = function (t, e, n) {
  472. for (var i in e) o.hasOwnProperty.call(e, i) && r(t, i, e[i], n)
  473. }, v = function (t) {
  474. if (null == t) throw new TypeError("can't convert " + t + " to object");
  475. return Object(t)
  476. };
  477. p(s, {
  478. bind: function (t) {
  479. var e = this;
  480. if (!c(e)) throw new TypeError("Function.prototype.bind called on incompatible " + e);
  481. for (var r = u.call(arguments, 1), i = function () {
  482. if (this instanceof l) {
  483. var n = e.apply(this, r.concat(u.call(arguments)));
  484. return Object(n) === n ? n : this
  485. }
  486. return e.apply(t, r.concat(u.call(arguments)))
  487. }, o = Math.max(0, e.length - r.length), s = [], a = 0; o > a; a++) s.push("$" + a);
  488. var l = Function("binder", "return function (" + s.join(",") + "){ return binder.apply(this, arguments); }")(i);
  489. return e.prototype && (n.prototype = e.prototype, l.prototype = new n, n.prototype = null), l
  490. }
  491. }), p(Array, {isArray: f});
  492. var m = Object("a"), y = "a" !== m[0] || !(0 in m), b = function (t) {
  493. var e = !0, n = !0;
  494. return t && (t.call("foo", function (t, n, r) {
  495. "object" != typeof r && (e = !1)
  496. }), t.call([1], function () {
  497. n = "string" == typeof this
  498. }, "x")), !!t && e && n
  499. };
  500. p(i, {
  501. forEach: function (t) {
  502. var e = v(this), n = y && h(this) ? this.split("") : e, r = arguments[1], i = -1,
  503. o = n.length >>> 0;
  504. if (!c(t)) throw new TypeError;
  505. for (; ++i < o;) i in n && t.call(r, n[i], i, e)
  506. }
  507. }, !b(i.forEach));
  508. var g = Array.prototype.indexOf && -1 !== [0, 1].indexOf(1, 2);
  509. p(i, {
  510. indexOf: function (e) {
  511. var n = y && h(this) ? this.split("") : v(this), r = n.length >>> 0;
  512. if (!r) return -1;
  513. var i = 0;
  514. for (arguments.length > 1 && (i = t(arguments[1])), i = i >= 0 ? i : Math.max(0, r + i); r > i; i++) if (i in n && n[i] === e) return i;
  515. return -1
  516. }
  517. }, g);
  518. var w = a.split;
  519. 2 !== "ab".split(/(?:ab)*/).length || 4 !== ".".split(/(.?)(.?)/).length || "t" === "tesst".split(/(s)*/)[1] || 4 !== "test".split(/(?:)/, -1).length || "".split(/.?/).length || ".".split(/()()/).length > 1 ? !function () {
  520. var t = void 0 === /()??/.exec("")[1];
  521. a.split = function (n, r) {
  522. var o = this;
  523. if (void 0 === n && 0 === r) return [];
  524. if ("[object RegExp]" !== l.call(n)) return w.call(this, n, r);
  525. var s, a, u, c, f = [],
  526. h = (n.ignoreCase ? "i" : "") + (n.multiline ? "m" : "") + (n.extended ? "x" : "") + (n.sticky ? "y" : ""),
  527. d = 0;
  528. for (n = new RegExp(n.source, h + "g"), o += "", t || (s = new RegExp("^" + n.source + "$(?!\\s)", h)), r = void 0 === r ? -1 >>> 0 : e(r); (a = n.exec(o)) && (u = a.index + a[0].length, !(u > d && (f.push(o.slice(d, a.index)), !t && a.length > 1 && a[0].replace(s, function () {
  529. for (var t = 1; t < arguments.length - 2; t++) void 0 === arguments[t] && (a[t] = void 0)
  530. }), a.length > 1 && a.index < o.length && i.push.apply(f, a.slice(1)), c = a[0].length, d = u, f.length >= r)));) n.lastIndex === a.index && n.lastIndex++;
  531. return d === o.length ? (c || !n.test("")) && f.push("") : f.push(o.slice(d)), f.length > r ? f.slice(0, r) : f
  532. }
  533. }() : "0".split(void 0, 0).length && (a.split = function (t, e) {
  534. return void 0 === t && 0 === e ? [] : w.call(this, t, e)
  535. });
  536. var x = " \n \f\r   ᠎              \u2028\u2029", _ = "​", E = "[" + x + "]",
  537. j = new RegExp("^" + E + E + "*"), T = new RegExp(E + E + "*$"), S = a.trim && (x.trim() || !_.trim());
  538. p(a, {
  539. trim: function () {
  540. if (void 0 === this || null === this) throw new TypeError("can't convert " + this + " to object");
  541. return String(this).replace(j, "").replace(T, "")
  542. }
  543. }, S);
  544. var O = a.substr, C = "".substr && "b" !== "0b".substr(-1);
  545. p(a, {
  546. substr: function (t, e) {
  547. return O.call(this, 0 > t && (t = this.length + t) < 0 ? 0 : t, e)
  548. }
  549. }, C)
  550. }, {}],
  551. 16: [function (t, e) {
  552. "use strict";
  553. e.exports = [t("./transport/websocket"), t("./transport/xhr-streaming"), t("./transport/xdr-streaming"), t("./transport/eventsource"), t("./transport/lib/iframe-wrap")(t("./transport/eventsource")), t("./transport/htmlfile"), t("./transport/lib/iframe-wrap")(t("./transport/htmlfile")), t("./transport/xhr-polling"), t("./transport/xdr-polling"), t("./transport/lib/iframe-wrap")(t("./transport/xhr-polling")), t("./transport/jsonp-polling")]
  554. }, {
  555. "./transport/eventsource": 20,
  556. "./transport/htmlfile": 21,
  557. "./transport/jsonp-polling": 23,
  558. "./transport/lib/iframe-wrap": 26,
  559. "./transport/websocket": 38,
  560. "./transport/xdr-polling": 39,
  561. "./transport/xdr-streaming": 40,
  562. "./transport/xhr-polling": 41,
  563. "./transport/xhr-streaming": 42
  564. }],
  565. 17: [function (t, e) {
  566. (function (n) {
  567. "use strict";
  568. function r(t, e, n, r) {
  569. var o = this;
  570. i.call(this), setTimeout(function () {
  571. o._start(t, e, n, r)
  572. }, 0)
  573. }
  574. var i = t("events").EventEmitter, o = t("inherits"), s = t("../../utils/event"),
  575. a = t("../../utils/url"), u = n.XMLHttpRequest;
  576. o(r, i), r.prototype._start = function (t, e, n, i) {
  577. var o = this;
  578. try {
  579. this.xhr = new u
  580. } catch (l) {
  581. }
  582. if (!this.xhr) return this.emit("finish", 0, "no xhr support"), void this._cleanup();
  583. e = a.addQuery(e, "t=" + +new Date), this.unloadRef = s.unloadAdd(function () {
  584. o._cleanup(!0)
  585. });
  586. try {
  587. this.xhr.open(t, e, !0), this.timeout && "timeout" in this.xhr && (this.xhr.timeout = this.timeout, this.xhr.ontimeout = function () {
  588. o.emit("finish", 0, ""), o._cleanup(!1)
  589. })
  590. } catch (c) {
  591. return this.emit("finish", 0, ""), void this._cleanup(!1)
  592. }
  593. if (i && i.noCredentials || !r.supportsCORS || (this.xhr.withCredentials = "true"), i && i.headers) for (var f in i.headers) this.xhr.setRequestHeader(f, i.headers[f]);
  594. this.xhr.onreadystatechange = function () {
  595. if (o.xhr) {
  596. var t, e, n = o.xhr;
  597. switch (n.readyState) {
  598. case 3:
  599. try {
  600. e = n.status, t = n.responseText
  601. } catch (r) {
  602. }
  603. 1223 === e && (e = 204), 200 === e && t && t.length > 0 && o.emit("chunk", e, t);
  604. break;
  605. case 4:
  606. e = n.status, 1223 === e && (e = 204), (12005 === e || 12029 === e) && (e = 0), o.emit("finish", e, n.responseText), o._cleanup(!1)
  607. }
  608. }
  609. };
  610. try {
  611. o.xhr.send(n)
  612. } catch (c) {
  613. o.emit("finish", 0, ""), o._cleanup(!1)
  614. }
  615. }, r.prototype._cleanup = function (t) {
  616. if (this.xhr) {
  617. if (this.removeAllListeners(), s.unloadDel(this.unloadRef), this.xhr.onreadystatechange = function () {
  618. }, this.xhr.ontimeout && (this.xhr.ontimeout = null), t) try {
  619. this.xhr.abort()
  620. } catch (e) {
  621. }
  622. this.unloadRef = this.xhr = null
  623. }
  624. }, r.prototype.close = function () {
  625. this._cleanup(!0)
  626. }, r.enabled = !!u;
  627. var l = ["Active"].concat("Object").join("X");
  628. !r.enabled && l in n && (u = function () {
  629. try {
  630. return new n[l]("Microsoft.XMLHTTP")
  631. } catch (t) {
  632. return null
  633. }
  634. }, r.enabled = !!new u);
  635. var c = !1;
  636. try {
  637. c = "withCredentials" in new u
  638. } catch (f) {
  639. }
  640. r.supportsCORS = c, e.exports = r
  641. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  642. }, {"../../utils/event": 46, "../../utils/url": 52, debug: void 0, events: 3, inherits: 54}],
  643. 18: [function (t, e) {
  644. (function (t) {
  645. e.exports = t.EventSource
  646. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  647. }, {}],
  648. 19: [function (t, e) {
  649. (function (t) {
  650. "use strict";
  651. var n = t.WebSocket || t.MozWebSocket;
  652. n && (e.exports = function (t) {
  653. return new n(t)
  654. })
  655. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  656. }, {}],
  657. 20: [function (t, e) {
  658. "use strict";
  659. function n(t) {
  660. if (!n.enabled()) throw new Error("Transport created when disabled");
  661. i.call(this, t, "/eventsource", o, s)
  662. }
  663. var r = t("inherits"), i = t("./lib/ajax-based"), o = t("./receiver/eventsource"),
  664. s = t("./sender/xhr-cors"), a = t("eventsource");
  665. r(n, i), n.enabled = function () {
  666. return !!a
  667. }, n.transportName = "eventsource", n.roundTrips = 2, e.exports = n
  668. }, {
  669. "./lib/ajax-based": 24,
  670. "./receiver/eventsource": 29,
  671. "./sender/xhr-cors": 35,
  672. eventsource: 18,
  673. inherits: 54
  674. }],
  675. 21: [function (t, e) {
  676. "use strict";
  677. function n(t) {
  678. if (!i.enabled) throw new Error("Transport created when disabled");
  679. s.call(this, t, "/htmlfile", i, o)
  680. }
  681. var r = t("inherits"), i = t("./receiver/htmlfile"), o = t("./sender/xhr-local"), s = t("./lib/ajax-based");
  682. r(n, s), n.enabled = function (t) {
  683. return i.enabled && t.sameOrigin
  684. }, n.transportName = "htmlfile", n.roundTrips = 2, e.exports = n
  685. }, {"./lib/ajax-based": 24, "./receiver/htmlfile": 30, "./sender/xhr-local": 37, inherits: 54}],
  686. 22: [function (t, e) {
  687. "use strict";
  688. function n(t, e, r) {
  689. if (!n.enabled()) throw new Error("Transport created when disabled");
  690. o.call(this);
  691. var i = this;
  692. this.origin = a.getOrigin(r), this.baseUrl = r, this.transUrl = e, this.transport = t, this.windowId = c.string(8);
  693. var s = a.addPath(r, "/iframe.html") + "#" + this.windowId;
  694. this.iframeObj = u.createIframe(s, function (t) {
  695. i.emit("close", 1006, "Unable to load an iframe (" + t + ")"), i.close()
  696. }), this.onmessageCallback = this._message.bind(this), l.attachEvent("message", this.onmessageCallback)
  697. }
  698. var r = t("inherits"), i = t("json3"), o = t("events").EventEmitter, s = t("../version"),
  699. a = t("../utils/url"), u = t("../utils/iframe"), l = t("../utils/event"), c = t("../utils/random");
  700. r(n, o), n.prototype.close = function () {
  701. if (this.removeAllListeners(), this.iframeObj) {
  702. l.detachEvent("message", this.onmessageCallback);
  703. try {
  704. this.postMessage("c")
  705. } catch (t) {
  706. }
  707. this.iframeObj.cleanup(), this.iframeObj = null, this.onmessageCallback = this.iframeObj = null
  708. }
  709. }, n.prototype._message = function (t) {
  710. if (a.isOriginEqual(t.origin, this.origin)) {
  711. var e;
  712. try {
  713. e = i.parse(t.data)
  714. } catch (n) {
  715. return
  716. }
  717. if (e.windowId === this.windowId) switch (e.type) {
  718. case"s":
  719. this.iframeObj.loaded(), this.postMessage("s", i.stringify([s, this.transport, this.transUrl, this.baseUrl]));
  720. break;
  721. case"t":
  722. this.emit("message", e.data);
  723. break;
  724. case"c":
  725. var r;
  726. try {
  727. r = i.parse(e.data)
  728. } catch (n) {
  729. return
  730. }
  731. this.emit("close", r[0], r[1]), this.close()
  732. }
  733. }
  734. }, n.prototype.postMessage = function (t, e) {
  735. this.iframeObj.post(i.stringify({windowId: this.windowId, type: t, data: e || ""}), this.origin)
  736. }, n.prototype.send = function (t) {
  737. this.postMessage("m", t)
  738. }, n.enabled = function () {
  739. return u.iframeEnabled
  740. }, n.transportName = "iframe", n.roundTrips = 2, e.exports = n
  741. }, {
  742. "../utils/event": 46,
  743. "../utils/iframe": 47,
  744. "../utils/random": 50,
  745. "../utils/url": 52,
  746. "../version": 53,
  747. debug: void 0,
  748. events: 3,
  749. inherits: 54,
  750. json3: 55
  751. }],
  752. 23: [function (t, e) {
  753. (function (n) {
  754. "use strict";
  755. function r(t) {
  756. if (!r.enabled()) throw new Error("Transport created when disabled");
  757. o.call(this, t, "/jsonp", a, s)
  758. }
  759. var i = t("inherits"), o = t("./lib/sender-receiver"), s = t("./receiver/jsonp"),
  760. a = t("./sender/jsonp");
  761. i(r, o), r.enabled = function () {
  762. return !!n.document
  763. }, r.transportName = "jsonp-polling", r.roundTrips = 1, r.needBody = !0, e.exports = r
  764. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  765. }, {"./lib/sender-receiver": 28, "./receiver/jsonp": 31, "./sender/jsonp": 33, inherits: 54}],
  766. 24: [function (t, e) {
  767. "use strict";
  768. function n(t) {
  769. return function (e, n, r) {
  770. var i = {};
  771. "string" == typeof n && (i.headers = {"Content-type": "text/plain"});
  772. var s = o.addPath(e, "/xhr_send"), a = new t("POST", s, n, i);
  773. return a.once("finish", function (t) {
  774. return a = null, 200 !== t && 204 !== t ? r(new Error("http status " + t)) : void r()
  775. }), function () {
  776. a.close(), a = null;
  777. var t = new Error("Aborted");
  778. t.code = 1e3, r(t)
  779. }
  780. }
  781. }
  782. function r(t, e, r, i) {
  783. s.call(this, t, e, n(i), r, i)
  784. }
  785. var i = t("inherits"), o = t("../../utils/url"), s = t("./sender-receiver");
  786. i(r, s), e.exports = r
  787. }, {"../../utils/url": 52, "./sender-receiver": 28, debug: void 0, inherits: 54}],
  788. 25: [function (t, e) {
  789. "use strict";
  790. function n(t, e) {
  791. i.call(this), this.sendBuffer = [], this.sender = e, this.url = t
  792. }
  793. var r = t("inherits"), i = t("events").EventEmitter;
  794. r(n, i), n.prototype.send = function (t) {
  795. this.sendBuffer.push(t), this.sendStop || this.sendSchedule()
  796. }, n.prototype.sendScheduleWait = function () {
  797. var t, e = this;
  798. this.sendStop = function () {
  799. e.sendStop = null, clearTimeout(t)
  800. }, t = setTimeout(function () {
  801. e.sendStop = null, e.sendSchedule()
  802. }, 25)
  803. }, n.prototype.sendSchedule = function () {
  804. var t = this;
  805. if (this.sendBuffer.length > 0) {
  806. var e = "[" + this.sendBuffer.join(",") + "]";
  807. this.sendStop = this.sender(this.url, e, function (e) {
  808. t.sendStop = null, e ? (t.emit("close", e.code || 1006, "Sending error: " + e), t._cleanup()) : t.sendScheduleWait()
  809. }), this.sendBuffer = []
  810. }
  811. }, n.prototype._cleanup = function () {
  812. this.removeAllListeners()
  813. }, n.prototype.stop = function () {
  814. this._cleanup(), this.sendStop && (this.sendStop(), this.sendStop = null)
  815. }, e.exports = n
  816. }, {debug: void 0, events: 3, inherits: 54}],
  817. 26: [function (t, e) {
  818. (function (n) {
  819. "use strict";
  820. var r = t("inherits"), i = t("../iframe"), o = t("../../utils/object");
  821. e.exports = function (t) {
  822. function e(e, n) {
  823. i.call(this, t.transportName, e, n)
  824. }
  825. return r(e, i), e.enabled = function (e, r) {
  826. if (!n.document) return !1;
  827. var s = o.extend({}, r);
  828. return s.sameOrigin = !0, t.enabled(s) && i.enabled()
  829. }, e.transportName = "iframe-" + t.transportName, e.needBody = !0, e.roundTrips = i.roundTrips + t.roundTrips - 1, e.facadeTransport = t, e
  830. }
  831. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  832. }, {"../../utils/object": 49, "../iframe": 22, inherits: 54}],
  833. 27: [function (t, e) {
  834. "use strict";
  835. function n(t, e, n) {
  836. i.call(this), this.Receiver = t, this.receiveUrl = e, this.AjaxObject = n, this._scheduleReceiver()
  837. }
  838. var r = t("inherits"), i = t("events").EventEmitter;
  839. r(n, i), n.prototype._scheduleReceiver = function () {
  840. var t = this, e = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject);
  841. e.on("message", function (e) {
  842. t.emit("message", e)
  843. }), e.once("close", function (n, r) {
  844. t.poll = e = null, t.pollIsClosing || ("network" === r ? t._scheduleReceiver() : (t.emit("close", n || 1006, r), t.removeAllListeners()))
  845. })
  846. }, n.prototype.abort = function () {
  847. this.removeAllListeners(), this.pollIsClosing = !0, this.poll && this.poll.abort()
  848. }, e.exports = n
  849. }, {debug: void 0, events: 3, inherits: 54}],
  850. 28: [function (t, e) {
  851. "use strict";
  852. function n(t, e, n, r, a) {
  853. var u = i.addPath(t, e), l = this;
  854. o.call(this, t, n), this.poll = new s(r, u, a), this.poll.on("message", function (t) {
  855. l.emit("message", t)
  856. }), this.poll.once("close", function (t, e) {
  857. l.poll = null, l.emit("close", t, e), l.close()
  858. })
  859. }
  860. var r = t("inherits"), i = t("../../utils/url"), o = t("./buffered-sender"), s = t("./polling");
  861. r(n, o), n.prototype.close = function () {
  862. this.removeAllListeners(), this.poll && (this.poll.abort(), this.poll = null), this.stop()
  863. }, e.exports = n
  864. }, {"../../utils/url": 52, "./buffered-sender": 25, "./polling": 27, debug: void 0, inherits: 54}],
  865. 29: [function (t, e) {
  866. "use strict";
  867. function n(t) {
  868. i.call(this);
  869. var e = this, n = this.es = new o(t);
  870. n.onmessage = function (t) {
  871. e.emit("message", decodeURI(t.data))
  872. }, n.onerror = function (t) {
  873. var r = 2 !== n.readyState ? "network" : "permanent";
  874. e._cleanup(), e._close(r)
  875. }
  876. }
  877. var r = t("inherits"), i = t("events").EventEmitter, o = t("eventsource");
  878. r(n, i), n.prototype.abort = function () {
  879. this._cleanup(), this._close("user")
  880. }, n.prototype._cleanup = function () {
  881. var t = this.es;
  882. t && (t.onmessage = t.onerror = null, t.close(), this.es = null)
  883. }, n.prototype._close = function (t) {
  884. var e = this;
  885. setTimeout(function () {
  886. e.emit("close", null, t), e.removeAllListeners()
  887. }, 200)
  888. }, e.exports = n
  889. }, {debug: void 0, events: 3, eventsource: 18, inherits: 54}],
  890. 30: [function (t, e) {
  891. (function (n) {
  892. "use strict";
  893. function r(t) {
  894. a.call(this);
  895. var e = this;
  896. o.polluteGlobalNamespace(), this.id = "a" + u.string(6), t = s.addQuery(t, "c=" + decodeURIComponent(o.WPrefix + "." + this.id));
  897. var i = r.htmlfileEnabled ? o.createHtmlfile : o.createIframe;
  898. n[o.WPrefix][this.id] = {
  899. start: function () {
  900. e.iframeObj.loaded()
  901. }, message: function (t) {
  902. e.emit("message", t)
  903. }, stop: function () {
  904. e._cleanup(), e._close("network")
  905. }
  906. }, this.iframeObj = i(t, function () {
  907. e._cleanup(), e._close("permanent")
  908. })
  909. }
  910. var i = t("inherits"), o = t("../../utils/iframe"), s = t("../../utils/url"),
  911. a = t("events").EventEmitter, u = t("../../utils/random");
  912. i(r, a), r.prototype.abort = function () {
  913. this._cleanup(), this._close("user")
  914. }, r.prototype._cleanup = function () {
  915. this.iframeObj && (this.iframeObj.cleanup(), this.iframeObj = null), delete n[o.WPrefix][this.id]
  916. }, r.prototype._close = function (t) {
  917. this.emit("close", null, t), this.removeAllListeners()
  918. }, r.htmlfileEnabled = !1;
  919. var l = ["Active"].concat("Object").join("X");
  920. if (l in n) try {
  921. r.htmlfileEnabled = !!new n[l]("htmlfile")
  922. } catch (c) {
  923. }
  924. r.enabled = r.htmlfileEnabled || o.iframeEnabled, e.exports = r
  925. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  926. }, {
  927. "../../utils/iframe": 47,
  928. "../../utils/random": 50,
  929. "../../utils/url": 52,
  930. debug: void 0,
  931. events: 3,
  932. inherits: 54
  933. }],
  934. 31: [function (t, e) {
  935. (function (n) {
  936. "use strict";
  937. function r(t) {
  938. var e = this;
  939. l.call(this), i.polluteGlobalNamespace(), this.id = "a" + o.string(6);
  940. var s = a.addQuery(t, "c=" + encodeURIComponent(i.WPrefix + "." + this.id));
  941. n[i.WPrefix][this.id] = this._callback.bind(this), this._createScript(s), this.timeoutId = setTimeout(function () {
  942. e._abort(new Error("JSONP script loaded abnormally (timeout)"))
  943. }, r.timeout)
  944. }
  945. var i = t("../../utils/iframe"), o = t("../../utils/random"), s = t("../../utils/browser"),
  946. a = t("../../utils/url"), u = t("inherits"), l = t("events").EventEmitter;
  947. u(r, l), r.prototype.abort = function () {
  948. if (n[i.WPrefix][this.id]) {
  949. var t = new Error("JSONP user aborted read");
  950. t.code = 1e3, this._abort(t)
  951. }
  952. }, r.timeout = 35e3, r.scriptErrorTimeout = 1e3, r.prototype._callback = function (t) {
  953. this._cleanup(), this.aborting || (t && this.emit("message", t), this.emit("close", null, "network"), this.removeAllListeners())
  954. }, r.prototype._abort = function (t) {
  955. this._cleanup(), this.aborting = !0, this.emit("close", t.code, t.message), this.removeAllListeners()
  956. }, r.prototype._cleanup = function () {
  957. if (clearTimeout(this.timeoutId), this.script2 && (this.script2.parentNode.removeChild(this.script2), this.script2 = null), this.script) {
  958. var t = this.script;
  959. t.parentNode.removeChild(t), t.onreadystatechange = t.onerror = t.onload = t.onclick = null, this.script = null
  960. }
  961. delete n[i.WPrefix][this.id]
  962. }, r.prototype._scriptError = function () {
  963. var t = this;
  964. this.errorTimer || (this.errorTimer = setTimeout(function () {
  965. t.loadedOkay || t._abort(new Error("JSONP script loaded abnormally (onerror)"))
  966. }, r.scriptErrorTimeout))
  967. }, r.prototype._createScript = function (t) {
  968. var e, r = this, i = this.script = n.document.createElement("script");
  969. if (i.id = "a" + o.string(8), i.src = t, i.type = "text/javascript", i.charset = "UTF-8", i.onerror = this._scriptError.bind(this), i.onload = function () {
  970. r._abort(new Error("JSONP script loaded abnormally (onload)"))
  971. }, i.onreadystatechange = function () {
  972. if (/loaded|closed/.test(i.readyState)) {
  973. if (i && i.htmlFor && i.onclick) {
  974. r.loadedOkay = !0;
  975. try {
  976. i.onclick()
  977. } catch (t) {
  978. }
  979. }
  980. i && r._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))
  981. }
  982. }, "undefined" == typeof i.async && n.document.attachEvent) if (s.isOpera()) e = this.script2 = n.document.createElement("script"), e.text = "try{var a = document.getElementById('" + i.id + "'); if(a)a.onerror();}catch(x){};", i.async = e.async = !1; else {
  983. try {
  984. i.htmlFor = i.id, i.event = "onclick"
  985. } catch (a) {
  986. }
  987. i.async = !0
  988. }
  989. "undefined" != typeof i.async && (i.async = !0);
  990. var u = n.document.getElementsByTagName("head")[0];
  991. u.insertBefore(i, u.firstChild), e && u.insertBefore(e, u.firstChild)
  992. }, e.exports = r
  993. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  994. }, {
  995. "../../utils/browser": 44,
  996. "../../utils/iframe": 47,
  997. "../../utils/random": 50,
  998. "../../utils/url": 52,
  999. debug: void 0,
  1000. events: 3,
  1001. inherits: 54
  1002. }],
  1003. 32: [function (t, e) {
  1004. "use strict";
  1005. function n(t, e) {
  1006. i.call(this);
  1007. var n = this;
  1008. this.bufferPosition = 0, this.xo = new e("POST", t, null), this.xo.on("chunk", this._chunkHandler.bind(this)), this.xo.once("finish", function (t, e) {
  1009. n._chunkHandler(t, e), n.xo = null;
  1010. var r = 200 === t ? "network" : "permanent";
  1011. n.emit("close", null, r), n._cleanup()
  1012. })
  1013. }
  1014. var r = t("inherits"), i = t("events").EventEmitter;
  1015. r(n, i), n.prototype._chunkHandler = function (t, e) {
  1016. if (200 === t && e) for (var n = -1; ; this.bufferPosition += n + 1) {
  1017. var r = e.slice(this.bufferPosition);
  1018. if (n = r.indexOf("\n"), -1 === n) break;
  1019. var i = r.slice(0, n);
  1020. i && this.emit("message", i)
  1021. }
  1022. }, n.prototype._cleanup = function () {
  1023. this.removeAllListeners()
  1024. }, n.prototype.abort = function () {
  1025. this.xo && (this.xo.close(), this.emit("close", null, "user"), this.xo = null), this._cleanup()
  1026. }, e.exports = n
  1027. }, {debug: void 0, events: 3, inherits: 54}],
  1028. 33: [function (t, e) {
  1029. (function (n) {
  1030. "use strict";
  1031. function r(t) {
  1032. try {
  1033. return n.document.createElement('<iframe name="' + t + '">')
  1034. } catch (e) {
  1035. var r = n.document.createElement("iframe");
  1036. return r.name = t, r
  1037. }
  1038. }
  1039. function i() {
  1040. o = n.document.createElement("form"), o.style.display = "none", o.style.position = "absolute", o.method = "POST", o.enctype = "application/x-www-form-urlencoded", o.acceptCharset = "UTF-8", s = n.document.createElement("textarea"), s.name = "d", o.appendChild(s), n.document.body.appendChild(o)
  1041. }
  1042. var o, s, a = t("../../utils/random"), u = t("../../utils/url");
  1043. e.exports = function (t, e, n) {
  1044. o || i();
  1045. var l = "a" + a.string(8);
  1046. o.target = l, o.action = u.addQuery(u.addPath(t, "/jsonp_send"), "i=" + l);
  1047. var c = r(l);
  1048. c.id = l, c.style.display = "none", o.appendChild(c);
  1049. try {
  1050. s.value = e
  1051. } catch (f) {
  1052. }
  1053. o.submit();
  1054. var h = function (t) {
  1055. c.onerror && (c.onreadystatechange = c.onerror = c.onload = null, setTimeout(function () {
  1056. c.parentNode.removeChild(c), c = null
  1057. }, 500), s.value = "", n(t))
  1058. };
  1059. return c.onerror = function () {
  1060. h()
  1061. }, c.onload = function () {
  1062. h()
  1063. }, c.onreadystatechange = function (t) {
  1064. "complete" === c.readyState && h()
  1065. }, function () {
  1066. h(new Error("Aborted"))
  1067. }
  1068. }
  1069. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1070. }, {"../../utils/random": 50, "../../utils/url": 52, debug: void 0}],
  1071. 34: [function (t, e) {
  1072. (function (n) {
  1073. "use strict";
  1074. function r(t, e, n) {
  1075. var r = this;
  1076. i.call(this), setTimeout(function () {
  1077. r._start(t, e, n)
  1078. }, 0)
  1079. }
  1080. var i = t("events").EventEmitter, o = t("inherits"), s = t("../../utils/event"),
  1081. a = t("../../utils/browser"), u = t("../../utils/url");
  1082. o(r, i), r.prototype._start = function (t, e, r) {
  1083. var i = this, o = new n.XDomainRequest;
  1084. e = u.addQuery(e, "t=" + +new Date), o.onerror = function () {
  1085. i._error()
  1086. }, o.ontimeout = function () {
  1087. i._error()
  1088. }, o.onprogress = function () {
  1089. i.emit("chunk", 200, o.responseText)
  1090. }, o.onload = function () {
  1091. i.emit("finish", 200, o.responseText), i._cleanup(!1)
  1092. }, this.xdr = o, this.unloadRef = s.unloadAdd(function () {
  1093. i._cleanup(!0)
  1094. });
  1095. try {
  1096. this.xdr.open(t, e), this.timeout && (this.xdr.timeout = this.timeout), this.xdr.send(r)
  1097. } catch (a) {
  1098. this._error()
  1099. }
  1100. }, r.prototype._error = function () {
  1101. this.emit("finish", 0, ""), this._cleanup(!1)
  1102. }, r.prototype._cleanup = function (t) {
  1103. if (this.xdr) {
  1104. if (this.removeAllListeners(), s.unloadDel(this.unloadRef), this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null, t) try {
  1105. this.xdr.abort()
  1106. } catch (e) {
  1107. }
  1108. this.unloadRef = this.xdr = null
  1109. }
  1110. }, r.prototype.close = function () {
  1111. this._cleanup(!0)
  1112. }, r.enabled = !(!n.XDomainRequest || !a.hasDomain()), e.exports = r
  1113. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1114. }, {
  1115. "../../utils/browser": 44,
  1116. "../../utils/event": 46,
  1117. "../../utils/url": 52,
  1118. debug: void 0,
  1119. events: 3,
  1120. inherits: 54
  1121. }],
  1122. 35: [function (t, e) {
  1123. "use strict";
  1124. function n(t, e, n, r) {
  1125. i.call(this, t, e, n, r)
  1126. }
  1127. var r = t("inherits"), i = t("../driver/xhr");
  1128. r(n, i), n.enabled = i.enabled && i.supportsCORS, e.exports = n
  1129. }, {"../driver/xhr": 17, inherits: 54}],
  1130. 36: [function (t, e) {
  1131. "use strict";
  1132. function n() {
  1133. var t = this;
  1134. r.call(this), this.to = setTimeout(function () {
  1135. t.emit("finish", 200, "{}")
  1136. }, n.timeout)
  1137. }
  1138. var r = t("events").EventEmitter, i = t("inherits");
  1139. i(n, r), n.prototype.close = function () {
  1140. clearTimeout(this.to)
  1141. }, n.timeout = 2e3, e.exports = n
  1142. }, {events: 3, inherits: 54}],
  1143. 37: [function (t, e) {
  1144. "use strict";
  1145. function n(t, e, n) {
  1146. i.call(this, t, e, n, {noCredentials: !0})
  1147. }
  1148. var r = t("inherits"), i = t("../driver/xhr");
  1149. r(n, i), n.enabled = i.enabled, e.exports = n
  1150. }, {"../driver/xhr": 17, inherits: 54}],
  1151. 38: [function (t, e) {
  1152. "use strict";
  1153. function n(t, e, o) {
  1154. if (!n.enabled()) throw new Error("Transport created when disabled");
  1155. s.call(this);
  1156. var u = this, l = i.addPath(t, "/websocket");
  1157. l = "https" === l.slice(0, 5) ? "wss" + l.slice(5) : "ws" + l.slice(4), this.url = l, this.ws = new a(this.url, [], o), this.ws.onmessage = function (t) {
  1158. u.emit("message", t.data)
  1159. }, this.unloadRef = r.unloadAdd(function () {
  1160. u.ws.close()
  1161. }), this.ws.onclose = function (t) {
  1162. u.emit("close", t.code, t.reason), u._cleanup()
  1163. }, this.ws.onerror = function (t) {
  1164. u.emit("close", 1006, "WebSocket connection broken"), u._cleanup()
  1165. }
  1166. }
  1167. var r = t("../utils/event"), i = t("../utils/url"), o = t("inherits"), s = t("events").EventEmitter,
  1168. a = t("./driver/websocket");
  1169. o(n, s), n.prototype.send = function (t) {
  1170. var e = "[" + t + "]";
  1171. this.ws.send(e)
  1172. }, n.prototype.close = function () {
  1173. this.ws && this.ws.close(), this._cleanup()
  1174. }, n.prototype._cleanup = function () {
  1175. var t = this.ws;
  1176. t && (t.onmessage = t.onclose = t.onerror = null), r.unloadDel(this.unloadRef), this.unloadRef = this.ws = null, this.removeAllListeners()
  1177. }, n.enabled = function () {
  1178. return !!a
  1179. }, n.transportName = "websocket", n.roundTrips = 2, e.exports = n
  1180. }, {
  1181. "../utils/event": 46,
  1182. "../utils/url": 52,
  1183. "./driver/websocket": 19,
  1184. debug: void 0,
  1185. events: 3,
  1186. inherits: 54
  1187. }],
  1188. 39: [function (t, e) {
  1189. "use strict";
  1190. function n(t) {
  1191. if (!a.enabled) throw new Error("Transport created when disabled");
  1192. i.call(this, t, "/xhr", s, a)
  1193. }
  1194. var r = t("inherits"), i = t("./lib/ajax-based"), o = t("./xdr-streaming"), s = t("./receiver/xhr"),
  1195. a = t("./sender/xdr");
  1196. r(n, i), n.enabled = o.enabled, n.transportName = "xdr-polling", n.roundTrips = 2, e.exports = n
  1197. }, {"./lib/ajax-based": 24, "./receiver/xhr": 32, "./sender/xdr": 34, "./xdr-streaming": 40, inherits: 54}],
  1198. 40: [function (t, e) {
  1199. "use strict";
  1200. function n(t) {
  1201. if (!s.enabled) throw new Error("Transport created when disabled");
  1202. i.call(this, t, "/xhr_streaming", o, s)
  1203. }
  1204. var r = t("inherits"), i = t("./lib/ajax-based"), o = t("./receiver/xhr"), s = t("./sender/xdr");
  1205. r(n, i), n.enabled = function (t) {
  1206. return t.cookie_needed || t.nullOrigin ? !1 : s.enabled && t.sameScheme
  1207. }, n.transportName = "xdr-streaming", n.roundTrips = 2, e.exports = n
  1208. }, {"./lib/ajax-based": 24, "./receiver/xhr": 32, "./sender/xdr": 34, inherits: 54}],
  1209. 41: [function (t, e) {
  1210. "use strict";
  1211. function n(t) {
  1212. if (!a.enabled && !s.enabled) throw new Error("Transport created when disabled");
  1213. i.call(this, t, "/xhr", o, s)
  1214. }
  1215. var r = t("inherits"), i = t("./lib/ajax-based"), o = t("./receiver/xhr"), s = t("./sender/xhr-cors"),
  1216. a = t("./sender/xhr-local");
  1217. r(n, i), n.enabled = function (t) {
  1218. return t.nullOrigin ? !1 : a.enabled && t.sameOrigin ? !0 : s.enabled
  1219. }, n.transportName = "xhr-polling", n.roundTrips = 2, e.exports = n
  1220. }, {
  1221. "./lib/ajax-based": 24,
  1222. "./receiver/xhr": 32,
  1223. "./sender/xhr-cors": 35,
  1224. "./sender/xhr-local": 37,
  1225. inherits: 54
  1226. }],
  1227. 42: [function (t, e) {
  1228. (function (n) {
  1229. "use strict";
  1230. function r(t) {
  1231. if (!u.enabled && !a.enabled) throw new Error("Transport created when disabled");
  1232. o.call(this, t, "/xhr_streaming", s, a)
  1233. }
  1234. var i = t("inherits"), o = t("./lib/ajax-based"), s = t("./receiver/xhr"), a = t("./sender/xhr-cors"),
  1235. u = t("./sender/xhr-local"), l = t("../utils/browser");
  1236. i(r, o), r.enabled = function (t) {
  1237. return t.nullOrigin ? !1 : l.isOpera() ? !1 : a.enabled
  1238. }, r.transportName = "xhr-streaming", r.roundTrips = 2, r.needBody = !!n.document, e.exports = r
  1239. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1240. }, {
  1241. "../utils/browser": 44,
  1242. "./lib/ajax-based": 24,
  1243. "./receiver/xhr": 32,
  1244. "./sender/xhr-cors": 35,
  1245. "./sender/xhr-local": 37,
  1246. inherits: 54
  1247. }],
  1248. 43: [function (t, e) {
  1249. (function (t) {
  1250. "use strict";
  1251. e.exports.randomBytes = t.crypto && t.crypto.getRandomValues ? function (e) {
  1252. var n = new Uint8Array(e);
  1253. return t.crypto.getRandomValues(n), n
  1254. } : function (t) {
  1255. for (var e = new Array(t), n = 0; t > n; n++) e[n] = Math.floor(256 * Math.random());
  1256. return e
  1257. }
  1258. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1259. }, {}],
  1260. 44: [function (t, e) {
  1261. (function (t) {
  1262. "use strict";
  1263. e.exports = {
  1264. isOpera: function () {
  1265. return t.navigator && /opera/i.test(t.navigator.userAgent)
  1266. }, isKonqueror: function () {
  1267. return t.navigator && /konqueror/i.test(t.navigator.userAgent)
  1268. }, hasDomain: function () {
  1269. if (!t.document) return !0;
  1270. try {
  1271. return !!t.document.domain
  1272. } catch (e) {
  1273. return !1
  1274. }
  1275. }
  1276. }
  1277. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1278. }, {}],
  1279. 45: [function (t, e) {
  1280. "use strict";
  1281. var n, r = t("json3"),
  1282. i = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,
  1283. o = function (t) {
  1284. var e, n = {}, r = [];
  1285. for (e = 0; 65536 > e; e++) r.push(String.fromCharCode(e));
  1286. return t.lastIndex = 0, r.join("").replace(t, function (t) {
  1287. return n[t] = "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice(-4), ""
  1288. }), t.lastIndex = 0, n
  1289. };
  1290. e.exports = {
  1291. quote: function (t) {
  1292. var e = r.stringify(t);
  1293. return i.lastIndex = 0, i.test(e) ? (n || (n = o(i)), e.replace(i, function (t) {
  1294. return n[t]
  1295. })) : e
  1296. }
  1297. }
  1298. }, {json3: 55}],
  1299. 46: [function (t, e) {
  1300. (function (n) {
  1301. "use strict";
  1302. var r = t("./random"), i = {}, o = !1, s = n.chrome && n.chrome.app && n.chrome.app.runtime;
  1303. e.exports = {
  1304. attachEvent: function (t, e) {
  1305. "undefined" != typeof n.addEventListener ? n.addEventListener(t, e, !1) : n.document && n.attachEvent && (n.document.attachEvent("on" + t, e), n.attachEvent("on" + t, e))
  1306. }, detachEvent: function (t, e) {
  1307. "undefined" != typeof n.addEventListener ? n.removeEventListener(t, e, !1) : n.document && n.detachEvent && (n.document.detachEvent("on" + t, e), n.detachEvent("on" + t, e))
  1308. }, unloadAdd: function (t) {
  1309. if (s) return null;
  1310. var e = r.string(8);
  1311. return i[e] = t, o && setTimeout(this.triggerUnloadCallbacks, 0), e
  1312. }, unloadDel: function (t) {
  1313. t in i && delete i[t]
  1314. }, triggerUnloadCallbacks: function () {
  1315. for (var t in i) i[t](), delete i[t]
  1316. }
  1317. };
  1318. var a = function () {
  1319. o || (o = !0, e.exports.triggerUnloadCallbacks())
  1320. };
  1321. s || e.exports.attachEvent("unload", a)
  1322. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1323. }, {"./random": 50}],
  1324. 47: [function (t, e) {
  1325. (function (n) {
  1326. "use strict";
  1327. var r = t("./event"), i = t("json3"), o = t("./browser");
  1328. e.exports = {
  1329. WPrefix: "_jp", currentWindowId: null, polluteGlobalNamespace: function () {
  1330. e.exports.WPrefix in n || (n[e.exports.WPrefix] = {})
  1331. }, postMessage: function (t, r) {
  1332. n.parent !== n && n.parent.postMessage(i.stringify({
  1333. windowId: e.exports.currentWindowId,
  1334. type: t,
  1335. data: r || ""
  1336. }), "*")
  1337. }, createIframe: function (t, e) {
  1338. var i, o, s = n.document.createElement("iframe"), a = function () {
  1339. clearTimeout(i);
  1340. try {
  1341. s.onload = null
  1342. } catch (t) {
  1343. }
  1344. s.onerror = null
  1345. }, u = function () {
  1346. s && (a(), setTimeout(function () {
  1347. s && s.parentNode.removeChild(s), s = null
  1348. }, 0), r.unloadDel(o))
  1349. }, l = function (t) {
  1350. s && (u(), e(t))
  1351. }, c = function (t, e) {
  1352. try {
  1353. setTimeout(function () {
  1354. s && s.contentWindow && s.contentWindow.postMessage(t, e)
  1355. }, 0)
  1356. } catch (n) {
  1357. }
  1358. };
  1359. return s.src = t, s.style.display = "none", s.style.position = "absolute", s.onerror = function () {
  1360. l("onerror")
  1361. }, s.onload = function () {
  1362. clearTimeout(i), i = setTimeout(function () {
  1363. l("onload timeout")
  1364. }, 2e3)
  1365. }, n.document.body.appendChild(s), i = setTimeout(function () {
  1366. l("timeout")
  1367. }, 15e3), o = r.unloadAdd(u), {post: c, cleanup: u, loaded: a}
  1368. }, createHtmlfile: function (t, i) {
  1369. var o, s, a, u = ["Active"].concat("Object").join("X"), l = new n[u]("htmlfile"),
  1370. c = function () {
  1371. clearTimeout(o), a.onerror = null
  1372. }, f = function () {
  1373. l && (c(), r.unloadDel(s), a.parentNode.removeChild(a), a = l = null, CollectGarbage())
  1374. }, h = function (t) {
  1375. l && (f(), i(t))
  1376. }, d = function (t, e) {
  1377. try {
  1378. setTimeout(function () {
  1379. a && a.contentWindow && a.contentWindow.postMessage(t, e)
  1380. }, 0)
  1381. } catch (n) {
  1382. }
  1383. };
  1384. l.open(), l.write('<html><script>document.domain="' + n.document.domain + '";</script></html>'), l.close(), l.parentWindow[e.exports.WPrefix] = n[e.exports.WPrefix];
  1385. var p = l.createElement("div");
  1386. return l.body.appendChild(p), a = l.createElement("iframe"), p.appendChild(a), a.src = t, a.onerror = function () {
  1387. h("onerror")
  1388. }, o = setTimeout(function () {
  1389. h("timeout")
  1390. }, 15e3), s = r.unloadAdd(f), {post: d, cleanup: f, loaded: c}
  1391. }
  1392. }, e.exports.iframeEnabled = !1, n.document && (e.exports.iframeEnabled = ("function" == typeof n.postMessage || "object" == typeof n.postMessage) && !o.isKonqueror())
  1393. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1394. }, {"./browser": 44, "./event": 46, debug: void 0, json3: 55}],
  1395. 48: [function (t, e) {
  1396. (function (t) {
  1397. "use strict";
  1398. var n = {};
  1399. ["log", "debug", "warn"].forEach(function (e) {
  1400. var r;
  1401. try {
  1402. r = t.console && t.console[e] && t.console[e].apply
  1403. } catch (i) {
  1404. }
  1405. n[e] = r ? function () {
  1406. return t.console[e].apply(t.console, arguments)
  1407. } : "log" === e ? function () {
  1408. } : n.log
  1409. }), e.exports = n
  1410. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1411. }, {}],
  1412. 49: [function (t, e) {
  1413. "use strict";
  1414. e.exports = {
  1415. isObject: function (t) {
  1416. var e = typeof t;
  1417. return "function" === e || "object" === e && !!t
  1418. }, extend: function (t) {
  1419. if (!this.isObject(t)) return t;
  1420. for (var e, n, r = 1, i = arguments.length; i > r; r++) {
  1421. e = arguments[r];
  1422. for (n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
  1423. }
  1424. return t
  1425. }
  1426. }
  1427. }, {}],
  1428. 50: [function (t, e) {
  1429. "use strict";
  1430. var n = t("crypto"), r = "abcdefghijklmnopqrstuvwxyz012345";
  1431. e.exports = {
  1432. string: function (t) {
  1433. for (var e = r.length, i = n.randomBytes(t), o = [], s = 0; t > s; s++) o.push(r.substr(i[s] % e, 1));
  1434. return o.join("")
  1435. }, number: function (t) {
  1436. return Math.floor(Math.random() * t)
  1437. }, numberString: function (t) {
  1438. var e = ("" + (t - 1)).length, n = new Array(e + 1).join("0");
  1439. return (n + this.number(t)).slice(-e)
  1440. }
  1441. }
  1442. }, {crypto: 43}],
  1443. 51: [function (t, e) {
  1444. "use strict";
  1445. e.exports = function (t) {
  1446. return {
  1447. filterToEnabled: function (e, n) {
  1448. var r = {main: [], facade: []};
  1449. return e ? "string" == typeof e && (e = [e]) : e = [], t.forEach(function (t) {
  1450. t && ("websocket" !== t.transportName || n.websocket !== !1) && (e.length && -1 === e.indexOf(t.transportName) || t.enabled(n) && (r.main.push(t), t.facadeTransport && r.facade.push(t.facadeTransport)))
  1451. }), r
  1452. }
  1453. }
  1454. }
  1455. }, {debug: void 0}],
  1456. 52: [function (t, e) {
  1457. "use strict";
  1458. var n = t("url-parse");
  1459. e.exports = {
  1460. getOrigin: function (t) {
  1461. if (!t) return null;
  1462. var e = new n(t);
  1463. if ("file:" === e.protocol) return null;
  1464. var r = e.port;
  1465. return r || (r = "https:" === e.protocol ? "443" : "80"), e.protocol + "//" + e.hostname + ":" + r
  1466. }, isOriginEqual: function (t, e) {
  1467. var n = this.getOrigin(t) === this.getOrigin(e);
  1468. return n
  1469. }, isSchemeEqual: function (t, e) {
  1470. return t.split(":")[0] === e.split(":")[0]
  1471. }, addPath: function (t, e) {
  1472. var n = t.split("?");
  1473. return n[0] + e + (n[1] ? "?" + n[1] : "")
  1474. }, addQuery: function (t, e) {
  1475. return t + (-1 === t.indexOf("?") ? "?" + e : "&" + e)
  1476. }
  1477. }
  1478. }, {debug: void 0, "url-parse": 56}],
  1479. 53: [function (t, e) {
  1480. e.exports = "1.1.1"
  1481. }, {}],
  1482. 54: [function (t, e) {
  1483. e.exports = "function" == typeof Object.create ? function (t, e) {
  1484. t.super_ = e, t.prototype = Object.create(e.prototype, {
  1485. constructor: {
  1486. value: t,
  1487. enumerable: !1,
  1488. writable: !0,
  1489. configurable: !0
  1490. }
  1491. })
  1492. } : function (t, e) {
  1493. t.super_ = e;
  1494. var n = function () {
  1495. };
  1496. n.prototype = e.prototype, t.prototype = new n, t.prototype.constructor = t
  1497. }
  1498. }, {}],
  1499. 55: [function (e, n, r) {
  1500. (function (e) {
  1501. (function () {
  1502. function i(t, e) {
  1503. function n(t) {
  1504. if (n[t] !== m) return n[t];
  1505. var i;
  1506. if ("bug-string-char-index" == t) i = "a" != "a"[0]; else if ("json" == t) i = n("json-stringify") && n("json-parse"); else {
  1507. var s, a = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
  1508. if ("json-stringify" == t) {
  1509. var u = e.stringify, c = "function" == typeof u && g;
  1510. if (c) {
  1511. (s = function () {
  1512. return 1
  1513. }).toJSON = s;
  1514. try {
  1515. c = "0" === u(0) && "0" === u(new r) && '""' == u(new o) && u(b) === m && u(m) === m && u() === m && "1" === u(s) && "[1]" == u([s]) && "[null]" == u([m]) && "null" == u(null) && "[null,null,null]" == u([m, b, null]) && u({a: [s, !0, !1, null, "\x00\b\n\f\r "]}) == a && "1" === u(null, s) && "[\n 1,\n 2\n]" == u([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == u(new l(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == u(new l(864e13)) && '"-000001-01-01T00:00:00.000Z"' == u(new l(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == u(new l(-1))
  1516. } catch (f) {
  1517. c = !1
  1518. }
  1519. }
  1520. i = c
  1521. }
  1522. if ("json-parse" == t) {
  1523. var h = e.parse;
  1524. if ("function" == typeof h) try {
  1525. if (0 === h("0") && !h(!1)) {
  1526. s = h(a);
  1527. var d = 5 == s.a.length && 1 === s.a[0];
  1528. if (d) {
  1529. try {
  1530. d = !h('" "')
  1531. } catch (f) {
  1532. }
  1533. if (d) try {
  1534. d = 1 !== h("01")
  1535. } catch (f) {
  1536. }
  1537. if (d) try {
  1538. d = 1 !== h("1.")
  1539. } catch (f) {
  1540. }
  1541. }
  1542. }
  1543. } catch (f) {
  1544. d = !1
  1545. }
  1546. i = d
  1547. }
  1548. }
  1549. return n[t] = !!i
  1550. }
  1551. t || (t = u.Object()), e || (e = u.Object());
  1552. var r = t.Number || u.Number, o = t.String || u.String, a = t.Object || u.Object,
  1553. l = t.Date || u.Date, c = t.SyntaxError || u.SyntaxError, f = t.TypeError || u.TypeError,
  1554. h = t.Math || u.Math, d = t.JSON || u.JSON;
  1555. "object" == typeof d && d && (e.stringify = d.stringify, e.parse = d.parse);
  1556. var p, v, m, y = a.prototype, b = y.toString, g = new l(-0xc782b5b800cec);
  1557. try {
  1558. g = -109252 == g.getUTCFullYear() && 0 === g.getUTCMonth() && 1 === g.getUTCDate() && 10 == g.getUTCHours() && 37 == g.getUTCMinutes() && 6 == g.getUTCSeconds() && 708 == g.getUTCMilliseconds()
  1559. } catch (w) {
  1560. }
  1561. if (!n("json")) {
  1562. var x = "[object Function]", _ = "[object Date]", E = "[object Number]",
  1563. j = "[object String]", T = "[object Array]", S = "[object Boolean]",
  1564. O = n("bug-string-char-index");
  1565. if (!g) var C = h.floor, A = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
  1566. N = function (t, e) {
  1567. return A[e] + 365 * (t - 1970) + C((t - 1969 + (e = +(e > 1))) / 4) - C((t - 1901 + e) / 100) + C((t - 1601 + e) / 400)
  1568. };
  1569. if ((p = y.hasOwnProperty) || (p = function (t) {
  1570. var e, n = {};
  1571. return (n.__proto__ = null, n.__proto__ = {toString: 1}, n).toString != b ? p = function (t) {
  1572. var e = this.__proto__, n = t in (this.__proto__ = null, this);
  1573. return this.__proto__ = e, n
  1574. } : (e = n.constructor, p = function (t) {
  1575. var n = (this.constructor || e).prototype;
  1576. return t in this && !(t in n && this[t] === n[t])
  1577. }), n = null, p.call(this, t)
  1578. }), v = function (t, e) {
  1579. var n, r, i, o = 0;
  1580. (n = function () {
  1581. this.valueOf = 0
  1582. }).prototype.valueOf = 0, r = new n;
  1583. for (i in r) p.call(r, i) && o++;
  1584. return n = r = null, o ? v = 2 == o ? function (t, e) {
  1585. var n, r = {}, i = b.call(t) == x;
  1586. for (n in t) i && "prototype" == n || p.call(r, n) || !(r[n] = 1) || !p.call(t, n) || e(n)
  1587. } : function (t, e) {
  1588. var n, r, i = b.call(t) == x;
  1589. for (n in t) i && "prototype" == n || !p.call(t, n) || (r = "constructor" === n) || e(n);
  1590. (r || p.call(t, n = "constructor")) && e(n)
  1591. } : (r = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], v = function (t, e) {
  1592. var n, i, o = b.call(t) == x,
  1593. a = !o && "function" != typeof t.constructor && s[typeof t.hasOwnProperty] && t.hasOwnProperty || p;
  1594. for (n in t) o && "prototype" == n || !a.call(t, n) || e(n);
  1595. for (i = r.length; n = r[--i]; a.call(t, n) && e(n)) ;
  1596. }), v(t, e)
  1597. }, !n("json-stringify")) {
  1598. var k = {92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t"},
  1599. I = "000000", P = function (t, e) {
  1600. return (I + (e || 0)).slice(-t)
  1601. }, L = "\\u00", R = function (t) {
  1602. for (var e = '"', n = 0, r = t.length, i = !O || r > 10, o = i && (O ? t.split("") : t); r > n; n++) {
  1603. var s = t.charCodeAt(n);
  1604. switch (s) {
  1605. case 8:
  1606. case 9:
  1607. case 10:
  1608. case 12:
  1609. case 13:
  1610. case 34:
  1611. case 92:
  1612. e += k[s];
  1613. break;
  1614. default:
  1615. if (32 > s) {
  1616. e += L + P(2, s.toString(16));
  1617. break
  1618. }
  1619. e += i ? o[n] : t.charAt(n)
  1620. }
  1621. }
  1622. return e + '"'
  1623. }, U = function (t, e, n, r, i, o, s) {
  1624. var a, u, l, c, h, d, y, g, w, x, O, A, k, I, L, M;
  1625. try {
  1626. a = e[t]
  1627. } catch (q) {
  1628. }
  1629. if ("object" == typeof a && a) if (u = b.call(a), u != _ || p.call(a, "toJSON")) "function" == typeof a.toJSON && (u != E && u != j && u != T || p.call(a, "toJSON")) && (a = a.toJSON(t)); else if (a > -1 / 0 && 1 / 0 > a) {
  1630. if (N) {
  1631. for (h = C(a / 864e5), l = C(h / 365.2425) + 1970 - 1; N(l + 1, 0) <= h; l++) ;
  1632. for (c = C((h - N(l, 0)) / 30.42); N(l, c + 1) <= h; c++) ;
  1633. h = 1 + h - N(l, c), d = (a % 864e5 + 864e5) % 864e5, y = C(d / 36e5) % 24, g = C(d / 6e4) % 60, w = C(d / 1e3) % 60, x = d % 1e3
  1634. } else l = a.getUTCFullYear(), c = a.getUTCMonth(), h = a.getUTCDate(), y = a.getUTCHours(), g = a.getUTCMinutes(), w = a.getUTCSeconds(), x = a.getUTCMilliseconds();
  1635. a = (0 >= l || l >= 1e4 ? (0 > l ? "-" : "+") + P(6, 0 > l ? -l : l) : P(4, l)) + "-" + P(2, c + 1) + "-" + P(2, h) + "T" + P(2, y) + ":" + P(2, g) + ":" + P(2, w) + "." + P(3, x) + "Z"
  1636. } else a = null;
  1637. if (n && (a = n.call(e, t, a)), null === a) return "null";
  1638. if (u = b.call(a), u == S) return "" + a;
  1639. if (u == E) return a > -1 / 0 && 1 / 0 > a ? "" + a : "null";
  1640. if (u == j) return R("" + a);
  1641. if ("object" == typeof a) {
  1642. for (I = s.length; I--;) if (s[I] === a) throw f();
  1643. if (s.push(a), O = [], L = o, o += i, u == T) {
  1644. for (k = 0, I = a.length; I > k; k++) A = U(k, a, n, r, i, o, s), O.push(A === m ? "null" : A);
  1645. M = O.length ? i ? "[\n" + o + O.join(",\n" + o) + "\n" + L + "]" : "[" + O.join(",") + "]" : "[]"
  1646. } else v(r || a, function (t) {
  1647. var e = U(t, a, n, r, i, o, s);
  1648. e !== m && O.push(R(t) + ":" + (i ? " " : "") + e)
  1649. }), M = O.length ? i ? "{\n" + o + O.join(",\n" + o) + "\n" + L + "}" : "{" + O.join(",") + "}" : "{}";
  1650. return s.pop(), M
  1651. }
  1652. };
  1653. e.stringify = function (t, e, n) {
  1654. var r, i, o, a;
  1655. if (s[typeof e] && e) if ((a = b.call(e)) == x) i = e; else if (a == T) {
  1656. o = {};
  1657. for (var u, l = 0, c = e.length; c > l; u = e[l++], a = b.call(u), (a == j || a == E) && (o[u] = 1)) ;
  1658. }
  1659. if (n) if ((a = b.call(n)) == E) {
  1660. if ((n -= n % 1) > 0) for (r = "", n > 10 && (n = 10); r.length < n; r += " ") ;
  1661. } else a == j && (r = n.length <= 10 ? n : n.slice(0, 10));
  1662. return U("", (u = {}, u[""] = t, u), i, o, r, "", [])
  1663. }
  1664. }
  1665. if (!n("json-parse")) {
  1666. var M, q, D = o.fromCharCode, W = {
  1667. 92: "\\",
  1668. 34: '"',
  1669. 47: "/",
  1670. 98: "\b",
  1671. 116: " ",
  1672. 110: "\n",
  1673. 102: "\f",
  1674. 114: "\r"
  1675. }, J = function () {
  1676. throw M = q = null, c()
  1677. }, B = function () {
  1678. for (var t, e, n, r, i, o = q, s = o.length; s > M;) switch (i = o.charCodeAt(M)) {
  1679. case 9:
  1680. case 10:
  1681. case 13:
  1682. case 32:
  1683. M++;
  1684. break;
  1685. case 123:
  1686. case 125:
  1687. case 91:
  1688. case 93:
  1689. case 58:
  1690. case 44:
  1691. return t = O ? o.charAt(M) : o[M], M++, t;
  1692. case 34:
  1693. for (t = "@", M++; s > M;) if (i = o.charCodeAt(M), 32 > i) J(); else if (92 == i) switch (i = o.charCodeAt(++M)) {
  1694. case 92:
  1695. case 34:
  1696. case 47:
  1697. case 98:
  1698. case 116:
  1699. case 110:
  1700. case 102:
  1701. case 114:
  1702. t += W[i], M++;
  1703. break;
  1704. case 117:
  1705. for (e = ++M, n = M + 4; n > M; M++) i = o.charCodeAt(M), i >= 48 && 57 >= i || i >= 97 && 102 >= i || i >= 65 && 70 >= i || J();
  1706. t += D("0x" + o.slice(e, M));
  1707. break;
  1708. default:
  1709. J()
  1710. } else {
  1711. if (34 == i) break;
  1712. for (i = o.charCodeAt(M), e = M; i >= 32 && 92 != i && 34 != i;) i = o.charCodeAt(++M);
  1713. t += o.slice(e, M)
  1714. }
  1715. if (34 == o.charCodeAt(M)) return M++, t;
  1716. J();
  1717. default:
  1718. if (e = M, 45 == i && (r = !0, i = o.charCodeAt(++M)), i >= 48 && 57 >= i) {
  1719. for (48 == i && (i = o.charCodeAt(M + 1), i >= 48 && 57 >= i) && J(), r = !1; s > M && (i = o.charCodeAt(M), i >= 48 && 57 >= i); M++) ;
  1720. if (46 == o.charCodeAt(M)) {
  1721. for (n = ++M; s > n && (i = o.charCodeAt(n), i >= 48 && 57 >= i); n++) ;
  1722. n == M && J(), M = n
  1723. }
  1724. if (i = o.charCodeAt(M), 101 == i || 69 == i) {
  1725. for (i = o.charCodeAt(++M), (43 == i || 45 == i) && M++, n = M; s > n && (i = o.charCodeAt(n), i >= 48 && 57 >= i); n++) ;
  1726. n == M && J(), M = n
  1727. }
  1728. return +o.slice(e, M)
  1729. }
  1730. if (r && J(), "true" == o.slice(M, M + 4)) return M += 4, !0;
  1731. if ("false" == o.slice(M, M + 5)) return M += 5, !1;
  1732. if ("null" == o.slice(M, M + 4)) return M += 4, null;
  1733. J()
  1734. }
  1735. return "$"
  1736. }, G = function (t) {
  1737. var e, n;
  1738. if ("$" == t && J(), "string" == typeof t) {
  1739. if ("@" == (O ? t.charAt(0) : t[0])) return t.slice(1);
  1740. if ("[" == t) {
  1741. for (e = []; t = B(), "]" != t; n || (n = !0)) n && ("," == t ? (t = B(), "]" == t && J()) : J()), "," == t && J(), e.push(G(t));
  1742. return e
  1743. }
  1744. if ("{" == t) {
  1745. for (e = {}; t = B(), "}" != t; n || (n = !0)) n && ("," == t ? (t = B(), "}" == t && J()) : J()), ("," == t || "string" != typeof t || "@" != (O ? t.charAt(0) : t[0]) || ":" != B()) && J(), e[t.slice(1)] = G(B());
  1746. return e
  1747. }
  1748. J()
  1749. }
  1750. return t
  1751. }, F = function (t, e, n) {
  1752. var r = H(t, e, n);
  1753. r === m ? delete t[e] : t[e] = r
  1754. }, H = function (t, e, n) {
  1755. var r, i = t[e];
  1756. if ("object" == typeof i && i) if (b.call(i) == T) for (r = i.length; r--;) F(i, r, n); else v(i, function (t) {
  1757. F(i, t, n)
  1758. });
  1759. return n.call(t, e, i)
  1760. };
  1761. e.parse = function (t, e) {
  1762. var n, r;
  1763. return M = 0, q = "" + t, n = G(B()), "$" != B() && J(), M = q = null, e && b.call(e) == x ? H((r = {}, r[""] = n, r), "", e) : n
  1764. }
  1765. }
  1766. }
  1767. return e.runInContext = i, e
  1768. }
  1769. var o = "function" == typeof t && t.amd, s = {"function": !0, object: !0},
  1770. a = s[typeof r] && r && !r.nodeType && r, u = s[typeof window] && window || this,
  1771. l = a && s[typeof n] && n && !n.nodeType && "object" == typeof e && e;
  1772. if (!l || l.global !== l && l.window !== l && l.self !== l || (u = l), a && !o) i(u, a); else {
  1773. var c = u.JSON, f = u.JSON3, h = !1, d = i(u, u.JSON3 = {
  1774. noConflict: function () {
  1775. return h || (h = !0, u.JSON = c, u.JSON3 = f, c = f = null), d
  1776. }
  1777. });
  1778. u.JSON = {parse: d.parse, stringify: d.stringify}
  1779. }
  1780. o && t(function () {
  1781. return d
  1782. })
  1783. }).call(this)
  1784. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1785. }, {}],
  1786. 56: [function (t, e) {
  1787. "use strict";
  1788. function n(t) {
  1789. var e = u.exec(t);
  1790. return {protocol: e[1] ? e[1].toLowerCase() : "", slashes: !!e[2], rest: e[3] ? e[3] : ""}
  1791. }
  1792. function r(t, e, u) {
  1793. if (!(this instanceof r)) return new r(t, e, u);
  1794. var c, f, h, d, p = a.test(t), v = typeof e, m = this, y = 0;
  1795. "object" !== v && "string" !== v && (u = e, e = null), u && "function" != typeof u && (u = s.parse), e = o(e);
  1796. var b = n(t);
  1797. for (m.protocol = b.protocol || e.protocol || "", m.slashes = b.slashes || e.slashes, t = b.rest; y < l.length; y++) f = l[y], c = f[0], d = f[1], c !== c ? m[d] = t : "string" == typeof c ? ~(h = t.indexOf(c)) && ("number" == typeof f[2] ? (m[d] = t.slice(0, h), t = t.slice(h + f[2])) : (m[d] = t.slice(h), t = t.slice(0, h))) : (h = c.exec(t)) && (m[d] = h[1], t = t.slice(0, t.length - h[0].length)), m[d] = m[d] || (f[3] || "port" === d && p ? e[d] || "" : ""), f[4] && (m[d] = m[d].toLowerCase());
  1798. u && (m.query = u(m.query)), i(m.port, m.protocol) || (m.host = m.hostname, m.port = ""), m.username = m.password = "", m.auth && (f = m.auth.split(":"), m.username = f[0] || "", m.password = f[1] || ""), m.href = m.toString()
  1799. }
  1800. var i = t("requires-port"), o = t("./lolcation"), s = t("querystringify"), a = /^\/(?!\/)/,
  1801. u = /^([a-z0-9.+-]+:)?(\/\/)?(.*)$/i,
  1802. l = [["#", "hash"], ["?", "query"], ["/", "pathname"], ["@", "auth", 1], [0 / 0, "host", void 0, 1, 1], [/\:(\d+)$/, "port"], [0 / 0, "hostname", void 0, 1, 1]];
  1803. r.prototype.set = function (t, e, n) {
  1804. var r = this;
  1805. return "query" === t ? ("string" == typeof e && e.length && (e = (n || s.parse)(e)), r[t] = e) : "port" === t ? (r[t] = e, i(e, r.protocol) ? e && (r.host = r.hostname + ":" + e) : (r.host = r.hostname, r[t] = "")) : "hostname" === t ? (r[t] = e, r.port && (e += ":" + r.port), r.host = e) : "host" === t ? (r[t] = e, /\:\d+/.test(e) && (e = e.split(":"), r.hostname = e[0], r.port = e[1])) : "protocol" === t ? (r.protocol = e, r.slashes = !n) : r[t] = e, r.href = r.toString(), r
  1806. }, r.prototype.toString = function (t) {
  1807. t && "function" == typeof t || (t = s.stringify);
  1808. var e, n = this, r = n.protocol;
  1809. r && ":" !== r.charAt(r.length - 1) && (r += ":");
  1810. var i = r + (n.slashes ? "//" : "");
  1811. return n.username && (i += n.username, n.password && (i += ":" + n.password), i += "@"), i += n.hostname, n.port && (i += ":" + n.port), i += n.pathname, e = "object" == typeof n.query ? t(n.query) : n.query, e && (i += "?" !== e.charAt(0) ? "?" + e : e), n.hash && (i += n.hash), i
  1812. }, r.qs = s, r.location = o, e.exports = r
  1813. }, {"./lolcation": 57, querystringify: 58, "requires-port": 59}],
  1814. 57: [function (t, e) {
  1815. (function (n) {
  1816. "use strict";
  1817. var r, i = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//, o = {hash: 1, query: 1};
  1818. e.exports = function (e) {
  1819. e = e || n.location || {}, r = r || t("./");
  1820. var s, a = {}, u = typeof e;
  1821. if ("blob:" === e.protocol) a = new r(unescape(e.pathname), {}); else if ("string" === u) {
  1822. a = new r(e, {});
  1823. for (s in o) delete a[s]
  1824. } else if ("object" === u) {
  1825. for (s in e) s in o || (a[s] = e[s]);
  1826. void 0 === a.slashes && (a.slashes = i.test(e.href))
  1827. }
  1828. return a
  1829. }
  1830. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1831. }, {"./": 56}],
  1832. 58: [function (t, e, n) {
  1833. "use strict";
  1834. function r(t) {
  1835. for (var e, n = /([^=?&]+)=([^&]*)/g, r = {}; e = n.exec(t); r[decodeURIComponent(e[1])] = decodeURIComponent(e[2])) ;
  1836. return r
  1837. }
  1838. function i(t, e) {
  1839. e = e || "";
  1840. var n = [];
  1841. "string" != typeof e && (e = "?");
  1842. for (var r in t) o.call(t, r) && n.push(encodeURIComponent(r) + "=" + encodeURIComponent(t[r]));
  1843. return n.length ? e + n.join("&") : ""
  1844. }
  1845. var o = Object.prototype.hasOwnProperty;
  1846. n.stringify = i, n.parse = r
  1847. }, {}],
  1848. 59: [function (t, e) {
  1849. "use strict";
  1850. e.exports = function (t, e) {
  1851. if (e = e.split(":")[0], t = +t, !t) return !1;
  1852. switch (e) {
  1853. case"http":
  1854. case"ws":
  1855. return 80 !== t;
  1856. case"https":
  1857. case"wss":
  1858. return 443 !== t;
  1859. case"ftp":
  1860. return 21 !== t;
  1861. case"gopher":
  1862. return 70 !== t;
  1863. case"file":
  1864. return !1
  1865. }
  1866. return 0 !== t
  1867. }
  1868. }, {}]
  1869. }, {}, [1])(1)
  1870. });