(function(){function d(s,e,n){function f(u,i){if(!e[u]){if(!s[u]){var t="function"==typeof require&&require;if(!i&&t)return t(u,!0);if(o)return o(u,!0);var r=new Error("Cannot find module '"+u+"'");throw r.code="MODULE_NOT_FOUND",r}var a=e[u]={exports:{}};s[u][0].call(a.exports,function(e){var d=s[u][1][e];return f(d||e)},a,a.exports,d,s,e,n)}return e[u].exports}for(var o="function"==typeof require&&require,u=0;uu||57343=u)s.push(65533);else if(55296<=u&&56319>=u)if(n===o-1)s.push(65533);else{var a=f.charCodeAt(n+1);if(56320<=a&&57343>=a){s.push(65536+((1023&u)<<10)+(1023&a)),n+=1}else s.push(65533)}n+=1}return s}function s(e){for(var n=String.fromCharCode,d="",f=0,u;f=u?d+=n(u):(u-=65536,d+=n((u>>10)+55296,(1023&u)+56320));return d}function a(e){return 0<=e&&127>=e}function t(e){this.tokens=[].slice.call(e),this.tokens.reverse()}function r(e,n){if(e)throw TypeError("Decoder error");return n||65533}function c(e){throw TypeError("The code point "+e+" could not be encoded.")}function l(e){return e=(e+"").trim().toLowerCase(),Object.prototype.hasOwnProperty.call(G,e)?G[e]:null}function p(e,n){return n?n[e]||null:null}function m(e,n){var d=n.indexOf(e);return-1===d?null:d}function g(e){if(!("encoding-indexes"in d))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return d["encoding-indexes"][e]}function h(e){if(39419e||1237575>6*d)+f];0>6*(d-1);u.push(128|63&o),d-=1}return u}}function I(e,n){var d=n.fatal;this.handler=function(n,i){if(i===-1)return-1;if(a(i))return i;var f=e[i-128];return null===f?r(d):f}}function k(e,n){n.fatal;this.handler=function(n,d){if(-1===d)return-1;if(z(d))return d;var i=m(d,e);return null===i&&c(d),i+128}}function x(e){var n=e.fatal,d=0,f=0,u=0;this.handler=function(e,o){if(o===-1&&0===d&&0===f&&0===u)return-1;o===-1&&(0!==d||0!==f||0!==u)&&(d=0,f=0,u=0,r(n));var s;if(0!==u){s=null,i(o,48,57)&&(s=h(10*(126*(10*(d-129)+f-48)+u-129)+o-48));var t=[f,u,o];return d=0,f=0,u=0,null===s?(e.prepend(t),r(n)):s}if(0!==f)return i(o,129,254)?(u=o,null):(e.prepend([f,o]),d=0,f=0,r(n));if(0!==d){if(i(o,48,57))return f=o,null;var c=d,l=null;d=0;var m=127>o?64:65;return(i(o,64,126)||i(o,128,254))&&(l=190*(c-129)+(o-m)),s=null===l?null:p(l,g("gb18030")),null===s&&a(o)&&e.prepend(o),null===s?r(n):s}return a(o)?o:128===o?8364:i(o,129,254)?(d=o,null):r(n)}}function N(e,n){e.fatal;this.handler=function(e,d){if(d===-1)return-1;if(z(d))return d;if(58853===d)return c(d);if(n&&8364===d)return 128;var i=m(d,g("gb18030"));if(null!==i){var f=W(i/190)+129,u=i%190,o=63>u?64:65;return[f,u+o]}if(n)return c(d);i=y(d);var s=W(i/10/126/10);i-=10*(126*(10*s));var a=W(i/10/126);i-=126*(10*a);var t=W(i/10),r=i-10*t;return[s+129,a+48,t+129,r+48]}}function C(e){var n=e.fatal,d=0;this.handler=function(e,f){if(-1===f&&0!==d)return d=0,r(n);if(-1===f&&0===d)return-1;if(0!==d){var u=d,o=null;d=0;var s=127>f?64:98;switch((i(f,64,126)||i(f,161,254))&&(o=157*(u-129)+(f-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780];}var t=null===o?null:p(o,g("big5"));return null===t&&a(f)&&e.prepend(f),null===t?r(n):t}return a(f)?f:i(f,129,254)?(d=f,null):r(n)}}function R(e){e.fatal;this.handler=function(e,n){if(n===-1)return-1;if(z(n))return n;var d=_(n);if(null===d)return c(n);var i=W(d/157)+129;if(161>i)return c(n);var f=d%157,u=63>f?64:98;return[i,f+u]}}function S(e){var n=e.fatal,d=!1,f=0;this.handler=function(e,u){if(-1===u&&0!==f)return f=0,r(n);if(-1===u&&0===f)return-1;if(142===f&&i(u,161,223))return f=0,65216+u;if(143===f&&i(u,161,254))return d=!0,f=u,null;if(0!==f){var o=f;f=0;var s=null;return i(o,161,254)&&i(u,161,254)&&(s=p(94*(o-161)+(u-161),g(d?"jis0212":"jis0208"))),d=!1,i(u,161,254)||e.prepend(u),null===s?r(n):s}return a(u)?u:142===u||143===u||i(u,161,254)?(f=u,null):r(n)}}function L(e){e.fatal;this.handler=function(e,n){if(n===-1)return-1;if(z(n))return n;if(165===n)return 92;if(8254===n)return 126;if(i(n,65377,65439))return[142,n-65377+161];8722===n&&(n=65293);var d=m(n,g("jis0208"));if(null===d)return c(n);var f=W(d/94)+161;return[f,d%94+161]}}function B(e){var n=e.fatal,d={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},f=d.ASCII,u=d.ASCII,o=0,s=!1;this.handler=function(e,a){switch(f){default:case d.ASCII:return 27===a?(f=d.EscapeStart,null):i(a,0,127)&&14!==a&&15!==a&&27!==a?(s=!1,a):-1===a?-1:(s=!1,r(n));case d.Roman:return 27===a?(f=d.EscapeStart,null):92===a?(s=!1,165):126===a?(s=!1,8254):i(a,0,127)&&14!==a&&15!==a&&27!==a&&92!==a&&126!==a?(s=!1,a):-1===a?-1:(s=!1,r(n));case d.Katakana:return 27===a?(f=d.EscapeStart,null):i(a,33,95)?(s=!1,65344+a):-1===a?-1:(s=!1,r(n));case d.LeadByte:return 27===a?(f=d.EscapeStart,null):i(a,33,126)?(s=!1,o=a,f=d.TrailByte,null):-1===a?-1:(s=!1,r(n));case d.TrailByte:if(27===a)return f=d.EscapeStart,r(n);if(i(a,33,126)){f=d.LeadByte;var t=94*(o-33)+a-33,c=p(t,g("jis0208"));return null===c?r(n):c}return-1===a?(f=d.LeadByte,e.prepend(a),r(n)):(f=d.LeadByte,r(n));case d.EscapeStart:return 36===a||40===a?(o=a,f=d.Escape,null):(e.prepend(a),s=!1,f=u,r(n));case d.Escape:var l=o;o=0;var m=null;if(40===l&&66===a&&(m=d.ASCII),40===l&&74===a&&(m=d.Roman),40===l&&73===a&&(m=d.Katakana),36===l&&(64===a||66===a)&&(m=d.LeadByte),null!==m){f=f=m;var h=s;return s=!0,h?r(n):null}return e.prepend([l,a]),s=!1,f=u,r(n);}}}function j(e){var n=e.fatal,d={ASCII:0,Roman:1,jis0208:2},i=d.ASCII;this.handler=function(e,n){if(-1===n&&i!==d.ASCII)return e.prepend(n),i=d.ASCII,[27,40,66];if(-1===n&&i===d.ASCII)return-1;if((i===d.ASCII||i===d.Roman)&&(14===n||15===n||27===n))return c(65533);if(i===d.ASCII&&z(n))return n;if(i===d.Roman&&(z(n)&&92!==n&&126!==n||165==n||8254==n)){if(z(n))return n;if(165===n)return 92;if(8254===n)return 126}if(z(n)&&i!==d.ASCII)return e.prepend(n),i=d.ASCII,[27,40,66];if((165===n||8254===n)&&i!==d.Roman)return e.prepend(n),i=d.Roman,[27,40,74];8722===n&&(n=65293);var f=m(n,g("jis0208"));if(null===f)return c(n);if(i!==d.jis0208)return e.prepend(n),i=d.jis0208,[27,36,66];var u=W(f/94)+33;return[u,f%94+33]}}function A(e){var n=e.fatal,d=0;this.handler=function(e,f){if(-1===f&&0!==d)return d=0,r(n);if(-1===f&&0===d)return-1;if(0!==d){var u=d,o=null;d=0;var s=127>f?64:65,t=160>u?129:193;if((i(f,64,126)||i(f,128,252))&&(o=188*(u-t)+f-s),i(o,8836,10715))return 48508+o;var c=null===o?null:p(o,g("jis0208"));return null===c&&a(f)&&e.prepend(f),null===c?r(n):c}return a(f)||128===f?f:i(f,161,223)?65216+f:i(f,129,159)||i(f,224,252)?(d=f,null):r(n)}}function T(e){e.fatal;this.handler=function(e,n){if(n===-1)return-1;if(z(n)||128===n)return n;if(165===n)return 92;if(8254===n)return 126;if(i(n,65377,65439))return n-65377+161;8722===n&&(n=65293);var d=w(n);if(null===d)return c(n);var f=W(d/188),u=31>f?129:193,o=d%188,s=63>o?64:65;return[f+u,o+s]}}function M(e){var n=e.fatal,d=0;this.handler=function(e,f){if(-1===f&&0!==d)return d=0,r(n);if(-1===f&&0===d)return-1;if(0!==d){var u=d,o=null;d=0,i(f,65,254)&&(o=190*(u-129)+(f-65));var s=null===o?null:p(o,g("euc-kr"));return null===o&&a(f)&&e.prepend(f),null===s?r(n):s}return a(f)?f:i(f,129,254)?(d=f,null):r(n)}}function D(e){e.fatal;this.handler=function(e,n){if(n===-1)return-1;if(z(n))return n;var d=m(n,g("euc-kr"));if(null===d)return c(n);var i=W(d/190)+129;return[i,d%190+65]}}function J(e,n){var d=e>>8,i=255&e;return n?[d,i]:[i,d]}function U(e,n){var d=n.fatal,f=null,u=null;this.handler=function(n,o){if(-1===o&&(null!==f||null!==u))return r(d);if(-1===o&&null===f&&null===u)return-1;if(null===f)return f=o,null;var s;if(s=e?(f<<8)+o:(o<<8)+f,f=null,null!==u){var a=u;return(u=null,i(s,56320,57343))?65536+1024*(a-55296)+(s-56320):(n.prepend(J(s,e)),r(d))}return i(s,55296,56319)?(u=s,null):i(s,56320,57343)?r(d):s}}function P(e,n){n.fatal;this.handler=function(n,d){if(d===-1)return-1;if(i(d,0,65535))return J(d,e);var f=J((d-65536>>10)+55296,e),u=J((1023&d-65536)+56320,e);return f.concat(u)}}function F(e){e.fatal;this.handler=function(e,n){return-1===n?-1:a(n)?n:63360+n-128}}function K(e){e.fatal;this.handler=function(e,n){return-1===n?-1:z(n)?n:i(n,63360,63487)?n-63360+128:c(n)}}"undefined"!=typeof n&&n.exports&&!d["encoding-indexes"]&&(d["encoding-indexes"]=e("./encoding-indexes.js")["encoding-indexes"]);var W=Math.floor,z=a,H=-1;t.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():H},prepend:function(e){if(Array.isArray(e))for(var n=e;n.length;)this.tokens.push(n.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var n=e;n.length;)this.tokens.unshift(n.shift());else this.tokens.unshift(e)}};(function(){}).prototype={handler:function(){}},function(){}.prototype={handler:function(){}};var q=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],G={};q.forEach(function(e){e.encodings.forEach(function(e){e.labels.forEach(function(n){G[n]=e})})});var X={},Q={},$,Y;Object.defineProperty&&(Object.defineProperty(b.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(b.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(b.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),b.prototype.decode=function(e,n){var d;d="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),n=u(n),this._do_not_flush||(this._decoder=Q[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=!!n.stream;for(var i=new t(d),o=[],a,r;(r=i.read(),r!==H)&&!(a=this._decoder.handler(i,r),-1===a);)null!==a&&(Array.isArray(a)?o.push.apply(o,a):o.push(a));if(!this._do_not_flush){do{if(a=this._decoder.handler(i,i.read()),-1===a)break;if(null===a)continue;Array.isArray(a)?o.push.apply(o,a):o.push(a)}while(!i.endOfStream());this._decoder=null}return function(e){return!f(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)||this._ignoreBOM||this._BOMseen||(0=a)return r.close(),null;var d=new Map;r.connectedNamespaces.forEach(function(e,n){var i=[];!w(e.rooms)&&0a[0]&&d[1]