You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
9.5 KiB

6 years ago
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{533:function(e,r,t){"use strict";function n(e,r,t){return r<=e&&e<=t}function i(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}t.r(r),t.d(r,"TextEncoder",function(){return l}),t.d(r,"TextDecoder",function(){return c});var o=-1;function a(e){this.tokens=[].slice.call(e)}a.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():o},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.shift());else this.tokens.push(e)}};var s=-1;function u(e,r){if(e)throw TypeError("Decoder error");return r||65533}var f="utf-8";function c(e,r){if(!(this instanceof c))return new c(e,r);if((e=void 0!==e?String(e).toLowerCase():f)!==f)throw new Error("Encoding not supported. Only utf-8 is supported");r=i(r),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(r.fatal),this._ignoreBOM=Boolean(r.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(e,r){if(!(this instanceof l))return new l(e,r);if((e=void 0!==e?String(e).toLowerCase():f)!==f)throw new Error("Encoding not supported. Only utf-8 is supported");r=i(r),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(r.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function h(e){var r=e.fatal,t=0,i=0,a=0,f=128,c=191;this.handler=function(e,l){if(l===o&&0!==a)return a=0,u(r);if(l===o)return s;if(0===a){if(n(l,0,127))return l;if(n(l,194,223))a=1,t=l-192;else if(n(l,224,239))224===l&&(f=160),237===l&&(c=159),a=2,t=l-224;else{if(!n(l,240,244))return u(r);240===l&&(f=144),244===l&&(c=143),a=3,t=l-240}return t<<=6*a,null}if(!n(l,f,c))return t=a=i=0,f=128,c=191,e.prepend(l),u(r);if(f=128,c=191,t+=l-128<<6*(a-(i+=1)),i!==a)return null;var h=t;return t=a=i=0,h}}function d(e){e.fatal;this.handler=function(e,r){if(r===o)return s;if(n(r,0,127))return r;var t,i;n(r,128,2047)?(t=1,i=192):n(r,2048,65535)?(t=2,i=224):n(r,65536,1114111)&&(t=3,i=240);for(var a=[(r>>6*t)+i];t>0;){var u=r>>6*(t-1);a.push(128|63&u),t-=1}return a}}c.prototype={decode:function(e,r){var t;t="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),r=i(r),this._streaming||(this._decoder=new h({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(r.stream);for(var n,o=new a(t),u=[];!o.endOfStream()&&(n=this._decoder.handler(o,o.read()))!==s;)null!==n&&(Array.isArray(n)?u.push.apply(u,n):u.push(n));if(!this._streaming){do{if((n=this._decoder.handler(o,o.read()))===s)break;null!==n&&(Array.isArray(n)?u.push.apply(u,n):u.push(n))}while(!o.endOfStream());this._decoder=null}return u.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===u[0]?(this._BOMseen=!0,u.shift()):this._BOMseen=!0)),function(e){for(var r="",t=0;t<e.length;++t){var n=e[t];n<=65535?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode(55296+(n>>10),56320+(1023&n)))}return r}(u)}},l.prototype={encode:function(e,r){e=e?String(e):"",r=i(r),this._streaming||(this._encoder=new d(this._options)),this._streaming=Boolean(r.stream);for(var t,n=[],o=new a(function(e){for(var r=String(e),t=r.length,n=0,i=[];n<t;){var o=r.charCodeAt(n);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(n===t-1)i.push(65533);else{var a=e.charCodeAt(n+1);if(56320<=a&&a<=57343){var s=1023&o,u=1023&a;i.push(65536+(s<<10)+u),n+=1}else i.push(65533)}n+=1}return i}(e));!o.endOfStream()&&(t=this._encoder.handler(o,o.read()))!==s;)Array.isArray(t)?n.push.apply(n,t):n.push(t);if(!this._streaming){for(;(t=this._encoder.handler(o,o.read()))!==s;)Array.isArray(t
6 years ago
//# sourceMappingURL=2.js.map