zmp-sdk 2.13.0 → 2.15.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.min.js +5522 -4008
- package/dist/index.es.js +5517 -4001
- package/dist/index.js +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/types/src/constants.d.ts +1 -0
- package/dist/types/src/controller/index.d.ts +1 -1
- package/dist/types/src/controller/interface.d.ts +1 -1
- package/dist/types/src/services/openApi.d.ts +1 -1
- package/dist/types/src/types/entity.d.ts +2 -2
- package/dist/types/src/types/enum.d.ts +2 -1
- package/dist/types/src/types/inputData.d.ts +9 -0
- package/dist/types/src/utils/common.d.ts +1 -0
- package/dist/types/src/utils/response.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("debug")),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,e){return t(e={exports:{}},e.exports),e.exports}var i,o,a,s,u,c,l,h,f,d,p=r((function(t,e){(function(){var r,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,h=256,f=1/0,d=9007199254740991,p=NaN,v=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",h]],_="[object Arguments]",y="[object Array]",m="[object Boolean]",w="[object Date]",b="[object Error]",k="[object Function]",E="[object GeneratorFunction]",A="[object Map]",S="[object Number]",x="[object Object]",T="[object Promise]",R="[object RegExp]",C="[object Set]",O="[object String]",I="[object Symbol]",N="[object WeakMap]",j="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",B="[object Float64Array]",U="[object Int8Array]",z="[object Int16Array]",M="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",q="[object Uint16Array]",Z="[object Uint32Array]",W=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,J=RegExp(K.source),G=RegExp(Y.source),V=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,at=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,mt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,kt=/['\n\r\u2028\u2029\\]/g,Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",At="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",Tt="\\ufe0e\\ufe0f",Rt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ct="['’]",Ot="[\\ud800-\\udfff]",It="["+Rt+"]",Nt="["+Et+"]",jt="\\d+",Lt="[\\u2700-\\u27bf]",Pt="["+St+"]",Bt="[^\\ud800-\\udfff"+Rt+jt+At+St+xt+"]",Ut="\\ud83c[\\udffb-\\udfff]",zt="[^\\ud800-\\udfff]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+xt+"]",qt="(?:"+Pt+"|"+Bt+")",Zt="(?:"+Ft+"|"+Bt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ht="(?:['’](?:D|LL|M|RE|S|T|VE))?",$t="(?:"+Nt+"|"+Ut+")"+"?",Kt="[\\ufe0e\\ufe0f]?",Yt=Kt+$t+("(?:\\u200d(?:"+[zt,Mt,Dt].join("|")+")"+Kt+$t+")*"),Jt="(?:"+[Lt,Mt,Dt].join("|")+")"+Yt,Gt="(?:"+[zt+Nt+"?",Nt,Mt,Dt,Ot].join("|")+")",Vt=RegExp(Ct,"g"),Xt=RegExp(Nt,"g"),Qt=RegExp(Ut+"(?="+Ut+")|"+Gt+Yt,"g"),te=RegExp([Ft+"?"+Pt+"+"+Wt+"(?="+[It,Ft,"$"].join("|")+")",Zt+"+"+Ht+"(?="+[It,Ft+qt,"$"].join("|")+")",Ft+"?"+qt+"+"+Wt,Ft+"+"+Ht,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Jt].join("|"),"g"),ee=RegExp("[\\u200d\\ud800-\\udfff"+Et+Tt+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ie=-1,oe={};oe[P]=oe[B]=oe[U]=oe[z]=oe[M]=oe[D]=oe[F]=oe[q]=oe[Z]=!0,oe[_]=oe[y]=oe[j]=oe[m]=oe[L]=oe[w]=oe[b]=oe[k]=oe[A]=oe[S]=oe[x]=oe[R]=oe[C]=oe[O]=oe[N]=!1;var ae={};ae[_]=ae[y]=ae[j]=ae[L]=ae[m]=ae[w]=ae[P]=ae[B]=ae[U]=ae[z]=ae[M]=ae[A]=ae[S]=ae[x]=ae[R]=ae[C]=ae[O]=ae[I]=ae[D]=ae[F]=ae[q]=ae[Z]=!0,ae[b]=ae[k]=ae[N]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ue=parseFloat,ce=parseInt,le="object"==typeof n&&n&&n.Object===Object&&n,he="object"==typeof self&&self&&self.Object===Object&&self,fe=le||he||Function("return this")(),de=e&&!e.nodeType&&e,pe=de&&t&&!t.nodeType&&t,ve=pe&&pe.exports===de,ge=ve&&le.process,_e=function(){try{var t=pe&&pe.require&&pe.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=_e&&_e.isArrayBuffer,me=_e&&_e.isDate,we=_e&&_e.isMap,be=_e&&_e.isRegExp,ke=_e&&_e.isSet,Ee=_e&&_e.isTypedArray;function Ae(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Se(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function xe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ce(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Oe(t,e){return!!(null==t?0:t.length)&&De(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ne(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function je(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Le(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ue=We("length");function ze(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Me(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function De(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Me(t,qe,n)}function Fe(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function qe(t){return t!=t}function Ze(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:p}function We(t){return function(e){return null==e?r:e[t]}}function He(t){return function(e){return null==t?r:t[e]}}function $e(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Ke(t,e){for(var n,i=-1,o=t.length;++i<o;){var a=e(t[i]);a!==r&&(n=n===r?a:n+a)}return n}function Ye(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Je(t){return t?t.slice(0,pn(t)+1).replace(ot,""):t}function Ge(t){return function(e){return t(e)}}function Ve(t,e){return Ne(e,(function(e){return t[e]}))}function Xe(t,e){return t.has(e)}function Qe(t,e){for(var n=-1,r=t.length;++n<r&&De(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&De(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=He({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=He({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(t){return"\\"+se[t]}function an(t){return ee.test(t)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function un(t,e){return function(n){return t(e(n))}}function cn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,o[i++]=n)}return o}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function fn(t){return an(t)?function(t){var e=Qt.lastIndex=0;for(;Qt.test(t);)++e;return e}(t):Ue(t)}function dn(t){return an(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function pn(t){for(var e=t.length;e--&&at.test(t.charAt(e)););return e}var vn=He({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gn=function t(e){var n,at=(e=null==e?fe:gn.defaults(fe.Object(),e,gn.pick(fe,re))).Array,Et=e.Date,At=e.Error,St=e.Function,xt=e.Math,Tt=e.Object,Rt=e.RegExp,Ct=e.String,Ot=e.TypeError,It=at.prototype,Nt=St.prototype,jt=Tt.prototype,Lt=e["__core-js_shared__"],Pt=Nt.toString,Bt=jt.hasOwnProperty,Ut=0,zt=(n=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=jt.toString,Dt=Pt.call(Tt),Ft=fe._,qt=Rt("^"+Pt.call(Bt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zt=ve?e.Buffer:r,Wt=e.Symbol,Ht=e.Uint8Array,$t=Zt?Zt.allocUnsafe:r,Kt=un(Tt.getPrototypeOf,Tt),Yt=Tt.create,Jt=jt.propertyIsEnumerable,Gt=It.splice,Qt=Wt?Wt.isConcatSpreadable:r,ee=Wt?Wt.iterator:r,se=Wt?Wt.toStringTag:r,le=function(){try{var t=po(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,de=Et&&Et.now!==fe.Date.now&&Et.now,pe=e.setTimeout!==fe.setTimeout&&e.setTimeout,ge=xt.ceil,_e=xt.floor,Ue=Tt.getOwnPropertySymbols,He=Zt?Zt.isBuffer:r,_n=e.isFinite,yn=It.join,mn=un(Tt.keys,Tt),wn=xt.max,bn=xt.min,kn=Et.now,En=e.parseInt,An=xt.random,Sn=It.reverse,xn=po(e,"DataView"),Tn=po(e,"Map"),Rn=po(e,"Promise"),Cn=po(e,"Set"),On=po(e,"WeakMap"),In=po(Tt,"create"),Nn=On&&new On,jn={},Ln=Fo(xn),Pn=Fo(Tn),Bn=Fo(Rn),Un=Fo(Cn),zn=Fo(On),Mn=Wt?Wt.prototype:r,Dn=Mn?Mn.valueOf:r,Fn=Mn?Mn.toString:r;function qn(t){if(is(t)&&!Ka(t)&&!(t instanceof $n)){if(t instanceof Hn)return t;if(Bt.call(t,"__wrapped__"))return qo(t)}return new Hn(t)}var Zn=function(){function t(){}return function(e){if(!rs(e))return{};if(Yt)return Yt(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function Wn(){}function Hn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function $n(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Jn;++e<n;)this.add(t[e])}function Vn(t){var e=this.__data__=new Yn(t);this.size=e.size}function Xn(t,e){var n=Ka(t),r=!n&&$a(t),i=!n&&!r&&Va(t),o=!n&&!r&&!i&&fs(t),a=n||r||i||o,s=a?Ye(t.length,Ct):[],u=s.length;for(var c in t)!e&&!Bt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Qn(t){var e=t.length;return e?t[Gr(0,e-1)]:r}function tr(t,e){return zo(Ii(t),cr(e,0,t.length))}function er(t){return zo(Ii(t))}function nr(t,e,n){(n!==r&&!Za(t[e],n)||n===r&&!(e in t))&&sr(t,e,n)}function rr(t,e,n){var i=t[e];Bt.call(t,e)&&Za(i,n)&&(n!==r||e in t)||sr(t,e,n)}function ir(t,e){for(var n=t.length;n--;)if(Za(t[n][0],e))return n;return-1}function or(t,e,n,r){return pr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function ar(t,e){return t&&Ni(e,Ls(e),t)}function sr(t,e,n){"__proto__"==e&&le?le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ur(t,e){for(var n=-1,i=e.length,o=at(i),a=null==t;++n<i;)o[n]=a?r:Cs(t,e[n]);return o}function cr(t,e,n){return t==t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function lr(t,e,n,i,o,a){var s,u=1&e,c=2&e,l=4&e;if(n&&(s=o?n(t,i,o,a):n(t)),s!==r)return s;if(!rs(t))return t;var h=Ka(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Bt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ii(t,s)}else{var f=_o(t),d=f==k||f==E;if(Va(t))return Si(t,u);if(f==x||f==_||d&&!o){if(s=c||d?{}:mo(t),!u)return c?function(t,e){return Ni(t,go(t),e)}(t,function(t,e){return t&&Ni(e,Ps(e),t)}(s,t)):function(t,e){return Ni(t,vo(t),e)}(t,ar(s,t))}else{if(!ae[f])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case j:return xi(t);case m:case w:return new r(+t);case L:return function(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case P:case B:case U:case z:case M:case D:case F:case q:case Z:return Ti(t,n);case A:return new r;case S:case O:return new r(t);case R:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new r;case I:return i=t,Dn?Tt(Dn.call(i)):{}}var i}(t,f,u)}}a||(a=new Vn);var p=a.get(t);if(p)return p;a.set(t,s),cs(t)?t.forEach((function(r){s.add(lr(r,e,n,r,t,a))})):os(t)&&t.forEach((function(r,i){s.set(i,lr(r,e,n,i,t,a))}));var v=h?r:(l?c?ao:oo:c?Ps:Ls)(t);return xe(v||t,(function(r,i){v&&(r=t[i=r]),rr(s,i,lr(r,e,n,i,t,a))})),s}function hr(t,e,n){var i=n.length;if(null==t)return!i;for(t=Tt(t);i--;){var o=n[i],a=e[o],s=t[o];if(s===r&&!(o in t)||!a(s))return!1}return!0}function fr(t,e,n){if("function"!=typeof t)throw new Ot(i);return Lo((function(){t.apply(r,n)}),e)}function dr(t,e,n,r){var i=-1,o=Oe,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=Ne(e,Ge(n))),r?(o=Ie,a=!1):e.length>=200&&(o=Xe,a=!1,e=new Gn(e));t:for(;++i<s;){var l=t[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var f=c;f--;)if(e[f]===h)continue t;u.push(l)}else o(e,h,r)||u.push(l)}return u}qn.templateSettings={escape:V,evaluate:X,interpolate:Q,variable:"",imports:{_:qn}},qn.prototype=Wn.prototype,qn.prototype.constructor=qn,Hn.prototype=Zn(Wn.prototype),Hn.prototype.constructor=Hn,$n.prototype=Zn(Wn.prototype),$n.prototype.constructor=$n,Kn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Kn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kn.prototype.get=function(t){var e=this.__data__;if(In){var n=e[t];return n===o?r:n}return Bt.call(e,t)?e[t]:r},Kn.prototype.has=function(t){var e=this.__data__;return In?e[t]!==r:Bt.call(e,t)},Kn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=In&&e===r?o:e,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=ir(e,t);return!(n<0)&&(n==e.length-1?e.pop():Gt.call(e,n,1),--this.size,!0)},Yn.prototype.get=function(t){var e=this.__data__,n=ir(e,t);return n<0?r:e[n][1]},Yn.prototype.has=function(t){return ir(this.__data__,t)>-1},Yn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(Tn||Yn),string:new Kn}},Jn.prototype.delete=function(t){var e=ho(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return ho(this,t).get(t)},Jn.prototype.has=function(t){return ho(this,t).has(t)},Jn.prototype.set=function(t,e){var n=ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(t){return this.__data__.set(t,o),this},Gn.prototype.has=function(t){return this.__data__.has(t)},Vn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Vn.prototype.get=function(t){return this.__data__.get(t)},Vn.prototype.has=function(t){return this.__data__.has(t)},Vn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Tn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(t,e),this.size=n.size,this};var pr=Pi(kr),vr=Pi(Er,!0);function gr(t,e){var n=!0;return pr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function _r(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(u===r?s==s&&!hs(s):n(s,u)))var u=s,c=a}return c}function yr(t,e){var n=[];return pr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function mr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?mr(s,e-1,n,r,i):je(i,s):r||(i[i.length]=s)}return i}var wr=Bi(),br=Bi(!0);function kr(t,e){return t&&wr(t,e,Ls)}function Er(t,e){return t&&br(t,e,Ls)}function Ar(t,e){return Ce(e,(function(e){return ts(t[e])}))}function Sr(t,e){for(var n=0,i=(e=bi(e,t)).length;null!=t&&n<i;)t=t[Do(e[n++])];return n&&n==i?t:r}function xr(t,e,n){var r=e(t);return Ka(t)?r:je(r,n(t))}function Tr(t){return null==t?t===r?"[object Undefined]":"[object Null]":se&&se in Tt(t)?function(t){var e=Bt.call(t,se),n=t[se];try{t[se]=r;var i=!0}catch(t){}var o=Mt.call(t);i&&(e?t[se]=n:delete t[se]);return o}(t):function(t){return Mt.call(t)}(t)}function Rr(t,e){return t>e}function Cr(t,e){return null!=t&&Bt.call(t,e)}function Or(t,e){return null!=t&&e in Tt(t)}function Ir(t,e,n){for(var i=n?Ie:Oe,o=t[0].length,a=t.length,s=a,u=at(a),c=1/0,l=[];s--;){var h=t[s];s&&e&&(h=Ne(h,Ge(e))),c=bn(h.length,c),u[s]=!n&&(e||o>=120&&h.length>=120)?new Gn(s&&h):r}h=t[0];var f=-1,d=u[0];t:for(;++f<o&&l.length<c;){var p=h[f],v=e?e(p):p;if(p=n||0!==p?p:0,!(d?Xe(d,v):i(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Xe(g,v):i(t[s],v,n)))continue t}d&&d.push(v),l.push(p)}}return l}function Nr(t,e,n){var i=null==(t=Oo(t,e=bi(e,t)))?t:t[Do(Qo(e))];return null==i?r:Ae(i,t,n)}function jr(t){return is(t)&&Tr(t)==_}function Lr(t,e,n,i,o){return t===e||(null==t||null==e||!is(t)&&!is(e)?t!=t&&e!=e:function(t,e,n,i,o,a){var s=Ka(t),u=Ka(e),c=s?y:_o(t),l=u?y:_o(e),h=(c=c==_?x:c)==x,f=(l=l==_?x:l)==x,d=c==l;if(d&&Va(t)){if(!Va(e))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Vn),s||fs(t)?ro(t,e,n,i,o,a):function(t,e,n,r,i,o,a){switch(n){case L:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case j:return!(t.byteLength!=e.byteLength||!o(new Ht(t),new Ht(e)));case m:case w:case S:return Za(+t,+e);case b:return t.name==e.name&&t.message==e.message;case R:case O:return t==e+"";case A:var s=sn;case C:var u=1&r;if(s||(s=ln),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=ro(s(t),s(e),r,i,o,a);return a.delete(t),l;case I:if(Dn)return Dn.call(t)==Dn.call(e)}return!1}(t,e,c,n,i,o,a);if(!(1&n)){var p=h&&Bt.call(t,"__wrapped__"),v=f&&Bt.call(e,"__wrapped__");if(p||v){var g=p?t.value():t,k=v?e.value():e;return a||(a=new Vn),o(g,k,n,i,a)}}if(!d)return!1;return a||(a=new Vn),function(t,e,n,i,o,a){var s=1&n,u=oo(t),c=u.length,l=oo(e).length;if(c!=l&&!s)return!1;var h=c;for(;h--;){var f=u[h];if(!(s?f in e:Bt.call(e,f)))return!1}var d=a.get(t),p=a.get(e);if(d&&p)return d==e&&p==t;var v=!0;a.set(t,e),a.set(e,t);var g=s;for(;++h<c;){var _=t[f=u[h]],y=e[f];if(i)var m=s?i(y,_,f,e,t,a):i(_,y,f,t,e,a);if(!(m===r?_===y||o(_,y,n,i,a):m)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var w=t.constructor,b=e.constructor;w==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,i,o,a)}(t,e,n,i,Lr,o))}function Pr(t,e,n,i){var o=n.length,a=o,s=!i;if(null==t)return!a;for(t=Tt(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=n[o])[0],l=t[c],h=u[1];if(s&&u[2]){if(l===r&&!(c in t))return!1}else{var f=new Vn;if(i)var d=i(l,h,c,t,e,f);if(!(d===r?Lr(h,l,3,i,f):d))return!1}}return!0}function Br(t){return!(!rs(t)||(e=t,zt&&zt in e))&&(ts(t)?qt:_t).test(Fo(t));var e}function Ur(t){return"function"==typeof t?t:null==t?au:"object"==typeof t?Ka(t)?Zr(t[0],t[1]):qr(t):vu(t)}function zr(t){if(!xo(t))return mn(t);var e=[];for(var n in Tt(t))Bt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Mr(t){if(!rs(t))return function(t){var e=[];if(null!=t)for(var n in Tt(t))e.push(n);return e}(t);var e=xo(t),n=[];for(var r in t)("constructor"!=r||!e&&Bt.call(t,r))&&n.push(r);return n}function Dr(t,e){return t<e}function Fr(t,e){var n=-1,r=Ja(t)?at(t.length):[];return pr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function qr(t){var e=fo(t);return 1==e.length&&e[0][2]?Ro(e[0][0],e[0][1]):function(n){return n===t||Pr(n,t,e)}}function Zr(t,e){return Eo(t)&&To(e)?Ro(Do(t),e):function(n){var i=Cs(n,t);return i===r&&i===e?Os(n,t):Lr(e,i,3)}}function Wr(t,e,n,i,o){t!==e&&wr(e,(function(a,s){if(o||(o=new Vn),rs(a))!function(t,e,n,i,o,a,s){var u=No(t,n),c=No(e,n),l=s.get(c);if(l)return void nr(t,n,l);var h=a?a(u,c,n+"",t,e,s):r,f=h===r;if(f){var d=Ka(c),p=!d&&Va(c),v=!d&&!p&&fs(c);h=c,d||p||v?Ka(u)?h=u:Ga(u)?h=Ii(u):p?(f=!1,h=Si(c,!0)):v?(f=!1,h=Ti(c,!0)):h=[]:ss(c)||$a(c)?(h=u,$a(u)?h=ws(u):rs(u)&&!ts(u)||(h=mo(c))):f=!1}f&&(s.set(c,h),o(h,c,i,a,s),s.delete(c));nr(t,n,h)}(t,e,s,n,Wr,i,o);else{var u=i?i(No(t,s),a,s+"",t,e,o):r;u===r&&(u=a),nr(t,s,u)}}),Ps)}function Hr(t,e){var n=t.length;if(n)return bo(e+=e<0?n:0,n)?t[e]:r}function $r(t,e,n){e=e.length?Ne(e,(function(t){return Ka(t)?function(e){return Sr(e,1===t.length?t[0]:t)}:t})):[au];var r=-1;return e=Ne(e,Ge(lo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Fr(t,(function(t,n,i){return{criteria:Ne(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ri(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Kr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Sr(t,a);n(s,a)&&ei(o,bi(a,t),s)}return o}function Yr(t,e,n,r){var i=r?Fe:De,o=-1,a=e.length,s=t;for(t===e&&(e=Ii(e)),n&&(s=Ne(t,Ge(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Gt.call(s,u,1),Gt.call(t,u,1);return t}function Jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;bo(i)?Gt.call(t,i,1):di(t,i)}}return t}function Gr(t,e){return t+_e(An()*(e-t+1))}function Vr(t,e){var n="";if(!t||e<1||e>d)return n;do{e%2&&(n+=t),(e=_e(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Po(Co(t,e,au),t+"")}function Qr(t){return Qn(Zs(t))}function ti(t,e){var n=Zs(t);return zo(n,cr(e,0,n.length))}function ei(t,e,n,i){if(!rs(t))return t;for(var o=-1,a=(e=bi(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Do(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var h=u[c];(l=i?i(h,c,u):r)===r&&(l=rs(h)?h:bo(e[o+1])?[]:{})}rr(u,c,l),u=u[c]}return t}var ni=Nn?function(t,e){return Nn.set(t,e),t}:au,ri=le?function(t,e){return le(t,"toString",{configurable:!0,enumerable:!1,value:ru(e),writable:!0})}:au;function ii(t){return zo(Zs(t))}function oi(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=at(i);++r<i;)o[r]=t[r+e];return o}function ai(t,e){var n;return pr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function si(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!hs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return ui(t,e,au,n)}function ui(t,e,n,i){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,c=hs(e),l=e===r;o<a;){var h=_e((o+a)/2),f=n(t[h]),d=f!==r,p=null===f,v=f==f,g=hs(f);if(s)var _=i||v;else _=l?v&&(i||d):u?v&&d&&(i||!p):c?v&&d&&!p&&(i||!g):!p&&!g&&(i?f<=e:f<e);_?o=h+1:a=h}return bn(a,4294967294)}function ci(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Za(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(t){return"number"==typeof t?t:hs(t)?p:+t}function hi(t){if("string"==typeof t)return t;if(Ka(t))return Ne(t,hi)+"";if(hs(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fi(t,e,n){var r=-1,i=Oe,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ie;else if(o>=200){var c=e?null:Vi(t);if(c)return ln(c);a=!1,i=Xe,u=new Gn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function di(t,e){return null==(t=Oo(t,e=bi(e,t)))||delete t[Do(Qo(e))]}function pi(t,e,n,r){return ei(t,e,n(Sr(t,e)),r)}function vi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?oi(t,r?0:o,r?o+1:i):oi(t,r?o+1:0,r?i:o)}function gi(t,e){var n=t;return n instanceof $n&&(n=n.value()),Le(e,(function(t,e){return e.func.apply(e.thisArg,je([t],e.args))}),n)}function _i(t,e,n){var r=t.length;if(r<2)return r?fi(t[0]):[];for(var i=-1,o=at(r);++i<r;)for(var a=t[i],s=-1;++s<r;)s!=i&&(o[i]=dr(o[i]||a,t[s],e,n));return fi(mr(o,1),e,n)}function yi(t,e,n){for(var i=-1,o=t.length,a=e.length,s={};++i<o;){var u=i<a?e[i]:r;n(s,t[i],u)}return s}function mi(t){return Ga(t)?t:[]}function wi(t){return"function"==typeof t?t:au}function bi(t,e){return Ka(t)?t:Eo(t,e)?[t]:Mo(bs(t))}var ki=Xr;function Ei(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:oi(t,e,n)}var Ai=he||function(t){return fe.clearTimeout(t)};function Si(t,e){if(e)return t.slice();var n=t.length,r=$t?$t(n):new t.constructor(n);return t.copy(r),r}function xi(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function Ti(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ri(t,e){if(t!==e){var n=t!==r,i=null===t,o=t==t,a=hs(t),s=e!==r,u=null===e,c=e==e,l=hs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ci(t,e,n,r){for(var i=-1,o=t.length,a=n.length,s=-1,u=e.length,c=wn(o-a,0),l=at(u+c),h=!r;++s<u;)l[s]=e[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=t[i]);for(;c--;)l[s++]=t[i++];return l}function Oi(t,e,n,r){for(var i=-1,o=t.length,a=-1,s=n.length,u=-1,c=e.length,l=wn(o-s,0),h=at(l+c),f=!r;++i<l;)h[i]=t[i];for(var d=i;++u<c;)h[d+u]=e[u];for(;++a<s;)(f||i<o)&&(h[d+n[a]]=t[i++]);return h}function Ii(t,e){var n=-1,r=t.length;for(e||(e=at(r));++n<r;)e[n]=t[n];return e}function Ni(t,e,n,i){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=i?i(n[u],t[u],u,n,t):r;c===r&&(c=t[u]),o?sr(n,u,c):rr(n,u,c)}return n}function ji(t,e){return function(n,r){var i=Ka(n)?Se:or,o=e?e():{};return i(n,t,lo(r,2),o)}}function Li(t){return Xr((function(e,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,s=o>2?n[2]:r;for(a=t.length>3&&"function"==typeof a?(o--,a):r,s&&ko(n[0],n[1],s)&&(a=o<3?r:a,o=1),e=Tt(e);++i<o;){var u=n[i];u&&t(e,u,i,a)}return e}))}function Pi(t,e){return function(n,r){if(null==n)return n;if(!Ja(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Tt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Bi(t){return function(e,n,r){for(var i=-1,o=Tt(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Ui(t){return function(e){var n=an(e=bs(e))?dn(e):r,i=n?n[0]:e.charAt(0),o=n?Ei(n,1).join(""):e.slice(1);return i[t]()+o}}function zi(t){return function(e){return Le(tu($s(e).replace(Vt,"")),t,"")}}function Mi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Zn(t.prototype),r=t.apply(n,e);return rs(r)?r:n}}function Di(t){return function(e,n,i){var o=Tt(e);if(!Ja(e)){var a=lo(n,3);e=Ls(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,i);return s>-1?o[a?e[s]:s]:r}}function Fi(t){return io((function(e){var n=e.length,o=n,a=Hn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new Ot(i);if(a&&!u&&"wrapper"==uo(s))var u=new Hn([],!0)}for(o=u?o:n;++o<n;){var c=uo(s=e[o]),l="wrapper"==c?so(s):r;u=l&&Ao(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&Ao(s)?u[c]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ka(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function qi(t,e,n,i,o,a,s,u,c,h){var f=e&l,d=1&e,p=2&e,v=24&e,g=512&e,_=p?r:Mi(t);return function r(){for(var l=arguments.length,y=at(l),m=l;m--;)y[m]=arguments[m];if(v)var w=co(r),b=en(y,w);if(i&&(y=Ci(y,i,o,v)),a&&(y=Oi(y,a,s,v)),l-=b,v&&l<h){var k=cn(y,w);return Ji(t,e,qi,r.placeholder,n,y,k,u,c,h-l)}var E=d?n:this,A=p?E[t]:t;return l=y.length,u?y=Io(y,u):g&&l>1&&y.reverse(),f&&c<l&&(y.length=c),this&&this!==fe&&this instanceof r&&(A=_||Mi(A)),A.apply(E,y)}}function Zi(t,e){return function(n,r){return function(t,e,n,r){return kr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Wi(t,e){return function(n,i){var o;if(n===r&&i===r)return e;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=hi(n),i=hi(i)):(n=li(n),i=li(i)),o=t(n,i)}return o}}function Hi(t){return io((function(e){return e=Ne(e,Ge(lo())),Xr((function(n){var r=this;return t(e,(function(t){return Ae(t,r,n)}))}))}))}function $i(t,e){var n=(e=e===r?" ":hi(e)).length;if(n<2)return n?Vr(e,t):e;var i=Vr(e,ge(t/fn(e)));return an(e)?Ei(dn(i),0,t).join(""):i.slice(0,t)}function Ki(t){return function(e,n,i){return i&&"number"!=typeof i&&ko(e,n,i)&&(n=i=r),e=gs(e),n===r?(n=e,e=0):n=gs(n),function(t,e,n,r){for(var i=-1,o=wn(ge((e-t)/(n||1)),0),a=at(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,n,i=i===r?e<n?1:-1:gs(i),t)}}function Yi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ms(e),n=ms(n)),t(e,n)}}function Ji(t,e,n,i,o,a,s,l,h,f){var d=8&e;e|=d?u:c,4&(e&=~(d?c:u))||(e&=-4);var p=[t,e,o,d?a:r,d?s:r,d?r:a,d?r:s,l,h,f],v=n.apply(r,p);return Ao(t)&&jo(v,p),v.placeholder=i,Bo(v,t,e)}function Gi(t){var e=xt[t];return function(t,n){if(t=ms(t),(n=null==n?0:bn(_s(n),292))&&_n(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Vi=Cn&&1/ln(new Cn([,-0]))[1]==f?function(t){return new Cn(t)}:hu;function Xi(t){return function(e){var n=_o(e);return n==A?sn(e):n==C?hn(e):function(t,e){return Ne(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qi(t,e,n,o,f,d,p,v){var g=2&e;if(!g&&"function"!=typeof t)throw new Ot(i);var _=o?o.length:0;if(_||(e&=-97,o=f=r),p=p===r?p:wn(_s(p),0),v=v===r?v:_s(v),_-=f?f.length:0,e&c){var y=o,m=f;o=f=r}var w=g?r:so(t),b=[t,e,n,o,f,y,m,d,p,v];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==h&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!s)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?Ci(c,u,e[4]):u,t[4]=c?cn(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Oi(c,u,e[6]):u,t[6]=c?cn(t[5],a):e[6]);(u=e[7])&&(t[7]=u);r&l&&(t[8]=null==t[8]?e[8]:bn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(b,w),t=b[0],e=b[1],n=b[2],o=b[3],f=b[4],!(v=b[9]=b[9]===r?g?0:t.length:wn(b[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)k=8==e||e==s?function(t,e,n){var i=Mi(t);return function o(){for(var a=arguments.length,s=at(a),u=a,c=co(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:cn(s,c);return(a-=l.length)<n?Ji(t,e,qi,o.placeholder,r,s,l,r,r,n-a):Ae(this&&this!==fe&&this instanceof o?i:t,this,s)}}(t,e,v):e!=u&&33!=e||f.length?qi.apply(r,b):function(t,e,n,r){var i=1&e,o=Mi(t);return function e(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=at(c+s),h=this&&this!==fe&&this instanceof e?o:t;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return Ae(h,i?n:this,l)}}(t,e,n,o);else var k=function(t,e,n){var r=1&e,i=Mi(t);return function e(){return(this&&this!==fe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Bo((w?ni:jo)(k,b),t,e)}function to(t,e,n,i){return t===r||Za(t,jt[n])&&!Bt.call(i,n)?e:t}function eo(t,e,n,i,o,a){return rs(t)&&rs(e)&&(a.set(e,t),Wr(t,e,r,eo,a),a.delete(e)),t}function no(t){return ss(t)?r:t}function ro(t,e,n,i,o,a){var s=1&n,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var f=-1,d=!0,p=2&n?new Gn:r;for(a.set(t,e),a.set(e,t);++f<u;){var v=t[f],g=e[f];if(i)var _=s?i(g,v,f,e,t,a):i(v,g,f,t,e,a);if(_!==r){if(_)continue;d=!1;break}if(p){if(!Be(e,(function(t,e){if(!Xe(p,e)&&(v===t||o(v,t,n,i,a)))return p.push(e)}))){d=!1;break}}else if(v!==g&&!o(v,g,n,i,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function io(t){return Po(Co(t,r,Yo),t+"")}function oo(t){return xr(t,Ls,vo)}function ao(t){return xr(t,Ps,go)}var so=Nn?function(t){return Nn.get(t)}:hu;function uo(t){for(var e=t.name+"",n=jn[e],r=Bt.call(jn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function co(t){return(Bt.call(qn,"placeholder")?qn:t).placeholder}function lo(){var t=qn.iteratee||su;return t=t===su?Ur:t,arguments.length?t(arguments[0],arguments[1]):t}function ho(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=Ls(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,To(i)]}return e}function po(t,e){var n=function(t,e){return null==t?r:t[e]}(t,e);return Br(n)?n:r}var vo=Ue?function(t){return null==t?[]:(t=Tt(t),Ce(Ue(t),(function(e){return Jt.call(t,e)})))}:yu,go=Ue?function(t){for(var e=[];t;)je(e,vo(t)),t=Kt(t);return e}:yu,_o=Tr;function yo(t,e,n){for(var r=-1,i=(e=bi(e,t)).length,o=!1;++r<i;){var a=Do(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ns(i)&&bo(a,i)&&(Ka(t)||$a(t))}function mo(t){return"function"!=typeof t.constructor||xo(t)?{}:Zn(Kt(t))}function wo(t){return Ka(t)||$a(t)||!!(Qt&&t&&t[Qt])}function bo(t,e){var n=typeof t;return!!(e=null==e?d:e)&&("number"==n||"symbol"!=n&&mt.test(t))&&t>-1&&t%1==0&&t<e}function ko(t,e,n){if(!rs(n))return!1;var r=typeof e;return!!("number"==r?Ja(n)&&bo(e,n.length):"string"==r&&e in n)&&Za(n[e],t)}function Eo(t,e){if(Ka(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!hs(t))||(et.test(t)||!tt.test(t)||null!=e&&t in Tt(e))}function Ao(t){var e=uo(t),n=qn[e];if("function"!=typeof n||!(e in $n.prototype))return!1;if(t===n)return!0;var r=so(n);return!!r&&t===r[0]}(xn&&_o(new xn(new ArrayBuffer(1)))!=L||Tn&&_o(new Tn)!=A||Rn&&_o(Rn.resolve())!=T||Cn&&_o(new Cn)!=C||On&&_o(new On)!=N)&&(_o=function(t){var e=Tr(t),n=e==x?t.constructor:r,i=n?Fo(n):"";if(i)switch(i){case Ln:return L;case Pn:return A;case Bn:return T;case Un:return C;case zn:return N}return e});var So=Lt?ts:mu;function xo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||jt)}function To(t){return t==t&&!rs(t)}function Ro(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==r||t in Tt(n)))}}function Co(t,e,n){return e=wn(e===r?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=wn(r.length-e,0),a=at(o);++i<o;)a[i]=r[e+i];i=-1;for(var s=at(e+1);++i<e;)s[i]=r[i];return s[e]=n(a),Ae(t,this,s)}}function Oo(t,e){return e.length<2?t:Sr(t,oi(e,0,-1))}function Io(t,e){for(var n=t.length,i=bn(e.length,n),o=Ii(t);i--;){var a=e[i];t[i]=bo(a,n)?o[a]:r}return t}function No(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jo=Uo(ni),Lo=pe||function(t,e){return fe.setTimeout(t,e)},Po=Uo(ri);function Bo(t,e,n){var r=e+"";return Po(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return xe(g,(function(n){var r="_."+n[0];e&n[1]&&!Oe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(ct):[]}(r),n)))}function Uo(t){var e=0,n=0;return function(){var i=kn(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(r,arguments)}}function zo(t,e){var n=-1,i=t.length,o=i-1;for(e=e===r?i:e;++n<e;){var a=Gr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Mo=function(t){var e=Ua(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,r,i){e.push(r?i.replace(ft,"$1"):n||t)})),e}));function Do(t){if("string"==typeof t||hs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fo(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function qo(t){if(t instanceof $n)return t.clone();var e=new Hn(t.__wrapped__,t.__chain__);return e.__actions__=Ii(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Zo=Xr((function(t,e){return Ga(t)?dr(t,mr(e,1,Ga,!0)):[]})),Wo=Xr((function(t,e){var n=Qo(e);return Ga(n)&&(n=r),Ga(t)?dr(t,mr(e,1,Ga,!0),lo(n,2)):[]})),Ho=Xr((function(t,e){var n=Qo(e);return Ga(n)&&(n=r),Ga(t)?dr(t,mr(e,1,Ga,!0),r,n):[]}));function $o(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),Me(t,lo(e,3),i)}function Ko(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return n!==r&&(o=_s(n),o=n<0?wn(i+o,0):bn(o,i-1)),Me(t,lo(e,3),o,!0)}function Yo(t){return(null==t?0:t.length)?mr(t,1):[]}function Jo(t){return t&&t.length?t[0]:r}var Go=Xr((function(t){var e=Ne(t,mi);return e.length&&e[0]===t[0]?Ir(e):[]})),Vo=Xr((function(t){var e=Qo(t),n=Ne(t,mi);return e===Qo(n)?e=r:n.pop(),n.length&&n[0]===t[0]?Ir(n,lo(e,2)):[]})),Xo=Xr((function(t){var e=Qo(t),n=Ne(t,mi);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?Ir(n,r,e):[]}));function Qo(t){var e=null==t?0:t.length;return e?t[e-1]:r}var ta=Xr(ea);function ea(t,e){return t&&t.length&&e&&e.length?Yr(t,e):t}var na=io((function(t,e){var n=null==t?0:t.length,r=ur(t,e);return Jr(t,Ne(e,(function(t){return bo(t,n)?+t:t})).sort(Ri)),r}));function ra(t){return null==t?t:Sn.call(t)}var ia=Xr((function(t){return fi(mr(t,1,Ga,!0))})),oa=Xr((function(t){var e=Qo(t);return Ga(e)&&(e=r),fi(mr(t,1,Ga,!0),lo(e,2))})),aa=Xr((function(t){var e=Qo(t);return e="function"==typeof e?e:r,fi(mr(t,1,Ga,!0),r,e)}));function sa(t){if(!t||!t.length)return[];var e=0;return t=Ce(t,(function(t){if(Ga(t))return e=wn(t.length,e),!0})),Ye(e,(function(e){return Ne(t,We(e))}))}function ua(t,e){if(!t||!t.length)return[];var n=sa(t);return null==e?n:Ne(n,(function(t){return Ae(e,r,t)}))}var ca=Xr((function(t,e){return Ga(t)?dr(t,e):[]})),la=Xr((function(t){return _i(Ce(t,Ga))})),ha=Xr((function(t){var e=Qo(t);return Ga(e)&&(e=r),_i(Ce(t,Ga),lo(e,2))})),fa=Xr((function(t){var e=Qo(t);return e="function"==typeof e?e:r,_i(Ce(t,Ga),r,e)})),da=Xr(sa);var pa=Xr((function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,ua(t,n)}));function va(t){var e=qn(t);return e.__chain__=!0,e}function ga(t,e){return e(t)}var _a=io((function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,o=function(e){return ur(e,t)};return!(e>1||this.__actions__.length)&&i instanceof $n&&bo(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:ga,args:[o],thisArg:r}),new Hn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(r),t}))):this.thru(o)}));var ya=ji((function(t,e,n){Bt.call(t,n)?++t[n]:sr(t,n,1)}));var ma=Di($o),wa=Di(Ko);function ba(t,e){return(Ka(t)?xe:pr)(t,lo(e,3))}function ka(t,e){return(Ka(t)?Te:vr)(t,lo(e,3))}var Ea=ji((function(t,e,n){Bt.call(t,n)?t[n].push(e):sr(t,n,[e])}));var Aa=Xr((function(t,e,n){var r=-1,i="function"==typeof e,o=Ja(t)?at(t.length):[];return pr(t,(function(t){o[++r]=i?Ae(e,t,n):Nr(t,e,n)})),o})),Sa=ji((function(t,e,n){sr(t,n,e)}));function xa(t,e){return(Ka(t)?Ne:Fr)(t,lo(e,3))}var Ta=ji((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Ra=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ko(t,e[0],e[1])?e=[]:n>2&&ko(e[0],e[1],e[2])&&(e=[e[0]]),$r(t,mr(e,1),[])})),Ca=de||function(){return fe.Date.now()};function Oa(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,Qi(t,l,r,r,r,r,e)}function Ia(t,e){var n;if("function"!=typeof e)throw new Ot(i);return t=_s(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Na=Xr((function(t,e,n){var r=1;if(n.length){var i=cn(n,co(Na));r|=u}return Qi(t,r,e,n,i)})),ja=Xr((function(t,e,n){var r=3;if(n.length){var i=cn(n,co(ja));r|=u}return Qi(e,r,t,n,i)}));function La(t,e,n){var o,a,s,u,c,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new Ot(i);function v(e){var n=o,i=a;return o=a=r,h=e,u=t.apply(i,n)}function g(t){return h=t,c=Lo(y,e),f?v(t):u}function _(t){var n=t-l;return l===r||n>=e||n<0||d&&t-h>=s}function y(){var t=Ca();if(_(t))return m(t);c=Lo(y,function(t){var n=e-(t-l);return d?bn(n,s-(t-h)):n}(t))}function m(t){return c=r,p&&o?v(t):(o=a=r,u)}function w(){var t=Ca(),n=_(t);if(o=arguments,a=this,l=t,n){if(c===r)return g(l);if(d)return Ai(c),c=Lo(y,e),v(l)}return c===r&&(c=Lo(y,e)),u}return e=ms(e)||0,rs(n)&&(f=!!n.leading,s=(d="maxWait"in n)?wn(ms(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==r&&Ai(c),h=0,o=l=a=c=r},w.flush=function(){return c===r?u:m(Ca())},w}var Pa=Xr((function(t,e){return fr(t,1,e)})),Ba=Xr((function(t,e,n){return fr(t,ms(e)||0,n)}));function Ua(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ot(i);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ua.Cache||Jn),n}function za(t){if("function"!=typeof t)throw new Ot(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ua.Cache=Jn;var Ma=ki((function(t,e){var n=(e=1==e.length&&Ka(e[0])?Ne(e[0],Ge(lo())):Ne(mr(e,1),Ge(lo()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ae(t,this,r)}))})),Da=Xr((function(t,e){var n=cn(e,co(Da));return Qi(t,u,r,e,n)})),Fa=Xr((function(t,e){var n=cn(e,co(Fa));return Qi(t,c,r,e,n)})),qa=io((function(t,e){return Qi(t,h,r,r,r,e)}));function Za(t,e){return t===e||t!=t&&e!=e}var Wa=Yi(Rr),Ha=Yi((function(t,e){return t>=e})),$a=jr(function(){return arguments}())?jr:function(t){return is(t)&&Bt.call(t,"callee")&&!Jt.call(t,"callee")},Ka=at.isArray,Ya=ye?Ge(ye):function(t){return is(t)&&Tr(t)==j};function Ja(t){return null!=t&&ns(t.length)&&!ts(t)}function Ga(t){return is(t)&&Ja(t)}var Va=He||mu,Xa=me?Ge(me):function(t){return is(t)&&Tr(t)==w};function Qa(t){if(!is(t))return!1;var e=Tr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var e=Tr(t);return e==k||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function es(t){return"number"==typeof t&&t==_s(t)}function ns(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function rs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function is(t){return null!=t&&"object"==typeof t}var os=we?Ge(we):function(t){return is(t)&&_o(t)==A};function as(t){return"number"==typeof t||is(t)&&Tr(t)==S}function ss(t){if(!is(t)||Tr(t)!=x)return!1;var e=Kt(t);if(null===e)return!0;var n=Bt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Dt}var us=be?Ge(be):function(t){return is(t)&&Tr(t)==R};var cs=ke?Ge(ke):function(t){return is(t)&&_o(t)==C};function ls(t){return"string"==typeof t||!Ka(t)&&is(t)&&Tr(t)==O}function hs(t){return"symbol"==typeof t||is(t)&&Tr(t)==I}var fs=Ee?Ge(Ee):function(t){return is(t)&&ns(t.length)&&!!oe[Tr(t)]};var ds=Yi(Dr),ps=Yi((function(t,e){return t<=e}));function vs(t){if(!t)return[];if(Ja(t))return ls(t)?dn(t):Ii(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=_o(t);return(e==A?sn:e==C?ln:Zs)(t)}function gs(t){return t?(t=ms(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function _s(t){var e=gs(t),n=e%1;return e==e?n?e-n:e:0}function ys(t){return t?cr(_s(t),0,v):0}function ms(t){if("number"==typeof t)return t;if(hs(t))return p;if(rs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Je(t);var n=gt.test(t);return n||yt.test(t)?ce(t.slice(2),n?2:8):vt.test(t)?p:+t}function ws(t){return Ni(t,Ps(t))}function bs(t){return null==t?"":hi(t)}var ks=Li((function(t,e){if(xo(e)||Ja(e))Ni(e,Ls(e),t);else for(var n in e)Bt.call(e,n)&&rr(t,n,e[n])})),Es=Li((function(t,e){Ni(e,Ps(e),t)})),As=Li((function(t,e,n,r){Ni(e,Ps(e),t,r)})),Ss=Li((function(t,e,n,r){Ni(e,Ls(e),t,r)})),xs=io(ur);var Ts=Xr((function(t,e){t=Tt(t);var n=-1,i=e.length,o=i>2?e[2]:r;for(o&&ko(e[0],e[1],o)&&(i=1);++n<i;)for(var a=e[n],s=Ps(a),u=-1,c=s.length;++u<c;){var l=s[u],h=t[l];(h===r||Za(h,jt[l])&&!Bt.call(t,l))&&(t[l]=a[l])}return t})),Rs=Xr((function(t){return t.push(r,eo),Ae(Us,r,t)}));function Cs(t,e,n){var i=null==t?r:Sr(t,e);return i===r?n:i}function Os(t,e){return null!=t&&yo(t,e,Or)}var Is=Zi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),ru(au)),Ns=Zi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Bt.call(t,e)?t[e].push(n):t[e]=[n]}),lo),js=Xr(Nr);function Ls(t){return Ja(t)?Xn(t):zr(t)}function Ps(t){return Ja(t)?Xn(t,!0):Mr(t)}var Bs=Li((function(t,e,n){Wr(t,e,n)})),Us=Li((function(t,e,n,r){Wr(t,e,n,r)})),zs=io((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ne(e,(function(e){return e=bi(e,t),r||(r=e.length>1),e})),Ni(t,ao(t),n),r&&(n=lr(n,7,no));for(var i=e.length;i--;)di(n,e[i]);return n}));var Ms=io((function(t,e){return null==t?{}:function(t,e){return Kr(t,e,(function(e,n){return Os(t,n)}))}(t,e)}));function Ds(t,e){if(null==t)return{};var n=Ne(ao(t),(function(t){return[t]}));return e=lo(e),Kr(t,n,(function(t,n){return e(t,n[0])}))}var Fs=Xi(Ls),qs=Xi(Ps);function Zs(t){return null==t?[]:Ve(t,Ls(t))}var Ws=zi((function(t,e,n){return e=e.toLowerCase(),t+(n?Hs(e):e)}));function Hs(t){return Qs(bs(t).toLowerCase())}function $s(t){return(t=bs(t))&&t.replace(wt,nn).replace(Xt,"")}var Ks=zi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ys=zi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Js=Ui("toLowerCase");var Gs=zi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Vs=zi((function(t,e,n){return t+(n?" ":"")+Qs(e)}));var Xs=zi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qs=Ui("toUpperCase");function tu(t,e,n){return t=bs(t),(e=n?r:e)===r?function(t){return ne.test(t)}(t)?function(t){return t.match(te)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var eu=Xr((function(t,e){try{return Ae(t,r,e)}catch(t){return Qa(t)?t:new At(t)}})),nu=io((function(t,e){return xe(e,(function(e){e=Do(e),sr(t,e,Na(t[e],t))})),t}));function ru(t){return function(){return t}}var iu=Fi(),ou=Fi(!0);function au(t){return t}function su(t){return Ur("function"==typeof t?t:lr(t,1))}var uu=Xr((function(t,e){return function(n){return Nr(n,t,e)}})),cu=Xr((function(t,e){return function(n){return Nr(t,n,e)}}));function lu(t,e,n){var r=Ls(e),i=Ar(e,r);null!=n||rs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ar(e,Ls(e)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=ts(t);return xe(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,je([this.value()],arguments))})})),t}function hu(){}var fu=Hi(Ne),du=Hi(Re),pu=Hi(Be);function vu(t){return Eo(t)?We(Do(t)):function(t){return function(e){return Sr(e,t)}}(t)}var gu=Ki(),_u=Ki(!0);function yu(){return[]}function mu(){return!1}var wu=Wi((function(t,e){return t+e}),0),bu=Gi("ceil"),ku=Wi((function(t,e){return t/e}),1),Eu=Gi("floor");var Au,Su=Wi((function(t,e){return t*e}),1),xu=Gi("round"),Tu=Wi((function(t,e){return t-e}),0);return qn.after=function(t,e){if("function"!=typeof e)throw new Ot(i);return t=_s(t),function(){if(--t<1)return e.apply(this,arguments)}},qn.ary=Oa,qn.assign=ks,qn.assignIn=Es,qn.assignInWith=As,qn.assignWith=Ss,qn.at=xs,qn.before=Ia,qn.bind=Na,qn.bindAll=nu,qn.bindKey=ja,qn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ka(t)?t:[t]},qn.chain=va,qn.chunk=function(t,e,n){e=(n?ko(t,e,n):e===r)?1:wn(_s(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=at(ge(i/e));o<i;)s[a++]=oi(t,o,o+=e);return s},qn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},qn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=at(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return je(Ka(n)?Ii(n):[n],mr(e,1))},qn.cond=function(t){var e=null==t?0:t.length,n=lo();return t=e?Ne(t,(function(t){if("function"!=typeof t[1])throw new Ot(i);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Ae(i[0],this,n))return Ae(i[1],this,n)}}))},qn.conforms=function(t){return function(t){var e=Ls(t);return function(n){return hr(n,t,e)}}(lr(t,1))},qn.constant=ru,qn.countBy=ya,qn.create=function(t,e){var n=Zn(t);return null==e?n:ar(n,e)},qn.curry=function t(e,n,i){var o=Qi(e,8,r,r,r,r,r,n=i?r:n);return o.placeholder=t.placeholder,o},qn.curryRight=function t(e,n,i){var o=Qi(e,s,r,r,r,r,r,n=i?r:n);return o.placeholder=t.placeholder,o},qn.debounce=La,qn.defaults=Ts,qn.defaultsDeep=Rs,qn.defer=Pa,qn.delay=Ba,qn.difference=Zo,qn.differenceBy=Wo,qn.differenceWith=Ho,qn.drop=function(t,e,n){var i=null==t?0:t.length;return i?oi(t,(e=n||e===r?1:_s(e))<0?0:e,i):[]},qn.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?oi(t,0,(e=i-(e=n||e===r?1:_s(e)))<0?0:e):[]},qn.dropRightWhile=function(t,e){return t&&t.length?vi(t,lo(e,3),!0,!0):[]},qn.dropWhile=function(t,e){return t&&t.length?vi(t,lo(e,3),!0):[]},qn.fill=function(t,e,n,i){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&ko(t,e,n)&&(n=0,i=o),function(t,e,n,i){var o=t.length;for((n=_s(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:_s(i))<0&&(i+=o),i=n>i?0:ys(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},qn.filter=function(t,e){return(Ka(t)?Ce:yr)(t,lo(e,3))},qn.flatMap=function(t,e){return mr(xa(t,e),1)},qn.flatMapDeep=function(t,e){return mr(xa(t,e),f)},qn.flatMapDepth=function(t,e,n){return n=n===r?1:_s(n),mr(xa(t,e),n)},qn.flatten=Yo,qn.flattenDeep=function(t){return(null==t?0:t.length)?mr(t,f):[]},qn.flattenDepth=function(t,e){return(null==t?0:t.length)?mr(t,e=e===r?1:_s(e)):[]},qn.flip=function(t){return Qi(t,512)},qn.flow=iu,qn.flowRight=ou,qn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},qn.functions=function(t){return null==t?[]:Ar(t,Ls(t))},qn.functionsIn=function(t){return null==t?[]:Ar(t,Ps(t))},qn.groupBy=Ea,qn.initial=function(t){return(null==t?0:t.length)?oi(t,0,-1):[]},qn.intersection=Go,qn.intersectionBy=Vo,qn.intersectionWith=Xo,qn.invert=Is,qn.invertBy=Ns,qn.invokeMap=Aa,qn.iteratee=su,qn.keyBy=Sa,qn.keys=Ls,qn.keysIn=Ps,qn.map=xa,qn.mapKeys=function(t,e){var n={};return e=lo(e,3),kr(t,(function(t,r,i){sr(n,e(t,r,i),t)})),n},qn.mapValues=function(t,e){var n={};return e=lo(e,3),kr(t,(function(t,r,i){sr(n,r,e(t,r,i))})),n},qn.matches=function(t){return qr(lr(t,1))},qn.matchesProperty=function(t,e){return Zr(t,lr(e,1))},qn.memoize=Ua,qn.merge=Bs,qn.mergeWith=Us,qn.method=uu,qn.methodOf=cu,qn.mixin=lu,qn.negate=za,qn.nthArg=function(t){return t=_s(t),Xr((function(e){return Hr(e,t)}))},qn.omit=zs,qn.omitBy=function(t,e){return Ds(t,za(lo(e)))},qn.once=function(t){return Ia(2,t)},qn.orderBy=function(t,e,n,i){return null==t?[]:(Ka(e)||(e=null==e?[]:[e]),Ka(n=i?r:n)||(n=null==n?[]:[n]),$r(t,e,n))},qn.over=fu,qn.overArgs=Ma,qn.overEvery=du,qn.overSome=pu,qn.partial=Da,qn.partialRight=Fa,qn.partition=Ta,qn.pick=Ms,qn.pickBy=Ds,qn.property=vu,qn.propertyOf=function(t){return function(e){return null==t?r:Sr(t,e)}},qn.pull=ta,qn.pullAll=ea,qn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Yr(t,e,lo(n,2)):t},qn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Yr(t,e,r,n):t},qn.pullAt=na,qn.range=gu,qn.rangeRight=_u,qn.rearg=qa,qn.reject=function(t,e){return(Ka(t)?Ce:yr)(t,za(lo(e,3)))},qn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=lo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Jr(t,i),n},qn.rest=function(t,e){if("function"!=typeof t)throw new Ot(i);return Xr(t,e=e===r?e:_s(e))},qn.reverse=ra,qn.sampleSize=function(t,e,n){return e=(n?ko(t,e,n):e===r)?1:_s(e),(Ka(t)?tr:ti)(t,e)},qn.set=function(t,e,n){return null==t?t:ei(t,e,n)},qn.setWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:ei(t,e,n,i)},qn.shuffle=function(t){return(Ka(t)?er:ii)(t)},qn.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&ko(t,e,n)?(e=0,n=i):(e=null==e?0:_s(e),n=n===r?i:_s(n)),oi(t,e,n)):[]},qn.sortBy=Ra,qn.sortedUniq=function(t){return t&&t.length?ci(t):[]},qn.sortedUniqBy=function(t,e){return t&&t.length?ci(t,lo(e,2)):[]},qn.split=function(t,e,n){return n&&"number"!=typeof n&&ko(t,e,n)&&(e=n=r),(n=n===r?v:n>>>0)?(t=bs(t))&&("string"==typeof e||null!=e&&!us(e))&&!(e=hi(e))&&an(t)?Ei(dn(t),0,n):t.split(e,n):[]},qn.spread=function(t,e){if("function"!=typeof t)throw new Ot(i);return e=null==e?0:wn(_s(e),0),Xr((function(n){var r=n[e],i=Ei(n,0,e);return r&&je(i,r),Ae(t,this,i)}))},qn.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},qn.take=function(t,e,n){return t&&t.length?oi(t,0,(e=n||e===r?1:_s(e))<0?0:e):[]},qn.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?oi(t,(e=i-(e=n||e===r?1:_s(e)))<0?0:e,i):[]},qn.takeRightWhile=function(t,e){return t&&t.length?vi(t,lo(e,3),!1,!0):[]},qn.takeWhile=function(t,e){return t&&t.length?vi(t,lo(e,3)):[]},qn.tap=function(t,e){return e(t),t},qn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new Ot(i);return rs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),La(t,e,{leading:r,maxWait:e,trailing:o})},qn.thru=ga,qn.toArray=vs,qn.toPairs=Fs,qn.toPairsIn=qs,qn.toPath=function(t){return Ka(t)?Ne(t,Do):hs(t)?[t]:Ii(Mo(bs(t)))},qn.toPlainObject=ws,qn.transform=function(t,e,n){var r=Ka(t),i=r||Va(t)||fs(t);if(e=lo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:rs(t)&&ts(o)?Zn(Kt(t)):{}}return(i?xe:kr)(t,(function(t,r,i){return e(n,t,r,i)})),n},qn.unary=function(t){return Oa(t,1)},qn.union=ia,qn.unionBy=oa,qn.unionWith=aa,qn.uniq=function(t){return t&&t.length?fi(t):[]},qn.uniqBy=function(t,e){return t&&t.length?fi(t,lo(e,2)):[]},qn.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?fi(t,r,e):[]},qn.unset=function(t,e){return null==t||di(t,e)},qn.unzip=sa,qn.unzipWith=ua,qn.update=function(t,e,n){return null==t?t:pi(t,e,wi(n))},qn.updateWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:pi(t,e,wi(n),i)},qn.values=Zs,qn.valuesIn=function(t){return null==t?[]:Ve(t,Ps(t))},qn.without=ca,qn.words=tu,qn.wrap=function(t,e){return Da(wi(e),t)},qn.xor=la,qn.xorBy=ha,qn.xorWith=fa,qn.zip=da,qn.zipObject=function(t,e){return yi(t||[],e||[],rr)},qn.zipObjectDeep=function(t,e){return yi(t||[],e||[],ei)},qn.zipWith=pa,qn.entries=Fs,qn.entriesIn=qs,qn.extend=Es,qn.extendWith=As,lu(qn,qn),qn.add=wu,qn.attempt=eu,qn.camelCase=Ws,qn.capitalize=Hs,qn.ceil=bu,qn.clamp=function(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=(n=ms(n))==n?n:0),e!==r&&(e=(e=ms(e))==e?e:0),cr(ms(t),e,n)},qn.clone=function(t){return lr(t,4)},qn.cloneDeep=function(t){return lr(t,5)},qn.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:r)},qn.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:r)},qn.conformsTo=function(t,e){return null==e||hr(t,e,Ls(e))},qn.deburr=$s,qn.defaultTo=function(t,e){return null==t||t!=t?e:t},qn.divide=ku,qn.endsWith=function(t,e,n){t=bs(t),e=hi(e);var i=t.length,o=n=n===r?i:cr(_s(n),0,i);return(n-=e.length)>=0&&t.slice(n,o)==e},qn.eq=Za,qn.escape=function(t){return(t=bs(t))&&G.test(t)?t.replace(Y,rn):t},qn.escapeRegExp=function(t){return(t=bs(t))&&it.test(t)?t.replace(rt,"\\$&"):t},qn.every=function(t,e,n){var i=Ka(t)?Re:gr;return n&&ko(t,e,n)&&(e=r),i(t,lo(e,3))},qn.find=ma,qn.findIndex=$o,qn.findKey=function(t,e){return ze(t,lo(e,3),kr)},qn.findLast=wa,qn.findLastIndex=Ko,qn.findLastKey=function(t,e){return ze(t,lo(e,3),Er)},qn.floor=Eu,qn.forEach=ba,qn.forEachRight=ka,qn.forIn=function(t,e){return null==t?t:wr(t,lo(e,3),Ps)},qn.forInRight=function(t,e){return null==t?t:br(t,lo(e,3),Ps)},qn.forOwn=function(t,e){return t&&kr(t,lo(e,3))},qn.forOwnRight=function(t,e){return t&&Er(t,lo(e,3))},qn.get=Cs,qn.gt=Wa,qn.gte=Ha,qn.has=function(t,e){return null!=t&&yo(t,e,Cr)},qn.hasIn=Os,qn.head=Jo,qn.identity=au,qn.includes=function(t,e,n,r){t=Ja(t)?t:Zs(t),n=n&&!r?_s(n):0;var i=t.length;return n<0&&(n=wn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&De(t,e,n)>-1},qn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),De(t,e,i)},qn.inRange=function(t,e,n){return e=gs(e),n===r?(n=e,e=0):n=gs(n),function(t,e,n){return t>=bn(e,n)&&t<wn(e,n)}(t=ms(t),e,n)},qn.invoke=js,qn.isArguments=$a,qn.isArray=Ka,qn.isArrayBuffer=Ya,qn.isArrayLike=Ja,qn.isArrayLikeObject=Ga,qn.isBoolean=function(t){return!0===t||!1===t||is(t)&&Tr(t)==m},qn.isBuffer=Va,qn.isDate=Xa,qn.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},qn.isEmpty=function(t){if(null==t)return!0;if(Ja(t)&&(Ka(t)||"string"==typeof t||"function"==typeof t.splice||Va(t)||fs(t)||$a(t)))return!t.length;var e=_o(t);if(e==A||e==C)return!t.size;if(xo(t))return!zr(t).length;for(var n in t)if(Bt.call(t,n))return!1;return!0},qn.isEqual=function(t,e){return Lr(t,e)},qn.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:r)?n(t,e):r;return i===r?Lr(t,e,r,n):!!i},qn.isError=Qa,qn.isFinite=function(t){return"number"==typeof t&&_n(t)},qn.isFunction=ts,qn.isInteger=es,qn.isLength=ns,qn.isMap=os,qn.isMatch=function(t,e){return t===e||Pr(t,e,fo(e))},qn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,Pr(t,e,fo(e),n)},qn.isNaN=function(t){return as(t)&&t!=+t},qn.isNative=function(t){if(So(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(t)},qn.isNil=function(t){return null==t},qn.isNull=function(t){return null===t},qn.isNumber=as,qn.isObject=rs,qn.isObjectLike=is,qn.isPlainObject=ss,qn.isRegExp=us,qn.isSafeInteger=function(t){return es(t)&&t>=-9007199254740991&&t<=d},qn.isSet=cs,qn.isString=ls,qn.isSymbol=hs,qn.isTypedArray=fs,qn.isUndefined=function(t){return t===r},qn.isWeakMap=function(t){return is(t)&&_o(t)==N},qn.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Tr(t)},qn.join=function(t,e){return null==t?"":yn.call(t,e)},qn.kebabCase=Ks,qn.last=Qo,qn.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=_s(n))<0?wn(i+o,0):bn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Me(t,qe,o,!0)},qn.lowerCase=Ys,qn.lowerFirst=Js,qn.lt=ds,qn.lte=ps,qn.max=function(t){return t&&t.length?_r(t,au,Rr):r},qn.maxBy=function(t,e){return t&&t.length?_r(t,lo(e,2),Rr):r},qn.mean=function(t){return Ze(t,au)},qn.meanBy=function(t,e){return Ze(t,lo(e,2))},qn.min=function(t){return t&&t.length?_r(t,au,Dr):r},qn.minBy=function(t,e){return t&&t.length?_r(t,lo(e,2),Dr):r},qn.stubArray=yu,qn.stubFalse=mu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Su,qn.nth=function(t,e){return t&&t.length?Hr(t,_s(e)):r},qn.noConflict=function(){return fe._===this&&(fe._=Ft),this},qn.noop=hu,qn.now=Ca,qn.pad=function(t,e,n){t=bs(t);var r=(e=_s(e))?fn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return $i(_e(i),n)+t+$i(ge(i),n)},qn.padEnd=function(t,e,n){t=bs(t);var r=(e=_s(e))?fn(t):0;return e&&r<e?t+$i(e-r,n):t},qn.padStart=function(t,e,n){t=bs(t);var r=(e=_s(e))?fn(t):0;return e&&r<e?$i(e-r,n)+t:t},qn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),En(bs(t).replace(ot,""),e||0)},qn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ko(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=gs(t),e===r?(e=t,t=0):e=gs(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var o=An();return bn(t+o*(e-t+ue("1e-"+((o+"").length-1))),e)}return Gr(t,e)},qn.reduce=function(t,e,n){var r=Ka(t)?Le:$e,i=arguments.length<3;return r(t,lo(e,4),n,i,pr)},qn.reduceRight=function(t,e,n){var r=Ka(t)?Pe:$e,i=arguments.length<3;return r(t,lo(e,4),n,i,vr)},qn.repeat=function(t,e,n){return e=(n?ko(t,e,n):e===r)?1:_s(e),Vr(bs(t),e)},qn.replace=function(){var t=arguments,e=bs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},qn.result=function(t,e,n){var i=-1,o=(e=bi(e,t)).length;for(o||(o=1,t=r);++i<o;){var a=null==t?r:t[Do(e[i])];a===r&&(i=o,a=n),t=ts(a)?a.call(t):a}return t},qn.round=xu,qn.runInContext=t,qn.sample=function(t){return(Ka(t)?Qn:Qr)(t)},qn.size=function(t){if(null==t)return 0;if(Ja(t))return ls(t)?fn(t):t.length;var e=_o(t);return e==A||e==C?t.size:zr(t).length},qn.snakeCase=Gs,qn.some=function(t,e,n){var i=Ka(t)?Be:ai;return n&&ko(t,e,n)&&(e=r),i(t,lo(e,3))},qn.sortedIndex=function(t,e){return si(t,e)},qn.sortedIndexBy=function(t,e,n){return ui(t,e,lo(n,2))},qn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=si(t,e);if(r<n&&Za(t[r],e))return r}return-1},qn.sortedLastIndex=function(t,e){return si(t,e,!0)},qn.sortedLastIndexBy=function(t,e,n){return ui(t,e,lo(n,2),!0)},qn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=si(t,e,!0)-1;if(Za(t[n],e))return n}return-1},qn.startCase=Vs,qn.startsWith=function(t,e,n){return t=bs(t),n=null==n?0:cr(_s(n),0,t.length),e=hi(e),t.slice(n,n+e.length)==e},qn.subtract=Tu,qn.sum=function(t){return t&&t.length?Ke(t,au):0},qn.sumBy=function(t,e){return t&&t.length?Ke(t,lo(e,2)):0},qn.template=function(t,e,n){var i=qn.templateSettings;n&&ko(t,e,n)&&(e=r),t=bs(t),e=As({},e,i,to);var o,a,s=As({},e.imports,i.imports,to),u=Ls(s),c=Ve(s,u),l=0,h=e.interpolate||bt,f="__p += '",d=Rt((e.escape||bt).source+"|"+h.source+"|"+(h===Q?dt:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),p="//# sourceURL="+(Bt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ie+"]")+"\n";t.replace(d,(function(e,n,r,i,s,u){return r||(r=i),f+=t.slice(l,u).replace(kt,on),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),f+="';\n";var v=Bt.call(e,"variable")&&e.variable;if(v){if(ht.test(v))throw new At("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(W,""):f).replace(H,"$1").replace($,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=eu((function(){return St(u,p+"return "+f).apply(r,c)}));if(g.source=f,Qa(g))throw g;return g},qn.times=function(t,e){if((t=_s(t))<1||t>d)return[];var n=v,r=bn(t,v);e=lo(e),t-=v;for(var i=Ye(r,e);++n<t;)e(n);return i},qn.toFinite=gs,qn.toInteger=_s,qn.toLength=ys,qn.toLower=function(t){return bs(t).toLowerCase()},qn.toNumber=ms,qn.toSafeInteger=function(t){return t?cr(_s(t),-9007199254740991,d):0===t?t:0},qn.toString=bs,qn.toUpper=function(t){return bs(t).toUpperCase()},qn.trim=function(t,e,n){if((t=bs(t))&&(n||e===r))return Je(t);if(!t||!(e=hi(e)))return t;var i=dn(t),o=dn(e);return Ei(i,Qe(i,o),tn(i,o)+1).join("")},qn.trimEnd=function(t,e,n){if((t=bs(t))&&(n||e===r))return t.slice(0,pn(t)+1);if(!t||!(e=hi(e)))return t;var i=dn(t);return Ei(i,0,tn(i,dn(e))+1).join("")},qn.trimStart=function(t,e,n){if((t=bs(t))&&(n||e===r))return t.replace(ot,"");if(!t||!(e=hi(e)))return t;var i=dn(t);return Ei(i,Qe(i,dn(e))).join("")},qn.truncate=function(t,e){var n=30,i="...";if(rs(e)){var o="separator"in e?e.separator:o;n="length"in e?_s(e.length):n,i="omission"in e?hi(e.omission):i}var a=(t=bs(t)).length;if(an(t)){var s=dn(t);a=s.length}if(n>=a)return t;var u=n-fn(i);if(u<1)return i;var c=s?Ei(s,0,u).join(""):t.slice(0,u);if(o===r)return c+i;if(s&&(u+=c.length-u),us(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=Rt(o.source,bs(pt.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var f=l.index;c=c.slice(0,f===r?u:f)}}else if(t.indexOf(hi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},qn.unescape=function(t){return(t=bs(t))&&J.test(t)?t.replace(K,vn):t},qn.uniqueId=function(t){var e=++Ut;return bs(t)+e},qn.upperCase=Xs,qn.upperFirst=Qs,qn.each=ba,qn.eachRight=ka,qn.first=Jo,lu(qn,(Au={},kr(qn,(function(t,e){Bt.call(qn.prototype,e)||(Au[e]=t)})),Au),{chain:!1}),qn.VERSION="4.17.21",xe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){qn[t].placeholder=qn})),xe(["drop","take"],(function(t,e){$n.prototype[t]=function(n){n=n===r?1:wn(_s(n),0);var i=this.__filtered__&&!e?new $n(this):this.clone();return i.__filtered__?i.__takeCount__=bn(n,i.__takeCount__):i.__views__.push({size:bn(n,v),type:t+(i.__dir__<0?"Right":"")}),i},$n.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),xe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;$n.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:lo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),xe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");$n.prototype[t]=function(){return this[n](1).value()[0]}})),xe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");$n.prototype[t]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(au)},$n.prototype.find=function(t){return this.filter(t).head()},$n.prototype.findLast=function(t){return this.reverse().find(t)},$n.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new $n(this):this.map((function(n){return Nr(n,t,e)}))})),$n.prototype.reject=function(t){return this.filter(za(lo(t)))},$n.prototype.slice=function(t,e){t=_s(t);var n=this;return n.__filtered__&&(t>0||e<0)?new $n(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=_s(e))<0?n.dropRight(-e):n.take(e-t)),n)},$n.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$n.prototype.toArray=function(){return this.take(v)},kr($n.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=qn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(qn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof $n,c=s[0],l=u||Ka(e),h=function(t){var e=o.apply(qn,je([t],s));return i&&f?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,p=a&&!f,v=u&&!d;if(!a&&l){e=v?e:new $n(this);var g=t.apply(e,s);return g.__actions__.push({func:ga,args:[h],thisArg:r}),new Hn(g,f)}return p&&v?t.apply(this,s):(g=this.thru(h),p?i?g.value()[0]:g.value():g)})})),xe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=It[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);qn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ka(i)?i:[],t)}return this[n]((function(n){return e.apply(Ka(n)?n:[],t)}))}})),kr($n.prototype,(function(t,e){var n=qn[e];if(n){var r=n.name+"";Bt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[qi(r,2).name]=[{name:"wrapper",func:r}],$n.prototype.clone=function(){var t=new $n(this.__wrapped__);return t.__actions__=Ii(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ii(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ii(this.__views__),t},$n.prototype.reverse=function(){if(this.__filtered__){var t=new $n(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},$n.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ka(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=bn(e,t+a);break;case"takeRight":t=wn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,h=l.length,f=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(t,this.__actions__);var p=[];t:for(;u--&&f<d;){for(var v=-1,g=t[c+=e];++v<h;){var _=l[v],y=_.iteratee,m=_.type,w=y(g);if(2==m)g=w;else if(!w){if(1==m)continue t;break t}}p[f++]=g}return p},qn.prototype.at=_a,qn.prototype.chain=function(){return va(this)},qn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===r&&(this.__values__=vs(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},qn.prototype.plant=function(t){for(var e,n=this;n instanceof Wn;){var i=qo(n);i.__index__=0,i.__values__=r,e?o.__wrapped__=i:e=i;var o=i;n=n.__wrapped__}return o.__wrapped__=t,e},qn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof $n){var e=t;return this.__actions__.length&&(e=new $n(this)),(e=e.reverse()).__actions__.push({func:ga,args:[ra],thisArg:r}),new Hn(e,this.__chain__)}return this.thru(ra)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,ee&&(qn.prototype[ee]=function(){return this}),qn}();pe?((pe.exports=gn)._=gn,de._=gn):fe._=gn}).call(n)}));exports.NetworkType=void 0,(i=exports.NetworkType||(exports.NetworkType={})).none="none",i.wifi="wifi",i.cellular="cellular",i.unknown="unknown",exports.PlatformType=void 0,(o=exports.PlatformType||(exports.PlatformType={})).wp="wp",o.android="android",o.iOS="iOS",o.unknown="unknown",exports.ProfileType=void 0,(a=exports.ProfileType||(exports.ProfileType={}))[a.user=1]="user",a[a.oa=0]="oa",a[a.aliasOA=2]="aliasOA",exports.ChatType=void 0,(s=exports.ChatType||(exports.ChatType={}))[s.user=1]="user",s[s.oa=0]="oa",exports.PostFeedType=void 0,(u=exports.PostFeedType||(exports.PostFeedType={}))[u.image=1]="image",u[u.link=4]="link",u[u.profile=5]="profile",exports.ShareSheetType=void 0,(c=exports.ShareSheetType||(exports.ShareSheetType={}))[c.image=1]="image",c[c.gif=11]="gif",c[c.video=12]="video",c[c.link=4]="link",c[c.oa=5]="oa",exports.OrientationType=void 0,(l=exports.OrientationType||(exports.OrientationType={}))[l.auto=1]="auto",l[l.portrait=2]="portrait",l[l.landscape=3]="landscape",exports.VibrateType=void 0,(h=exports.VibrateType||(exports.VibrateType={}))[h.oneShot=0]="oneShot",exports.NativeCode=void 0,(f=exports.NativeCode||(exports.NativeCode={}))[f.token_invalid=-2]="token_invalid",f[f.not_permission=-1]="not_permission",f[f.client_not_support=-5]="client_not_support",f[f.decode_failed=-4]="decode_failed",exports.Events=void 0,(d=exports.Events||(exports.Events={})).AppPaused="h5.event.paused",d.AppResumed="h5.event.resumed",d.NetworkChanged="h5.event.connection.changed",d.OnDataCallback="h5.event.webview.result";const v=t=>{const e=document.cookie;if(e){const i=e.split("; ");if(i&&i.length>0)for(var n=t.length+1,r=i.length-1;r>=0;r--){let e=i[r];if(e&&0===e.indexOf(t)&&(e=e.substring(n,e.length),e))return e=e.replace(/["']/g,""),e}}return null},g=t=>v(`${window.location.host}_`+t),_=t=>v((()=>{const t=window.location.host;if(t){if(t.indexOf("zalo.me")>=0)return"zalo.me_";if(t.indexOf("baomoi.com")>=0)return"baomoi.com_";if(t.indexOf("mp3.zing.vn")>=0)return"mp3.zing.vn_";if(t.indexOf("zaloapp.com")>=0)return"zaloapp.com_"}return""})()+t),y="action.open.profile",m="action.open.inapp",w="action.open.chat",b="action.open.postfeed",k="action.follow.oa",E="action.unfollow.oa",A="action.open.sharesheet",S="action.request.permission.camera",x="action.change.title.header",T="action.webview.networktype",R="action.create.options.menu",C="action.create.shortcut",O="action.change.actionbar.leftbutton.type",I="action.window.close",N="action.prompt.authentication",j="action.prompt.authentication.check_state",L="action.get.location",P="action.query.location.hide",B="action.show.toast",U="action.hide.keyboard",z="action.open.phone",M="action.open.qr",D="action.open.sms",F="action.view.myqr",q="action.keep.screen",Z="action.change.autorotate",W="action.scan.ibeacon",H="action.save.image.gallery",$="action.open.mp",K="action.change.actionbar",Y="action.interactive.vibration",J="action.zbrowser.mpds",G="action.webview.set.result",V="action.mp.get.number",X=["action.get.downloaded.sticker","action.report.abuse",k,E,A,R,O,I,"action.zbrowser.jsbridge",L,P,B,F,q,"action.zalorun.getTrackingStatus","action.zalorun.setTrackingStatus","action.zalorun.getDayStep","action.zalorun.forceSubmitData","action.zalorun.setWeight","action.download.cate"],Q=-1400,tt=-1401,et=-1403,nt={READ_MORE:"Read more at: https://miniapp.zalo.me/docs/api",LOGIN_REQUIRED:"Please login before to call this api. Read more at: https://miniapp.zalo.me/docs/api/login",LOGIN_FAILED:"Login failed.",NOT_PERMISSION:"You don't have permission to call this api",CLIENT_NOT_SUPPORT:"This API is not supported in this Zalo version",DECODE_FAILED:"Can not decode your data. Read more at: https://miniapp.zalo.me/docs/api/error"},rt="apps/get-info",it={android:12100571,iOS:400,wp:0,unknown:0},ot=new RegExp("[\\u0300-\\u036f]","g"),at=new RegExp("[đ|Đ]","g"),st=new RegExp("\\s","g"),ut=e.default("zmp:utils:common"),ct=t=>{try{new URL(t)}catch(t){return!1}return!0},lt=()=>navigator.userAgent||navigator.vendor||window.opera,ht=()=>{const t=lt().toLowerCase();return{isWP:/iemobile/.test(t),isAndroid:/android/i.test(t)&&!/iemobile/.test(t),isIOS:/iphone|ios|ipad|ipod/.test(t)&&!/iemobile/.test(t),isMobile:/android|iphone|ios|ipad|ipod|iemobile/.test(t),isZalo:/zalo/.test(t)}},ft=t=>{const e=document.getElementsByTagName("meta");for(let n=0;n<e.length;n++)if(e[n].getAttribute("name")===t||e[n].getAttribute("property")===t)return e[n].getAttribute("content");return""},dt=()=>{const t=lt().toLowerCase().split("zalo")[1];if(t){return t.replace(" ","").split("/")[1]||""}return""},pt=()=>{let t=ht();return t.isWP?exports.PlatformType.wp:t.isAndroid?exports.PlatformType.android:t.isIOS?exports.PlatformType.iOS:exports.PlatformType.unknown},vt=(t,e)=>{const n=e.toLowerCase();return!(("array"!==n&&"array<number>"!==n&&"array<string>"!==n||!("array"===n&&Array.isArray(t)||"array<number>"===n&&(t=>Array.isArray(t)&&!t.some((t=>"number"!=typeof t)))(t)||"array<string>"===n&&(t=>Array.isArray(t)&&!t.some((t=>"string"!=typeof t)))(t)))&&(Array.isArray(t)||typeof t!==e))},gt=t=>null==t||t.hasOwnProperty("length")&&0===t.length||t.constructor===Object&&0===Object.keys(t).length,_t=t=>(t=>{let e=g(t);return e||(e=_(t),e)?e:v(t)})(t),yt=t=>{if(p.isObject(JSON)&&JSON.parse&&p.isString(t)){const e=t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");return JSON.parse(e,((t,e)=>e))}return p.isObject(t)?t:new Function("return "+t)()},mt=t=>{if(p.isObject(JSON)&&JSON.stringify)return JSON.stringify(t);if(void 0===t)return"undefined";if(null===t)return"null";try{if("string"==typeof t||null!==t.constructor.toString().match(/string/i))return'"'+t.replace(/"/g,'\\"')+'"'}catch(t){console.log(t)}var e;if(null!==Object.prototype.toString.call(t).match(/array/i)){e=new Array;for(var n=t.length,r=0;r<n;r++)e.push(mt(t[r]));return"["+e.join(",")+"]"}if("object"==typeof t){for(var i in e=new Array,t)e.push('"'+i+'":'+mt(t[i]));return"{"+e.join(",")+"}"}return t.toString()},wt=()=>{try{const t=Number(dt()),e=pt();return t>=it[e]}catch(t){return!0}},bt=t=>JSON.stringify(t).replace(/"/g,'\\"').replace(/'/g,"'"),kt=t=>{try{if(t){ut(t);const e=t.replace(/\\/g,"").replace(/'/g,"'");return ut("formattedValue",e,JSON.parse(e),typeof JSON.parse(e)),JSON.parse(e)}return null}catch(e){return console.log(e),t}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t((function(t,n){(function(){var r,i="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,f=256,h=1/0,d=9007199254740991,p=NaN,v=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",f]],_="[object Arguments]",m="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",k="[object Function]",E="[object GeneratorFunction]",A="[object Map]",S="[object Number]",x="[object Object]",C="[object Promise]",T="[object RegExp]",R="[object Set]",O="[object String]",I="[object Symbol]",N="[object WeakMap]",j="[object ArrayBuffer]",L="[object DataView]",P="[object Float32Array]",B="[object Float64Array]",M="[object Int8Array]",U="[object Int16Array]",z="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",q="[object Uint16Array]",Z="[object Uint32Array]",W=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,G=RegExp(K.source),J=RegExp(Y.source),V=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(re.source),oe=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\ufe0e\\ufe0f",Te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['’]",Oe="[\\ud800-\\udfff]",Ie="["+Te+"]",Ne="["+Ee+"]",je="\\d+",Le="[\\u2700-\\u27bf]",Pe="["+Se+"]",Be="[^\\ud800-\\udfff"+Te+je+Ae+Se+xe+"]",Me="\\ud83c[\\udffb-\\udfff]",Ue="[^\\ud800-\\udfff]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",De="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+xe+"]",qe="(?:"+Pe+"|"+Be+")",Ze="(?:"+Fe+"|"+Be+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+Ne+"|"+Me+")"+"?",Ke="[\\ufe0e\\ufe0f]?",Ye=Ke+He+("(?:\\u200d(?:"+[Ue,ze,De].join("|")+")"+Ke+He+")*"),Ge="(?:"+[Le,ze,De].join("|")+")"+Ye,Je="(?:"+[Ue+Ne+"?",Ne,ze,De,Oe].join("|")+")",Ve=RegExp(Re,"g"),Xe=RegExp(Ne,"g"),Qe=RegExp(Me+"(?="+Me+")|"+Je+Ye,"g"),et=RegExp([Fe+"?"+Pe+"+"+We+"(?="+[Ie,Fe,"$"].join("|")+")",Ze+"+"+$e+"(?="+[Ie,Fe+qe,"$"].join("|")+")",Fe+"?"+qe+"+"+We,Fe+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,Ge].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+Ee+Ce+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,ot={};ot[P]=ot[B]=ot[M]=ot[U]=ot[z]=ot[D]=ot[F]=ot[q]=ot[Z]=!0,ot[_]=ot[m]=ot[j]=ot[y]=ot[L]=ot[w]=ot[b]=ot[k]=ot[A]=ot[S]=ot[x]=ot[T]=ot[R]=ot[O]=ot[N]=!1;var at={};at[_]=at[m]=at[j]=at[L]=at[y]=at[w]=at[P]=at[B]=at[M]=at[U]=at[z]=at[A]=at[S]=at[x]=at[T]=at[R]=at[O]=at[I]=at[D]=at[F]=at[q]=at[Z]=!0,at[b]=at[k]=at[N]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,lt="object"==typeof e&&e&&e.Object===Object&&e,ft="object"==typeof self&&self&&self.Object===Object&&self,ht=lt||ft||Function("return this")(),dt=n&&!n.nodeType&&n,pt=dt&&t&&!t.nodeType&&t,vt=pt&&pt.exports===dt,gt=vt&<.process,_t=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),mt=_t&&_t.isArrayBuffer,yt=_t&&_t.isDate,wt=_t&&_t.isMap,bt=_t&&_t.isRegExp,kt=_t&&_t.isSet,Et=_t&&_t.isTypedArray;function At(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function xt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!!(null==e?0:e.length)&&Dt(e,t,0)>-1}function It(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function jt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Lt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Mt=Wt("length");function Ut(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function zt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Dt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,qt,n)}function Ft(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function qt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:p}function Wt(e){return function(t){return null==t?r:t[e]}}function $t(e){return function(t){return null==e?r:e[t]}}function Ht(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Kt(e,t){for(var n,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==r&&(n=n===r?a:n+a)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(oe,""):e}function Jt(e){return function(t){return e(t)}}function Vt(e,t){return Nt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Dt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Dt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var nn=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(e){return"\\"+st[e]}function an(e){return tt.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hn(e){return an(e)?function(e){var t=Qe.lastIndex=0;for(;Qe.test(e);)++t;return t}(e):Mt(e)}function dn(e){return an(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gn=function e(t){var n,ae=(t=null==t?ht:gn.defaults(ht.Object(),t,gn.pick(ht,rt))).Array,Ee=t.Date,Ae=t.Error,Se=t.Function,xe=t.Math,Ce=t.Object,Te=t.RegExp,Re=t.String,Oe=t.TypeError,Ie=ae.prototype,Ne=Se.prototype,je=Ce.prototype,Le=t["__core-js_shared__"],Pe=Ne.toString,Be=je.hasOwnProperty,Me=0,Ue=(n=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ze=je.toString,De=Pe.call(Ce),Fe=ht._,qe=Te("^"+Pe.call(Be).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=vt?t.Buffer:r,We=t.Symbol,$e=t.Uint8Array,He=Ze?Ze.allocUnsafe:r,Ke=un(Ce.getPrototypeOf,Ce),Ye=Ce.create,Ge=je.propertyIsEnumerable,Je=Ie.splice,Qe=We?We.isConcatSpreadable:r,tt=We?We.iterator:r,st=We?We.toStringTag:r,lt=function(){try{var e=po(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),ft=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Ee&&Ee.now!==ht.Date.now&&Ee.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,gt=xe.ceil,_t=xe.floor,Mt=Ce.getOwnPropertySymbols,$t=Ze?Ze.isBuffer:r,_n=t.isFinite,mn=Ie.join,yn=un(Ce.keys,Ce),wn=xe.max,bn=xe.min,kn=Ee.now,En=t.parseInt,An=xe.random,Sn=Ie.reverse,xn=po(t,"DataView"),Cn=po(t,"Map"),Tn=po(t,"Promise"),Rn=po(t,"Set"),On=po(t,"WeakMap"),In=po(Ce,"create"),Nn=On&&new On,jn={},Ln=Fo(xn),Pn=Fo(Cn),Bn=Fo(Tn),Mn=Fo(Rn),Un=Fo(On),zn=We?We.prototype:r,Dn=zn?zn.valueOf:r,Fn=zn?zn.toString:r;function qn(e){if(is(e)&&!Ka(e)&&!(e instanceof Hn)){if(e instanceof $n)return e;if(Be.call(e,"__wrapped__"))return qo(e)}return new $n(e)}var Zn=function(){function e(){}return function(t){if(!rs(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Wn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Vn(e){var t=this.__data__=new Yn(e);this.size=t.size}function Xn(e,t){var n=Ka(e),r=!n&&Ha(e),i=!n&&!r&&Va(e),o=!n&&!r&&!i&&hs(e),a=n||r||i||o,s=a?Yt(e.length,Re):[],u=s.length;for(var c in e)!t&&!Be.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Qn(e){var t=e.length;return t?e[Jr(0,t-1)]:r}function er(e,t){return Uo(Ii(e),cr(t,0,e.length))}function tr(e){return Uo(Ii(e))}function nr(e,t,n){(n!==r&&!Za(e[t],n)||n===r&&!(t in e))&&sr(e,t,n)}function rr(e,t,n){var i=e[t];Be.call(e,t)&&Za(i,n)&&(n!==r||t in e)||sr(e,t,n)}function ir(e,t){for(var n=e.length;n--;)if(Za(e[n][0],t))return n;return-1}function or(e,t,n,r){return pr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ar(e,t){return e&&Ni(t,Ls(t),e)}function sr(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ur(e,t){for(var n=-1,i=t.length,o=ae(i),a=null==e;++n<i;)o[n]=a?r:Rs(e,t[n]);return o}function cr(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function lr(e,t,n,i,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,i,o,a):n(e)),s!==r)return s;if(!rs(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Be.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ii(e,s)}else{var h=_o(e),d=h==k||h==E;if(Va(e))return Si(e,u);if(h==x||h==_||d&&!o){if(s=c||d?{}:yo(e),!u)return c?function(e,t){return Ni(e,go(e),t)}(e,function(e,t){return e&&Ni(t,Ps(t),e)}(s,e)):function(e,t){return Ni(e,vo(e),t)}(e,ar(s,e))}else{if(!at[h])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case j:return xi(e);case y:case w:return new r(+e);case L:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case B:case M:case U:case z:case D:case F:case q:case Z:return Ci(e,n);case A:return new r;case S:case O:return new r(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case R:return new r;case I:return i=e,Dn?Ce(Dn.call(i)):{}}var i}(e,h,u)}}a||(a=new Vn);var p=a.get(e);if(p)return p;a.set(e,s),cs(e)?e.forEach((function(r){s.add(lr(r,t,n,r,e,a))})):os(e)&&e.forEach((function(r,i){s.set(i,lr(r,t,n,i,e,a))}));var v=f?r:(l?c?ao:oo:c?Ps:Ls)(e);return xt(v||e,(function(r,i){v&&(r=e[i=r]),rr(s,i,lr(r,t,n,i,e,a))})),s}function fr(e,t,n){var i=n.length;if(null==e)return!i;for(e=Ce(e);i--;){var o=n[i],a=t[o],s=e[o];if(s===r&&!(o in e)||!a(s))return!1}return!0}function hr(e,t,n){if("function"!=typeof e)throw new Oe(i);return Lo((function(){e.apply(r,n)}),t)}function dr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Nt(t,Jt(n))),r?(o=It,a=!1):t.length>=200&&(o=Xt,a=!1,t=new Jn(t));e:for(;++i<s;){var l=e[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}qn.templateSettings={escape:V,evaluate:X,interpolate:Q,variable:"",imports:{_:qn}},qn.prototype=Wn.prototype,qn.prototype.constructor=qn,$n.prototype=Zn(Wn.prototype),$n.prototype.constructor=$n,Hn.prototype=Zn(Wn.prototype),Hn.prototype.constructor=Hn,Kn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Kn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kn.prototype.get=function(e){var t=this.__data__;if(In){var n=t[e];return n===o?r:n}return Be.call(t,e)?t[e]:r},Kn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==r:Be.call(t,e)},Kn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===r?o:t,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Je.call(t,n,1),--this.size,!0)},Yn.prototype.get=function(e){var t=this.__data__,n=ir(t,e);return n<0?r:t[n][1]},Yn.prototype.has=function(e){return ir(this.__data__,e)>-1},Yn.prototype.set=function(e,t){var n=this.__data__,r=ir(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(Cn||Yn),string:new Kn}},Gn.prototype.delete=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return fo(this,e).get(e)},Gn.prototype.has=function(e){return fo(this,e).has(e)},Gn.prototype.set=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(e){return this.__data__.set(e,o),this},Jn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Vn.prototype.get=function(e){return this.__data__.get(e)},Vn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Pi(kr),vr=Pi(Er,!0);function gr(e,t){var n=!0;return pr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function _r(e,t,n){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(u===r?s==s&&!fs(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return pr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=wo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):jt(i,s):r||(i[i.length]=s)}return i}var wr=Bi(),br=Bi(!0);function kr(e,t){return e&&wr(e,t,Ls)}function Er(e,t){return e&&br(e,t,Ls)}function Ar(e,t){return Rt(t,(function(t){return es(e[t])}))}function Sr(e,t){for(var n=0,i=(t=bi(t,e)).length;null!=e&&n<i;)e=e[Do(t[n++])];return n&&n==i?e:r}function xr(e,t,n){var r=t(e);return Ka(e)?r:jt(r,n(e))}function Cr(e){return null==e?e===r?"[object Undefined]":"[object Null]":st&&st in Ce(e)?function(e){var t=Be.call(e,st),n=e[st];try{e[st]=r;var i=!0}catch(e){}var o=ze.call(e);i&&(t?e[st]=n:delete e[st]);return o}(e):function(e){return ze.call(e)}(e)}function Tr(e,t){return e>t}function Rr(e,t){return null!=e&&Be.call(e,t)}function Or(e,t){return null!=e&&t in Ce(e)}function Ir(e,t,n){for(var i=n?It:Ot,o=e[0].length,a=e.length,s=a,u=ae(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=Nt(f,Jt(t))),c=bn(f.length,c),u[s]=!n&&(t||o>=120&&f.length>=120)?new Jn(s&&f):r}f=e[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],v=t?t(p):p;if(p=n||0!==p?p:0,!(d?Xt(d,v):i(l,v,n))){for(s=a;--s;){var g=u[s];if(!(g?Xt(g,v):i(e[s],v,n)))continue e}d&&d.push(v),l.push(p)}}return l}function Nr(e,t,n){var i=null==(e=Oo(e,t=bi(t,e)))?e:e[Do(Qo(t))];return null==i?r:At(i,e,n)}function jr(e){return is(e)&&Cr(e)==_}function Lr(e,t,n,i,o){return e===t||(null==e||null==t||!is(e)&&!is(t)?e!=e&&t!=t:function(e,t,n,i,o,a){var s=Ka(e),u=Ka(t),c=s?m:_o(e),l=u?m:_o(t),f=(c=c==_?x:c)==x,h=(l=l==_?x:l)==x,d=c==l;if(d&&Va(e)){if(!Va(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Vn),s||hs(e)?ro(e,t,n,i,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case y:case w:case S:return Za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case T:case O:return e==t+"";case A:var s=sn;case R:var u=1&r;if(s||(s=ln),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ro(s(e),s(t),r,i,o,a);return a.delete(e),l;case I:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,c,n,i,o,a);if(!(1&n)){var p=f&&Be.call(e,"__wrapped__"),v=h&&Be.call(t,"__wrapped__");if(p||v){var g=p?e.value():e,k=v?t.value():t;return a||(a=new Vn),o(g,k,n,i,a)}}if(!d)return!1;return a||(a=new Vn),function(e,t,n,i,o,a){var s=1&n,u=oo(e),c=u.length,l=oo(t).length;if(c!=l&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Be.call(t,h)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var v=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var _=e[h=u[f]],m=t[h];if(i)var y=s?i(m,_,h,t,e,a):i(_,m,h,e,t,a);if(!(y===r?_===m||o(_,m,n,i,a):y)){v=!1;break}g||(g="constructor"==h)}if(v&&!g){var w=e.constructor,b=t.constructor;w==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,n,i,o,a)}(e,t,n,i,Lr,o))}function Pr(e,t,n,i){var o=n.length,a=o,s=!i;if(null==e)return!a;for(e=Ce(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===r&&!(c in e))return!1}else{var h=new Vn;if(i)var d=i(l,f,c,e,t,h);if(!(d===r?Lr(f,l,3,i,h):d))return!1}}return!0}function Br(e){return!(!rs(e)||(t=e,Ue&&Ue in t))&&(es(e)?qe:_e).test(Fo(e));var t}function Mr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Ka(e)?Zr(e[0],e[1]):qr(e):vu(e)}function Ur(e){if(!xo(e))return yn(e);var t=[];for(var n in Ce(e))Be.call(e,n)&&"constructor"!=n&&t.push(n);return t}function zr(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Be.call(e,r))&&n.push(r);return n}function Dr(e,t){return e<t}function Fr(e,t){var n=-1,r=Ga(e)?ae(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function qr(e){var t=ho(e);return 1==t.length&&t[0][2]?To(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Zr(e,t){return Eo(e)&&Co(t)?To(Do(e),t):function(n){var i=Rs(n,e);return i===r&&i===t?Os(n,e):Lr(t,i,3)}}function Wr(e,t,n,i,o){e!==t&&wr(t,(function(a,s){if(o||(o=new Vn),rs(a))!function(e,t,n,i,o,a,s){var u=No(e,n),c=No(t,n),l=s.get(c);if(l)return void nr(e,n,l);var f=a?a(u,c,n+"",e,t,s):r,h=f===r;if(h){var d=Ka(c),p=!d&&Va(c),v=!d&&!p&&hs(c);f=c,d||p||v?Ka(u)?f=u:Ja(u)?f=Ii(u):p?(h=!1,f=Si(c,!0)):v?(h=!1,f=Ci(c,!0)):f=[]:ss(c)||Ha(c)?(f=u,Ha(u)?f=ws(u):rs(u)&&!es(u)||(f=yo(c))):h=!1}h&&(s.set(c,f),o(f,c,i,a,s),s.delete(c));nr(e,n,f)}(e,t,s,n,Wr,i,o);else{var u=i?i(No(e,s),a,s+"",e,t,o):r;u===r&&(u=a),nr(e,s,u)}}),Ps)}function $r(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:r}function Hr(e,t,n){t=t.length?Nt(t,(function(e){return Ka(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=Nt(t,Jt(lo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Fr(e,(function(e,n,i){return{criteria:Nt(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ti(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Kr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Sr(e,a);n(s,a)&&ti(o,bi(a,e),s)}return o}function Yr(e,t,n,r){var i=r?Ft:Dt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Nt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Je.call(s,u,1),Je.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Je.call(e,i,1):di(e,i)}}return e}function Jr(e,t){return e+_t(An()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=_t(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Po(Ro(e,t,au),e+"")}function Qr(e){return Qn(Zs(e))}function ei(e,t){var n=Zs(e);return Uo(n,cr(t,0,n.length))}function ti(e,t,n,i){if(!rs(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Do(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=i?i(f,c,u):r)===r&&(l=rs(f)?f:bo(t[o+1])?[]:{})}rr(u,c,l),u=u[c]}return e}var ni=Nn?function(e,t){return Nn.set(e,t),e}:au,ri=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:ru(t),writable:!0})}:au;function ii(e){return Uo(Zs(e))}function oi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ae(i);++r<i;)o[r]=e[r+t];return o}function ai(e,t){var n;return pr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function si(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!fs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ui(e,t,au,n)}function ui(e,t,n,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=fs(t),l=t===r;o<a;){var f=_t((o+a)/2),h=n(e[f]),d=h!==r,p=null===h,v=h==h,g=fs(h);if(s)var _=i||v;else _=l?v&&(i||d):u?v&&d&&(i||!p):c?v&&d&&!p&&(i||!g):!p&&!g&&(i?h<=t:h<t);_?o=f+1:a=f}return bn(a,4294967294)}function ci(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Za(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:fs(e)?p:+e}function fi(e){if("string"==typeof e)return e;if(Ka(e))return Nt(e,fi)+"";if(fs(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function hi(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=It;else if(o>=200){var c=t?null:Vi(e);if(c)return ln(c);a=!1,i=Xt,u=new Jn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function di(e,t){return null==(e=Oo(e,t=bi(t,e)))||delete e[Do(Qo(t))]}function pi(e,t,n,r){return ti(e,t,n(Sr(e,t)),r)}function vi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?oi(e,r?0:o,r?o+1:i):oi(e,r?o+1:0,r?i:o)}function gi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),n)}function _i(e,t,n){var r=e.length;if(r<2)return r?hi(e[0]):[];for(var i=-1,o=ae(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=dr(o[i]||a,e[s],t,n));return hi(yr(o,1),t,n)}function mi(e,t,n){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var u=i<a?t[i]:r;n(s,e[i],u)}return s}function yi(e){return Ja(e)?e:[]}function wi(e){return"function"==typeof e?e:au}function bi(e,t){return Ka(e)?e:Eo(e,t)?[e]:zo(bs(e))}var ki=Xr;function Ei(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:oi(e,t,n)}var Ai=ft||function(e){return ht.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ci(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ti(e,t){if(e!==t){var n=e!==r,i=null===e,o=e==e,a=fs(e),s=t!==r,u=null===t,c=t==t,l=fs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Ri(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=wn(o-a,0),l=ae(u+c),f=!r;++s<u;)l[s]=t[s];for(;++i<a;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[s++]=e[i++];return l}function Oi(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,u=-1,c=t.length,l=wn(o-s,0),f=ae(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++a<s;)(h||i<o)&&(f[d+n[a]]=e[i++]);return f}function Ii(e,t){var n=-1,r=e.length;for(t||(t=ae(r));++n<r;)t[n]=e[n];return t}function Ni(e,t,n,i){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=i?i(n[u],e[u],u,n,e):r;c===r&&(c=e[u]),o?sr(n,u,c):rr(n,u,c)}return n}function ji(e,t){return function(n,r){var i=Ka(n)?St:or,o=t?t():{};return i(n,e,lo(r,2),o)}}function Li(e){return Xr((function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:r,s=o>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(o--,a):r,s&&ko(n[0],n[1],s)&&(a=o<3?r:a,o=1),t=Ce(t);++i<o;){var u=n[i];u&&e(t,u,i,a)}return t}))}function Pi(e,t){return function(n,r){if(null==n)return n;if(!Ga(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ce(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Bi(e){return function(t,n,r){for(var i=-1,o=Ce(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Mi(e){return function(t){var n=an(t=bs(t))?dn(t):r,i=n?n[0]:t.charAt(0),o=n?Ei(n,1).join(""):t.slice(1);return i[e]()+o}}function Ui(e){return function(t){return Lt(eu(Hs(t).replace(Ve,"")),e,"")}}function zi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Zn(e.prototype),r=e.apply(n,t);return rs(r)?r:n}}function Di(e){return function(t,n,i){var o=Ce(t);if(!Ga(t)){var a=lo(n,3);t=Ls(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,i);return s>-1?o[a?t[s]:s]:r}}function Fi(e){return io((function(t){var n=t.length,o=n,a=$n.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Oe(i);if(a&&!u&&"wrapper"==uo(s))var u=new $n([],!0)}for(o=u?o:n;++o<n;){var c=uo(s=t[o]),l="wrapper"==c?so(s):r;u=l&&Ao(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&Ao(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ka(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function qi(e,t,n,i,o,a,s,u,c,f){var h=t&l,d=1&t,p=2&t,v=24&t,g=512&t,_=p?r:zi(e);return function r(){for(var l=arguments.length,m=ae(l),y=l;y--;)m[y]=arguments[y];if(v)var w=co(r),b=tn(m,w);if(i&&(m=Ri(m,i,o,v)),a&&(m=Oi(m,a,s,v)),l-=b,v&&l<f){var k=cn(m,w);return Gi(e,t,qi,r.placeholder,n,m,k,u,c,f-l)}var E=d?n:this,A=p?E[e]:e;return l=m.length,u?m=Io(m,u):g&&l>1&&m.reverse(),h&&c<l&&(m.length=c),this&&this!==ht&&this instanceof r&&(A=_||zi(A)),A.apply(E,m)}}function Zi(e,t){return function(n,r){return function(e,t,n,r){return kr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,i){var o;if(n===r&&i===r)return t;if(n!==r&&(o=n),i!==r){if(o===r)return i;"string"==typeof n||"string"==typeof i?(n=fi(n),i=fi(i)):(n=li(n),i=li(i)),o=e(n,i)}return o}}function $i(e){return io((function(t){return t=Nt(t,Jt(lo())),Xr((function(n){var r=this;return e(t,(function(e){return At(e,r,n)}))}))}))}function Hi(e,t){var n=(t=t===r?" ":fi(t)).length;if(n<2)return n?Vr(t,e):t;var i=Vr(t,gt(e/hn(t)));return an(t)?Ei(dn(i),0,e).join(""):i.slice(0,e)}function Ki(e){return function(t,n,i){return i&&"number"!=typeof i&&ko(t,n,i)&&(n=i=r),t=gs(t),n===r?(n=t,t=0):n=gs(n),function(e,t,n,r){for(var i=-1,o=wn(gt((t-e)/(n||1)),0),a=ae(o);o--;)a[r?o:++i]=e,e+=n;return a}(t,n,i=i===r?t<n?1:-1:gs(i),e)}}function Yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Gi(e,t,n,i,o,a,s,l,f,h){var d=8&t;t|=d?u:c,4&(t&=~(d?c:u))||(t&=-4);var p=[e,t,o,d?a:r,d?s:r,d?r:a,d?r:s,l,f,h],v=n.apply(r,p);return Ao(e)&&jo(v,p),v.placeholder=i,Bo(v,e,t)}function Ji(e){var t=xe[e];return function(e,n){if(e=ys(e),(n=null==n?0:bn(_s(n),292))&&_n(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vi=Rn&&1/ln(new Rn([,-0]))[1]==h?function(e){return new Rn(e)}:fu;function Xi(e){return function(t){var n=_o(t);return n==A?sn(t):n==R?fn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qi(e,t,n,o,h,d,p,v){var g=2&t;if(!g&&"function"!=typeof e)throw new Oe(i);var _=o?o.length:0;if(_||(t&=-97,o=h=r),p=p===r?p:wn(_s(p),0),v=v===r?v:_s(v),_-=h?h.length:0,t&c){var m=o,y=h;o=h=r}var w=g?r:so(e),b=[e,t,n,o,h,m,y,d,p,v];if(w&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==l&&8==n||r==l&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Ri(c,u,t[4]):u,e[4]=c?cn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Oi(c,u,t[6]):u,e[6]=c?cn(e[5],a):t[6]);(u=t[7])&&(e[7]=u);r&l&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(b,w),e=b[0],t=b[1],n=b[2],o=b[3],h=b[4],!(v=b[9]=b[9]===r?g?0:e.length:wn(b[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||t==s?function(e,t,n){var i=zi(e);return function o(){for(var a=arguments.length,s=ae(a),u=a,c=co(o);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:cn(s,c);return(a-=l.length)<n?Gi(e,t,qi,o.placeholder,r,s,l,r,r,n-a):At(this&&this!==ht&&this instanceof o?i:e,this,s)}}(e,t,v):t!=u&&33!=t||h.length?qi.apply(r,b):function(e,t,n,r){var i=1&t,o=zi(e);return function t(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=ae(c+s),f=this&&this!==ht&&this instanceof t?o:e;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return At(f,i?n:this,l)}}(e,t,n,o);else var k=function(e,t,n){var r=1&t,i=zi(e);return function t(){return(this&&this!==ht&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Bo((w?ni:jo)(k,b),e,t)}function eo(e,t,n,i){return e===r||Za(e,je[n])&&!Be.call(i,n)?t:e}function to(e,t,n,i,o,a){return rs(e)&&rs(t)&&(a.set(t,e),Wr(e,t,r,to,a),a.delete(t)),e}function no(e){return ss(e)?r:e}function ro(e,t,n,i,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var h=-1,d=!0,p=2&n?new Jn:r;for(a.set(e,t),a.set(t,e);++h<u;){var v=e[h],g=t[h];if(i)var _=s?i(g,v,h,t,e,a):i(v,g,h,e,t,a);if(_!==r){if(_)continue;d=!1;break}if(p){if(!Bt(t,(function(e,t){if(!Xt(p,t)&&(v===e||o(v,e,n,i,a)))return p.push(t)}))){d=!1;break}}else if(v!==g&&!o(v,g,n,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function io(e){return Po(Ro(e,r,Yo),e+"")}function oo(e){return xr(e,Ls,vo)}function ao(e){return xr(e,Ps,go)}var so=Nn?function(e){return Nn.get(e)}:fu;function uo(e){for(var t=e.name+"",n=jn[t],r=Be.call(jn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function co(e){return(Be.call(qn,"placeholder")?qn:e).placeholder}function lo(){var e=qn.iteratee||su;return e=e===su?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function fo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ho(e){for(var t=Ls(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Co(i)]}return t}function po(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Br(n)?n:r}var vo=Mt?function(e){return null==e?[]:(e=Ce(e),Rt(Mt(e),(function(t){return Ge.call(e,t)})))}:mu,go=Mt?function(e){for(var t=[];e;)jt(t,vo(e)),e=Ke(e);return t}:mu,_o=Cr;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Do(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ns(i)&&bo(a,i)&&(Ka(e)||Ha(e))}function yo(e){return"function"!=typeof e.constructor||xo(e)?{}:Zn(Ke(e))}function wo(e){return Ka(e)||Ha(e)||!!(Qe&&e&&e[Qe])}function bo(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function ko(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Ga(n)&&bo(t,n.length):"string"==r&&t in n)&&Za(n[t],e)}function Eo(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fs(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Ce(t))}function Ao(e){var t=uo(e),n=qn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(xn&&_o(new xn(new ArrayBuffer(1)))!=L||Cn&&_o(new Cn)!=A||Tn&&_o(Tn.resolve())!=C||Rn&&_o(new Rn)!=R||On&&_o(new On)!=N)&&(_o=function(e){var t=Cr(e),n=t==x?e.constructor:r,i=n?Fo(n):"";if(i)switch(i){case Ln:return L;case Pn:return A;case Bn:return C;case Mn:return R;case Un:return N}return t});var So=Le?es:yu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function Co(e){return e==e&&!rs(e)}function To(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Ce(n)))}}function Ro(e,t,n){return t=wn(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wn(r.length-t,0),a=ae(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=ae(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),At(e,this,s)}}function Oo(e,t){return t.length<2?e:Sr(e,oi(t,0,-1))}function Io(e,t){for(var n=e.length,i=bn(t.length,n),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,n)?o[a]:r}return e}function No(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var jo=Mo(ni),Lo=pt||function(e,t){return ht.setTimeout(e,t)},Po=Mo(ri);function Bo(e,t,n){var r=t+"";return Po(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return xt(g,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Mo(e){var t=0,n=0;return function(){var i=kn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Uo(e,t){var n=-1,i=e.length,o=i-1;for(t=t===r?i:t;++n<t;){var a=Jr(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var zo=function(e){var t=Ma(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Do(e){if("string"==typeof e||fs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Pe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof Hn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Zo=Xr((function(e,t){return Ja(e)?dr(e,yr(t,1,Ja,!0)):[]})),Wo=Xr((function(e,t){var n=Qo(t);return Ja(n)&&(n=r),Ja(e)?dr(e,yr(t,1,Ja,!0),lo(n,2)):[]})),$o=Xr((function(e,t){var n=Qo(t);return Ja(n)&&(n=r),Ja(e)?dr(e,yr(t,1,Ja,!0),r,n):[]}));function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),zt(e,lo(t,3),i)}function Ko(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return n!==r&&(o=_s(n),o=n<0?wn(i+o,0):bn(o,i-1)),zt(e,lo(t,3),o,!0)}function Yo(e){return(null==e?0:e.length)?yr(e,1):[]}function Go(e){return e&&e.length?e[0]:r}var Jo=Xr((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?Ir(t):[]})),Vo=Xr((function(e){var t=Qo(e),n=Nt(e,yi);return t===Qo(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ir(n,lo(t,2)):[]})),Xo=Xr((function(e){var t=Qo(e),n=Nt(e,yi);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,r,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:r}var ea=Xr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Yr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Gr(e,Nt(t,(function(e){return bo(e,n)?+e:e})).sort(Ti)),r}));function ra(e){return null==e?e:Sn.call(e)}var ia=Xr((function(e){return hi(yr(e,1,Ja,!0))})),oa=Xr((function(e){var t=Qo(e);return Ja(t)&&(t=r),hi(yr(e,1,Ja,!0),lo(t,2))})),aa=Xr((function(e){var t=Qo(e);return t="function"==typeof t?t:r,hi(yr(e,1,Ja,!0),r,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ja(e))return t=wn(e.length,t),!0})),Yt(t,(function(t){return Nt(e,Wt(t))}))}function ua(e,t){if(!e||!e.length)return[];var n=sa(e);return null==t?n:Nt(n,(function(e){return At(t,r,e)}))}var ca=Xr((function(e,t){return Ja(e)?dr(e,t):[]})),la=Xr((function(e){return _i(Rt(e,Ja))})),fa=Xr((function(e){var t=Qo(e);return Ja(t)&&(t=r),_i(Rt(e,Ja),lo(t,2))})),ha=Xr((function(e){var t=Qo(e);return t="function"==typeof t?t:r,_i(Rt(e,Ja),r,t)})),da=Xr(sa);var pa=Xr((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ua(e,n)}));function va(e){var t=qn(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var _a=io((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&bo(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ga,args:[o],thisArg:r}),new $n(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(o)}));var ma=ji((function(e,t,n){Be.call(e,n)?++e[n]:sr(e,n,1)}));var ya=Di(Ho),wa=Di(Ko);function ba(e,t){return(Ka(e)?xt:pr)(e,lo(t,3))}function ka(e,t){return(Ka(e)?Ct:vr)(e,lo(t,3))}var Ea=ji((function(e,t,n){Be.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Aa=Xr((function(e,t,n){var r=-1,i="function"==typeof t,o=Ga(e)?ae(e.length):[];return pr(e,(function(e){o[++r]=i?At(t,e,n):Nr(e,t,n)})),o})),Sa=ji((function(e,t,n){sr(e,n,t)}));function xa(e,t){return(Ka(e)?Nt:Fr)(e,lo(t,3))}var Ca=ji((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ta=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ko(e,t[0],t[1])?t=[]:n>2&&ko(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,yr(t,1),[])})),Ra=dt||function(){return ht.Date.now()};function Oa(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Qi(e,l,r,r,r,r,t)}function Ia(e,t){var n;if("function"!=typeof t)throw new Oe(i);return e=_s(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Na=Xr((function(e,t,n){var r=1;if(n.length){var i=cn(n,co(Na));r|=u}return Qi(e,r,t,n,i)})),ja=Xr((function(e,t,n){var r=3;if(n.length){var i=cn(n,co(ja));r|=u}return Qi(t,r,e,n,i)}));function La(e,t,n){var o,a,s,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Oe(i);function v(t){var n=o,i=a;return o=a=r,f=t,u=e.apply(i,n)}function g(e){return f=e,c=Lo(m,t),h?v(e):u}function _(e){var n=e-l;return l===r||n>=t||n<0||d&&e-f>=s}function m(){var e=Ra();if(_(e))return y(e);c=Lo(m,function(e){var n=t-(e-l);return d?bn(n,s-(e-f)):n}(e))}function y(e){return c=r,p&&o?v(e):(o=a=r,u)}function w(){var e=Ra(),n=_(e);if(o=arguments,a=this,l=e,n){if(c===r)return g(l);if(d)return Ai(c),c=Lo(m,t),v(l)}return c===r&&(c=Lo(m,t)),u}return t=ys(t)||0,rs(n)&&(h=!!n.leading,s=(d="maxWait"in n)?wn(ys(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),w.cancel=function(){c!==r&&Ai(c),f=0,o=l=a=c=r},w.flush=function(){return c===r?u:y(Ra())},w}var Pa=Xr((function(e,t){return hr(e,1,t)})),Ba=Xr((function(e,t,n){return hr(e,ys(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(i);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ma.Cache||Gn),n}function Ua(e){if("function"!=typeof e)throw new Oe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=Gn;var za=ki((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Nt(t[0],Jt(lo())):Nt(yr(t,1),Jt(lo()))).length;return Xr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return At(e,this,r)}))})),Da=Xr((function(e,t){var n=cn(t,co(Da));return Qi(e,u,r,t,n)})),Fa=Xr((function(e,t){var n=cn(t,co(Fa));return Qi(e,c,r,t,n)})),qa=io((function(e,t){return Qi(e,f,r,r,r,t)}));function Za(e,t){return e===t||e!=e&&t!=t}var Wa=Yi(Tr),$a=Yi((function(e,t){return e>=t})),Ha=jr(function(){return arguments}())?jr:function(e){return is(e)&&Be.call(e,"callee")&&!Ge.call(e,"callee")},Ka=ae.isArray,Ya=mt?Jt(mt):function(e){return is(e)&&Cr(e)==j};function Ga(e){return null!=e&&ns(e.length)&&!es(e)}function Ja(e){return is(e)&&Ga(e)}var Va=$t||yu,Xa=yt?Jt(yt):function(e){return is(e)&&Cr(e)==w};function Qa(e){if(!is(e))return!1;var t=Cr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ss(e)}function es(e){if(!rs(e))return!1;var t=Cr(e);return t==k||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ts(e){return"number"==typeof e&&e==_s(e)}function ns(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function rs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function is(e){return null!=e&&"object"==typeof e}var os=wt?Jt(wt):function(e){return is(e)&&_o(e)==A};function as(e){return"number"==typeof e||is(e)&&Cr(e)==S}function ss(e){if(!is(e)||Cr(e)!=x)return!1;var t=Ke(e);if(null===t)return!0;var n=Be.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Pe.call(n)==De}var us=bt?Jt(bt):function(e){return is(e)&&Cr(e)==T};var cs=kt?Jt(kt):function(e){return is(e)&&_o(e)==R};function ls(e){return"string"==typeof e||!Ka(e)&&is(e)&&Cr(e)==O}function fs(e){return"symbol"==typeof e||is(e)&&Cr(e)==I}var hs=Et?Jt(Et):function(e){return is(e)&&ns(e.length)&&!!ot[Cr(e)]};var ds=Yi(Dr),ps=Yi((function(e,t){return e<=t}));function vs(e){if(!e)return[];if(Ga(e))return ls(e)?dn(e):Ii(e);if(tt&&e[tt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[tt]());var t=_o(e);return(t==A?sn:t==R?ln:Zs)(e)}function gs(e){return e?(e=ys(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function _s(e){var t=gs(e),n=t%1;return t==t?n?t-n:t:0}function ms(e){return e?cr(_s(e),0,v):0}function ys(e){if("number"==typeof e)return e;if(fs(e))return p;if(rs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=ge.test(e);return n||me.test(e)?ct(e.slice(2),n?2:8):ve.test(e)?p:+e}function ws(e){return Ni(e,Ps(e))}function bs(e){return null==e?"":fi(e)}var ks=Li((function(e,t){if(xo(t)||Ga(t))Ni(t,Ls(t),e);else for(var n in t)Be.call(t,n)&&rr(e,n,t[n])})),Es=Li((function(e,t){Ni(t,Ps(t),e)})),As=Li((function(e,t,n,r){Ni(t,Ps(t),e,r)})),Ss=Li((function(e,t,n,r){Ni(t,Ls(t),e,r)})),xs=io(ur);var Cs=Xr((function(e,t){e=Ce(e);var n=-1,i=t.length,o=i>2?t[2]:r;for(o&&ko(t[0],t[1],o)&&(i=1);++n<i;)for(var a=t[n],s=Ps(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===r||Za(f,je[l])&&!Be.call(e,l))&&(e[l]=a[l])}return e})),Ts=Xr((function(e){return e.push(r,to),At(Ms,r,e)}));function Rs(e,t,n){var i=null==e?r:Sr(e,t);return i===r?n:i}function Os(e,t){return null!=e&&mo(e,t,Or)}var Is=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),e[t]=n}),ru(au)),Ns=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),Be.call(e,t)?e[t].push(n):e[t]=[n]}),lo),js=Xr(Nr);function Ls(e){return Ga(e)?Xn(e):Ur(e)}function Ps(e){return Ga(e)?Xn(e,!0):zr(e)}var Bs=Li((function(e,t,n){Wr(e,t,n)})),Ms=Li((function(e,t,n,r){Wr(e,t,n,r)})),Us=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ni(e,ao(e),n),r&&(n=lr(n,7,no));for(var i=t.length;i--;)di(n,t[i]);return n}));var zs=io((function(e,t){return null==e?{}:function(e,t){return Kr(e,t,(function(t,n){return Os(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=Nt(ao(e),(function(e){return[e]}));return t=lo(t),Kr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Xi(Ls),qs=Xi(Ps);function Zs(e){return null==e?[]:Vt(e,Ls(e))}var Ws=Ui((function(e,t,n){return t=t.toLowerCase(),e+(n?$s(t):t)}));function $s(e){return Qs(bs(e).toLowerCase())}function Hs(e){return(e=bs(e))&&e.replace(we,nn).replace(Xe,"")}var Ks=Ui((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ys=Ui((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Gs=Mi("toLowerCase");var Js=Ui((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Vs=Ui((function(e,t,n){return e+(n?" ":"")+Qs(t)}));var Xs=Ui((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Mi("toUpperCase");function eu(e,t,n){return e=bs(e),(t=n?r:t)===r?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var tu=Xr((function(e,t){try{return At(e,r,t)}catch(e){return Qa(e)?e:new Ae(e)}})),nu=io((function(e,t){return xt(t,(function(t){t=Do(t),sr(e,t,Na(e[t],e))})),e}));function ru(e){return function(){return e}}var iu=Fi(),ou=Fi(!0);function au(e){return e}function su(e){return Mr("function"==typeof e?e:lr(e,1))}var uu=Xr((function(e,t){return function(n){return Nr(n,e,t)}})),cu=Xr((function(e,t){return function(n){return Nr(e,n,t)}}));function lu(e,t,n){var r=Ls(t),i=Ar(t,r);null!=n||rs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Ar(t,Ls(t)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=es(e);return xt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Ii(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})})),e}function fu(){}var hu=$i(Nt),du=$i(Tt),pu=$i(Bt);function vu(e){return Eo(e)?Wt(Do(e)):function(e){return function(t){return Sr(t,e)}}(e)}var gu=Ki(),_u=Ki(!0);function mu(){return[]}function yu(){return!1}var wu=Wi((function(e,t){return e+t}),0),bu=Ji("ceil"),ku=Wi((function(e,t){return e/t}),1),Eu=Ji("floor");var Au,Su=Wi((function(e,t){return e*t}),1),xu=Ji("round"),Cu=Wi((function(e,t){return e-t}),0);return qn.after=function(e,t){if("function"!=typeof t)throw new Oe(i);return e=_s(e),function(){if(--e<1)return t.apply(this,arguments)}},qn.ary=Oa,qn.assign=ks,qn.assignIn=Es,qn.assignInWith=As,qn.assignWith=Ss,qn.at=xs,qn.before=Ia,qn.bind=Na,qn.bindAll=nu,qn.bindKey=ja,qn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},qn.chain=va,qn.chunk=function(e,t,n){t=(n?ko(e,t,n):t===r)?1:wn(_s(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=ae(gt(i/t));o<i;)s[a++]=oi(e,o,o+=t);return s},qn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},qn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return jt(Ka(n)?Ii(n):[n],yr(t,1))},qn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Oe(i);return[n(e[0]),e[1]]})):[],Xr((function(n){for(var r=-1;++r<t;){var i=e[r];if(At(i[0],this,n))return At(i[1],this,n)}}))},qn.conforms=function(e){return function(e){var t=Ls(e);return function(n){return fr(n,e,t)}}(lr(e,1))},qn.constant=ru,qn.countBy=ma,qn.create=function(e,t){var n=Zn(e);return null==t?n:ar(n,t)},qn.curry=function e(t,n,i){var o=Qi(t,8,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},qn.curryRight=function e(t,n,i){var o=Qi(t,s,r,r,r,r,r,n=i?r:n);return o.placeholder=e.placeholder,o},qn.debounce=La,qn.defaults=Cs,qn.defaultsDeep=Ts,qn.defer=Pa,qn.delay=Ba,qn.difference=Zo,qn.differenceBy=Wo,qn.differenceWith=$o,qn.drop=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,(t=n||t===r?1:_s(t))<0?0:t,i):[]},qn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,0,(t=i-(t=n||t===r?1:_s(t)))<0?0:t):[]},qn.dropRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0,!0):[]},qn.dropWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0):[]},qn.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&ko(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=_s(n))<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:_s(i))<0&&(i+=o),i=n>i?0:ms(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},qn.filter=function(e,t){return(Ka(e)?Rt:mr)(e,lo(t,3))},qn.flatMap=function(e,t){return yr(xa(e,t),1)},qn.flatMapDeep=function(e,t){return yr(xa(e,t),h)},qn.flatMapDepth=function(e,t,n){return n=n===r?1:_s(n),yr(xa(e,t),n)},qn.flatten=Yo,qn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,h):[]},qn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===r?1:_s(t)):[]},qn.flip=function(e){return Qi(e,512)},qn.flow=iu,qn.flowRight=ou,qn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},qn.functions=function(e){return null==e?[]:Ar(e,Ls(e))},qn.functionsIn=function(e){return null==e?[]:Ar(e,Ps(e))},qn.groupBy=Ea,qn.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},qn.intersection=Jo,qn.intersectionBy=Vo,qn.intersectionWith=Xo,qn.invert=Is,qn.invertBy=Ns,qn.invokeMap=Aa,qn.iteratee=su,qn.keyBy=Sa,qn.keys=Ls,qn.keysIn=Ps,qn.map=xa,qn.mapKeys=function(e,t){var n={};return t=lo(t,3),kr(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},qn.mapValues=function(e,t){var n={};return t=lo(t,3),kr(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},qn.matches=function(e){return qr(lr(e,1))},qn.matchesProperty=function(e,t){return Zr(e,lr(t,1))},qn.memoize=Ma,qn.merge=Bs,qn.mergeWith=Ms,qn.method=uu,qn.methodOf=cu,qn.mixin=lu,qn.negate=Ua,qn.nthArg=function(e){return e=_s(e),Xr((function(t){return $r(t,e)}))},qn.omit=Us,qn.omitBy=function(e,t){return Ds(e,Ua(lo(t)))},qn.once=function(e){return Ia(2,e)},qn.orderBy=function(e,t,n,i){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=i?r:n)||(n=null==n?[]:[n]),Hr(e,t,n))},qn.over=hu,qn.overArgs=za,qn.overEvery=du,qn.overSome=pu,qn.partial=Da,qn.partialRight=Fa,qn.partition=Ca,qn.pick=zs,qn.pickBy=Ds,qn.property=vu,qn.propertyOf=function(e){return function(t){return null==e?r:Sr(e,t)}},qn.pull=ea,qn.pullAll=ta,qn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,lo(n,2)):e},qn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Yr(e,t,r,n):e},qn.pullAt=na,qn.range=gu,qn.rangeRight=_u,qn.rearg=qa,qn.reject=function(e,t){return(Ka(e)?Rt:mr)(e,Ua(lo(t,3)))},qn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},qn.rest=function(e,t){if("function"!=typeof e)throw new Oe(i);return Xr(e,t=t===r?t:_s(t))},qn.reverse=ra,qn.sampleSize=function(e,t,n){return t=(n?ko(e,t,n):t===r)?1:_s(t),(Ka(e)?er:ei)(e,t)},qn.set=function(e,t,n){return null==e?e:ti(e,t,n)},qn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ti(e,t,n,i)},qn.shuffle=function(e){return(Ka(e)?tr:ii)(e)},qn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ko(e,t,n)?(t=0,n=i):(t=null==t?0:_s(t),n=n===r?i:_s(n)),oi(e,t,n)):[]},qn.sortBy=Ta,qn.sortedUniq=function(e){return e&&e.length?ci(e):[]},qn.sortedUniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},qn.split=function(e,t,n){return n&&"number"!=typeof n&&ko(e,t,n)&&(t=n=r),(n=n===r?v:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!us(t))&&!(t=fi(t))&&an(e)?Ei(dn(e),0,n):e.split(t,n):[]},qn.spread=function(e,t){if("function"!=typeof e)throw new Oe(i);return t=null==t?0:wn(_s(t),0),Xr((function(n){var r=n[t],i=Ei(n,0,t);return r&&jt(i,r),At(e,this,i)}))},qn.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},qn.take=function(e,t,n){return e&&e.length?oi(e,0,(t=n||t===r?1:_s(t))<0?0:t):[]},qn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?oi(e,(t=i-(t=n||t===r?1:_s(t)))<0?0:t,i):[]},qn.takeRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!1,!0):[]},qn.takeWhile=function(e,t){return e&&e.length?vi(e,lo(t,3)):[]},qn.tap=function(e,t){return t(e),e},qn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Oe(i);return rs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),La(e,t,{leading:r,maxWait:t,trailing:o})},qn.thru=ga,qn.toArray=vs,qn.toPairs=Fs,qn.toPairsIn=qs,qn.toPath=function(e){return Ka(e)?Nt(e,Do):fs(e)?[e]:Ii(zo(bs(e)))},qn.toPlainObject=ws,qn.transform=function(e,t,n){var r=Ka(e),i=r||Va(e)||hs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rs(e)&&es(o)?Zn(Ke(e)):{}}return(i?xt:kr)(e,(function(e,r,i){return t(n,e,r,i)})),n},qn.unary=function(e){return Oa(e,1)},qn.union=ia,qn.unionBy=oa,qn.unionWith=aa,qn.uniq=function(e){return e&&e.length?hi(e):[]},qn.uniqBy=function(e,t){return e&&e.length?hi(e,lo(t,2)):[]},qn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?hi(e,r,t):[]},qn.unset=function(e,t){return null==e||di(e,t)},qn.unzip=sa,qn.unzipWith=ua,qn.update=function(e,t,n){return null==e?e:pi(e,t,wi(n))},qn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:pi(e,t,wi(n),i)},qn.values=Zs,qn.valuesIn=function(e){return null==e?[]:Vt(e,Ps(e))},qn.without=ca,qn.words=eu,qn.wrap=function(e,t){return Da(wi(t),e)},qn.xor=la,qn.xorBy=fa,qn.xorWith=ha,qn.zip=da,qn.zipObject=function(e,t){return mi(e||[],t||[],rr)},qn.zipObjectDeep=function(e,t){return mi(e||[],t||[],ti)},qn.zipWith=pa,qn.entries=Fs,qn.entriesIn=qs,qn.extend=Es,qn.extendWith=As,lu(qn,qn),qn.add=wu,qn.attempt=tu,qn.camelCase=Ws,qn.capitalize=$s,qn.ceil=bu,qn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ys(n))==n?n:0),t!==r&&(t=(t=ys(t))==t?t:0),cr(ys(e),t,n)},qn.clone=function(e){return lr(e,4)},qn.cloneDeep=function(e){return lr(e,5)},qn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:r)},qn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:r)},qn.conformsTo=function(e,t){return null==t||fr(e,t,Ls(t))},qn.deburr=Hs,qn.defaultTo=function(e,t){return null==e||e!=e?t:e},qn.divide=ku,qn.endsWith=function(e,t,n){e=bs(e),t=fi(t);var i=e.length,o=n=n===r?i:cr(_s(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},qn.eq=Za,qn.escape=function(e){return(e=bs(e))&&J.test(e)?e.replace(Y,rn):e},qn.escapeRegExp=function(e){return(e=bs(e))&&ie.test(e)?e.replace(re,"\\$&"):e},qn.every=function(e,t,n){var i=Ka(e)?Tt:gr;return n&&ko(e,t,n)&&(t=r),i(e,lo(t,3))},qn.find=ya,qn.findIndex=Ho,qn.findKey=function(e,t){return Ut(e,lo(t,3),kr)},qn.findLast=wa,qn.findLastIndex=Ko,qn.findLastKey=function(e,t){return Ut(e,lo(t,3),Er)},qn.floor=Eu,qn.forEach=ba,qn.forEachRight=ka,qn.forIn=function(e,t){return null==e?e:wr(e,lo(t,3),Ps)},qn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Ps)},qn.forOwn=function(e,t){return e&&kr(e,lo(t,3))},qn.forOwnRight=function(e,t){return e&&Er(e,lo(t,3))},qn.get=Rs,qn.gt=Wa,qn.gte=$a,qn.has=function(e,t){return null!=e&&mo(e,t,Rr)},qn.hasIn=Os,qn.head=Go,qn.identity=au,qn.includes=function(e,t,n,r){e=Ga(e)?e:Zs(e),n=n&&!r?_s(n):0;var i=e.length;return n<0&&(n=wn(i+n,0)),ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Dt(e,t,n)>-1},qn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:_s(n);return i<0&&(i=wn(r+i,0)),Dt(e,t,i)},qn.inRange=function(e,t,n){return t=gs(t),n===r?(n=t,t=0):n=gs(n),function(e,t,n){return e>=bn(t,n)&&e<wn(t,n)}(e=ys(e),t,n)},qn.invoke=js,qn.isArguments=Ha,qn.isArray=Ka,qn.isArrayBuffer=Ya,qn.isArrayLike=Ga,qn.isArrayLikeObject=Ja,qn.isBoolean=function(e){return!0===e||!1===e||is(e)&&Cr(e)==y},qn.isBuffer=Va,qn.isDate=Xa,qn.isElement=function(e){return is(e)&&1===e.nodeType&&!ss(e)},qn.isEmpty=function(e){if(null==e)return!0;if(Ga(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||hs(e)||Ha(e)))return!e.length;var t=_o(e);if(t==A||t==R)return!e.size;if(xo(e))return!Ur(e).length;for(var n in e)if(Be.call(e,n))return!1;return!0},qn.isEqual=function(e,t){return Lr(e,t)},qn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Lr(e,t,r,n):!!i},qn.isError=Qa,qn.isFinite=function(e){return"number"==typeof e&&_n(e)},qn.isFunction=es,qn.isInteger=ts,qn.isLength=ns,qn.isMap=os,qn.isMatch=function(e,t){return e===t||Pr(e,t,ho(t))},qn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Pr(e,t,ho(t),n)},qn.isNaN=function(e){return as(e)&&e!=+e},qn.isNative=function(e){if(So(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(e)},qn.isNil=function(e){return null==e},qn.isNull=function(e){return null===e},qn.isNumber=as,qn.isObject=rs,qn.isObjectLike=is,qn.isPlainObject=ss,qn.isRegExp=us,qn.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=d},qn.isSet=cs,qn.isString=ls,qn.isSymbol=fs,qn.isTypedArray=hs,qn.isUndefined=function(e){return e===r},qn.isWeakMap=function(e){return is(e)&&_o(e)==N},qn.isWeakSet=function(e){return is(e)&&"[object WeakSet]"==Cr(e)},qn.join=function(e,t){return null==e?"":mn.call(e,t)},qn.kebabCase=Ks,qn.last=Qo,qn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return n!==r&&(o=(o=_s(n))<0?wn(i+o,0):bn(o,i-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):zt(e,qt,o,!0)},qn.lowerCase=Ys,qn.lowerFirst=Gs,qn.lt=ds,qn.lte=ps,qn.max=function(e){return e&&e.length?_r(e,au,Tr):r},qn.maxBy=function(e,t){return e&&e.length?_r(e,lo(t,2),Tr):r},qn.mean=function(e){return Zt(e,au)},qn.meanBy=function(e,t){return Zt(e,lo(t,2))},qn.min=function(e){return e&&e.length?_r(e,au,Dr):r},qn.minBy=function(e,t){return e&&e.length?_r(e,lo(t,2),Dr):r},qn.stubArray=mu,qn.stubFalse=yu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Su,qn.nth=function(e,t){return e&&e.length?$r(e,_s(t)):r},qn.noConflict=function(){return ht._===this&&(ht._=Fe),this},qn.noop=fu,qn.now=Ra,qn.pad=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(_t(i),n)+e+Hi(gt(i),n)},qn.padEnd=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;return t&&r<t?e+Hi(t-r,n):e},qn.padStart=function(e,t,n){e=bs(e);var r=(t=_s(t))?hn(e):0;return t&&r<t?Hi(t-r,n)+e:e},qn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),En(bs(e).replace(oe,""),t||0)},qn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ko(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=gs(e),t===r?(t=e,e=0):t=gs(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=An();return bn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Jr(e,t)},qn.reduce=function(e,t,n){var r=Ka(e)?Lt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},qn.reduceRight=function(e,t,n){var r=Ka(e)?Pt:Ht,i=arguments.length<3;return r(e,lo(t,4),n,i,vr)},qn.repeat=function(e,t,n){return t=(n?ko(e,t,n):t===r)?1:_s(t),Vr(bs(e),t)},qn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},qn.result=function(e,t,n){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=r);++i<o;){var a=null==e?r:e[Do(t[i])];a===r&&(i=o,a=n),e=es(a)?a.call(e):a}return e},qn.round=xu,qn.runInContext=e,qn.sample=function(e){return(Ka(e)?Qn:Qr)(e)},qn.size=function(e){if(null==e)return 0;if(Ga(e))return ls(e)?hn(e):e.length;var t=_o(e);return t==A||t==R?e.size:Ur(e).length},qn.snakeCase=Js,qn.some=function(e,t,n){var i=Ka(e)?Bt:ai;return n&&ko(e,t,n)&&(t=r),i(e,lo(t,3))},qn.sortedIndex=function(e,t){return si(e,t)},qn.sortedIndexBy=function(e,t,n){return ui(e,t,lo(n,2))},qn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Za(e[r],t))return r}return-1},qn.sortedLastIndex=function(e,t){return si(e,t,!0)},qn.sortedLastIndexBy=function(e,t,n){return ui(e,t,lo(n,2),!0)},qn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Za(e[n],t))return n}return-1},qn.startCase=Vs,qn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:cr(_s(n),0,e.length),t=fi(t),e.slice(n,n+t.length)==t},qn.subtract=Cu,qn.sum=function(e){return e&&e.length?Kt(e,au):0},qn.sumBy=function(e,t){return e&&e.length?Kt(e,lo(t,2)):0},qn.template=function(e,t,n){var i=qn.templateSettings;n&&ko(e,t,n)&&(t=r),e=bs(e),t=As({},t,i,eo);var o,a,s=As({},t.imports,i.imports,eo),u=Ls(s),c=Vt(s,u),l=0,f=t.interpolate||be,h="__p += '",d=Te((t.escape||be).source+"|"+f.source+"|"+(f===Q?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(Be.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(d,(function(t,n,r,i,s,u){return r||(r=i),h+=e.slice(l,u).replace(ke,on),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),h+="';\n";var v=Be.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new Ae("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(a?h.replace(W,""):h).replace($,"$1").replace(H,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=tu((function(){return Se(u,p+"return "+h).apply(r,c)}));if(g.source=h,Qa(g))throw g;return g},qn.times=function(e,t){if((e=_s(e))<1||e>d)return[];var n=v,r=bn(e,v);t=lo(t),e-=v;for(var i=Yt(r,t);++n<e;)t(n);return i},qn.toFinite=gs,qn.toInteger=_s,qn.toLength=ms,qn.toLower=function(e){return bs(e).toLowerCase()},qn.toNumber=ys,qn.toSafeInteger=function(e){return e?cr(_s(e),-9007199254740991,d):0===e?e:0},qn.toString=bs,qn.toUpper=function(e){return bs(e).toUpperCase()},qn.trim=function(e,t,n){if((e=bs(e))&&(n||t===r))return Gt(e);if(!e||!(t=fi(t)))return e;var i=dn(e),o=dn(t);return Ei(i,Qt(i,o),en(i,o)+1).join("")},qn.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===r))return e.slice(0,pn(e)+1);if(!e||!(t=fi(t)))return e;var i=dn(e);return Ei(i,0,en(i,dn(t))+1).join("")},qn.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===r))return e.replace(oe,"");if(!e||!(t=fi(t)))return e;var i=dn(e);return Ei(i,Qt(i,dn(t))).join("")},qn.truncate=function(e,t){var n=30,i="...";if(rs(t)){var o="separator"in t?t.separator:o;n="length"in t?_s(t.length):n,i="omission"in t?fi(t.omission):i}var a=(e=bs(e)).length;if(an(e)){var s=dn(e);a=s.length}if(n>=a)return e;var u=n-hn(i);if(u<1)return i;var c=s?Ei(s,0,u).join(""):e.slice(0,u);if(o===r)return c+i;if(s&&(u+=c.length-u),us(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Te(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===r?u:h)}}else if(e.indexOf(fi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},qn.unescape=function(e){return(e=bs(e))&&G.test(e)?e.replace(K,vn):e},qn.uniqueId=function(e){var t=++Me;return bs(e)+t},qn.upperCase=Xs,qn.upperFirst=Qs,qn.each=ba,qn.eachRight=ka,qn.first=Go,lu(qn,(Au={},kr(qn,(function(e,t){Be.call(qn.prototype,t)||(Au[t]=e)})),Au),{chain:!1}),qn.VERSION="4.17.21",xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qn[e].placeholder=qn})),xt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===r?1:wn(_s(n),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(n,i.__takeCount__):i.__views__.push({size:bn(n,v),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),xt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),xt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(au)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Nr(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Ua(lo(e)))},Hn.prototype.slice=function(e,t){e=_s(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=_s(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(v)},kr(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=qn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(qn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Hn,c=s[0],l=u||Ka(t),f=function(e){var t=o.apply(qn,jt([e],s));return i&&h?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,v=u&&!d;if(!a&&l){t=v?t:new Hn(this);var g=e.apply(t,s);return g.__actions__.push({func:ga,args:[f],thisArg:r}),new $n(g,h)}return p&&v?e.apply(this,s):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})})),xt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);qn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ka(i)?i:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),kr(Hn.prototype,(function(e,t){var n=qn[t];if(n){var r=n.name+"";Be.call(jn,r)||(jn[r]=[]),jn[r].push({name:t,func:n})}})),jn[qi(r,2).name]=[{name:"wrapper",func:r}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=wn(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,h=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var v=-1,g=e[c+=t];++v<f;){var _=l[v],m=_.iteratee,y=_.type,w=m(g);if(2==y)g=w;else if(!w){if(1==y)continue e;break e}}p[h++]=g}return p},qn.prototype.at=_a,qn.prototype.chain=function(){return va(this)},qn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===r&&(this.__values__=vs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},qn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var i=qo(n);i.__index__=0,i.__values__=r,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},qn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:ga,args:[ra],thisArg:r}),new $n(t,this.__chain__)}return this.thru(ra)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,tt&&(qn.prototype[tt]=function(){return this}),qn}();pt?((pt.exports=gn)._=gn,dt._=gn):ht._=gn}).call(e)})),r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}var a=i,s=o;function u(e){if(a===setTimeout)return setTimeout(e,0);if((a===i||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}"function"==typeof r.setTimeout&&(a=setTimeout),"function"==typeof r.clearTimeout&&(s=clearTimeout);var c,l=[],f=!1,h=-1;function d(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!f){var e=u(d);f=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,f=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function v(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||u(p)}function g(e,t){this.fun=e,this.array=t}g.prototype.run=function(){this.fun.apply(null,this.array)};function _(){}var m=_,y=_,w=_,b=_,k=_,E=_,A=_;var S=r.performance||{},x=S.now||S.mozNow||S.msNow||S.oNow||S.webkitNow||function(){return(new Date).getTime()};var C=new Date;var T={nextTick:v,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:m,addListener:y,once:w,off:b,removeListener:k,removeAllListeners:E,emit:A,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*x.call(S),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-C)/1e3}},R=1e3,O=60*R,I=60*O,N=24*I,j=7*N,L=365.25*N,P=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*L;case"weeks":case"week":case"w":return n*j;case"days":case"day":case"d":return n*N;case"hours":case"hour":case"hrs":case"hr":case"h":return n*I;case"minutes":case"minute":case"mins":case"min":case"m":return n*O;case"seconds":case"second":case"secs":case"sec":case"s":return n*R;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===n&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=N)return B(e,t,N,"day");if(t>=I)return B(e,t,I,"hour");if(t>=O)return B(e,t,O,"minute");if(t>=R)return B(e,t,R,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=N)return Math.round(e/N)+"d";if(t>=I)return Math.round(e/I)+"h";if(t>=O)return Math.round(e/O)+"m";if(t>=R)return Math.round(e/R)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function B(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var M=function(e){function t(e){let r,i,o,a=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=P,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},U=t((function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==T&&"env"in T&&(e=T.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=M(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}));U.formatArgs,U.save,U.load,U.useColors,U.storage,U.destroy,U.colors,U.log;var z={isatty:function(){return!1},ReadStream:function(){throw new Error("tty.ReadStream is not implemented")},WriteStream:function(){throw new Error("tty.ReadStream is not implemented")}},D=[],F=[],q="undefined"!=typeof Uint8Array?Uint8Array:Array,Z=!1;function W(){Z=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)D[t]=e[t],F[e.charCodeAt(t)]=t;F["-".charCodeAt(0)]=62,F["_".charCodeAt(0)]=63}function $(e,t,n){for(var r,i,o=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(D[(i=r)>>18&63]+D[i>>12&63]+D[i>>6&63]+D[63&i]);return o.join("")}function H(e){var t;Z||W();for(var n=e.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push($(e,s,s+a>u?u:s+a));return 1===r?(t=e[n-1],i+=D[t>>2],i+=D[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=D[t>>10],i+=D[t>>4&63],i+=D[t<<2&63],i+="="),o.push(i),o.join("")}function K(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)}function Y(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*v}var G={}.toString,J=Array.isArray||function(e){return"[object Array]"==G.call(e)};function V(){return Q.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function X(e,t){if(V()<t)throw new RangeError("Invalid typed array length");return Q.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Q.prototype:(null===e&&(e=new Q(t)),e.length=t),e}function Q(e,t,n){if(!(Q.TYPED_ARRAY_SUPPORT||this instanceof Q))return new Q(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return ne(this,e)}return ee(this,e,t,n)}function ee(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);Q.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Q.prototype:e=re(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!Q.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|ae(t,n),i=(e=X(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(oe(t)){var n=0|ie(t.length);return 0===(e=X(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?X(e,0):re(e,t);if("Buffer"===t.type&&J(t.data))return re(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function te(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ne(e,t){if(te(t),e=X(e,t<0?0:0|ie(t)),!Q.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function re(e,t){var n=t.length<0?0:0|ie(t.length);e=X(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function ie(e){if(e>=V())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+V().toString(16)+" bytes");return 0|e}function oe(e){return!(null==e||!e._isBuffer)}function ae(e,t){if(oe(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Ne(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return je(e).length;default:if(r)return Ne(e).length;t=(""+t).toLowerCase(),r=!0}}function se(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return be(this,t,n);case"utf8":case"utf-8":return me(this,t,n);case"ascii":return ye(this,t,n);case"latin1":case"binary":return we(this,t,n);case"base64":return _e(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function ue(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function ce(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=Q.from(t,r)),oe(t))return 0===t.length?-1:le(e,t,n,r,i);if("number"==typeof t)return t&=255,Q.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):le(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function le(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1;break}if(f)return o}return-1}function fe(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function he(e,t,n,r){return Le(Ne(t,e.length-n),e,n,r)}function de(e,t,n,r){return Le(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function pe(e,t,n,r){return de(e,t,n,r)}function ve(e,t,n,r){return Le(je(t),e,n,r)}function ge(e,t,n,r){return Le(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function _e(e,t,n){return 0===t&&n===e.length?H(e):H(e.slice(t,n))}function me(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}Q.TYPED_ARRAY_SUPPORT=void 0===r.TYPED_ARRAY_SUPPORT||r.TYPED_ARRAY_SUPPORT,Q.poolSize=8192,Q._augment=function(e){return e.__proto__=Q.prototype,e},Q.from=function(e,t,n){return ee(null,e,t,n)},Q.TYPED_ARRAY_SUPPORT&&(Q.prototype.__proto__=Uint8Array.prototype,Q.__proto__=Uint8Array),Q.alloc=function(e,t,n){return function(e,t,n,r){return te(t),t<=0?X(e,t):void 0!==n?"string"==typeof r?X(e,t).fill(n,r):X(e,t).fill(n):X(e,t)}(null,e,t,n)},Q.allocUnsafe=function(e){return ne(null,e)},Q.allocUnsafeSlow=function(e){return ne(null,e)},Q.isBuffer=Pe,Q.compare=function(e,t){if(!oe(e)||!oe(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},Q.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Q.concat=function(e,t){if(!J(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Q.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=Q.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!oe(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},Q.byteLength=ae,Q.prototype._isBuffer=!0,Q.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)ue(this,t,t+1);return this},Q.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)ue(this,t,t+3),ue(this,t+1,t+2);return this},Q.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)ue(this,t,t+7),ue(this,t+1,t+6),ue(this,t+2,t+5),ue(this,t+3,t+4);return this},Q.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?me(this,0,e):se.apply(this,arguments)},Q.prototype.equals=function(e){if(!oe(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Q.compare(this,e)},Q.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},Q.prototype.compare=function(e,t,n,r,i){if(!oe(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},Q.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},Q.prototype.indexOf=function(e,t,n){return ce(this,e,t,n,!0)},Q.prototype.lastIndexOf=function(e,t,n){return ce(this,e,t,n,!1)},Q.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return fe(this,e,t,n);case"utf8":case"utf-8":return he(this,e,t,n);case"ascii":return de(this,e,t,n);case"latin1":case"binary":return pe(this,e,t,n);case"base64":return ve(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},Q.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ye(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function we(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function be(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=Ie(e[o]);return i}function ke(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function Ee(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Ae(e,t,n,r,i,o){if(!oe(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Se(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function xe(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function Ce(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Te(e,t,n,r,i){return i||Ce(e,0,n,4),Y(e,t,n,r,23,4),n+4}function Re(e,t,n,r,i){return i||Ce(e,0,n,8),Y(e,t,n,r,52,8),n+8}Q.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),Q.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=Q.prototype;else{var i=t-e;n=new Q(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},Q.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Ee(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},Q.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Ee(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},Q.prototype.readUInt8=function(e,t){return t||Ee(e,1,this.length),this[e]},Q.prototype.readUInt16LE=function(e,t){return t||Ee(e,2,this.length),this[e]|this[e+1]<<8},Q.prototype.readUInt16BE=function(e,t){return t||Ee(e,2,this.length),this[e]<<8|this[e+1]},Q.prototype.readUInt32LE=function(e,t){return t||Ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Q.prototype.readUInt32BE=function(e,t){return t||Ee(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Q.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Ee(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},Q.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Ee(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},Q.prototype.readInt8=function(e,t){return t||Ee(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Q.prototype.readInt16LE=function(e,t){t||Ee(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Q.prototype.readInt16BE=function(e,t){t||Ee(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Q.prototype.readInt32LE=function(e,t){return t||Ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Q.prototype.readInt32BE=function(e,t){return t||Ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Q.prototype.readFloatLE=function(e,t){return t||Ee(e,4,this.length),K(this,e,!0,23,4)},Q.prototype.readFloatBE=function(e,t){return t||Ee(e,4,this.length),K(this,e,!1,23,4)},Q.prototype.readDoubleLE=function(e,t){return t||Ee(e,8,this.length),K(this,e,!0,52,8)},Q.prototype.readDoubleBE=function(e,t){return t||Ee(e,8,this.length),K(this,e,!1,52,8)},Q.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ae(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},Q.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Ae(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},Q.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,1,255,0),Q.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Q.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,2,65535,0),Q.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Se(this,e,t,!0),t+2},Q.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,2,65535,0),Q.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Se(this,e,t,!1),t+2},Q.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,4,4294967295,0),Q.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):xe(this,e,t,!0),t+4},Q.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,4,4294967295,0),Q.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):xe(this,e,t,!1),t+4},Q.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Ae(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},Q.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);Ae(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},Q.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,1,127,-128),Q.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Q.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,2,32767,-32768),Q.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Se(this,e,t,!0),t+2},Q.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,2,32767,-32768),Q.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Se(this,e,t,!1),t+2},Q.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,4,2147483647,-2147483648),Q.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):xe(this,e,t,!0),t+4},Q.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Ae(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Q.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):xe(this,e,t,!1),t+4},Q.prototype.writeFloatLE=function(e,t,n){return Te(this,e,t,!0,n)},Q.prototype.writeFloatBE=function(e,t,n){return Te(this,e,t,!1,n)},Q.prototype.writeDoubleLE=function(e,t,n){return Re(this,e,t,!0,n)},Q.prototype.writeDoubleBE=function(e,t,n){return Re(this,e,t,!1,n)},Q.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!Q.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},Q.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Q.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=oe(e)?e:Ne(new Q(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var Oe=/[^+\/0-9A-Za-z-_]/g;function Ie(e){return e<16?"0"+e.toString(16):e.toString(16)}function Ne(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function je(e){return function(e){var t,n,r,i,o,a;Z||W();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new q(3*s/4-o),r=o>0?s-4:s;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=F[e.charCodeAt(t)]<<18|F[e.charCodeAt(t+1)]<<12|F[e.charCodeAt(t+2)]<<6|F[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=F[e.charCodeAt(t)]<<2|F[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=F[e.charCodeAt(t)]<<10|F[e.charCodeAt(t+1)]<<4|F[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Oe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Le(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Pe(e){return null!=e&&(!!e._isBuffer||Be(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Be(e.slice(0,0))}(e))}function Be(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Me="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},Ue=/%[sdj%]/g;function ze(e){if(!tt(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(We(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(Ue,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),a=r[n];n<i;a=r[++n])Xe(a)||!it(a)?o+=" "+a:o+=" "+We(a);return o}function De(e,t){if(nt(r.process))return function(){return De(e,t).apply(this,arguments)};if(!0===T.noDeprecation)return e;var n=!1;return function(){if(!n){if(T.throwDeprecation)throw new Error(t);T.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var Fe,qe={};function Ze(e){if(nt(Fe)&&(Fe=T.env.NODE_DEBUG||""),e=e.toUpperCase(),!qe[e])if(new RegExp("\\b"+e+"\\b","i").test(Fe)){qe[e]=function(){var t=ze.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else qe[e]=function(){};return qe[e]}function We(e,t){var n={seen:[],stylize:He};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Ve(t)?n.showHidden=t:t&&dt(n,t),nt(n.showHidden)&&(n.showHidden=!1),nt(n.depth)&&(n.depth=2),nt(n.colors)&&(n.colors=!1),nt(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=$e),Ke(n,e,n.depth)}function $e(e,t){var n=We.styles[t];return n?"["+We.colors[n][0]+"m"+e+"["+We.colors[n][1]+"m":e}function He(e,t){return e}function Ke(e,t,n){if(e.customInspect&&t&&st(t.inspect)&&t.inspect!==We&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return tt(r)||(r=Ke(e,r,n)),r}var i=function(e,t){if(nt(t))return e.stylize("undefined","undefined");if(tt(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(et(t))return e.stylize(""+t,"number");if(Ve(t))return e.stylize(""+t,"boolean");if(Xe(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),at(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Ye(t);if(0===o.length){if(st(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(rt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(ot(t))return e.stylize(Date.prototype.toString.call(t),"date");if(at(t))return Ye(t)}var u,c="",l=!1,f=["{","}"];(Je(t)&&(l=!0,f=["[","]"]),st(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return rt(t)&&(c=" "+RegExp.prototype.toString.call(t)),ot(t)&&(c=" "+Date.prototype.toUTCString.call(t)),at(t)&&(c=" "+Ye(t)),0!==o.length||l&&0!=t.length?n<0?rt(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),u=l?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)pt(t,String(a))?o.push(Ge(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(Ge(e,t,n,r,i,!0))})),o}(e,t,n,a,o):o.map((function(r){return Ge(e,t,n,a,r,l)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,c,f)):f[0]+c+f[1]}function Ye(e){return"["+Error.prototype.toString.call(e)+"]"}function Ge(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),pt(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=Xe(n)?Ke(e,u.value,null):Ke(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),nt(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function Je(e){return Array.isArray(e)}function Ve(e){return"boolean"==typeof e}function Xe(e){return null===e}function Qe(e){return null==e}function et(e){return"number"==typeof e}function tt(e){return"string"==typeof e}function nt(e){return void 0===e}function rt(e){return it(e)&&"[object RegExp]"===ct(e)}function it(e){return"object"==typeof e&&null!==e}function ot(e){return it(e)&&"[object Date]"===ct(e)}function at(e){return it(e)&&("[object Error]"===ct(e)||e instanceof Error)}function st(e){return"function"==typeof e}function ut(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function ct(e){return Object.prototype.toString.call(e)}function lt(e){return e<10?"0"+e.toString(10):e.toString(10)}We.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},We.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var ft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ht(){var e=new Date,t=[lt(e.getHours()),lt(e.getMinutes()),lt(e.getSeconds())].join(":");return[e.getDate(),ft[e.getMonth()],t].join(" ")}function dt(e,t){if(!t||!it(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function pt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var vt,gt={inherits:Me,_extend:dt,log:function(){console.log("%s - %s",ht(),ze.apply(null,arguments))},isBuffer:function(e){return Q.isBuffer(e)},isPrimitive:ut,isFunction:st,isError:at,isDate:ot,isObject:it,isRegExp:rt,isUndefined:nt,isSymbol:function(e){return"symbol"==typeof e},isString:tt,isNumber:et,isNullOrUndefined:Qe,isNull:Xe,isBoolean:Ve,isArray:Je,inspect:We,deprecate:De,format:ze,debuglog:Ze};function _t(){return"/tmp"}var mt={EOL:"\n",tmpdir:_t,tmpDir:_t,networkInterfaces:function(){},getNetworkInterfaces:function(){},release:function(){return void 0!==r.navigator?r.navigator.appVersion:""},type:function(){return"Browser"},cpus:function(){return[]},totalmem:function(){return Number.MAX_VALUE},freemem:function(){return Number.MAX_VALUE},uptime:function(){return 0},loadavg:function(){return[]},hostname:function(){return void 0!==r.location?r.location.hostname:""},endianness:function(){if(void 0===vt){var e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=1,t[1]=2,258===n[0])vt="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");vt="LE"}}return vt}},yt=(e,t=T.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)};const{env:wt}=T;let bt;function kt(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Et(e,t){if(0===bt)return 0;if(yt("color=16m")||yt("color=full")||yt("color=truecolor"))return 3;if(yt("color=256"))return 2;if(e&&!t&&void 0===bt)return 0;const n=bt||0;if("dumb"===wt.TERM)return n;if("win32"===T.platform){const e=mt.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in wt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in wt))||"codeship"===wt.CI_NAME?1:n;if("TEAMCITY_VERSION"in wt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(wt.TEAMCITY_VERSION)?1:0;if("truecolor"===wt.COLORTERM)return 3;if("TERM_PROGRAM"in wt){const e=parseInt((wt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(wt.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(wt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(wt.TERM)||"COLORTERM"in wt?1:n}yt("no-color")||yt("no-colors")||yt("color=false")||yt("color=never")?bt=0:(yt("color")||yt("colors")||yt("color=true")||yt("color=always"))&&(bt=1),"FORCE_COLOR"in wt&&(bt="true"===wt.FORCE_COLOR?1:"false"===wt.FORCE_COLOR?0:0===wt.FORCE_COLOR.length?1:Math.min(parseInt(wt.FORCE_COLOR,10),3));var At={supportsColor:function(e){return kt(Et(e,e&&e.isTTY))},stdout:kt(Et(!0,z.isatty(1))),stderr:kt(Et(!0,z.isatty(2)))},St=t((function(e,t){t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return T.stderr.write(gt.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${r} [0m`;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?T.env.DEBUG=e:delete T.env.DEBUG},t.load=function(){return T.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):z.isatty(T.stderr.fd)},t.destroy=gt.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=At;e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(T.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=T.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=M(t);const{formatters:n}=e.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,gt.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,gt.inspect(e,this.inspectOpts)}}));St.init,St.log,St.formatArgs,St.save,St.load,St.useColors,St.destroy,St.colors,St.inspectOpts;var xt,Ct,Tt,Rt,Ot,It,Nt,jt,Lt,Pt,Bt=t((function(e){void 0===T||"renderer"===T.type||!0===T.browser||T.__nwjs?e.exports=U:e.exports=St}));exports.NetworkType=void 0,(xt=exports.NetworkType||(exports.NetworkType={})).none="none",xt.wifi="wifi",xt.cellular="cellular",xt.unknown="unknown",exports.PlatformType=void 0,(Ct=exports.PlatformType||(exports.PlatformType={})).wp="wp",Ct.android="android",Ct.iOS="iOS",Ct.unknown="unknown",exports.ProfileType=void 0,(Tt=exports.ProfileType||(exports.ProfileType={}))[Tt.user=1]="user",Tt[Tt.oa=0]="oa",Tt[Tt.aliasOA=2]="aliasOA",exports.ChatType=void 0,(Rt=exports.ChatType||(exports.ChatType={}))[Rt.user=1]="user",Rt[Rt.oa=0]="oa",exports.PostFeedType=void 0,(Ot=exports.PostFeedType||(exports.PostFeedType={}))[Ot.image=1]="image",Ot[Ot.link=4]="link",Ot[Ot.profile=5]="profile",exports.ShareSheetType=void 0,(It=exports.ShareSheetType||(exports.ShareSheetType={}))[It.image=1]="image",It[It.gif=11]="gif",It[It.video=12]="video",It[It.link=4]="link",It[It.oa=5]="oa",It.zmp="zmp",exports.OrientationType=void 0,(Nt=exports.OrientationType||(exports.OrientationType={}))[Nt.auto=1]="auto",Nt[Nt.portrait=2]="portrait",Nt[Nt.landscape=3]="landscape",exports.VibrateType=void 0,(jt=exports.VibrateType||(exports.VibrateType={}))[jt.oneShot=0]="oneShot",exports.NativeCode=void 0,(Lt=exports.NativeCode||(exports.NativeCode={}))[Lt.token_invalid=-2]="token_invalid",Lt[Lt.not_permission=-1]="not_permission",Lt[Lt.client_not_support=-5]="client_not_support",Lt[Lt.decode_failed=-4]="decode_failed",exports.Events=void 0,(Pt=exports.Events||(exports.Events={})).AppPaused="h5.event.paused",Pt.AppResumed="h5.event.resumed",Pt.NetworkChanged="h5.event.connection.changed",Pt.OnDataCallback="h5.event.webview.result";const Mt=e=>{const t=document.cookie;if(t){const i=t.split("; ");if(i&&i.length>0)for(var n=e.length+1,r=i.length-1;r>=0;r--){let t=i[r];if(t&&0===t.indexOf(e)&&(t=t.substring(n,t.length),t))return t=t.replace(/["']/g,""),t}}return null},Ut=e=>Mt(`${window.location.host}_`+e),zt=e=>Mt((()=>{const e=window.location.host;if(e){if(e.indexOf("zalo.me")>=0)return"zalo.me_";if(e.indexOf("baomoi.com")>=0)return"baomoi.com_";if(e.indexOf("mp3.zing.vn")>=0)return"mp3.zing.vn_";if(e.indexOf("zaloapp.com")>=0)return"zaloapp.com_"}return""})()+e),Dt="action.open.profile",Ft="action.open.inapp",qt="action.open.chat",Zt="action.open.postfeed",Wt="action.follow.oa",$t="action.unfollow.oa",Ht="action.open.sharesheet",Kt="action.request.permission.camera",Yt="action.change.title.header",Gt="action.webview.networktype",Jt="action.create.options.menu",Vt="action.create.shortcut",Xt="action.change.actionbar.leftbutton.type",Qt="action.window.close",en="action.prompt.authentication",tn="action.prompt.authentication.check_state",nn="action.get.location",rn="action.query.location.hide",on="action.show.toast",an="action.hide.keyboard",sn="action.open.phone",un="action.open.qr",cn="action.open.sms",ln="action.view.myqr",fn="action.keep.screen",hn="action.change.autorotate",dn="action.scan.ibeacon",pn="action.save.image.gallery",vn="action.open.mp",gn="action.change.actionbar",_n="action.interactive.vibration",mn="action.zbrowser.mpds",yn="action.webview.set.result",wn="action.mp.get.number",bn=["action.get.downloaded.sticker","action.report.abuse",Wt,$t,Ht,Jt,Xt,Qt,"action.zbrowser.jsbridge",nn,rn,on,ln,fn,"action.zalorun.getTrackingStatus","action.zalorun.setTrackingStatus","action.zalorun.getDayStep","action.zalorun.forceSubmitData","action.zalorun.setWeight","action.download.cate"],kn=-1400,En=-1500,An=-1401,Sn=-1403,xn={READ_MORE:"Read more at: https://miniapp.zalo.me/docs/api",LOGIN_REQUIRED:"Please login before to call this api. Read more at: https://miniapp.zalo.me/docs/api/login",LOGIN_FAILED:"Login failed.",NOT_PERMISSION:"You don't have permission to call this api",CLIENT_NOT_SUPPORT:"This API is not supported in this Zalo version",DECODE_FAILED:"Can not decode your data. Read more at: https://miniapp.zalo.me/docs/api/error"},Cn="apps/get-info",Tn={android:12100571,iOS:400,wp:0,unknown:0},Rn=new RegExp("[\\u0300-\\u036f]","g"),On=new RegExp("[đ|Đ]","g"),In=new RegExp("\\s","g"),Nn=Bt("zmp:utils:common"),jn=e=>{try{new URL(e)}catch(e){return!1}return!0},Ln=()=>navigator.userAgent||navigator.vendor||window.opera,Pn=()=>{const e=Ln().toLowerCase();return{isWP:/iemobile/.test(e),isAndroid:/android/i.test(e)&&!/iemobile/.test(e),isIOS:/iphone|ios|ipad|ipod/.test(e)&&!/iemobile/.test(e),isMobile:/android|iphone|ios|ipad|ipod|iemobile/.test(e),isZalo:/zalo/.test(e)}},Bn=e=>{const t=document.getElementsByTagName("meta");for(let n=0;n<t.length;n++)if(t[n].getAttribute("name")===e||t[n].getAttribute("property")===e)return t[n].getAttribute("content");return""},Mn=()=>{const e=Ln().toLowerCase().split("zalo")[1];if(e){return e.replace(" ","").split("/")[1]||""}return""},Un=()=>{let e=Pn();return e.isWP?exports.PlatformType.wp:e.isAndroid?exports.PlatformType.android:e.isIOS?exports.PlatformType.iOS:exports.PlatformType.unknown},zn=(e,t)=>{const n=t.toLowerCase(),r="array"===n||"array<number>"===n||"array<string>"===n;return!!("url"===n&&jn(e)||r&&("array"===n&&Array.isArray(e)||"array<number>"===n&&(e=>Array.isArray(e)&&!e.some((e=>"number"!=typeof e)))(e)||"array<string>"===n&&(e=>Array.isArray(e)&&!e.some((e=>"string"!=typeof e)))(e))||!Array.isArray(e)&&typeof e===t)},Dn=e=>null==e||e.hasOwnProperty("length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length,Fn=e=>(e=>{let t=Ut(e);return t||(t=zt(e),t)?t:Mt(e)})(e),qn=e=>{if(n.isObject(JSON)&&JSON.parse&&n.isString(e)){const t=e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");return JSON.parse(t,((e,t)=>t))}return n.isObject(e)?e:new Function("return "+e)()},Zn=e=>{if(n.isObject(JSON)&&JSON.stringify)return JSON.stringify(e);if(void 0===e)return"undefined";if(null===e)return"null";try{if("string"==typeof e||null!==e.constructor.toString().match(/string/i))return'"'+e.replace(/"/g,'\\"')+'"'}catch(e){console.log(e)}var t;if(null!==Object.prototype.toString.call(e).match(/array/i)){t=new Array;for(var r=e.length,i=0;i<r;i++)t.push(Zn(e[i]));return"["+t.join(",")+"]"}if("object"==typeof e){for(var o in t=new Array,e)t.push('"'+o+'":'+Zn(e[o]));return"{"+t.join(",")+"}"}return e.toString()},Wn=()=>{try{const e=Number(Mn()),t=Un();return e>=Tn[t]}catch(e){return!0}},$n=e=>JSON.stringify(e).replace(/"/g,'\\"').replace(/'/g,"'"),Hn=e=>{try{if(e){Nn(e);const t=e.replace(/\\/g,"").replace(/'/g,"'");return Nn("formattedValue",t,JSON.parse(t),typeof JSON.parse(t)),JSON.parse(t)}return null}catch(t){return console.log(t),e}};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,6 +13,6 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
function Et(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function At(t,e){return function(n,r){e(n,r,t)}}function St(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function xt(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Tt(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}var Rt=r((function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,o),!0;case 6:return l.fn.call(l.context,e,r,i,o,a),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,i);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}));class Ct extends Rt{constructor(){super(),this.debug=e.default("zmp:event-emitter")}static getInstance(){return Ct.instance||(Ct.instance=new Ct),Ct.instance}h5ConfirmHandleEvent(t,e,n){ZaloJavaScriptInterface.jsH5EventCallback(t,e,n||"")}on(t,e,n){this.debug(`register ${t}: ${n}`);return super.on(t,((r,i)=>{this.h5ConfirmHandleEvent(r,t,n),e(i)}),n)}once(t,e,n){this.debug(`register once ${t}: ${n}`);return super.once(t,((r,i)=>{this.h5ConfirmHandleEvent(r,t,n),e(i)}),n)}}var Ot=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}},It=Object.prototype.toString;function Nt(t){return"[object Array]"===It.call(t)}function jt(t){return void 0===t}function Lt(t){return null!==t&&"object"==typeof t}function Pt(t){if("[object Object]"!==It.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function Bt(t){return"[object Function]"===It.call(t)}function Ut(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),Nt(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}var zt={isArray:Nt,isArrayBuffer:function(t){return"[object ArrayBuffer]"===It.call(t)},isBuffer:function(t){return null!==t&&!jt(t)&&null!==t.constructor&&!jt(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:Lt,isPlainObject:Pt,isUndefined:jt,isDate:function(t){return"[object Date]"===It.call(t)},isFile:function(t){return"[object File]"===It.call(t)},isBlob:function(t){return"[object Blob]"===It.call(t)},isFunction:Bt,isStream:function(t){return Lt(t)&&Bt(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Ut,merge:function t(){var e={};function n(n,r){Pt(e[r])&&Pt(n)?e[r]=t(e[r],n):Pt(n)?e[r]=t({},n):Nt(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)Ut(arguments[r],n);return e},extend:function(t,e,n){return Ut(e,(function(e,r){t[r]=n&&"function"==typeof e?Ot(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function Mt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Dt=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(zt.isURLSearchParams(e))r=e.toString();else{var i=[];zt.forEach(e,(function(t,e){null!=t&&(zt.isArray(t)?e+="[]":t=[t],zt.forEach(t,(function(t){zt.isDate(t)?t=t.toISOString():zt.isObject(t)&&(t=JSON.stringify(t)),i.push(Mt(e)+"="+Mt(t))})))})),r=i.join("&")}if(r){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function Ft(){this.handlers=[]}Ft.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},Ft.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Ft.prototype.forEach=function(t){zt.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var qt=Ft,Zt=function(t,e,n){return zt.forEach(n,(function(n){t=n(t,e)})),t},Wt=function(t){return!(!t||!t.__CANCEL__)},Ht="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function $t(){throw new Error("setTimeout has not been defined")}function Kt(){throw new Error("clearTimeout has not been defined")}var Yt=$t,Jt=Kt;function Gt(t){if(Yt===setTimeout)return setTimeout(t,0);if((Yt===$t||!Yt)&&setTimeout)return Yt=setTimeout,setTimeout(t,0);try{return Yt(t,0)}catch(e){try{return Yt.call(null,t,0)}catch(e){return Yt.call(this,t,0)}}}"function"==typeof Ht.setTimeout&&(Yt=setTimeout),"function"==typeof Ht.clearTimeout&&(Jt=clearTimeout);var Vt,Xt=[],Qt=!1,te=-1;function ee(){Qt&&Vt&&(Qt=!1,Vt.length?Xt=Vt.concat(Xt):te=-1,Xt.length&&ne())}function ne(){if(!Qt){var t=Gt(ee);Qt=!0;for(var e=Xt.length;e;){for(Vt=Xt,Xt=[];++te<e;)Vt&&Vt[te].run();te=-1,e=Xt.length}Vt=null,Qt=!1,function(t){if(Jt===clearTimeout)return clearTimeout(t);if((Jt===Kt||!Jt)&&clearTimeout)return Jt=clearTimeout,clearTimeout(t);try{Jt(t)}catch(e){try{return Jt.call(null,t)}catch(e){return Jt.call(this,t)}}}(t)}}function re(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Xt.push(new ie(t,e)),1!==Xt.length||Qt||Gt(ne)}function ie(t,e){this.fun=t,this.array=e}ie.prototype.run=function(){this.fun.apply(null,this.array)};function oe(){}var ae=oe,se=oe,ue=oe,ce=oe,le=oe,he=oe,fe=oe;var de=Ht.performance||{},pe=de.now||de.mozNow||de.msNow||de.oNow||de.webkitNow||function(){return(new Date).getTime()};var ve=new Date;var ge={nextTick:re,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:ae,addListener:se,once:ue,off:ce,removeListener:le,removeAllListeners:he,emit:fe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*pe.call(de),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],(r-=t[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-ve)/1e3}},_e=function(t,e){zt.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))},ye=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t},me=function(t,e,n,r,i){var o=new Error(t);return ye(o,e,n,r,i)},we=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(me("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)},be=zt.isStandardBrowserEnv()?{write:function(t,e,n,r,i,o){var a=[];a.push(t+"="+encodeURIComponent(e)),zt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),zt.isString(r)&&a.push("path="+r),zt.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},ke=function(t,e){return t&&!function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e},Ee=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Ae=zt.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(e){var n=zt.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},Se=function(t){return new Promise((function(e,n){var r=t.data,i=t.headers;zt.isFormData(r)&&delete i["Content-Type"];var o=new XMLHttpRequest;if(t.auth){var a=t.auth.username||"",s=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.Authorization="Basic "+btoa(a+":"+s)}var u=ke(t.baseURL,t.url);if(o.open(t.method.toUpperCase(),Dt(u,t.params,t.paramsSerializer),!0),o.timeout=t.timeout,o.onreadystatechange=function(){if(o&&4===o.readyState&&(0!==o.status||o.responseURL&&0===o.responseURL.indexOf("file:"))){var r,i,a,s,u,c="getAllResponseHeaders"in o?(r=o.getAllResponseHeaders(),u={},r?(zt.forEach(r.split("\n"),(function(t){if(s=t.indexOf(":"),i=zt.trim(t.substr(0,s)).toLowerCase(),a=zt.trim(t.substr(s+1)),i){if(u[i]&&Ee.indexOf(i)>=0)return;u[i]="set-cookie"===i?(u[i]?u[i]:[]).concat([a]):u[i]?u[i]+", "+a:a}})),u):u):null,l={data:t.responseType&&"text"!==t.responseType?o.response:o.responseText,status:o.status,statusText:o.statusText,headers:c,config:t,request:o};we(e,n,l),o=null}},o.onabort=function(){o&&(n(me("Request aborted",t,"ECONNABORTED",o)),o=null)},o.onerror=function(){n(me("Network Error",t,null,o)),o=null},o.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(me(e,t,"ECONNABORTED",o)),o=null},zt.isStandardBrowserEnv()){var c=(t.withCredentials||Ae(u))&&t.xsrfCookieName?be.read(t.xsrfCookieName):void 0;c&&(i[t.xsrfHeaderName]=c)}if("setRequestHeader"in o&&zt.forEach(i,(function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete i[e]:o.setRequestHeader(e,t)})),zt.isUndefined(t.withCredentials)||(o.withCredentials=!!t.withCredentials),t.responseType)try{o.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&o.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){o&&(o.abort(),n(t),o=null)})),r||(r=null),o.send(r)}))},xe=[],Te=[],Re="undefined"!=typeof Uint8Array?Uint8Array:Array,Ce=!1;function Oe(){Ce=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;e<n;++e)xe[e]=t[e],Te[t.charCodeAt(e)]=e;Te["-".charCodeAt(0)]=62,Te["_".charCodeAt(0)]=63}function Ie(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(xe[(i=r)>>18&63]+xe[i>>12&63]+xe[i>>6&63]+xe[63&i]);return o.join("")}function Ne(t){var e;Ce||Oe();for(var n=t.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push(Ie(t,s,s+a>u?u:s+a));return 1===r?(e=t[n-1],i+=xe[e>>2],i+=xe[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=xe[e>>10],i+=xe[e>>4&63],i+=xe[e<<2&63],i+="="),o.push(i),o.join("")}function je(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,f=n?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)}function Le(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*v}var Pe={}.toString,Be=Array.isArray||function(t){return"[object Array]"==Pe.call(t)};function Ue(){return Me.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ze(t,e){if(Ue()<e)throw new RangeError("Invalid typed array length");return Me.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Me.prototype:(null===t&&(t=new Me(e)),t.length=e),t}function Me(t,e,n){if(!(Me.TYPED_ARRAY_SUPPORT||this instanceof Me))return new Me(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return qe(this,t)}return De(this,t,e,n)}function De(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);Me.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Me.prototype:t=Ze(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!Me.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|$e(e,n),i=(t=ze(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(He(e)){var n=0|We(e.length);return 0===(t=ze(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?ze(t,0):Ze(t,e);if("Buffer"===e.type&&Be(e.data))return Ze(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Fe(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function qe(t,e){if(Fe(e),t=ze(t,e<0?0:0|We(e)),!Me.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function Ze(t,e){var n=e.length<0?0:0|We(e.length);t=ze(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function We(t){if(t>=Ue())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ue().toString(16)+" bytes");return 0|t}function He(t){return!(null==t||!t._isBuffer)}function $e(t,e){if(He(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return mn(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return wn(t).length;default:if(r)return mn(t).length;e=(""+e).toLowerCase(),r=!0}}function Ke(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return un(this,e,n);case"utf8":case"utf-8":return on(this,e,n);case"ascii":return an(this,e,n);case"latin1":case"binary":return sn(this,e,n);case"base64":return rn(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cn(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function Ye(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Je(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=Me.from(e,r)),He(e))return 0===e.length?-1:Ge(t,e,n,r,i);if("number"==typeof e)return e&=255,Me.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Ge(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Ge(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return-1}function Ve(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function Xe(t,e,n,r){return bn(mn(e,t.length-n),t,n,r)}function Qe(t,e,n,r){return bn(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function tn(t,e,n,r){return Qe(t,e,n,r)}function en(t,e,n,r){return bn(wn(e),t,n,r)}function nn(t,e,n,r){return bn(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function rn(t,e,n){return 0===e&&n===t.length?Ne(t):Ne(t.slice(e,n))}function on(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}Me.TYPED_ARRAY_SUPPORT=void 0===Ht.TYPED_ARRAY_SUPPORT||Ht.TYPED_ARRAY_SUPPORT,Me.poolSize=8192,Me._augment=function(t){return t.__proto__=Me.prototype,t},Me.from=function(t,e,n){return De(null,t,e,n)},Me.TYPED_ARRAY_SUPPORT&&(Me.prototype.__proto__=Uint8Array.prototype,Me.__proto__=Uint8Array),Me.alloc=function(t,e,n){return function(t,e,n,r){return Fe(e),e<=0?ze(t,e):void 0!==n?"string"==typeof r?ze(t,e).fill(n,r):ze(t,e).fill(n):ze(t,e)}(null,t,e,n)},Me.allocUnsafe=function(t){return qe(null,t)},Me.allocUnsafeSlow=function(t){return qe(null,t)},Me.isBuffer=kn,Me.compare=function(t,e){if(!He(t)||!He(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},Me.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Me.concat=function(t,e){if(!Be(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Me.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=Me.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!He(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},Me.byteLength=$e,Me.prototype._isBuffer=!0,Me.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Ye(this,e,e+1);return this},Me.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Ye(this,e,e+3),Ye(this,e+1,e+2);return this},Me.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Ye(this,e,e+7),Ye(this,e+1,e+6),Ye(this,e+2,e+5),Ye(this,e+3,e+4);return this},Me.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?on(this,0,t):Ke.apply(this,arguments)},Me.prototype.equals=function(t){if(!He(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Me.compare(this,t)},Me.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},Me.prototype.compare=function(t,e,n,r,i){if(!He(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=t.slice(e,n),l=0;l<s;++l)if(u[l]!==c[l]){o=u[l],a=c[l];break}return o<a?-1:a<o?1:0},Me.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},Me.prototype.indexOf=function(t,e,n){return Je(this,t,e,n,!0)},Me.prototype.lastIndexOf=function(t,e,n){return Je(this,t,e,n,!1)},Me.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Ve(this,t,e,n);case"utf8":case"utf-8":return Xe(this,t,e,n);case"ascii":return Qe(this,t,e,n);case"latin1":case"binary":return tn(this,t,e,n);case"base64":return en(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nn(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},Me.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function an(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function sn(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function un(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=yn(t[o]);return i}function cn(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function ln(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function hn(t,e,n,r,i,o){if(!He(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function fn(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function dn(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function pn(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function vn(t,e,n,r,i){return i||pn(t,0,n,4),Le(t,e,n,r,23,4),n+4}function gn(t,e,n,r,i){return i||pn(t,0,n,8),Le(t,e,n,r,52,8),n+8}Me.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),Me.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=Me.prototype;else{var i=e-t;n=new Me(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},Me.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||ln(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},Me.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||ln(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},Me.prototype.readUInt8=function(t,e){return e||ln(t,1,this.length),this[t]},Me.prototype.readUInt16LE=function(t,e){return e||ln(t,2,this.length),this[t]|this[t+1]<<8},Me.prototype.readUInt16BE=function(t,e){return e||ln(t,2,this.length),this[t]<<8|this[t+1]},Me.prototype.readUInt32LE=function(t,e){return e||ln(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Me.prototype.readUInt32BE=function(t,e){return e||ln(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Me.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||ln(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},Me.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||ln(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},Me.prototype.readInt8=function(t,e){return e||ln(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Me.prototype.readInt16LE=function(t,e){e||ln(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},Me.prototype.readInt16BE=function(t,e){e||ln(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},Me.prototype.readInt32LE=function(t,e){return e||ln(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Me.prototype.readInt32BE=function(t,e){return e||ln(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Me.prototype.readFloatLE=function(t,e){return e||ln(t,4,this.length),je(this,t,!0,23,4)},Me.prototype.readFloatBE=function(t,e){return e||ln(t,4,this.length),je(this,t,!1,23,4)},Me.prototype.readDoubleLE=function(t,e){return e||ln(t,8,this.length),je(this,t,!0,52,8)},Me.prototype.readDoubleBE=function(t,e){return e||ln(t,8,this.length),je(this,t,!1,52,8)},Me.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||hn(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},Me.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||hn(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},Me.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,1,255,0),Me.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Me.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,2,65535,0),Me.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):fn(this,t,e,!0),e+2},Me.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,2,65535,0),Me.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):fn(this,t,e,!1),e+2},Me.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,4,4294967295,0),Me.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):dn(this,t,e,!0),e+4},Me.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,4,4294967295,0),Me.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):dn(this,t,e,!1),e+4},Me.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);hn(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},Me.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);hn(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},Me.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,1,127,-128),Me.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Me.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,2,32767,-32768),Me.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):fn(this,t,e,!0),e+2},Me.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,2,32767,-32768),Me.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):fn(this,t,e,!1),e+2},Me.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,4,2147483647,-2147483648),Me.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):dn(this,t,e,!0),e+4},Me.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||hn(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Me.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):dn(this,t,e,!1),e+4},Me.prototype.writeFloatLE=function(t,e,n){return vn(this,t,e,!0,n)},Me.prototype.writeFloatBE=function(t,e,n){return vn(this,t,e,!1,n)},Me.prototype.writeDoubleLE=function(t,e,n){return gn(this,t,e,!0,n)},Me.prototype.writeDoubleBE=function(t,e,n){return gn(this,t,e,!1,n)},Me.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!Me.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},Me.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Me.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=He(t)?t:mn(new Me(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var _n=/[^+\/0-9A-Za-z-_]/g;function yn(t){return t<16?"0"+t.toString(16):t.toString(16)}function mn(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function wn(t){return function(t){var e,n,r,i,o,a;Ce||Oe();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[s-2]?2:"="===t[s-1]?1:0,a=new Re(3*s/4-o),r=o>0?s-4:s;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)i=Te[t.charCodeAt(e)]<<18|Te[t.charCodeAt(e+1)]<<12|Te[t.charCodeAt(e+2)]<<6|Te[t.charCodeAt(e+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=Te[t.charCodeAt(e)]<<2|Te[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===o&&(i=Te[t.charCodeAt(e)]<<10|Te[t.charCodeAt(e+1)]<<4|Te[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(_n,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function bn(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function kn(t){return null!=t&&(!!t._isBuffer||En(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&En(t.slice(0,0))}(t))}function En(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var An,Sn,xn=Pn(Ht.fetch)&&Pn(Ht.ReadableStream);function Tn(t){Sn||(Sn=new Ht.XMLHttpRequest).open("GET",Ht.location.host?"/":"https://example.com");try{return Sn.responseType=t,Sn.responseType===t}catch(t){return!1}}var Rn=void 0!==Ht.ArrayBuffer,Cn=Rn&&Pn(Ht.ArrayBuffer.prototype.slice),On=Rn&&Tn("arraybuffer"),In=!xn&&Cn&&Tn("ms-stream"),Nn=!xn&&Rn&&Tn("moz-chunked-arraybuffer"),jn=Pn(Sn.overrideMimeType),Ln=Pn(Ht.VBArray);function Pn(t){return"function"==typeof t}Sn=null;var Bn="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},Un=/%[sdj%]/g;function zn(t){if(!Gn(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(qn(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(t).replace(Un,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),a=r[n];n<i;a=r[++n])Jn(a)||!Qn(a)?o+=" "+a:o+=" "+qn(a);return o}function Mn(t,e){if(Vn(Ht.process))return function(){return Mn(t,e).apply(this,arguments)};if(!0===ge.noDeprecation)return t;var n=!1;return function(){if(!n){if(ge.throwDeprecation)throw new Error(e);ge.traceDeprecation?console.trace(e):console.error(e),n=!0}return t.apply(this,arguments)}}var Dn,Fn={};function qn(t,e){var n={seen:[],stylize:Wn};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Yn(e)?n.showHidden=e:e&&or(n,e),Vn(n.showHidden)&&(n.showHidden=!1),Vn(n.depth)&&(n.depth=2),Vn(n.colors)&&(n.colors=!1),Vn(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Zn),Hn(n,t,n.depth)}function Zn(t,e){var n=qn.styles[e];return n?"["+qn.colors[n][0]+"m"+t+"["+qn.colors[n][1]+"m":t}function Wn(t,e){return t}function Hn(t,e,n){if(t.customInspect&&e&&nr(e.inspect)&&e.inspect!==qn&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return Gn(r)||(r=Hn(t,r,n)),r}var i=function(t,e){if(Vn(e))return t.stylize("undefined","undefined");if(Gn(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(r=e,"number"==typeof r)return t.stylize(""+e,"number");var r;if(Yn(e))return t.stylize(""+e,"boolean");if(Jn(e))return t.stylize("null","null")}(t,e);if(i)return i;var o=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),er(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return $n(e);if(0===o.length){if(nr(e)){var s=e.name?": "+e.name:"";return t.stylize("[Function"+s+"]","special")}if(Xn(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(tr(e))return t.stylize(Date.prototype.toString.call(e),"date");if(er(e))return $n(e)}var u,c,l="",h=!1,f=["{","}"];(u=e,Array.isArray(u)&&(h=!0,f=["[","]"]),nr(e))&&(l=" [Function"+(e.name?": "+e.name:"")+"]");return Xn(e)&&(l=" "+RegExp.prototype.toString.call(e)),tr(e)&&(l=" "+Date.prototype.toUTCString.call(e)),er(e)&&(l=" "+$n(e)),0!==o.length||h&&0!=e.length?n<0?Xn(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=h?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)ar(e,String(a))?o.push(Kn(t,e,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(Kn(t,e,n,r,i,!0))})),o}(t,e,n,a,o):o.map((function(r){return Kn(t,e,n,a,r,h)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,l,f)):f[0]+l+f[1]}function $n(t){return"["+Error.prototype.toString.call(t)+"]"}function Kn(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),ar(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=Jn(n)?Hn(t,u.value,null):Hn(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),Vn(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function Yn(t){return"boolean"==typeof t}function Jn(t){return null===t}function Gn(t){return"string"==typeof t}function Vn(t){return void 0===t}function Xn(t){return Qn(t)&&"[object RegExp]"===ir(t)}function Qn(t){return"object"==typeof t&&null!==t}function tr(t){return Qn(t)&&"[object Date]"===ir(t)}function er(t){return Qn(t)&&("[object Error]"===ir(t)||t instanceof Error)}function nr(t){return"function"==typeof t}function rr(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function ir(t){return Object.prototype.toString.call(t)}function or(t,e){if(!e||!Qn(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}function ar(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function sr(){}function ur(){ur.init.call(this)}function cr(t){return void 0===t._maxListeners?ur.defaultMaxListeners:t._maxListeners}function lr(t,e,n){if(e)t.call(n);else for(var r=t.length,i=yr(t,r),o=0;o<r;++o)i[o].call(n)}function hr(t,e,n,r){if(e)t.call(n,r);else for(var i=t.length,o=yr(t,i),a=0;a<i;++a)o[a].call(n,r)}function fr(t,e,n,r,i){if(e)t.call(n,r,i);else for(var o=t.length,a=yr(t,o),s=0;s<o;++s)a[s].call(n,r,i)}function dr(t,e,n,r,i,o){if(e)t.call(n,r,i,o);else for(var a=t.length,s=yr(t,a),u=0;u<a;++u)s[u].call(n,r,i,o)}function pr(t,e,n,r){if(e)t.apply(n,r);else for(var i=t.length,o=yr(t,i),a=0;a<i;++a)o[a].apply(n,r)}function vr(t,e,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]):(o=t._events=new sr,t._eventsCount=0),a){if("function"==typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=cr(t))&&i>0&&a.length>i){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[e]=n,++t._eventsCount;return t}function gr(t,e,n){var r=!1;function i(){t.removeListener(e,i),r||(r=!0,n.apply(t,arguments))}return i.listener=n,i}function _r(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function yr(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function mr(){this.head=null,this.tail=null,this.length=0}qn.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},qn.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},sr.prototype=Object.create(null),ur.EventEmitter=ur,ur.usingDomains=!1,ur.prototype.domain=void 0,ur.prototype._events=void 0,ur.prototype._maxListeners=void 0,ur.defaultMaxListeners=10,ur.init=function(){this.domain=null,ur.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new sr,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ur.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},ur.prototype.getMaxListeners=function(){return cr(this)},ur.prototype.emit=function(t){var e,n,r,i,o,a,s,u="error"===t;if(a=this._events)u=u&&null==a.error;else if(!u)return!1;if(s=this.domain,u){if(e=arguments[1],!s){if(e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=s,e.domainThrown=!1,s.emit("error",e),!1}if(!(n=a[t]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:lr(n,l,this);break;case 2:hr(n,l,this,arguments[1]);break;case 3:fr(n,l,this,arguments[1],arguments[2]);break;case 4:dr(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];pr(n,l,this,i)}return!0},ur.prototype.addListener=function(t,e){return vr(this,t,e,!1)},ur.prototype.on=ur.prototype.addListener,ur.prototype.prependListener=function(t,e){return vr(this,t,e,!0)},ur.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,gr(this,t,e)),this},ur.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,gr(this,t,e)),this},ur.prototype.removeListener=function(t,e){var n,r,i,o,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)0==--this._eventsCount?this._events=new sr:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===e||n[o].listener&&n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new sr,this;delete r[t]}else!function(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}(n,i);r.removeListener&&this.emit("removeListener",t,a||e)}return this},ur.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new sr,this._eventsCount=0):n[t]&&(0==--this._eventsCount?this._events=new sr:delete n[t]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new sr,this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},ur.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(e):[]},ur.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):_r.call(t,e)},ur.prototype.listenerCount=_r,ur.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},mr.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},mr.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},mr.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},mr.prototype.clear=function(){this.head=this.tail=null,this.length=0},mr.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},mr.prototype.concat=function(t){if(0===this.length)return Me.alloc(0);if(1===this.length)return this.head.data;for(var e=Me.allocUnsafe(t>>>0),n=this.head,r=0;n;)n.data.copy(e,r),r+=n.data.length,n=n.next;return e};var wr=Me.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function br(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!wr(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Er;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Ar;break;default:return void(this.write=kr)}this.charBuffer=new Me(6),this.charReceived=0,this.charLength=0}function kr(t){return t.toString(this.encoding)}function Er(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Ar(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}br.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((i=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var i;r=(e+=t.toString(this.encoding,0,r)).length-1;if((i=e.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},br.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},br.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e},Tr.ReadableState=xr;var Sr=function(t){if(Vn(Dn)&&(Dn=ge.env.NODE_DEBUG||""),t=t.toUpperCase(),!Fn[t])if(new RegExp("\\b"+t+"\\b","i").test(Dn)){Fn[t]=function(){var e=zn.apply(null,arguments);console.error("%s %d: %s",t,0,e)}}else Fn[t]=function(){};return Fn[t]}("stream");function xr(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof ti&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new mr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new br(t.encoding),this.encoding=t.encoding)}function Tr(t){if(!(this instanceof Tr))return new Tr(t);this._readableState=new xr(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),ur.call(this)}function Rr(t,e,n,r,i){var o=function(t,e){var n=null;Me.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(e,n);if(o)t.emit("error",o);else if(null===n)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,Or(t)}(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else{var u;!e.decoder||i||r||(n=e.decoder.write(n),u=!e.objectMode&&0===n.length),i||(e.reading=!1),u||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&Or(t))),function(t,e){e.readingMore||(e.readingMore=!0,re(Nr,t,e))}(t,e)}else i||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}Bn(Tr,ur),Tr.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||"string"!=typeof t||(e=e||n.defaultEncoding)!==n.encoding&&(t=Me.from(t,e),e=""),Rr(this,n,t,e,!1)},Tr.prototype.unshift=function(t){return Rr(this,this._readableState,t,"",!0)},Tr.prototype.isPaused=function(){return!1===this._readableState.flowing},Tr.prototype.setEncoding=function(t){return this._readableState.decoder=new br(t),this._readableState.encoding=t,this};function Cr(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Or(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Sr("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?re(Ir,t):Ir(t))}function Ir(t){Sr("emit readable"),t.emit("readable"),Pr(t)}function Nr(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Sr("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function jr(t){Sr("readable nexttick read 0"),t.read(0)}function Lr(t,e){e.reading||(Sr("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Pr(t),e.flowing&&!e.reading&&t.read(0)}function Pr(t){var e=t._readableState;for(Sr("flow",e.flowing);e.flowing&&null!==t.read(););}function Br(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=Me.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function Ur(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,re(zr,e,t))}function zr(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Mr(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function Dr(){}function Fr(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function qr(t,e){Object.defineProperty(this,"buffer",{get:Mn((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof ti&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===t.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?re(i,r):i(r);t._writableState.errorEmitted=!0,t.emit("error",r)}(t,n,r,e,i);else{var o=Kr(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||$r(t,n),r?re(Hr,t,n,o,i):Hr(t,n,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Gr(this)}function Zr(t){if(!(this instanceof Zr||this instanceof ti))return new Zr(t);this._writableState=new qr(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),ur.call(this)}function Wr(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function Hr(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),Jr(t,e)}function $r(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0;n;)i[a]=n,n=n.next,a+=1;Wr(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new Gr(e)}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback;if(Wr(t,e,!1,e.objectMode?1:s.length,s,u,c),n=n.next,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=n,e.bufferProcessing=!1}function Kr(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function Yr(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Jr(t,e){var n=Kr(e);return n&&(0===e.pendingcb?(Yr(t,e),e.finished=!0,t.emit("finish")):Yr(t,e)),n}function Gr(t){var e=this;this.next=null,this.entry=null,this.finish=function(n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Tr.prototype.read=function(t){Sr("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Sr("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?Ur(this):Or(this),null;if(0===(t=Cr(t,e))&&e.ended)return 0===e.length&&Ur(this),null;var r,i=e.needReadable;return Sr("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&Sr("length less than watermark",i=!0),e.ended||e.reading?Sr("reading or ended",i=!1):i&&(Sr("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Cr(n,e))),null===(r=t>0?Br(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&Ur(this)),null!==r&&this.emit("data",r),r},Tr.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Tr.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,Sr("pipe count=%d opts=%j",r.pipesCount,e);var i=!e||!1!==e.end?a:c;function o(t){Sr("onunpipe"),t===n&&c()}function a(){Sr("onend"),t.end()}r.endEmitted?re(i):n.once("end",i),t.on("unpipe",o);var s=function(t){return function(){var e=t._readableState;Sr("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Pr(t))}}(n);t.on("drain",s);var u=!1;function c(){Sr("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",s),t.removeListener("error",f),t.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",c),n.removeListener("data",h),u=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||s()}var l=!1;function h(e){Sr("ondata"),l=!1,!1!==t.write(e)||l||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==Mr(r.pipes,t))&&!u&&(Sr("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function f(e){var n;Sr("onerror",e),v(),t.removeListener("error",f),0===(n="error",t.listeners(n).length)&&t.emit("error",e)}function d(){t.removeListener("finish",p),v()}function p(){Sr("onfinish"),t.removeListener("close",d),v()}function v(){Sr("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",f),t.once("close",d),t.once("finish",p),t.emit("pipe",n),r.flowing||(Sr("pipe resume"),n.resume()),t},Tr.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=Mr(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},Tr.prototype.on=function(t,e){var n=ur.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Or(this):re(jr,this))}return n},Tr.prototype.addListener=Tr.prototype.on,Tr.prototype.resume=function(){var t=this._readableState;return t.flowing||(Sr("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,re(Lr,t,e))}(this,t)),this},Tr.prototype.pause=function(){return Sr("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Sr("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Tr.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",(function(){if(Sr("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(i){(Sr("wrapped data"),e.decoder&&(i=e.decoder.write(i)),e.objectMode&&null==i)||(e.objectMode||i&&i.length)&&(r.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){Sr("wrapped _read",e),n&&(n=!1,t.resume())},r},Tr._fromList=Br,Zr.WritableState=qr,Bn(Zr,ur),qr.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},Zr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Zr.prototype.write=function(t,e,n){var r=this._writableState,i=!1;return"function"==typeof e&&(n=e,e=null),Me.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=Dr),r.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),re(e,n)}(this,n):function(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):Me.isBuffer(n)||"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),re(r,o),i=!1),i}(this,r,t,n)&&(r.pendingcb++,i=function(t,e,n,r,i){n=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=Me.from(e,n));return e}(e,n,r),Me.isBuffer(n)&&(r="buffer");var o=e.objectMode?1:n.length;e.length+=o;var a=e.length<e.highWaterMark;a||(e.needDrain=!0);if(e.writing||e.corked){var s=e.lastBufferedRequest;e.lastBufferedRequest=new Fr(n,r,i),s?s.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Wr(t,e,!1,o,n,r,i);return a}(this,r,t,e,n)),i},Zr.prototype.cork=function(){this._writableState.corked++},Zr.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||$r(this,t))},Zr.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Zr.prototype._write=function(t,e,n){n(new Error("not implemented"))},Zr.prototype._writev=null,Zr.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,Jr(t,e),n&&(e.finished?re(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Bn(ti,Tr);for(var Vr=Object.keys(Zr.prototype),Xr=0;Xr<Vr.length;Xr++){var Qr=Vr[Xr];ti.prototype[Qr]||(ti.prototype[Qr]=Zr.prototype[Qr])}function ti(t){if(!(this instanceof ti))return new ti(t);Tr.call(this,t),Zr.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",ei)}function ei(){this.allowHalfOpen||this._writableState.ended||re(ni,this)}function ni(t){t.end()}function ri(t){this.afterTransform=function(e,n){return function(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&t.push(n);i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function ii(t){if(!(this instanceof ii))return new ii(t);ti.call(this,t),this._transformState=new ri(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){oi(e,t)})):oi(e)}))}function oi(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function ai(t){if(!(this instanceof ai))return new ai(t);ii.call(this,t)}function si(){ur.call(this)}Bn(ii,ti),ii.prototype.push=function(t,e){return this._transformState.needTransform=!1,ti.prototype.push.call(this,t,e)},ii.prototype._transform=function(t,e,n){throw new Error("Not implemented")},ii.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},ii.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Bn(ai,ii),ai.prototype._transform=function(t,e,n){n(null,t)},Bn(si,ur),si.Readable=Tr,si.Writable=Zr,si.Duplex=ti,si.Transform=ii,si.PassThrough=ai,si.Stream=si,si.prototype.pipe=function(t,e){var n=this;function r(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),t.on("drain",i),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(c(),0===ur.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",r),t.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",u),t.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",u),t.on("error",u),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t};var ui=3,ci=4;function li(t,e,n){var r,i=this;if(Tr.call(i),i._mode=n,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",(function(){ge.nextTick((function(){i.emit("close")}))})),"fetch"===n){i._fetchResponse=e,i.url=e.url,i.statusCode=e.status,i.statusMessage=e.statusText;for(var o,a,s=e.headers[Symbol.iterator]();o=(a=s.next()).value,!a.done;)i.headers[o[0].toLowerCase()]=o[1],i.rawHeaders.push(o[0],o[1]);var u=e.body.getReader();(r=function(){u.read().then((function(t){i._destroyed||(t.done?i.push(null):(i.push(new Me(t.value)),r()))}))})()}else{if(i._xhr=t,i._pos=0,i.url=t.responseURL,i.statusCode=t.status,i.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var n=e[1].toLowerCase();"set-cookie"===n?(void 0===i.headers[n]&&(i.headers[n]=[]),i.headers[n].push(e[2])):void 0!==i.headers[n]?i.headers[n]+=", "+e[2]:i.headers[n]=e[2],i.rawHeaders.push(e[1],e[2])}})),i._charset="x-user-defined",!jn){var c=i.rawHeaders["mime-type"];if(c){var l=c.match(/;\s*charset=([^;])(;|$)/);l&&(i._charset=l[1].toLowerCase())}i._charset||(i._charset="utf-8")}}}function hi(t){var e,n=this;Zr.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new Me(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var r=!0;if("disable-fetch"===t.mode)r=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!jn;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}n._mode=function(t,e){return xn&&e?"fetch":Nn?"moz-chunked-arraybuffer":In?"ms-stream":On&&t?"arraybuffer":Ln&&t?"text:vbarray":"text"}(e,r),n.on("finish",(function(){n._onFinish()}))}Bn(li,Tr),li.prototype._read=function(){},li.prototype._onXHRProgress=function(){var t=this,e=t._xhr,n=null;switch(t._mode){case"text:vbarray":if(e.readyState!==ci)break;try{n=new Ht.VBArray(e.responseBody).toArray()}catch(t){}if(null!==n){t.push(new Me(n));break}case"text":try{n=e.responseText}catch(e){t._mode="text:vbarray";break}if(n.length>t._pos){var r=n.substr(t._pos);if("x-user-defined"===t._charset){for(var i=new Me(r.length),o=0;o<r.length;o++)i[o]=255&r.charCodeAt(o);t.push(i)}else t.push(r,t._charset);t._pos=n.length}break;case"arraybuffer":if(e.readyState!==ci||!e.response)break;n=e.response,t.push(new Me(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=e.response,e.readyState!==ui||!n)break;t.push(new Me(new Uint8Array(n)));break;case"ms-stream":if(n=e.response,e.readyState!==ui)break;var a=new Ht.MSStreamReader;a.onprogress=function(){a.result.byteLength>t._pos&&(t.push(new Me(new Uint8Array(a.result.slice(t._pos)))),t._pos=a.result.byteLength)},a.onload=function(){t.push(null)},a.readAsArrayBuffer(n)}t._xhr.readyState===ci&&"ms-stream"!==t._mode&&t.push(null)},Bn(hi,Zr);var fi=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];hi.prototype.setHeader=function(t,e){var n=t.toLowerCase();-1===fi.indexOf(n)&&(this._headers[n]={name:t,value:e})},hi.prototype.getHeader=function(t){return this._headers[t.toLowerCase()].value},hi.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},hi.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e,n=t._opts,r=t._headers;if("POST"!==n.method&&"PUT"!==n.method&&"PATCH"!==n.method||(e=function(){if(void 0!==An)return An;try{new Ht.Blob([new ArrayBuffer(1)]),An=!0}catch(t){An=!1}return An}()?new Ht.Blob(t._body.map((function(t){return function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(kn(t)){for(var e=new Uint8Array(t.length),n=t.length,r=0;r<n;r++)e[r]=t[r];return e.buffer}throw new Error("Argument must be a Buffer")}(t)})),{type:(r["content-type"]||{}).value||""}):Me.concat(t._body).toString()),"fetch"===t._mode){var i=Object.keys(r).map((function(t){return[r[t].name,r[t].value]}));Ht.fetch(t._opts.url,{method:t._opts.method,headers:i,body:e,mode:"cors",credentials:n.withCredentials?"include":"same-origin"}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){t.emit("error",e)}))}else{var o=t._xhr=new Ht.XMLHttpRequest;try{o.open(t._opts.method,t._opts.url,!0)}catch(e){return void ge.nextTick((function(){t.emit("error",e)}))}"responseType"in o&&(o.responseType=t._mode.split(":")[0]),"withCredentials"in o&&(o.withCredentials=!!n.withCredentials),"text"===t._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(r).forEach((function(t){o.setRequestHeader(r[t].name,r[t].value)})),t._response=null,o.onreadystatechange=function(){switch(o.readyState){case ui:case ci:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(o.onprogress=function(){t._onXHRProgress()}),o.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{o.send(e)}catch(e){return void ge.nextTick((function(){t.emit("error",e)}))}}}},hi.prototype._onXHRProgress=function(){var t=this;(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress())},hi.prototype._connect=function(){var t=this;t._destroyed||(t._response=new li(t._xhr,t._fetchResponse,t._mode),t.emit("response",t._response))},hi.prototype._write=function(t,e,n){this._body.push(t),n()},hi.prototype.abort=hi.prototype.destroy=function(){var t=this;t._destroyed=!0,t._response&&(t._response._destroyed=!0),t._xhr&&t._xhr.abort()},hi.prototype.end=function(t,e,n){"function"==typeof t&&(n=t,t=void 0),Zr.prototype.end.call(this,t,e,n)},hi.prototype.flushHeaders=function(){},hi.prototype.setTimeout=function(){},hi.prototype.setNoDelay=function(){},hi.prototype.setSocketKeepAlive=function(){};
|
|
16
|
+
function Kn(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function Yn(e,t){return function(n,r){t(n,r,e)}}function Gn(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Jn(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Vn(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}var Xn=t((function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}));class Qn extends Xn{constructor(){super(),this.debug=Bt("zmp:event-emitter")}static getInstance(){return Qn.instance||(Qn.instance=new Qn),Qn.instance}h5ConfirmHandleEvent(e,t,n){ZaloJavaScriptInterface.jsH5EventCallback(e,t,n||"")}on(e,t,n){this.debug(`register ${e}: ${n}`);return super.on(e,((r,i)=>{this.h5ConfirmHandleEvent(r,e,n),t(i)}),n)}once(e,t,n){this.debug(`register once ${e}: ${n}`);return super.once(e,((r,i)=>{this.h5ConfirmHandleEvent(r,e,n),t(i)}),n)}}var er=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},tr=Object.prototype.toString;function nr(e){return"[object Array]"===tr.call(e)}function rr(e){return void 0===e}function ir(e){return null!==e&&"object"==typeof e}function or(e){if("[object Object]"!==tr.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function ar(e){return"[object Function]"===tr.call(e)}function sr(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),nr(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var ur={isArray:nr,isArrayBuffer:function(e){return"[object ArrayBuffer]"===tr.call(e)},isBuffer:function(e){return null!==e&&!rr(e)&&null!==e.constructor&&!rr(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:ir,isPlainObject:or,isUndefined:rr,isDate:function(e){return"[object Date]"===tr.call(e)},isFile:function(e){return"[object File]"===tr.call(e)},isBlob:function(e){return"[object Blob]"===tr.call(e)},isFunction:ar,isStream:function(e){return ir(e)&&ar(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:sr,merge:function e(){var t={};function n(n,r){or(t[r])&&or(n)?t[r]=e(t[r],n):or(n)?t[r]=e({},n):nr(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)sr(arguments[r],n);return t},extend:function(e,t,n){return sr(t,(function(t,r){e[r]=n&&"function"==typeof t?er(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}};function cr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var lr=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(ur.isURLSearchParams(t))r=t.toString();else{var i=[];ur.forEach(t,(function(e,t){null!=e&&(ur.isArray(e)?t+="[]":e=[e],ur.forEach(e,(function(e){ur.isDate(e)?e=e.toISOString():ur.isObject(e)&&(e=JSON.stringify(e)),i.push(cr(t)+"="+cr(e))})))})),r=i.join("&")}if(r){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e};function fr(){this.handlers=[]}fr.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},fr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},fr.prototype.forEach=function(e){ur.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var hr,dr,pr=fr,vr=function(e,t,n){return ur.forEach(n,(function(n){e=n(e,t)})),e},gr=function(e){return!(!e||!e.__CANCEL__)},_r=function(e,t){ur.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},mr=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e},yr=function(e,t,n,r,i){var o=new Error(e);return mr(o,t,n,r,i)},wr=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(yr("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)},br=ur.isStandardBrowserEnv()?{write:function(e,t,n,r,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),ur.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),ur.isString(r)&&a.push("path="+r),ur.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},kr=function(e,t){return e&&!function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},Er=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Ar=ur.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=ur.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},Sr=function(e){return new Promise((function(t,n){var r=e.data,i=e.headers;ur.isFormData(r)&&delete i["Content-Type"];var o=new XMLHttpRequest;if(e.auth){var a=e.auth.username||"",s=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(a+":"+s)}var u=kr(e.baseURL,e.url);if(o.open(e.method.toUpperCase(),lr(u,e.params,e.paramsSerializer),!0),o.timeout=e.timeout,o.onreadystatechange=function(){if(o&&4===o.readyState&&(0!==o.status||o.responseURL&&0===o.responseURL.indexOf("file:"))){var r,i,a,s,u,c="getAllResponseHeaders"in o?(r=o.getAllResponseHeaders(),u={},r?(ur.forEach(r.split("\n"),(function(e){if(s=e.indexOf(":"),i=ur.trim(e.substr(0,s)).toLowerCase(),a=ur.trim(e.substr(s+1)),i){if(u[i]&&Er.indexOf(i)>=0)return;u[i]="set-cookie"===i?(u[i]?u[i]:[]).concat([a]):u[i]?u[i]+", "+a:a}})),u):u):null,l={data:e.responseType&&"text"!==e.responseType?o.response:o.responseText,status:o.status,statusText:o.statusText,headers:c,config:e,request:o};wr(t,n,l),o=null}},o.onabort=function(){o&&(n(yr("Request aborted",e,"ECONNABORTED",o)),o=null)},o.onerror=function(){n(yr("Network Error",e,null,o)),o=null},o.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(yr(t,e,"ECONNABORTED",o)),o=null},ur.isStandardBrowserEnv()){var c=(e.withCredentials||Ar(u))&&e.xsrfCookieName?br.read(e.xsrfCookieName):void 0;c&&(i[e.xsrfHeaderName]=c)}if("setRequestHeader"in o&&ur.forEach(i,(function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete i[t]:o.setRequestHeader(t,e)})),ur.isUndefined(e.withCredentials)||(o.withCredentials=!!e.withCredentials),e.responseType)try{o.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&o.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&o.upload&&o.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){o&&(o.abort(),n(e),o=null)})),r||(r=null),o.send(r)}))},xr=Pr(r.fetch)&&Pr(r.ReadableStream);function Cr(e){dr||(dr=new r.XMLHttpRequest).open("GET",r.location.host?"/":"https://example.com");try{return dr.responseType=e,dr.responseType===e}catch(e){return!1}}var Tr=void 0!==r.ArrayBuffer,Rr=Tr&&Pr(r.ArrayBuffer.prototype.slice),Or=Tr&&Cr("arraybuffer"),Ir=!xr&&Rr&&Cr("ms-stream"),Nr=!xr&&Tr&&Cr("moz-chunked-arraybuffer"),jr=Pr(dr.overrideMimeType),Lr=Pr(r.VBArray);function Pr(e){return"function"==typeof e}function Br(){}function Mr(){Mr.init.call(this)}function Ur(e){return void 0===e._maxListeners?Mr.defaultMaxListeners:e._maxListeners}function zr(e,t,n){if(t)e.call(n);else for(var r=e.length,i=Kr(e,r),o=0;o<r;++o)i[o].call(n)}function Dr(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=Kr(e,i),a=0;a<i;++a)o[a].call(n,r)}function Fr(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=Kr(e,o),s=0;s<o;++s)a[s].call(n,r,i)}function qr(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=Kr(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}function Zr(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=Kr(e,i),a=0;a<i;++a)o[a].apply(n,r)}function Wr(e,t,n,r){var i,o,a,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]):(o=e._events=new Br,e._eventsCount=0),a){if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),!a.warned&&(i=Ur(e))&&i>0&&a.length>i){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,"function"==typeof console.warn?console.warn(s):console.log(s)}}else a=o[t]=n,++e._eventsCount;return e}function $r(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function Hr(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function Kr(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function Yr(){this.head=null,this.tail=null,this.length=0}dr=null,Br.prototype=Object.create(null),Mr.EventEmitter=Mr,Mr.usingDomains=!1,Mr.prototype.domain=void 0,Mr.prototype._events=void 0,Mr.prototype._maxListeners=void 0,Mr.defaultMaxListeners=10,Mr.init=function(){this.domain=null,Mr.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Br,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Mr.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Mr.prototype.getMaxListeners=function(){return Ur(this)},Mr.prototype.emit=function(e){var t,n,r,i,o,a,s,u="error"===e;if(a=this._events)u=u&&null==a.error;else if(!u)return!1;if(s=this.domain,u){if(t=arguments[1],!s){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=a[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:zr(n,l,this);break;case 2:Dr(n,l,this,arguments[1]);break;case 3:Fr(n,l,this,arguments[1],arguments[2]);break;case 4:qr(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];Zr(n,l,this,i)}return!0},Mr.prototype.addListener=function(e,t){return Wr(this,e,t,!1)},Mr.prototype.on=Mr.prototype.addListener,Mr.prototype.prependListener=function(e,t){return Wr(this,e,t,!0)},Mr.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,$r(this,e,t)),this},Mr.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,$r(this,e,t)),this},Mr.prototype.removeListener=function(e,t){var n,r,i,o,a;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new Br:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Br,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,a||t)}return this},Mr.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Br,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new Br:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Br,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},Mr.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},Mr.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Hr.call(e,t)},Mr.prototype.listenerCount=Hr,Mr.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},Yr.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Yr.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Yr.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Yr.prototype.clear=function(){this.head=this.tail=null,this.length=0},Yr.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},Yr.prototype.concat=function(e){if(0===this.length)return Q.alloc(0);if(1===this.length)return this.head.data;for(var t=Q.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var Gr=Q.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Jr(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Gr(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Xr;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Qr;break;default:return void(this.write=Vr)}this.charBuffer=new Q(6),this.charReceived=0,this.charLength=0}function Vr(e){return e.toString(this.encoding)}function Xr(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Qr(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Jr.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if((i=t.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},Jr.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},Jr.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t},ni.ReadableState=ti;var ei=Ze("stream");function ti(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Ri&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Yr,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Jr(e.encoding),this.encoding=e.encoding)}function ni(e){if(!(this instanceof ni))return new ni(e);this._readableState=new ti(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Mr.call(this)}function ri(e,t,n,r,i){var o=function(e,t){var n=null;Q.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,oi(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&oi(e))),function(e,t){t.readingMore||(t.readingMore=!0,v(si,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}Me(ni,Mr),ni.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=Q.from(e,t),t=""),ri(this,n,e,t,!1)},ni.prototype.unshift=function(e){return ri(this,this._readableState,e,"",!0)},ni.prototype.isPaused=function(){return!1===this._readableState.flowing},ni.prototype.setEncoding=function(e){return this._readableState.decoder=new Jr(e),this._readableState.encoding=e,this};function ii(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function oi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(ei("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?v(ai,e):ai(e))}function ai(e){ei("emit readable"),e.emit("readable"),li(e)}function si(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(ei("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function ui(e){ei("readable nexttick read 0"),e.read(0)}function ci(e,t){t.reading||(ei("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),li(e),t.flowing&&!t.reading&&e.read(0)}function li(e){var t=e._readableState;for(ei("flow",t.flowing);t.flowing&&null!==e.read(););}function fi(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=Q.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function hi(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,v(di,t,e))}function di(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function pi(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function vi(){}function gi(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function _i(e,t){Object.defineProperty(this,"buffer",{get:De((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Ri&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?v(i,r):i(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=ki(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||bi(e,n),r?v(wi,e,n,o,i):wi(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Si(this)}function mi(e){if(!(this instanceof mi||this instanceof Ri))return new mi(e);this._writableState=new _i(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),Mr.call(this)}function yi(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function wi(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Ai(e,t)}function bi(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var a=0;n;)i[a]=n,n=n.next,a+=1;yi(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Si(t)}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback;if(yi(e,t,!1,t.objectMode?1:s.length,s,u,c),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function ki(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Ei(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Ai(e,t){var n=ki(t);return n&&(0===t.pendingcb?(Ei(e,t),t.finished=!0,e.emit("finish")):Ei(e,t)),n}function Si(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}ni.prototype.read=function(e){ei("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return ei("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?hi(this):oi(this),null;if(0===(e=ii(e,t))&&t.ended)return 0===t.length&&hi(this),null;var r,i=t.needReadable;return ei("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&ei("length less than watermark",i=!0),t.ended||t.reading?ei("reading or ended",i=!1):i&&(ei("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ii(n,t))),null===(r=e>0?fi(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&hi(this)),null!==r&&this.emit("data",r),r},ni.prototype._read=function(e){this.emit("error",new Error("not implemented"))},ni.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,ei("pipe count=%d opts=%j",r.pipesCount,t);var i=!t||!1!==t.end?a:c;function o(e){ei("onunpipe"),e===n&&c()}function a(){ei("onend"),e.end()}r.endEmitted?v(i):n.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;ei("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,li(e))}}(n);e.on("drain",s);var u=!1;function c(){ei("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",h),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",c),n.removeListener("data",f),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function f(t){ei("ondata"),l=!1,!1!==e.write(t)||l||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==pi(r.pipes,e))&&!u&&(ei("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function h(t){ei("onerror",t),g(),e.removeListener("error",h),0===function(e,t){return e.listeners(t).length}(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),g()}function p(){ei("onfinish"),e.removeListener("close",d),g()}function g(){ei("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(ei("pipe resume"),n.resume()),e},ni.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=pi(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},ni.prototype.on=function(e,t){var n=Mr.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&oi(this):v(ui,this))}return n},ni.prototype.addListener=ni.prototype.on,ni.prototype.resume=function(){var e=this._readableState;return e.flowing||(ei("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,v(ci,e,t))}(this,e)),this},ni.prototype.pause=function(){return ei("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(ei("pause"),this._readableState.flowing=!1,this.emit("pause")),this},ni.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(ei("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){(ei("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){ei("wrapped _read",t),n&&(n=!1,e.resume())},r},ni._fromList=fi,mi.WritableState=_i,Me(mi,Mr),_i.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},mi.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},mi.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),Q.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=vi),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),v(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):Q.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),v(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=Q.from(t,n));return t}(t,n,r),Q.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var a=t.length<t.highWaterMark;a||(t.needDrain=!0);if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new gi(n,r,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else yi(e,t,!1,o,n,r,i);return a}(this,r,e,t,n)),i},mi.prototype.cork=function(){this._writableState.corked++},mi.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||bi(this,e))},mi.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},mi.prototype._write=function(e,t,n){n(new Error("not implemented"))},mi.prototype._writev=null,mi.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,Ai(e,t),n&&(t.finished?v(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Me(Ri,ni);for(var xi=Object.keys(mi.prototype),Ci=0;Ci<xi.length;Ci++){var Ti=xi[Ci];Ri.prototype[Ti]||(Ri.prototype[Ti]=mi.prototype[Ti])}function Ri(e){if(!(this instanceof Ri))return new Ri(e);ni.call(this,e),mi.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Oi)}function Oi(){this.allowHalfOpen||this._writableState.ended||v(Ii,this)}function Ii(e){e.end()}function Ni(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function ji(e){if(!(this instanceof ji))return new ji(e);Ri.call(this,e),this._transformState=new Ni(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Li(t,e)})):Li(t)}))}function Li(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function Pi(e){if(!(this instanceof Pi))return new Pi(e);ji.call(this,e)}function Bi(){Mr.call(this)}Me(ji,Ri),ji.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ri.prototype.push.call(this,e,t)},ji.prototype._transform=function(e,t,n){throw new Error("Not implemented")},ji.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},ji.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Me(Pi,ji),Pi.prototype._transform=function(e,t,n){n(null,e)},Me(Bi,Mr),Bi.Readable=ni,Bi.Writable=mi,Bi.Duplex=Ri,Bi.Transform=ji,Bi.PassThrough=Pi,Bi.Stream=Bi,Bi.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",a),n.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===Mr.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e};var Mi=3,Ui=4;function zi(e,t,n){var r,i=this;if(ni.call(i),i._mode=n,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",(function(){T.nextTick((function(){i.emit("close")}))})),"fetch"===n){i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText;for(var o,a,s=t.headers[Symbol.iterator]();o=(a=s.next()).value,!a.done;)i.headers[o[0].toLowerCase()]=o[1],i.rawHeaders.push(o[0],o[1]);var u=t.body.getReader();(r=function(){u.read().then((function(e){i._destroyed||(e.done?i.push(null):(i.push(new Q(e.value)),r()))}))})()}else{if(i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===i.headers[n]&&(i.headers[n]=[]),i.headers[n].push(t[2])):void 0!==i.headers[n]?i.headers[n]+=", "+t[2]:i.headers[n]=t[2],i.rawHeaders.push(t[1],t[2])}})),i._charset="x-user-defined",!jr){var c=i.rawHeaders["mime-type"];if(c){var l=c.match(/;\s*charset=([^;])(;|$)/);l&&(i._charset=l[1].toLowerCase())}i._charset||(i._charset="utf-8")}}}function Di(e){var t,n=this;mi.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new Q(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!jr;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return xr&&t?"fetch":Nr?"moz-chunked-arraybuffer":Ir?"ms-stream":Or&&e?"arraybuffer":Lr&&e?"text:vbarray":"text"}(t,r),n.on("finish",(function(){n._onFinish()}))}Me(zi,ni),zi.prototype._read=function(){},zi.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==Ui)break;try{n=new r.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new Q(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var i=n.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new Q(i.length),a=0;a<i.length;a++)o[a]=255&i.charCodeAt(a);e.push(o)}else e.push(i,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==Ui||!t.response)break;n=t.response,e.push(new Q(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==Mi||!n)break;e.push(new Q(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==Mi)break;var s=new r.MSStreamReader;s.onprogress=function(){s.result.byteLength>e._pos&&(e.push(new Q(new Uint8Array(s.result.slice(e._pos)))),e._pos=s.result.byteLength)},s.onload=function(){e.push(null)},s.readAsArrayBuffer(n)}e._xhr.readyState===Ui&&"ms-stream"!==e._mode&&e.push(null)},Me(Di,mi);var Fi=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];Di.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===Fi.indexOf(n)&&(this._headers[n]={name:e,value:t})},Di.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},Di.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},Di.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,n=e._opts,i=e._headers;if("POST"!==n.method&&"PUT"!==n.method&&"PATCH"!==n.method||(t=function(){if(void 0!==hr)return hr;try{new r.Blob([new ArrayBuffer(1)]),hr=!0}catch(e){hr=!1}return hr}()?new r.Blob(e._body.map((function(e){return function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(Pe(e)){for(var t=new Uint8Array(e.length),n=e.length,r=0;r<n;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}(e)})),{type:(i["content-type"]||{}).value||""}):Q.concat(e._body).toString()),"fetch"===e._mode){var o=Object.keys(i).map((function(e){return[i[e].name,i[e].value]}));r.fetch(e._opts.url,{method:e._opts.method,headers:o,body:t,mode:"cors",credentials:n.withCredentials?"include":"same-origin"}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){e.emit("error",t)}))}else{var a=e._xhr=new r.XMLHttpRequest;try{a.open(e._opts.method,e._opts.url,!0)}catch(t){return void T.nextTick((function(){e.emit("error",t)}))}"responseType"in a&&(a.responseType=e._mode.split(":")[0]),"withCredentials"in a&&(a.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(i).forEach((function(e){a.setRequestHeader(i[e].name,i[e].value)})),e._response=null,a.onreadystatechange=function(){switch(a.readyState){case Mi:case Ui:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(a.onprogress=function(){e._onXHRProgress()}),a.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{a.send(t)}catch(t){return void T.nextTick((function(){e.emit("error",t)}))}}}},Di.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},Di.prototype._connect=function(){var e=this;e._destroyed||(e._response=new zi(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},Di.prototype._write=function(e,t,n){this._body.push(e),n()},Di.prototype.abort=Di.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},Di.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),mi.prototype.end.call(this,e,t,n)},Di.prototype.flushHeaders=function(){},Di.prototype.setTimeout=function(){},Di.prototype.setNoDelay=function(){},Di.prototype.setSocketKeepAlive=function(){};
|
|
17
17
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
18
|
-
var di=/[^\x20-\x7E]/,pi=/[\x2E\u3002\uFF0E\uFF61]/g,vi={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},gi=Math.floor,_i=String.fromCharCode;function yi(t){throw new RangeError(vi[t])}function mi(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function wi(t,e,n){var r=0;for(t=n?gi(t/700):t>>1,t+=gi(t/e);t>455;r+=36)t=gi(t/35);return gi(r+36*t/(t+38))}function bi(t){return function(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]);var i=function(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}((t=t.replace(pi,".")).split("."),e).join(".");return r+i}(t,(function(t){return di.test(t)?"xn--"+function(t){var e,n,r,i,o,a,s,u,c,l,h,f,d,p,v,g=[];for(f=(t=function(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}(t)).length,e=128,n=0,o=72,a=0;a<f;++a)(h=t[a])<128&&g.push(_i(h));for(r=i=g.length,i&&g.push("-");r<f;){for(s=2147483647,a=0;a<f;++a)(h=t[a])>=e&&h<s&&(s=h);for(s-e>gi((2147483647-n)/(d=r+1))&&yi("overflow"),n+=(s-e)*d,e=s,a=0;a<f;++a)if((h=t[a])<e&&++n>2147483647&&yi("overflow"),h==e){for(u=n,c=36;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=36)v=u-l,p=36-l,g.push(_i(mi(l+v%p,0))),u=gi(v/p);g.push(_i(mi(u,0))),o=wi(n,d,r==i),n=0,++r}++n,++e}return g.join("")}(t):t}))}function ki(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Ei=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function Ai(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}}function Si(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var xi=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e};function Ti(t,e,n,r){e=e||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(e);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var c,l,h,f,d=t[u].replace(o,"%20"),p=d.indexOf(n);p>=0?(c=d.substr(0,p),l=d.substr(p+1)):(c=d,l=""),h=decodeURIComponent(c),f=decodeURIComponent(l),ki(i,h)?Ei(i[h])?i[h].push(f):i[h]=[i[h],f]:i[h]=f}return i}var Ri={parse:qi,resolve:function(t,e){return qi(t,!1,!0).resolve(e)},resolveObject:function(t,e){return t?qi(t,!1,!0).resolveObject(e):e},format:function(t){Gn(t)&&(t=Zi({},t));return Wi(t)},Url:Ci};function Ci(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Oi=/^([a-z0-9.+-]+:)/i,Ii=/:[0-9]*$/,Ni=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ji=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Li=["'"].concat(ji),Pi=["%","/","?",";","#"].concat(Li),Bi=["/","?","#"],Ui=/^[+a-z0-9A-Z_-]{0,63}$/,zi=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Mi={javascript:!0,"javascript:":!0},Di={javascript:!0,"javascript:":!0},Fi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function qi(t,e,n){if(t&&Qn(t)&&t instanceof Ci)return t;var r=new Ci;return r.parse(t,e,n),r}function Zi(t,e,n,r){if(!Gn(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),o=-1!==i&&i<e.indexOf("#")?"?":"#",a=e.split(o);a[0]=a[0].replace(/\\/g,"/");var s=e=a.join(o);if(s=s.trim(),!r&&1===e.split("#").length){var u=Ni.exec(s);if(u)return t.path=s,t.href=s,t.pathname=u[1],u[2]?(t.search=u[2],t.query=n?Ti(t.search.substr(1)):t.search.substr(1)):n&&(t.search="",t.query={}),t}var c,l,h,f,d=Oi.exec(s);if(d){var p=(d=d[0]).toLowerCase();t.protocol=p,s=s.substr(d.length)}if(r||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===s.substr(0,2);!v||d&&Di[d]||(s=s.substr(2),t.slashes=!0)}if(!Di[d]&&(v||d&&!Fi[d])){var g,_,y=-1;for(c=0;c<Bi.length;c++)-1!==(l=s.indexOf(Bi[c]))&&(-1===y||l<y)&&(y=l);for(-1!==(_=-1===y?s.lastIndexOf("@"):s.lastIndexOf("@",y))&&(g=s.slice(0,_),s=s.slice(_+1),t.auth=decodeURIComponent(g)),y=-1,c=0;c<Pi.length;c++)-1!==(l=s.indexOf(Pi[c]))&&(-1===y||l<y)&&(y=l);-1===y&&(y=s.length),t.host=s.slice(0,y),s=s.slice(y),Hi(t),t.hostname=t.hostname||"";var m="["===t.hostname[0]&&"]"===t.hostname[t.hostname.length-1];if(!m){var w=t.hostname.split(/\./);for(c=0,h=w.length;c<h;c++){var b=w[c];if(b&&!b.match(Ui)){for(var k="",E=0,A=b.length;E<A;E++)b.charCodeAt(E)>127?k+="x":k+=b[E];if(!k.match(Ui)){var S=w.slice(0,c),x=w.slice(c+1),T=b.match(zi);T&&(S.push(T[1]),x.unshift(T[2])),x.length&&(s="/"+x.join(".")+s),t.hostname=S.join(".");break}}}}t.hostname.length>255?t.hostname="":t.hostname=t.hostname.toLowerCase(),m||(t.hostname=bi(t.hostname)),f=t.port?":"+t.port:"";var R=t.hostname||"";t.host=R+f,t.href+=t.host,m&&(t.hostname=t.hostname.substr(1,t.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Mi[p])for(c=0,h=Li.length;c<h;c++){var C=Li[c];if(-1!==s.indexOf(C)){var O=encodeURIComponent(C);O===C&&(O=escape(C)),s=s.split(C).join(O)}}var I=s.indexOf("#");-1!==I&&(t.hash=s.substr(I),s=s.slice(0,I));var N=s.indexOf("?");if(-1!==N?(t.search=s.substr(N),t.query=s.substr(N+1),n&&(t.query=Ti(t.query)),s=s.slice(0,N)):n&&(t.search="",t.query={}),s&&(t.pathname=s),Fi[p]&&t.hostname&&!t.pathname&&(t.pathname="/"),t.pathname||t.search){f=t.pathname||"";var j=t.search||"";t.path=f+j}return t.href=Wi(t),t}function Wi(t){var e=t.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var n=t.protocol||"",r=t.pathname||"",i=t.hash||"",o=!1,a="";t.host?o=e+t.host:t.hostname&&(o=e+(-1===t.hostname.indexOf(":")?t.hostname:"["+this.hostname+"]"),t.port&&(o+=":"+t.port)),t.query&&Qn(t.query)&&Object.keys(t.query).length&&(a=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Si(xi(t),(function(r){var i=encodeURIComponent(Ai(r))+n;return Ei(t[r])?Si(t[r],(function(t){return i+encodeURIComponent(Ai(t))})).join(e):i+encodeURIComponent(Ai(t[r]))})).join(e):r?encodeURIComponent(Ai(r))+n+encodeURIComponent(Ai(t)):""}(t.query));var s=t.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),t.slashes||(!n||Fi[n])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),n+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+i}function Hi(t){var e=t.host,n=Ii.exec(e);n&&(":"!==(n=n[0])&&(t.port=n.substr(1)),e=e.substr(0,e.length-n.length)),e&&(t.hostname=e)}function $i(t,e){"string"==typeof t&&(t=qi(t));var n=-1===Ht.location.protocol.search(/^https?:$/)?"http:":"",r=t.protocol||n,i=t.hostname||t.host,o=t.port,a=t.path||"/";i&&-1!==i.indexOf(":")&&(i="["+i+"]"),t.url=(i?r+"//"+i:"")+(o?":"+o:"")+a,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var s=new hi(t);return e&&s.on("response",e),s}function Ki(){}Ci.prototype.parse=function(t,e,n){return Zi(this,t,e,n)},Ci.prototype.format=function(){return Wi(this)},Ci.prototype.resolve=function(t){return this.resolveObject(qi(t,!1,!0)).format()},Ci.prototype.resolveObject=function(t){if(Gn(t)){var e=new Ci;e.parse(t,!1,!0),t=e}for(var n,r=new Ci,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(r[c]=t[c])}return Fi[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!Fi[t.protocol]){for(var l=Object.keys(t),h=0;h<l.length;h++){var f=l[h];r[f]=t[f]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||Di[t.protocol])r.pathname=t.pathname;else{for(n=(t.pathname||"").split("/");n.length&&!(t.host=n.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var d=r.pathname||"",p=r.search||"";r.path=d+p}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v,g=r.pathname&&"/"===r.pathname.charAt(0),_=t.host||t.pathname&&"/"===t.pathname.charAt(0),y=_||g||r.host&&t.pathname,m=y,w=r.pathname&&r.pathname.split("/")||[],b=r.protocol&&!Fi[r.protocol];if(n=t.pathname&&t.pathname.split("/")||[],b&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===n[0]?n[0]=t.host:n.unshift(t.host)),t.host=null),y=y&&(""===n[0]||""===w[0])),_)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,w=n;else if(n.length)w||(w=[]),w.pop(),w=w.concat(n),r.search=t.search,r.query=t.query;else if(null!=t.search)return b&&(r.hostname=r.host=w.shift(),(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),r.search=t.search,r.query=t.query,Jn(r.pathname)&&Jn(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=w.slice(-1)[0],E=(r.host||t.host||w.length>1)&&("."===k||".."===k)||""===k,A=0,S=w.length;S>=0;S--)"."===(k=w[S])?w.splice(S,1):".."===k?(w.splice(S,1),A++):A&&(w.splice(S,1),A--);if(!y&&!m)for(;A--;A)w.unshift("..");!y||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),E&&"/"!==w.join("/").substr(-1)&&w.push("");var x=""===w[0]||w[0]&&"/"===w[0].charAt(0);return b&&(r.hostname=r.host=x?"":w.length?w.shift():"",(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),(y=y||r.host&&w.length)&&!x&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),Jn(r.pathname)&&Jn(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Ci.prototype.parseHost=function(){return Hi(this)},Ki.defaultMaxSockets=4;var Yi={request:$i,get:function(t,e){var n=$i(t,e);return n.end(),n},Agent:Ki,METHODS:["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],STATUS_CODES:{100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}};function Ji(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}var Gi,Vi=Object.prototype.hasOwnProperty,Xi=Object.keys||function(t){var e=[];for(var n in t)Vi.call(t,n)&&e.push(n);return e},Qi=Array.prototype.slice;function to(){return void 0!==Gi?Gi:Gi="foo"===function(){}.name}function eo(t){return Object.prototype.toString.call(t)}function no(t){return!kn(t)&&("function"==typeof Ht.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function ro(t,e){t||lo(t,!0,e,"==",ho)}var io,oo=/\s*function\s+([^\(\s]*)\s*/;function ao(t){if(nr(t)){if(to())return t.name;var e=t.toString().match(oo);return e&&e[1]}}function so(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return uo(co(t.actual),128)+" "+t.operator+" "+uo(co(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||lo;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=ao(e),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}}function uo(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function co(t){if(to()||!nr(t))return qn(t);var e=ao(t);return"[Function"+(e?": "+e:"")+"]"}function lo(t,e,n,r,i){throw new so({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function ho(t,e){t||lo(t,!0,e,"==",ho)}function fo(t,e,n,r){if(t===e)return!0;if(kn(t)&&kn(e))return 0===Ji(t,e);if(tr(t)&&tr(e))return t.getTime()===e.getTime();if(Xn(t)&&Xn(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(no(t)&&no(e)&&eo(t)===eo(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===Ji(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(kn(t)!==kn(e))return!1;var i=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==i&&i===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(rr(t)||rr(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=po(t),o=po(e);if(i&&!o||!i&&o)return!1;if(i)return fo(t=Qi.call(t),e=Qi.call(e),n);var a,s,u=Xi(t),c=Xi(e);if(u.length!==c.length)return!1;for(u.sort(),c.sort(),s=u.length-1;s>=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(!fo(t[a=u[s]],e[a],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function po(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function vo(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function go(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&lo(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!t&&i&&!n;if((!t&&er(i)&&o&&vo(i,n)||a)&&lo(i,n,"Got unwanted exception"+r),t&&i&&n&&!vo(i,n)||!t&&i)throw i}ro.AssertionError=so,Bn(so,Error),ro.fail=lo,ro.ok=ho,ro.equal=function t(e,n,r){e!=n&&lo(e,n,r,"==",t)},ro.notEqual=function t(e,n,r){e==n&&lo(e,n,r,"!=",t)},ro.deepEqual=function t(e,n,r){fo(e,n,!1)||lo(e,n,r,"deepEqual",t)},ro.deepStrictEqual=function t(e,n,r){fo(e,n,!0)||lo(e,n,r,"deepStrictEqual",t)},ro.notDeepEqual=function t(e,n,r){fo(e,n,!1)&&lo(e,n,r,"notDeepEqual",t)},ro.notDeepStrictEqual=function t(e,n,r){fo(e,n,!0)&&lo(e,n,r,"notDeepStrictEqual",t)},ro.strictEqual=function t(e,n,r){e!==n&&lo(e,n,r,"===",t)},ro.notStrictEqual=function t(e,n,r){e===n&&lo(e,n,r,"!==",t)},ro.throws=function(t,e,n){go(!0,t,e,n)},ro.doesNotThrow=function(t,e,n){go(!1,t,e,n)},ro.ifError=function(t){if(t)throw t};var _o=function(){if(!io)try{io=e.default("follow-redirects")}catch(t){io=function(){}}io.apply(null,arguments)},yo=Ri.URL,mo=si.Writable,wo=["abort","aborted","connect","error","socket","timeout"],bo=Object.create(null);wo.forEach((function(t){bo[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}}));var ko=Oo("ERR_FR_REDIRECTION_FAILURE",""),Eo=Oo("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ao=Oo("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),So=Oo("ERR_STREAM_WRITE_AFTER_END","write after end");function xo(t,e){mo.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(t){n._processResponse(t)},this._performRequest()}function To(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach((function(r){var i=r+":",o=n[i]=t[r],a=e[r]=Object.create(o);Object.defineProperties(a,{request:{value:function(t,r,o){if("string"==typeof t){var a=t;try{t=function(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};""!==t.port&&(e.port=Number(t.port));return e}(new yo(a))}catch(e){t=Ri.parse(a)}}else o=r,r=t,t={protocol:i};return"function"==typeof r&&(o=r,r=null),(r=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t,r)).nativeProtocols=n,ro.equal(r.protocol,i,"protocol mismatch"),_o("options",r),new xo(r,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(t,e,n){var r=a.request(t,e,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),e}function Ro(){}function Co(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n}function Oo(t,e){function n(t){Error.captureStackTrace(this,this.constructor),this.message=t||e}return n.prototype=new Error,n.prototype.constructor=n,n.prototype.name="Error ["+t+"]",n.prototype.code=t,n}function Io(t){for(var e=0;e<wo.length;e++)t.removeListener(wo[e],bo[wo[e]]);t.on("error",Ro),t.abort()}xo.prototype=Object.create(mo.prototype),xo.prototype.abort=function(){Io(this._currentRequest),this.emit("abort")},xo.prototype.write=function(t,e,n){if(this._ending)throw new So;if(!("string"==typeof t||"object"==typeof t&&"length"in t))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof e&&(n=e,e=null),0!==t.length?this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new Ao),this.abort()):n&&n()},xo.prototype.end=function(t,e,n){if("function"==typeof t?(n=t,t=e=null):"function"==typeof e&&(n=e,e=null),t){var r=this,i=this._currentRequest;this.write(t,e,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},xo.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)},xo.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)},xo.prototype.setTimeout=function(t,e){var n=this;function r(e){e.setTimeout(t),e.removeListener("timeout",e.destroy),e.addListener("timeout",e.destroy)}function i(e){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),t),r(e)}function o(){clearTimeout(this._timeout),e&&n.removeListener("timeout",e),this.socket||n._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.once("response",o),this.once("error",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(t){xo.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}})),["aborted","connection","socket"].forEach((function(t){Object.defineProperty(xo.prototype,t,{get:function(){return this._currentRequest[t]}})})),xo.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}},xo.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(e){if(this._options.agents){var n=t.substr(0,t.length-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=Ri.format(this._options),r._redirectable=this;for(var i=0;i<wo.length;i++)r.on(wo[i],bo[wo[i]]);if(this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function t(e){if(r===a._currentRequest)if(e)a.emit("error",e);else if(o<s.length){var n=s[o++];r.finished||r.write(n.data,n.encoding,t)}else a._ended&&r.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+t))},xo.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var n=t.headers.location;if(n&&!1!==this._options.followRedirects&&e>=300&&e<400){if(Io(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Eo);((301===e||302===e)&&"POST"===this._options.method||303===e&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Co(/^content-/i,this._options.headers));var r=Co(/^host$/i,this._options.headers)||Ri.parse(this._currentUrl).hostname,i=Ri.resolve(this._currentUrl,n);_o("redirecting to",i),this._isRedirect=!0;var o=Ri.parse(i);if(Object.assign(this._options,o),o.hostname!==r&&Co(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var a={headers:t.headers};try{this._options.beforeRedirect.call(null,this._options,a)}catch(t){return void this.emit("error",t)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(t){var s=new ko("Redirected request failed: "+t.message);s.cause=t,this.emit("error",s)}}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]};var No=To({http:Yi,https:Yi}),jo=To;No.wrap=jo;var Lo={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Po(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function Bo(t,e,n,r,i){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),i);else for(var o=0;o<r;o++)t[i+o]=e[n+o]}var Uo=Uint8Array,zo=Uint16Array,Mo=Int32Array;function Do(t){for(var e=t.length;--e>=0;)t[e]=0}var Fo=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],qo=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Zo=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Wo=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ho=new Array(576);Do(Ho);var $o=new Array(60);Do($o);var Ko=new Array(512);Do(Ko);var Yo=new Array(256);Do(Yo);var Jo=new Array(29);Do(Jo);var Go,Vo,Xo,Qo=new Array(30);function ta(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}function ea(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function na(t){return t<256?Ko[t]:Ko[256+(t>>>7)]}function ra(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function ia(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<<t.bi_valid&65535,ra(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function oa(t,e,n){ia(t,n[2*e],n[2*e+1])}function aa(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function sa(t,e,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=aa(o[s]++,s))}}function ua(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function ca(t){t.bi_valid>8?ra(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function la(t,e,n,r){var i=2*e,o=2*n;return t[i]<t[o]||t[i]===t[o]&&r[e]<=r[n]}function ha(t,e,n){for(var r=t.heap[n],i=n<<1;i<=t.heap_len&&(i<t.heap_len&&la(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!la(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r}function fa(t,e,n){var r,i,o,a,s=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],i=t.pending_buf[t.l_buf+s],s++,0===r?oa(t,i,e):(oa(t,(o=Yo[i])+256+1,e),0!==(a=Fo[o])&&ia(t,i-=Jo[o],a),oa(t,o=na(--r),n),0!==(a=qo[o])&&ia(t,r-=Qo[o],a))}while(s<t.last_lit);oa(t,256,e)}function da(t,e){var n,r,i,o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(t.heap[++t.heap_len]=c=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=a[2*i+1]);for(e.max_code=c,n=t.heap_len>>1;n>=1;n--)ha(t,o,n);i=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],ha(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,o[2*i]=o[2*n]+o[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,o[2*n+1]=o[2*r+1]=i,t.heap[1]=i++,ha(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,r,i,o,a,s,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,v=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)(o=u[2*u[2*(r=t.heap[n])+1]+1]+1)>p&&(o=p,v++),u[2*r+1]=o,r>c||(t.bl_count[o]++,a=0,r>=d&&(a=f[r-d]),s=u[2*r],t.opt_len+=s*(o+a),h&&(t.static_len+=s*(l[2*r+1]+a)));if(0!==v){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(r=t.bl_count[o];0!==r;)(i=t.heap[--n])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(t,e),sa(o,c,t.bl_count)}function pa(t,e,n){var r,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=e[2*(r+1)+1],++s<u&&i===a||(s<c?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function va(t,e,n){var r,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=e[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)do{oa(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(oa(t,i,t.bl_tree),s--),oa(t,16,t.bl_tree),ia(t,s-3,2)):s<=10?(oa(t,17,t.bl_tree),ia(t,s-3,3)):(oa(t,18,t.bl_tree),ia(t,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}Do(Qo);var ga=!1;function _a(t){ga||(!function(){var t,e,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(Jo[r]=n,t=0;t<1<<Fo[r];t++)Yo[n++]=r;for(Yo[n-1]=r,i=0,r=0;r<16;r++)for(Qo[r]=i,t=0;t<1<<qo[r];t++)Ko[i++]=r;for(i>>=7;r<30;r++)for(Qo[r]=i<<7,t=0;t<1<<qo[r]-7;t++)Ko[256+i++]=r;for(e=0;e<=15;e++)o[e]=0;for(t=0;t<=143;)Ho[2*t+1]=8,t++,o[8]++;for(;t<=255;)Ho[2*t+1]=9,t++,o[9]++;for(;t<=279;)Ho[2*t+1]=7,t++,o[7]++;for(;t<=287;)Ho[2*t+1]=8,t++,o[8]++;for(sa(Ho,287,o),t=0;t<30;t++)$o[2*t+1]=5,$o[2*t]=aa(t,5);Go=new ta(Ho,Fo,257,286,15),Vo=new ta($o,qo,0,30,15),Xo=new ta(new Array(0),Zo,0,19,7)}(),ga=!0),t.l_desc=new ea(t.dyn_ltree,Go),t.d_desc=new ea(t.dyn_dtree,Vo),t.bl_desc=new ea(t.bl_tree,Xo),t.bi_buf=0,t.bi_valid=0,ua(t)}function ya(t,e,n,r){ia(t,0+(r?1:0),3),function(t,e,n,r){ca(t),r&&(ra(t,n),ra(t,~n)),Bo(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n,!0)}function ma(t){ia(t,2,3),oa(t,256,Ho),function(t){16===t.bi_valid?(ra(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}function wa(t,e,n,r){var i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),da(t,t.l_desc),da(t,t.d_desc),a=function(t){var e;for(pa(t,t.dyn_ltree,t.l_desc.max_code),pa(t,t.dyn_dtree,t.d_desc.max_code),da(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*Wo[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==e?ya(t,e,n,r):4===t.strategy||o===i?(ia(t,2+(r?1:0),3),fa(t,Ho,$o)):(ia(t,4+(r?1:0),3),function(t,e,n,r){var i;for(ia(t,e-257,5),ia(t,n-1,5),ia(t,r-4,4),i=0;i<r;i++)ia(t,t.bl_tree[2*Wo[i]+1],3);va(t,t.dyn_ltree,e-1),va(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),fa(t,t.dyn_ltree,t.dyn_dtree)),ua(t),r&&ca(t)}function ba(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(Yo[n]+256+1)]++,t.dyn_dtree[2*na(e)]++),t.last_lit===t.lit_bufsize-1}function ka(t,e,n,r){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+e[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}var Ea=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();function Aa(t,e,n,r){var i=Ea,o=r+n;t^=-1;for(var a=r;a<o;a++)t=t>>>8^i[255&(t^e[a])];return-1^t}var Sa;function xa(t,e){return t.msg=Lo[e],e}function Ta(t){return(t<<1)-(t>4?9:0)}function Ra(t){for(var e=t.length;--e>=0;)t[e]=0}function Ca(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(Bo(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function Oa(t,e){wa(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Ca(t.strm)}function Ia(t,e){t.pending_buf[t.pending++]=e}function Na(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ja(t,e){var n,r,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,l=t.w_mask,h=t.prev,f=t.strstart+258,d=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(n=e)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<f);if(r=258-(f-o),o=f-258,r>a){if(t.match_start=e,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}}while((e=h[e&l])>u&&0!=--i);return a<=t.lookahead?a:t.lookahead}function La(t){var e,n,r,i,o,a,s,u,c,l,h=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=h+(h-262)){Bo(t.window,t.window,h,h,0),t.match_start-=h,t.strstart-=h,t.block_start-=h,e=n=t.hash_size;do{r=t.head[--e],t.head[e]=r>=h?r-h:0}while(--n);e=n=h;do{r=t.prev[--e],t.prev[e]=r>=h?r-h:0}while(--n);i+=h}if(0===t.strm.avail_in)break;if(a=t.strm,s=t.window,u=t.strstart+t.lookahead,c=i,l=void 0,(l=a.avail_in)>c&&(l=c),n=0===l?0:(a.avail_in-=l,Bo(s,a.input,a.next_in,l,u),1===a.state.wrap?a.adler=ka(a.adler,s,l,u):2===a.state.wrap&&(a.adler=Aa(a.adler,s,l,u)),a.next_in+=l,a.total_in+=l,l),t.lookahead+=n,t.lookahead+t.insert>=3)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+3-1])&t.hash_mask,t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function Pa(t,e){for(var n,r;;){if(t.lookahead<262){if(La(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-262&&(t.match_length=ja(t,n)),t.match_length>=3)if(r=ba(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=ba(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Oa(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Oa(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Oa(t,!1),0===t.strm.avail_out)?1:2}function Ba(t,e){for(var n,r,i;;){if(t.lookahead<262){if(La(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-262&&(t.match_length=ja(t,n),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,r=ba(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,r&&(Oa(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((r=ba(t,0,t.window[t.strstart-1]))&&Oa(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=ba(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Oa(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Oa(t,!1),0===t.strm.avail_out)?1:2}function Ua(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}function za(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new zo(1146),this.dyn_dtree=new zo(122),this.bl_tree=new zo(78),Ra(this.dyn_ltree),Ra(this.dyn_dtree),Ra(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new zo(16),this.heap=new zo(573),Ra(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new zo(573),Ra(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ma(t){var e,n=function(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,_a(e),0):xa(t,-2)}(t);return 0===n&&((e=t.state).window_size=2*e.w_size,Ra(e.head),e.max_lazy_match=Sa[e.level].max_lazy,e.good_match=Sa[e.level].good_length,e.nice_match=Sa[e.level].nice_length,e.max_chain_length=Sa[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),n}function Da(t,e){var n,r,i,o;if(!t||!t.state||e>5||e<0)return t?xa(t,-2):-2;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return xa(t,0===t.avail_out?-5:-2);if(r.strm=t,n=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Ia(r,31),Ia(r,139),Ia(r,8),r.gzhead?(Ia(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ia(r,255&r.gzhead.time),Ia(r,r.gzhead.time>>8&255),Ia(r,r.gzhead.time>>16&255),Ia(r,r.gzhead.time>>24&255),Ia(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Ia(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Ia(r,255&r.gzhead.extra.length),Ia(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=Aa(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Ia(r,0),Ia(r,0),Ia(r,0),Ia(r,0),Ia(r,0),Ia(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Ia(r,3),r.status=113);else{var a=8+(r.w_bits-8<<4)<<8;a|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=113,Na(r,a),0!==r.strstart&&(Na(r,t.adler>>>16),Na(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(t.adler=Aa(t.adler,r.pending_buf,r.pending-i,i)),Ca(t),i=r.pending,r.pending!==r.pending_buf_size));)Ia(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(t.adler=Aa(t.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(t.adler=Aa(t.adler,r.pending_buf,r.pending-i,i)),Ca(t),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Ia(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(t.adler=Aa(t.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(t.adler=Aa(t.adler,r.pending_buf,r.pending-i,i)),Ca(t),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Ia(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(t.adler=Aa(t.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Ca(t),r.pending+2<=r.pending_buf_size&&(Ia(r,255&t.adler),Ia(r,t.adler>>8&255),t.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Ca(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&Ta(e)<=Ta(n)&&4!==e)return xa(t,-5);if(666===r.status&&0!==t.avail_in)return xa(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var s=2===r.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(La(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=ba(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Oa(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Oa(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Oa(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var n,r,i,o,a=t.window;;){if(t.lookahead<=258){if(La(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(r=a[i=t.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=t.strstart+258;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);t.match_length=258-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=ba(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=ba(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Oa(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Oa(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Oa(t,!1),0===t.strm.avail_out)?1:2}(r,e):Sa[r.level].func(r,e);if(3!==s&&4!==s||(r.status=666),1===s||3===s)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===s&&(1===e?ma(r):5!==e&&(ya(r,0,0,!1),3===e&&(Ra(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Ca(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Ia(r,255&t.adler),Ia(r,t.adler>>8&255),Ia(r,t.adler>>16&255),Ia(r,t.adler>>24&255),Ia(r,255&t.total_in),Ia(r,t.total_in>>8&255),Ia(r,t.total_in>>16&255),Ia(r,t.total_in>>24&255)):(Na(r,t.adler>>>16),Na(r,65535&t.adler)),Ca(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)}Sa=[new Ua(0,0,0,0,(function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(La(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,Oa(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(Oa(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Oa(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Oa(t,!1),t.strm.avail_out),1)})),new Ua(4,4,8,4,Pa),new Ua(4,5,16,8,Pa),new Ua(4,6,32,32,Pa),new Ua(4,4,16,16,Ba),new Ua(8,16,32,32,Ba),new Ua(8,16,128,128,Ba),new Ua(8,32,128,256,Ba),new Ua(32,128,258,1024,Ba),new Ua(32,258,258,4096,Ba)];function Fa(t,e){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,g,_,y,m,w,b,k,E,A,S,x;n=t.state,r=t.next_in,S=t.input,i=r+(t.avail_in-5),o=t.next_out,x=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,h=n.wnext,f=n.window,d=n.hold,p=n.bits,v=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;t:do{p<15&&(d+=S[r++]<<p,p+=8,d+=S[r++]<<p,p+=8),m=v[d&_];e:for(;;){if(d>>>=w=m>>>24,p-=w,0===(w=m>>>16&255))x[o++]=65535&m;else{if(!(16&w)){if(0==(64&w)){m=v[(65535&m)+(d&(1<<w)-1)];continue e}if(32&w){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}b=65535&m,(w&=15)&&(p<w&&(d+=S[r++]<<p,p+=8),b+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=S[r++]<<p,p+=8,d+=S[r++]<<p,p+=8),m=g[d&y];n:for(;;){if(d>>>=w=m>>>24,p-=w,!(16&(w=m>>>16&255))){if(0==(64&w)){m=g[(65535&m)+(d&(1<<w)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(k=65535&m,p<(w&=15)&&(d+=S[r++]<<p,(p+=8)<w&&(d+=S[r++]<<p,p+=8)),(k+=d&(1<<w)-1)>u){t.msg="invalid distance too far back",n.mode=30;break t}if(d>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>l&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(E=0,A=f,0===h){if(E+=c-w,w<b){b-=w;do{x[o++]=f[E++]}while(--w);E=o-k,A=x}}else if(h<w){if(E+=c+h-w,(w-=h)<b){b-=w;do{x[o++]=f[E++]}while(--w);if(E=0,h<b){b-=w=h;do{x[o++]=f[E++]}while(--w);E=o-k,A=x}}}else if(E+=h-w,w<b){b-=w;do{x[o++]=f[E++]}while(--w);E=o-k,A=x}for(;b>2;)x[o++]=A[E++],x[o++]=A[E++],x[o++]=A[E++],b-=3;b&&(x[o++]=A[E++],b>1&&(x[o++]=A[E++]))}else{E=o-k;do{x[o++]=x[E++],x[o++]=x[E++],x[o++]=x[E++],b-=3}while(b>2);b&&(x[o++]=x[E++],b>1&&(x[o++]=x[E++]))}break}}break}}while(r<i&&o<s);r-=b=p>>3,d&=(1<<(p-=b<<3))-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?i-r+5:5-(r-i),t.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}var qa=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Za=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Wa=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],Ha=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function $a(t,e,n,r,i,o,a,s){var u,c,l,h,f,d,p,v,g,_=s.bits,y=0,m=0,w=0,b=0,k=0,E=0,A=0,S=0,x=0,T=0,R=null,C=0,O=new zo(16),I=new zo(16),N=null,j=0;for(y=0;y<=15;y++)O[y]=0;for(m=0;m<r;m++)O[e[n+m]]++;for(k=_,b=15;b>=1&&0===O[b];b--);if(k>b&&(k=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(w=1;w<b&&0===O[w];w++);for(k<w&&(k=w),S=1,y=1;y<=15;y++)if(S<<=1,(S-=O[y])<0)return-1;if(S>0&&(0===t||1!==b))return-1;for(I[1]=0,y=1;y<15;y++)I[y+1]=I[y]+O[y];for(m=0;m<r;m++)0!==e[n+m]&&(a[I[e[n+m]]++]=m);if(0===t?(R=N=a,d=19):1===t?(R=qa,C-=257,N=Za,j-=257,d=256):(R=Wa,N=Ha,d=-1),T=0,m=0,y=w,f=o,E=k,A=0,l=-1,h=(x=1<<k)-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){p=y-A,a[m]<d?(v=0,g=a[m]):a[m]>d?(v=N[j+a[m]],g=R[C+a[m]]):(v=96,g=0),u=1<<y-A,w=c=1<<E;do{i[f+(T>>A)+(c-=u)]=p<<24|v<<16|g|0}while(0!==c);for(u=1<<y-1;T&u;)u>>=1;if(0!==u?(T&=u-1,T+=u):T=0,m++,0==--O[y]){if(y===b)break;y=e[n+a[m]]}if(y>k&&(T&h)!==l){for(0===A&&(A=k),f+=w,S=1<<(E=y-A);E+A<b&&!((S-=O[E+A])<=0);)E++,S<<=1;if(x+=1<<E,1===t&&x>852||2===t&&x>592)return 1;i[l=T&h]=k<<24|E<<16|f-o|0}}return 0!==T&&(i[f+T]=y-A<<24|64<<16|0),s.bits=k,0}function Ka(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Ya(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new zo(320),this.work=new zo(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ja(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,function(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Mo(852),e.distcode=e.distdyn=new Mo(592),e.sane=1,e.back=-1,0):-2}(t)):-2}function Ga(t,e){var n,r;return t?(r=new Ya,t.state=r,r.window=null,0!==(n=function(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,Ja(t))):-2}(t,e))&&(t.state=null),n):-2}var Va,Xa,Qa=!0;function ts(t){if(Qa){var e;for(Va=new Mo(512),Xa=new Mo(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for($a(1,t.lens,0,288,Va,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;$a(2,t.lens,0,32,Xa,0,t.work,{bits:5}),Qa=!1}t.lencode=Va,t.lenbits=9,t.distcode=Xa,t.distbits=5}function es(t,e){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,g,_,y,m,w,b,k,E,A,S,x=0,T=new Uo(4),R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(n=t.state).mode&&(n.mode=13),a=t.next_out,i=t.output,u=t.avail_out,o=t.next_in,r=t.input,s=t.avail_in,c=n.hold,l=n.bits,h=s,f=u,E=0;t:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;l<16;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(2&n.wrap&&35615===c){n.check=0,T[0]=255&c,T[1]=c>>>8&255,n.check=Aa(n.check,T,2,0),c=0,l=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){t.msg="unknown compression method",n.mode=30;break}if(l-=4,k=8+(15&(c>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<<k,t.adler=n.check=1,n.mode=512&c?10:12,c=0,l=0;break;case 2:for(;l<16;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(n.flags=c,8!=(255&n.flags)){t.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=Aa(n.check,T,2,0)),c=0,l=0,n.mode=3;case 3:for(;l<32;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.time=c),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,n.check=Aa(n.check,T,4,0)),c=0,l=0,n.mode=4;case 4:for(;l<16;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=Aa(n.check,T,2,0)),c=0,l=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&(T[0]=255&c,T[1]=c>>>8&255,n.check=Aa(n.check,T,2,0)),c=0,l=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((d=n.length)>s&&(d=s),d&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Bo(n.head.extra,r,o,d,k)),512&n.flags&&(n.check=Aa(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break t;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=Aa(n.check,r,d,o)),s-=d,o+=d,k)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break t;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=Aa(n.check,r,d,o)),s-=d,o+=d,k)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(c!==(65535&n.check)){t.msg="header crc mismatch",n.mode=30;break}c=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;l<32;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}t.adler=n.check=Ka(c),c=0,l=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=a,t.avail_out=u,t.next_in=o,t.avail_in=s,n.hold=c,n.bits=l,2;t.adler=n.check=1,n.mode=12;case 12:if(5===e||6===e)break t;case 13:if(n.last){c>>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}switch(n.last=1&c,l-=1,3&(c>>>=1)){case 0:n.mode=14;break;case 1:if(ts(n),n.mode=20,6===e){c>>>=2,l-=2;break t}break;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}c>>>=2,l-=2;break;case 14:for(c>>>=7&l,l-=7&l;l<32;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,l=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(d=n.length){if(d>s&&(d=s),d>u&&(d=u),0===d)break t;Bo(i,r,o,d,a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=12;break;case 17:for(;l<14;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(n.nlen=257+(31&c),c>>>=5,l-=5,n.ndist=1+(31&c),c>>>=5,l-=5,n.ncode=4+(15&c),c>>>=4,l-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}n.lens[R[n.have++]]=7&c,c>>>=3,l-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},E=$a(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,E){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;_=(x=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,y=65535&x,!((g=x>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(y<16)c>>>=g,l-=g,n.lens[n.have++]=y;else{if(16===y){for(S=g+2;l<S;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(c>>>=g,l-=g,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}k=n.lens[n.have-1],d=3+(3&c),c>>>=2,l-=2}else if(17===y){for(S=g+3;l<S;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=3+(7&(c>>>=g)),c>>>=3,l-=3}else{for(S=g+7;l<S;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=11+(127&(c>>>=g)),c>>>=7,l-=7}if(n.have+d>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;d--;)n.lens[n.have++]=k}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,A={bits:n.lenbits},E=$a(1,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,E){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},E=$a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,E){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(s>=6&&u>=258){t.next_out=a,t.avail_out=u,t.next_in=o,t.avail_in=s,n.hold=c,n.bits=l,Fa(t,f),a=t.next_out,i=t.output,u=t.avail_out,o=t.next_in,r=t.input,s=t.avail_in,c=n.hold,l=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;_=(x=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,y=65535&x,!((g=x>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(_&&0==(240&_)){for(m=g,w=_,b=y;_=(x=n.lencode[b+((c&(1<<m+w)-1)>>m)])>>>16&255,y=65535&x,!(m+(g=x>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}c>>>=m,l-=m,n.back+=m}if(c>>>=g,l-=g,n.back+=g,n.length=y,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=12;break}if(64&_){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(S=n.extra;l<S;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(x=n.distcode[c&(1<<n.distbits)-1])>>>16&255,y=65535&x,!((g=x>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(0==(240&_)){for(m=g,w=_,b=y;_=(x=n.distcode[b+((c&(1<<m+w)-1)>>m)])>>>16&255,y=65535&x,!(m+(g=x>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}c>>>=m,l-=m,n.back+=m}if(c>>>=g,l-=g,n.back+=g,64&_){t.msg="invalid distance code",n.mode=30;break}n.offset=y,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(S=n.extra;l<S;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===u)break t;if(d=f-u,n.offset>d){if((d=n.offset-d)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),v=n.window}else v=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do{i[a++]=v[p++]}while(--d);0===n.length&&(n.mode=21);break;case 26:if(0===u)break t;i[a++]=n.length,u--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===s)break t;s--,c|=r[o++]<<l,l+=8}if(f-=u,t.total_out+=f,n.total+=f,f&&(t.adler=n.check=n.flags?Aa(n.check,i,f,a-f):ka(n.check,i,f,a-f)),f=u,(n.flags?c:Ka(c))!==n.check){t.msg="incorrect data check",n.mode=30;break}c=0,l=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===s)break t;s--,c+=r[o++]<<l,l+=8}if(c!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=30;break}c=0,l=0}n.mode=29;case 29:E=1;break t;case 30:E=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=a,t.avail_out=u,t.next_in=o,t.avail_in=s,n.hold=c,n.bits=l,(n.wsize||f!==t.avail_out&&n.mode<30&&(n.mode<27||4!==e))&&function(t,e,n,r){var i,o=t.state;null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uo(o.wsize)),r>=o.wsize?(Bo(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),Bo(o.window,e,n-r,i,o.wnext),(r-=i)?(Bo(o.window,e,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i)))}(t,t.output,t.next_out,f-t.avail_out),h-=t.avail_in,f-=t.avail_out,t.total_in+=h,t.total_out+=f,n.total+=f,n.wrap&&f&&(t.adler=n.check=n.flags?Aa(n.check,i,f,t.next_out-f):ka(n.check,i,f,t.next_out-f)),t.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===h&&0===f||4===e)&&0===E&&(E=-5),E}var ns;function rs(t){if(t<1||t>7)throw new TypeError("Bad argument");this.mode=t,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function is(t,e){for(var n=0;n<t.length;n++)this[e+n]=t[n]}rs.prototype.init=function(t,e,n,r,i){var o;switch(this.windowBits=t,this.level=e,this.memLevel=n,this.strategy=r,3!==this.mode&&4!==this.mode||(this.windowBits+=16),7===this.mode&&(this.windowBits+=32),5!==this.mode&&6!==this.mode||(this.windowBits=-this.windowBits),this.strm=new Po,this.mode){case 1:case 3:case 5:o=function(t,e,n,r,i,o){if(!t)return-2;var a=1;if(-1===e&&(e=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||8!==n||r<8||r>15||e<0||e>9||o<0||o>4)return xa(t,-2);8===r&&(r=9);var s=new za;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uo(2*s.w_size),s.head=new zo(s.hash_size),s.prev=new zo(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uo(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=o,s.method=n,Ma(t)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case 7:o=Ga(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}0===o?(this.write_in_progress=!1,this.init_done=!0):this._error(o)},rs.prototype.params=function(){throw new Error("deflateParams Not supported")},rs.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(0===this.mode)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},rs.prototype.write=function(t,e,n,r,i,o,a){this._writeCheck(),this.write_in_progress=!0;var s=this;return ge.nextTick((function(){s.write_in_progress=!1;var u=s._write(t,e,n,r,i,o,a);s.callback(u[0],u[1]),s.pending_close&&s.close()})),this},rs.prototype.writeSync=function(t,e,n,r,i,o,a){return this._writeCheck(),this._write(t,e,n,r,i,o,a)},rs.prototype._write=function(t,e,n,r,i,o,a){if(this.write_in_progress=!0,0!==t&&1!==t&&2!==t&&3!==t&&4!==t&&5!==t)throw new Error("Invalid flush value");null==e&&(e=new Me(0),r=0,n=0),i._set?i.set=i._set:i.set=is;var s,u=this.strm;switch(u.avail_in=r,u.input=e,u.next_in=n,u.avail_out=a,u.output=i,u.next_out=o,this.mode){case 1:case 3:case 5:s=Da(u,t);break;case 7:case 2:case 4:case 6:s=es(u,t);break;default:throw new Error("Unknown mode "+this.mode)}return 1!==s&&0!==s&&this._error(s),this.write_in_progress=!1,[u.avail_in,u.avail_out]},rs.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,1===this.mode||3===this.mode||5===this.mode?function(t){var e;t&&t.state&&(42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?xa(t,-2):(t.state=null,113===e&&xa(t,-3)))}(this.strm):function(t){if(!t||!t.state)return-2;var e=t.state;e.window&&(e.window=null),t.state=null}(this.strm),this.mode=0)},rs.prototype.reset=function(){switch(this.mode){case 1:case 5:ns=Ma(this.strm);break;case 2:case 6:ns=Ja(this.strm)}0!==ns&&this._error(ns)},rs.prototype._error=function(t){this.onerror(Lo[t]+": "+this.strm.msg,t),this.write_in_progress=!1,this.pending_close&&this.close()};var os=Object.freeze({__proto__:null,NONE:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8,Zlib:rs});var as={};Object.keys(os).forEach((function(t){as[t]=os[t]})),as.Z_MIN_WINDOWBITS=8,as.Z_MAX_WINDOWBITS=15,as.Z_DEFAULT_WINDOWBITS=15,as.Z_MIN_CHUNK=64,as.Z_MAX_CHUNK=1/0,as.Z_DEFAULT_CHUNK=16384,as.Z_MIN_MEMLEVEL=1,as.Z_MAX_MEMLEVEL=9,as.Z_DEFAULT_MEMLEVEL=8,as.Z_MIN_LEVEL=-1,as.Z_MAX_LEVEL=9,as.Z_DEFAULT_LEVEL=as.Z_DEFAULT_COMPRESSION;var ss={Z_OK:as.Z_OK,Z_STREAM_END:as.Z_STREAM_END,Z_NEED_DICT:as.Z_NEED_DICT,Z_ERRNO:as.Z_ERRNO,Z_STREAM_ERROR:as.Z_STREAM_ERROR,Z_DATA_ERROR:as.Z_DATA_ERROR,Z_MEM_ERROR:as.Z_MEM_ERROR,Z_BUF_ERROR:as.Z_BUF_ERROR,Z_VERSION_ERROR:as.Z_VERSION_ERROR};function us(t,e,n){var r=[],i=0;function o(){for(var e;null!==(e=t.read());)r.push(e),i+=e.length;t.once("readable",o)}function a(){var e=Me.concat(r,i);r=[],n(null,e),t.close()}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",o),n(e)})),t.on("end",a),t.end(e),o()}function cs(t,e){if("string"==typeof e&&(e=new Me(e)),!Me.isBuffer(e))throw new TypeError("Not a string or buffer");var n=as.Z_FINISH;return t._processChunk(e,n)}function ls(t){if(!(this instanceof ls))return new ls(t);_s.call(this,t,as.DEFLATE)}function hs(t){if(!(this instanceof hs))return new hs(t);_s.call(this,t,as.INFLATE)}function fs(t){if(!(this instanceof fs))return new fs(t);_s.call(this,t,as.GZIP)}function ds(t){if(!(this instanceof ds))return new ds(t);_s.call(this,t,as.GUNZIP)}function ps(t){if(!(this instanceof ps))return new ps(t);_s.call(this,t,as.DEFLATERAW)}function vs(t){if(!(this instanceof vs))return new vs(t);_s.call(this,t,as.INFLATERAW)}function gs(t){if(!(this instanceof gs))return new gs(t);_s.call(this,t,as.UNZIP)}function _s(t,e){if(this._opts=t=t||{},this._chunkSize=t.chunkSize||as.Z_DEFAULT_CHUNK,ii.call(this,t),t.flush&&t.flush!==as.Z_NO_FLUSH&&t.flush!==as.Z_PARTIAL_FLUSH&&t.flush!==as.Z_SYNC_FLUSH&&t.flush!==as.Z_FULL_FLUSH&&t.flush!==as.Z_FINISH&&t.flush!==as.Z_BLOCK)throw new Error("Invalid flush flag: "+t.flush);if(this._flushFlag=t.flush||as.Z_NO_FLUSH,t.chunkSize&&(t.chunkSize<as.Z_MIN_CHUNK||t.chunkSize>as.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<as.Z_MIN_WINDOWBITS||t.windowBits>as.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<as.Z_MIN_LEVEL||t.level>as.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<as.Z_MIN_MEMLEVEL||t.memLevel>as.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=as.Z_FILTERED&&t.strategy!=as.Z_HUFFMAN_ONLY&&t.strategy!=as.Z_RLE&&t.strategy!=as.Z_FIXED&&t.strategy!=as.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!Me.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new as.Zlib(e);var n=this;this._hadError=!1,this._binding.onerror=function(t,e){n._binding=null,n._hadError=!0;var r=new Error(t);r.errno=e,r.code=as.codes[e],n.emit("error",r)};var r=as.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(r=t.level);var i=as.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(i=t.strategy),this._binding.init(t.windowBits||as.Z_DEFAULT_WINDOWBITS,r,t.memLevel||as.Z_DEFAULT_MEMLEVEL,i,t.dictionary),this._buffer=new Me(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=i,this.once("end",this.close)}Object.keys(ss).forEach((function(t){ss[ss[t]]=t})),Bn(_s,ii),_s.prototype.params=function(t,e,n){if(t<as.Z_MIN_LEVEL||t>as.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(e!=as.Z_FILTERED&&e!=as.Z_HUFFMAN_ONLY&&e!=as.Z_RLE&&e!=as.Z_FIXED&&e!=as.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+e);if(this._level!==t||this._strategy!==e){var r=this;this.flush(as.Z_SYNC_FLUSH,(function(){r._binding.params(t,e),r._hadError||(r._level=t,r._strategy=e,n&&n())}))}else ge.nextTick(n)},_s.prototype.reset=function(){return this._binding.reset()},_s.prototype._flush=function(t){this._transform(new Me(0),"",t)},_s.prototype.flush=function(t,e){var n=this._writableState;if(("function"==typeof t||void 0===t&&!e)&&(e=t,t=as.Z_FULL_FLUSH),n.ended)e&&ge.nextTick(e);else if(n.ending)e&&this.once("end",e);else if(n.needDrain){var r=this;this.once("drain",(function(){r.flush(e)}))}else this._flushFlag=t,this.write(new Me(0),"",e)},_s.prototype.close=function(t){if(t&&ge.nextTick(t),!this._closed){this._closed=!0,this._binding.close();var e=this;ge.nextTick((function(){e.emit("close")}))}},_s.prototype._transform=function(t,e,n){var r,i=this._writableState,o=(i.ending||i.ended)&&(!t||i.length===t.length);if(null===!t&&!Me.isBuffer(t))return n(new Error("invalid input"));o?r=as.Z_FINISH:(r=this._flushFlag,t.length>=i.length&&(this._flushFlag=this._opts.flush||as.Z_NO_FLUSH)),this._processChunk(t,r,n)},_s.prototype._processChunk=function(t,e,n){var r=t&&t.length,i=this._chunkSize-this._offset,o=0,a=this,s="function"==typeof n;if(!s){var u,c=[],l=0;this.on("error",(function(t){u=t}));do{var h=this._binding.writeSync(e,t,o,r,this._buffer,this._offset,i)}while(!this._hadError&&p(h[0],h[1]));if(this._hadError)throw u;var f=Me.concat(c,l);return this.close(),f}var d=this._binding.write(e,t,o,r,this._buffer,this._offset,i);function p(u,h){if(!a._hadError){var f=i-h;if(function(t,e){if(!t)throw new Error(e)}(f>=0,"have should not go down"),f>0){var d=a._buffer.slice(a._offset,a._offset+f);a._offset+=f,s?a.push(d):(c.push(d),l+=d.length)}if((0===h||a._offset>=a._chunkSize)&&(i=a._chunkSize,a._offset=0,a._buffer=new Me(a._chunkSize)),0===h){if(o+=r-u,r=u,!s)return!0;var v=a._binding.write(e,t,o,r,a._buffer,a._offset,a._chunkSize);return v.callback=p,void(v.buffer=t)}if(!s)return!1;n()}}d.buffer=t,d.callback=p},Bn(ls,_s),Bn(hs,_s),Bn(fs,_s),Bn(ds,_s),Bn(ps,_s),Bn(vs,_s),Bn(gs,_s);var ys,ms={codes:ss,createDeflate:function(t){return new ls(t)},createInflate:function(t){return new hs(t)},createDeflateRaw:function(t){return new ps(t)},createInflateRaw:function(t){return new vs(t)},createGzip:function(t){return new fs(t)},createGunzip:function(t){return new ds(t)},createUnzip:function(t){return new gs(t)},deflate:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new ls(e),t,n)},deflateSync:function(t,e){return cs(new ls(e),t)},gzip:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new fs(e),t,n)},gzipSync:function(t,e){return cs(new fs(e),t)},deflateRaw:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new ps(e),t,n)},deflateRawSync:function(t,e){return cs(new ps(e),t)},unzip:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new gs(e),t,n)},unzipSync:function(t,e){return cs(new gs(e),t)},inflate:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new hs(e),t,n)},inflateSync:function(t,e){return cs(new hs(e),t)},gunzip:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new ds(e),t,n)},gunzipSync:function(t,e){return cs(new ds(e),t)},inflateRaw:function(t,e,n){return"function"==typeof e&&(n=e,e={}),us(new vs(e),t,n)},inflateRawSync:function(t,e){return cs(new vs(e),t)},Deflate:ls,Inflate:hs,Gzip:fs,Gunzip:ds,DeflateRaw:ps,InflateRaw:vs,Unzip:gs,Zlib:_s},ws="Promise based HTTP client for the browser and node.js",bs={test:"grunt test && bundlesize",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},ks={type:"git",url:"https://github.com/axios/axios.git"},Es=["xhr","http","ajax","promise","node"],As={url:"https://github.com/axios/axios/issues"},Ss="https://github.com/axios/axios",xs={bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},Ts={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Rs="dist/axios.min.js",Cs={"follow-redirects":"^1.10.0"},Os=[{path:"./dist/axios.min.js",threshold:"5kB"}],Is={name:"axios",version:"0.21.1",description:ws,main:"index.js",scripts:bs,repository:ks,keywords:Es,author:"Matt Zabriskie",license:"MIT",bugs:As,homepage:Ss,devDependencies:xs,browser:Ts,jsdelivr:"dist/axios.min.js",unpkg:Rs,typings:"./index.d.ts",dependencies:Cs,bundlesize:Os},Ns=(ys=Object.freeze({__proto__:null,name:"axios",version:"0.21.1",description:ws,main:"index.js",scripts:bs,repository:ks,keywords:Es,author:"Matt Zabriskie",license:"MIT",bugs:As,homepage:Ss,devDependencies:xs,browser:Ts,jsdelivr:"dist/axios.min.js",unpkg:Rs,typings:"./index.d.ts",dependencies:Cs,bundlesize:Os,default:Is}))&&ys.default||ys,js=No.http,Ls=No.https,Ps=/https:?/;function Bs(t,e,n){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=n,e.auth){var r=Me.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+r}t.beforeRedirect=function(t){t.headers.host=t.host,Bs(t,e,t.href)}}var Us=function(t){return new Promise((function(e,n){var r=function(t){e(t)},i=function(t){n(t)},o=t.data,a=t.headers;if(a["User-Agent"]||a["user-agent"]||(a["User-Agent"]="axios/"+Ns.version),o&&!zt.isStream(o)){if(Me.isBuffer(o));else if(zt.isArrayBuffer(o))o=Me.from(new Uint8Array(o));else{if(!zt.isString(o))return i(me("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));o=Me.from(o,"utf-8")}a["Content-Length"]=o.length}var s=void 0;t.auth&&(s=(t.auth.username||"")+":"+(t.auth.password||""));var u=ke(t.baseURL,t.url),c=Ri.parse(u),l=c.protocol||"http:";if(!s&&c.auth){var h=c.auth.split(":");s=(h[0]||"")+":"+(h[1]||"")}s&&delete a.Authorization;var f=Ps.test(l),d=f?t.httpsAgent:t.httpAgent,p={path:Dt(c.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:a,agent:d,agents:{http:t.httpAgent,https:t.httpsAgent},auth:s};t.socketPath?p.socketPath=t.socketPath:(p.hostname=c.hostname,p.port=c.port);var v,g=t.proxy;if(!g&&!1!==g){var _=l.slice(0,-1)+"_proxy",y=ge.env[_]||ge.env[_.toUpperCase()];if(y){var m=Ri.parse(y),w=ge.env.no_proxy||ge.env.NO_PROXY,b=!0;if(w)b=!w.split(",").map((function(t){return t.trim()})).some((function(t){return!!t&&("*"===t||("."===t[0]&&c.hostname.substr(c.hostname.length-t.length)===t||c.hostname===t))}));if(b&&(g={host:m.hostname,port:m.port,protocol:m.protocol},m.auth)){var k=m.auth.split(":");g.auth={username:k[0],password:k[1]}}}}g&&(p.headers.host=c.hostname+(c.port?":"+c.port:""),Bs(p,g,l+"//"+c.hostname+(c.port?":"+c.port:"")+p.path));var E=f&&(!g||Ps.test(g.protocol));t.transport?v=t.transport:0===t.maxRedirects?v=Yi:(t.maxRedirects&&(p.maxRedirects=t.maxRedirects),v=E?Ls:js),t.maxBodyLength>-1&&(p.maxBodyLength=t.maxBodyLength);var A=v.request(p,(function(e){if(!A.aborted){var n=e,o=e.req||A;if(204!==e.statusCode&&"HEAD"!==o.method&&!1!==t.decompress)switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(ms.createUnzip()),delete e.headers["content-encoding"]}var a={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:t,request:o};if("stream"===t.responseType)a.data=n,we(r,i,a);else{var s=[];n.on("data",(function(e){s.push(e),t.maxContentLength>-1&&Me.concat(s).length>t.maxContentLength&&(n.destroy(),i(me("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,o)))})),n.on("error",(function(e){A.aborted||i(ye(e,t,null,o))})),n.on("end",(function(){var e=Me.concat(s);"arraybuffer"!==t.responseType&&(e=e.toString(t.responseEncoding),t.responseEncoding&&"utf8"!==t.responseEncoding||(e=zt.stripBOM(e))),a.data=e,we(r,i,a)}))}}}));A.on("error",(function(e){A.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||i(ye(e,t,null,A))})),t.timeout&&A.setTimeout(t.timeout,(function(){A.abort(),i(me("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",A))})),t.cancelToken&&t.cancelToken.promise.then((function(t){A.aborted||(A.abort(),i(t))})),zt.isStream(o)?o.on("error",(function(e){i(ye(e,t,null,A))})).pipe(A):A.end(o)}))},zs={"Content-Type":"application/x-www-form-urlencoded"};function Ms(t,e){!zt.isUndefined(t)&&zt.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Ds,Fs={adapter:("undefined"!=typeof XMLHttpRequest?Ds=Se:void 0!==ge&&"[object process]"===Object.prototype.toString.call(ge)&&(Ds=Us),Ds),transformRequest:[function(t,e){return _e(e,"Accept"),_e(e,"Content-Type"),zt.isFormData(t)||zt.isArrayBuffer(t)||zt.isBuffer(t)||zt.isStream(t)||zt.isFile(t)||zt.isBlob(t)?t:zt.isArrayBufferView(t)?t.buffer:zt.isURLSearchParams(t)?(Ms(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):zt.isObject(t)?(Ms(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};Fs.headers={common:{Accept:"application/json, text/plain, */*"}},zt.forEach(["delete","get","head"],(function(t){Fs.headers[t]={}})),zt.forEach(["post","put","patch"],(function(t){Fs.headers[t]=zt.merge(zs)}));var qs=Fs;function Zs(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var Ws=function(t){return Zs(t),t.headers=t.headers||{},t.data=Zt(t.data,t.headers,t.transformRequest),t.headers=zt.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),zt.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||qs.adapter)(t).then((function(e){return Zs(t),e.data=Zt(e.data,e.headers,t.transformResponse),e}),(function(e){return Wt(e)||(Zs(t),e&&e.response&&(e.response.data=Zt(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},Hs=function(t,e){e=e||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(t,e){return zt.isPlainObject(t)&&zt.isPlainObject(e)?zt.merge(t,e):zt.isPlainObject(e)?zt.merge({},e):zt.isArray(e)?e.slice():e}function u(r){zt.isUndefined(e[r])?zt.isUndefined(t[r])||(n[r]=s(void 0,t[r])):n[r]=s(t[r],e[r])}zt.forEach(r,(function(t){zt.isUndefined(e[t])||(n[t]=s(void 0,e[t]))})),zt.forEach(i,u),zt.forEach(o,(function(r){zt.isUndefined(e[r])?zt.isUndefined(t[r])||(n[r]=s(void 0,t[r])):n[r]=s(void 0,e[r])})),zt.forEach(a,(function(r){r in e?n[r]=s(t[r],e[r]):r in t&&(n[r]=s(void 0,t[r]))}));var c=r.concat(i).concat(o).concat(a),l=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===c.indexOf(t)}));return zt.forEach(l,u),n};function $s(t){this.defaults=t,this.interceptors={request:new qt,response:new qt}}$s.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=Hs(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[Ws,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},$s.prototype.getUri=function(t){return t=Hs(this.defaults,t),Dt(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},zt.forEach(["delete","get","head","options"],(function(t){$s.prototype[t]=function(e,n){return this.request(Hs(n||{},{method:t,url:e,data:(n||{}).data}))}})),zt.forEach(["post","put","patch"],(function(t){$s.prototype[t]=function(e,n,r){return this.request(Hs(r||{},{method:t,url:e,data:n}))}}));var Ks=$s;function Ys(t){this.message=t}Ys.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Ys.prototype.__CANCEL__=!0;var Js=Ys;function Gs(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new Js(t),e(n.reason))}))}Gs.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Gs.source=function(){var t;return{token:new Gs((function(e){t=e})),cancel:t}};var Vs=Gs;function Xs(t){var e=new Ks(t),n=Ot(Ks.prototype.request,e);return zt.extend(n,Ks.prototype,e),zt.extend(n,e),n}var Qs=Xs(qs);Qs.Axios=Ks,Qs.create=function(t){return Xs(Hs(Qs.defaults,t))},Qs.Cancel=Js,Qs.CancelToken=Vs,Qs.isCancel=Wt,Qs.all=function(t){return Promise.all(t)},Qs.spread=function(t){return function(e){return t.apply(null,e)}},Qs.isAxiosError=function(t){return"object"==typeof t&&!0===t.isAxiosError};var tu=Qs,eu=Qs;tu.default=eu;var nu=tu,ru=(()=>{const t=ht();return{MINI_APP_LINK:"https://zalo.me/app/link/zapps",MINI_APP_INTERNAL_LINK:"https://h5.zdn.vn/zapps",COOKIE_NAME:{ZOAUTH:"h5.zdn.vn_zoauth",ZACC_SESSiON:"h5.zdn.vn_zacc_session",JS_TOKEN:"h5.zdn.vn_zlink3rd"},APIS:{GET_USER_INFO:"https://graph.zalo.me/v2.0/me"},STORAGE_DATA_LIMIT:102400,STORAGE_LIMIT:5242880,NETWORK_TYPE:{NONE:t.isAndroid?-2:0,WIFI:t.isAndroid?0:1,"2G":(t.isAndroid,2),"3G":t.isAndroid?15:2,"4G":t.isAndroid?13:2}}})();const iu={encode:function(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(void 0===r)return;if(null===r)return void e.push(n);e.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}return e.join("&")},decode:function(t,e){var n={};if(""===t)return n;for(var r=t.split("&"),i=0;i<r.length;i++){var o=r[i].split("=",2),a=decodeURIComponent(o[0]);if(e&&Object.prototype.hasOwnProperty.call(n,a))throw new URIError("Duplicate key: "+a);n[a]=2===o.length?decodeURIComponent(o[1]):null}return n},appendToUrl:function(t,e){return t+(-1!==t.indexOf("?")?"&":"?")+("string"==typeof e?e:iu.encode(e))},getParameterByName:function(t,e){e||(e=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getParamsAsObject:function(t){var e={};return t?(t.split("&").map((function(t){var n=t.split("=");n&&2==n.length&&(e[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))})),e):e},toQueryString:function(t){if(!t)return"";if("object"!=(void 0===t?"undefined":typeof t))return t;var e=Object.keys(t),n=[];return e.map((function(e){var r=t[e],i=[e,r="object"==(void 0===r?"undefined":typeof r)?JSON.stringify(r):encodeURIComponent(r)].join("=");n.push(i)})),n.join("&")}};var ou={},au=function(t,e,n){var r=e||"default";return function(){var e=r in ou?ou[r](t,n):t;return e.apply(this,arguments)}};au.setWrapper=function(t){var e=arguments.length<=1||void 0===arguments[1]?"default":arguments[1];ou[e]=t};var su={error:{code:1,error_subcode:1357046,message:"Received Invalid JSON reply.",type:"http"}};function uu(t){try{return null===t?su:JSON.parse(t)}catch(t){return su}}var cu={execute:function(t,e,n,r){n.suppress_http_code=1;var i=iu.encode(n);"post"!=e&&(t=iu.appendToUrl(t,i),i="");var o=function(t,e){if(!self.XMLHttpRequest)return null;var n=new XMLHttpRequest,r=function(){};if(!("withCredentials"in n))return null;n.open(t,e,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded");var i={send:function(t){n.send(t)}},o=au((function(){o=r,"onload"in i&&i.onload(n)}),"entry","XMLHttpRequest:load"),a=au((function(){a=r,"onerror"in i&&i.onerror(n)}),"entry","XMLHttpRequest:error");return n.onload=function(){o()},n.onerror=function(){a()},n.onreadystatechange=function(){4==n.readyState&&(200==n.status?o():a())},i}(e,t);return!!o&&(o.onload=function(t){r(uu(t.responseText))},o.onerror=function(t){t.responseText?r(uu(t.responseText)):r({error:{code:1,error_subcode:1357045,message:"unknown error (empty response)",status:t.status,type:"http"}})},o.send(i),!0)}};class lu extends Rt{constructor(){super(),this.debug=e.default("zmp:ZaloJSBridge"),this.events=Ct.getInstance(),this._accessTk=_t("zacc_session")||"DEFAULT_ACCESS_TOKEN",this._jsAccessTk=_t("zlink3rd")||"DEFAULT_JS_TOKEN",this.results=[],this._userAgent=lt(),this._device=ht(),this._jsCallFuncCallbacks={},this.events.on(exports.Events.AppPaused,(()=>{if(this.results.length>0){let t=this.results;this.results=[];try{this.sendLogData(t)}catch(t){}}})),this.sendLogTimer?clearInterval(this.sendLogTimer):this.sendLogTimer=setInterval((()=>{if(this.results.length>0){let t=this.results;this.results=[];try{this.sendLogData(t)}catch(t){}}}),5e3)}static getInstance(){return lu.instance||(lu.instance=new lu),lu.instance}set accessTk(t){this._accessTk=t}set jsAccessTk(t){this._jsAccessTk=t}sendLogData(t){try{cu.execute("https://h5.zalo.me/log/async","post",{appId:window.APP_ID,data:JSON.stringify(t)},(t=>{}))}catch(t){}}onJSCall(t,e){try{const n=yt(e);if(this._jsCallFuncCallbacks[t]){const e=this._jsCallFuncCallbacks[t].callback,r=this._jsCallFuncCallbacks[t].timeout;if(e){try{e.call(this,n)}catch(t){console.error("Call callback error",t)}r&&clearTimeout(r),this._jsCallFuncCallbacks[t]=null,delete this._jsCallFuncCallbacks[t]}}this.results.push({action:n.action,error:n.error_code})}catch(t){console.log("onJSCall","error",t)}}onMultiJSCall(t,e){try{const n=yt(e);if(this._jsCallFuncCallbacks[t]){const e=this._jsCallFuncCallbacks[t].callback,r=this._jsCallFuncCallbacks[t].timeout;if(e){try{e.call(this,n)}catch(t){console.error("Call callback error",t)}r&&clearTimeout(r)}}this.results.push({action:n.action,error:n.error_code})}catch(t){console.log("onMultiJSCall","error",t)}}nativeEventHandler(t,e,n){this.debug(`eventId: ${t}, eventName: ${e}, eventData: ${n}`);const r=kt(n);this.debug(r),this.events.emit(e,t,r)}defaultCallback(t){null!=t&&(t=yt(t))}jsCall(t,e,n,r=!1,i=3,o=!0){try{const a=((t="")=>`${t.normalize("NFD").replace(ot,"").replace(at,"d").replace(st,"").toLowerCase()}_${Math.random().toString(36).substr(2,4)}`)(t);if(!this._device.isMobile||p.isEmpty(t))return this.onJSCall(a,{error_code:-13,error_message:"params invalid!",data:{device:this._device.isMobile,jsToken:this._jsAccessTk,access_token:this._accessTk},action:t}),!1;null==e&&(e={}),n||(n=this.defaultCallback);const s={error_code:-14,error_message:"Request Timeout!",data:{},action:t};this._jsCallFuncCallbacks[a]={timeout:o&&X.includes(t)&&setTimeout((()=>{this.onJSCall(a,s)}),8e3),callback:n};try{return e=mt(e),r?this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,t,this._accessTk,e,window.onMultiJSCall(a)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,t,this._accessTk,e,`window.onMultiJSCall('${a}')`):this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,t,this._accessTk,e,window.onJSCall(a)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,t,this._accessTk,e,`window.onJSCall('${a}')`)}catch(o){if(!(i-- >0)){const n={error_code:-5,error_message:"Not ready!",data:{userAgent:this._userAgent,options:e,jsToken:this._jsAccessTk,access_token:this._accessTk},action:t,js_error:o};return this.onJSCall(a,n),!1}setTimeout((()=>{this.jsCall(t,e,n,r,i)}),500)}}catch(t){console.log("jsCall","error",t)}return!1}}class hu{constructor(t,e,n){this.code=t,this.message=e,this.api=n}toString(){return`api: ${this.api}; code: ${this.code}; message: ${this.message}`}}class fu extends hu{constructor(t,e){super(t,e),this.message=`${e}. ${nt.READ_MORE}`,this.handler()}handler(){switch(this.code){case exports.NativeCode.token_invalid:this.code=tt,this.message=nt.LOGIN_REQUIRED;break;case exports.NativeCode.not_permission:this.code=et,this.message=nt.NOT_PERMISSION;break;case exports.NativeCode.client_not_support:this.message=nt.CLIENT_NOT_SUPPORT;break;case exports.NativeCode.decode_failed:this.message=nt.DECODE_FAILED}}}const du={handler:null,setHandler(t){this.handler=t}};du.setHandler(((t,e)=>e instanceof hu?(e.api=t,e):new hu(-2001,p.isNull(e.message)?"Unknown Error":e.message,t)));const pu=(t,e,n)=>{const r=n.value;return n.value=function(...t){return St(this,void 0,void 0,(function*(){const{success:n,fail:i}=Array.isArray(t)&&t.length>0&&t[0];return new Promise(((o,a)=>St(this,void 0,void 0,(function*(){try{const e=yield r.apply(this,t);!p.isNull(n)&&p.isFunction(n)?n.call(null,e,this):o(e)}catch(t){const{handler:n}=du,r=n.call(null,e,t,this);window.zmpSentry&&window.zmpSentry.throwError(r.toString()),!p.isNull(i)&&p.isFunction(i)?i.call(null,r,this):console.error("Error:",r)}}))))}))},n},vu=(t,e,n)=>{const r=n.value;return n.value=function(...t){try{return r.apply(this,t)}catch(t){const{handler:n}=du;!p.isNull(n)&&p.isFunction(n)?n.call(null,e,t,this):console.warn(t.message)}},n};var gu;class _u{constructor(){gu.set(this,void 0),Tt(this,gu,lu.getInstance())}setZAccSession(t){xt(this,gu).accessTk=t}setJSToken(t){xt(this,gu).jsAccessTk=t}callNative(t,e,n){return new Promise(((r,i)=>{xt(this,gu).jsCall(t,e,(o=>{if(o&&o.error_code>=0&&o.action==t)r(o.data||{}),(null==n?void 0:n.callback)&&n.callback(o,null);else if(o&&o.error_code<0){const r=new fu(o.error_code,`${o.action}: ${o.error_message}`);try{window.zmpSentry&&window.zmpSentry.captureMessage(`${t}: call native fail`,{extra:{data:e,rs:o}})}catch(t){}i(r),(null==n?void 0:n.callback)&&n.callback(o,r)}}),null==n?void 0:n.isMultiCallback,null==n?void 0:n.nRetry,null==n?void 0:n.haveTimeout)}))}}gu=new WeakMap;const yu={loginFailed:()=>new hu(tt,nt.LOGIN_FAILED),loginRequired:()=>new hu(Q,nt.LOGIN_REQUIRED),missingParam:t=>new hu(Q,`Missing required argument: ${t}`),wrongTypeParam:(t,e,n)=>new hu(Q,`Wrong type of parameter '${t}'. Expected ${e}, but got ${n}`)};var mu,wu,bu,ku,Eu;class Au{static getVersion(){return"2.13.0"}static getSystemInfo(){return{version:ft("version-id")||"",apiVersion:"2.13.0",zaloVersion:dt(),platform:pt(),language:navigator.language}}static getAppInfo(){return St(this,void 0,void 0,(function*(){let t={};const e=this.getAppId(),n=this.getSystemInfo(),r=iu.appendToUrl(`https://h5.zalo.me/${rt}`,{appId:e,versionStatus:0,currentVersion:n.version}),i=yield fetch(r,{credentials:"include"});if(i.ok){const e=yield i.json();if(e.err<0||!e.data)throw new Error(e);t={name:e.data.name,version:e.data.version,description:e.data.description,appUrl:e.data.appUrl,qrCodeUrl:e.data.qrCodeUrl}}return t}))}}class Su{static setNavigationBarTitle(t){return St(this,void 0,void 0,(function*(){yield this.callNative(x,{title:t.title},{haveTimeout:!1})}))}static setNavigationBarColor(t){return St(this,void 0,void 0,(function*(){if(p.isString(t.color)&&t.color.length>0){const e={};p.isEmpty(t.color)||(e.backgroundColor=t.color),p.isEmpty(t.textColor)||(e.textColor=t.textColor),yield this.callNative(K,{actionbarType:5,dataConfig:e,homeConfig:{enable:this.isShowHomeButton?1:0,url:`${ru.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}},{haveTimeout:!1}),this.isShowNavBar=!0}else{const e={};p.isEmpty(t.statusBarColor)||(e.backgroundColor=t.statusBarColor),p.isEmpty(t.textColor)||(e.textColor=t.textColor),yield this.callNative(K,{actionbarType:6,dataConfig:e},{haveTimeout:!1}),this.isShowNavBar=!1}}))}static setNavigationBarLeftButton(t){return St(this,void 0,void 0,(function*(){let e={};switch(t.type){case"none":this.isShowHomeButton=!1,e={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${ru.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"back":this.isShowHomeButton=!1,e={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${ru.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"home":this.isShowHomeButton=!0,e={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${ru.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"both":this.isShowHomeButton=!0,e={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${ru.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}}}yield this.callNative(O,Object.assign({},e),{haveTimeout:!1})}))}static setNavigationBarRightButton(t){return St(this,void 0,void 0,(function*(){yield this.callNative(R,{supportToolBar:t.supportToolBar,reset:t.reset,menuListItems:t.menuListItems,zapp:this.getAppId()})}))}}class xu{static setBackgroundColor(t){return St(this,void 0,void 0,(function*(){p.isString(t.backgroundColor)&&t.backgroundColor.length>0&&(yield this.callNative(K,{actionbarType:this.isShowNavBar?5:6,dataConfig:{backgroundColor:t.backgroundColor,textColor:t.textColor}}))}))}}class Tu{constructor(t,e,n,r){this.title=r,this.severity=e;const i=new Date;if(this.time=i.toLocaleTimeString(),this.content=t,n>0){const t=(new Error).stack;this.stack=t?t.replace("Error\n",""):""}}toString(){return(this.content.stack?[this.title,this.severity.toUpperCase(),this.time,this.content,this.content.stack.replace("Error:","")]:[this.title,this.severity.toUpperCase(),this.time,JSON.stringify(this.content),this.stack]).join(" ")}}mu=new WeakMap,wu=new WeakMap,bu=new WeakMap,ku=new WeakMap,Eu=new WeakMap;const Ru=new class{constructor(){mu.set(this,3),wu.set(this,["none","error","warn","info"]),bu.set(this,"[zmp] > "),ku.set(this,{error:0,warn:0,info:0,firstError:null,lastError:null}),Eu.set(this,((t,e,n)=>{xt(this,ku)[xt(this,wu)[t]]++;const r=xt(this,wu)[t];if(Tt(this,bu,xt(this,bu)+("string"!=typeof e?new Tu(e,r,t,n).toString():e)),!(t>xt(this,mu)))switch(t){case 1:console.error(xt(this,bu));break;case 2:console.warn(xt(this,bu));break;case 3:console.info(xt(this,bu));break;default:throw new Error("internal")}}))}setLogLevel(t){Tt(this,mu,t)}info(t){xt(this,Eu).call(this,3,t)}warn(t,e){xt(this,Eu).call(this,2,t,e)}error(t,e){xt(this,Eu).call(this,1,t,e)}getMetrics(){return xt(this,ku)}};class Cu{static setDeviceOrientation(t){return St(this,void 0,void 0,(function*(){yield this.callNative(Z,{autoRotate:exports.OrientationType[t.rotate]})}))}static getNetworkType(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(T,{url:window.location.href,featureId:""}).then((t=>{let e;switch(t.network){case ru.NETWORK_TYPE.NONE:e=exports.NetworkType.none;break;case ru.NETWORK_TYPE.WIFI:e=exports.NetworkType.wifi;break;case ru.NETWORK_TYPE["2G"]:case ru.NETWORK_TYPE["3G"]:case ru.NETWORK_TYPE["4G"]:e=exports.NetworkType.cellular;break;default:e=exports.NetworkType.unknown}return{networkType:e}}))}))}static onNetworkStatusChange(t){return St(this,void 0,void 0,(function*(){yield this.events.on(exports.Events.NetworkChanged,(e=>{const n=e&&e.state;this.getNetworkType().then((e=>{const r={isConnected:"CONNECTED"===n,networkType:e&&e.networkType};t(r)})).catch((t=>{Ru.error(t,"onNetworkStatusChange")}))}))}))}static startBeaconDiscovery(t){var e,n,r,i,o;return St(this,void 0,void 0,(function*(){const a={subaction:0,scanning_type:p.isNumber(null==t?void 0:t.scanningType)?t.scanningType:0,data:{scan_from_source:p.isString(null==t?void 0:t.scanFromSource)?t.scanFromSource:"",expire:p.isNumber(null==t?void 0:t.expire)?t.expire:3e3,monitor_interval:p.isNumber(null==t?void 0:t.monitorInterval)?t.monitorInterval:60,domain:p.isString(null==t?void 0:t.domain)?t.domain:"",scan_config:{scan_time:p.isNumber(null===(e=null==t?void 0:t.scanConfig)||void 0===e?void 0:e.scanTime)?t.scanConfig.scanTime:15e3,time_between_scan:p.isNumber(null===(n=null==t?void 0:t.scanConfig)||void 0===n?void 0:n.timeBetweenScan)?t.scanConfig.timeBetweenScan:1e4,beacon_timeout:p.isNumber(null===(r=null==t?void 0:t.scanConfig)||void 0===r?void 0:r.beaconTimeout)?t.scanConfig.beaconTimeout:3e4,delayCheckConnectedTimeout:p.isNumber(null===(i=null==t?void 0:t.scanConfig)||void 0===i?void 0:i.delayCheckConnectedTimeout)?t.scanConfig.delayCheckConnectedTimeout:5e3,beaconConnectedTimeout:p.isNumber(null===(o=null==t?void 0:t.scanConfig)||void 0===o?void 0:o.beaconConnectedTimeout)?t.scanConfig.beaconConnectedTimeout:6e5},items:Array.isArray(null==t?void 0:t.items)?null==t?void 0:t.items:[]}};return yield this.callNative(W,Object.assign({},a)),!0}))}static stopBeaconDiscovery(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(W,Object.assign({},{subaction:2})),!0}))}static getBeacons(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(W,Object.assign({},{subaction:1}),{isMultiCallback:!0}).then((t=>{const e={beacons:[]};return Array.isArray(t)&&t.forEach((t=>{const n={uuid:t.uuid,major:t.major,minor:t.minor,distance:t.distance,rssi:t.rssi};e.beacons.push(n)})),e}))}))}static stopBluetoothDevicesDiscovery(){return St(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static startBluetoothDevicesDiscovery(t){return St(this,void 0,void 0,(function*(){return this.callNative("",Object.assign({},t))}))}static openBluetoothAdapter(){return St(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothDeviceFound(){return St(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothAdapterStateChange(){return St(this,void 0,void 0,(function*(){return Promise.resolve()}))}static getConnectedBluetoothDevices(t){return St(this,void 0,void 0,(function*(){const e={services:t.services||[]};return this.callNative("",e)}))}static getBluetoothDevices(){return St(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static getBluetoothAdapterState(){return St(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static closeBluetoothAdapter(){return St(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static scanQRCode(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(M,{skipOpenLink:!0})}))}static showToast(t){return St(this,void 0,void 0,(function*(){yield this.callNative(B,{toast:t.message})}))}static hideKeyboard(t){return St(this,void 0,void 0,(function*(){yield this.callNative(U,{})}))}static openPhone(t){return St(this,void 0,void 0,(function*(){yield this.callNative(z,{phoneNum:t.phoneNumber,phoneCode:t.phoneNumber})}))}static openSMS(t){return St(this,void 0,void 0,(function*(){yield this.callNative(D,{content:t.content,phoneCode:t.phoneNumber})}))}static keepScreen(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(q,{data:{keep_screen_on:t.keepScreenOn?1:0}})}))}static openBioAuthentication(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(N,{secret_data:t.secretData,app_id:this.getZAppId(),ui:{title:t.ui.title,sub_title:t.ui.subTitle,negative_text:t.ui.negativeButtonText},require_fingerprint:t.requireFingerprint?1:0}).then((t=>{var e,n,r,i;return{code:null==t?void 0:t.error_code,message:null==t?void 0:t.error_message,data:{domain:null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.domain,code:null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.error_code,message:null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.error_message,payToken:null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.pay_token}}}))}))}static checkStateBioAuthentication(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(j,{}).then((t=>({bioState:null==t?void 0:t.bio_state})))}))}static vibrate(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(Y,{type:exports.VibrateType[t.type],vibrate_time:t.milliseconds})}))}}var Ou,Iu,Nu,ju,Lu,Pu,Bu,Uu,zu,Mu,Du,Fu,qu,Zu,Wu,Hu,$u,Ku,Yu,Ju,Gu,Vu,Xu;class Qu{constructor(t){Ou.set(this,localStorage),Iu.set(this,void 0),Nu.set(this,void 0),ht(),Tt(this,Nu,{keys:new Set,currentSize:0,limitSize:ru.STORAGE_LIMIT}),Tt(this,Iu,t),this.findAllCurrentDataByApp(t)}findAllCurrentDataByApp(t){try{let e;for(e in xt(this,Ou)){if(t){if(e.split("_")[0]!==t)continue}xt(this,Nu).keys.add(e)}}catch(t){Ru.error(t,"LocalResourceStorage > findAllCurrentDataByApp")}}get(t){let e=new Map;return t.forEach((t=>{e.set(t,this.getSync(t))})),Promise.resolve(e)}getSync(t){return xt(this,Iu)&&(t=`${xt(this,Iu)}_${t}`),xt(this,Nu).keys.has(t)?xt(this,Ou).getItem(t):null}set(t){return St(this,void 0,void 0,(function*(){return Object.entries(t).forEach((([t,e])=>{this.setSync(t,e.replace(/\\"/g,'"'))})),Promise.resolve({errorKeys:[]})}))}setSync(t,e){xt(this,Iu)&&(t=`${xt(this,Iu)}_${t}`),xt(this,Ou).setItem(t,e),xt(this,Nu).keys.add(t)}getInfo(){return St(this,void 0,void 0,(function*(){return Promise.resolve(this.getInfoSync())}))}getInfoSync(){const t=((t,e)=>{let n,r,i=0;for(r in t){const o=r.split("_")[0];t.hasOwnProperty(r)&&(e&&o!==e||(n=2*(t[r].length+r.length),i+=n))}return i})(xt(this,Ou),xt(this,Iu));return{currentSize:p.isNumber(t)?Number((t/1024).toFixed(2)):0,limitSize:Number((ru.STORAGE_LIMIT/1024).toFixed(2))}}remove(t){return St(this,void 0,void 0,(function*(){return t.forEach((t=>{this.removeSync(t)})),Promise.resolve({errorKeys:[]})}))}removeSync(t){xt(this,Iu)&&(t=`${xt(this,Iu)}_${t}`),xt(this,Nu).keys.has(t)&&(xt(this,Ou).removeItem(t),xt(this,Nu).keys.delete(t))}clear(){return St(this,void 0,void 0,(function*(){return Promise.resolve(this.clearSync())}))}clearSync(){xt(this,Nu).keys.forEach((t=>{xt(this,Iu)&&t.indexOf(xt(this,Iu))<0||(xt(this,Ou).removeItem(t),xt(this,Nu).keys.delete(t))}))}}Ou=new WeakMap,Iu=new WeakMap,Nu=new WeakMap;class tc extends _u{constructor(t){super(),ju.set(this,void 0),Lu.set(this,void 0),Tt(this,Lu,{keys:new Set,currentSize:0,limitSize:ru.STORAGE_LIMIT}),Tt(this,ju,t)}get(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(J,{mpds_action:"mpds.get",mpds_data:{keys:t},appId:xt(this,ju)},{isMultiCallback:!1}).then((t=>{let e=new Map;return t&&t.mpds_data&&t.mpds_data.map&&(e=new Map(Object.entries(t.mpds_data.map))),e}))}))}set(t){return St(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(J,{mpds_action:"mpds.set",mpds_data:{map:t},appId:xt(this,ju)},{isMultiCallback:!1}).then((t=>{let e=[];return t&&t.mpds_data&&t.mpds_data.error_keys&&(e=t.mpds_data.error_keys),e}))}}))}getInfo(){return St(this,void 0,void 0,(function*(){const t=yield this.callNative(J,{mpds_action:"mpds.get.size",mpds_data:{},appId:xt(this,ju)},{isMultiCallback:!1}).then((t=>{let e=0;return t&&t.mpds_data&&t.mpds_data.size&&(e=t.mpds_data.size),e}));return{currentSize:p.isNumber(t)?Number(t/1024):0,limitSize:Number(ru.STORAGE_LIMIT/1024)}}))}remove(t){return St(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(J,{mpds_action:"mpds.remove.key",mpds_data:{keys:t},appId:xt(this,ju)},{isMultiCallback:!1}).then((t=>{let e=[];return t&&t.mpds_data&&t.mpds_data.error_keys&&(e=t.mpds_data.error_keys),e}))}}))}clear(){return St(this,void 0,void 0,(function*(){yield this.callNative(J,{mpds_action:"mpds.clear.appData",mpds_data:{},appId:xt(this,ju)})}))}}ju=new WeakMap,Lu=new WeakMap;class ec{getDataFromStorage(t){return St(this,void 0,void 0,(function*(){const e=this.getInstance(),n=yield e.get(t),r={};return n.forEach(((t,e)=>{r[e]=kt(t)})),r}))}putDataToStorage(t){return St(this,void 0,void 0,(function*(){const e=this.getInstance(),n={};return Object.entries(t).forEach((([t,e])=>{p.isUndefined(e)||p.isNull(e)||(n[t]=bt(e))})),yield e.set(n)}))}removeDataFromStorage(t){return St(this,void 0,void 0,(function*(){const e=this.getInstance();return yield e.remove(t)}))}clearStorage(){return St(this,void 0,void 0,(function*(){const t=this.getInstance();yield t.clear()}))}getStorageInfo(){return St(this,void 0,void 0,(function*(){const t=this.getInstance();return yield t.getInfo()}))}}class nc extends ec{constructor(t){super(),Pu.set(this,void 0),Tt(this,Pu,t)}getInstance(){return new Qu(xt(this,Pu))}}Pu=new WeakMap;class rc extends ec{constructor(t){super(),Bu.set(this,void 0),Tt(this,Bu,t)}getInstance(){return new tc(xt(this,Bu))}}Bu=new WeakMap;class ic{static setStorage(t){return St(this,void 0,void 0,(function*(){let e=new nc(this.getAppId());return wt()&&(e=new rc(this.getAppId())),yield e.putDataToStorage(t.data)}))}static getStorage(t){return St(this,void 0,void 0,(function*(){let e=new nc(this.getAppId());wt()&&(e=new rc(this.getAppId()));return yield e.getDataFromStorage(t.keys)}))}static getStorageInfo(t){return St(this,void 0,void 0,(function*(){let t=new nc(this.getAppId());return wt()&&(t=new rc(this.getAppId())),yield t.getStorageInfo()}))}static removeStorage(t){return St(this,void 0,void 0,(function*(){let e=new nc(this.getAppId());return wt()&&(e=new rc(this.getAppId())),yield e.removeDataFromStorage(t.keys)}))}static clearStorage(t={}){return St(this,void 0,void 0,(function*(){let t=new nc(this.getAppId());wt()&&(t=new rc(this.getAppId())),yield t.clearStorage()}))}}class oc{static getUserInfo(t){return St(this,void 0,void 0,(function*(){const t=yield this.getAccessToken();return{userInfo:yield nu.get(ru.APIS.GET_USER_INFO,{params:{fields:"id,birthday,name,gender,picture",access_token:t}}).then((t=>{const e=t.data;return{id:e.id,name:e.name,birthday:e.birthday,gender:e.gender,avatar:e.picture&&e.picture.data&&e.picture.data.url}}))}}))}static getPhoneNumber(t){return new Promise(((t,e)=>{this.callNative(V,{},{isMultiCallback:!0,callback:(n,r)=>{if(r&&e(r),0===n.error_code){const e={number:n.data};t(e)}}})}))}}class ac{static closeApp(t){return St(this,void 0,void 0,(function*(){yield this.callNative(I,{})}))}static openMiniApp(t){return St(this,void 0,void 0,(function*(){const e=null==t?void 0:t.appId,n=(null==t?void 0:t.params)||{},r=Object.entries(n).map((function([t,e]){return[t,e].join("=")})).join("&");yield this.callNative($,{mpUrl:`${ru.MINI_APP_INTERNAL_LINK}/${e}/${r.length>0?"?"+r:""}`,mpInfo:{appId:e}})}))}static openWebview(t){return St(this,void 0,void 0,(function*(){yield this.callNative(m,{url:t.url})}))}}class sc{static getLocation(t){return new Promise(((t,e)=>{this.callNative(L,{silent_request:!1,permission_description:"Cho phép Zalo truy cập vào vị trí của thiết bị này?"},{isMultiCallback:!0,haveTimeout:!1,callback:(n,r)=>{if(r&&e(r),0===n.error_code){const e=n.data,r={latitude:e.latitude,longitude:e.longitude,timestamp:e.timestamp,provider:e.provider};t(r)}}})}))}static sendLocation(t){return St(this,void 0,void 0,(function*(){yield this.callNative(P,{title:t.title,touserid:t.toUserId,zapp:this.getZAppId()})}))}}class uc{static requestCameraPermission(t){return new Promise(((t,e)=>{this.callNative(S,{},{callback:(n,r)=>{-2===n.error_code||n.error_code>=0?t({userAllow:-2!==n.error_code,message:n.error_message}):e(r)}})}))}static saveImageToPhotosAlbum(t){return St(this,void 0,void 0,(function*(){let e={};return e=p.isEmpty(t.imageBase64Data)?Object.assign(Object.assign({},e),{imageUrl:t.imageUrl}):Object.assign(Object.assign({},e),{imageBase64Data:t.imageBase64Data}),yield this.callNative(H,Object.assign({},e))}))}}class cc{static viewOAQr(t){return St(this,void 0,void 0,(function*(){yield this.callNative(F,{dpn:t.displayName,uid:t.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openProfile(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(y,{uId:t.id,type:exports.ProfileType[t.type],zapp:this.getZAppId(),sourceId:t.sourceId,sourceIndex:t.sourceIndex})}))}static openChat(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(w,{uId:t.id,type:exports.ChatType[t.type],zapp:this.getZAppId(),sourceId:t.sourceId,sourceIndex:t.sourceIndex})}))}static openPostFeed(t){return St(this,void 0,void 0,(function*(){let e={};switch(t.type){case"image":e={photoUrl:t.data.imageUrl};break;case"link":e={link:t.data.link,title:t.data.title,thumb:t.data.thumb,description:t.data.description};break;case"profile":e={avt:t.data.avatar,uid:t.data.id,dpn:t.data.displayName}}return yield this.callNative(b,Object.assign(Object.assign({type:exports.PostFeedType[t.type]},e),{zapp:this.getZAppId()})).then((t=>({status:t.status,shareType:t.share_type,numberOfUser:t.uid_to_size})))}))}static followOA(t){return St(this,void 0,void 0,(function*(){yield this.callNative(k,{uid:t.id,showDialogConfirm:!0,zapp:this.getZAppId()},{haveTimeout:!1})}))}static unfollowOA(t){return St(this,void 0,void 0,(function*(){yield this.callNative(E,{uid:t.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openShareSheet(t){return St(this,void 0,void 0,(function*(){let e={};switch(t.type){case"image":e={photoUrl:t.data.imageUrl};break;case"gif":e={photoUrl:t.data.imageUrl,gifUrl:t.data.gifUrl,width:t.data.width,height:t.data.height};break;case"video":e={videoThumb:t.data.videoThumb,videoUrl:t.data.videoUrl,width:t.data.width,height:t.data.height};break;case"link":e={link:t.data.link,chatOnly:t.data.chatOnly?1:0};break;case"oa":e={uid:t.data.id}}return yield this.callNative(A,Object.assign(Object.assign({type:exports.ShareSheetType[t.type]},e),{zapp:this.getZAppId()}),{haveTimeout:!1}).then((t=>({status:t.status,shareType:t.share_type,numberOfUser:t.uid_to_size})))}))}static createShortcut(t){return St(this,void 0,void 0,(function*(){yield this.callNative(C,{url:`${ru.MINI_APP_LINK}/${this.getAppId()}/`,title:document.title,iconUrl:`https:${ft("og:image:url")}`})}))}}class lc{static getRouteParams(){let t={};const e=window.location.href;try{let n=new URL(e).searchParams.toString();n&&(t=iu.getParamsAsObject(n))}catch(t){throw new Error("Url không hợp lệ")}return t}static sendDataToPreviousMiniApp(t){return St(this,void 0,void 0,(function*(){return yield this.callNative(G,{result:bt(t.data)})}))}static onCallbackData(t){return St(this,void 0,void 0,(function*(){yield this.events.on(exports.Events.OnDataCallback,(e=>{t({data:e})}))}))}}class hc extends _u{constructor(){super(),Uu.set(this,window.zAppID),zu.set(this,window.APP_ID),Mu.set(this,window.APP_CONFIG||{}),Du.set(this,void 0),Fu.set(this,void 0),qu.set(this,{timer:{getToken:0}}),this.events=Ct.getInstance(),Zu.set(this,(()=>{const t=xt(this,Mu).app||null;if(t){const e=t.title,n=t.headerColor,r=t.textColor,i=t.statusBarColor,o=t.leftButton;if(p.isString(e)&&this.setNavigationBarTitle({title:e}),p.isString(n)){const t={color:n};!p.isString(r)||"black"!==r&&"white"!==r||(t.textColor=r),p.isString(i)&&(t.statusBarColor=i),this.setNavigationBarColor(t)}p.isString(o)&&this.setNavigationBarLeftButton({type:o})}})),Wu.set(this,(()=>{try{xt(this,Zu).call(this)}catch(t){console.error(t)}})),Hu.set(this,(()=>new Promise(((t,e)=>{this.callNative("action.jump.login",{}).then((e=>{const n=e&&e.cookiesOAuthLogins||[],r=n.find((t=>t.name===ru.COOKIE_NAME.JS_TOKEN));r&&(this.setJSToken(r.value),window.ZJSBridge.setJSToken&&window.ZJSBridge.setJSToken(r.value)),t(n)})).catch((t=>{e(t)}))})))),$u.set(this,Su.setNavigationBarRightButton),this.getVersion=Au.getVersion,this.getSystemInfo=Au.getSystemInfo,this.setNavigationBarTitle=Su.setNavigationBarTitle,this.setNavigationBarColor=Su.setNavigationBarColor,this.setNavigationBarLeftButton=Su.setNavigationBarLeftButton,this.setBackgroundColor=xu.setBackgroundColor,this.setDeviceOrientation=Cu.setDeviceOrientation,this.setStorage=ic.setStorage,this.getStorage=ic.getStorage,this.getStorageInfo=ic.getStorageInfo,this.removeStorage=ic.removeStorage,this.clearStorage=ic.clearStorage,this.getUserInfo=oc.getUserInfo,this.getNetworkType=Cu.getNetworkType,this.onNetworkStatusChange=Cu.onNetworkStatusChange,this.startBeaconDiscovery=Cu.startBeaconDiscovery,this.stopBeaconDiscovery=Cu.stopBeaconDiscovery,this.getBeacons=Cu.getBeacons,this.closeApp=ac.closeApp,this.getLocation=sc.getLocation,this.stopBluetoothDevicesDiscovery=Cu.stopBluetoothDevicesDiscovery,this.startBluetoothDevicesDiscovery=Cu.stopBluetoothDevicesDiscovery,this.openBluetoothAdapter=Cu.openBluetoothAdapter,this.onBluetoothDeviceFound=Cu.onBluetoothDeviceFound,this.onBluetoothAdapterStateChange=Cu.onBluetoothAdapterStateChange,this.getConnectedBluetoothDevices=Cu.getConnectedBluetoothDevices,this.getBluetoothDevices=Cu.getBluetoothDevices,this.getBluetoothAdapterState=Cu.getBluetoothAdapterState,this.closeBluetoothAdapter=Cu.closeBluetoothAdapter,this.scanQRCode=Cu.scanQRCode,this.openProfile=cc.openProfile,this.openChat=cc.openChat,this.openPostFeed=cc.openPostFeed,this.followOA=cc.followOA,this.unFollowOA=cc.unfollowOA,this.openShareSheet=cc.openShareSheet,this.requestCameraPermission=uc.requestCameraPermission,this.createShortcut=cc.createShortcut,this.openBioAuthentication=Cu.openBioAuthentication,this.checkStateBioAuthentication=Cu.checkStateBioAuthentication,this.sendLocation=sc.sendLocation,this.showToast=Cu.showToast,this.hideKeyboard=Cu.hideKeyboard,this.openPhone=Cu.openPhone,this.openSMS=Cu.openSMS,this.viewOAQr=cc.viewOAQr,this.keepScreen=Cu.keepScreen,this.saveImageToPhotosAlbum=uc.saveImageToPhotosAlbum,this.openMiniApp=ac.openMiniApp,this.vibrate=Cu.vibrate,this.openWebview=ac.openWebview,this.getRouteParams=lc.getRouteParams,this.getAppInfo=Au.getAppInfo,this.sendDataToPreviousMiniApp=lc.sendDataToPreviousMiniApp,this.onCallbackData=lc.onCallbackData,this.getPhoneNumber=oc.getPhoneNumber,Tt(this,Du,null),Tt(this,Fu,null),this.isShowNavBar=!0,this.isShowHomeButton=!0}static getInstance(){return hc.instance||(hc.instance=new hc),hc.instance}getAppId(){return xt(this,zu)}getZAppId(){return xt(this,Uu)}login(t){return St(this,void 0,void 0,(function*(){const t=(yield xt(this,Hu).call(this)).find((t=>t.name===ru.COOKIE_NAME.ZOAUTH));if(!p.isUndefined(t)&&!p.isNull(t)&&p.isString(t.value)){Tt(this,Du,t.value);const e=()=>St(this,void 0,void 0,(function*(){return(p.isUndefined(xt(this,Du))||p.isNull(xt(this,Du)))&&clearInterval(xt(this,qu).timer.getToken),yield nu.get("https://oauth.zaloapp.com/v3/access_token",{params:{app_id:xt(this,Uu),redirect_uri:`https://h5.zdn.vn/zapps/${xt(this,zu)}/`,code:xt(this,Du),isSDK:!0}}).then((t=>{let n=t.data;if(n.access_token){Tt(this,Fu,n.access_token);const t=1e3*parseInt(n.expires_in);return xt(this,qu).timer.getToken||(xt(this,qu).timer.getToken=window.setInterval(e,t)),this.setZAccSession(xt(this,Fu)||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(xt(this,Fu)||""),xt(this,Fu)}return null}))}));return clearInterval(xt(this,qu).timer.getToken),yield e(),"Login Success!"}throw yu.loginFailed()}))}getAccessToken(t){return St(this,void 0,void 0,(function*(){if(xt(this,Fu))return xt(this,Fu);throw yu.loginRequired()}))}}Uu=new WeakMap,zu=new WeakMap,Mu=new WeakMap,Du=new WeakMap,Fu=new WeakMap,qu=new WeakMap,Zu=new WeakMap,Wu=new WeakMap,Hu=new WeakMap,$u=new WeakMap;class fc{constructor(){Ku.set(this,window.zAppID),Yu.set(this,window.APP_CONFIG||{}),Ju.set(this,"DEFAULT ZOAUTH"),Gu.set(this,"DEFAULT ACCESS TOKEN"),Vu.set(this,{timer:{getToken:0}}),this.getAppId=()=>xt(this,Ku),this.login=()=>Promise.resolve(xt(this,Ju)),this.getAccessToken=()=>Promise.resolve(xt(this,Gu)),this.getVersion=Au.getVersion,this.getSystemInfo=Au.getSystemInfo,this.setNavigationBarTitle=()=>Promise.resolve(),this.setNavigationBarColor=()=>Promise.resolve(),this.setBackgroundColor=()=>Promise.resolve(),this.setNavigationBarLeftButton=()=>Promise.resolve(),this.setDeviceOrientation=()=>Promise.resolve(),this.setStorage=t=>St(this,void 0,void 0,(function*(){const e=new nc(this.getAppId());return yield e.putDataToStorage(t.data),{errorKeys:[]}})),this.getStorage=t=>St(this,void 0,void 0,(function*(){const e=new nc(this.getAppId());return yield e.getDataFromStorage(t.keys)})),this.getStorageInfo=t=>St(this,void 0,void 0,(function*(){const t=new nc(this.getAppId());return yield t.getStorageInfo()})),this.removeStorage=t=>St(this,void 0,void 0,(function*(){const e=new nc(this.getAppId());return yield e.removeDataFromStorage(t.keys)})),this.clearStorage=t=>St(this,void 0,void 0,(function*(){const t=new nc(this.getAppId());return yield t.clearStorage()})),this.getUserInfo=()=>Promise.resolve({userInfo:{id:"3368637342326461234",name:"User Name",birthday:"01/01/1990",gender:"male",avatar:"https://h5.zdn.vn/static/images/avatar.png"}}),this.getNetworkType=()=>{let t;switch((navigator.connection||navigator.mozConnection||navigator.webkitConnection).effectiveType){case"none":t=exports.NetworkType.none;break;case"4g":t=exports.NetworkType.wifi;break;case"3g":case"2g":t=exports.NetworkType.cellular;break;default:t=exports.NetworkType.unknown}const e={networkType:t};return Promise.resolve(e)},this.onNetworkStatusChange=t=>{const e=navigator.connection||navigator.mozConnection||navigator.webkitConnection,n=e.effectiveType;return e.addEventListener("change",(function(){let e;switch(n){case"none":e=exports.NetworkType.none;break;case"4g":e=exports.NetworkType.wifi;break;case"3g":case"2g":e=exports.NetworkType.cellular;break;default:e=exports.NetworkType.unknown}t({isConnected:!0,networkType:e})})),Promise.resolve()},this.startBeaconDiscovery=t=>Promise.resolve(!0),this.stopBeaconDiscovery=t=>Promise.resolve(!0),this.getBeacons=t=>Promise.resolve({beacons:[]}),this.closeApp=()=>Promise.resolve(),this.getLocation=()=>Promise.resolve({longitude:"105.788026",latitude:"21.0258773",timestamp:(new Date).getTime().toString(),provider:"fused"}),this.onBackButtonClick=()=>Promise.resolve(),this.stopBluetoothDevicesDiscovery=()=>Promise.resolve(),this.startBluetoothDevicesDiscovery=()=>Promise.resolve(),this.openBluetoothAdapter=()=>Promise.resolve(),this.onBluetoothDeviceFound=()=>Promise.resolve(),this.onBluetoothAdapterStateChange=()=>Promise.resolve(),this.getConnectedBluetoothDevices=()=>Promise.resolve(),this.getBluetoothDevices=()=>Promise.resolve(),this.getBluetoothAdapterState=()=>Promise.resolve(),this.closeBluetoothAdapter=()=>Promise.resolve(),this.scanQRCode=()=>Promise.resolve({content:"132"}),this.openProfile=()=>Promise.resolve(),this.openChat=()=>Promise.resolve(),this.openPostFeed=()=>Promise.resolve({status:1,shareType:0,numberOfUser:0}),this.followOA=()=>Promise.resolve(),this.unFollowOA=()=>Promise.resolve(),this.openShareSheet=()=>Promise.resolve({status:2,shareType:0,numberOfUser:0}),this.requestCameraPermission=()=>Promise.resolve({userAllow:!0,message:"Success"}),this.createShortcut=()=>Promise.resolve(),this.openBioAuthentication=()=>Promise.resolve({code:0,message:"OK",data:{domain:"",code:0,message:"",payToken:""}}),this.checkStateBioAuthentication=()=>Promise.resolve({bioState:""}),this.sendLocation=()=>Promise.resolve(),this.showToast=()=>Promise.resolve(),this.hideKeyboard=()=>Promise.resolve(),this.openPhone=()=>Promise.resolve(),this.openSMS=()=>Promise.resolve(),this.viewOAQr=()=>Promise.resolve(),this.keepScreen=()=>Promise.resolve(),this.saveImageToPhotosAlbum=()=>Promise.resolve(),this.openMiniApp=t=>Promise.resolve(),this.vibrate=()=>Promise.resolve(),this.openWebview=t=>(location.replace(t.url),Promise.resolve()),this.getRouteParams=lc.getRouteParams,this.getAppInfo=()=>Promise.resolve({description:"",name:"",version:"",appUrl:"",qrCodeUrl:""}),this.sendDataToPreviousMiniApp=t=>Promise.resolve(),this.onCallbackData=t=>(t({data:""}),Promise.resolve()),this.getPhoneNumber=()=>(console.warn("This api only works on zalo app"),Promise.resolve({number:""}))}on(t,e,n){throw new Error("Method not implemented.")}once(t,e,n){throw new Error("Method not implemented.")}off(t,e,n,r){throw new Error("Method not implemented.")}removeAllListeners(t){throw new Error("Method not implemented.")}}Ku=new WeakMap,Yu=new WeakMap,Ju=new WeakMap,Gu=new WeakMap,Vu=new WeakMap,function(t){!function(e){var r="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(t);function o(t,e){return function(n,r){"function"!=typeof t[n]&&Object.defineProperty(t,n,{configurable:!0,writable:!0,value:r}),e&&e(n,r)}}void 0===r.Reflect?r.Reflect=t:i=o(r.Reflect,i),function(t){var e=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return rt(Object.create(null))}:a?function(){return rt({__proto__:null})}:function(){return rt({})},has:s?function(t,n){return e.call(t,n)}:function(t,e){return e in t},get:s?function(t,n){return e.call(t,n)?t[n]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),l="object"==typeof ge&&ge.env&&"true"===ge.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,f=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?et():Set,d=new(l||"function"!=typeof WeakMap?nt():WeakMap);function p(t,e,n,r){if(P(n)){if(!W(t))throw new TypeError;if(!$(e))throw new TypeError;return A(t,e)}if(!W(t))throw new TypeError;if(!z(e))throw new TypeError;if(!z(r)&&!P(r)&&!B(r))throw new TypeError;return B(r)&&(r=void 0),S(t,e,n=Z(n),r)}function v(t,e){function n(n,r){if(!z(n))throw new TypeError;if(!P(r)&&!K(r))throw new TypeError;I(t,e,n,r)}return n}function g(t,e,n,r){if(!z(n))throw new TypeError;return P(r)||(r=Z(r)),I(t,e,n,r)}function _(t,e,n){if(!z(e))throw new TypeError;return P(n)||(n=Z(n)),T(t,e,n)}function y(t,e,n){if(!z(e))throw new TypeError;return P(n)||(n=Z(n)),R(t,e,n)}function m(t,e,n){if(!z(e))throw new TypeError;return P(n)||(n=Z(n)),C(t,e,n)}function w(t,e,n){if(!z(e))throw new TypeError;return P(n)||(n=Z(n)),O(t,e,n)}function b(t,e){if(!z(t))throw new TypeError;return P(e)||(e=Z(e)),N(t,e)}function k(t,e){if(!z(t))throw new TypeError;return P(e)||(e=Z(e)),j(t,e)}function E(t,e,n){if(!z(e))throw new TypeError;P(n)||(n=Z(n));var r=x(e,n,!1);if(P(r))return!1;if(!r.delete(t))return!1;if(r.size>0)return!0;var i=d.get(e);return i.delete(n),i.size>0||d.delete(e),!0}function A(t,e){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(e);if(!P(r)&&!B(r)){if(!$(r))throw new TypeError;e=r}}return e}function S(t,e,n,r){for(var i=t.length-1;i>=0;--i){var o=(0,t[i])(e,n,r);if(!P(o)&&!B(o)){if(!z(o))throw new TypeError;r=o}}return r}function x(t,e,n){var r=d.get(t);if(P(r)){if(!n)return;r=new h,d.set(t,r)}var i=r.get(e);if(P(i)){if(!n)return;i=new h,r.set(e,i)}return i}function T(t,e,n){if(R(t,e,n))return!0;var r=Q(e);return!B(r)&&T(t,r,n)}function R(t,e,n){var r=x(e,n,!1);return!P(r)&&F(r.has(t))}function C(t,e,n){if(R(t,e,n))return O(t,e,n);var r=Q(e);return B(r)?void 0:C(t,r,n)}function O(t,e,n){var r=x(e,n,!1);if(!P(r))return r.get(t)}function I(t,e,n,r){x(n,r,!0).set(t,e)}function N(t,e){var n=j(t,e),r=Q(t);if(null===r)return n;var i=N(r,e);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new f,a=[],s=0,u=n;s<u.length;s++){var c=u[s];o.has(c)||(o.add(c),a.push(c))}for(var l=0,h=i;l<h.length;l++){c=h[l];o.has(c)||(o.add(c),a.push(c))}return a}function j(t,e){var n=[],r=x(t,e,!1);if(P(r))return n;for(var i=J(r.keys()),o=0;;){var a=V(i);if(!a)return n.length=o,n;var s=G(a);try{n[o]=s}catch(t){try{X(i)}finally{throw t}}o++}}function L(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function P(t){return void 0===t}function B(t){return null===t}function U(t){return"symbol"==typeof t}function z(t){return"object"==typeof t?null!==t:"function"==typeof t}function M(t,e){switch(L(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var n=3===e?"string":5===e?"number":"default",i=Y(t,r);if(void 0!==i){var o=i.call(t,n);if(z(o))throw new TypeError;return o}return D(t,"default"===n?"number":n)}function D(t,e){if("string"===e){var n=t.toString;if(H(n))if(!z(i=n.call(t)))return i;if(H(r=t.valueOf))if(!z(i=r.call(t)))return i}else{var r;if(H(r=t.valueOf))if(!z(i=r.call(t)))return i;var i,o=t.toString;if(H(o))if(!z(i=o.call(t)))return i}throw new TypeError}function F(t){return!!t}function q(t){return""+t}function Z(t){var e=M(t,3);return U(e)?e:q(e)}function W(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function H(t){return"function"==typeof t}function $(t){return"function"==typeof t}function K(t){switch(L(t)){case 3:case 4:return!0;default:return!1}}function Y(t,e){var n=t[e];if(null!=n){if(!H(n))throw new TypeError;return n}}function J(t){var e=Y(t,i);if(!H(e))throw new TypeError;var n=e.call(t);if(!z(n))throw new TypeError;return n}function G(t){return t.value}function V(t){var e=t.next();return!e.done&&e}function X(t){var e=t.return;e&&e.call(t)}function Q(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var n=t.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return e;var i=r.constructor;return"function"!=typeof i||i===t?e:i}function tt(){var t={},e=[],n=function(){function t(t,e,n){this._index=0,this._keys=t,this._values=e,this._selector=n}return t.prototype["@@iterator"]=function(){return this},t.prototype[i]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var n=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var n=this._find(t,!0);return this._values[n]=e,this},e.prototype.delete=function(e){var n=this._find(e,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new n(this._keys,this._values,r)},e.prototype.values=function(){return new n(this._keys,this._values,o)},e.prototype.entries=function(){return new n(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[i]=function(){return this.entries()},e.prototype._find=function(t,e){return this._cacheKey!==t&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=t)),this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function o(t,e){return e}function a(t,e){return[t,e]}}function et(){return function(){function t(){this._map=new h}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.values()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[i]=function(){return this.keys()},t}()}function nt(){var t=16,n=u.create(),r=i();return function(){function t(){this._key=i()}return t.prototype.has=function(t){var e=o(t,!1);return void 0!==e&&u.has(e,this._key)},t.prototype.get=function(t){var e=o(t,!1);return void 0!==e?u.get(e,this._key):void 0},t.prototype.set=function(t,e){return o(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=o(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=i()},t}();function i(){var t;do{t="@@WeakMap@@"+c()}while(u.has(n,t));return n[t]=!0,t}function o(t,n){if(!e.call(t,r)){if(!n)return;Object.defineProperty(t,r,{value:u.create()})}return t[r]}function a(t,e){for(var n=0;n<e;++n)t[n]=255*Math.random()|0;return t}function s(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):a(new Uint8Array(t),t):a(new Array(t),t)}function c(){var e=s(t);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<t;++r){var i=e[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function rt(t){return t.__=void 0,delete t.__,t}t("decorate",p),t("metadata",v),t("defineMetadata",g),t("hasMetadata",_),t("hasOwnMetadata",y),t("getMetadata",m),t("getOwnMetadata",w),t("getMetadataKeys",b),t("getOwnMetadataKeys",k),t("deleteMetadata",E)}(i)}()}(Xu||(Xu={}));const dc=Symbol("required"),pc=Symbol("checkType"),vc=(...t)=>(e,n,r)=>{let i=Reflect.getOwnMetadata(dc,e,n)||[];i.push({parameterIndex:r,fields:t}),Reflect.defineMetadata(dc,i,e,n)},gc=(t,e,n)=>(r,i,o)=>{let a=Reflect.getOwnMetadata(pc,r,i)||[];a.push({parameterIndex:o,type:t,properties:e,key:n}),Reflect.defineMetadata(pc,a,r,i)};const _c=(t,e,n)=>{const r=n.value,i=r.toString().match(/\(.*?\)/)[0].replace(/[()]/gi,"").replace(/\s/gi,"").split(",");return n.value=function(){const n=Reflect.getOwnMetadata(dc,t,e),o=Reflect.getOwnMetadata(pc,t,e);return o&&o.forEach((t=>{const{parameterIndex:e,type:n,properties:r,key:o}=t;let a=arguments[e],s=i[e];if(!p.isEmpty(o)){const t=null==o?void 0:o.split(".");Array.isArray(t)&&t.length>0&&t.forEach((t=>{a=a[t],s=`${s}.${t}`}))}const u=typeof a;if(!p.isUndefined(a)){if(!vt(a,n))throw yu.wrongTypeParam(s,n,Array.isArray(a)?"array":null===a?"null":u);"object"===n&&Object.entries(r).forEach((([t,e])=>{const n=a[t];if(!p.isUndefined(n)){if(Array.isArray(e)&&!e.includes(n))throw yu.wrongTypeParam(`${s}.${t}`,`${e}`.replace(/,/g,"|"),`'${n}'`);if(!Array.isArray(e)&&!vt(n,e))throw yu.wrongTypeParam(`${s}.${t}`,e,Array.isArray(n)?"array":null===n?"null":typeof n)}}))}})),n&&n.forEach((t=>{const{parameterIndex:e,fields:n}=t,r=arguments[e],o=i[e],a=typeof r;if(!Array.isArray(r)&&"object"===a&&n.some((t=>p.isUndefined(r[t]))))throw yu.missingParam(`${n} in ${o}`);if("object"!==a&&(e>=arguments.length||p.isUndefined(r)))throw yu.missingParam(o)})),r.apply(this,arguments)},n};var yc;class mc{constructor(){this.events=Ct.getInstance(),yc.set(this,void 0),Tt(this,yc,this.getInstance()),this.events.addListener=(t,e,n)=>{console.log(123123);const r=t;return this.events.addListener(exports.Events[r],e,n)}}login(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).login(t)}))}getAccessToken(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getAccessToken(t)}))}getVersion(){return xt(this,yc).getVersion()}getSystemInfo(){return xt(this,yc).getSystemInfo()}setNavigationBarTitle(t){return St(this,void 0,void 0,(function*(){return xt(this,yc).setNavigationBarTitle(t)}))}setNavigationBarColor(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).setNavigationBarColor(t)}))}setBackgroundColor(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).setBackgroundColor(t)}))}setNavigationBarLeftButton(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).setNavigationBarLeftButton(t)}))}setDeviceOrientation(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).setDeviceOrientation(t)}))}setStorage(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).setStorage(t)}))}getStorage(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getStorage(t)}))}getStorageInfo(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getStorageInfo(t)}))}removeStorage(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).removeStorage(t)}))}clearStorage(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).clearStorage(t)}))}getUserInfo(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getUserInfo(t)}))}getNetworkType(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getNetworkType(t)}))}onNetworkStatusChange(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).onNetworkStatusChange(t)}))}startBeaconDiscovery(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).startBeaconDiscovery(t)}))}stopBeaconDiscovery(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).stopBeaconDiscovery(t)}))}getBeacons(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getBeacons(t)}))}closeApp(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).closeApp(t)}))}getLocation(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getLocation(t)}))}stopBluetoothDevicesDiscovery(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).stopBluetoothDevicesDiscovery()}))}startBluetoothDevicesDiscovery(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).startBluetoothDevicesDiscovery(t)}))}openBluetoothAdapter(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).openBluetoothAdapter()}))}onBluetoothDeviceFound(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).onBluetoothDeviceFound()}))}onBluetoothAdapterStateChange(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).onBluetoothAdapterStateChange()}))}getConnectedBluetoothDevices(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getConnectedBluetoothDevices(t)}))}getBluetoothDevices(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getBluetoothDevices()}))}getBluetoothAdapterState(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).getBluetoothAdapterState()}))}closeBluetoothAdapter(){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).closeBluetoothAdapter()}))}scanQRCode(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).scanQRCode(t)}))}openProfile(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).openProfile(t)}))}openChat(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).openChat(t)}))}openPostFeed(t){return St(this,void 0,void 0,(function*(){const e=t.type;if("image"===e&>(t.data.imageUrl))throw yu.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("link"===e&&(gt(t.data.link)||!ct(t.data.link)))throw yu.wrongTypeParam("object.data.link","valid url","invalid");if("profile"===e){if(gt(t.data.id))throw yu.wrongTypeParam("object.data.id","valid id","empty");if(gt(t.data.avatar)||!ct(t.data.avatar))throw yu.wrongTypeParam("object.data.avatar","valid url","invalid");if(gt(t.data.displayName))throw yu.wrongTypeParam("object.data.displayName","valid displayName","empty")}return yield xt(this,yc).openPostFeed(t)}))}followOA(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).followOA(t)}))}unfollowOA(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).unFollowOA(t)}))}openShareSheet(t){return St(this,void 0,void 0,(function*(){const e=t.type;if("image"===e&>(t.data.imageUrl))throw yu.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("gif"===e&&(gt(t.data.gifUrl)||!ct(t.data.gifUrl)))throw yu.wrongTypeParam("object.data.gifUrl","valid url","invalid");if("video"===e){if(gt(t.data.videoThumb)||!ct(t.data.videoThumb))throw yu.wrongTypeParam("object.data.videoThumb","valid url","invalid");if(gt(t.data.videoUrl)||!ct(t.data.videoUrl))throw yu.wrongTypeParam("object.data.videoUrl","valid url","invalid")}else{if("link"===e&&(gt(t.data.link)||!ct(t.data.link)))throw yu.wrongTypeParam("object.data.link","valid url","invalid");if("oa"===e&>(t.data.id))throw yu.wrongTypeParam("object.data.id","valid id","empty")}return yield xt(this,yc).openShareSheet(t)}))}requestCameraPermission(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).requestCameraPermission(t)}))}createShortcut(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).createShortcut(t)}))}openBioAuthentication(t){var e;return St(this,void 0,void 0,(function*(){return p.isUndefined(t.requireFingerprint)&&(t.requireFingerprint=!0),gt(null===(e=t.ui)||void 0===e?void 0:e.title)&&(t.ui=Object.assign(Object.assign({},t.ui),{title:"Xác thực"})),gt(t.ui.subTitle)&&(t.ui=Object.assign(Object.assign({},t.ui),{subTitle:"Sử dụng sinh trắc học của bạn để xác thực"})),gt(t.ui.negativeButtonText)&&(t.ui=Object.assign(Object.assign({},t.ui),{negativeButtonText:"Đóng"})),yield xt(this,yc).openBioAuthentication(t)}))}checkStateBioAuthentication(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).checkStateBioAuthentication(t)}))}sendLocation(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).sendLocation(t)}))}showToast(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).showToast(t)}))}hideKeyboard(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).hideKeyboard(t)}))}openPhone(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).openPhone(t)}))}openSMS(t){return St(this,void 0,void 0,(function*(){if(!/^\+?\d+$/.test(t.phoneNumber))throw yu.wrongTypeParam("object.phoneNumber","valid phone","invalid");yield xt(this,yc).openSMS(t)}))}viewOAQr(t){return St(this,void 0,void 0,(function*(){(p.isUndefined(t.displayName)||p.isNull(t.displayName))&&(t.displayName=""),yield xt(this,yc).viewOAQr(t)}))}keepScreen(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).keepScreen(t)}))}saveImageToPhotosAlbum(t){return St(this,void 0,void 0,(function*(){if(gt(t.imageBase64Data)&>(t.imageUrl))throw yu.wrongTypeParam("object.imageBase64Data | object.imageUrl","valid data","invalid");if(!gt(t.imageUrl)&&!ct(t.imageUrl))throw yu.wrongTypeParam("object.imageUrl","valid url","invalid");return yield xt(this,yc).saveImageToPhotosAlbum(t)}))}openMiniApp(t){return St(this,void 0,void 0,(function*(){if(!p.isEmpty(t.params)){const e=t.params||{};Object.keys(e).forEach((t=>{"object"==typeof e[t]&&(e[t]=JSON.stringify(e[t])),e[t]=""+encodeURIComponent(e[t])})),t.params=e}yield xt(this,yc).openMiniApp(t)}))}vibrate(t){return St(this,void 0,void 0,(function*(){gt(t.type)&&(t.type="oneShot"),gt(t.milliseconds)&&(t.milliseconds=500),yield xt(this,yc).vibrate(t)}))}openWebview(t){return St(this,void 0,void 0,(function*(){yield xt(this,yc).openWebview(t)}))}getRouteParams(){return xt(this,yc).getRouteParams()}getAppInfo(t){return xt(this,yc).getAppInfo()}sendDataToPreviousMiniApp(t){return xt(this,yc).sendDataToPreviousMiniApp(t)}onCallbackData(t){return St(this,void 0,void 0,(function*(){return yield xt(this,yc).onCallbackData(t)}))}getPhoneNumber(t){return xt(this,yc).getPhoneNumber()}}yc=new WeakMap,Et([pu],mc.prototype,"login",null),Et([pu],mc.prototype,"getAccessToken",null),Et([vu],mc.prototype,"getVersion",null),Et([vu],mc.prototype,"getSystemInfo",null),Et([pu,_c,At(0,gc("object",{title:"string"})),At(0,vc("title"))],mc.prototype,"setNavigationBarTitle",null),Et([pu,_c,At(0,gc("object",{color:"string",textColor:["white","black"],statusBarColor:"string"})),At(0,vc("color"))],mc.prototype,"setNavigationBarColor",null),Et([pu,_c,At(0,gc("object",{backgroundColor:"string",textColor:["white","black"]})),At(0,vc("backgroundColor"))],mc.prototype,"setBackgroundColor",null),Et([pu,_c,At(0,gc("object",{type:["none","back","home","both"]})),At(0,vc("type"))],mc.prototype,"setNavigationBarLeftButton",null),Et([pu,_c,At(0,gc("object",{rotate:["auto","portrait","landscape"]})),At(0,vc("rotate"))],mc.prototype,"setDeviceOrientation",null),Et([pu,_c,At(0,gc("object",{data:"object"})),At(0,vc("data"))],mc.prototype,"setStorage",null),Et([pu,_c,At(0,gc("object",{keys:"array<string>"})),At(0,vc("keys"))],mc.prototype,"getStorage",null),Et([pu],mc.prototype,"getStorageInfo",null),Et([pu,_c,At(0,gc("object",{keys:"array<string>"})),At(0,vc("keys"))],mc.prototype,"removeStorage",null),Et([pu],mc.prototype,"clearStorage",null),Et([pu],mc.prototype,"getUserInfo",null),Et([pu],mc.prototype,"getNetworkType",null),Et([pu],mc.prototype,"onNetworkStatusChange",null),Et([pu],mc.prototype,"startBeaconDiscovery",null),Et([pu],mc.prototype,"stopBeaconDiscovery",null),Et([pu],mc.prototype,"getBeacons",null),Et([pu],mc.prototype,"closeApp",null),Et([pu],mc.prototype,"getLocation",null),Et([pu],mc.prototype,"stopBluetoothDevicesDiscovery",null),Et([pu],mc.prototype,"startBluetoothDevicesDiscovery",null),Et([pu],mc.prototype,"openBluetoothAdapter",null),Et([pu],mc.prototype,"onBluetoothDeviceFound",null),Et([pu],mc.prototype,"onBluetoothAdapterStateChange",null),Et([pu],mc.prototype,"getConnectedBluetoothDevices",null),Et([pu],mc.prototype,"getBluetoothDevices",null),Et([pu],mc.prototype,"getBluetoothAdapterState",null),Et([pu],mc.prototype,"closeBluetoothAdapter",null),Et([pu],mc.prototype,"scanQRCode",null),Et([pu,_c,At(0,gc("object",{type:["user","oa","aliasOA"],id:"string"})),At(0,vc("type","id"))],mc.prototype,"openProfile",null),Et([pu,_c,At(0,gc("object",{type:["user","oa"],id:"string"})),At(0,vc("type","id"))],mc.prototype,"openChat",null),Et([pu,_c,At(0,gc("object",{type:["image","link","profile"],data:"object"})),At(0,gc("object",{imageUrl:"string",link:"string",title:"string",thumb:"string",description:"string",avatar:"string",id:"string",displayName:"string"},"data")),At(0,vc("type","data"))],mc.prototype,"openPostFeed",null),Et([pu,_c,At(0,gc("object",{id:"string",showDialogConfirm:"boolean"})),At(0,vc("id"))],mc.prototype,"followOA",null),Et([pu,_c,At(0,gc("object",{id:"string"})),At(0,vc("id"))],mc.prototype,"unfollowOA",null),Et([pu,_c,At(0,gc("object",{type:["image","gif","video","link","oa"],data:"object"})),At(0,gc("object",{imageUrl:"string",gifUrl:"string",width:"number",height:"number",videoThumb:"string",videoUrl:"string",link:"string",chatOnly:"boolean",id:"string"},"data")),At(0,vc("type","data"))],mc.prototype,"openShareSheet",null),Et([pu],mc.prototype,"requestCameraPermission",null),Et([pu],mc.prototype,"createShortcut",null),Et([pu,_c,At(0,vc("secretData")),At(0,gc("object",{secretData:"string",ui:"object",requireFingerprint:"boolean"})),At(0,gc("object",{title:"string",subTitle:"string",negativeButtonText:"string"},"ui"))],mc.prototype,"openBioAuthentication",null),Et([pu],mc.prototype,"checkStateBioAuthentication",null),Et([pu,_c,At(0,vc("toUserId"))],mc.prototype,"sendLocation",null),Et([pu,_c,At(0,vc("message"))],mc.prototype,"showToast",null),Et([pu],mc.prototype,"hideKeyboard",null),Et([pu,_c,At(0,vc("phoneNumber")),At(0,gc("object",{phoneNumber:"string"}))],mc.prototype,"openPhone",null),Et([pu,_c,At(0,vc("content","phoneNumber")),At(0,gc("object",{content:"string",phoneNumber:"string"}))],mc.prototype,"openSMS",null),Et([pu,_c,At(0,vc("id")),At(0,gc("object",{id:"string",displayName:"string"}))],mc.prototype,"viewOAQr",null),Et([pu],mc.prototype,"keepScreen",null),Et([pu,_c,At(0,gc("object",{imageBase64Data:"string",imageUrl:"string",type:"string"}))],mc.prototype,"saveImageToPhotosAlbum",null),Et([pu,_c,At(0,vc("appId")),At(0,gc("object",{appId:"string",params:"object"}))],mc.prototype,"openMiniApp",null),Et([pu,_c,At(0,gc("object",{type:["oneShot"],milliseconds:"number"}))],mc.prototype,"vibrate",null),Et([pu,_c,At(0,vc("url")),At(0,gc("object",{url:"string"}))],mc.prototype,"openWebview",null),Et([vu],mc.prototype,"getRouteParams",null),Et([pu],mc.prototype,"getAppInfo",null),Et([pu],mc.prototype,"sendDataToPreviousMiniApp",null),Et([pu],mc.prototype,"onCallbackData",null),Et([pu],mc.prototype,"getPhoneNumber",null);class wc extends mc{getInstance(){return hc.getInstance()}}class bc extends mc{getInstance(){return new fc}}const kc=ht();exports.default=void 0,window.onJSCall=t=>function(e){lu.getInstance().onJSCall(t,e)},window.onMultiJSCall=t=>function(e){lu.getInstance().onMultiJSCall(t,e)},window.zaloJSV2={zalo_h5_event_handler:function(t,e,n){lu.getInstance().nativeEventHandler(t,e,n)}},kc.isZalo?exports.default=new wc:exports.default=new bc,window.ZaloMiniAppSDK=exports.default,exports.SDKCreator=mc,exports.default=exports.default;
|
|
18
|
+
var qi=/[^\x20-\x7E]/,Zi=/[\x2E\u3002\uFF0E\uFF61]/g,Wi={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$i=Math.floor,Hi=String.fromCharCode;function Ki(e){throw new RangeError(Wi[e])}function Yi(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function Gi(e,t,n){var r=0;for(e=n?$i(e/700):e>>1,e+=$i(e/t);e>455;r+=36)e=$i(e/35);return $i(r+36*e/(e+38))}function Ji(e){return function(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var i=function(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}((e=e.replace(Zi,".")).split("."),t).join(".");return r+i}(e,(function(e){return qi.test(e)?"xn--"+function(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,p,v,g=[];for(h=(e=function(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}(e)).length,t=128,n=0,o=72,a=0;a<h;++a)(f=e[a])<128&&g.push(Hi(f));for(r=i=g.length,i&&g.push("-");r<h;){for(s=2147483647,a=0;a<h;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>$i((2147483647-n)/(d=r+1))&&Ki("overflow"),n+=(s-t)*d,t=s,a=0;a<h;++a)if((f=e[a])<t&&++n>2147483647&&Ki("overflow"),f==t){for(u=n,c=36;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=36)v=u-l,p=36-l,g.push(Hi(Yi(l+v%p,0))),u=$i(v/p);g.push(Hi(Yi(u,0))),o=Gi(n,d,r==i),n=0,++r}++n,++t}return g.join("")}(e):e}))}function Vi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Xi=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function Qi(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function eo(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var to=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t};function no(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var c,l,f,h,d=e[u].replace(o,"%20"),p=d.indexOf(n);p>=0?(c=d.substr(0,p),l=d.substr(p+1)):(c=d,l=""),f=decodeURIComponent(c),h=decodeURIComponent(l),Vi(i,f)?Xi(i[f])?i[f].push(h):i[f]=[i[f],h]:i[f]=h}return i}var ro={parse:mo,resolve:function(e,t){return mo(e,!1,!0).resolve(t)},resolveObject:function(e,t){return e?mo(e,!1,!0).resolveObject(t):t},format:function(e){tt(e)&&(e=yo({},e));return wo(e)},Url:io};function io(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var oo=/^([a-z0-9.+-]+:)/i,ao=/:[0-9]*$/,so=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,uo=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),co=["'"].concat(uo),lo=["%","/","?",";","#"].concat(co),fo=["/","?","#"],ho=/^[+a-z0-9A-Z_-]{0,63}$/,po=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,vo={javascript:!0,"javascript:":!0},go={javascript:!0,"javascript:":!0},_o={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function mo(e,t,n){if(e&&it(e)&&e instanceof io)return e;var r=new io;return r.parse(e,t,n),r}function yo(e,t,n,r){if(!tt(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),o=-1!==i&&i<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!r&&1===t.split("#").length){var u=so.exec(s);if(u)return e.path=s,e.href=s,e.pathname=u[1],u[2]?(e.search=u[2],e.query=n?no(e.search.substr(1)):e.search.substr(1)):n&&(e.search="",e.query={}),e}var c,l,f,h,d=oo.exec(s);if(d){var p=(d=d[0]).toLowerCase();e.protocol=p,s=s.substr(d.length)}if(r||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===s.substr(0,2);!v||d&&go[d]||(s=s.substr(2),e.slashes=!0)}if(!go[d]&&(v||d&&!_o[d])){var g,_,m=-1;for(c=0;c<fo.length;c++)-1!==(l=s.indexOf(fo[c]))&&(-1===m||l<m)&&(m=l);for(-1!==(_=-1===m?s.lastIndexOf("@"):s.lastIndexOf("@",m))&&(g=s.slice(0,_),s=s.slice(_+1),e.auth=decodeURIComponent(g)),m=-1,c=0;c<lo.length;c++)-1!==(l=s.indexOf(lo[c]))&&(-1===m||l<m)&&(m=l);-1===m&&(m=s.length),e.host=s.slice(0,m),s=s.slice(m),bo(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var w=e.hostname.split(/\./);for(c=0,f=w.length;c<f;c++){var b=w[c];if(b&&!b.match(ho)){for(var k="",E=0,A=b.length;E<A;E++)b.charCodeAt(E)>127?k+="x":k+=b[E];if(!k.match(ho)){var S=w.slice(0,c),x=w.slice(c+1),C=b.match(po);C&&(S.push(C[1]),x.unshift(C[2])),x.length&&(s="/"+x.join(".")+s),e.hostname=S.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=Ji(e.hostname)),h=e.port?":"+e.port:"";var T=e.hostname||"";e.host=T+h,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!vo[p])for(c=0,f=co.length;c<f;c++){var R=co[c];if(-1!==s.indexOf(R)){var O=encodeURIComponent(R);O===R&&(O=escape(R)),s=s.split(R).join(O)}}var I=s.indexOf("#");-1!==I&&(e.hash=s.substr(I),s=s.slice(0,I));var N=s.indexOf("?");if(-1!==N?(e.search=s.substr(N),e.query=s.substr(N+1),n&&(e.query=no(e.query)),s=s.slice(0,N)):n&&(e.search="",e.query={}),s&&(e.pathname=s),_o[p]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){h=e.pathname||"";var j=e.search||"";e.path=h+j}return e.href=wo(e),e}function wo(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var n=e.protocol||"",r=e.pathname||"",i=e.hash||"",o=!1,a="";e.host?o=t+e.host:e.hostname&&(o=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(o+=":"+e.port)),e.query&&it(e.query)&&Object.keys(e.query).length&&(a=function(e,t,n,r){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?eo(to(e),(function(r){var i=encodeURIComponent(Qi(r))+n;return Xi(e[r])?eo(e[r],(function(e){return i+encodeURIComponent(Qi(e))})).join(t):i+encodeURIComponent(Qi(e[r]))})).join(t):r?encodeURIComponent(Qi(r))+n+encodeURIComponent(Qi(e)):""}(e.query));var s=e.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),e.slashes||(!n||_o[n])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),n+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i}function bo(e){var t=e.host,n=ao.exec(t);n&&(":"!==(n=n[0])&&(e.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(e.hostname=t)}function ko(e,t){"string"==typeof e&&(e=mo(e));var n=-1===r.location.protocol.search(/^https?:$/)?"http:":"",i=e.protocol||n,o=e.hostname||e.host,a=e.port,s=e.path||"/";o&&-1!==o.indexOf(":")&&(o="["+o+"]"),e.url=(o?i+"//"+o:"")+(a?":"+a:"")+s,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var u=new Di(e);return t&&u.on("response",t),u}function Eo(){}io.prototype.parse=function(e,t,n){return yo(this,e,t,n)},io.prototype.format=function(){return wo(this)},io.prototype.resolve=function(e){return this.resolveObject(mo(e,!1,!0)).format()},io.prototype.resolveObject=function(e){if(tt(e)){var t=new io;t.parse(e,!1,!0),e=t}for(var n,r=new io,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(r[c]=e[c])}return _o[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!_o[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var h=l[f];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||go[e.protocol])r.pathname=e.pathname;else{for(n=(e.pathname||"").split("/");n.length&&!(e.host=n.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",p=r.search||"";r.path=d+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v,g=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),m=_||g||r.host&&e.pathname,y=m,w=r.pathname&&r.pathname.split("/")||[],b=r.protocol&&!_o[r.protocol];if(n=e.pathname&&e.pathname.split("/")||[],b&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===n[0]?n[0]=e.host:n.unshift(e.host)),e.host=null),m=m&&(""===n[0]||""===w[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=n;else if(n.length)w||(w=[]),w.pop(),w=w.concat(n),r.search=e.search,r.query=e.query;else if(!Qe(e.search))return b&&(r.hostname=r.host=w.shift(),(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),r.search=e.search,r.query=e.query,Xe(r.pathname)&&Xe(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=w.slice(-1)[0],E=(r.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,A=0,S=w.length;S>=0;S--)"."===(k=w[S])?w.splice(S,1):".."===k?(w.splice(S,1),A++):A&&(w.splice(S,1),A--);if(!m&&!y)for(;A--;A)w.unshift("..");!m||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),E&&"/"!==w.join("/").substr(-1)&&w.push("");var x=""===w[0]||w[0]&&"/"===w[0].charAt(0);return b&&(r.hostname=r.host=x?"":w.length?w.shift():"",(v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=v.shift(),r.host=r.hostname=v.shift())),(m=m||r.host&&w.length)&&!x&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),Xe(r.pathname)&&Xe(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},io.prototype.parseHost=function(){return bo(this)},Eo.defaultMaxSockets=4;var Ao={request:ko,get:function(e,t){var n=ko(e,t);return n.end(),n},Agent:Eo,METHODS:["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],STATUS_CODES:{100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}};function So(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}var xo,Co=Object.prototype.hasOwnProperty,To=Object.keys||function(e){var t=[];for(var n in e)Co.call(e,n)&&t.push(n);return t},Ro=Array.prototype.slice;function Oo(){return void 0!==xo?xo:xo="foo"===function(){}.name}function Io(e){return Object.prototype.toString.call(e)}function No(e){return!Pe(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function jo(e,t){e||Do(e,!0,t,"==",Fo)}var Lo,Po=/\s*function\s+([^\(\s]*)\s*/;function Bo(e){if(st(e)){if(Oo())return e.name;var t=e.toString().match(Po);return t&&t[1]}}function Mo(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return Uo(zo(e.actual),128)+" "+e.operator+" "+Uo(zo(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||Do;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=Bo(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}}function Uo(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function zo(e){if(Oo()||!st(e))return We(e);var t=Bo(e);return"[Function"+(t?": "+t:"")+"]"}function Do(e,t,n,r,i){throw new Mo({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function Fo(e,t){e||Do(e,!0,t,"==",Fo)}function qo(e,t,n,r){if(e===t)return!0;if(Pe(e)&&Pe(t))return 0===So(e,t);if(ot(e)&&ot(t))return e.getTime()===t.getTime();if(rt(e)&&rt(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(No(e)&&No(t)&&Io(e)===Io(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===So(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(Pe(e)!==Pe(t))return!1;var i=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==i&&i===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(ut(e)||ut(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=Zo(e),o=Zo(t);if(i&&!o||!i&&o)return!1;if(i)return qo(e=Ro.call(e),t=Ro.call(t),n);var a,s,u=To(e),c=To(t);if(u.length!==c.length)return!1;for(u.sort(),c.sort(),s=u.length-1;s>=0;s--)if(u[s]!==c[s])return!1;for(s=u.length-1;s>=0;s--)if(!qo(e[a=u[s]],t[a],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function Zo(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function Wo(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function $o(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&Do(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&i&&!n;if((!e&&at(i)&&o&&Wo(i,n)||a)&&Do(i,n,"Got unwanted exception"+r),e&&i&&n&&!Wo(i,n)||!e&&i)throw i}jo.AssertionError=Mo,Me(Mo,Error),jo.fail=Do,jo.ok=Fo,jo.equal=function e(t,n,r){t!=n&&Do(t,n,r,"==",e)},jo.notEqual=function e(t,n,r){t==n&&Do(t,n,r,"!=",e)},jo.deepEqual=function e(t,n,r){qo(t,n,!1)||Do(t,n,r,"deepEqual",e)},jo.deepStrictEqual=function e(t,n,r){qo(t,n,!0)||Do(t,n,r,"deepStrictEqual",e)},jo.notDeepEqual=function e(t,n,r){qo(t,n,!1)&&Do(t,n,r,"notDeepEqual",e)},jo.notDeepStrictEqual=function e(t,n,r){qo(t,n,!0)&&Do(t,n,r,"notDeepStrictEqual",e)},jo.strictEqual=function e(t,n,r){t!==n&&Do(t,n,r,"===",e)},jo.notStrictEqual=function e(t,n,r){t===n&&Do(t,n,r,"!==",e)},jo.throws=function(e,t,n){$o(!0,e,t,n)},jo.doesNotThrow=function(e,t,n){$o(!1,e,t,n)},jo.ifError=function(e){if(e)throw e};var Ho=function(){if(!Lo)try{Lo=Bt("follow-redirects")}catch(e){Lo=function(){}}Lo.apply(null,arguments)},Ko=ro.URL,Yo=Bi.Writable,Go=["abort","aborted","connect","error","socket","timeout"],Jo=Object.create(null);Go.forEach((function(e){Jo[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var Vo=oa("ERR_FR_REDIRECTION_FAILURE",""),Xo=oa("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Qo=oa("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ea=oa("ERR_STREAM_WRITE_AFTER_END","write after end");function ta(e,t){Yo.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){n._processResponse(e)},this._performRequest()}function na(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",o=n[i]=e[r],a=t[r]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,r,o){if("string"==typeof e){var a=e;try{e=function(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};""!==e.port&&(t.port=Number(e.port));return t}(new Ko(a))}catch(t){e=ro.parse(a)}}else o=r,r=e,e={protocol:i};return"function"==typeof r&&(o=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,jo.equal(r.protocol,i,"protocol mismatch"),Ho("options",r),new ta(r,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=a.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function ra(){}function ia(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return n}function oa(e,t){function n(e){Error.captureStackTrace(this,this.constructor),this.message=e||t}return n.prototype=new Error,n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n.prototype.code=e,n}function aa(e){for(var t=0;t<Go.length;t++)e.removeListener(Go[t],Jo[Go[t]]);e.on("error",ra),e.abort()}ta.prototype=Object.create(Yo.prototype),ta.prototype.abort=function(){aa(this._currentRequest),this.emit("abort")},ta.prototype.write=function(e,t,n){if(this._ending)throw new ea;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new Qo),this.abort()):n&&n()},ta.prototype.end=function(e,t,n){if("function"==typeof e?(n=e,e=t=null):"function"==typeof t&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,(function(){r._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},ta.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},ta.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},ta.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),o()}),e),r(t)}function o(){clearTimeout(this._timeout),t&&n.removeListener("timeout",t),this.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.once("response",o),this.once("error",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){ta.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(ta.prototype,e,{get:function(){return this._currentRequest[e]}})})),ta.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},ta.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var n=e.substr(0,e.length-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=ro.format(this._options),r._redirectable=this;for(var i=0;i<Go.length;i++)r.on(Go[i],Jo[Go[i]]);if(this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;!function e(t){if(r===a._currentRequest)if(t)a.emit("error",t);else if(o<s.length){var n=s[o++];r.finished||r.write(n.data,n.encoding,e)}else a._ended&&r.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},ta.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n=e.headers.location;if(n&&!1!==this._options.followRedirects&&t>=300&&t<400){if(aa(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Xo);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ia(/^content-/i,this._options.headers));var r=ia(/^host$/i,this._options.headers)||ro.parse(this._currentUrl).hostname,i=ro.resolve(this._currentUrl,n);Ho("redirecting to",i),this._isRedirect=!0;var o=ro.parse(i);if(Object.assign(this._options,o),o.hostname!==r&&ia(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var a={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,a)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){var s=new Vo("Redirected request failed: "+e.message);s.cause=e,this.emit("error",s)}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]};var sa=na({http:Ao,https:Ao}),ua=na;sa.wrap=ua;var ca={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function la(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function fa(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]}var ha=Uint8Array,da=Uint16Array,pa=Int32Array;function va(e){for(var t=e.length;--t>=0;)e[t]=0}var ga=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],_a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ma=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ya=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],wa=new Array(576);va(wa);var ba=new Array(60);va(ba);var ka=new Array(512);va(ka);var Ea=new Array(256);va(Ea);var Aa=new Array(29);va(Aa);var Sa,xa,Ca,Ta=new Array(30);function Ra(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function Oa(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Ia(e){return e<256?ka[e]:ka[256+(e>>>7)]}function Na(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ja(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,Na(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function La(e,t,n){ja(e,n[2*t],n[2*t+1])}function Pa(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function Ba(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=Pa(o[s]++,s))}}function Ma(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ua(e){e.bi_valid>8?Na(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function za(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function Da(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&za(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!za(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Fa(e,t,n){var r,i,o,a,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?La(e,i,t):(La(e,(o=Ea[i])+256+1,t),0!==(a=ga[o])&&ja(e,i-=Aa[o],a),La(e,o=Ia(--r),n),0!==(a=_a[o])&&ja(e,r-=Ta[o],a))}while(s<e.last_lit);La(e,256,t)}function qa(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)Da(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Da(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,Da(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,v++),u[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=d&&(a=h[r-d]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==v){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),Ba(o,c,e.bl_count)}function Za(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function Wa(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)do{La(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(La(e,i,e.bl_tree),s--),La(e,16,e.bl_tree),ja(e,s-3,2)):s<=10?(La(e,17,e.bl_tree),ja(e,s-3,3)):(La(e,18,e.bl_tree),ja(e,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}va(Ta);var $a=!1;function Ha(e){$a||(!function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(Aa[r]=n,e=0;e<1<<ga[r];e++)Ea[n++]=r;for(Ea[n-1]=r,i=0,r=0;r<16;r++)for(Ta[r]=i,e=0;e<1<<_a[r];e++)ka[i++]=r;for(i>>=7;r<30;r++)for(Ta[r]=i<<7,e=0;e<1<<_a[r]-7;e++)ka[256+i++]=r;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)wa[2*e+1]=8,e++,o[8]++;for(;e<=255;)wa[2*e+1]=9,e++,o[9]++;for(;e<=279;)wa[2*e+1]=7,e++,o[7]++;for(;e<=287;)wa[2*e+1]=8,e++,o[8]++;for(Ba(wa,287,o),e=0;e<30;e++)ba[2*e+1]=5,ba[2*e]=Pa(e,5);Sa=new Ra(wa,ga,257,286,15),xa=new Ra(ba,_a,0,30,15),Ca=new Ra(new Array(0),ma,0,19,7)}(),$a=!0),e.l_desc=new Oa(e.dyn_ltree,Sa),e.d_desc=new Oa(e.dyn_dtree,xa),e.bl_desc=new Oa(e.bl_tree,Ca),e.bi_buf=0,e.bi_valid=0,Ma(e)}function Ka(e,t,n,r){ja(e,0+(r?1:0),3),function(e,t,n,r){Ua(e),r&&(Na(e,n),Na(e,~n)),fa(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}function Ya(e){ja(e,2,3),La(e,256,wa),function(e){16===e.bi_valid?(Na(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}function Ga(e,t,n,r){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),qa(e,e.l_desc),qa(e,e.d_desc),a=function(e){var t;for(Za(e,e.dyn_ltree,e.l_desc.max_code),Za(e,e.dyn_dtree,e.d_desc.max_code),qa(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ya[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?Ka(e,t,n,r):4===e.strategy||o===i?(ja(e,2+(r?1:0),3),Fa(e,wa,ba)):(ja(e,4+(r?1:0),3),function(e,t,n,r){var i;for(ja(e,t-257,5),ja(e,n-1,5),ja(e,r-4,4),i=0;i<r;i++)ja(e,e.bl_tree[2*ya[i]+1],3);Wa(e,e.dyn_ltree,t-1),Wa(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Fa(e,e.dyn_ltree,e.dyn_dtree)),Ma(e),r&&Ua(e)}function Ja(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Ea[n]+256+1)]++,e.dyn_dtree[2*Ia(t)]++),e.last_lit===e.lit_bufsize-1}function Va(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}var Xa=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Qa(e,t,n,r){var i=Xa,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}var es;function ts(e,t){return e.msg=ca[t],t}function ns(e){return(e<<1)-(e>4?9:0)}function rs(e){for(var t=e.length;--t>=0;)e[t]=0}function is(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(fa(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function os(e,t){Ga(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,is(e.strm)}function as(e,t){e.pending_buf[e.pending++]=t}function ss(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function us(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+258,d=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<h);if(r=258-(h-o),o=h-258,r>a){if(e.match_start=t,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function cs(e){var t,n,r,i,o,a,s,u,c,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-262)){fa(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=f?r-f:0}while(--n);t=n=f;do{r=e.prev[--t],e.prev[t]=r>=f?r-f:0}while(--n);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,s=e.window,u=e.strstart+e.lookahead,c=i,l=void 0,(l=a.avail_in)>c&&(l=c),n=0===l?0:(a.avail_in-=l,fa(s,a.input,a.next_in,l,u),1===a.state.wrap?a.adler=Va(a.adler,s,l,u):2===a.state.wrap&&(a.adler=Qa(a.adler,s,l,u)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function ls(e,t){for(var n,r;;){if(e.lookahead<262){if(cs(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=us(e,n)),e.match_length>=3)if(r=Ja(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=Ja(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(os(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(os(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(os(e,!1),0===e.strm.avail_out)?1:2}function fs(e,t){for(var n,r,i;;){if(e.lookahead<262){if(cs(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=us(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=Ja(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(os(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Ja(e,0,e.window[e.strstart-1]))&&os(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Ja(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(os(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(os(e,!1),0===e.strm.avail_out)?1:2}function hs(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function ds(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new da(1146),this.dyn_dtree=new da(122),this.bl_tree=new da(78),rs(this.dyn_ltree),rs(this.dyn_dtree),rs(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new da(16),this.heap=new da(573),rs(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new da(573),rs(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ps(e){var t=function(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,Ha(t),0):ts(e,-2)}(e);return 0===t&&function(e){e.window_size=2*e.w_size,rs(e.head),e.max_lazy_match=es[e.level].max_lazy,e.good_match=es[e.level].good_length,e.nice_match=es[e.level].nice_length,e.max_chain_length=es[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0}(e.state),t}function vs(e,t){var n,r,i,o;if(!e||!e.state||t>5||t<0)return e?ts(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return ts(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,as(r,31),as(r,139),as(r,8),r.gzhead?(as(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),as(r,255&r.gzhead.time),as(r,r.gzhead.time>>8&255),as(r,r.gzhead.time>>16&255),as(r,r.gzhead.time>>24&255),as(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),as(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(as(r,255&r.gzhead.extra.length),as(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Qa(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(as(r,0),as(r,0),as(r,0),as(r,0),as(r,0),as(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),as(r,3),r.status=113);else{var a=8+(r.w_bits-8<<4)<<8;a|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=113,ss(r,a),0!==r.strstart&&(ss(r,e.adler>>>16),ss(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=Qa(e.adler,r.pending_buf,r.pending-i,i)),is(e),i=r.pending,r.pending!==r.pending_buf_size));)as(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Qa(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Qa(e.adler,r.pending_buf,r.pending-i,i)),is(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,as(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=Qa(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Qa(e.adler,r.pending_buf,r.pending-i,i)),is(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,as(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=Qa(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&is(e),r.pending+2<=r.pending_buf_size&&(as(r,255&e.adler),as(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(is(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&ns(t)<=ns(n)&&4!==t)return ts(e,-5);if(666===r.status&&0!==e.avail_in)return ts(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(cs(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=Ja(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(os(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(os(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(os(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(cs(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+258;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=258-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Ja(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Ja(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(os(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(os(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(os(e,!1),0===e.strm.avail_out)?1:2}(r,t):es[r.level].func(r,t);if(3!==s&&4!==s||(r.status=666),1===s||3===s)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===s&&(1===t?Ya(r):5!==t&&(Ka(r,0,0,!1),3===t&&(rs(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),is(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(as(r,255&e.adler),as(r,e.adler>>8&255),as(r,e.adler>>16&255),as(r,e.adler>>24&255),as(r,255&e.total_in),as(r,e.total_in>>8&255),as(r,e.total_in>>16&255),as(r,e.total_in>>24&255)):(ss(r,e.adler>>>16),ss(r,65535&e.adler)),is(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)}es=[new hs(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(cs(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,os(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(os(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(os(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(os(e,!1),e.strm.avail_out),1)})),new hs(4,4,8,4,ls),new hs(4,5,16,8,ls),new hs(4,6,32,32,ls),new hs(4,4,16,16,fs),new hs(8,16,32,32,fs),new hs(8,16,128,128,fs),new hs(8,32,128,256,fs),new hs(32,128,258,1024,fs),new hs(32,258,258,4096,fs)];function gs(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,_,m,y,w,b,k,E,A,S,x;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,x=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,f=n.wnext,h=n.window,d=n.hold,p=n.bits,v=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,m=(1<<n.distbits)-1;e:do{p<15&&(d+=S[r++]<<p,p+=8,d+=S[r++]<<p,p+=8),y=v[d&_];t:for(;;){if(d>>>=w=y>>>24,p-=w,0===(w=y>>>16&255))x[o++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=v[(65535&y)+(d&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&y,(w&=15)&&(p<w&&(d+=S[r++]<<p,p+=8),b+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=S[r++]<<p,p+=8,d+=S[r++]<<p,p+=8),y=g[d&m];n:for(;;){if(d>>>=w=y>>>24,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&y,p<(w&=15)&&(d+=S[r++]<<p,(p+=8)<w&&(d+=S[r++]<<p,p+=8)),(k+=d&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,A=h,0===f){if(E+=c-w,w<b){b-=w;do{x[o++]=h[E++]}while(--w);E=o-k,A=x}}else if(f<w){if(E+=c+f-w,(w-=f)<b){b-=w;do{x[o++]=h[E++]}while(--w);if(E=0,f<b){b-=w=f;do{x[o++]=h[E++]}while(--w);E=o-k,A=x}}}else if(E+=f-w,w<b){b-=w;do{x[o++]=h[E++]}while(--w);E=o-k,A=x}for(;b>2;)x[o++]=A[E++],x[o++]=A[E++],x[o++]=A[E++],b-=3;b&&(x[o++]=A[E++],b>1&&(x[o++]=A[E++]))}else{E=o-k;do{x[o++]=x[E++],x[o++]=x[E++],x[o++]=x[E++],b-=3}while(b>2);b&&(x[o++]=x[E++],b>1&&(x[o++]=x[E++]))}break}}break}}while(r<i&&o<s);r-=b=p>>3,d&=(1<<(p-=b<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}var _s=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],ms=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ys=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ws=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function bs(e,t,n,r,i,o,a,s){var u,c,l,f,h,d,p,v,g,_=s.bits,m=0,y=0,w=0,b=0,k=0,E=0,A=0,S=0,x=0,C=0,T=null,R=0,O=new da(16),I=new da(16),N=null,j=0;for(m=0;m<=15;m++)O[m]=0;for(y=0;y<r;y++)O[t[n+y]]++;for(k=_,b=15;b>=1&&0===O[b];b--);if(k>b&&(k=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(w=1;w<b&&0===O[w];w++);for(k<w&&(k=w),S=1,m=1;m<=15;m++)if(S<<=1,(S-=O[m])<0)return-1;if(S>0&&(0===e||1!==b))return-1;for(I[1]=0,m=1;m<15;m++)I[m+1]=I[m]+O[m];for(y=0;y<r;y++)0!==t[n+y]&&(a[I[t[n+y]]++]=y);if(0===e?(T=N=a,d=19):1===e?(T=_s,R-=257,N=ms,j-=257,d=256):(T=ys,N=ws,d=-1),C=0,y=0,m=w,h=o,E=k,A=0,l=-1,f=(x=1<<k)-1,1===e&&x>852||2===e&&x>592)return 1;for(;;){p=m-A,a[y]<d?(v=0,g=a[y]):a[y]>d?(v=N[j+a[y]],g=T[R+a[y]]):(v=96,g=0),u=1<<m-A,w=c=1<<E;do{i[h+(C>>A)+(c-=u)]=p<<24|v<<16|g|0}while(0!==c);for(u=1<<m-1;C&u;)u>>=1;if(0!==u?(C&=u-1,C+=u):C=0,y++,0==--O[m]){if(m===b)break;m=t[n+a[y]]}if(m>k&&(C&f)!==l){for(0===A&&(A=k),h+=w,S=1<<(E=m-A);E+A<b&&!((S-=O[E+A])<=0);)E++,S<<=1;if(x+=1<<E,1===e&&x>852||2===e&&x>592)return 1;i[l=C&f]=k<<24|E<<16|h-o|0}}return 0!==C&&(i[h+C]=m-A<<24|64<<16|0),s.bits=k,0}function ks(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Es(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new da(320),this.work=new da(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function As(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new pa(852),t.distcode=t.distdyn=new pa(592),t.sane=1,t.back=-1,0):-2}(e)):-2}function Ss(e,t){var n,r;return e?(r=new Es,e.state=r,r.window=null,0!==(n=function(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,As(e))):-2}(e,t))&&(e.state=null),n):-2}var xs,Cs,Ts=!0;function Rs(e){if(Ts){var t;for(xs=new pa(512),Cs=new pa(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(bs(1,e.lens,0,288,xs,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;bs(2,e.lens,0,32,Cs,0,e.work,{bits:5}),Ts=!1}e.lencode=xs,e.lenbits=9,e.distcode=Cs,e.distbits=5}function Os(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,_,m,y,w,b,k,E,A,S,x=0,C=new ha(4),T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,f=s,h=u,E=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(2&n.wrap&&35615===c){n.check=0,C[0]=255&c,C[1]=c>>>8&255,n.check=Qa(n.check,C,2,0),c=0,l=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(l-=4,k=8+(15&(c>>>=4)),0===n.wbits)n.wbits=k;else if(k>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<k,e.adler=n.check=1,n.mode=512&c?10:12,c=0,l=0;break;case 2:for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(n.flags=c,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&(C[0]=255&c,C[1]=c>>>8&255,n.check=Qa(n.check,C,2,0)),c=0,l=0,n.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.time=c),512&n.flags&&(C[0]=255&c,C[1]=c>>>8&255,C[2]=c>>>16&255,C[3]=c>>>24&255,n.check=Qa(n.check,C,4,0)),c=0,l=0,n.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&(C[0]=255&c,C[1]=c>>>8&255,n.check=Qa(n.check,C,2,0)),c=0,l=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&(C[0]=255&c,C[1]=c>>>8&255,n.check=Qa(n.check,C,2,0)),c=0,l=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((d=n.length)>s&&(d=s),d&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),fa(n.head.extra,r,o,d,k)),512&n.flags&&(n.check=Qa(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=Qa(n.check,r,d,o)),s-=d,o+=d,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;d=0;do{k=r[o+d++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k))}while(k&&d<s);if(512&n.flags&&(n.check=Qa(n.check,r,d,o)),s-=d,o+=d,k)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}c=0,l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}e.adler=n.check=ks(c),c=0,l=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){c>>>=7&l,l-=7&l,n.mode=27;break}for(;l<3;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}switch(n.last=1&c,l-=1,3&(c>>>=1)){case 0:n.mode=14;break;case 1:if(Rs(n),n.mode=20,6===t){c>>>=2,l-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,l-=2;break;case 14:for(c>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,l=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(d=n.length){if(d>s&&(d=s),d>u&&(d=u),0===d)break e;fa(i,r,o,d,a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=12;break;case 17:for(;l<14;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(n.nlen=257+(31&c),c>>>=5,l-=5,n.ndist=1+(31&c),c>>>=5,l-=5,n.ncode=4+(15&c),c>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.lens[T[n.have++]]=7&c,c>>>=3,l-=3}for(;n.have<19;)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},E=bs(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,E){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;_=(x=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&x,!((g=x>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(m<16)c>>>=g,l-=g,n.lens[n.have++]=m;else{if(16===m){for(S=g+2;l<S;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c>>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}k=n.lens[n.have-1],d=3+(3&c),c>>>=2,l-=2}else if(17===m){for(S=g+3;l<S;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=3+(7&(c>>>=g)),c>>>=3,l-=3}else{for(S=g+7;l<S;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}l-=g,k=0,d=11+(127&(c>>>=g)),c>>>=7,l-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;d--;)n.lens[n.have++]=k}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,A={bits:n.lenbits},E=bs(1,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,E){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},E=bs(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,E){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,gs(e,h),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;_=(x=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&x,!((g=x>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(_&&0==(240&_)){for(y=g,w=_,b=m;_=(x=n.lencode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&x,!(y+(g=x>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}c>>>=y,l-=y,n.back+=y}if(c>>>=g,l-=g,n.back+=g,n.length=m,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=12;break}if(64&_){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(S=n.extra;l<S;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(x=n.distcode[c&(1<<n.distbits)-1])>>>16&255,m=65535&x,!((g=x>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(0==(240&_)){for(y=g,w=_,b=m;_=(x=n.distcode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&x,!(y+(g=x>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}c>>>=y,l-=y,n.back+=y}if(c>>>=g,l-=g,n.back+=g,64&_){e.msg="invalid distance code",n.mode=30;break}n.offset=m,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(S=n.extra;l<S;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===u)break e;if(d=h-u,n.offset>d){if((d=n.offset-d)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),v=n.window}else v=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do{i[a++]=v[p++]}while(--d);0===n.length&&(n.mode=21);break;case 26:if(0===u)break e;i[a++]=n.length,u--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===s)break e;s--,c|=r[o++]<<l,l+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Qa(n.check,i,h,a-h):Va(n.check,i,h,a-h)),h=u,(n.flags?c:ks(c))!==n.check){e.msg="incorrect data check",n.mode=30;break}c=0,l=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(c!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}c=0,l=0}n.mode=29;case 29:E=1;break e;case 30:E=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,(n.wsize||h!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&function(e,t,n,r){var i,o=e.state;null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new ha(o.wsize)),r>=o.wsize?(fa(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),fa(o.window,t,n-r,i,o.wnext),(r-=i)?(fa(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i)))}(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Qa(n.check,i,h,e.next_out-h):Va(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===f&&0===h||4===t)&&0===E&&(E=-5),E}var Is;function Ns(e){if(e<1||e>7)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function js(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}Ns.prototype.init=function(e,t,n,r,i){var o;switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=r,3!==this.mode&&4!==this.mode||(this.windowBits+=16),7===this.mode&&(this.windowBits+=32),5!==this.mode&&6!==this.mode||(this.windowBits=-this.windowBits),this.strm=new la,this.mode){case 1:case 3:case 5:o=function(e,t,n,r,i,o){if(!e)return-2;var a=1;if(-1===t&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return ts(e,-2);8===r&&(r=9);var s=new ds;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new ha(2*s.w_size),s.head=new da(s.hash_size),s.prev=new da(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new ha(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,ps(e)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case 7:o=Ss(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}0===o?(this.write_in_progress=!1,this.init_done=!0):this._error(o)},Ns.prototype.params=function(){throw new Error("deflateParams Not supported")},Ns.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(0===this.mode)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},Ns.prototype.write=function(e,t,n,r,i,o,a){this._writeCheck(),this.write_in_progress=!0;var s=this;return T.nextTick((function(){s.write_in_progress=!1;var u=s._write(e,t,n,r,i,o,a);s.callback(u[0],u[1]),s.pending_close&&s.close()})),this},Ns.prototype.writeSync=function(e,t,n,r,i,o,a){return this._writeCheck(),this._write(e,t,n,r,i,o,a)},Ns.prototype._write=function(e,t,n,r,i,o,a){if(this.write_in_progress=!0,0!==e&&1!==e&&2!==e&&3!==e&&4!==e&&5!==e)throw new Error("Invalid flush value");null==t&&(t=new Q(0),r=0,n=0),i._set?i.set=i._set:i.set=js;var s,u=this.strm;switch(u.avail_in=r,u.input=t,u.next_in=n,u.avail_out=a,u.output=i,u.next_out=o,this.mode){case 1:case 3:case 5:s=vs(u,e);break;case 7:case 2:case 4:case 6:s=Os(u,e);break;default:throw new Error("Unknown mode "+this.mode)}return 1!==s&&0!==s&&this._error(s),this.write_in_progress=!1,[u.avail_in,u.avail_out]},Ns.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,1===this.mode||3===this.mode||5===this.mode?function(e){var t;e&&e.state&&(42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?ts(e,-2):(e.state=null,113===t&&ts(e,-3)))}(this.strm):function(e){if(!e||!e.state)return-2;var t=e.state;t.window&&(t.window=null),e.state=null}(this.strm),this.mode=0)},Ns.prototype.reset=function(){switch(this.mode){case 1:case 5:Is=ps(this.strm);break;case 2:case 6:Is=As(this.strm)}0!==Is&&this._error(Is)},Ns.prototype._error=function(e){this.onerror(ca[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var Ls=Object.freeze({__proto__:null,NONE:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8,Zlib:Ns});var Ps={};Object.keys(Ls).forEach((function(e){Ps[e]=Ls[e]})),Ps.Z_MIN_WINDOWBITS=8,Ps.Z_MAX_WINDOWBITS=15,Ps.Z_DEFAULT_WINDOWBITS=15,Ps.Z_MIN_CHUNK=64,Ps.Z_MAX_CHUNK=1/0,Ps.Z_DEFAULT_CHUNK=16384,Ps.Z_MIN_MEMLEVEL=1,Ps.Z_MAX_MEMLEVEL=9,Ps.Z_DEFAULT_MEMLEVEL=8,Ps.Z_MIN_LEVEL=-1,Ps.Z_MAX_LEVEL=9,Ps.Z_DEFAULT_LEVEL=Ps.Z_DEFAULT_COMPRESSION;var Bs={Z_OK:Ps.Z_OK,Z_STREAM_END:Ps.Z_STREAM_END,Z_NEED_DICT:Ps.Z_NEED_DICT,Z_ERRNO:Ps.Z_ERRNO,Z_STREAM_ERROR:Ps.Z_STREAM_ERROR,Z_DATA_ERROR:Ps.Z_DATA_ERROR,Z_MEM_ERROR:Ps.Z_MEM_ERROR,Z_BUF_ERROR:Ps.Z_BUF_ERROR,Z_VERSION_ERROR:Ps.Z_VERSION_ERROR};function Ms(e,t,n){var r=[],i=0;function o(){for(var t;null!==(t=e.read());)r.push(t),i+=t.length;e.once("readable",o)}function a(){var t=Q.concat(r,i);r=[],n(null,t),e.close()}e.on("error",(function(t){e.removeListener("end",a),e.removeListener("readable",o),n(t)})),e.on("end",a),e.end(t),o()}function Us(e,t){if("string"==typeof t&&(t=new Q(t)),!Q.isBuffer(t))throw new TypeError("Not a string or buffer");var n=Ps.Z_FINISH;return e._processChunk(t,n)}function zs(e){if(!(this instanceof zs))return new zs(e);Hs.call(this,e,Ps.DEFLATE)}function Ds(e){if(!(this instanceof Ds))return new Ds(e);Hs.call(this,e,Ps.INFLATE)}function Fs(e){if(!(this instanceof Fs))return new Fs(e);Hs.call(this,e,Ps.GZIP)}function qs(e){if(!(this instanceof qs))return new qs(e);Hs.call(this,e,Ps.GUNZIP)}function Zs(e){if(!(this instanceof Zs))return new Zs(e);Hs.call(this,e,Ps.DEFLATERAW)}function Ws(e){if(!(this instanceof Ws))return new Ws(e);Hs.call(this,e,Ps.INFLATERAW)}function $s(e){if(!(this instanceof $s))return new $s(e);Hs.call(this,e,Ps.UNZIP)}function Hs(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||Ps.Z_DEFAULT_CHUNK,ji.call(this,e),e.flush&&e.flush!==Ps.Z_NO_FLUSH&&e.flush!==Ps.Z_PARTIAL_FLUSH&&e.flush!==Ps.Z_SYNC_FLUSH&&e.flush!==Ps.Z_FULL_FLUSH&&e.flush!==Ps.Z_FINISH&&e.flush!==Ps.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||Ps.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<Ps.Z_MIN_CHUNK||e.chunkSize>Ps.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<Ps.Z_MIN_WINDOWBITS||e.windowBits>Ps.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<Ps.Z_MIN_LEVEL||e.level>Ps.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<Ps.Z_MIN_MEMLEVEL||e.memLevel>Ps.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=Ps.Z_FILTERED&&e.strategy!=Ps.Z_HUFFMAN_ONLY&&e.strategy!=Ps.Z_RLE&&e.strategy!=Ps.Z_FIXED&&e.strategy!=Ps.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Q.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new Ps.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(e,t){n._binding=null,n._hadError=!0;var r=new Error(e);r.errno=t,r.code=Ps.codes[t],n.emit("error",r)};var r=Ps.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var i=Ps.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(i=e.strategy),this._binding.init(e.windowBits||Ps.Z_DEFAULT_WINDOWBITS,r,e.memLevel||Ps.Z_DEFAULT_MEMLEVEL,i,e.dictionary),this._buffer=new Q(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=i,this.once("end",this.close)}Object.keys(Bs).forEach((function(e){Bs[Bs[e]]=e})),Me(Hs,ji),Hs.prototype.params=function(e,t,n){if(e<Ps.Z_MIN_LEVEL||e>Ps.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=Ps.Z_FILTERED&&t!=Ps.Z_HUFFMAN_ONLY&&t!=Ps.Z_RLE&&t!=Ps.Z_FIXED&&t!=Ps.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(Ps.Z_SYNC_FLUSH,(function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())}))}else T.nextTick(n)},Hs.prototype.reset=function(){return this._binding.reset()},Hs.prototype._flush=function(e){this._transform(new Q(0),"",e)},Hs.prototype.flush=function(e,t){var n=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=Ps.Z_FULL_FLUSH),n.ended)t&&T.nextTick(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",(function(){r.flush(t)}))}else this._flushFlag=e,this.write(new Q(0),"",t)},Hs.prototype.close=function(e){if(e&&T.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;T.nextTick((function(){t.emit("close")}))}},Hs.prototype._transform=function(e,t,n){var r,i=this._writableState,o=(i.ending||i.ended)&&(!e||i.length===e.length);if(null===!e&&!Q.isBuffer(e))return n(new Error("invalid input"));o?r=Ps.Z_FINISH:(r=this._flushFlag,e.length>=i.length&&(this._flushFlag=this._opts.flush||Ps.Z_NO_FLUSH)),this._processChunk(e,r,n)},Hs.prototype._processChunk=function(e,t,n){var r=e&&e.length,i=this._chunkSize-this._offset,o=0,a=this,s="function"==typeof n;if(!s){var u,c=[],l=0;this.on("error",(function(e){u=e}));do{var f=this._binding.writeSync(t,e,o,r,this._buffer,this._offset,i)}while(!this._hadError&&p(f[0],f[1]));if(this._hadError)throw u;var h=Q.concat(c,l);return this.close(),h}var d=this._binding.write(t,e,o,r,this._buffer,this._offset,i);function p(u,f){if(!a._hadError){var h=i-f;if(function(e,t){if(!e)throw new Error(t)}(h>=0,"have should not go down"),h>0){var d=a._buffer.slice(a._offset,a._offset+h);a._offset+=h,s?a.push(d):(c.push(d),l+=d.length)}if((0===f||a._offset>=a._chunkSize)&&(i=a._chunkSize,a._offset=0,a._buffer=new Q(a._chunkSize)),0===f){if(o+=r-u,r=u,!s)return!0;var v=a._binding.write(t,e,o,r,a._buffer,a._offset,a._chunkSize);return v.callback=p,void(v.buffer=e)}if(!s)return!1;n()}}d.buffer=e,d.callback=p},Me(zs,Hs),Me(Ds,Hs),Me(Fs,Hs),Me(qs,Hs),Me(Zs,Hs),Me(Ws,Hs),Me($s,Hs);var Ks,Ys={codes:Bs,createDeflate:function(e){return new zs(e)},createInflate:function(e){return new Ds(e)},createDeflateRaw:function(e){return new Zs(e)},createInflateRaw:function(e){return new Ws(e)},createGzip:function(e){return new Fs(e)},createGunzip:function(e){return new qs(e)},createUnzip:function(e){return new $s(e)},deflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new zs(t),e,n)},deflateSync:function(e,t){return Us(new zs(t),e)},gzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new Fs(t),e,n)},gzipSync:function(e,t){return Us(new Fs(t),e)},deflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new Zs(t),e,n)},deflateRawSync:function(e,t){return Us(new Zs(t),e)},unzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new $s(t),e,n)},unzipSync:function(e,t){return Us(new $s(t),e)},inflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new Ds(t),e,n)},inflateSync:function(e,t){return Us(new Ds(t),e)},gunzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new qs(t),e,n)},gunzipSync:function(e,t){return Us(new qs(t),e)},inflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),Ms(new Ws(t),e,n)},inflateRawSync:function(e,t){return Us(new Ws(t),e)},Deflate:zs,Inflate:Ds,Gzip:Fs,Gunzip:qs,DeflateRaw:Zs,InflateRaw:Ws,Unzip:$s,Zlib:Hs},Gs="axios@0.21.1",Js="sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",Vs={},Xs={type:"version",registry:!0,raw:"axios@0.21.1",name:"axios",escapedName:"axios",rawSpec:"0.21.1",saveSpec:null,fetchSpec:"0.21.1"},Qs=["/zmp-sdk"],eu="https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",tu="22563481962f4d6bde9a76d516ef0e5d3c09b2b8",nu="/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction",ru={name:"Matt Zabriskie"},iu={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},ou={url:"https://github.com/axios/axios/issues"},au=[{path:"./dist/axios.min.js",threshold:"5kB"}],su={"follow-redirects":"^1.10.0"},uu="Promise based HTTP client for the browser and node.js",cu={bundlesize:"^0.17.0",coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^5.2.0",sinon:"^4.5.0",typescript:"^2.8.1","url-search-params":"^0.10.0",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},lu="https://github.com/axios/axios",fu=["xhr","http","ajax","promise","node"],hu={type:"git",url:"git+https://github.com/axios/axios.git"},du={build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test && bundlesize",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},pu="dist/axios.min.js",vu={_from:"axios@0.21.1",_id:Gs,_inBundle:false,_integrity:Js,_location:"/zmp-sdk/axios",_phantomChildren:Vs,_requested:Xs,_requiredBy:Qs,_resolved:eu,_shasum:tu,_spec:"axios@0.21.1",_where:nu,author:ru,browser:iu,bugs:ou,bundleDependencies:false,bundlesize:au,dependencies:su,deprecated:false,description:uu,devDependencies:cu,homepage:lu,jsdelivr:"dist/axios.min.js",keywords:fu,license:"MIT",main:"index.js",name:"axios",repository:hu,scripts:du,typings:"./index.d.ts",unpkg:pu,version:"0.21.1"},gu=(Ks=Object.freeze({__proto__:null,_from:"axios@0.21.1",_id:Gs,_inBundle:false,_integrity:Js,_location:"/zmp-sdk/axios",_phantomChildren:Vs,_requested:Xs,_requiredBy:Qs,_resolved:eu,_shasum:tu,_spec:"axios@0.21.1",_where:nu,author:ru,browser:iu,bugs:ou,bundleDependencies:false,bundlesize:au,dependencies:su,deprecated:false,description:uu,devDependencies:cu,homepage:lu,jsdelivr:"dist/axios.min.js",keywords:fu,license:"MIT",main:"index.js",name:"axios",repository:hu,scripts:du,typings:"./index.d.ts",unpkg:pu,version:"0.21.1",default:vu}))&&Ks.default||Ks,_u=sa.http,mu=sa.https,yu=/https:?/;function wu(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Q.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,wu(e,t,e.href)}}var bu=function(e){return new Promise((function(t,n){var r=function(e){t(e)},i=function(e){n(e)},o=e.data,a=e.headers;if(a["User-Agent"]||a["user-agent"]||(a["User-Agent"]="axios/"+gu.version),o&&!ur.isStream(o)){if(Q.isBuffer(o));else if(ur.isArrayBuffer(o))o=Q.from(new Uint8Array(o));else{if(!ur.isString(o))return i(yr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));o=Q.from(o,"utf-8")}a["Content-Length"]=o.length}var s=void 0;e.auth&&(s=(e.auth.username||"")+":"+(e.auth.password||""));var u=kr(e.baseURL,e.url),c=ro.parse(u),l=c.protocol||"http:";if(!s&&c.auth){var f=c.auth.split(":");s=(f[0]||"")+":"+(f[1]||"")}s&&delete a.Authorization;var h=yu.test(l),d=h?e.httpsAgent:e.httpAgent,p={path:lr(c.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:a,agent:d,agents:{http:e.httpAgent,https:e.httpsAgent},auth:s};e.socketPath?p.socketPath=e.socketPath:(p.hostname=c.hostname,p.port=c.port);var v,g=e.proxy;if(!g&&!1!==g){var _=l.slice(0,-1)+"_proxy",m=T.env[_]||T.env[_.toUpperCase()];if(m){var y=ro.parse(m),w=T.env.no_proxy||T.env.NO_PROXY,b=!0;if(w)b=!w.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&c.hostname.substr(c.hostname.length-e.length)===e||c.hostname===e))}));if(b&&(g={host:y.hostname,port:y.port,protocol:y.protocol},y.auth)){var k=y.auth.split(":");g.auth={username:k[0],password:k[1]}}}}g&&(p.headers.host=c.hostname+(c.port?":"+c.port:""),wu(p,g,l+"//"+c.hostname+(c.port?":"+c.port:"")+p.path));var E=h&&(!g||yu.test(g.protocol));e.transport?v=e.transport:0===e.maxRedirects?v=Ao:(e.maxRedirects&&(p.maxRedirects=e.maxRedirects),v=E?mu:_u),e.maxBodyLength>-1&&(p.maxBodyLength=e.maxBodyLength);var A=v.request(p,(function(t){if(!A.aborted){var n=t,o=t.req||A;if(204!==t.statusCode&&"HEAD"!==o.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(Ys.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:o};if("stream"===e.responseType)a.data=n,wr(r,i,a);else{var s=[];n.on("data",(function(t){s.push(t),e.maxContentLength>-1&&Q.concat(s).length>e.maxContentLength&&(n.destroy(),i(yr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o)))})),n.on("error",(function(t){A.aborted||i(mr(t,e,null,o))})),n.on("end",(function(){var t=Q.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=ur.stripBOM(t))),a.data=t,wr(r,i,a)}))}}}));A.on("error",(function(t){A.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||i(mr(t,e,null,A))})),e.timeout&&A.setTimeout(e.timeout,(function(){A.abort(),i(yr("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",A))})),e.cancelToken&&e.cancelToken.promise.then((function(e){A.aborted||(A.abort(),i(e))})),ur.isStream(o)?o.on("error",(function(t){i(mr(t,e,null,A))})).pipe(A):A.end(o)}))},ku={"Content-Type":"application/x-www-form-urlencoded"};function Eu(e,t){!ur.isUndefined(e)&&ur.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Au,Su={adapter:("undefined"!=typeof XMLHttpRequest?Au=Sr:void 0!==T&&"[object process]"===Object.prototype.toString.call(T)&&(Au=bu),Au),transformRequest:[function(e,t){return _r(t,"Accept"),_r(t,"Content-Type"),ur.isFormData(e)||ur.isArrayBuffer(e)||ur.isBuffer(e)||ur.isStream(e)||ur.isFile(e)||ur.isBlob(e)?e:ur.isArrayBufferView(e)?e.buffer:ur.isURLSearchParams(e)?(Eu(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ur.isObject(e)?(Eu(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Su.headers={common:{Accept:"application/json, text/plain, */*"}},ur.forEach(["delete","get","head"],(function(e){Su.headers[e]={}})),ur.forEach(["post","put","patch"],(function(e){Su.headers[e]=ur.merge(ku)}));var xu=Su;function Cu(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Tu=function(e){return Cu(e),e.headers=e.headers||{},e.data=vr(e.data,e.headers,e.transformRequest),e.headers=ur.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ur.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||xu.adapter)(e).then((function(t){return Cu(e),t.data=vr(t.data,t.headers,e.transformResponse),t}),(function(t){return gr(t)||(Cu(e),t&&t.response&&(t.response.data=vr(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Ru=function(e,t){t=t||{};var n={},r=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return ur.isPlainObject(e)&&ur.isPlainObject(t)?ur.merge(e,t):ur.isPlainObject(t)?ur.merge({},t):ur.isArray(t)?t.slice():t}function u(r){ur.isUndefined(t[r])?ur.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}ur.forEach(r,(function(e){ur.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),ur.forEach(i,u),ur.forEach(o,(function(r){ur.isUndefined(t[r])?ur.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),ur.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var c=r.concat(i).concat(o).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return ur.forEach(l,u),n};function Ou(e){this.defaults=e,this.interceptors={request:new pr,response:new pr}}Ou.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Ru(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[Tu,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},Ou.prototype.getUri=function(e){return e=Ru(this.defaults,e),lr(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ur.forEach(["delete","get","head","options"],(function(e){Ou.prototype[e]=function(t,n){return this.request(Ru(n||{},{method:e,url:t,data:(n||{}).data}))}})),ur.forEach(["post","put","patch"],(function(e){Ou.prototype[e]=function(t,n,r){return this.request(Ru(r||{},{method:e,url:t,data:n}))}}));var Iu=Ou;function Nu(e){this.message=e}Nu.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Nu.prototype.__CANCEL__=!0;var ju=Nu;function Lu(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new ju(e),t(n.reason))}))}Lu.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Lu.source=function(){var e;return{token:new Lu((function(t){e=t})),cancel:e}};var Pu=Lu;function Bu(e){var t=new Iu(e),n=er(Iu.prototype.request,t);return ur.extend(n,Iu.prototype,t),ur.extend(n,t),n}var Mu=Bu(xu);Mu.Axios=Iu,Mu.create=function(e){return Bu(Ru(Mu.defaults,e))},Mu.Cancel=ju,Mu.CancelToken=Pu,Mu.isCancel=gr,Mu.all=function(e){return Promise.all(e)},Mu.spread=function(e){return function(t){return e.apply(null,t)}},Mu.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError};var Uu=Mu,zu=Mu;Uu.default=zu;var Du=Uu,Fu=(()=>{const e=Pn();return{MINI_APP_LINK:"https://zalo.me/app/link/zapps",MINI_APP_INTERNAL_LINK:"https://h5.zdn.vn/zapps",COOKIE_NAME:{ZOAUTH:"h5.zdn.vn_zoauth",ZACC_SESSiON:"h5.zdn.vn_zacc_session",JS_TOKEN:"h5.zdn.vn_zlink3rd"},APIS:{GET_USER_INFO:"https://graph.zalo.me/v2.0/me"},STORAGE_DATA_LIMIT:102400,STORAGE_LIMIT:5242880,NETWORK_TYPE:{NONE:e.isAndroid?-2:0,WIFI:e.isAndroid?0:1,"2G":(e.isAndroid,2),"3G":e.isAndroid?15:2,"4G":e.isAndroid?13:2}}})();const qu={encode:function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(void 0===r)return;if(null===r)return void t.push(n);t.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}return t.join("&")},decode:function(e,t){var n={};if(""===e)return n;for(var r=e.split("&"),i=0;i<r.length;i++){var o=r[i].split("=",2),a=decodeURIComponent(o[0]);if(t&&Object.prototype.hasOwnProperty.call(n,a))throw new URIError("Duplicate key: "+a);n[a]=2===o.length?decodeURIComponent(o[1]):null}return n},appendToUrl:function(e,t){return e+(-1!==e.indexOf("?")?"&":"?")+("string"==typeof t?t:qu.encode(t))},getParameterByName:function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getParamsAsObject:function(e){var t={};return e?(e.split("&").map((function(e){var n=e.split("=");n&&2==n.length&&(t[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))})),t):t},toQueryString:function(e){if(!e)return"";if("object"!=(void 0===e?"undefined":typeof e))return e;var t=Object.keys(e),n=[];return t.map((function(t){var r=e[t],i=[t,r="object"==(void 0===r?"undefined":typeof r)?JSON.stringify(r):encodeURIComponent(r)].join("=");n.push(i)})),n.join("&")}};var Zu={},Wu=function(e,t,n){var r=t||"default";return function(){var t=r in Zu?Zu[r](e,n):e;return t.apply(this,arguments)}};Wu.setWrapper=function(e){var t=arguments.length<=1||void 0===arguments[1]?"default":arguments[1];Zu[t]=e};var $u={error:{code:1,error_subcode:1357046,message:"Received Invalid JSON reply.",type:"http"}};function Hu(e){try{return null===e?$u:JSON.parse(e)}catch(e){return $u}}var Ku={execute:function(e,t,n,r){n.suppress_http_code=1;var i=qu.encode(n);"post"!=t&&(e=qu.appendToUrl(e,i),i="");var o=function(e,t){if(!self.XMLHttpRequest)return null;var n=new XMLHttpRequest,r=function(){};if(!("withCredentials"in n))return null;n.open(e,t,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded");var i={send:function(e){n.send(e)}},o=Wu((function(){o=r,"onload"in i&&i.onload(n)}),"entry","XMLHttpRequest:load"),a=Wu((function(){a=r,"onerror"in i&&i.onerror(n)}),"entry","XMLHttpRequest:error");return n.onload=function(){o()},n.onerror=function(){a()},n.onreadystatechange=function(){4==n.readyState&&(200==n.status?o():a())},i}(t,e);return!!o&&(o.onload=function(e){r(Hu(e.responseText))},o.onerror=function(e){e.responseText?r(Hu(e.responseText)):r({error:{code:1,error_subcode:1357045,message:"unknown error (empty response)",status:e.status,type:"http"}})},o.send(i),!0)}};class Yu extends Xn{constructor(){super(),this.debug=Bt("zmp:ZaloJSBridge"),this.events=Qn.getInstance(),this._accessTk=Fn("zacc_session")||"DEFAULT_ACCESS_TOKEN",this._jsAccessTk=Fn("zlink3rd")||"DEFAULT_JS_TOKEN",this.results=[],this._userAgent=Ln(),this._device=Pn(),this._jsCallFuncCallbacks={},this.events.on(exports.Events.AppPaused,(()=>{if(this.results.length>0){let e=this.results;this.results=[];try{this.sendLogData(e)}catch(e){}}})),this.sendLogTimer?clearInterval(this.sendLogTimer):this.sendLogTimer=setInterval((()=>{if(this.results.length>0){let e=this.results;this.results=[];try{this.sendLogData(e)}catch(e){}}}),5e3)}static getInstance(){return Yu.instance||(Yu.instance=new Yu),Yu.instance}set accessTk(e){this._accessTk=e}set jsAccessTk(e){this._jsAccessTk=e}sendLogData(e){try{Ku.execute("https://h5.zalo.me/log/async","post",{appId:window.APP_ID,data:JSON.stringify(e)},(e=>{}))}catch(e){}}onJSCall(e,t){try{const n=qn(t);if(this._jsCallFuncCallbacks[e]){const t=this._jsCallFuncCallbacks[e].callback,r=this._jsCallFuncCallbacks[e].timeout;if(t){try{t.call(this,n)}catch(e){console.error("Call callback error",e)}r&&clearTimeout(r),this._jsCallFuncCallbacks[e]=null,delete this._jsCallFuncCallbacks[e]}}this.results.push({action:n.action,error:n.error_code})}catch(e){console.log("onJSCall","error",e)}}onMultiJSCall(e,t){try{const n=qn(t);if(this._jsCallFuncCallbacks[e]){const t=this._jsCallFuncCallbacks[e].callback,r=this._jsCallFuncCallbacks[e].timeout;if(t){try{t.call(this,n)}catch(e){console.error("Call callback error",e)}r&&clearTimeout(r)}}this.results.push({action:n.action,error:n.error_code})}catch(e){console.log("onMultiJSCall","error",e)}}nativeEventHandler(e,t,n){this.debug(`eventId: ${e}, eventName: ${t}, eventData: ${n}`);const r=Hn(n);this.debug(r),this.events.emit(t,e,r)}defaultCallback(e){null!=e&&(e=qn(e))}jsCall(e,t,r,i=!1,o=3,a=!0){try{const s=((e="")=>`${e.normalize("NFD").replace(Rn,"").replace(On,"d").replace(In,"").toLowerCase()}_${Math.random().toString(36).substr(2,4)}`)(e);if(!this._device.isMobile||n.isEmpty(e))return this.onJSCall(s,{error_code:-13,error_message:"params invalid!",data:{device:this._device.isMobile,jsToken:this._jsAccessTk,access_token:this._accessTk},action:e}),!1;null==t&&(t={}),r||(r=this.defaultCallback);const u={error_code:-14,error_message:"Request Timeout!",data:{},action:e};this._jsCallFuncCallbacks[s]={timeout:a&&bn.includes(e)&&setTimeout((()=>{this.onJSCall(s,u)}),8e3),callback:r};try{return t=Zn(t),i?this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,window.onMultiJSCall(s)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,`window.onMultiJSCall('${s}')`):this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,window.onJSCall(s)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,e,this._accessTk,t,`window.onJSCall('${s}')`)}catch(n){if(!(o-- >0)){const r={error_code:-5,error_message:"Not ready!",data:{userAgent:this._userAgent,options:t,jsToken:this._jsAccessTk,access_token:this._accessTk},action:e,js_error:n};return this.onJSCall(s,r),!1}setTimeout((()=>{this.jsCall(e,t,r,i,o)}),500)}}catch(e){console.log("jsCall","error",e)}return!1}}class Gu{constructor(e,t,n){this.code=e,this.message=t,this.api=n}toString(){return`api: ${this.api}; code: ${this.code}; message: ${this.message}`}}class Ju extends Gu{constructor(e,t){super(e,t),this.message=`${t}. ${xn.READ_MORE}`,this.handler()}handler(){switch(this.code){case exports.NativeCode.token_invalid:this.code=An,this.message=xn.LOGIN_REQUIRED;break;case exports.NativeCode.not_permission:this.code=Sn,this.message=xn.NOT_PERMISSION;break;case exports.NativeCode.client_not_support:this.message=xn.CLIENT_NOT_SUPPORT;break;case exports.NativeCode.decode_failed:this.message=xn.DECODE_FAILED}}}const Vu={handler:null,setHandler(e){this.handler=e}};Vu.setHandler(((e,t)=>t instanceof Gu?(t.api=e,t):new Gu(-2001,n.isNull(t.message)?"Unknown Error":t.message,e)));const Xu=(e,t,r)=>{const i=r.value;return r.value=function(...e){return Gn(this,void 0,void 0,(function*(){const{success:r,fail:o}=Array.isArray(e)&&e.length>0&&e[0];return new Promise(((a,s)=>Gn(this,void 0,void 0,(function*(){try{const t=yield i.apply(this,e);!n.isNull(r)&&n.isFunction(r)?r.call(null,t,this):a(t)}catch(e){const{handler:r}=Vu,i=r.call(null,t,e,this);window.zmpSentry&&window.zmpSentry.throwError(i.toString()),!n.isNull(o)&&n.isFunction(o)?o.call(null,i,this):console.error("Error:",i)}}))))}))},r},Qu=(e,t,r)=>{const i=r.value;return r.value=function(...e){try{return i.apply(this,e)}catch(e){const{handler:r}=Vu;!n.isNull(r)&&n.isFunction(r)?r.call(null,t,e,this):console.warn(e.message)}},r};var ec;class tc{constructor(){ec.set(this,void 0),Vn(this,ec,Yu.getInstance())}setZAccSession(e){Jn(this,ec).accessTk=e}setJSToken(e){Jn(this,ec).jsAccessTk=e}callNative(e,t,n){return new Promise(((r,i)=>{Jn(this,ec).jsCall(e,t,(o=>{if(o&&o.error_code>=0&&o.action==e)r(o.data||{}),(null==n?void 0:n.callback)&&n.callback(o,null);else if(o&&o.error_code<0){const r=new Ju(o.error_code,`${o.action}: ${o.error_message}`);try{window.zmpSentry&&window.zmpSentry.captureMessage(`${e}: call native fail`,{extra:{data:t,rs:o}})}catch(e){}i(r),(null==n?void 0:n.callback)&&n.callback(o,r)}}),null==n?void 0:n.isMultiCallback,null==n?void 0:n.nRetry,null==n?void 0:n.haveTimeout)}))}}ec=new WeakMap;const nc={loginFailed:()=>new Gu(An,xn.LOGIN_FAILED),loginRequired:()=>new Gu(kn,xn.LOGIN_REQUIRED),missingParam:e=>new Gu(kn,`Missing required argument: ${e}`),wrongTypeParam:(e,t,n)=>new Gu(kn,`Wrong type of parameter '${e}'. Expected ${t}, but got ${n}`),cannotGetShareInfo:()=>new Gu(En,"Can not get app info to share"),lengthInvalid:e=>new Gu(kn,`${e} length is invalid.`)};var rc,ic,oc,ac,sc;class uc{static getVersion(){return"2.15.0-0"}static getSystemInfo(){return{version:Bn("version-id")||"",apiVersion:"2.15.0-0",zaloVersion:Mn(),platform:Un(),language:navigator.language}}static getAppInfo(){return Gn(this,void 0,void 0,(function*(){let e={};const t=this.getAppId(),n=this.getSystemInfo(),r=qu.appendToUrl(`https://h5.zalo.me/${Cn}`,{appId:t,versionStatus:0,currentVersion:n.version}),i=yield fetch(r,{credentials:"include"});if(i.ok){const t=yield i.json();if(t.err<0||!t.data)throw new Error(t);e={name:t.data.name,version:t.data.version,description:t.data.description,appUrl:t.data.appUrl,qrCodeUrl:t.data.qrCodeUrl}}return e}))}}class cc{static setNavigationBarTitle(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(Yt,{title:e.title},{haveTimeout:!1})}))}static setNavigationBarColor(e){return Gn(this,void 0,void 0,(function*(){if(n.isString(e.color)&&e.color.length>0){const t={};n.isEmpty(e.color)||(t.backgroundColor=e.color),n.isEmpty(e.textColor)||(t.textColor=e.textColor),yield this.callNative(gn,{actionbarType:5,dataConfig:t,homeConfig:{enable:this.isShowHomeButton?1:0,url:`${Fu.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}},{haveTimeout:!1}),this.isShowNavBar=!0}else{const t={};n.isEmpty(e.statusBarColor)||(t.backgroundColor=e.statusBarColor),n.isEmpty(e.textColor)||(t.textColor=e.textColor),yield this.callNative(gn,{actionbarType:6,dataConfig:t},{haveTimeout:!1}),this.isShowNavBar=!1}}))}static setNavigationBarLeftButton(e){return Gn(this,void 0,void 0,(function*(){let t={};switch(e.type){case"none":this.isShowHomeButton=!1,t={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${Fu.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"back":this.isShowHomeButton=!1,t={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:0,url:`${Fu.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"home":this.isShowHomeButton=!0,t={buttonType:3,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${Fu.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}};break;case"both":this.isShowHomeButton=!0,t={buttonType:0,dataConfig:{confirmToExit:1},homeConfig:{enable:1,url:`${Fu.MINI_APP_INTERNAL_LINK}/${this.getAppId()}/`}}}yield this.callNative(Xt,Object.assign({},t),{haveTimeout:!1})}))}static setNavigationBarRightButton(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(Jt,{supportToolBar:e.supportToolBar,reset:e.reset,menuListItems:e.menuListItems,zapp:this.getAppId()})}))}}class lc{static setBackgroundColor(e){return Gn(this,void 0,void 0,(function*(){n.isString(e.backgroundColor)&&e.backgroundColor.length>0&&(yield this.callNative(gn,{actionbarType:this.isShowNavBar?5:6,dataConfig:{backgroundColor:e.backgroundColor,textColor:e.textColor}}))}))}}class fc{constructor(e,t,n,r){this.title=r,this.severity=t;const i=new Date;if(this.time=i.toLocaleTimeString(),this.content=e,n>0){const e=(new Error).stack;this.stack=e?e.replace("Error\n",""):""}}toString(){return(this.content.stack?[this.title,this.severity.toUpperCase(),this.time,this.content,this.content.stack.replace("Error:","")]:[this.title,this.severity.toUpperCase(),this.time,JSON.stringify(this.content),this.stack]).join(" ")}}rc=new WeakMap,ic=new WeakMap,oc=new WeakMap,ac=new WeakMap,sc=new WeakMap;const hc=new class{constructor(){rc.set(this,3),ic.set(this,["none","error","warn","info"]),oc.set(this,"[zmp] > "),ac.set(this,{error:0,warn:0,info:0,firstError:null,lastError:null}),sc.set(this,((e,t,n)=>{Jn(this,ac)[Jn(this,ic)[e]]++;const r=Jn(this,ic)[e];if(Vn(this,oc,Jn(this,oc)+("string"!=typeof t?new fc(t,r,e,n).toString():t)),!(e>Jn(this,rc)))switch(e){case 1:console.error(Jn(this,oc));break;case 2:console.warn(Jn(this,oc));break;case 3:console.info(Jn(this,oc));break;default:throw new Error("internal")}}))}setLogLevel(e){Vn(this,rc,e)}info(e){Jn(this,sc).call(this,3,e)}warn(e,t){Jn(this,sc).call(this,2,e,t)}error(e,t){Jn(this,sc).call(this,1,e,t)}getMetrics(){return Jn(this,ac)}};class dc{static setDeviceOrientation(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(hn,{autoRotate:exports.OrientationType[e.rotate]})}))}static getNetworkType(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(Gt,{url:window.location.href,featureId:""}).then((e=>{let t;switch(e.network){case Fu.NETWORK_TYPE.NONE:t=exports.NetworkType.none;break;case Fu.NETWORK_TYPE.WIFI:t=exports.NetworkType.wifi;break;case Fu.NETWORK_TYPE["2G"]:case Fu.NETWORK_TYPE["3G"]:case Fu.NETWORK_TYPE["4G"]:t=exports.NetworkType.cellular;break;default:t=exports.NetworkType.unknown}return{networkType:t}}))}))}static onNetworkStatusChange(e){return Gn(this,void 0,void 0,(function*(){yield this.events.on(exports.Events.NetworkChanged,(t=>{const n=t&&t.state;this.getNetworkType().then((t=>{const r={isConnected:"CONNECTED"===n,networkType:t&&t.networkType};e(r)})).catch((e=>{hc.error(e,"onNetworkStatusChange")}))}))}))}static startBeaconDiscovery(e){var t,r,i,o,a;return Gn(this,void 0,void 0,(function*(){const s={subaction:0,scanning_type:n.isNumber(null==e?void 0:e.scanningType)?e.scanningType:0,data:{scan_from_source:n.isString(null==e?void 0:e.scanFromSource)?e.scanFromSource:"",expire:n.isNumber(null==e?void 0:e.expire)?e.expire:3e3,monitor_interval:n.isNumber(null==e?void 0:e.monitorInterval)?e.monitorInterval:60,domain:n.isString(null==e?void 0:e.domain)?e.domain:"",scan_config:{scan_time:n.isNumber(null===(t=null==e?void 0:e.scanConfig)||void 0===t?void 0:t.scanTime)?e.scanConfig.scanTime:15e3,time_between_scan:n.isNumber(null===(r=null==e?void 0:e.scanConfig)||void 0===r?void 0:r.timeBetweenScan)?e.scanConfig.timeBetweenScan:1e4,beacon_timeout:n.isNumber(null===(i=null==e?void 0:e.scanConfig)||void 0===i?void 0:i.beaconTimeout)?e.scanConfig.beaconTimeout:3e4,delayCheckConnectedTimeout:n.isNumber(null===(o=null==e?void 0:e.scanConfig)||void 0===o?void 0:o.delayCheckConnectedTimeout)?e.scanConfig.delayCheckConnectedTimeout:5e3,beaconConnectedTimeout:n.isNumber(null===(a=null==e?void 0:e.scanConfig)||void 0===a?void 0:a.beaconConnectedTimeout)?e.scanConfig.beaconConnectedTimeout:6e5},items:Array.isArray(null==e?void 0:e.items)?null==e?void 0:e.items:[]}};return yield this.callNative(dn,Object.assign({},s)),!0}))}static stopBeaconDiscovery(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(dn,Object.assign({},{subaction:2})),!0}))}static getBeacons(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(dn,Object.assign({},{subaction:1}),{isMultiCallback:!0}).then((e=>{const t={beacons:[]};return Array.isArray(e)&&e.forEach((e=>{const n={uuid:e.uuid,major:e.major,minor:e.minor,distance:e.distance,rssi:e.rssi};t.beacons.push(n)})),t}))}))}static stopBluetoothDevicesDiscovery(){return Gn(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static startBluetoothDevicesDiscovery(e){return Gn(this,void 0,void 0,(function*(){return this.callNative("",Object.assign({},e))}))}static openBluetoothAdapter(){return Gn(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothDeviceFound(){return Gn(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static onBluetoothAdapterStateChange(){return Gn(this,void 0,void 0,(function*(){return Promise.resolve()}))}static getConnectedBluetoothDevices(e){return Gn(this,void 0,void 0,(function*(){const t={services:e.services||[]};return this.callNative("",t)}))}static getBluetoothDevices(){return Gn(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static getBluetoothAdapterState(){return Gn(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static closeBluetoothAdapter(){return Gn(this,void 0,void 0,(function*(){return this.callNative("",{})}))}static scanQRCode(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(un,{skipOpenLink:!0})}))}static showToast(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(on,{toast:e.message})}))}static hideKeyboard(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(an,{})}))}static openPhone(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(sn,{phoneNum:e.phoneNumber,phoneCode:e.phoneNumber})}))}static openSMS(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(cn,{content:e.content,phoneCode:e.phoneNumber})}))}static keepScreen(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(fn,{data:{keep_screen_on:e.keepScreenOn?1:0}})}))}static openBioAuthentication(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(en,{secret_data:e.secretData,app_id:this.getZAppId(),ui:{title:e.ui.title,sub_title:e.ui.subTitle,negative_text:e.ui.negativeButtonText},require_fingerprint:e.requireFingerprint?1:0}).then((e=>{var t,n,r,i;return{code:null==e?void 0:e.error_code,message:null==e?void 0:e.error_message,data:{domain:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.domain,code:null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.error_code,message:null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.error_message,payToken:null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.pay_token}}}))}))}static checkStateBioAuthentication(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(tn,{}).then((e=>({bioState:null==e?void 0:e.bio_state})))}))}static vibrate(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(_n,{type:exports.VibrateType[e.type],vibrate_time:e.milliseconds})}))}}var pc,vc,gc,_c,mc,yc,wc,bc,kc,Ec,Ac,Sc,xc,Cc,Tc,Rc,Oc,Ic,Nc,jc,Lc,Pc,Bc;class Mc{constructor(e){pc.set(this,localStorage),vc.set(this,void 0),gc.set(this,void 0),Pn(),Vn(this,gc,{keys:new Set,currentSize:0,limitSize:Fu.STORAGE_LIMIT}),Vn(this,vc,e),this.findAllCurrentDataByApp(e)}findAllCurrentDataByApp(e){try{let t;for(t in Jn(this,pc)){if(e){if(t.split("_")[0]!==e)continue}Jn(this,gc).keys.add(t)}}catch(e){hc.error(e,"LocalResourceStorage > findAllCurrentDataByApp")}}get(e){let t=new Map;return e.forEach((e=>{t.set(e,this.getSync(e))})),Promise.resolve(t)}getSync(e){return Jn(this,vc)&&(e=`${Jn(this,vc)}_${e}`),Jn(this,gc).keys.has(e)?Jn(this,pc).getItem(e):null}set(e){return Gn(this,void 0,void 0,(function*(){return Object.entries(e).forEach((([e,t])=>{this.setSync(e,t.replace(/\\"/g,'"'))})),Promise.resolve({errorKeys:[]})}))}setSync(e,t){Jn(this,vc)&&(e=`${Jn(this,vc)}_${e}`),Jn(this,pc).setItem(e,t),Jn(this,gc).keys.add(e)}getInfo(){return Gn(this,void 0,void 0,(function*(){return Promise.resolve(this.getInfoSync())}))}getInfoSync(){const e=((e,t)=>{let n,r,i=0;for(r in e){const o=r.split("_")[0];e.hasOwnProperty(r)&&(t&&o!==t||(n=2*(e[r].length+r.length),i+=n))}return i})(Jn(this,pc),Jn(this,vc));return{currentSize:n.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number((Fu.STORAGE_LIMIT/1024).toFixed(2))}}remove(e){return Gn(this,void 0,void 0,(function*(){return e.forEach((e=>{this.removeSync(e)})),Promise.resolve({errorKeys:[]})}))}removeSync(e){Jn(this,vc)&&(e=`${Jn(this,vc)}_${e}`),Jn(this,gc).keys.has(e)&&(Jn(this,pc).removeItem(e),Jn(this,gc).keys.delete(e))}clear(){return Gn(this,void 0,void 0,(function*(){return Promise.resolve(this.clearSync())}))}clearSync(){Jn(this,gc).keys.forEach((e=>{Jn(this,vc)&&e.indexOf(Jn(this,vc))<0||(Jn(this,pc).removeItem(e),Jn(this,gc).keys.delete(e))}))}}pc=new WeakMap,vc=new WeakMap,gc=new WeakMap;class Uc extends tc{constructor(e){super(),_c.set(this,void 0),mc.set(this,void 0),Vn(this,mc,{keys:new Set,currentSize:0,limitSize:Fu.STORAGE_LIMIT}),Vn(this,_c,e)}get(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(mn,{mpds_action:"mpds.get",mpds_data:{keys:e},appId:Jn(this,_c)},{isMultiCallback:!1}).then((e=>{let t=new Map;return e&&e.mpds_data&&e.mpds_data.map&&(t=new Map(Object.entries(e.mpds_data.map))),t}))}))}set(e){return Gn(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(mn,{mpds_action:"mpds.set",mpds_data:{map:e},appId:Jn(this,_c)},{isMultiCallback:!1}).then((e=>{let t=[];return e&&e.mpds_data&&e.mpds_data.error_keys&&(t=e.mpds_data.error_keys),t}))}}))}getInfo(){return Gn(this,void 0,void 0,(function*(){const e=yield this.callNative(mn,{mpds_action:"mpds.get.size",mpds_data:{},appId:Jn(this,_c)},{isMultiCallback:!1}).then((e=>{let t=0;return e&&e.mpds_data&&e.mpds_data.size&&(t=e.mpds_data.size),t}));return{currentSize:n.isNumber(e)?Number(e/1024):0,limitSize:Number(Fu.STORAGE_LIMIT/1024)}}))}remove(e){return Gn(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(mn,{mpds_action:"mpds.remove.key",mpds_data:{keys:e},appId:Jn(this,_c)},{isMultiCallback:!1}).then((e=>{let t=[];return e&&e.mpds_data&&e.mpds_data.error_keys&&(t=e.mpds_data.error_keys),t}))}}))}clear(){return Gn(this,void 0,void 0,(function*(){yield this.callNative(mn,{mpds_action:"mpds.clear.appData",mpds_data:{},appId:Jn(this,_c)})}))}}_c=new WeakMap,mc=new WeakMap;class zc{getDataFromStorage(e){return Gn(this,void 0,void 0,(function*(){const t=this.getInstance(),n=yield t.get(e),r={};return n.forEach(((e,t)=>{r[t]=Hn(e)})),r}))}putDataToStorage(e){return Gn(this,void 0,void 0,(function*(){const t=this.getInstance(),r={};return Object.entries(e).forEach((([e,t])=>{n.isUndefined(t)||n.isNull(t)||(r[e]=$n(t))})),yield t.set(r)}))}removeDataFromStorage(e){return Gn(this,void 0,void 0,(function*(){const t=this.getInstance();return yield t.remove(e)}))}clearStorage(){return Gn(this,void 0,void 0,(function*(){const e=this.getInstance();yield e.clear()}))}getStorageInfo(){return Gn(this,void 0,void 0,(function*(){const e=this.getInstance();return yield e.getInfo()}))}}class Dc extends zc{constructor(e){super(),yc.set(this,void 0),Vn(this,yc,e)}getInstance(){return new Mc(Jn(this,yc))}}yc=new WeakMap;class Fc extends zc{constructor(e){super(),wc.set(this,void 0),Vn(this,wc,e)}getInstance(){return new Uc(Jn(this,wc))}}wc=new WeakMap;class qc{static setStorage(e){return Gn(this,void 0,void 0,(function*(){let t=new Dc(this.getAppId());return Wn()&&(t=new Fc(this.getAppId())),yield t.putDataToStorage(e.data)}))}static getStorage(e){return Gn(this,void 0,void 0,(function*(){let t=new Dc(this.getAppId());Wn()&&(t=new Fc(this.getAppId()));return yield t.getDataFromStorage(e.keys)}))}static getStorageInfo(e){return Gn(this,void 0,void 0,(function*(){let e=new Dc(this.getAppId());return Wn()&&(e=new Fc(this.getAppId())),yield e.getStorageInfo()}))}static removeStorage(e){return Gn(this,void 0,void 0,(function*(){let t=new Dc(this.getAppId());return Wn()&&(t=new Fc(this.getAppId())),yield t.removeDataFromStorage(e.keys)}))}static clearStorage(e={}){return Gn(this,void 0,void 0,(function*(){let e=new Dc(this.getAppId());Wn()&&(e=new Fc(this.getAppId())),yield e.clearStorage()}))}}class Zc{static getUserInfo(e){return Gn(this,void 0,void 0,(function*(){const t=yield this.getAccessToken();let n="id,name,picture";(null==e?void 0:e.avatarType)&&(n=`${n}.type(${null==e?void 0:e.avatarType})`);return{userInfo:yield Du.get(Fu.APIS.GET_USER_INFO,{params:{fields:n,access_token:t}}).then((e=>{const t=e.data,n={id:t.id,name:t.name,birthday:"",gender:"",avatar:t.picture&&t.picture.data&&t.picture.data.url};return console.warn("'birthday' and 'gender' are deprecated"),n}))}}))}static getPhoneNumber(e){return new Promise(((e,t)=>{this.callNative(wn,{},{isMultiCallback:!0,callback:(n,r)=>{if(r&&t(r),0===n.error_code){const t={number:n.data};e(t)}}})}))}}class Wc{static closeApp(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(Qt,{})}))}static openMiniApp(e){return Gn(this,void 0,void 0,(function*(){const t=null==e?void 0:e.appId,n=(null==e?void 0:e.params)||{},r=Object.entries(n).map((function([e,t]){return[e,t].join("=")})).join("&");yield this.callNative(vn,{mpUrl:`${Fu.MINI_APP_INTERNAL_LINK}/${t}/${r.length>0?"?"+r:""}`,mpInfo:{appId:t}})}))}static openWebview(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(Ft,{url:e.url})}))}}class $c{static getLocation(e){return new Promise(((e,t)=>{this.callNative(nn,{silent_request:!1,permission_description:"Cho phép Zalo truy cập vào vị trí của thiết bị này?"},{isMultiCallback:!0,haveTimeout:!1,callback:(n,r)=>{if(r&&t(r),0===n.error_code){const t=n.data,r={latitude:t.latitude,longitude:t.longitude,timestamp:t.timestamp,provider:t.provider};e(r)}}})}))}static sendLocation(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(rn,{title:e.title,touserid:e.toUserId,zapp:this.getZAppId()})}))}}class Hc{static requestCameraPermission(e){return new Promise(((e,t)=>{this.callNative(Kt,{},{callback:(n,r)=>{-2===n.error_code||n.error_code>=0?e({userAllow:-2!==n.error_code,message:n.error_message}):t(r)}})}))}static saveImageToPhotosAlbum(e){return Gn(this,void 0,void 0,(function*(){let t={};return t=n.isEmpty(e.imageBase64Data)?Object.assign(Object.assign({},t),{imageUrl:e.imageUrl}):Object.assign(Object.assign({},t),{imageBase64Data:e.imageBase64Data}),yield this.callNative(pn,Object.assign({},t))}))}}class Kc{static viewOAQr(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(ln,{dpn:e.displayName,uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openProfile(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(Dt,{uId:e.id,type:exports.ProfileType[e.type],zapp:this.getZAppId(),sourceId:e.sourceId,sourceIndex:e.sourceIndex})}))}static openChat(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(qt,{uId:e.id,type:exports.ChatType[e.type],zapp:this.getZAppId(),sourceId:e.sourceId,sourceIndex:e.sourceIndex})}))}static openPostFeed(e){return Gn(this,void 0,void 0,(function*(){let t={};switch(e.type){case"image":t={photoUrl:e.data.imageUrl};break;case"link":t={link:e.data.link,title:e.data.title,thumb:e.data.thumb,description:e.data.description};break;case"profile":t={avt:e.data.avatar,uid:e.data.id,dpn:e.data.displayName}}return yield this.callNative(Zt,Object.assign(Object.assign({type:exports.PostFeedType[e.type]},t),{zapp:this.getZAppId()})).then((e=>({status:e.status,shareType:e.share_type,numberOfUser:e.uid_to_size})))}))}static followOA(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(Wt,{uid:e.id,showDialogConfirm:!0,zapp:this.getZAppId()},{haveTimeout:!1})}))}static unfollowOA(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative($t,{uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openShareSheet(e){return Gn(this,void 0,void 0,(function*(){let t={};switch(e.type){case"image":t={photoUrl:e.data.imageUrl};break;case"gif":t={photoUrl:e.data.imageUrl,gifUrl:e.data.gifUrl,width:e.data.width,height:e.data.height};break;case"video":t={videoThumb:e.data.videoThumb,videoUrl:e.data.videoUrl,width:e.data.width,height:e.data.height};break;case"link":t={link:e.data.link,chatOnly:e.data.chatOnly?1:0};break;case"oa":t={uid:e.data.id};break;case"zmp":const n=new URL(location.href),r=new URLSearchParams;r.append("title",e.data.title),r.append("description",e.data.description),r.append("thumbnail",e.data.thumbnail),r.append("url",`https://zalo.me/app/link${n.pathname}${n.search}`);const i={headers:{"Content-Type":"application/x-www-form-urlencoded"}},o=(yield Du.post("https://h5.zalo.me/openapi/create-sharelink",r,i)).data;if(!o||0!==o.err)throw nc.cannotGetShareInfo();e.type="link",t={link:o.data.shareUrl,chatOnly:e.data.chatOnly?1:0}}return yield this.callNative(Ht,Object.assign(Object.assign({type:exports.ShareSheetType[e.type]},t),{zapp:this.getZAppId()}),{haveTimeout:!1}).then((e=>({status:e.status,shareType:e.share_type,numberOfUser:e.uid_to_size})))}))}static createShortcut(e){return Gn(this,void 0,void 0,(function*(){yield this.callNative(Vt,{url:`${Fu.MINI_APP_LINK}/${this.getAppId()}/`,title:document.title,iconUrl:`https:${Bn("og:image:url")}`})}))}}class Yc{static getRouteParams(){let e={};const t=window.location.href;try{let n=new URL(t).searchParams.toString();n&&(e=qu.getParamsAsObject(n))}catch(e){throw new Error("Url không hợp lệ")}return e}static sendDataToPreviousMiniApp(e){return Gn(this,void 0,void 0,(function*(){return yield this.callNative(yn,{result:$n(e.data)})}))}static onCallbackData(e){return Gn(this,void 0,void 0,(function*(){yield this.events.on(exports.Events.OnDataCallback,(t=>{e({data:t})}))}))}}class Gc extends tc{constructor(){super(),bc.set(this,window.zAppID),kc.set(this,window.APP_ID),Ec.set(this,window.APP_CONFIG||{}),Ac.set(this,void 0),Sc.set(this,void 0),xc.set(this,{timer:{getToken:0}}),this.events=Qn.getInstance(),Cc.set(this,(()=>{const e=Jn(this,Ec).app||null;if(e){const t=e.title,r=e.headerColor,i=e.textColor,o=e.statusBarColor,a=e.leftButton;if(n.isString(t)&&this.setNavigationBarTitle({title:t}),n.isString(r)){const e={color:r};!n.isString(i)||"black"!==i&&"white"!==i||(e.textColor=i),n.isString(o)&&(e.statusBarColor=o),this.setNavigationBarColor(e)}n.isString(a)&&this.setNavigationBarLeftButton({type:a})}})),Tc.set(this,(()=>{try{Jn(this,Cc).call(this)}catch(e){console.error(e)}})),Rc.set(this,(()=>new Promise(((e,t)=>{((e,t)=>{const n=document.getElementById("zmp-permission-container"),r=document.getElementById("button-accept"),i=document.getElementById("button-deny");n&&r&&i&&(n.style.display="block",r.onclick=()=>{e&&e(),n.style.display="none"},i.onclick=()=>{t&&t(),n.style.display="none"})})((()=>{this.callNative("action.jump.login",{}).then((t=>{const n=t&&t.cookiesOAuthLogins||[],r=n.find((e=>e.name===Fu.COOKIE_NAME.JS_TOKEN));r&&(this.setJSToken(r.value),window.ZJSBridge.setJSToken&&window.ZJSBridge.setJSToken(r.value)),e(n)})).catch((e=>{t(e)}))}),(()=>{t(new Error("User denied!"))}))})))),Oc.set(this,cc.setNavigationBarRightButton),this.getVersion=uc.getVersion,this.getSystemInfo=uc.getSystemInfo,this.setNavigationBarTitle=cc.setNavigationBarTitle,this.setNavigationBarColor=cc.setNavigationBarColor,this.setNavigationBarLeftButton=cc.setNavigationBarLeftButton,this.setBackgroundColor=lc.setBackgroundColor,this.setDeviceOrientation=dc.setDeviceOrientation,this.setStorage=qc.setStorage,this.getStorage=qc.getStorage,this.getStorageInfo=qc.getStorageInfo,this.removeStorage=qc.removeStorage,this.clearStorage=qc.clearStorage,this.getUserInfo=Zc.getUserInfo,this.getNetworkType=dc.getNetworkType,this.onNetworkStatusChange=dc.onNetworkStatusChange,this.startBeaconDiscovery=dc.startBeaconDiscovery,this.stopBeaconDiscovery=dc.stopBeaconDiscovery,this.getBeacons=dc.getBeacons,this.closeApp=Wc.closeApp,this.getLocation=$c.getLocation,this.stopBluetoothDevicesDiscovery=dc.stopBluetoothDevicesDiscovery,this.startBluetoothDevicesDiscovery=dc.stopBluetoothDevicesDiscovery,this.openBluetoothAdapter=dc.openBluetoothAdapter,this.onBluetoothDeviceFound=dc.onBluetoothDeviceFound,this.onBluetoothAdapterStateChange=dc.onBluetoothAdapterStateChange,this.getConnectedBluetoothDevices=dc.getConnectedBluetoothDevices,this.getBluetoothDevices=dc.getBluetoothDevices,this.getBluetoothAdapterState=dc.getBluetoothAdapterState,this.closeBluetoothAdapter=dc.closeBluetoothAdapter,this.scanQRCode=dc.scanQRCode,this.openProfile=Kc.openProfile,this.openChat=Kc.openChat,this.openPostFeed=Kc.openPostFeed,this.followOA=Kc.followOA,this.unFollowOA=Kc.unfollowOA,this.openShareSheet=Kc.openShareSheet,this.requestCameraPermission=Hc.requestCameraPermission,this.createShortcut=Kc.createShortcut,this.openBioAuthentication=dc.openBioAuthentication,this.checkStateBioAuthentication=dc.checkStateBioAuthentication,this.sendLocation=$c.sendLocation,this.showToast=dc.showToast,this.hideKeyboard=dc.hideKeyboard,this.openPhone=dc.openPhone,this.openSMS=dc.openSMS,this.viewOAQr=Kc.viewOAQr,this.keepScreen=dc.keepScreen,this.saveImageToPhotosAlbum=Hc.saveImageToPhotosAlbum,this.openMiniApp=Wc.openMiniApp,this.vibrate=dc.vibrate,this.openWebview=Wc.openWebview,this.getRouteParams=Yc.getRouteParams,this.getAppInfo=uc.getAppInfo,this.sendDataToPreviousMiniApp=Yc.sendDataToPreviousMiniApp,this.onCallbackData=Yc.onCallbackData,this.getPhoneNumber=Zc.getPhoneNumber,Vn(this,Ac,null),Vn(this,Sc,null),this.isShowNavBar=!0,this.isShowHomeButton=!0}static getInstance(){return Gc.instance||(Gc.instance=new Gc),Gc.instance}getAppId(){return Jn(this,kc)}getZAppId(){return Jn(this,bc)}login(e){return Gn(this,void 0,void 0,(function*(){const e=(yield Jn(this,Rc).call(this)).find((e=>e.name===Fu.COOKIE_NAME.ZOAUTH));if(!n.isUndefined(e)&&!n.isNull(e)&&n.isString(e.value)){Vn(this,Ac,e.value);const t=()=>Gn(this,void 0,void 0,(function*(){return(n.isUndefined(Jn(this,Ac))||n.isNull(Jn(this,Ac)))&&clearInterval(Jn(this,xc).timer.getToken),yield Du.get("https://oauth.zaloapp.com/v3/access_token",{params:{app_id:Jn(this,bc),redirect_uri:`https://h5.zdn.vn/zapps/${Jn(this,kc)}/`,code:Jn(this,Ac),isSDK:!0}}).then((e=>{let n=e.data;if(n.access_token){Vn(this,Sc,n.access_token);const e=1e3*parseInt(n.expires_in);return Jn(this,xc).timer.getToken||(Jn(this,xc).timer.getToken=window.setInterval(t,e)),this.setZAccSession(Jn(this,Sc)||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(Jn(this,Sc)||""),Jn(this,Sc)}return null}))}));return clearInterval(Jn(this,xc).timer.getToken),yield t(),"Login Success!"}throw nc.loginFailed()}))}getAccessToken(e){return Gn(this,void 0,void 0,(function*(){if(Jn(this,Sc))return Jn(this,Sc);throw nc.loginRequired()}))}}bc=new WeakMap,kc=new WeakMap,Ec=new WeakMap,Ac=new WeakMap,Sc=new WeakMap,xc=new WeakMap,Cc=new WeakMap,Tc=new WeakMap,Rc=new WeakMap,Oc=new WeakMap;class Jc{constructor(){Ic.set(this,window.zAppID),Nc.set(this,window.APP_CONFIG||{}),jc.set(this,"DEFAULT ZOAUTH"),Lc.set(this,"DEFAULT ACCESS TOKEN"),Pc.set(this,{timer:{getToken:0}}),this.getAppId=()=>Jn(this,Ic),this.login=()=>Promise.resolve(Jn(this,jc)),this.getAccessToken=()=>Promise.resolve(Jn(this,Lc)),this.getVersion=uc.getVersion,this.getSystemInfo=uc.getSystemInfo,this.setNavigationBarTitle=()=>Promise.resolve(),this.setNavigationBarColor=()=>Promise.resolve(),this.setBackgroundColor=()=>Promise.resolve(),this.setNavigationBarLeftButton=()=>Promise.resolve(),this.setDeviceOrientation=()=>Promise.resolve(),this.setStorage=e=>Gn(this,void 0,void 0,(function*(){const t=new Dc(this.getAppId());return yield t.putDataToStorage(e.data),{errorKeys:[]}})),this.getStorage=e=>Gn(this,void 0,void 0,(function*(){const t=new Dc(this.getAppId());return yield t.getDataFromStorage(e.keys)})),this.getStorageInfo=e=>Gn(this,void 0,void 0,(function*(){const e=new Dc(this.getAppId());return yield e.getStorageInfo()})),this.removeStorage=e=>Gn(this,void 0,void 0,(function*(){const t=new Dc(this.getAppId());return yield t.removeDataFromStorage(e.keys)})),this.clearStorage=e=>Gn(this,void 0,void 0,(function*(){const e=new Dc(this.getAppId());return yield e.clearStorage()})),this.getUserInfo=()=>(console.warn("birthday and gender are deprecated"),Promise.resolve({userInfo:{id:"3368637342326461234",name:"User Name",avatar:"https://h5.zdn.vn/static/images/avatar.png"}})),this.getNetworkType=()=>{let e;switch((navigator.connection||navigator.mozConnection||navigator.webkitConnection).effectiveType){case"none":e=exports.NetworkType.none;break;case"4g":e=exports.NetworkType.wifi;break;case"3g":case"2g":e=exports.NetworkType.cellular;break;default:e=exports.NetworkType.unknown}const t={networkType:e};return Promise.resolve(t)},this.onNetworkStatusChange=e=>{const t=navigator.connection||navigator.mozConnection||navigator.webkitConnection,n=t.effectiveType;return t.addEventListener("change",(function(){let t;switch(n){case"none":t=exports.NetworkType.none;break;case"4g":t=exports.NetworkType.wifi;break;case"3g":case"2g":t=exports.NetworkType.cellular;break;default:t=exports.NetworkType.unknown}e({isConnected:!0,networkType:t})})),Promise.resolve()},this.startBeaconDiscovery=e=>Promise.resolve(!0),this.stopBeaconDiscovery=e=>Promise.resolve(!0),this.getBeacons=e=>Promise.resolve({beacons:[]}),this.closeApp=()=>Promise.resolve(),this.getLocation=()=>Promise.resolve({longitude:"105.788026",latitude:"21.0258773",timestamp:(new Date).getTime().toString(),provider:"fused"}),this.onBackButtonClick=()=>Promise.resolve(),this.stopBluetoothDevicesDiscovery=()=>Promise.resolve(),this.startBluetoothDevicesDiscovery=()=>Promise.resolve(),this.openBluetoothAdapter=()=>Promise.resolve(),this.onBluetoothDeviceFound=()=>Promise.resolve(),this.onBluetoothAdapterStateChange=()=>Promise.resolve(),this.getConnectedBluetoothDevices=()=>Promise.resolve(),this.getBluetoothDevices=()=>Promise.resolve(),this.getBluetoothAdapterState=()=>Promise.resolve(),this.closeBluetoothAdapter=()=>Promise.resolve(),this.scanQRCode=()=>Promise.resolve({content:"132"}),this.openProfile=()=>Promise.resolve(),this.openChat=()=>Promise.resolve(),this.openPostFeed=()=>Promise.resolve({status:1,shareType:0,numberOfUser:0}),this.followOA=()=>Promise.resolve(),this.unFollowOA=()=>Promise.resolve(),this.openShareSheet=()=>Promise.resolve({status:2,shareType:0,numberOfUser:0}),this.requestCameraPermission=()=>Promise.resolve({userAllow:!0,message:"Success"}),this.createShortcut=()=>Promise.resolve(),this.openBioAuthentication=()=>Promise.resolve({code:0,message:"OK",data:{domain:"",code:0,message:"",payToken:""}}),this.checkStateBioAuthentication=()=>Promise.resolve({bioState:""}),this.sendLocation=()=>Promise.resolve(),this.showToast=()=>Promise.resolve(),this.hideKeyboard=()=>Promise.resolve(),this.openPhone=()=>Promise.resolve(),this.openSMS=()=>Promise.resolve(),this.viewOAQr=()=>Promise.resolve(),this.keepScreen=()=>Promise.resolve(),this.saveImageToPhotosAlbum=()=>Promise.resolve(),this.openMiniApp=e=>Promise.resolve(),this.vibrate=()=>Promise.resolve(),this.openWebview=e=>(location.replace(e.url),Promise.resolve()),this.getRouteParams=Yc.getRouteParams,this.getAppInfo=()=>Promise.resolve({description:"",name:"",version:"",appUrl:"",qrCodeUrl:""}),this.sendDataToPreviousMiniApp=e=>Promise.resolve(),this.onCallbackData=e=>(e({data:""}),Promise.resolve()),this.getPhoneNumber=()=>(console.warn("This api only works on zalo app"),Promise.resolve({number:""}))}on(e,t,n){throw new Error("Method not implemented.")}once(e,t,n){throw new Error("Method not implemented.")}off(e,t,n,r){throw new Error("Method not implemented.")}removeAllListeners(e){throw new Error("Method not implemented.")}}Ic=new WeakMap,Nc=new WeakMap,jc=new WeakMap,Lc=new WeakMap,Pc=new WeakMap,function(t){!function(n){var r="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),i=o(t);function o(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===r.Reflect?r.Reflect=t:i=o(r.Reflect,i),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,s=!o&&!a,u={create:o?function(){return ie(Object.create(null))}:a?function(){return ie({__proto__:null})}:function(){return ie({})},has:s?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:s?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),l="object"==typeof T&&T.env&&"true"===T.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?te():Map,h=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?ne():Set,d=new(l||"function"!=typeof WeakMap?re():WeakMap);function p(e,t,n,r){if(B(n)){if(!$(e))throw new TypeError;if(!K(t))throw new TypeError;return A(e,t)}if(!$(e))throw new TypeError;if(!z(t))throw new TypeError;if(!z(r)&&!B(r)&&!M(r))throw new TypeError;return M(r)&&(r=void 0),S(e,t,n=W(n),r)}function v(e,t){function n(n,r){if(!z(n))throw new TypeError;if(!B(r)&&!Y(r))throw new TypeError;N(e,t,n,r)}return n}function g(e,t,n,r){if(!z(n))throw new TypeError;return B(r)||(r=W(r)),N(e,t,n,r)}function _(e,t,n){if(!z(t))throw new TypeError;return B(n)||(n=W(n)),C(e,t,n)}function m(e,t,n){if(!z(t))throw new TypeError;return B(n)||(n=W(n)),R(e,t,n)}function y(e,t,n){if(!z(t))throw new TypeError;return B(n)||(n=W(n)),O(e,t,n)}function w(e,t,n){if(!z(t))throw new TypeError;return B(n)||(n=W(n)),I(e,t,n)}function b(e,t){if(!z(e))throw new TypeError;return B(t)||(t=W(t)),j(e,t)}function k(e,t){if(!z(e))throw new TypeError;return B(t)||(t=W(t)),L(e,t)}function E(e,t,n){if(!z(t))throw new TypeError;B(n)||(n=W(n));var r=x(t,n,!1);if(B(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=d.get(t);return i.delete(n),i.size>0||d.delete(t),!0}function A(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!B(r)&&!M(r)){if(!K(r))throw new TypeError;t=r}}return t}function S(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!B(o)&&!M(o)){if(!z(o))throw new TypeError;r=o}}return r}function x(e,t,n){var r=d.get(e);if(B(r)){if(!n)return;r=new f,d.set(e,r)}var i=r.get(t);if(B(i)){if(!n)return;i=new f,r.set(t,i)}return i}function C(e,t,n){if(R(e,t,n))return!0;var r=ee(t);return!M(r)&&C(e,r,n)}function R(e,t,n){var r=x(t,n,!1);return!B(r)&&q(r.has(e))}function O(e,t,n){if(R(e,t,n))return I(e,t,n);var r=ee(t);return M(r)?void 0:O(e,r,n)}function I(e,t,n){var r=x(t,n,!1);if(!B(r))return r.get(e)}function N(e,t,n,r){x(n,r,!0).set(e,t)}function j(e,t){var n=L(e,t),r=ee(e);if(null===r)return n;var i=j(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new h,a=[],s=0,u=n;s<u.length;s++){var c=u[s];o.has(c)||(o.add(c),a.push(c))}for(var l=0,f=i;l<f.length;l++){c=f[l];o.has(c)||(o.add(c),a.push(c))}return a}function L(e,t){var n=[],r=x(e,t,!1);if(B(r))return n;for(var i=J(r.keys()),o=0;;){var a=X(i);if(!a)return n.length=o,n;var s=V(a);try{n[o]=s}catch(e){try{Q(i)}finally{throw e}}o++}}function P(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function B(e){return void 0===e}function M(e){return null===e}function U(e){return"symbol"==typeof e}function z(e){return"object"==typeof e?null!==e:"function"==typeof e}function D(e,t){switch(P(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n=3===t?"string":5===t?"number":"default",i=G(e,r);if(void 0!==i){var o=i.call(e,n);if(z(o))throw new TypeError;return o}return F(e,"default"===n?"number":n)}function F(e,t){if("string"===t){var n=e.toString;if(H(n))if(!z(i=n.call(e)))return i;if(H(r=e.valueOf))if(!z(i=r.call(e)))return i}else{var r;if(H(r=e.valueOf))if(!z(i=r.call(e)))return i;var i,o=e.toString;if(H(o))if(!z(i=o.call(e)))return i}throw new TypeError}function q(e){return!!e}function Z(e){return""+e}function W(e){var t=D(e,3);return U(t)?t:Z(t)}function $(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function H(e){return"function"==typeof e}function K(e){return"function"==typeof e}function Y(e){switch(P(e)){case 3:case 4:return!0;default:return!1}}function G(e,t){var n=e[t];if(null!=n){if(!H(n))throw new TypeError;return n}}function J(e){var t=G(e,i);if(!H(t))throw new TypeError;var n=t.call(e);if(!z(n))throw new TypeError;return n}function V(e){return e.value}function X(e){var t=e.next();return!t.done&&t}function Q(e){var t=e.return;t&&t.call(e)}function ee(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c)return t;if(t!==c)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function te(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,r)},t.prototype.values=function(){return new n(this._keys,this._values,o)},t.prototype.entries=function(){return new n(this._keys,this._values,a)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function r(e,t){return e}function o(e,t){return t}function a(e,t){return[e,t]}}function ne(){return function(){function e(){this._map=new f}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}()}function re(){var e=16,n=u.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+c()}while(u.has(n,e));return n[e]=!0,e}function o(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function a(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function s(e){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):a(new Uint8Array(e),e):a(new Array(e),e)}function c(){var t=s(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function ie(e){return e.__=void 0,delete e.__,e}e("decorate",p),e("metadata",v),e("defineMetadata",g),e("hasMetadata",_),e("hasOwnMetadata",m),e("getMetadata",y),e("getOwnMetadata",w),e("getMetadataKeys",b),e("getOwnMetadataKeys",k),e("deleteMetadata",E)}(i)}()}(Bc||(Bc={}));const Vc=Symbol("required"),Xc=Symbol("checkType"),Qc=(...e)=>(t,n,r)=>{let i=Reflect.getOwnMetadata(Vc,t,n)||[];i.push({parameterIndex:r,fields:e}),Reflect.defineMetadata(Vc,i,t,n)},el=(e,t,n)=>(r,i,o)=>{let a=Reflect.getOwnMetadata(Xc,r,i)||[];a.push({parameterIndex:o,type:e,properties:t,key:n}),Reflect.defineMetadata(Xc,a,r,i)};const tl=(e,t,r)=>{const i=r.value,o=i.toString().match(/\(.*?\)/)[0].replace(/[()]/gi,"").replace(/\s/gi,"").split(",");return r.value=function(){const r=Reflect.getOwnMetadata(Vc,e,t),a=Reflect.getOwnMetadata(Xc,e,t);return a&&a.forEach((e=>{const{parameterIndex:t,type:r,properties:i,key:a}=e;let s=arguments[t],u=o[t];if(!n.isEmpty(a)){const e=null==a?void 0:a.split(".");Array.isArray(e)&&e.length>0&&e.forEach((e=>{s=s[e],u=`${u}.${e}`}))}const c=typeof s;if(!n.isUndefined(s)){if(!zn(s,r))throw nc.wrongTypeParam(u,r,Array.isArray(s)?"array":null===s?"null":c);"object"===r&&Object.entries(i).forEach((([e,t])=>{const r=s[e];if(!n.isUndefined(r)){if(Array.isArray(t)&&!t.includes(r))throw nc.wrongTypeParam(`${u}.${e}`,`${t}`.replace(/,/g,"|"),`'${r}'`);if(!Array.isArray(t)&&!zn(r,t))throw nc.wrongTypeParam(`${u}.${e}`,t,Array.isArray(r)?"array":null===r?"null":typeof r)}}))}})),r&&r.forEach((e=>{const{parameterIndex:t,fields:r}=e,i=arguments[t],a=o[t],s=typeof i;if(!Array.isArray(i)&&"object"===s&&r.some((e=>n.isUndefined(i[e]))))throw nc.missingParam(`${r} in ${a}`);if("object"!==s&&(t>=arguments.length||n.isUndefined(i)))throw nc.missingParam(a)})),i.apply(this,arguments)},r};var nl;class rl{constructor(){this.events=Qn.getInstance(),nl.set(this,void 0),Vn(this,nl,this.getInstance()),this.events.addListener=(e,t,n)=>{console.log(123123);const r=e;return this.events.addListener(exports.Events[r],t,n)}}login(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).login(e)}))}getAccessToken(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getAccessToken(e)}))}getVersion(){return Jn(this,nl).getVersion()}getSystemInfo(){return Jn(this,nl).getSystemInfo()}setNavigationBarTitle(e){return Gn(this,void 0,void 0,(function*(){return Jn(this,nl).setNavigationBarTitle(e)}))}setNavigationBarColor(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).setNavigationBarColor(e)}))}setBackgroundColor(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).setBackgroundColor(e)}))}setNavigationBarLeftButton(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).setNavigationBarLeftButton(e)}))}setDeviceOrientation(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).setDeviceOrientation(e)}))}setStorage(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).setStorage(e)}))}getStorage(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getStorage(e)}))}getStorageInfo(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getStorageInfo(e)}))}removeStorage(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).removeStorage(e)}))}clearStorage(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).clearStorage(e)}))}getUserInfo(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getUserInfo(e)}))}getNetworkType(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getNetworkType(e)}))}onNetworkStatusChange(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).onNetworkStatusChange(e)}))}startBeaconDiscovery(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).startBeaconDiscovery(e)}))}stopBeaconDiscovery(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).stopBeaconDiscovery(e)}))}getBeacons(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getBeacons(e)}))}closeApp(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).closeApp(e)}))}getLocation(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getLocation(e)}))}stopBluetoothDevicesDiscovery(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).stopBluetoothDevicesDiscovery()}))}startBluetoothDevicesDiscovery(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).startBluetoothDevicesDiscovery(e)}))}openBluetoothAdapter(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).openBluetoothAdapter()}))}onBluetoothDeviceFound(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).onBluetoothDeviceFound()}))}onBluetoothAdapterStateChange(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).onBluetoothAdapterStateChange()}))}getConnectedBluetoothDevices(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getConnectedBluetoothDevices(e)}))}getBluetoothDevices(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getBluetoothDevices()}))}getBluetoothAdapterState(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).getBluetoothAdapterState()}))}closeBluetoothAdapter(){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).closeBluetoothAdapter()}))}scanQRCode(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).scanQRCode(e)}))}openProfile(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).openProfile(e)}))}openChat(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).openChat(e)}))}openPostFeed(e){return Gn(this,void 0,void 0,(function*(){const t=e.type;if("image"===t&&Dn(e.data.imageUrl))throw nc.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("link"===t&&(Dn(e.data.link)||!jn(e.data.link)))throw nc.wrongTypeParam("object.data.link","valid url","invalid");if("profile"===t){if(Dn(e.data.id))throw nc.wrongTypeParam("object.data.id","valid id","empty");if(Dn(e.data.avatar)||!jn(e.data.avatar))throw nc.wrongTypeParam("object.data.avatar","valid url","invalid");if(Dn(e.data.displayName))throw nc.wrongTypeParam("object.data.displayName","valid displayName","empty")}return yield Jn(this,nl).openPostFeed(e)}))}followOA(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).followOA(e)}))}unfollowOA(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).unFollowOA(e)}))}openShareSheet(e){return Gn(this,void 0,void 0,(function*(){const t=e.type;if("image"===t&&Dn(e.data.imageUrl))throw nc.wrongTypeParam("object.data.imageUrl","valid url","invalid");if("gif"===t&&(Dn(e.data.gifUrl)||!jn(e.data.gifUrl)))throw nc.wrongTypeParam("object.data.gifUrl","valid url","invalid");if("video"===t){if(Dn(e.data.videoThumb)||!jn(e.data.videoThumb))throw nc.wrongTypeParam("object.data.videoThumb","valid url","invalid");if(Dn(e.data.videoUrl)||!jn(e.data.videoUrl))throw nc.wrongTypeParam("object.data.videoUrl","valid url","invalid")}else{if("link"===t&&(Dn(e.data.link)||!jn(e.data.link)))throw nc.wrongTypeParam("object.data.link","valid url","invalid");if("oa"===t&&Dn(e.data.id))throw nc.wrongTypeParam("object.data.id","valid id","empty");if("zmp"===t&&(e.data.title.length>100||e.data.description.length>400))throw nc.lengthInvalid("'title' or 'description'")}return yield Jn(this,nl).openShareSheet(e)}))}requestCameraPermission(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).requestCameraPermission(e)}))}createShortcut(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).createShortcut(e)}))}openBioAuthentication(e){var t;return Gn(this,void 0,void 0,(function*(){return n.isUndefined(e.requireFingerprint)&&(e.requireFingerprint=!0),Dn(null===(t=e.ui)||void 0===t?void 0:t.title)&&(e.ui=Object.assign(Object.assign({},e.ui),{title:"Xác thực"})),Dn(e.ui.subTitle)&&(e.ui=Object.assign(Object.assign({},e.ui),{subTitle:"Sử dụng sinh trắc học của bạn để xác thực"})),Dn(e.ui.negativeButtonText)&&(e.ui=Object.assign(Object.assign({},e.ui),{negativeButtonText:"Đóng"})),yield Jn(this,nl).openBioAuthentication(e)}))}checkStateBioAuthentication(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).checkStateBioAuthentication(e)}))}sendLocation(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).sendLocation(e)}))}showToast(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).showToast(e)}))}hideKeyboard(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).hideKeyboard(e)}))}openPhone(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).openPhone(e)}))}openSMS(e){return Gn(this,void 0,void 0,(function*(){if(!/^\+?\d+$/.test(e.phoneNumber))throw nc.wrongTypeParam("object.phoneNumber","valid phone","invalid");yield Jn(this,nl).openSMS(e)}))}viewOAQr(e){return Gn(this,void 0,void 0,(function*(){(n.isUndefined(e.displayName)||n.isNull(e.displayName))&&(e.displayName=""),yield Jn(this,nl).viewOAQr(e)}))}keepScreen(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).keepScreen(e)}))}saveImageToPhotosAlbum(e){return Gn(this,void 0,void 0,(function*(){if(Dn(e.imageBase64Data)&&Dn(e.imageUrl))throw nc.wrongTypeParam("object.imageBase64Data | object.imageUrl","valid data","invalid");if(!Dn(e.imageUrl)&&!jn(e.imageUrl))throw nc.wrongTypeParam("object.imageUrl","valid url","invalid");return yield Jn(this,nl).saveImageToPhotosAlbum(e)}))}openMiniApp(e){return Gn(this,void 0,void 0,(function*(){if(!n.isEmpty(e.params)){const t=e.params||{};Object.keys(t).forEach((e=>{"object"==typeof t[e]&&(t[e]=JSON.stringify(t[e])),t[e]=""+encodeURIComponent(t[e])})),e.params=t}yield Jn(this,nl).openMiniApp(e)}))}vibrate(e){return Gn(this,void 0,void 0,(function*(){Dn(e.type)&&(e.type="oneShot"),Dn(e.milliseconds)&&(e.milliseconds=500),yield Jn(this,nl).vibrate(e)}))}openWebview(e){return Gn(this,void 0,void 0,(function*(){yield Jn(this,nl).openWebview(e)}))}getRouteParams(){return Jn(this,nl).getRouteParams()}getAppInfo(e){return Jn(this,nl).getAppInfo()}sendDataToPreviousMiniApp(e){return Jn(this,nl).sendDataToPreviousMiniApp(e)}onCallbackData(e){return Gn(this,void 0,void 0,(function*(){return yield Jn(this,nl).onCallbackData(e)}))}getPhoneNumber(e){return Jn(this,nl).getPhoneNumber()}}nl=new WeakMap,Kn([Xu],rl.prototype,"login",null),Kn([Xu],rl.prototype,"getAccessToken",null),Kn([Qu],rl.prototype,"getVersion",null),Kn([Qu],rl.prototype,"getSystemInfo",null),Kn([Xu,tl,Yn(0,el("object",{title:"string"})),Yn(0,Qc("title"))],rl.prototype,"setNavigationBarTitle",null),Kn([Xu,tl,Yn(0,el("object",{color:"string",textColor:["white","black"],statusBarColor:"string"})),Yn(0,Qc("color"))],rl.prototype,"setNavigationBarColor",null),Kn([Xu,tl,Yn(0,el("object",{backgroundColor:"string",textColor:["white","black"]})),Yn(0,Qc("backgroundColor"))],rl.prototype,"setBackgroundColor",null),Kn([Xu,tl,Yn(0,el("object",{type:["none","back","home","both"]})),Yn(0,Qc("type"))],rl.prototype,"setNavigationBarLeftButton",null),Kn([Xu,tl,Yn(0,el("object",{rotate:["auto","portrait","landscape"]})),Yn(0,Qc("rotate"))],rl.prototype,"setDeviceOrientation",null),Kn([Xu,tl,Yn(0,el("object",{data:"object"})),Yn(0,Qc("data"))],rl.prototype,"setStorage",null),Kn([Xu,tl,Yn(0,el("object",{keys:"array<string>"})),Yn(0,Qc("keys"))],rl.prototype,"getStorage",null),Kn([Xu],rl.prototype,"getStorageInfo",null),Kn([Xu,tl,Yn(0,el("object",{keys:"array<string>"})),Yn(0,Qc("keys"))],rl.prototype,"removeStorage",null),Kn([Xu],rl.prototype,"clearStorage",null),Kn([Xu,tl,Yn(0,el("object",{avatarType:["small","normal","large"]}))],rl.prototype,"getUserInfo",null),Kn([Xu],rl.prototype,"getNetworkType",null),Kn([Xu],rl.prototype,"onNetworkStatusChange",null),Kn([Xu],rl.prototype,"startBeaconDiscovery",null),Kn([Xu],rl.prototype,"stopBeaconDiscovery",null),Kn([Xu],rl.prototype,"getBeacons",null),Kn([Xu],rl.prototype,"closeApp",null),Kn([Xu],rl.prototype,"getLocation",null),Kn([Xu],rl.prototype,"stopBluetoothDevicesDiscovery",null),Kn([Xu],rl.prototype,"startBluetoothDevicesDiscovery",null),Kn([Xu],rl.prototype,"openBluetoothAdapter",null),Kn([Xu],rl.prototype,"onBluetoothDeviceFound",null),Kn([Xu],rl.prototype,"onBluetoothAdapterStateChange",null),Kn([Xu],rl.prototype,"getConnectedBluetoothDevices",null),Kn([Xu],rl.prototype,"getBluetoothDevices",null),Kn([Xu],rl.prototype,"getBluetoothAdapterState",null),Kn([Xu],rl.prototype,"closeBluetoothAdapter",null),Kn([Xu],rl.prototype,"scanQRCode",null),Kn([Xu,tl,Yn(0,el("object",{type:["user","oa","aliasOA"],id:"string"})),Yn(0,Qc("type","id"))],rl.prototype,"openProfile",null),Kn([Xu,tl,Yn(0,el("object",{type:["user","oa"],id:"string"})),Yn(0,Qc("type","id"))],rl.prototype,"openChat",null),Kn([Xu,tl,Yn(0,el("object",{type:["image","link","profile"],data:"object"})),Yn(0,el("object",{imageUrl:"string",link:"string",title:"string",thumb:"string",description:"string",avatar:"string",id:"string",displayName:"string"},"data")),Yn(0,Qc("type","data"))],rl.prototype,"openPostFeed",null),Kn([Xu,tl,Yn(0,el("object",{id:"string",showDialogConfirm:"boolean"})),Yn(0,Qc("id"))],rl.prototype,"followOA",null),Kn([Xu,tl,Yn(0,el("object",{id:"string"})),Yn(0,Qc("id"))],rl.prototype,"unfollowOA",null),Kn([Xu,tl,Yn(0,el("object",{type:["image","gif","video","link","oa","zmp"],data:"object"})),Yn(0,el("object",{imageUrl:"string",gifUrl:"string",width:"number",height:"number",videoThumb:"string",videoUrl:"string",link:"string",chatOnly:"boolean",id:"string",title:"string",description:"string",thumbnail:"url"},"data")),Yn(0,Qc("type","data"))],rl.prototype,"openShareSheet",null),Kn([Xu],rl.prototype,"requestCameraPermission",null),Kn([Xu],rl.prototype,"createShortcut",null),Kn([Xu,tl,Yn(0,Qc("secretData")),Yn(0,el("object",{secretData:"string",ui:"object",requireFingerprint:"boolean"})),Yn(0,el("object",{title:"string",subTitle:"string",negativeButtonText:"string"},"ui"))],rl.prototype,"openBioAuthentication",null),Kn([Xu],rl.prototype,"checkStateBioAuthentication",null),Kn([Xu,tl,Yn(0,Qc("toUserId"))],rl.prototype,"sendLocation",null),Kn([Xu,tl,Yn(0,Qc("message"))],rl.prototype,"showToast",null),Kn([Xu],rl.prototype,"hideKeyboard",null),Kn([Xu,tl,Yn(0,Qc("phoneNumber")),Yn(0,el("object",{phoneNumber:"string"}))],rl.prototype,"openPhone",null),Kn([Xu,tl,Yn(0,Qc("content","phoneNumber")),Yn(0,el("object",{content:"string",phoneNumber:"string"}))],rl.prototype,"openSMS",null),Kn([Xu,tl,Yn(0,Qc("id")),Yn(0,el("object",{id:"string",displayName:"string"}))],rl.prototype,"viewOAQr",null),Kn([Xu],rl.prototype,"keepScreen",null),Kn([Xu,tl,Yn(0,el("object",{imageBase64Data:"string",imageUrl:"string",type:"string"}))],rl.prototype,"saveImageToPhotosAlbum",null),Kn([Xu,tl,Yn(0,Qc("appId")),Yn(0,el("object",{appId:"string",params:"object"}))],rl.prototype,"openMiniApp",null),Kn([Xu,tl,Yn(0,el("object",{type:["oneShot"],milliseconds:"number"}))],rl.prototype,"vibrate",null),Kn([Xu,tl,Yn(0,Qc("url")),Yn(0,el("object",{url:"string"}))],rl.prototype,"openWebview",null),Kn([Qu],rl.prototype,"getRouteParams",null),Kn([Xu],rl.prototype,"getAppInfo",null),Kn([Xu],rl.prototype,"sendDataToPreviousMiniApp",null),Kn([Xu],rl.prototype,"onCallbackData",null),Kn([Xu],rl.prototype,"getPhoneNumber",null);class il extends rl{getInstance(){return Gc.getInstance()}}class ol extends rl{getInstance(){return new Jc}}const al=Pn();exports.default=void 0,window.onJSCall=e=>function(t){Yu.getInstance().onJSCall(e,t)},window.onMultiJSCall=e=>function(t){Yu.getInstance().onMultiJSCall(e,t)},window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){Yu.getInstance().nativeEventHandler(e,t,n)}},al.isZalo?exports.default=new il:exports.default=new ol,window.ZaloMiniAppSDK=exports.default,exports.SDKCreator=rl,exports.default=exports.default;
|