@itslanguage/api
Version:
The JavaScript API SDK for ITSLanguage.
2 lines • 383 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.itslApi=e():t.itslApi=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=287)}([function(t,e,r){var n;t.exports=(n=n||function(t,e){var r=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),n={},o=n.lib={},i=o.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},s=o.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,o=t.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var s=r[i>>>2]>>>24-i%4*8&255;e[n+i>>>2]|=s<<24-(n+i)%4*8}else for(i=0;i<o;i+=4)e[n+i>>>2]=r[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],o=function(e){e=e;var r=987654321,n=4294967295;return function(){var o=((r=36969*(65535&r)+(r>>16)&n)<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return o/=4294967296,(o+=.5)*(t.random()>.5?1:-1)}},i=0;i<e;i+=4){var a=o(4294967296*(r||t.random()));r=987654071*a(),n.push(4294967296*a()|0)}return new s.init(n,e)}}),a=n.enc={},u=a.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new s.init(r,e/2)}},c=a.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],o=0;o<r;o++){var i=e[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new s.init(r,e)}},f=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},l=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,o=r.sigBytes,i=this.blockSize,a=o/(4*i),u=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*i,c=t.min(4*u,o);if(u){for(var f=0;f<u;f+=i)this._doProcessBlock(n,f);var l=n.splice(0,u);r.sigBytes-=c}return new s.init(l,c)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(o.Hasher=l.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new h.HMAC.init(t,r).finalize(e)}}}),n.algo={});return n}(Math),n)},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||Function("return this")()}).call(this,r(9))},function(t,e,r){var n=r(2),o=r(84),i=r(11),s=r(64),a=r(87),u=r(149),c=o("wks"),f=n.Symbol,l=u?f:f&&f.withoutSetter||s;t.exports=function(t){return i(c,t)||(a&&i(f,t)?c[t]=f[t]:c[t]=l("Symbol."+t)),c[t]}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n,o,i,s,a,u,c,f,l,h,p,d,y,v,g,_,b,m,w;t.exports=(n=r(0),void(n.lib.Cipher||(o=n,i=o.lib,s=i.Base,a=i.WordArray,u=i.BufferedBlockAlgorithm,c=o.enc,c.Utf8,f=c.Base64,l=o.algo.EvpKDF,h=i.Cipher=u.extend({cfg:s.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?w:b}return function(e){return{encrypt:function(r,n,o){return t(n).encrypt(e,r,n,o)},decrypt:function(r,n,o){return t(n).decrypt(e,r,n,o)}}}}()}),i.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),p=o.mode={},d=i.BlockCipherMode=s.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),y=p.CBC=function(){var t=d.extend();function e(t,e,r){var n=this._iv;if(n){var o=n;this._iv=void 0}else o=this._prevBlock;for(var i=0;i<r;i++)t[e+i]^=o[i]}return t.Encryptor=t.extend({processBlock:function(t,r){var n=this._cipher,o=n.blockSize;e.call(this,t,r,o),n.encryptBlock(t,r),this._prevBlock=t.slice(r,r+o)}}),t.Decryptor=t.extend({processBlock:function(t,r){var n=this._cipher,o=n.blockSize,i=t.slice(r,r+o);n.decryptBlock(t,r),e.call(this,t,r,o),this._prevBlock=i}}),t}(),v=(o.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,o=n<<24|n<<16|n<<8|n,i=[],s=0;s<n;s+=4)i.push(o);var u=a.create(i,n);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},i.BlockCipher=h.extend({cfg:h.cfg.extend({mode:y,padding:v}),reset:function(){h.reset.call(this);var t=this.cfg,e=t.iv,r=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else n=r.createDecryptor,this._minBufferSize=1;this._mode=n.call(r,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4}),g=i.CipherParams=s.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),_=(o.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(e);else n=e;return n.toString(f)},parse:function(t){var e=f.parse(t),r=e.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),e.sigBytes-=16}return g.create({ciphertext:e,salt:n})}},b=i.SerializableCipher=s.extend({cfg:s.extend({format:_}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var o=t.createEncryptor(r,n),i=o.finalize(e),s=o.cfg;return g.create({ciphertext:i,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),m=(o.kdf={}).OpenSSL={execute:function(t,e,r,n){n||(n=a.random(8));var o=l.create({keySize:e+r}).compute(t,n),i=a.create(o.words.slice(e),4*r);return o.sigBytes=4*e,g.create({key:o,iv:i,salt:n})}},w=i.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:m}),encrypt:function(t,e,r,n){var o=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize);n.iv=o.iv;var i=b.encrypt.call(this,t,e,o.key,n);return i.mixIn(o),i},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var o=n.kdf.execute(r,t.keySize,t.ivSize,e.salt);return n.iv=o.iv,b.decrypt.call(this,t,e,o.key,n)}}))))},function(t,e,r){"use strict";var n=r(46),o=r(148),i=r(40),s=r(24),a=r(92),u=s.set,c=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){var n=r(10);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,r){"use strict";var n,o,i,s,a=r(14),u=r(26),c=r(2),f=r(28),l=r(102),h=r(20),p=r(73),d=r(31),y=r(103),v=r(10),g=r(50),_=r(43),b=r(22),m=r(69),w=r(165),E=r(104),S=r(52),x=r(105).set,A=r(166),j=r(108),k=r(167),O=r(109),T=r(168),R=r(24),P=r(95),B=r(3),U=r(169),I=B("species"),C="Promise",L=R.get,M=R.set,D=R.getterFor(C),N=l,q=c.TypeError,z=c.document,F=c.process,H=f("fetch"),W=O.f,Y=W,G="process"==b(F),K=!!(z&&z.createEvent&&c.dispatchEvent),J=P(C,(function(){if(!(m(N)!==String(N))){if(66===U)return!0;if(!G&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!N.prototype.finally)return!0;if(U>=51&&/native code/.test(N))return!1;var t=N.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[I]=e,!(t.then((function(){}))instanceof e)})),V=J||!E((function(t){N.all(t).catch((function(){}))})),$=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},X=function(t,e,r){if(!e.notified){e.notified=!0;var n=e.reactions;A((function(){for(var o=e.value,i=1==e.state,s=0;n.length>s;){var a,u,c,f=n[s++],l=i?f.ok:f.fail,h=f.resolve,p=f.reject,d=f.domain;try{l?(i||(2===e.rejection&&et(t,e),e.rejection=1),!0===l?a=o:(d&&d.enter(),a=l(o),d&&(d.exit(),c=!0)),a===f.promise?p(q("Promise-chain cycle")):(u=$(a))?u.call(a,h,p):h(a)):p(o)}catch(t){d&&!c&&d.exit(),p(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&Z(t,e)}))}},Q=function(t,e,r){var n,o;K?((n=z.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},(o=c["on"+t])?o(n):"unhandledrejection"===t&&k("Unhandled promise rejection",r)},Z=function(t,e){x.call(c,(function(){var r,n=e.value;if(tt(e)&&(r=T((function(){G?F.emit("unhandledRejection",n,t):Q("unhandledrejection",t,n)})),e.rejection=G||tt(e)?2:1,r.error))throw r.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){x.call(c,(function(){G?F.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},rt=function(t,e,r,n){return function(o){t(e,r,o,n)}},nt=function(t,e,r,n){e.done||(e.done=!0,n&&(e=n),e.value=r,e.state=2,X(t,e,!0))},ot=function(t,e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(t===r)throw q("Promise can't be resolved itself");var o=$(r);o?A((function(){var n={done:!1};try{o.call(r,rt(ot,t,n,e),rt(nt,t,n,e))}catch(r){nt(t,n,r,e)}})):(e.value=r,e.state=1,X(t,e,!1))}catch(r){nt(t,{done:!1},r,e)}}};J&&(N=function(t){_(this,N,C),g(t),n.call(this);var e=L(this);try{t(rt(ot,this,e),rt(nt,this,e))}catch(t){nt(this,e,t)}},(n=function(t){M(this,{type:C,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(N.prototype,{then:function(t,e){var r=D(this),n=W(S(this,N));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=G?F.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&X(this,r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=L(t);this.promise=t,this.resolve=rt(ot,t,e),this.reject=rt(nt,t,e)},O.f=W=function(t){return t===N||t===i?new o(t):Y(t)},u||"function"!=typeof l||(s=l.prototype.then,h(l.prototype,"then",(function(t,e){var r=this;return new N((function(t,e){s.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof H&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return j(N,H.apply(c,arguments))}}))),a({global:!0,wrap:!0,forced:J},{Promise:N}),d(N,C,!1,!0),y(C),i=f(C),a({target:C,stat:!0,forced:J},{reject:function(t){var e=W(this);return e.reject.call(void 0,t),e.promise}}),a({target:C,stat:!0,forced:u||J},{resolve:function(t){return j(u&&this===i?N:this,t)}}),a({target:C,stat:!0,forced:V},{all:function(t){var e=this,r=W(e),n=r.resolve,o=r.reject,i=T((function(){var r=g(e.resolve),i=[],s=0,a=1;w(t,(function(t){var u=s++,c=!1;i.push(void 0),a++,r.call(e,t).then((function(t){c||(c=!0,i[u]=t,--a||n(i))}),o)})),--a||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=W(e),n=r.reject,o=T((function(){var o=g(e.resolve);w(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){var n=r(27),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(2),o=r(157),i=r(6),s=r(16),a=r(3),u=a("iterator"),c=a("toStringTag"),f=i.values;for(var l in o){var h=n[l],p=h&&h.prototype;if(p){if(p[u]!==f)try{s(p,u,f)}catch(t){p[u]=f}if(p[c]||s(p,c,l),o[l])for(var d in i)if(p[d]!==i[d])try{s(p,d,i[d])}catch(t){p[d]=i[d]}}}},function(t,e,r){var n=r(2),o=r(41).f,i=r(16),s=r(20),a=r(62),u=r(153),c=r(95);t.exports=function(t,e){var r,f,l,h,p,d=t.target,y=t.global,v=t.stat;if(r=y?n:v?n[d]||a(d,{}):(n[d]||{}).prototype)for(f in e){if(h=e[f],l=t.noTargetGet?(p=o(r,f))&&p.value:r[f],!c(y?f:d+(v?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;u(h,l)}(t.sham||l&&l.sham)&&i(h,"sham",!0),s(r,f,h,t)}}},function(t,e,r){"use strict";r(158);var n,o=r(14),i=r(17),s=r(98),a=r(2),u=r(88),c=r(20),f=r(43),l=r(11),h=r(99),p=r(159),d=r(71).codeAt,y=r(162),v=r(31),g=r(163),_=r(24),b=a.URL,m=g.URLSearchParams,w=g.getState,E=_.set,S=_.getterFor("URL"),x=Math.floor,A=Math.pow,j=/[A-Za-z]/,k=/[\d+\-.A-Za-z]/,O=/\d/,T=/^(0x|0X)/,R=/^[0-7]+$/,P=/^\d+$/,B=/^[\dA-Fa-f]+$/,U=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,I=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,C=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,L=/[\u0009\u000A\u000D]/g,M=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(r=N(e.slice(1,-1))))return"Invalid host";t.host=r}else if(K(t)){if(e=y(e),U.test(e))return"Invalid host";if(null===(r=D(e)))return"Invalid host";t.host=r}else{if(I.test(e))return"Invalid host";for(r="",n=p(e),o=0;o<n.length;o++)r+=Y(n[o],z);t.host=r}},D=function(t){var e,r,n,o,i,s,a,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(e=u.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=u[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=T.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)s=0;else{if(!(10==i?P:8==i?R:B).test(o))return t;s=parseInt(o,i)}r.push(s)}for(n=0;n<e;n++)if(s=r[n],n==e-1){if(s>=A(256,5-e))return null}else if(s>255)return null;for(a=r.pop(),n=0;n<r.length;n++)a+=r[n]*A(256,3-n);return a},N=function(t){var e,r,n,o,i,s,a,u=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return t.charAt(l)};if(":"==h()){if(":"!=t.charAt(1))return;l+=2,f=++c}for(;h();){if(8==c)return;if(":"!=h()){for(e=r=0;r<4&&B.test(h());)e=16*e+parseInt(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,c>6)return;for(n=0;h();){if(o=null,n>0){if(!("."==h()&&n<4))return;l++}if(!O.test(h()))return;for(;O.test(h());){if(i=parseInt(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}u[c]=256*u[c]+o,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(s=c-f,c=7;0!=c&&s>0;)a=u[c],u[c--]=u[f+s-1],u[f+--s]=a;else if(8!=c)return;return u},q=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=x(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},z={},F=h({},z,{" ":1,'"':1,"<":1,">":1,"`":1}),H=h({},F,{"#":1,"?":1,"{":1,"}":1}),W=h({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Y=function(t,e){var r=d(t,0);return r>32&&r<127&&!l(e,t)?t:encodeURIComponent(t)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return l(G,t.scheme)},J=function(t){return""!=t.username||""!=t.password},V=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},$=function(t,e){var r;return 2==t.length&&j.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},X=function(t){var e;return t.length>1&&$(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},Q=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&$(e[0],!0)||e.pop()},Z=function(t){return"."===t||"%2e"===t.toLowerCase()},tt={},et={},rt={},nt={},ot={},it={},st={},at={},ut={},ct={},ft={},lt={},ht={},pt={},dt={},yt={},vt={},gt={},_t={},bt={},mt={},wt=function(t,e,r,o){var i,s,a,u,c,f=r||tt,h=0,d="",y=!1,v=!1,g=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(C,"")),e=e.replace(L,""),i=p(e);h<=i.length;){switch(s=i[h],f){case tt:if(!s||!j.test(s)){if(r)return"Invalid scheme";f=rt;continue}d+=s.toLowerCase(),f=et;break;case et:if(s&&(k.test(s)||"+"==s||"-"==s||"."==s))d+=s.toLowerCase();else{if(":"!=s){if(r)return"Invalid scheme";d="",f=rt,h=0;continue}if(r&&(K(t)!=l(G,d)||"file"==d&&(J(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=d,r)return void(K(t)&&G[t.scheme]==t.port&&(t.port=null));d="","file"==t.scheme?f=pt:K(t)&&o&&o.scheme==t.scheme?f=nt:K(t)?f=at:"/"==i[h+1]?(f=ot,h++):(t.cannotBeABaseURL=!0,t.path.push(""),f=_t)}break;case rt:if(!o||o.cannotBeABaseURL&&"#"!=s)return"Invalid scheme";if(o.cannotBeABaseURL&&"#"==s){t.scheme=o.scheme,t.path=o.path.slice(),t.query=o.query,t.fragment="",t.cannotBeABaseURL=!0,f=mt;break}f="file"==o.scheme?pt:it;continue;case nt:if("/"!=s||"/"!=i[h+1]){f=it;continue}f=ut,h++;break;case ot:if("/"==s){f=ct;break}f=gt;continue;case it:if(t.scheme=o.scheme,s==n)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query;else if("/"==s||"\\"==s&&K(t))f=st;else if("?"==s)t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query="",f=bt;else{if("#"!=s){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.path.pop(),f=gt;continue}t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,t.path=o.path.slice(),t.query=o.query,t.fragment="",f=mt}break;case st:if(!K(t)||"/"!=s&&"\\"!=s){if("/"!=s){t.username=o.username,t.password=o.password,t.host=o.host,t.port=o.port,f=gt;continue}f=ct}else f=ut;break;case at:if(f=ut,"/"!=s||"/"!=d.charAt(h+1))continue;h++;break;case ut:if("/"!=s&&"\\"!=s){f=ct;continue}break;case ct:if("@"==s){y&&(d="%40"+d),y=!0,a=p(d);for(var _=0;_<a.length;_++){var b=a[_];if(":"!=b||g){var m=Y(b,W);g?t.password+=m:t.username+=m}else g=!0}d=""}else if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&K(t)){if(y&&""==d)return"Invalid authority";h-=p(d).length+1,d="",f=ft}else d+=s;break;case ft:case lt:if(r&&"file"==t.scheme){f=yt;continue}if(":"!=s||v){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&K(t)){if(K(t)&&""==d)return"Invalid host";if(r&&""==d&&(J(t)||null!==t.port))return;if(u=M(t,d))return u;if(d="",f=vt,r)return;continue}"["==s?v=!0:"]"==s&&(v=!1),d+=s}else{if(""==d)return"Invalid host";if(u=M(t,d))return u;if(d="",f=ht,r==lt)return}break;case ht:if(!O.test(s)){if(s==n||"/"==s||"?"==s||"#"==s||"\\"==s&&K(t)||r){if(""!=d){var w=parseInt(d,10);if(w>65535)return"Invalid port";t.port=K(t)&&w===G[t.scheme]?null:w,d=""}if(r)return;f=vt;continue}return"Invalid port"}d+=s;break;case pt:if(t.scheme="file","/"==s||"\\"==s)f=dt;else{if(!o||"file"!=o.scheme){f=gt;continue}if(s==n)t.host=o.host,t.path=o.path.slice(),t.query=o.query;else if("?"==s)t.host=o.host,t.path=o.path.slice(),t.query="",f=bt;else{if("#"!=s){X(i.slice(h).join(""))||(t.host=o.host,t.path=o.path.slice(),Q(t)),f=gt;continue}t.host=o.host,t.path=o.path.slice(),t.query=o.query,t.fragment="",f=mt}}break;case dt:if("/"==s||"\\"==s){f=yt;break}o&&"file"==o.scheme&&!X(i.slice(h).join(""))&&($(o.path[0],!0)?t.path.push(o.path[0]):t.host=o.host),f=gt;continue;case yt:if(s==n||"/"==s||"\\"==s||"?"==s||"#"==s){if(!r&&$(d))f=gt;else if(""==d){if(t.host="",r)return;f=vt}else{if(u=M(t,d))return u;if("localhost"==t.host&&(t.host=""),r)return;d="",f=vt}continue}d+=s;break;case vt:if(K(t)){if(f=gt,"/"!=s&&"\\"!=s)continue}else if(r||"?"!=s)if(r||"#"!=s){if(s!=n&&(f=gt,"/"!=s))continue}else t.fragment="",f=mt;else t.query="",f=bt;break;case gt:if(s==n||"/"==s||"\\"==s&&K(t)||!r&&("?"==s||"#"==s)){if(".."===(c=(c=d).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(Q(t),"/"==s||"\\"==s&&K(t)||t.path.push("")):Z(d)?"/"==s||"\\"==s&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&$(d)&&(t.host&&(t.host=""),d=d.charAt(0)+":"),t.path.push(d)),d="","file"==t.scheme&&(s==n||"?"==s||"#"==s))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==s?(t.query="",f=bt):"#"==s&&(t.fragment="",f=mt)}else d+=Y(s,H);break;case _t:"?"==s?(t.query="",f=bt):"#"==s?(t.fragment="",f=mt):s!=n&&(t.path[0]+=Y(s,z));break;case bt:r||"#"!=s?s!=n&&("'"==s&&K(t)?t.query+="%27":t.query+="#"==s?"%23":Y(s,z)):(t.fragment="",f=mt);break;case mt:s!=n&&(t.fragment+=Y(s,F))}h++}},Et=function(t){var e,r,n=f(this,Et,"URL"),o=arguments.length>1?arguments[1]:void 0,s=String(t),a=E(n,{type:"URL"});if(void 0!==o)if(o instanceof Et)e=S(o);else if(r=wt(e={},String(o)))throw TypeError(r);if(r=wt(a,s,null,e))throw TypeError(r);var u=a.searchParams=new m,c=w(u);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(u)||null},i||(n.href=xt.call(n),n.origin=At.call(n),n.protocol=jt.call(n),n.username=kt.call(n),n.password=Ot.call(n),n.host=Tt.call(n),n.hostname=Rt.call(n),n.port=Pt.call(n),n.pathname=Bt.call(n),n.search=Ut.call(n),n.searchParams=It.call(n),n.hash=Ct.call(n))},St=Et.prototype,xt=function(){var t=S(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,s=t.path,a=t.query,u=t.fragment,c=e+":";return null!==o?(c+="//",J(t)&&(c+=r+(n?":"+n:"")+"@"),c+=q(o),null!==i&&(c+=":"+i)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(c+="?"+a),null!==u&&(c+="#"+u),c},At=function(){var t=S(this),e=t.scheme,r=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&K(t)?e+"://"+q(t.host)+(null!==r?":"+r:""):"null"},jt=function(){return S(this).scheme+":"},kt=function(){return S(this).username},Ot=function(){return S(this).password},Tt=function(){var t=S(this),e=t.host,r=t.port;return null===e?"":null===r?q(e):q(e)+":"+r},Rt=function(){var t=S(this).host;return null===t?"":q(t)},Pt=function(){var t=S(this).port;return null===t?"":String(t)},Bt=function(){var t=S(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Ut=function(){var t=S(this).query;return t?"?"+t:""},It=function(){return S(this).searchParams},Ct=function(){var t=S(this).fragment;return t?"#"+t:""},Lt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(i&&u(St,{href:Lt(xt,(function(t){var e=S(this),r=String(t),n=wt(e,r);if(n)throw TypeError(n);w(e.searchParams).updateSearchParams(e.query)})),origin:Lt(At),protocol:Lt(jt,(function(t){var e=S(this);wt(e,String(t)+":",tt)})),username:Lt(kt,(function(t){var e=S(this),r=p(String(t));if(!V(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=Y(r[n],W)}})),password:Lt(Ot,(function(t){var e=S(this),r=p(String(t));if(!V(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=Y(r[n],W)}})),host:Lt(Tt,(function(t){var e=S(this);e.cannotBeABaseURL||wt(e,String(t),ft)})),hostname:Lt(Rt,(function(t){var e=S(this);e.cannotBeABaseURL||wt(e,String(t),lt)})),port:Lt(Pt,(function(t){var e=S(this);V(e)||(""==(t=String(t))?e.port=null:wt(e,t,ht))})),pathname:Lt(Bt,(function(t){var e=S(this);e.cannotBeABaseURL||(e.path=[],wt(e,t+"",vt))})),search:Lt(Ut,(function(t){var e=S(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",wt(e,t,bt)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:Lt(It),hash:Lt(Ct,(function(t){var e=S(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",wt(e,t,mt)):e.fragment=null}))}),c(St,"toJSON",(function(){return xt.call(this)}),{enumerable:!0}),c(St,"toString",(function(){return xt.call(this)}),{enumerable:!0}),b){var Mt=b.createObjectURL,Dt=b.revokeObjectURL;Mt&&c(Et,"createObjectURL",(function(t){return Mt.apply(b,arguments)})),Dt&&c(Et,"revokeObjectURL",(function(t){return Dt.apply(b,arguments)}))}v(Et,"URL"),o({global:!0,forced:!s,sham:!i},{URL:Et})},function(t,e,r){var n=r(17),o=r(19),i=r(30);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(4);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){"use strict";var n=r(20),o=r(7),i=r(4),s=r(110),a=RegExp.prototype,u=a.toString,c=i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),f="toString"!=u.name;(c||f)&&n(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in a)?s.call(t):r)}),{unsafe:!0})},function(t,e,r){var n=r(17),o=r(86),i=r(7),s=r(47),a=Object.defineProperty;e.f=n?a:function(t,e,r){if(i(t),e=s(e,!0),i(r),o)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(2),o=r(16),i=r(11),s=r(62),a=r(69),u=r(24),c=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,r,a){var u=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet;"function"==typeof r&&("string"!=typeof e||i(r,"name")||o(r,"name",e),f(r).source=l.join("string"==typeof e?e:"")),t!==n?(u?!h&&t[e]&&(c=!0):delete t[e],c?t[e]=r:o(t,e,r)):c?t[e]=r:s(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||a(this)}))},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&p())}function p(){if(!f){var t=a(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new d(t,e)),1!==c.length||f||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n,o,i,s=r(152),a=r(2),u=r(10),c=r(16),f=r(11),l=r(68),h=r(66),p=a.WeakMap;if(s){var d=new p,y=d.get,v=d.has,g=d.set;n=function(t,e){return g.call(d,t,e),e},o=function(t){return y.call(d,t)||{}},i=function(t){return v.call(d,t)}}else{var _=l("state");h[_]=!0,n=function(t,e){return c(t,_,e),e},o=function(t){return f(t,_)?t[_]:{}},i=function(t){return f(t,_)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){(function(t){var r=function(){};"AUTOBAHN_DEBUG"in t&&AUTOBAHN_DEBUG&&"console"in t&&(r=function(){console.log.apply(console,arguments)});var n=console.warn;e.debug=r,e.warn=n}).call(this,r(9))},function(t,e){t.exports=!1},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e,r){var n=r(151),o=r(2),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t])||i(o[t]):n[t]&&n[t][e]||o[t]&&o[t][e]}},function(t,e,r){var n=r(23);t.exports=function(t){return Object(n(t))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(19).f,o=r(11),i=r(3)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(50);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n;/** @license MIT License (c) copyright 2010-2014 original author or authors */!function(o){"use strict";void 0===(n=function(t){var e=r(216),n=r(218),o=r(219),i=r(220),s=r(221),a=r(222),u=r(223),c=r(224),f=r(225),l=r(127),h=[n,o,i,a,u,s,c,e,f].reduce((function(t,e){return e(t)}),r(227)),p=r(75)(h);function d(t,e,r,n){var o=h.resolve(t);return arguments.length<2?o:o.then(e,r,n)}function y(t){return function(){for(var e=0,r=arguments.length,n=new Array(r);e<r;++e)n[e]=arguments[e];return p(t,this,n)}}function v(t){for(var e=0,r=arguments.length-1,n=new Array(r);e<r;++e)n[e]=arguments[e+1];return p(t,this,n)}function g(){var t=h._defer();function e(e){t._handler.resolve(e)}function r(e){t._handler.reject(e)}function n(e){t._handler.notify(e)}this.promise=t,this.resolve=e,this.reject=r,this.notify=n,this.resolver={resolve:e,reject:r,notify:n}}return d.promise=function(t){return new h(t)},d.resolve=h.resolve,d.reject=h.reject,d.lift=y,d.try=v,d.attempt=v,d.iterate=h.iterate,d.unfold=h.unfold,d.join=function(){return h.all(arguments)},d.all=function(t){return d(t,h.all)},d.settle=function(t){return d(t,h.settle)},d.any=y(h.any),d.some=y(h.some),d.race=y(h.race),d.map=function(t,e){return d(t,(function(t){return h.map(t,e)}))},d.filter=function(t,e){return d(t,(function(t){return h.filter(t,e)}))},d.reduce=y(h.reduce),d.reduceRight=y(h.reduceRight),d.isPromiseLike=function(t){return t&&"function"==typeof t.then},d.Promise=h,d.defer=function(){return new g},d.TimeoutError=l,d}.call(e,r,e,t))||(t.exports=n)}(r(1))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";var n=r(58),o=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var i=Object.create(r(45));i.inherits=r(34);var s=r(132),a=r(136);i.inherits(l,s);for(var u=o(a.prototype),c=0;c<u.length;c++){var f=u[c];l.prototype[f]||(l.prototype[f]=a.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){(function(t){var n=r(25),o=r(33);e.atob=function(t){return t?new Uint8Array(atob(t).split("").map((function(t){return t.charCodeAt(0)}))):null},e.btoa=function(t){return t?btoa(String.fromCharCode.apply(null,t)):null},e.btoh=function(t){if(t){for(var e="",r=0;r<t.length;++r)e+=("0"+(255&t[r]).toString(16)).slice(-2);return e}return null},e.htob=function(t){if(t){if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(t.length%2!=0)throw new RangeError("Expected string to be an even number of characters");for(var e=new Uint8Array(t.length/2),r=0;r<t.length;r+=2)e[r/2]=parseInt(t.substring(r,r+2),16);return e}return null};var i=function(e,r){if(!e)throw i.useDebugger||"AUTOBAHN_DEBUG"in t&&AUTOBAHN_DEBUG,new Error(r||"Assertion failed!")},s=function(){if(0===arguments.length)return{};var t=arguments[0],e=!1,r=arguments.length;"boolean"==typeof arguments[r-1]&&(e=arguments[r-1],r-=1);for(var n=function(r){var n=i[r];r in t?e&&"object"==typeof n&&"object"==typeof t[r]&&s(t[r],n):t[r]=n},o=1;o<r;o++){var i=arguments[o];if(i){if("object"!=typeof i)throw new Error("Expected argument at index "+o+" to be an object");Object.keys(i).forEach(n)}}return t};e.handle_error=function(t,e,r){"function"==typeof t?t(e,r):console.error(r||"Unhandled exception raised: ",e)},e.rand_normal=function(t,e){var r,n,o;do{o=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(o>=1||0==o);return(t||0)+r*Math.sqrt(-2*Math.log(o)/o)*(e||1)},e.assert=i,e.http_post=function(t,e,r){n.debug("new http_post request",t,e,r);var i=o.defer(),s=new XMLHttpRequest;return s.withCredentials=!0,s.onreadystatechange=function(){if(4===s.readyState){var t=1223===s.status?204:s.status;if(200===t&&i.resolve(s.responseText),204===t)i.resolve();else{var e=null;try{e=s.statusText}catch(t){}i.reject({code:t,text:e})}}},s.open("POST",t,!0),s.setRequestHeader("Content-type","application/json; charset=utf-8"),r>0&&(s.timeout=r,s.ontimeout=function(){i.reject({code:501,text:"request timeout"})}),e?s.send(e):s.send(),i.promise.then?i.promise:i},e.http_get_json=function(t,e){var r=o.defer(),n=new XMLHttpRequest;return n.withCredentials=!0,n.onreadystatechange=function(){if(4===n.readyState){var t=1223===n.status?204:n.status;if(200===t){var e=JSON.parse(n.responseText);r.resolve(e)}if(204===t)r.resolve();else{var o=null;try{o=n.statusText}catch(t){}r.reject({code:t,text:o})}}},n.open("GET",t,!0),n.setRequestHeader("Content-type","application/json; charset=utf-8"),e>0&&(n.timeout=e,n.ontimeout=function(){r.reject({code:501,text:"request timeout"})}),n.send(),r.promise.then?r.promise:r},e.defaults=s,e.new_global_id=function(){return Math.floor(9007199254740992*Math.random())+1},e.deferred_factory=function(e){var r=null;return e&&e.use_es6_promises?"Promise"in t?r=function(){var t={};return t.promise=new Promise((function(e,r){t.resolve=e,t.reject=r})),t}:(n.debug("Warning: ES6 promises requested, but not found! Falling back to whenjs."),r=o.defer):r=e&&e.use_deferred?e.use_deferred:o.defer,r},e.promise=function(t){return t.promise.then?t.promise:t}}).call(this,r(9))},function(t,e,r){var n,o,i;t.exports=(i=r(0),o=(n=i).lib.WordArray,n.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var o=[],i=0;i<r;i+=3)for(var s=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&63));var u=n.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i<r.length;i++)n[r.charCodeAt(i)]=i}var s=r.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return function(t,e,r){for(var n=[],i=0,s=0;s<e;s++)if(s%4){var a=r[t.charCodeAt(s-1)]<<s%4*2,u=r[t.charCodeAt(s)]>>>6-s%4*2;n[i>>>2]|=(a|u)<<24-i%4*8,i++}return o.create(n,i)}(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},function(t,e,r){var n;t.exports=(n=r(0),function(t){var e=n,r=e.lib,o=r.WordArray,i=r.Hasher,s=e.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=i.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,s=t[e+0],u=t[e+1],p=t[e+2],d=t[e+3],y=t[e+4],v=t[e+5],g=t[e+6],_=t[e+7],b=t[e+8],m=t[e+9],w=t[e+10],E=t[e+11],S=t[e+12],x=t[e+13],A=t[e+14],j=t[e+15],k=i[0],O=i[1],T=i[2],R=i[3];k=c(k,O,T,R,s,7,a[0]),R=c(R,k,O,T,u,12,a[1]),T=c(T,R,k,O,p,17,a[2]),O=c(O,T,R,k,d,22,a[3]),k=c(k,O,T,R,y,7,a[4]),R=c(R,k,O,T,v,12,a[5]),T=c(T,R,k,O,g,17,a[6]),O=c(O,T,R,k,_,22,a[7]),k=c(k,O,T,R,b,7,a[8]),R=c(R,k,O,T,m,12,a[9]),T=c(T,R,k,O,w,17,a[10]),O=c(O,T,R,k,E,22,a[11]),k=c(k,O,T,R,S,7,a[12]),R=c(R,k,O,T,x,12,a[13]),T=c(T,R,k,O,A,17,a[14]),k=f(k,O=c(O,T,R,k,j,22,a[15]),T,R,u,5,a[16]),R=f(R,k,O,T,g,9,a[17]),T=f(T,R,k,O,E,14,a[18]),O=f(O,T,R,k,s,20,a[19]),k=f(k,O,T,R,v,5,a[20]),R=f(R,k,O,T,w,9,a[21]),T=f(T,R,k,O,j,14,a[22]),O=f(O,T,R,k,y,20,a[23]),k=f(k,O,T,R,m,5,a[24]),R=f(R,k,O,T,A,9,a[25]),T=f(T,R,k,O,d,14,a[26]),O=f(O,T,R,k,b,20,a[27]),k=f(k,O,T,R,x,5,a[28]),R=f(R,k,O,T,p,9,a[29]),T=f(T,R,k,O,_,14,a[30]),k=l(k,O=f(O,T,R,k,S,20,a[31]),T,R,v,4,a[32]),R=l(R,k,O,T,b,11,a[33]),T=l(T,R,k,O,E,16,a[34]),O=l(O,T,R,k,A,23,a[35]),k=l(k,O,T,R,u,4,a[36]),R=l(R,k,O,T,y,11,a[37]),T=l(T,R,k,O,_,16,a[38]),O=l(O,T,R,k,w,23,a[39]),k=l(k,O,T,R,x,4,a[40]),R=l(R,k,O,T,s,11,a[41]),T=l(T,R,k,O,d,16,a[42]),O=l(O,T,R,k,g,23,a[43]),k=l(k,O,T,R,m,4,a[44]),R=l(R,k,O,T,S,11,a[45]),T=l(T,R,k,O,j,16,a[46]),k=h(k,O=l(O,T,R,k,p,23,a[47]),T,R,s,6,a[48]),R=h(R,k,O,T,_,10,a[49]),T=h(T,R,k,O,A,15,a[50]),O=h(O,T,R,k,v,21,a[51]),k=h(k,O,T,R,S,6,a[52]),R=h(R,k,O,T,d,10,a[53]),T=h(T,R,k,O,w,15,a[54]),O=h(O,T,R,k,u,21,a[55]),k=h(k,O,T,R,b,6,a[56]),R=h(R,k,O,T,j,10,a[57]),T=h(T,R,k,O,g,15,a[58]),O=h(O,T,R,k,x,21,a[59]),k=h(k,O,T,R,y,6,a[60]),R=h(R,k,O,T,E,10,a[61]),T=h(T,R,k,O,p,15,a[62]),O=h(O,T,R,k,m,21,a[63]),i[0]=i[0]+k|0,i[1]=i[1]+O|0,i[2]=i[2]+T|0,i[3]=i[3]+R|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;r[o>>>5]|=128<<24-o%32;var i=t.floor(n/4294967296),s=n;r[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r[14+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var f=u[c];u[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return a},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,r,n,o,i,s){var a=t+(e&r|~e&n)+o+s;return(a<<i|a>>>32-i)+e}function f(t,e,r,n,o,i,s){var a=t+(e&n|r&~n)+o+s;return(a<<i|a>>>32-i)+e}function l(t,e,r,n,o,i,s){var a=t+(e^r^n)+o+s;return(a<<i|a>>>32-i)+e}function h(t,e,r,n,o,i,s){var a=t+(r^(e|~n))+o+s;return(a<<i|a>>>32-i)+e}e.MD5=i._createHelper(u),e.HmacMD5=i._createHmacHelper(u)}(Math),n.MD5)},function(t,e,r){var n,o,i,s,a,u,c,f;t.exports=(f=r(0),r(81),r(82),o=(n=f).lib,i=o.Base,s=o.WordArray,a=n.algo,u=a.MD5,c=a.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,n=r.hasher.create(),o=s.create(),i=o.words,a=r.keySize,u=r.iterations;i.length<a;){c&&n.update(c);var c=n.update(t).finalize(e);n.reset();for(var f=1;f<u;f++)c=n.finalize(c),n.reset();o.concat(c)}return o.sigBytes=4*a,o}}),n.EvpKDF=function(t,e,r){return c.create(r).compute(t,e)},f.EvpKDF)},function(t,e){t.exports={}},function(t,e,r){var n=r(17),o=r(93),i=r(30),s=r(46),a=r(47),u=r(11),c=r(86),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=s(t),e=a(e,!0),c)try{return f(t,e)}catch(t){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,r){var n=r(7),o=r(156);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return n(r),o(i),e?t.call(r,i):r.__proto__=i,r}}():void 0)},function(t,e){t.exports=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t}},function(t,e,r){var n=r(51),o=r(40),i=r(3)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(76).Buffer)},function(t,e,r){var n=r(61),o=r(23);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(10);t.exports=function(t,e){if(!n(t))return t;var r,o;if(e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!n(o=r.call(t)))return o;if(!e&&"function"==typeof(r=t.toString)&&!n(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var n,o=r(7),i=r(88),s=r(67),a=r(66),u=r(91),c=r(63),f=r(68),l=f("IE_PROTO"),h=function(){},p=function(t){return"<script>"+t+"<\/script>"},d=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;d=n?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var r=s.length;r--;)delete d.prototype[s[r]];return d()};a[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(h.prototype=o(t),r=new h,h.prototype=null,r[l]=t):r=d(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(11),o=r(29),i=r(68),s=r(155),a=i("IE_PROTO"),u=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,r){var n=r(161),o=r(22),i=r(3)("toStringTag"),s="Arguments"==o(function(){return arguments}());t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:s?o(e):"Object"==(n=o(e))&&"function"==typeof e.callee?"Arguments":n}},function(t,e,r){var n=r(7),o=r(50),i=r(3)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[i])?e:o(r)}},function(t,e,r){"use strict";var n,o,i=r(110),s=r(173),a=RegExp.prototype.exec,u=String.prototype.replace,c=a,f=(n=/a/,o=/b*/g,a.call(n,"a"),a.call(o,"a"),0!==n.lastIndex||0!==o.lastIndex),l=s.UNSUPPORTED_Y||s.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(f||h||l)&&(c=function(t){var e,r,n,o,s=this,c=l&&s.sticky,p=i.call(s),d=s.source,y=0,v=t;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),v=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(d="(?: "+d+")",v=" "+v,y++),r=new RegExp("^(?:"+d+")",p)),h&&(r=new RegExp("^"+d+"$(?!\\s)",p)),f&&(e=s.lastIndex),n=a.call(c?r:s,v),c?n?(n.input=n.input.slice(y),n[0]=n[0].slice(y),n.index=s.lastIndex,s.lastIndex+=n[0].length):s.lastIndex=0:f&&n&&(s.lastIndex=s.global?n.index+n[0].length:e),h&&n&&n.length>1&&u.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n}),t.exports=c},function(t,e,r){"use strict";var n,o=r(122),i=r(17),s=r(2),a=r(10),u=r(11),c=r(51),f=r(16),l=r(20),h=r(19).f,p=r(49),d=r(42),y=r(3),v=r(64),g=s.Int8Array,_=g&&g.prototype,b=s.Uint8ClampedArray,m=b&&b.prototype,w=g&&p(g),E=_&&p(_),S=Object.prototype,x=S.isPrototypeOf,A=y("toStringTag"),j=v("TYPED_ARRAY_TAG"),k=o&&!!d&&"Opera"!==c(s.opera),O=!1,T={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},R=function(t){return a(t)&&u(T,c(t))};for(n in T)s[n]||(k=!1);if((!k||"function"!=typeof w||w===Function.prototype)&&(w=function(){throw TypeError("Incorrect invocation")},k))for(n in T)s[n]&&d(s[n],w);if((!k||!E||E===S)&&(E=w.prototype,k))for(n in T)s[n]&&d(s[n].prototype,E);if(k&&p(m)!==E&&d(m,E),i&&!u(E,A))for(n in O=!0,h(E,A,{get:function(){return a(this)?this[j]:void 0}}),T)s[n]&&f(s[n],j,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:O&&j,aTypedArray:function(t){if(R(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(d){if(x.call(w,t))return t}else for(var e in T)if(u(T,n)){var r=s[e];if(r&&(t===r||x.call(r,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r){if(i){if(r)for(var n in T){var o=s[n];o&&u(o.prototype,t)&&delete o.prototype[t]}E[t]&&!r||l(E,t,r?e:k&&_[t]||e)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(i){if(d){if(r)for(n in T)(o=s[n])&&u(o,t)&&delete o[t];if(w[t]&&!r)return;try{return l(w,t,r?e:k&&g[t]||e)}catch(t){}}for(n in T)!(o=s[n])||o[t]&&!r||l(o,t,e)}},isView:function(t){var e=c(t);return"DataView"===e||u(T,e)},isTypedArray:R,TypedArray:w,TypedArrayPrototype:E}},function(t,e,r){(function(n){var o;/** @license MIT License (c) copyright 2010-2014 original author or authors */
!function(i){"use strict";void 0===(o=function(t){var e,o="undefined"!=typeof setTimeout&&setTimeout,i=function(t,e){return setTimeout(t,e)},s=function(t){return clearTimeout(t)},a=function(t){return o(t,0)};if(void 0!==n&&"[object process]"===Object.prototype.toString.call(n))a=function(t){return n.nextTick(t)};else if(e="undefined"!=typeof MutationObserver&&MutationObserver||"undefined"!=typeof WebKitMutationObserver&&WebKitMutationObserver)a=function(t){var e,r=document.createTextNode("");new t((function(){var t=e;e=void 0,t()})).observe(r,{characterData:!0});var n=0;return function(t){e=t,r.data=n^=1}}(e);else if(!o){var u=r(217);i=function(t,e){return u.setTimer(e,t)},s=u.cancelTimer,a=u.runOnLoop||u.runOnContext}return{setTimer:i,clearTimer:s,asap:a}}.call(e,r,e,t))||(t.exports=o)}(r(1))}).call(this,r(21))},function(t,e,r){var n=r(76),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=func