zmp-sdk 2.17.6 → 2.18.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 +1251 -17457
- package/dist/index.es.js +1253 -16327
- package/dist/index.js +1 -3
- package/dist/index.umd.js +1 -3
- package/dist/types/src/types/enum.d.ts +1 -1
- package/dist/types/src/types/inputData.d.ts +2 -0
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -13,6 +13,4 @@ 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 e(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 t(e,t){return function(n,r){t(n,r,e)}}function n(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 r(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function i(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var s=a((function(e,t){(function(){var n,r="Expected a function",i="__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]",m="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",E="[object Function]",k="[object GeneratorFunction]",A="[object Map]",S="[object Number]",O="[object Object]",T="[object Promise]",C="[object RegExp]",R="[object Set]",x="[object String]",I="[object Symbol]",N="[object WeakMap]",P="[object ArrayBuffer]",L="[object DataView]",B="[object Float32Array]",j="[object Float64Array]",M="[object Int8Array]",D="[object Int16Array]",U="[object Int32Array]",z="[object Uint8Array]",F="[object Uint8ClampedArray]",W="[object Uint16Array]",Z="[object Uint32Array]",q=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,Y=RegExp($.source),K=RegExp(V.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,X=/<%=([\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,he=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/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=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ce="\\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="['’]",xe="[\\ud800-\\udfff]",Ie="["+Ce+"]",Ne="["+ke+"]",Pe="\\d+",Le="[\\u2700-\\u27bf]",Be="["+Se+"]",je="[^\\ud800-\\udfff"+Ce+Pe+Ae+Se+Oe+"]",Me="\\ud83c[\\udffb-\\udfff]",De="[^\\ud800-\\udfff]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Oe+"]",We="(?:"+Be+"|"+je+")",Ze="(?:"+Fe+"|"+je+")",qe="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Ne+"|"+Me+")"+"?",$e="[\\ufe0e\\ufe0f]?",Ve=$e+Ge+("(?:\\u200d(?:"+[De,Ue,ze].join("|")+")"+$e+Ge+")*"),Ye="(?:"+[Le,Ue,ze].join("|")+")"+Ve,Ke="(?:"+[De+Ne+"?",Ne,Ue,ze,xe].join("|")+")",Je=RegExp(Re,"g"),Qe=RegExp(Ne,"g"),Xe=RegExp(Me+"(?="+Me+")|"+Ke+Ve,"g"),et=RegExp([Fe+"?"+Be+"+"+qe+"(?="+[Ie,Fe,"$"].join("|")+")",Ze+"+"+He+"(?="+[Ie,Fe+We,"$"].join("|")+")",Fe+"?"+We+"+"+qe,Fe+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ye].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+ke+Te+"]"),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[B]=ot[j]=ot[M]=ot[D]=ot[U]=ot[z]=ot[F]=ot[W]=ot[Z]=!0,ot[_]=ot[m]=ot[P]=ot[y]=ot[L]=ot[w]=ot[b]=ot[E]=ot[A]=ot[S]=ot[O]=ot[C]=ot[R]=ot[x]=ot[N]=!1;var at={};at[_]=at[m]=at[P]=at[L]=at[y]=at[w]=at[B]=at[j]=at[M]=at[D]=at[U]=at[A]=at[S]=at[O]=at[C]=at[R]=at[x]=at[I]=at[z]=at[F]=at[W]=at[Z]=!0,at[b]=at[E]=at[N]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,lt="object"==typeof o&&o&&o.Object===Object&&o,ht="object"==typeof self&&self&&self.Object===Object&&self,ft=lt||ht||Function("return this")(),dt=t&&!t.nodeType&&t,pt=dt&&e&&!e.nodeType&&e,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,Et=_t&&_t.isSet,kt=_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 Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ct(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 xt(e,t){return!!(null==e?0:e.length)&&zt(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 Pt(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 Bt(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 jt(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=qt("length");function Dt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ut(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 zt(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):Ut(e,Wt,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 Wt(e){return e!=e}function Zt(e,t){var n=null==e?0:e.length;return n?$t(e,t)/n:p}function qt(e){return function(t){return null==t?n:t[e]}}function Ht(e){return function(t){return null==e?n:e[t]}}function Gt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function $t(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function Vt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Yt(e){return e?e.slice(0,pn(e)+1).replace(oe,""):e}function Kt(e){return function(t){return e(t)}}function Jt(e,t){return Nt(t,(function(t){return e[t]}))}function Qt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&zt(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=Ht({"À":"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=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});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 hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function fn(e){return an(e)?function(e){var t=Xe.lastIndex=0;for(;Xe.test(e);)++t;return t}(e):Mt(e)}function dn(e){return an(e)?function(e){return e.match(Xe)||[]}(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=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gn=function e(t){var o,ae=(t=null==t?ft:gn.defaults(ft.Object(),t,gn.pick(ft,rt))).Array,ke=t.Date,Ae=t.Error,Se=t.Function,Oe=t.Math,Te=t.Object,Ce=t.RegExp,Re=t.String,xe=t.TypeError,Ie=ae.prototype,Ne=Se.prototype,Pe=Te.prototype,Le=t["__core-js_shared__"],Be=Ne.toString,je=Pe.hasOwnProperty,Me=0,De=(o=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",Ue=Pe.toString,ze=Be.call(Te),Fe=ft._,We=Ce("^"+Be.call(je).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ze=vt?t.Buffer:n,qe=t.Symbol,He=t.Uint8Array,Ge=Ze?Ze.allocUnsafe:n,$e=un(Te.getPrototypeOf,Te),Ve=Te.create,Ye=Pe.propertyIsEnumerable,Ke=Ie.splice,Xe=qe?qe.isConcatSpreadable:n,tt=qe?qe.iterator:n,st=qe?qe.toStringTag:n,lt=function(){try{var e=po(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),ht=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,dt=ke&&ke.now!==ft.Date.now&&ke.now,pt=t.setTimeout!==ft.setTimeout&&t.setTimeout,gt=Oe.ceil,_t=Oe.floor,Mt=Te.getOwnPropertySymbols,Ht=Ze?Ze.isBuffer:n,_n=t.isFinite,mn=Ie.join,yn=un(Te.keys,Te),wn=Oe.max,bn=Oe.min,En=ke.now,kn=t.parseInt,An=Oe.random,Sn=Ie.reverse,On=po(t,"DataView"),Tn=po(t,"Map"),Cn=po(t,"Promise"),Rn=po(t,"Set"),xn=po(t,"WeakMap"),In=po(Te,"create"),Nn=xn&&new xn,Pn={},Ln=Fo(On),Bn=Fo(Tn),jn=Fo(Cn),Mn=Fo(Rn),Dn=Fo(xn),Un=qe?qe.prototype:n,zn=Un?Un.valueOf:n,Fn=Un?Un.toString:n;function Wn(e){if(is(e)&&!$a(e)&&!(e instanceof Gn)){if(e instanceof Hn)return e;if(je.call(e,"__wrapped__"))return Wo(e)}return new Hn(e)}var Zn=function(){function e(){}return function(t){if(!rs(t))return{};if(Ve)return Ve(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function qn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function $n(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 Vn(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 Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yn;++t<n;)this.add(e[t])}function Jn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Qn(e,t){var n=$a(e),r=!n&&Ga(e),i=!n&&!r&&Ja(e),o=!n&&!r&&!i&&fs(e),a=n||r||i||o,s=a?Vt(e.length,Re):[],u=s.length;for(var c in e)!t&&!je.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 Xn(e){var t=e.length;return t?e[Kr(0,t-1)]:n}function er(e,t){return Do(Ii(e),cr(t,0,e.length))}function tr(e){return Do(Ii(e))}function nr(e,t,r){(r!==n&&!Za(e[t],r)||r===n&&!(t in e))&&sr(e,t,r)}function rr(e,t,r){var i=e[t];je.call(e,t)&&Za(i,r)&&(r!==n||t in e)||sr(e,t,r)}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 r=-1,i=t.length,o=ae(i),a=null==e;++r<i;)o[r]=a?n:Rs(e,t[r]);return o}function cr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function lr(e,t,r,i,o,a){var s,u=1&t,c=2&t,l=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!rs(e))return e;var h=$a(e);if(h){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Ii(e,s)}else{var f=_o(e),d=f==E||f==k;if(Ja(e))return Si(e,u);if(f==O||f==_||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,Bs(t),e)}(s,e)):function(e,t){return Ni(e,vo(e),t)}(e,ar(s,e))}else{if(!at[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case P:return Oi(e);case y:case w:return new r(+e);case L:return function(e,t){var n=t?Oi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case B:case j:case M:case D:case U:case z:case F:case W:case Z:return Ti(e,n);case A:return new r;case S:case x:return new r(e);case C: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,zn?Te(zn.call(i)):{}}var i}(e,f,u)}}a||(a=new Jn);var p=a.get(e);if(p)return p;a.set(e,s),cs(e)?e.forEach((function(n){s.add(lr(n,t,r,n,e,a))})):os(e)&&e.forEach((function(n,i){s.set(i,lr(n,t,r,i,e,a))}));var v=h?n:(l?c?ao:oo:c?Bs:Ls)(e);return Ot(v||e,(function(n,i){v&&(n=e[i=n]),rr(s,i,lr(n,t,r,i,e,a))})),s}function hr(e,t,r){var i=r.length;if(null==e)return!i;for(e=Te(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function fr(e,t,i){if("function"!=typeof e)throw new xe(r);return Lo((function(){e.apply(n,i)}),t)}function dr(e,t,n,r){var i=-1,o=xt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Nt(t,Kt(n))),r?(o=It,a=!1):t.length>=200&&(o=Qt,a=!1,t=new Kn(t));e:for(;++i<s;){var l=e[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h==h){for(var f=c;f--;)if(t[f]===h)continue e;u.push(l)}else o(t,h,r)||u.push(l)}return u}Wn.templateSettings={escape:J,evaluate:Q,interpolate:X,variable:"",imports:{_:Wn}},Wn.prototype=qn.prototype,Wn.prototype.constructor=Wn,Hn.prototype=Zn(qn.prototype),Hn.prototype.constructor=Hn,Gn.prototype=Zn(qn.prototype),Gn.prototype.constructor=Gn,$n.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},$n.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$n.prototype.get=function(e){var t=this.__data__;if(In){var r=t[e];return r===i?n:r}return je.call(t,e)?t[e]:n},$n.prototype.has=function(e){var t=this.__data__;return In?t[e]!==n:je.call(t,e)},$n.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=In&&t===n?i:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Vn.prototype.get=function(e){var t=this.__data__,r=ir(t,e);return r<0?n:t[r][1]},Vn.prototype.has=function(e){return ir(this.__data__,e)>-1},Vn.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},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Tn||Vn),string:new $n}},Yn.prototype.delete=function(e){var t=ho(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return ho(this,e).get(e)},Yn.prototype.has=function(e){return ho(this,e).has(e)},Yn.prototype.set=function(e,t){var n=ho(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,i),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Jn.prototype.get=function(e){return this.__data__.get(e)},Jn.prototype.has=function(e){return this.__data__.has(e)},Jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Tn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var pr=Bi(Er),vr=Bi(kr,!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,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(u===n?s==s&&!hs(s):r(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):Pt(i,s):r||(i[i.length]=s)}return i}var wr=ji(),br=ji(!0);function Er(e,t){return e&&wr(e,t,Ls)}function kr(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 r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[zo(t[r++])];return r&&r==i?e:n}function Or(e,t,n){var r=t(e);return $a(e)?r:Pt(r,n(e))}function Tr(e){return null==e?e===n?"[object Undefined]":"[object Null]":st&&st in Te(e)?function(e){var t=je.call(e,st),r=e[st];try{e[st]=n;var i=!0}catch(e){}var o=Ue.call(e);i&&(t?e[st]=r:delete e[st]);return o}(e):function(e){return Ue.call(e)}(e)}function Cr(e,t){return e>t}function Rr(e,t){return null!=e&&je.call(e,t)}function xr(e,t){return null!=e&&t in Te(e)}function Ir(e,t,r){for(var i=r?It:xt,o=e[0].length,a=e.length,s=a,u=ae(a),c=1/0,l=[];s--;){var h=e[s];s&&t&&(h=Nt(h,Kt(t))),c=bn(h.length,c),u[s]=!r&&(t||o>=120&&h.length>=120)?new Kn(s&&h):n}h=e[0];var f=-1,d=u[0];e:for(;++f<o&&l.length<c;){var p=h[f],v=t?t(p):p;if(p=r||0!==p?p:0,!(d?Qt(d,v):i(l,v,r))){for(s=a;--s;){var g=u[s];if(!(g?Qt(g,v):i(e[s],v,r)))continue e}d&&d.push(v),l.push(p)}}return l}function Nr(e,t,r){var i=null==(e=xo(e,t=bi(t,e)))?e:e[zo(Xo(t))];return null==i?n:At(i,e,r)}function Pr(e){return is(e)&&Tr(e)==_}function Lr(e,t,r,i,o){return e===t||(null==e||null==t||!is(e)&&!is(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=$a(e),u=$a(t),c=s?m:_o(e),l=u?m:_o(t),h=(c=c==_?O:c)==O,f=(l=l==_?O:l)==O,d=c==l;if(d&&Ja(e)){if(!Ja(t))return!1;s=!0,h=!1}if(d&&!h)return a||(a=new Jn),s||fs(e)?ro(e,t,r,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 P:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case y:case w:case S:return Za(+e,+t);case b:return e.name==t.name&&e.message==t.message;case C:case x: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(zn)return zn.call(e)==zn.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var p=h&&je.call(e,"__wrapped__"),v=f&&je.call(t,"__wrapped__");if(p||v){var g=p?e.value():e,E=v?t.value():t;return a||(a=new Jn),o(g,E,r,i,a)}}if(!d)return!1;return a||(a=new Jn),function(e,t,r,i,o,a){var s=1&r,u=oo(e),c=u.length,l=oo(t).length;if(c!=l&&!s)return!1;var h=c;for(;h--;){var f=u[h];if(!(s?f in t:je.call(t,f)))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(;++h<c;){var _=e[f=u[h]],m=t[f];if(i)var y=s?i(m,_,f,t,e,a):i(_,m,f,e,t,a);if(!(y===n?_===m||o(_,m,r,i,a):y)){v=!1;break}g||(g="constructor"==f)}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,r,i,o,a)}(e,t,r,i,Lr,o))}function Br(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Te(e);o--;){var u=r[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=r[o])[0],l=e[c],h=u[1];if(s&&u[2]){if(l===n&&!(c in e))return!1}else{var f=new Jn;if(i)var d=i(l,h,c,e,t,f);if(!(d===n?Lr(h,l,3,i,f):d))return!1}}return!0}function jr(e){return!(!rs(e)||(t=e,De&&De in t))&&(es(e)?We:_e).test(Fo(e));var t}function Mr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?$a(e)?Zr(e[0],e[1]):Wr(e):vu(e)}function Dr(e){if(!Oo(e))return yn(e);var t=[];for(var n in Te(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ur(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Te(e))t.push(n);return t}(e);var t=Oo(e),n=[];for(var r in e)("constructor"!=r||!t&&je.call(e,r))&&n.push(r);return n}function zr(e,t){return e<t}function Fr(e,t){var n=-1,r=Ya(e)?ae(e.length):[];return pr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Wr(e){var t=fo(e);return 1==t.length&&t[0][2]?Co(t[0][0],t[0][1]):function(n){return n===e||Br(n,e,t)}}function Zr(e,t){return ko(e)&&To(t)?Co(zo(e),t):function(r){var i=Rs(r,e);return i===n&&i===t?xs(r,e):Lr(t,i,3)}}function qr(e,t,r,i,o){e!==t&&wr(t,(function(a,s){if(o||(o=new Jn),rs(a))!function(e,t,r,i,o,a,s){var u=No(e,r),c=No(t,r),l=s.get(c);if(l)return void nr(e,r,l);var h=a?a(u,c,r+"",e,t,s):n,f=h===n;if(f){var d=$a(c),p=!d&&Ja(c),v=!d&&!p&&fs(c);h=c,d||p||v?$a(u)?h=u:Ka(u)?h=Ii(u):p?(f=!1,h=Si(c,!0)):v?(f=!1,h=Ti(c,!0)):h=[]:ss(c)||Ga(c)?(h=u,Ga(u)?h=ws(u):rs(u)&&!es(u)||(h=yo(c))):f=!1}f&&(s.set(c,h),o(h,c,i,a,s),s.delete(c));nr(e,r,h)}(e,t,s,r,qr,i,o);else{var u=i?i(No(e,s),a,s+"",e,t,o):n;u===n&&(u=a),nr(e,s,u)}}),Bs)}function Hr(e,t){var r=e.length;if(r)return bo(t+=t<0?r:0,r)?e[t]:n}function Gr(e,t,n){t=t.length?Nt(t,(function(e){return $a(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=Nt(t,Kt(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=Ci(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 $r(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 Vr(e,t,n,r){var i=r?Ft:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),n&&(s=Nt(e,Kt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Ke.call(s,u,1),Ke.call(e,u,1);return e}function Yr(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)?Ke.call(e,i,1):di(e,i)}}return e}function Kr(e,t){return e+_t(An()*(t-e+1))}function Jr(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 Qr(e,t){return Bo(Ro(e,t,au),e+"")}function Xr(e){return Xn(Zs(e))}function ei(e,t){var n=Zs(e);return Do(n,cr(t,0,n.length))}function ti(e,t,r,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=zo(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var h=u[c];(l=i?i(h,c,u):n)===n&&(l=rs(h)?h: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 Do(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&&!hs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ui(e,t,au,n)}function ui(e,t,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,u=null===t,c=hs(t),l=t===n;o<a;){var h=_t((o+a)/2),f=r(e[h]),d=f!==n,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<=t:f<t);_?o=h+1:a=h}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:hs(e)?p:+e}function hi(e){if("string"==typeof e)return e;if($a(e))return Nt(e,hi)+"";if(hs(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fi(e,t,n){var r=-1,i=xt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=It;else if(o>=200){var c=t?null:Ji(e);if(c)return ln(c);a=!1,i=Qt,u=new Kn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],h=t?t(l):l;if(l=n||0!==l?l:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue e;t&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function di(e,t){return null==(e=xo(e,t=bi(t,e)))||delete e[zo(Xo(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 Gn&&(n=n.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))}),n)}function _i(e,t,n){var r=e.length;if(r<2)return r?fi(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 fi(yr(o,1),t,n)}function mi(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var u=i<a?t[i]:n;r(s,e[i],u)}return s}function yi(e){return Ka(e)?e:[]}function wi(e){return"function"==typeof e?e:au}function bi(e,t){return $a(e)?e:ko(e,t)?[e]:Uo(bs(e))}var Ei=Qr;function ki(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:oi(e,t,r)}var Ai=ht||function(e){return ft.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Oi(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Ti(e,t){var n=t?Oi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=hs(e),s=t!==n,u=null===t,c=t==t,l=hs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&r&&o&&!i&&!a||u&&r&&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),h=!r;++s<u;)l[s]=t[s];for(;++i<a;)(h||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[s++]=e[i++];return l}function xi(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),h=ae(l+c),f=!r;++i<l;)h[i]=e[i];for(var d=i;++u<c;)h[d+u]=t[u];for(;++a<s;)(f||i<o)&&(h[d+n[a]]=e[i++]);return h}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,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=i?i(r[u],e[u],u,r,e):n;c===n&&(c=e[u]),o?sr(r,u,c):rr(r,u,c)}return r}function Pi(e,t){return function(n,r){var i=$a(n)?St:or,o=t?t():{};return i(n,e,lo(r,2),o)}}function Li(e){return Qr((function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&Eo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Te(t);++i<o;){var u=r[i];u&&e(t,u,i,a)}return t}))}function Bi(e,t){return function(n,r){if(null==n)return n;if(!Ya(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Te(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function ji(e){return function(t,n,r){for(var i=-1,o=Te(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 r=an(t=bs(t))?dn(t):n,i=r?r[0]:t.charAt(0),o=r?ki(r,1).join(""):t.slice(1);return i[e]()+o}}function Di(e){return function(t){return Lt(eu(Gs(t).replace(Je,"")),e,"")}}function Ui(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 zi(e){return function(t,r,i){var o=Te(t);if(!Ya(t)){var a=lo(r,3);t=Ls(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function Fi(e){return io((function(t){var i=t.length,o=i,a=Hn.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new xe(r);if(a&&!u&&"wrapper"==uo(s))var u=new Hn([],!0)}for(o=u?o:i;++o<i;){var c=uo(s=t[o]),l="wrapper"==c?so(s):n;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,n=e[0];if(u&&1==e.length&&$a(n))return u.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}}))}function Wi(e,t,r,i,o,a,s,u,c,h){var f=t&l,d=1&t,p=2&t,v=24&t,g=512&t,_=p?n:Ui(e);return function n(){for(var l=arguments.length,m=ae(l),y=l;y--;)m[y]=arguments[y];if(v)var w=co(n),b=tn(m,w);if(i&&(m=Ri(m,i,o,v)),a&&(m=xi(m,a,s,v)),l-=b,v&&l<h){var E=cn(m,w);return Yi(e,t,Wi,n.placeholder,r,m,E,u,c,h-l)}var k=d?r:this,A=p?k[e]:e;return l=m.length,u?m=Io(m,u):g&&l>1&&m.reverse(),f&&c<l&&(m.length=c),this&&this!==ft&&this instanceof n&&(A=_||Ui(A)),A.apply(k,m)}}function Zi(e,t){return function(n,r){return function(e,t,n,r){return Er(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function qi(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=hi(r),i=hi(i)):(r=li(r),i=li(i)),o=e(r,i)}return o}}function Hi(e){return io((function(t){return t=Nt(t,Kt(lo())),Qr((function(n){var r=this;return e(t,(function(e){return At(e,r,n)}))}))}))}function Gi(e,t){var r=(t=t===n?" ":hi(t)).length;if(r<2)return r?Jr(t,e):t;var i=Jr(t,gt(e/fn(t)));return an(t)?ki(dn(i),0,e).join(""):i.slice(0,e)}function $i(e){return function(t,r,i){return i&&"number"!=typeof i&&Eo(t,r,i)&&(r=i=n),t=gs(t),r===n?(r=t,t=0):r=gs(r),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,r,i=i===n?t<r?1:-1:gs(i),e)}}function Vi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Yi(e,t,r,i,o,a,s,l,h,f){var d=8&t;t|=d?u:c,4&(t&=~(d?c:u))||(t&=-4);var p=[e,t,o,d?a:n,d?s:n,d?n:a,d?n:s,l,h,f],v=r.apply(n,p);return Ao(e)&&Po(v,p),v.placeholder=i,jo(v,e,t)}function Ki(e){var t=Oe[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 Ji=Rn&&1/ln(new Rn([,-0]))[1]==f?function(e){return new Rn(e)}:hu;function Qi(e){return function(t){var n=_o(t);return n==A?sn(t):n==R?hn(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,i,o,f,d,p,v){var g=2&t;if(!g&&"function"!=typeof e)throw new xe(r);var _=o?o.length:0;if(_||(t&=-97,o=f=n),p=p===n?p:wn(_s(p),0),v=v===n?v:_s(v),_-=f?f.length:0,t&c){var m=o,y=f;o=f=n}var w=g?n:so(e),b=[e,t,i,o,f,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==h&&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?xi(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],i=b[2],o=b[3],f=b[4],!(v=b[9]=b[9]===n?g?0:e.length:wn(b[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==s?function(e,t,r){var i=Ui(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)<r?Yi(e,t,Wi,o.placeholder,n,s,l,n,n,r-a):At(this&&this!==ft&&this instanceof o?i:e,this,s)}}(e,t,v):t!=u&&33!=t||f.length?Wi.apply(n,b):function(e,t,n,r){var i=1&t,o=Ui(e);return function t(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=ae(c+s),h=this&&this!==ft&&this instanceof t?o:e;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return At(h,i?n:this,l)}}(e,t,i,o);else var E=function(e,t,n){var r=1&t,i=Ui(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return jo((w?ni:Po)(E,b),e,t)}function eo(e,t,r,i){return e===n||Za(e,Pe[r])&&!je.call(i,r)?t:e}function to(e,t,r,i,o,a){return rs(e)&&rs(t)&&(a.set(t,e),qr(e,t,n,to,a),a.delete(t)),e}function no(e){return ss(e)?n:e}function ro(e,t,r,i,o,a){var s=1&r,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),h=a.get(t);if(l&&h)return l==t&&h==e;var f=-1,d=!0,p=2&r?new Kn:n;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],g=t[f];if(i)var _=s?i(g,v,f,t,e,a):i(v,g,f,e,t,a);if(_!==n){if(_)continue;d=!1;break}if(p){if(!jt(t,(function(e,t){if(!Qt(p,t)&&(v===e||o(v,e,r,i,a)))return p.push(t)}))){d=!1;break}}else if(v!==g&&!o(v,g,r,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function io(e){return Bo(Ro(e,n,Vo),e+"")}function oo(e){return Or(e,Ls,vo)}function ao(e){return Or(e,Bs,go)}var so=Nn?function(e){return Nn.get(e)}:hu;function uo(e){for(var t=e.name+"",n=Pn[t],r=je.call(Pn,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(je.call(Wn,"placeholder")?Wn:e).placeholder}function lo(){var e=Wn.iteratee||su;return e=e===su?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function ho(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 fo(e){for(var t=Ls(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,To(i)]}return t}function po(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return jr(r)?r:n}var vo=Mt?function(e){return null==e?[]:(e=Te(e),Rt(Mt(e),(function(t){return Ye.call(e,t)})))}:mu,go=Mt?function(e){for(var t=[];e;)Pt(t,vo(e)),e=$e(e);return t}:mu,_o=Tr;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=zo(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)&&($a(e)||Ga(e))}function yo(e){return"function"!=typeof e.constructor||Oo(e)?{}:Zn($e(e))}function wo(e){return $a(e)||Ga(e)||!!(Xe&&e&&e[Xe])}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 Eo(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Ya(n)&&bo(t,n.length):"string"==r&&t in n)&&Za(n[t],e)}function ko(e,t){if($a(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!hs(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function Ao(e){var t=uo(e),n=Wn[t];if("function"!=typeof n||!(t in Gn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(On&&_o(new On(new ArrayBuffer(1)))!=L||Tn&&_o(new Tn)!=A||Cn&&_o(Cn.resolve())!=T||Rn&&_o(new Rn)!=R||xn&&_o(new xn)!=N)&&(_o=function(e){var t=Tr(e),r=t==O?e.constructor:n,i=r?Fo(r):"";if(i)switch(i){case Ln:return L;case Bn:return A;case jn:return T;case Mn:return R;case Dn:return N}return t});var So=Le?es:yu;function Oo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function To(e){return e==e&&!rs(e)}function Co(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Te(r)))}}function Ro(e,t,r){return t=wn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=wn(n.length-t,0),a=ae(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=ae(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),At(e,this,s)}}function xo(e,t){return t.length<2?e:Sr(e,oi(t,0,-1))}function Io(e,t){for(var r=e.length,i=bn(t.length,r),o=Ii(e);i--;){var a=t[i];e[i]=bo(a,r)?o[a]:n}return e}function No(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Po=Mo(ni),Lo=pt||function(e,t){return ft.setTimeout(e,t)},Bo=Mo(ri);function jo(e,t,n){var r=t+"";return Bo(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 Ot(g,(function(n){var r="_."+n[0];t&n[1]&&!xt(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,r=0;return function(){var i=En(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Do(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Kr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Uo=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(fe,"$1"):n||e)})),t}));function zo(e){if("string"==typeof e||hs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Be.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wo(e){if(e instanceof Gn)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Zo=Qr((function(e,t){return Ka(e)?dr(e,yr(t,1,Ka,!0)):[]})),qo=Qr((function(e,t){var r=Xo(t);return Ka(r)&&(r=n),Ka(e)?dr(e,yr(t,1,Ka,!0),lo(r,2)):[]})),Ho=Qr((function(e,t){var r=Xo(t);return Ka(r)&&(r=n),Ka(e)?dr(e,yr(t,1,Ka,!0),n,r):[]}));function Go(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)),Ut(e,lo(t,3),i)}function $o(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=_s(r),o=r<0?wn(i+o,0):bn(o,i-1)),Ut(e,lo(t,3),o,!0)}function Vo(e){return(null==e?0:e.length)?yr(e,1):[]}function Yo(e){return e&&e.length?e[0]:n}var Ko=Qr((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?Ir(t):[]})),Jo=Qr((function(e){var t=Xo(e),r=Nt(e,yi);return t===Xo(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ir(r,lo(t,2)):[]})),Qo=Qr((function(e){var t=Xo(e),r=Nt(e,yi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ir(r,n,t):[]}));function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:n}var ea=Qr(ta);function ta(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Yr(e,Nt(t,(function(e){return bo(e,n)?+e:e})).sort(Ci)),r}));function ra(e){return null==e?e:Sn.call(e)}var ia=Qr((function(e){return fi(yr(e,1,Ka,!0))})),oa=Qr((function(e){var t=Xo(e);return Ka(t)&&(t=n),fi(yr(e,1,Ka,!0),lo(t,2))})),aa=Qr((function(e){var t=Xo(e);return t="function"==typeof t?t:n,fi(yr(e,1,Ka,!0),n,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ka(e))return t=wn(e.length,t),!0})),Vt(t,(function(t){return Nt(e,qt(t))}))}function ua(e,t){if(!e||!e.length)return[];var r=sa(e);return null==t?r:Nt(r,(function(e){return At(t,n,e)}))}var ca=Qr((function(e,t){return Ka(e)?dr(e,t):[]})),la=Qr((function(e){return _i(Rt(e,Ka))})),ha=Qr((function(e){var t=Xo(e);return Ka(t)&&(t=n),_i(Rt(e,Ka),lo(t,2))})),fa=Qr((function(e){var t=Xo(e);return t="function"==typeof t?t:n,_i(Rt(e,Ka),n,t)})),da=Qr(sa);var pa=Qr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ua(e,r)}));function va(e){var t=Wn(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var _a=io((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Gn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:ga,args:[o],thisArg:n}),new Hn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var ma=Pi((function(e,t,n){je.call(e,n)?++e[n]:sr(e,n,1)}));var ya=zi(Go),wa=zi($o);function ba(e,t){return($a(e)?Ot:pr)(e,lo(t,3))}function Ea(e,t){return($a(e)?Tt:vr)(e,lo(t,3))}var ka=Pi((function(e,t,n){je.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Aa=Qr((function(e,t,n){var r=-1,i="function"==typeof t,o=Ya(e)?ae(e.length):[];return pr(e,(function(e){o[++r]=i?At(t,e,n):Nr(e,t,n)})),o})),Sa=Pi((function(e,t,n){sr(e,n,t)}));function Oa(e,t){return($a(e)?Nt:Fr)(e,lo(t,3))}var Ta=Pi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ca=Qr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Eo(e,t[0],t[1])?t=[]:n>2&&Eo(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,yr(t,1),[])})),Ra=dt||function(){return ft.Date.now()};function xa(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Xi(e,l,n,n,n,n,t)}function Ia(e,t){var i;if("function"!=typeof t)throw new xe(r);return e=_s(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Na=Qr((function(e,t,n){var r=1;if(n.length){var i=cn(n,co(Na));r|=u}return Xi(e,r,t,n,i)})),Pa=Qr((function(e,t,n){var r=3;if(n.length){var i=cn(n,co(Pa));r|=u}return Xi(t,r,e,n,i)}));function La(e,t,i){var o,a,s,u,c,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new xe(r);function v(t){var r=o,i=a;return o=a=n,h=t,u=e.apply(i,r)}function g(e){return h=e,c=Lo(m,t),f?v(e):u}function _(e){var r=e-l;return l===n||r>=t||r<0||d&&e-h>=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-h)):n}(e))}function y(e){return c=n,p&&o?v(e):(o=a=n,u)}function w(){var e=Ra(),r=_(e);if(o=arguments,a=this,l=e,r){if(c===n)return g(l);if(d)return Ai(c),c=Lo(m,t),v(l)}return c===n&&(c=Lo(m,t)),u}return t=ys(t)||0,rs(i)&&(f=!!i.leading,s=(d="maxWait"in i)?wn(ys(i.maxWait)||0,t):s,p="trailing"in i?!!i.trailing:p),w.cancel=function(){c!==n&&Ai(c),h=0,o=l=a=c=n},w.flush=function(){return c===n?u:y(Ra())},w}var Ba=Qr((function(e,t){return fr(e,1,t)})),ja=Qr((function(e,t,n){return fr(e,ys(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new xe(r);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||Yn),n}function Da(e){if("function"!=typeof e)throw new xe(r);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=Yn;var Ua=Ei((function(e,t){var n=(t=1==t.length&&$a(t[0])?Nt(t[0],Kt(lo())):Nt(yr(t,1),Kt(lo()))).length;return Qr((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)}))})),za=Qr((function(e,t){var r=cn(t,co(za));return Xi(e,u,n,t,r)})),Fa=Qr((function(e,t){var r=cn(t,co(Fa));return Xi(e,c,n,t,r)})),Wa=io((function(e,t){return Xi(e,h,n,n,n,t)}));function Za(e,t){return e===t||e!=e&&t!=t}var qa=Vi(Cr),Ha=Vi((function(e,t){return e>=t})),Ga=Pr(function(){return arguments}())?Pr:function(e){return is(e)&&je.call(e,"callee")&&!Ye.call(e,"callee")},$a=ae.isArray,Va=mt?Kt(mt):function(e){return is(e)&&Tr(e)==P};function Ya(e){return null!=e&&ns(e.length)&&!es(e)}function Ka(e){return is(e)&&Ya(e)}var Ja=Ht||yu,Qa=yt?Kt(yt):function(e){return is(e)&&Tr(e)==w};function Xa(e){if(!is(e))return!1;var t=Tr(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=Tr(e);return t==E||t==k||"[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?Kt(wt):function(e){return is(e)&&_o(e)==A};function as(e){return"number"==typeof e||is(e)&&Tr(e)==S}function ss(e){if(!is(e)||Tr(e)!=O)return!1;var t=$e(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Be.call(n)==ze}var us=bt?Kt(bt):function(e){return is(e)&&Tr(e)==C};var cs=Et?Kt(Et):function(e){return is(e)&&_o(e)==R};function ls(e){return"string"==typeof e||!$a(e)&&is(e)&&Tr(e)==x}function hs(e){return"symbol"==typeof e||is(e)&&Tr(e)==I}var fs=kt?Kt(kt):function(e){return is(e)&&ns(e.length)&&!!ot[Tr(e)]};var ds=Vi(zr),ps=Vi((function(e,t){return e<=t}));function vs(e){if(!e)return[];if(Ya(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))===f||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(hs(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=Yt(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,Bs(e))}function bs(e){return null==e?"":hi(e)}var Es=Li((function(e,t){if(Oo(t)||Ya(t))Ni(t,Ls(t),e);else for(var n in t)je.call(t,n)&&rr(e,n,t[n])})),ks=Li((function(e,t){Ni(t,Bs(t),e)})),As=Li((function(e,t,n,r){Ni(t,Bs(t),e,r)})),Ss=Li((function(e,t,n,r){Ni(t,Ls(t),e,r)})),Os=io(ur);var Ts=Qr((function(e,t){e=Te(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&Eo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Bs(a),u=-1,c=s.length;++u<c;){var l=s[u],h=e[l];(h===n||Za(h,Pe[l])&&!je.call(e,l))&&(e[l]=a[l])}return e})),Cs=Qr((function(e){return e.push(n,to),At(Ms,n,e)}));function Rs(e,t,r){var i=null==e?n:Sr(e,t);return i===n?r:i}function xs(e,t){return null!=e&&mo(e,t,xr)}var Is=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),e[t]=n}),ru(au)),Ns=Zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ue.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]}),lo),Ps=Qr(Nr);function Ls(e){return Ya(e)?Qn(e):Dr(e)}function Bs(e){return Ya(e)?Qn(e,!0):Ur(e)}var js=Li((function(e,t,n){qr(e,t,n)})),Ms=Li((function(e,t,n,r){qr(e,t,n,r)})),Ds=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 Us=io((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return xs(e,n)}))}(e,t)}));function zs(e,t){if(null==e)return{};var n=Nt(ao(e),(function(e){return[e]}));return t=lo(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Qi(Ls),Ws=Qi(Bs);function Zs(e){return null==e?[]:Jt(e,Ls(e))}var qs=Di((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Xs(bs(e).toLowerCase())}function Gs(e){return(e=bs(e))&&e.replace(we,nn).replace(Qe,"")}var $s=Di((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vs=Di((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ys=Mi("toLowerCase");var Ks=Di((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Js=Di((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Qs=Di((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Mi("toUpperCase");function eu(e,t,r){return e=bs(e),(t=r?n:t)===n?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=Qr((function(e,t){try{return At(e,n,t)}catch(e){return Xa(e)?e:new Ae(e)}})),nu=io((function(e,t){return Ot(t,(function(t){t=zo(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=Qr((function(e,t){return function(n){return Nr(n,e,t)}})),cu=Qr((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 Ot(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,Pt([this.value()],arguments))})})),e}function hu(){}var fu=Hi(Nt),du=Hi(Ct),pu=Hi(jt);function vu(e){return ko(e)?qt(zo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var gu=$i(),_u=$i(!0);function mu(){return[]}function yu(){return!1}var wu=qi((function(e,t){return e+t}),0),bu=Ki("ceil"),Eu=qi((function(e,t){return e/t}),1),ku=Ki("floor");var Au,Su=qi((function(e,t){return e*t}),1),Ou=Ki("round"),Tu=qi((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new xe(r);return e=_s(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=xa,Wn.assign=Es,Wn.assignIn=ks,Wn.assignInWith=As,Wn.assignWith=Ss,Wn.at=Os,Wn.before=Ia,Wn.bind=Na,Wn.bindAll=nu,Wn.bindKey=Pa,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $a(e)?e:[e]},Wn.chain=va,Wn.chunk=function(e,t,r){t=(r?Eo(e,t,r):t===n)?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},Wn.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},Wn.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 Pt($a(n)?Ii(n):[n],yr(t,1))},Wn.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 xe(r);return[n(e[0]),e[1]]})):[],Qr((function(n){for(var r=-1;++r<t;){var i=e[r];if(At(i[0],this,n))return At(i[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=Ls(e);return function(n){return hr(n,e,t)}}(lr(e,1))},Wn.constant=ru,Wn.countBy=ma,Wn.create=function(e,t){var n=Zn(e);return null==t?n:ar(n,t)},Wn.curry=function e(t,r,i){var o=Xi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Wn.curryRight=function e(t,r,i){var o=Xi(t,s,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Wn.debounce=La,Wn.defaults=Ts,Wn.defaultsDeep=Cs,Wn.defer=Ba,Wn.delay=ja,Wn.difference=Zo,Wn.differenceBy=qo,Wn.differenceWith=Ho,Wn.drop=function(e,t,r){var i=null==e?0:e.length;return i?oi(e,(t=r||t===n?1:_s(t))<0?0:t,i):[]},Wn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?oi(e,0,(t=i-(t=r||t===n?1:_s(t)))<0?0:t):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0):[]},Wn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Eo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=_s(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:_s(i))<0&&(i+=o),i=r>i?0:ms(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Wn.filter=function(e,t){return($a(e)?Rt:mr)(e,lo(t,3))},Wn.flatMap=function(e,t){return yr(Oa(e,t),1)},Wn.flatMapDeep=function(e,t){return yr(Oa(e,t),f)},Wn.flatMapDepth=function(e,t,r){return r=r===n?1:_s(r),yr(Oa(e,t),r)},Wn.flatten=Vo,Wn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,f):[]},Wn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===n?1:_s(t)):[]},Wn.flip=function(e){return Xi(e,512)},Wn.flow=iu,Wn.flowRight=ou,Wn.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},Wn.functions=function(e){return null==e?[]:Ar(e,Ls(e))},Wn.functionsIn=function(e){return null==e?[]:Ar(e,Bs(e))},Wn.groupBy=ka,Wn.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},Wn.intersection=Ko,Wn.intersectionBy=Jo,Wn.intersectionWith=Qo,Wn.invert=Is,Wn.invertBy=Ns,Wn.invokeMap=Aa,Wn.iteratee=su,Wn.keyBy=Sa,Wn.keys=Ls,Wn.keysIn=Bs,Wn.map=Oa,Wn.mapKeys=function(e,t){var n={};return t=lo(t,3),Er(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},Wn.mapValues=function(e,t){var n={};return t=lo(t,3),Er(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},Wn.matches=function(e){return Wr(lr(e,1))},Wn.matchesProperty=function(e,t){return Zr(e,lr(t,1))},Wn.memoize=Ma,Wn.merge=js,Wn.mergeWith=Ms,Wn.method=uu,Wn.methodOf=cu,Wn.mixin=lu,Wn.negate=Da,Wn.nthArg=function(e){return e=_s(e),Qr((function(t){return Hr(t,e)}))},Wn.omit=Ds,Wn.omitBy=function(e,t){return zs(e,Da(lo(t)))},Wn.once=function(e){return Ia(2,e)},Wn.orderBy=function(e,t,r,i){return null==e?[]:($a(t)||(t=null==t?[]:[t]),$a(r=i?n:r)||(r=null==r?[]:[r]),Gr(e,t,r))},Wn.over=fu,Wn.overArgs=Ua,Wn.overEvery=du,Wn.overSome=pu,Wn.partial=za,Wn.partialRight=Fa,Wn.partition=Ta,Wn.pick=Us,Wn.pickBy=zs,Wn.property=vu,Wn.propertyOf=function(e){return function(t){return null==e?n:Sr(e,t)}},Wn.pull=ea,Wn.pullAll=ta,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,lo(n,2)):e},Wn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vr(e,t,n,r):e},Wn.pullAt=na,Wn.range=gu,Wn.rangeRight=_u,Wn.rearg=Wa,Wn.reject=function(e,t){return($a(e)?Rt:mr)(e,Da(lo(t,3)))},Wn.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 Yr(e,i),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new xe(r);return Qr(e,t=t===n?t:_s(t))},Wn.reverse=ra,Wn.sampleSize=function(e,t,r){return t=(r?Eo(e,t,r):t===n)?1:_s(t),($a(e)?er:ei)(e,t)},Wn.set=function(e,t,n){return null==e?e:ti(e,t,n)},Wn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:ti(e,t,r,i)},Wn.shuffle=function(e){return($a(e)?tr:ii)(e)},Wn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Eo(e,t,r)?(t=0,r=i):(t=null==t?0:_s(t),r=r===n?i:_s(r)),oi(e,t,r)):[]},Wn.sortBy=Ca,Wn.sortedUniq=function(e){return e&&e.length?ci(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},Wn.split=function(e,t,r){return r&&"number"!=typeof r&&Eo(e,t,r)&&(t=r=n),(r=r===n?v:r>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!us(t))&&!(t=hi(t))&&an(e)?ki(dn(e),0,r):e.split(t,r):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new xe(r);return t=null==t?0:wn(_s(t),0),Qr((function(n){var r=n[t],i=ki(n,0,t);return r&&Pt(i,r),At(e,this,i)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},Wn.take=function(e,t,r){return e&&e.length?oi(e,0,(t=r||t===n?1:_s(t))<0?0:t):[]},Wn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?oi(e,(t=i-(t=r||t===n?1:_s(t)))<0?0:t,i):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?vi(e,lo(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new xe(r);return rs(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),La(e,t,{leading:i,maxWait:t,trailing:o})},Wn.thru=ga,Wn.toArray=vs,Wn.toPairs=Fs,Wn.toPairsIn=Ws,Wn.toPath=function(e){return $a(e)?Nt(e,zo):hs(e)?[e]:Ii(Uo(bs(e)))},Wn.toPlainObject=ws,Wn.transform=function(e,t,n){var r=$a(e),i=r||Ja(e)||fs(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rs(e)&&es(o)?Zn($e(e)):{}}return(i?Ot:Er)(e,(function(e,r,i){return t(n,e,r,i)})),n},Wn.unary=function(e){return xa(e,1)},Wn.union=ia,Wn.unionBy=oa,Wn.unionWith=aa,Wn.uniq=function(e){return e&&e.length?fi(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?fi(e,lo(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?fi(e,n,t):[]},Wn.unset=function(e,t){return null==e||di(e,t)},Wn.unzip=sa,Wn.unzipWith=ua,Wn.update=function(e,t,n){return null==e?e:pi(e,t,wi(n))},Wn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:pi(e,t,wi(r),i)},Wn.values=Zs,Wn.valuesIn=function(e){return null==e?[]:Jt(e,Bs(e))},Wn.without=ca,Wn.words=eu,Wn.wrap=function(e,t){return za(wi(t),e)},Wn.xor=la,Wn.xorBy=ha,Wn.xorWith=fa,Wn.zip=da,Wn.zipObject=function(e,t){return mi(e||[],t||[],rr)},Wn.zipObjectDeep=function(e,t){return mi(e||[],t||[],ti)},Wn.zipWith=pa,Wn.entries=Fs,Wn.entriesIn=Ws,Wn.extend=ks,Wn.extendWith=As,lu(Wn,Wn),Wn.add=wu,Wn.attempt=tu,Wn.camelCase=qs,Wn.capitalize=Hs,Wn.ceil=bu,Wn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ys(r))==r?r:0),t!==n&&(t=(t=ys(t))==t?t:0),cr(ys(e),t,r)},Wn.clone=function(e){return lr(e,4)},Wn.cloneDeep=function(e){return lr(e,5)},Wn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)},Wn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},Wn.conformsTo=function(e,t){return null==t||hr(e,t,Ls(t))},Wn.deburr=Gs,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=Eu,Wn.endsWith=function(e,t,r){e=bs(e),t=hi(t);var i=e.length,o=r=r===n?i:cr(_s(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Wn.eq=Za,Wn.escape=function(e){return(e=bs(e))&&K.test(e)?e.replace(V,rn):e},Wn.escapeRegExp=function(e){return(e=bs(e))&&ie.test(e)?e.replace(re,"\\$&"):e},Wn.every=function(e,t,r){var i=$a(e)?Ct:gr;return r&&Eo(e,t,r)&&(t=n),i(e,lo(t,3))},Wn.find=ya,Wn.findIndex=Go,Wn.findKey=function(e,t){return Dt(e,lo(t,3),Er)},Wn.findLast=wa,Wn.findLastIndex=$o,Wn.findLastKey=function(e,t){return Dt(e,lo(t,3),kr)},Wn.floor=ku,Wn.forEach=ba,Wn.forEachRight=Ea,Wn.forIn=function(e,t){return null==e?e:wr(e,lo(t,3),Bs)},Wn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Bs)},Wn.forOwn=function(e,t){return e&&Er(e,lo(t,3))},Wn.forOwnRight=function(e,t){return e&&kr(e,lo(t,3))},Wn.get=Rs,Wn.gt=qa,Wn.gte=Ha,Wn.has=function(e,t){return null!=e&&mo(e,t,Rr)},Wn.hasIn=xs,Wn.head=Yo,Wn.identity=au,Wn.includes=function(e,t,n,r){e=Ya(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&&zt(e,t,n)>-1},Wn.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)),zt(e,t,i)},Wn.inRange=function(e,t,r){return t=gs(t),r===n?(r=t,t=0):r=gs(r),function(e,t,n){return e>=bn(t,n)&&e<wn(t,n)}(e=ys(e),t,r)},Wn.invoke=Ps,Wn.isArguments=Ga,Wn.isArray=$a,Wn.isArrayBuffer=Va,Wn.isArrayLike=Ya,Wn.isArrayLikeObject=Ka,Wn.isBoolean=function(e){return!0===e||!1===e||is(e)&&Tr(e)==y},Wn.isBuffer=Ja,Wn.isDate=Qa,Wn.isElement=function(e){return is(e)&&1===e.nodeType&&!ss(e)},Wn.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&($a(e)||"string"==typeof e||"function"==typeof e.splice||Ja(e)||fs(e)||Ga(e)))return!e.length;var t=_o(e);if(t==A||t==R)return!e.size;if(Oo(e))return!Dr(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Lr(e,t)},Wn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Lr(e,t,n,r):!!i},Wn.isError=Xa,Wn.isFinite=function(e){return"number"==typeof e&&_n(e)},Wn.isFunction=es,Wn.isInteger=ts,Wn.isLength=ns,Wn.isMap=os,Wn.isMatch=function(e,t){return e===t||Br(e,t,fo(t))},Wn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Br(e,t,fo(t),r)},Wn.isNaN=function(e){return as(e)&&e!=+e},Wn.isNative=function(e){if(So(e))throw new Ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jr(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=as,Wn.isObject=rs,Wn.isObjectLike=is,Wn.isPlainObject=ss,Wn.isRegExp=us,Wn.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=d},Wn.isSet=cs,Wn.isString=ls,Wn.isSymbol=hs,Wn.isTypedArray=fs,Wn.isUndefined=function(e){return e===n},Wn.isWeakMap=function(e){return is(e)&&_o(e)==N},Wn.isWeakSet=function(e){return is(e)&&"[object WeakSet]"==Tr(e)},Wn.join=function(e,t){return null==e?"":mn.call(e,t)},Wn.kebabCase=$s,Wn.last=Xo,Wn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=_s(r))<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):Ut(e,Wt,o,!0)},Wn.lowerCase=Vs,Wn.lowerFirst=Ys,Wn.lt=ds,Wn.lte=ps,Wn.max=function(e){return e&&e.length?_r(e,au,Cr):n},Wn.maxBy=function(e,t){return e&&e.length?_r(e,lo(t,2),Cr):n},Wn.mean=function(e){return Zt(e,au)},Wn.meanBy=function(e,t){return Zt(e,lo(t,2))},Wn.min=function(e){return e&&e.length?_r(e,au,zr):n},Wn.minBy=function(e,t){return e&&e.length?_r(e,lo(t,2),zr):n},Wn.stubArray=mu,Wn.stubFalse=yu,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=Su,Wn.nth=function(e,t){return e&&e.length?Hr(e,_s(t)):n},Wn.noConflict=function(){return ft._===this&&(ft._=Fe),this},Wn.noop=hu,Wn.now=Ra,Wn.pad=function(e,t,n){e=bs(e);var r=(t=_s(t))?fn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Gi(_t(i),n)+e+Gi(gt(i),n)},Wn.padEnd=function(e,t,n){e=bs(e);var r=(t=_s(t))?fn(e):0;return t&&r<t?e+Gi(t-r,n):e},Wn.padStart=function(e,t,n){e=bs(e);var r=(t=_s(t))?fn(e):0;return t&&r<t?Gi(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(bs(e).replace(oe,""),t||0)},Wn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Eo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=gs(e),t===n?(t=e,e=0):t=gs(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=An();return bn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Kr(e,t)},Wn.reduce=function(e,t,n){var r=$a(e)?Lt:Gt,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Wn.reduceRight=function(e,t,n){var r=$a(e)?Bt:Gt,i=arguments.length<3;return r(e,lo(t,4),n,i,vr)},Wn.repeat=function(e,t,r){return t=(r?Eo(e,t,r):t===n)?1:_s(t),Jr(bs(e),t)},Wn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[zo(t[i])];a===n&&(i=o,a=r),e=es(a)?a.call(e):a}return e},Wn.round=Ou,Wn.runInContext=e,Wn.sample=function(e){return($a(e)?Xn:Xr)(e)},Wn.size=function(e){if(null==e)return 0;if(Ya(e))return ls(e)?fn(e):e.length;var t=_o(e);return t==A||t==R?e.size:Dr(e).length},Wn.snakeCase=Ks,Wn.some=function(e,t,r){var i=$a(e)?jt:ai;return r&&Eo(e,t,r)&&(t=n),i(e,lo(t,3))},Wn.sortedIndex=function(e,t){return si(e,t)},Wn.sortedIndexBy=function(e,t,n){return ui(e,t,lo(n,2))},Wn.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},Wn.sortedLastIndex=function(e,t){return si(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return ui(e,t,lo(n,2),!0)},Wn.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},Wn.startCase=Js,Wn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:cr(_s(n),0,e.length),t=hi(t),e.slice(n,n+t.length)==t},Wn.subtract=Tu,Wn.sum=function(e){return e&&e.length?$t(e,au):0},Wn.sumBy=function(e,t){return e&&e.length?$t(e,lo(t,2)):0},Wn.template=function(e,t,r){var i=Wn.templateSettings;r&&Eo(e,t,r)&&(t=n),e=bs(e),t=As({},t,i,eo);var o,a,s=As({},t.imports,i.imports,eo),u=Ls(s),c=Jt(s,u),l=0,h=t.interpolate||be,f="__p += '",d=Ce((t.escape||be).source+"|"+h.source+"|"+(h===X?de:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+(je.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),f+=e.slice(l,u).replace(Ee,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+t.length,t})),f+="';\n";var v=je.call(t,"variable")&&t.variable;if(v){if(he.test(v))throw new Ae("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(q,""):f).replace(H,"$1").replace(G,"$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=tu((function(){return Se(u,p+"return "+f).apply(n,c)}));if(g.source=f,Xa(g))throw g;return g},Wn.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=Vt(r,t);++n<e;)t(n);return i},Wn.toFinite=gs,Wn.toInteger=_s,Wn.toLength=ms,Wn.toLower=function(e){return bs(e).toLowerCase()},Wn.toNumber=ys,Wn.toSafeInteger=function(e){return e?cr(_s(e),-9007199254740991,d):0===e?e:0},Wn.toString=bs,Wn.toUpper=function(e){return bs(e).toUpperCase()},Wn.trim=function(e,t,r){if((e=bs(e))&&(r||t===n))return Yt(e);if(!e||!(t=hi(t)))return e;var i=dn(e),o=dn(t);return ki(i,Xt(i,o),en(i,o)+1).join("")},Wn.trimEnd=function(e,t,r){if((e=bs(e))&&(r||t===n))return e.slice(0,pn(e)+1);if(!e||!(t=hi(t)))return e;var i=dn(e);return ki(i,0,en(i,dn(t))+1).join("")},Wn.trimStart=function(e,t,r){if((e=bs(e))&&(r||t===n))return e.replace(oe,"");if(!e||!(t=hi(t)))return e;var i=dn(e);return ki(i,Xt(i,dn(t))).join("")},Wn.truncate=function(e,t){var r=30,i="...";if(rs(t)){var o="separator"in t?t.separator:o;r="length"in t?_s(t.length):r,i="omission"in t?hi(t.omission):i}var a=(e=bs(e)).length;if(an(e)){var s=dn(e);a=s.length}if(r>=a)return e;var u=r-fn(i);if(u<1)return i;var c=s?ki(s,0,u).join(""):e.slice(0,u);if(o===n)return c+i;if(s&&(u+=c.length-u),us(o)){if(e.slice(u).search(o)){var l,h=c;for(o.global||(o=Ce(o.source,bs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var f=l.index;c=c.slice(0,f===n?u:f)}}else if(e.indexOf(hi(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},Wn.unescape=function(e){return(e=bs(e))&&Y.test(e)?e.replace($,vn):e},Wn.uniqueId=function(e){var t=++Me;return bs(e)+t},Wn.upperCase=Qs,Wn.upperFirst=Xs,Wn.each=ba,Wn.eachRight=Ea,Wn.first=Yo,lu(Wn,(Au={},Er(Wn,(function(e,t){je.call(Wn.prototype,t)||(Au[t]=e)})),Au),{chain:!1}),Wn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),Ot(["drop","take"],(function(e,t){Gn.prototype[e]=function(r){r=r===n?1:wn(_s(r),0);var i=this.__filtered__&&!t?new Gn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,v),type:e+(i.__dir__<0?"Right":"")}),i},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(au)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Qr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Nr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(Da(lo(e)))},Gn.prototype.slice=function(e,t){e=_s(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Gn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=_s(t))<0?r.dropRight(-t):r.take(t-e)),r)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(v)},Er(Gn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Wn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Wn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Gn,c=s[0],l=u||$a(t),h=function(e){var t=o.apply(Wn,Pt([e],s));return i&&f?t[0]:t};l&&r&&"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){t=v?t:new Gn(this);var g=e.apply(t,s);return g.__actions__.push({func:ga,args:[h],thisArg:n}),new Hn(g,f)}return p&&v?e.apply(this,s):(g=this.thru(h),p?i?g.value()[0]:g.value():g)})})),Ot(["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);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply($a(i)?i:[],e)}return this[n]((function(n){return t.apply($a(n)?n:[],e)}))}})),Er(Gn.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";je.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Wi(n,2).name]=[{name:"wrapper",func:n}],Gn.prototype.clone=function(){var e=new Gn(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},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=$a(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__,h=l.length,f=0,d=bn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(e,this.__actions__);var p=[];e:for(;u--&&f<d;){for(var v=-1,g=e[c+=t];++v<h;){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[f++]=g}return p},Wn.prototype.at=_a,Wn.prototype.chain=function(){return va(this)},Wn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},Wn.prototype.next=function(){this.__values__===n&&(this.__values__=vs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Wn.prototype.plant=function(e){for(var t,r=this;r instanceof qn;){var i=Wo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:ga,args:[ra],thisArg:n}),new Hn(t,this.__chain__)}return this.thru(ra)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,tt&&(Wn.prototype[tt]=function(){return this}),Wn}();pt?((pt.exports=gn)._=gn,dt._=gn):ft._=gn}).call(o)})),u=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)}},c=Object.prototype.toString;function l(e){return"[object Array]"===c.call(e)}function h(e){return void 0===e}function f(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==c.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Function]"===c.call(e)}function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(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 g={isArray:l,isArrayBuffer:function(e){return"[object ArrayBuffer]"===c.call(e)},isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(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:f,isPlainObject:d,isUndefined:h,isDate:function(e){return"[object Date]"===c.call(e)},isFile:function(e){return"[object File]"===c.call(e)},isBlob:function(e){return"[object Blob]"===c.call(e)},isFunction:p,isStream:function(e){return f(e)&&p(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:v,merge:function e(){var t={};function n(n,r){d(t[r])&&d(n)?t[r]=e(t[r],n):d(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)v(arguments[r],n);return t},extend:function(e,t,n){return v(t,(function(t,r){e[r]=n&&"function"==typeof t?u(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 _(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var m=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(g.isURLSearchParams(t))r=t.toString();else{var i=[];g.forEach(t,(function(e,t){null!=e&&(g.isArray(e)?t+="[]":e=[e],g.forEach(e,(function(e){g.isDate(e)?e=e.toISOString():g.isObject(e)&&(e=JSON.stringify(e)),i.push(_(t)+"="+_(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 y(){this.handlers=[]}y.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},y.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},y.prototype.forEach=function(e){g.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var w=y,b=function(e,t,n){return g.forEach(n,(function(n){e=n(e,t)})),e},E=function(e){return!(!e||!e.__CANCEL__)},k="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function A(){throw new Error("setTimeout has not been defined")}function S(){throw new Error("clearTimeout has not been defined")}var O=A,T=S;function C(e){if(O===setTimeout)return setTimeout(e,0);if((O===A||!O)&&setTimeout)return O=setTimeout,setTimeout(e,0);try{return O(e,0)}catch(t){try{return O.call(null,e,0)}catch(t){return O.call(this,e,0)}}}"function"==typeof k.setTimeout&&(O=setTimeout),"function"==typeof k.clearTimeout&&(T=clearTimeout);var R,x=[],I=!1,N=-1;function P(){I&&R&&(I=!1,R.length?x=R.concat(x):N=-1,x.length&&L())}function L(){if(!I){var e=C(P);I=!0;for(var t=x.length;t;){for(R=x,x=[];++N<t;)R&&R[N].run();N=-1,t=x.length}R=null,I=!1,function(e){if(T===clearTimeout)return clearTimeout(e);if((T===S||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(e);try{T(e)}catch(t){try{return T.call(null,e)}catch(t){return T.call(this,e)}}}(e)}}function B(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];x.push(new j(e,t)),1!==x.length||I||C(L)}function j(e,t){this.fun=e,this.array=t}j.prototype.run=function(){this.fun.apply(null,this.array)};function M(){}var D=M,U=M,z=M,F=M,W=M,Z=M,q=M;var H=k.performance||{},G=H.now||H.mozNow||H.msNow||H.oNow||H.webkitNow||function(){return(new Date).getTime()};var $=new Date;var V={nextTick:B,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:D,addListener:U,once:z,off:F,removeListener:W,removeAllListeners:Z,emit:q,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*G.call(H),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-$)/1e3}},Y=function(e,t){g.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},K=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},J=function(e,t,n,r,i){var o=new Error(e);return K(o,t,n,r,i)},Q=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(J("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)},X=g.isStandardBrowserEnv()?{write:function(e,t,n,r,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),g.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),g.isString(r)&&a.push("path="+r),g.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(){}},ee=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},te=["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"],ne=g.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=g.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},re=function(e){return new Promise((function(t,n){var r=e.data,i=e.headers;g.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=ee(e.baseURL,e.url);if(o.open(e.method.toUpperCase(),m(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?(g.forEach(r.split("\n"),(function(e){if(s=e.indexOf(":"),i=g.trim(e.substr(0,s)).toLowerCase(),a=g.trim(e.substr(s+1)),i){if(u[i]&&te.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};Q(t,n,l),o=null}},o.onabort=function(){o&&(n(J("Request aborted",e,"ECONNABORTED",o)),o=null)},o.onerror=function(){n(J("Network Error",e,null,o)),o=null},o.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(J(t,e,"ECONNABORTED",o)),o=null},g.isStandardBrowserEnv()){var c=(e.withCredentials||ne(u))&&e.xsrfCookieName?X.read(e.xsrfCookieName):void 0;c&&(i[e.xsrfHeaderName]=c)}if("setRequestHeader"in o&&g.forEach(i,(function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete i[t]:o.setRequestHeader(t,e)})),g.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)}))},ie=[],oe=[],ae="undefined"!=typeof Uint8Array?Uint8Array:Array,se=!1;function ue(){se=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)ie[t]=e[t],oe[e.charCodeAt(t)]=t;oe["-".charCodeAt(0)]=62,oe["_".charCodeAt(0)]=63}function ce(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(ie[(i=r)>>18&63]+ie[i>>12&63]+ie[i>>6&63]+ie[63&i]);return o.join("")}function le(e){var t;se||ue();for(var n=e.length,r=n%3,i="",o=[],a=16383,s=0,u=n-r;s<u;s+=a)o.push(ce(e,s,s+a>u?u:s+a));return 1===r?(t=e[n-1],i+=ie[t>>2],i+=ie[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=ie[t>>10],i+=ie[t>>4&63],i+=ie[t<<2&63],i+="="),o.push(i),o.join("")}function he(e,t,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=e[t+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+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 fe(e,t,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=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+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=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-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 de={}.toString,pe=Array.isArray||function(e){return"[object Array]"==de.call(e)};function ve(){return _e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ge(e,t){if(ve()<t)throw new RangeError("Invalid typed array length");return _e.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=_e.prototype:(null===e&&(e=new _e(t)),e.length=t),e}function _e(e,t,n){if(!(_e.TYPED_ARRAY_SUPPORT||this instanceof _e))return new _e(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 we(this,e)}return me(this,e,t,n)}function me(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);_e.TYPED_ARRAY_SUPPORT?(e=t).__proto__=_e.prototype:e=be(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!_e.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Ae(t,n),i=(e=ge(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(ke(t)){var n=0|Ee(t.length);return 0===(e=ge(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?ge(e,0):be(e,t);if("Buffer"===t.type&&pe(t.data))return be(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function ye(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 we(e,t){if(ye(t),e=ge(e,t<0?0:0|Ee(t)),!_e.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function be(e,t){var n=t.length<0?0:0|Ee(t.length);e=ge(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function Ee(e){if(e>=ve())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ve().toString(16)+" bytes");return 0|e}function ke(e){return!(null==e||!e._isBuffer)}function Ae(e,t){if(ke(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 Ke(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 Ke(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 Ue(this,t,n);case"utf8":case"utf-8":return je(this,t,n);case"ascii":return Me(this,t,n);case"latin1":case"binary":return De(this,t,n);case"base64":return Be(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ze(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Oe(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Te(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=_e.from(t,r)),ke(t))return 0===t.length?-1:Ce(e,t,n,r,i);if("number"==typeof t)return t&=255,_e.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):Ce(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Ce(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 h=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){h=!1;break}if(h)return o}return-1}function Re(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 xe(e,t,n,r){return Qe(Ke(t,e.length-n),e,n,r)}function Ie(e,t,n,r){return Qe(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function Ne(e,t,n,r){return Ie(e,t,n,r)}function Pe(e,t,n,r){return Qe(Je(t),e,n,r)}function Le(e,t,n,r){return Qe(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 Be(e,t,n){return 0===t&&n===e.length?le(e):le(e.slice(t,n))}function je(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,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=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,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}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)}_e.TYPED_ARRAY_SUPPORT=void 0===k.TYPED_ARRAY_SUPPORT||k.TYPED_ARRAY_SUPPORT,_e.poolSize=8192,_e._augment=function(e){return e.__proto__=_e.prototype,e},_e.from=function(e,t,n){return me(null,e,t,n)},_e.TYPED_ARRAY_SUPPORT&&(_e.prototype.__proto__=Uint8Array.prototype,_e.__proto__=Uint8Array),_e.alloc=function(e,t,n){return function(e,t,n,r){return ye(t),t<=0?ge(e,t):void 0!==n?"string"==typeof r?ge(e,t).fill(n,r):ge(e,t).fill(n):ge(e,t)}(null,e,t,n)},_e.allocUnsafe=function(e){return we(null,e)},_e.allocUnsafeSlow=function(e){return we(null,e)},_e.isBuffer=Xe,_e.compare=function(e,t){if(!ke(e)||!ke(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},_e.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}},_e.concat=function(e,t){if(!pe(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return _e.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=_e.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!ke(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},_e.byteLength=Ae,_e.prototype._isBuffer=!0,_e.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)Oe(this,t,t+1);return this},_e.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)Oe(this,t,t+3),Oe(this,t+1,t+2);return this},_e.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)Oe(this,t,t+7),Oe(this,t+1,t+6),Oe(this,t+2,t+5),Oe(this,t+3,t+4);return this},_e.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?je(this,0,e):Se.apply(this,arguments)},_e.prototype.equals=function(e){if(!ke(e))throw new TypeError("Argument must be a Buffer");return this===e||0===_e.compare(this,e)},_e.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+">"},_e.prototype.compare=function(e,t,n,r,i){if(!ke(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},_e.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},_e.prototype.indexOf=function(e,t,n){return Te(this,e,t,n,!0)},_e.prototype.lastIndexOf=function(e,t,n){return Te(this,e,t,n,!1)},_e.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 Re(this,e,t,n);case"utf8":case"utf-8":return xe(this,e,t,n);case"ascii":return Ie(this,e,t,n);case"latin1":case"binary":return Ne(this,e,t,n);case"base64":return Pe(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Le(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},_e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Me(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 De(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 Ue(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+=Ye(e[o]);return i}function ze(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 Fe(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 We(e,t,n,r,i,o){if(!ke(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 Ze(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 qe(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 He(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 Ge(e,t,n,r,i){return i||He(e,0,n,4),fe(e,t,n,r,23,4),n+4}function $e(e,t,n,r,i){return i||He(e,0,n,8),fe(e,t,n,r,52,8),n+8}_e.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),_e.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=_e.prototype;else{var i=t-e;n=new _e(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},_e.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Fe(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},_e.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Fe(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},_e.prototype.readUInt8=function(e,t){return t||Fe(e,1,this.length),this[e]},_e.prototype.readUInt16LE=function(e,t){return t||Fe(e,2,this.length),this[e]|this[e+1]<<8},_e.prototype.readUInt16BE=function(e,t){return t||Fe(e,2,this.length),this[e]<<8|this[e+1]},_e.prototype.readUInt32LE=function(e,t){return t||Fe(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},_e.prototype.readUInt32BE=function(e,t){return t||Fe(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},_e.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Fe(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},_e.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Fe(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},_e.prototype.readInt8=function(e,t){return t||Fe(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},_e.prototype.readInt16LE=function(e,t){t||Fe(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},_e.prototype.readInt16BE=function(e,t){t||Fe(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},_e.prototype.readInt32LE=function(e,t){return t||Fe(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},_e.prototype.readInt32BE=function(e,t){return t||Fe(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},_e.prototype.readFloatLE=function(e,t){return t||Fe(e,4,this.length),he(this,e,!0,23,4)},_e.prototype.readFloatBE=function(e,t){return t||Fe(e,4,this.length),he(this,e,!1,23,4)},_e.prototype.readDoubleLE=function(e,t){return t||Fe(e,8,this.length),he(this,e,!0,52,8)},_e.prototype.readDoubleBE=function(e,t){return t||Fe(e,8,this.length),he(this,e,!1,52,8)},_e.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||We(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},_e.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||We(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},_e.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,1,255,0),_e.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},_e.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,2,65535,0),_e.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ze(this,e,t,!0),t+2},_e.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,2,65535,0),_e.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ze(this,e,t,!1),t+2},_e.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,4,4294967295,0),_e.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):qe(this,e,t,!0),t+4},_e.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,4,4294967295,0),_e.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):qe(this,e,t,!1),t+4},_e.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);We(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},_e.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);We(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},_e.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,1,127,-128),_e.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},_e.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,2,32767,-32768),_e.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ze(this,e,t,!0),t+2},_e.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,2,32767,-32768),_e.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ze(this,e,t,!1),t+2},_e.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,4,2147483647,-2147483648),_e.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):qe(this,e,t,!0),t+4},_e.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||We(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),_e.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):qe(this,e,t,!1),t+4},_e.prototype.writeFloatLE=function(e,t,n){return Ge(this,e,t,!0,n)},_e.prototype.writeFloatBE=function(e,t,n){return Ge(this,e,t,!1,n)},_e.prototype.writeDoubleLE=function(e,t,n){return $e(this,e,t,!0,n)},_e.prototype.writeDoubleBE=function(e,t,n){return $e(this,e,t,!1,n)},_e.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||!_e.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},_e.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&&!_e.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=ke(e)?e:Ke(new _e(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var Ve=/[^+\/0-9A-Za-z-_]/g;function Ye(e){return e<16?"0"+e.toString(16):e.toString(16)}function Ke(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;se||ue();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 ae(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=oe[e.charCodeAt(t)]<<18|oe[e.charCodeAt(t+1)]<<12|oe[e.charCodeAt(t+2)]<<6|oe[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===o?(i=oe[e.charCodeAt(t)]<<2|oe[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===o&&(i=oe[e.charCodeAt(t)]<<10|oe[e.charCodeAt(t+1)]<<4|oe[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(Ve,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Qe(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 Xe(e){return null!=e&&(!!e._isBuffer||et(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&et(e.slice(0,0))}(e))}function et(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var tt,nt,rt=ft(k.fetch)&&ft(k.ReadableStream);function it(e){nt||(nt=new k.XMLHttpRequest).open("GET",k.location.host?"/":"https://example.com");try{return nt.responseType=e,nt.responseType===e}catch(e){return!1}}var ot=void 0!==k.ArrayBuffer,at=ot&&ft(k.ArrayBuffer.prototype.slice),st=ot&&it("arraybuffer"),ut=!rt&&at&&it("ms-stream"),ct=!rt&&ot&&it("moz-chunked-arraybuffer"),lt=ft(nt.overrideMimeType),ht=ft(k.VBArray);function ft(e){return"function"==typeof e}nt=null;var dt="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},pt=/%[sdj%]/g;function vt(e){if(!It(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(wt(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(pt,(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])Ct(a)||!Lt(a)?o+=" "+a:o+=" "+wt(a);return o}function gt(e,t){if(Nt(k.process))return function(){return gt(e,t).apply(this,arguments)};if(!0===V.noDeprecation)return e;var n=!1;return function(){if(!n){if(V.throwDeprecation)throw new Error(t);V.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var _t,mt={};function yt(e){if(Nt(_t)&&(_t=V.env.NODE_DEBUG||""),e=e.toUpperCase(),!mt[e])if(new RegExp("\\b"+e+"\\b","i").test(_t)){mt[e]=function(){var t=vt.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else mt[e]=function(){};return mt[e]}function wt(e,t){var n={seen:[],stylize:Et};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Tt(t)?n.showHidden=t:t&&Zt(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=bt),kt(n,e,n.depth)}function bt(e,t){var n=wt.styles[t];return n?"["+wt.colors[n][0]+"m"+e+"["+wt.colors[n][1]+"m":e}function Et(e,t){return e}function kt(e,t,n){if(e.customInspect&&t&&Mt(t.inspect)&&t.inspect!==wt&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return It(r)||(r=kt(e,r,n)),r}var i=function(e,t){if(Nt(t))return e.stylize("undefined","undefined");if(It(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(xt(t))return e.stylize(""+t,"number");if(Tt(t))return e.stylize(""+t,"boolean");if(Ct(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)),jt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return At(t);if(0===o.length){if(Mt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Pt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Bt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(jt(t))return At(t)}var u,c="",l=!1,h=["{","}"];(Ot(t)&&(l=!0,h=["[","]"]),Mt(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return Pt(t)&&(c=" "+RegExp.prototype.toString.call(t)),Bt(t)&&(c=" "+Date.prototype.toUTCString.call(t)),jt(t)&&(c=" "+At(t)),0!==o.length||l&&0!=t.length?n<0?Pt(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)qt(t,String(a))?o.push(St(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(St(e,t,n,r,i,!0))})),o}(e,t,n,a,o):o.map((function(r){return St(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,h)):h[0]+c+h[1]}function At(e){return"["+Error.prototype.toString.call(e)+"]"}function St(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")),qt(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=Ct(n)?kt(e,u.value,null):kt(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 Ot(e){return Array.isArray(e)}function Tt(e){return"boolean"==typeof e}function Ct(e){return null===e}function Rt(e){return null==e}function xt(e){return"number"==typeof e}function It(e){return"string"==typeof e}function Nt(e){return void 0===e}function Pt(e){return Lt(e)&&"[object RegExp]"===Ut(e)}function Lt(e){return"object"==typeof e&&null!==e}function Bt(e){return Lt(e)&&"[object Date]"===Ut(e)}function jt(e){return Lt(e)&&("[object Error]"===Ut(e)||e instanceof Error)}function Mt(e){return"function"==typeof e}function Dt(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Ut(e){return Object.prototype.toString.call(e)}function zt(e){return e<10?"0"+e.toString(10):e.toString(10)}wt.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]},wt.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 Wt(){var e=new Date,t=[zt(e.getHours()),zt(e.getMinutes()),zt(e.getSeconds())].join(":");return[e.getDate(),Ft[e.getMonth()],t].join(" ")}function Zt(e,t){if(!t||!Lt(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function qt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ht={inherits:dt,_extend:Zt,log:function(){console.log("%s - %s",Wt(),vt.apply(null,arguments))},isBuffer:function(e){return _e.isBuffer(e)},isPrimitive:Dt,isFunction:Mt,isError:jt,isDate:Bt,isObject:Lt,isRegExp:Pt,isUndefined:Nt,isSymbol:function(e){return"symbol"==typeof e},isString:It,isNumber:xt,isNullOrUndefined:Rt,isNull:Ct,isBoolean:Tt,isArray:Ot,inspect:wt,deprecate:gt,format:vt,debuglog:yt};function Gt(){}function $t(){$t.init.call(this)}function Vt(e){return void 0===e._maxListeners?$t.defaultMaxListeners:e._maxListeners}function Yt(e,t,n){if(t)e.call(n);else for(var r=e.length,i=rn(e,r),o=0;o<r;++o)i[o].call(n)}function Kt(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=rn(e,i),a=0;a<i;++a)o[a].call(n,r)}function Jt(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=rn(e,o),s=0;s<o;++s)a[s].call(n,r,i)}function Qt(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,s=rn(e,a),u=0;u<a;++u)s[u].call(n,r,i,o)}function Xt(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=rn(e,i),a=0;a<i;++a)o[a].apply(n,r)}function en(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 Gt,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=Vt(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 tn(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 nn(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 rn(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function on(){this.head=null,this.tail=null,this.length=0}Gt.prototype=Object.create(null),$t.EventEmitter=$t,$t.usingDomains=!1,$t.prototype.domain=void 0,$t.prototype._events=void 0,$t.prototype._maxListeners=void 0,$t.defaultMaxListeners=10,$t.init=function(){this.domain=null,$t.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Gt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},$t.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},$t.prototype.getMaxListeners=function(){return Vt(this)},$t.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:Yt(n,l,this);break;case 2:Kt(n,l,this,arguments[1]);break;case 3:Jt(n,l,this,arguments[1],arguments[2]);break;case 4:Qt(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];Xt(n,l,this,i)}return!0},$t.prototype.addListener=function(e,t){return en(this,e,t,!1)},$t.prototype.on=$t.prototype.addListener,$t.prototype.prependListener=function(e,t){return en(this,e,t,!0)},$t.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,tn(this,e,t)),this},$t.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,tn(this,e,t)),this},$t.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 Gt:(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 Gt,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},$t.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Gt,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new Gt: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 Gt,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},$t.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):[]},$t.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):nn.call(e,t)},$t.prototype.listenerCount=nn,$t.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},on.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},on.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},on.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}},on.prototype.clear=function(){this.head=this.tail=null,this.length=0},on.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},on.prototype.concat=function(e){if(0===this.length)return _e.alloc(0);if(1===this.length)return this.head.data;for(var t=_e.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var an=_e.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 sn(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!an(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=cn;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ln;break;default:return void(this.write=un)}this.charBuffer=new _e(6),this.charReceived=0,this.charLength=0}function un(e){return e.toString(this.encoding)}function cn(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function ln(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}sn.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},sn.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},sn.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},dn.ReadableState=fn;var hn=yt("stream");function fn(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof zn&&(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 on,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 sn(e.encoding),this.encoding=e.encoding)}function dn(e){if(!(this instanceof dn))return new dn(e);this._readableState=new fn(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),$t.call(this)}function pn(e,t,n,r,i){var o=function(e,t){var n=null;_e.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,gn(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&&gn(e))),function(e,t){t.readingMore||(t.readingMore=!0,B(mn,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)}dt(dn,$t),dn.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=_e.from(e,t),t=""),pn(this,n,e,t,!1)},dn.prototype.unshift=function(e){return pn(this,this._readableState,e,"",!0)},dn.prototype.isPaused=function(){return!1===this._readableState.flowing},dn.prototype.setEncoding=function(e){return this._readableState.decoder=new sn(e),this._readableState.encoding=e,this};function vn(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 gn(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(hn("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?B(_n,e):_n(e))}function _n(e){hn("emit readable"),e.emit("readable"),bn(e)}function mn(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(hn("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function yn(e){hn("readable nexttick read 0"),e.read(0)}function wn(e,t){t.reading||(hn("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),bn(e),t.flowing&&!t.reading&&e.read(0)}function bn(e){var t=e._readableState;for(hn("flow",t.flowing);t.flowing&&null!==e.read(););}function En(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=_e.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 kn(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,B(An,t,e))}function An(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Sn(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function On(){}function Tn(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function Cn(e,t){Object.defineProperty(this,"buffer",{get:gt((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof zn&&(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?B(i,r):i(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=Pn(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Nn(e,n),r?B(In,e,n,o,i):In(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 jn(this)}function Rn(e){if(!(this instanceof Rn||this instanceof zn))return new Rn(e);this._writableState=new Cn(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),$t.call(this)}function xn(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 In(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Bn(e,t)}function Nn(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;xn(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 jn(t)}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback;if(xn(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 Pn(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Ln(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Bn(e,t){var n=Pn(t);return n&&(0===t.pendingcb?(Ln(e,t),t.finished=!0,e.emit("finish")):Ln(e,t)),n}function jn(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}}dn.prototype.read=function(e){hn("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 hn("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?kn(this):gn(this),null;if(0===(e=vn(e,t))&&t.ended)return 0===t.length&&kn(this),null;var r,i=t.needReadable;return hn("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&hn("length less than watermark",i=!0),t.ended||t.reading?hn("reading or ended",i=!1):i&&(hn("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=vn(n,t))),null===(r=e>0?En(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&kn(this)),null!==r&&this.emit("data",r),r},dn.prototype._read=function(e){this.emit("error",new Error("not implemented"))},dn.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,hn("pipe count=%d opts=%j",r.pipesCount,t);var i=!t||!1!==t.end?a:c;function o(e){hn("onunpipe"),e===n&&c()}function a(){hn("onend"),e.end()}r.endEmitted?B(i):n.once("end",i),e.on("unpipe",o);var s=function(e){return function(){var t=e._readableState;hn("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,bn(e))}}(n);e.on("drain",s);var u=!1;function c(){hn("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",f),e.removeListener("unpipe",o),n.removeListener("end",a),n.removeListener("end",c),n.removeListener("data",h),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var l=!1;function h(t){hn("ondata"),l=!1,!1!==e.write(t)||l||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==Sn(r.pipes,e))&&!u&&(hn("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function f(t){hn("onerror",t),v(),e.removeListener("error",f),0===function(e,t){return e.listeners(t).length}(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),v()}function p(){hn("onfinish"),e.removeListener("close",d),v()}function v(){hn("unpipe"),n.unpipe(e)}return n.on("data",h),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",f),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(hn("pipe resume"),n.resume()),e},dn.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=Sn(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},dn.prototype.on=function(e,t){var n=$t.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&&gn(this):B(yn,this))}return n},dn.prototype.addListener=dn.prototype.on,dn.prototype.resume=function(){var e=this._readableState;return e.flowing||(hn("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,B(wn,e,t))}(this,e)),this},dn.prototype.pause=function(){return hn("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(hn("pause"),this._readableState.flowing=!1,this.emit("pause")),this},dn.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(hn("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){(hn("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){hn("wrapped _read",t),n&&(n=!1,e.resume())},r},dn._fromList=En,Rn.WritableState=Cn,dt(Rn,$t),Cn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Rn.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Rn.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),_e.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=On),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),B(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"):_e.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),B(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=_e.from(t,n));return t}(t,n,r),_e.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 Tn(n,r,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else xn(e,t,!1,o,n,r,i);return a}(this,r,e,t,n)),i},Rn.prototype.cork=function(){this._writableState.corked++},Rn.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Nn(this,e))},Rn.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},Rn.prototype._write=function(e,t,n){n(new Error("not implemented"))},Rn.prototype._writev=null,Rn.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,Bn(e,t),n&&(t.finished?B(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},dt(zn,dn);for(var Mn=Object.keys(Rn.prototype),Dn=0;Dn<Mn.length;Dn++){var Un=Mn[Dn];zn.prototype[Un]||(zn.prototype[Un]=Rn.prototype[Un])}function zn(e){if(!(this instanceof zn))return new zn(e);dn.call(this,e),Rn.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",Fn)}function Fn(){this.allowHalfOpen||this._writableState.ended||B(Wn,this)}function Wn(e){e.end()}function Zn(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 qn(e){if(!(this instanceof qn))return new qn(e);zn.call(this,e),this._transformState=new Zn(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){Hn(t,e)})):Hn(t)}))}function Hn(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 Gn(e){if(!(this instanceof Gn))return new Gn(e);qn.call(this,e)}function $n(){$t.call(this)}dt(qn,zn),qn.prototype.push=function(e,t){return this._transformState.needTransform=!1,zn.prototype.push.call(this,e,t)},qn.prototype._transform=function(e,t,n){throw new Error("Not implemented")},qn.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)}},qn.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},dt(Gn,qn),Gn.prototype._transform=function(e,t,n){n(null,e)},dt($n,$t),$n.Readable=dn,$n.Writable=Rn,$n.Duplex=zn,$n.Transform=qn,$n.PassThrough=Gn,$n.Stream=$n,$n.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===$t.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 Vn=3,Yn=4;function Kn(e,t,n){var r,i=this;if(dn.call(i),i._mode=n,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",(function(){V.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 _e(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",!lt){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 Jn(e){var t,n=this;Rn.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new _e(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=!lt;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 rt&&t?"fetch":ct?"moz-chunked-arraybuffer":ut?"ms-stream":st&&e?"arraybuffer":ht&&e?"text:vbarray":"text"}(t,r),n.on("finish",(function(){n._onFinish()}))}dt(Kn,dn),Kn.prototype._read=function(){},Kn.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==Yn)break;try{n=new k.VBArray(t.responseBody).toArray()}catch(e){}if(null!==n){e.push(new _e(n));break}case"text":try{n=t.responseText}catch(t){e._mode="text:vbarray";break}if(n.length>e._pos){var r=n.substr(e._pos);if("x-user-defined"===e._charset){for(var i=new _e(r.length),o=0;o<r.length;o++)i[o]=255&r.charCodeAt(o);e.push(i)}else e.push(r,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==Yn||!t.response)break;n=t.response,e.push(new _e(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==Vn||!n)break;e.push(new _e(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==Vn)break;var a=new k.MSStreamReader;a.onprogress=function(){a.result.byteLength>e._pos&&(e.push(new _e(new Uint8Array(a.result.slice(e._pos)))),e._pos=a.result.byteLength)},a.onload=function(){e.push(null)},a.readAsArrayBuffer(n)}e._xhr.readyState===Yn&&"ms-stream"!==e._mode&&e.push(null)},dt(Jn,Rn);var Qn=["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"];Jn.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===Qn.indexOf(n)&&(this._headers[n]={name:e,value:t})},Jn.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},Jn.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},Jn.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,n=e._opts,r=e._headers;if("POST"!==n.method&&"PUT"!==n.method&&"PATCH"!==n.method||(t=function(){if(void 0!==tt)return tt;try{new k.Blob([new ArrayBuffer(1)]),tt=!0}catch(e){tt=!1}return tt}()?new k.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(Xe(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:(r["content-type"]||{}).value||""}):_e.concat(e._body).toString()),"fetch"===e._mode){var i=Object.keys(r).map((function(e){return[r[e].name,r[e].value]}));k.fetch(e._opts.url,{method:e._opts.method,headers:i,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 o=e._xhr=new k.XMLHttpRequest;try{o.open(e._opts.method,e._opts.url,!0)}catch(t){return void V.nextTick((function(){e.emit("error",t)}))}"responseType"in o&&(o.responseType=e._mode.split(":")[0]),"withCredentials"in o&&(o.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(r).forEach((function(e){o.setRequestHeader(r[e].name,r[e].value)})),e._response=null,o.onreadystatechange=function(){switch(o.readyState){case Vn:case Yn:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(o.onprogress=function(){e._onXHRProgress()}),o.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{o.send(t)}catch(t){return void V.nextTick((function(){e.emit("error",t)}))}}}},Jn.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())},Jn.prototype._connect=function(){var e=this;e._destroyed||(e._response=new Kn(e._xhr,e._fetchResponse,e._mode),e.emit("response",e._response))},Jn.prototype._write=function(e,t,n){this._body.push(e),n()},Jn.prototype.abort=Jn.prototype.destroy=function(){var e=this;e._destroyed=!0,e._response&&(e._response._destroyed=!0),e._xhr&&e._xhr.abort()},Jn.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),Rn.prototype.end.call(this,e,t,n)},Jn.prototype.flushHeaders=function(){},Jn.prototype.setTimeout=function(){},Jn.prototype.setNoDelay=function(){},Jn.prototype.setSocketKeepAlive=function(){};
|
|
17
|
-
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
18
|
-
var Xn=/[^\x20-\x7E]/,er=/[\x2E\u3002\uFF0E\uFF61]/g,tr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},nr=Math.floor,rr=String.fromCharCode;function ir(e){throw new RangeError(tr[e])}function or(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function ar(e,t,n){var r=0;for(e=n?nr(e/700):e>>1,e+=nr(e/t);e>455;r+=36)e=nr(e/35);return nr(r+36*e/(e+38))}function sr(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(er,".")).split("."),t).join(".");return r+i}(e,(function(e){return Xn.test(e)?"xn--"+function(e){var t,n,r,i,o,a,s,u,c,l,h,f,d,p,v,g=[];for(f=(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<f;++a)(h=e[a])<128&&g.push(rr(h));for(r=i=g.length,i&&g.push("-");r<f;){for(s=2147483647,a=0;a<f;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>nr((2147483647-n)/(d=r+1))&&ir("overflow"),n+=(s-t)*d,t=s,a=0;a<f;++a)if((h=e[a])<t&&++n>2147483647&&ir("overflow"),h==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(rr(or(l+v%p,0))),u=nr(v/p);g.push(rr(or(u,0))),o=ar(n,d,r==i),n=0,++r}++n,++t}return g.join("")}(e):e}))}function ur(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var cr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function lr(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function hr(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 fr=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t};function dr(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,h,f,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=""),h=decodeURIComponent(c),f=decodeURIComponent(l),ur(i,h)?cr(i[h])?i[h].push(f):i[h]=[i[h],f]:i[h]=f}return i}var pr={parse:Cr,resolve:function(e,t){return Cr(e,!1,!0).resolve(t)},resolveObject:function(e,t){return e?Cr(e,!1,!0).resolveObject(t):t},format:function(e){It(e)&&(e=Rr({},e));return xr(e)},Url:vr};function vr(){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 gr=/^([a-z0-9.+-]+:)/i,_r=/:[0-9]*$/,mr=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,yr=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),wr=["'"].concat(yr),br=["%","/","?",";","#"].concat(wr),Er=["/","?","#"],kr=/^[+a-z0-9A-Z_-]{0,63}$/,Ar=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Sr={javascript:!0,"javascript:":!0},Or={javascript:!0,"javascript:":!0},Tr={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Cr(e,t,n){if(e&&Lt(e)&&e instanceof vr)return e;var r=new vr;return r.parse(e,t,n),r}function Rr(e,t,n,r){if(!It(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=mr.exec(s);if(u)return e.path=s,e.href=s,e.pathname=u[1],u[2]?(e.search=u[2],e.query=n?dr(e.search.substr(1)):e.search.substr(1)):n&&(e.search="",e.query={}),e}var c,l,h,f,d=gr.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&&Or[d]||(s=s.substr(2),e.slashes=!0)}if(!Or[d]&&(v||d&&!Tr[d])){var g,_,m=-1;for(c=0;c<Er.length;c++)-1!==(l=s.indexOf(Er[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<br.length;c++)-1!==(l=s.indexOf(br[c]))&&(-1===m||l<m)&&(m=l);-1===m&&(m=s.length),e.host=s.slice(0,m),s=s.slice(m),Ir(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,h=w.length;c<h;c++){var b=w[c];if(b&&!b.match(kr)){for(var E="",k=0,A=b.length;k<A;k++)b.charCodeAt(k)>127?E+="x":E+=b[k];if(!E.match(kr)){var S=w.slice(0,c),O=w.slice(c+1),T=b.match(Ar);T&&(S.push(T[1]),O.unshift(T[2])),O.length&&(s="/"+O.join(".")+s),e.hostname=S.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=sr(e.hostname)),f=e.port?":"+e.port:"";var C=e.hostname||"";e.host=C+f,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Sr[p])for(c=0,h=wr.length;c<h;c++){var R=wr[c];if(-1!==s.indexOf(R)){var x=encodeURIComponent(R);x===R&&(x=escape(R)),s=s.split(R).join(x)}}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=dr(e.query)),s=s.slice(0,N)):n&&(e.search="",e.query={}),s&&(e.pathname=s),Tr[p]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){f=e.pathname||"";var P=e.search||"";e.path=f+P}return e.href=xr(e),e}function xr(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&&Lt(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?hr(fr(e),(function(r){var i=encodeURIComponent(lr(r))+n;return cr(e[r])?hr(e[r],(function(e){return i+encodeURIComponent(lr(e))})).join(t):i+encodeURIComponent(lr(e[r]))})).join(t):r?encodeURIComponent(lr(r))+n+encodeURIComponent(lr(e)):""}(e.query));var s=e.search||a&&"?"+a||"";return n&&":"!==n.substr(-1)&&(n+=":"),e.slashes||(!n||Tr[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 Ir(e){var t=e.host,n=_r.exec(t);n&&(":"!==(n=n[0])&&(e.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(e.hostname=t)}function Nr(e,t){"string"==typeof e&&(e=Cr(e));var n=-1===k.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||n,i=e.hostname||e.host,o=e.port,a=e.path||"/";i&&-1!==i.indexOf(":")&&(i="["+i+"]"),e.url=(i?r+"//"+i:"")+(o?":"+o:"")+a,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var s=new Jn(e);return t&&s.on("response",t),s}function Pr(){}vr.prototype.parse=function(e,t,n){return Rr(this,e,t,n)},vr.prototype.format=function(){return xr(this)},vr.prototype.resolve=function(e){return this.resolveObject(Cr(e,!1,!0)).format()},vr.prototype.resolveObject=function(e){if(It(e)){var t=new vr;t.parse(e,!1,!0),e=t}for(var n,r=new vr,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 Tr[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!Tr[e.protocol]){for(var l=Object.keys(e),h=0;h<l.length;h++){var f=l[h];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||Or[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&&!Tr[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(!Rt(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,Ct(r.pathname)&&Ct(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 E=w.slice(-1)[0],k=(r.host||e.host||w.length>1)&&("."===E||".."===E)||""===E,A=0,S=w.length;S>=0;S--)"."===(E=w[S])?w.splice(S,1):".."===E?(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(""),k&&"/"!==w.join("/").substr(-1)&&w.push("");var O=""===w[0]||w[0]&&"/"===w[0].charAt(0);return b&&(r.hostname=r.host=O?"":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)&&!O&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),Ct(r.pathname)&&Ct(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},vr.prototype.parseHost=function(){return Ir(this)},Pr.defaultMaxSockets=4;var Lr={request:Nr,get:function(e,t){var n=Nr(e,t);return n.end(),n},Agent:Pr,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 Br(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 jr,Mr=Object.prototype.hasOwnProperty,Dr=Object.keys||function(e){var t=[];for(var n in e)Mr.call(e,n)&&t.push(n);return t},Ur=Array.prototype.slice;function zr(){return void 0!==jr?jr:jr="foo"===function(){}.name}function Fr(e){return Object.prototype.toString.call(e)}function Wr(e){return!Xe(e)&&("function"==typeof k.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function Zr(e,t){e||Yr(e,!0,t,"==",Kr)}var qr=/\s*function\s+([^\(\s]*)\s*/;function Hr(e){if(Mt(e)){if(zr())return e.name;var t=e.toString().match(qr);return t&&t[1]}}function Gr(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 $r(Vr(e.actual),128)+" "+e.operator+" "+$r(Vr(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||Yr;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=Hr(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 $r(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function Vr(e){if(zr()||!Mt(e))return wt(e);var t=Hr(e);return"[Function"+(t?": "+t:"")+"]"}function Yr(e,t,n,r,i){throw new Gr({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function Kr(e,t){e||Yr(e,!0,t,"==",Kr)}function Jr(e,t,n,r){if(e===t)return!0;if(Xe(e)&&Xe(t))return 0===Br(e,t);if(Bt(e)&&Bt(t))return e.getTime()===t.getTime();if(Pt(e)&&Pt(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(Wr(e)&&Wr(t)&&Fr(e)===Fr(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===Br(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(Xe(e)!==Xe(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(Dt(e)||Dt(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=Qr(e),o=Qr(t);if(i&&!o||!i&&o)return!1;if(i)return Jr(e=Ur.call(e),t=Ur.call(t),n);var a,s,u=Dr(e),c=Dr(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(!Jr(e[a=u[s]],t[a],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function Qr(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function Xr(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 ei(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&&Yr(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&i&&!n;if((!e&&jt(i)&&o&&Xr(i,n)||a)&&Yr(i,n,"Got unwanted exception"+r),e&&i&&n&&!Xr(i,n)||!e&&i)throw i}Zr.AssertionError=Gr,dt(Gr,Error),Zr.fail=Yr,Zr.ok=Kr,Zr.equal=function e(t,n,r){t!=n&&Yr(t,n,r,"==",e)},Zr.notEqual=function e(t,n,r){t==n&&Yr(t,n,r,"!=",e)},Zr.deepEqual=function e(t,n,r){Jr(t,n,!1)||Yr(t,n,r,"deepEqual",e)},Zr.deepStrictEqual=function e(t,n,r){Jr(t,n,!0)||Yr(t,n,r,"deepStrictEqual",e)},Zr.notDeepEqual=function e(t,n,r){Jr(t,n,!1)&&Yr(t,n,r,"notDeepEqual",e)},Zr.notDeepStrictEqual=function e(t,n,r){Jr(t,n,!0)&&Yr(t,n,r,"notDeepStrictEqual",e)},Zr.strictEqual=function e(t,n,r){t!==n&&Yr(t,n,r,"===",e)},Zr.notStrictEqual=function e(t,n,r){t===n&&Yr(t,n,r,"!==",e)},Zr.throws=function(e,t,n){ei(!0,e,t,n)},Zr.doesNotThrow=function(e,t,n){ei(!1,e,t,n)},Zr.ifError=function(e){if(e)throw e};var ti=1e3,ni=60*ti,ri=60*ni,ii=24*ri,oi=7*ii,ai=365.25*ii,si=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*ai;case"weeks":case"week":case"w":return n*oi;case"days":case"day":case"d":return n*ii;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ri;case"minutes":case"minute":case"mins":case"min":case"m":return n*ni;case"seconds":case"second":case"secs":case"sec":case"s":return n*ti;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>=ii)return ui(e,t,ii,"day");if(t>=ri)return ui(e,t,ri,"hour");if(t>=ni)return ui(e,t,ni,"minute");if(t>=ti)return ui(e,t,ti,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=ii)return Math.round(e/ii)+"d";if(t>=ri)return Math.round(e/ri)+"h";if(t>=ni)return Math.round(e/ni)+"m";if(t>=ti)return Math.round(e/ti)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ui(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var ci=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=si,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},li=a((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!==V&&"env"in V&&(e=V.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=ci(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}));li.formatArgs,li.save,li.load,li.useColors,li.storage,li.destroy,li.colors,li.log;var hi,fi={isatty:function(){return!1},ReadStream:function(){throw new Error("tty.ReadStream is not implemented")},WriteStream:function(){throw new Error("tty.ReadStream is not implemented")}};function di(){return"/tmp"}var pi={EOL:"\n",tmpdir:di,tmpDir:di,networkInterfaces:function(){},getNetworkInterfaces:function(){},release:function(){return void 0!==k.navigator?k.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!==k.location?k.location.hostname:""},endianness:function(){if(void 0===hi){var e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=1,t[1]=2,258===n[0])hi="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");hi="LE"}}return hi}},vi=(e,t=V.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:gi}=V;let _i;function mi(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function yi(e,t){if(0===_i)return 0;if(vi("color=16m")||vi("color=full")||vi("color=truecolor"))return 3;if(vi("color=256"))return 2;if(e&&!t&&void 0===_i)return 0;const n=_i||0;if("dumb"===gi.TERM)return n;if("win32"===V.platform){const e=pi.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in gi)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in gi))||"codeship"===gi.CI_NAME?1:n;if("TEAMCITY_VERSION"in gi)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(gi.TEAMCITY_VERSION)?1:0;if("truecolor"===gi.COLORTERM)return 3;if("TERM_PROGRAM"in gi){const e=parseInt((gi.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(gi.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(gi.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(gi.TERM)||"COLORTERM"in gi?1:n}vi("no-color")||vi("no-colors")||vi("color=false")||vi("color=never")?_i=0:(vi("color")||vi("colors")||vi("color=true")||vi("color=always"))&&(_i=1),"FORCE_COLOR"in gi&&(_i="true"===gi.FORCE_COLOR?1:"false"===gi.FORCE_COLOR?0:0===gi.FORCE_COLOR.length?1:Math.min(parseInt(gi.FORCE_COLOR,10),3));var wi={supportsColor:function(e){return mi(yi(e,e&&e.isTTY))},stdout:mi(yi(!0,fi.isatty(1))),stderr:mi(yi(!0,fi.isatty(2)))},bi=a((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 V.stderr.write(Ht.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?V.env.DEBUG=e:delete V.env.DEBUG},t.load=function(){return V.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):fi.isatty(V.stderr.fd)},t.destroy=Ht.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=wi;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(V.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=V.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=ci(t);const{formatters:n}=e.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,Ht.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,Ht.inspect(e,this.inspectOpts)}}));bi.init,bi.log,bi.formatArgs,bi.save,bi.load,bi.useColors,bi.destroy,bi.colors,bi.inspectOpts;var Ei,ki=a((function(e){void 0===V||"renderer"===V.type||!0===V.browser||V.__nwjs?e.exports=li:e.exports=bi})),Ai=function(){if(!Ei)try{Ei=ki("follow-redirects")}catch(e){Ei=function(){}}Ei.apply(null,arguments)},Si=pr.URL,Oi=$n.Writable,Ti=["abort","aborted","connect","error","socket","timeout"],Ci=Object.create(null);Ti.forEach((function(e){Ci[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var Ri=Mi("ERR_FR_REDIRECTION_FAILURE",""),xi=Mi("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Ii=Mi("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Ni=Mi("ERR_STREAM_WRITE_AFTER_END","write after end");function Pi(e,t){Oi.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 Li(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 Si(a))}catch(t){e=pr.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,Zr.equal(r.protocol,i,"protocol mismatch"),Ai("options",r),new Pi(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 Bi(){}function ji(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return n}function Mi(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 Di(e){for(var t=0;t<Ti.length;t++)e.removeListener(Ti[t],Ci[Ti[t]]);e.on("error",Bi),e.abort()}Pi.prototype=Object.create(Oi.prototype),Pi.prototype.abort=function(){Di(this._currentRequest),this.emit("abort")},Pi.prototype.write=function(e,t,n){if(this._ending)throw new Ni;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 Ii),this.abort()):n&&n()},Pi.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)},Pi.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Pi.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Pi.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){Pi.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Pi.prototype,e,{get:function(){return this._currentRequest[e]}})})),Pi.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))}},Pi.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=pr.format(this._options),r._redirectable=this;for(var i=0;i<Ti.length;i++)r.on(Ti[i],Ci[Ti[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))},Pi.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(Di(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new xi);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ji(/^content-/i,this._options.headers));var r=ji(/^host$/i,this._options.headers)||pr.parse(this._currentUrl).hostname,i=pr.resolve(this._currentUrl,n);Ai("redirecting to",i),this._isRedirect=!0;var o=pr.parse(i);if(Object.assign(this._options,o),o.hostname!==r&&ji(/^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 Ri("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 Ui=Li({http:Lr,https:Lr}),zi=Li;Ui.wrap=zi;var Fi={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 Wi(){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 Zi(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 qi=Uint8Array,Hi=Uint16Array,Gi=Int32Array;function $i(e){for(var t=e.length;--t>=0;)e[t]=0}var Vi=[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],Yi=[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],Ki=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ji=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Qi=new Array(576);$i(Qi);var Xi=new Array(60);$i(Xi);var eo=new Array(512);$i(eo);var to=new Array(256);$i(to);var no=new Array(29);$i(no);var ro,io,oo,ao=new Array(30);function so(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 uo(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function co(e){return e<256?eo[e]:eo[256+(e>>>7)]}function lo(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ho(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,lo(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 fo(e,t,n){ho(e,n[2*t],n[2*t+1])}function po(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function vo(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]=po(o[s]++,s))}}function go(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 _o(e){e.bi_valid>8?lo(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 mo(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 yo(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&mo(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!mo(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function wo(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?fo(e,i,t):(fo(e,(o=to[i])+256+1,t),0!==(a=Vi[o])&&ho(e,i-=no[o],a),fo(e,o=co(--r),n),0!==(a=Yi[o])&&ho(e,r-=ao[o],a))}while(s<e.last_lit);fo(e,256,t)}function bo(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--)yo(e,o,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],yo(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++,yo(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,h=t.stat_desc.has_stree,f=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=f[r-d]),s=u[2*r],e.opt_len+=s*(o+a),h&&(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),vo(o,c,e.bl_count)}function Eo(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 ko(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{fo(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(fo(e,i,e.bl_tree),s--),fo(e,16,e.bl_tree),ho(e,s-3,2)):s<=10?(fo(e,17,e.bl_tree),ho(e,s-3,3)):(fo(e,18,e.bl_tree),ho(e,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}}$i(ao);var Ao=!1;function So(e){Ao||(!function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(no[r]=n,e=0;e<1<<Vi[r];e++)to[n++]=r;for(to[n-1]=r,i=0,r=0;r<16;r++)for(ao[r]=i,e=0;e<1<<Yi[r];e++)eo[i++]=r;for(i>>=7;r<30;r++)for(ao[r]=i<<7,e=0;e<1<<Yi[r]-7;e++)eo[256+i++]=r;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)Qi[2*e+1]=8,e++,o[8]++;for(;e<=255;)Qi[2*e+1]=9,e++,o[9]++;for(;e<=279;)Qi[2*e+1]=7,e++,o[7]++;for(;e<=287;)Qi[2*e+1]=8,e++,o[8]++;for(vo(Qi,287,o),e=0;e<30;e++)Xi[2*e+1]=5,Xi[2*e]=po(e,5);ro=new so(Qi,Vi,257,286,15),io=new so(Xi,Yi,0,30,15),oo=new so(new Array(0),Ki,0,19,7)}(),Ao=!0),e.l_desc=new uo(e.dyn_ltree,ro),e.d_desc=new uo(e.dyn_dtree,io),e.bl_desc=new uo(e.bl_tree,oo),e.bi_buf=0,e.bi_valid=0,go(e)}function Oo(e,t,n,r){ho(e,0+(r?1:0),3),function(e,t,n,r){_o(e),r&&(lo(e,n),lo(e,~n)),Zi(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}function To(e){ho(e,2,3),fo(e,256,Qi),function(e){16===e.bi_valid?(lo(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 Co(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)),bo(e,e.l_desc),bo(e,e.d_desc),a=function(e){var t;for(Eo(e,e.dyn_ltree,e.l_desc.max_code),Eo(e,e.dyn_dtree,e.d_desc.max_code),bo(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Ji[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?Oo(e,t,n,r):4===e.strategy||o===i?(ho(e,2+(r?1:0),3),wo(e,Qi,Xi)):(ho(e,4+(r?1:0),3),function(e,t,n,r){var i;for(ho(e,t-257,5),ho(e,n-1,5),ho(e,r-4,4),i=0;i<r;i++)ho(e,e.bl_tree[2*Ji[i]+1],3);ko(e,e.dyn_ltree,t-1),ko(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),wo(e,e.dyn_ltree,e.dyn_dtree)),go(e),r&&_o(e)}function Ro(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*(to[n]+256+1)]++,e.dyn_dtree[2*co(t)]++),e.last_lit===e.lit_bufsize-1}function xo(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 Io=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 No(e,t,n,r){var i=Io,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}var Po;function Lo(e,t){return e.msg=Fi[t],t}function Bo(e){return(e<<1)-(e>4?9:0)}function jo(e){for(var t=e.length;--t>=0;)e[t]=0}function Mo(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Zi(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 Do(e,t){Co(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Mo(e.strm)}function Uo(e,t){e.pending_buf[e.pending++]=t}function zo(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Fo(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,h=e.prev,f=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<f);if(r=258-(f-o),o=f-258,r>a){if(e.match_start=t,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}}while((t=h[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function Wo(e){var t,n,r,i,o,a,s,u,c,l,h=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-262)){Zi(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=h?r-h:0}while(--n);t=n=h;do{r=e.prev[--t],e.prev[t]=r>=h?r-h:0}while(--n);i+=h}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,Zi(s,a.input,a.next_in,l,u),1===a.state.wrap?a.adler=xo(a.adler,s,l,u):2===a.state.wrap&&(a.adler=No(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 Zo(e,t){for(var n,r;;){if(e.lookahead<262){if(Wo(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=Fo(e,n)),e.match_length>=3)if(r=Ro(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=Ro(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Do(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(Do(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Do(e,!1),0===e.strm.avail_out)?1:2}function qo(e,t){for(var n,r,i;;){if(e.lookahead<262){if(Wo(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=Fo(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=Ro(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&&(Do(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Ro(e,0,e.window[e.strstart-1]))&&Do(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=Ro(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(Do(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Do(e,!1),0===e.strm.avail_out)?1:2}function Ho(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 Go(){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 Hi(1146),this.dyn_dtree=new Hi(122),this.bl_tree=new Hi(78),jo(this.dyn_ltree),jo(this.dyn_dtree),jo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Hi(16),this.heap=new Hi(573),jo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Hi(573),jo(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 $o(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,So(t),0):Lo(e,-2)}(e);return 0===t&&function(e){e.window_size=2*e.w_size,jo(e.head),e.max_lazy_match=Po[e.level].max_lazy,e.good_match=Po[e.level].good_length,e.nice_match=Po[e.level].nice_length,e.max_chain_length=Po[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 Vo(e,t){var n,r,i,o;if(!e||!e.state||t>5||t<0)return e?Lo(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Lo(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,Uo(r,31),Uo(r,139),Uo(r,8),r.gzhead?(Uo(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)),Uo(r,255&r.gzhead.time),Uo(r,r.gzhead.time>>8&255),Uo(r,r.gzhead.time>>16&255),Uo(r,r.gzhead.time>>24&255),Uo(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Uo(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Uo(r,255&r.gzhead.extra.length),Uo(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=No(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Uo(r,0),Uo(r,0),Uo(r,0),Uo(r,0),Uo(r,0),Uo(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Uo(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,zo(r,a),0!==r.strstart&&(zo(r,e.adler>>>16),zo(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=No(e.adler,r.pending_buf,r.pending-i,i)),Mo(e),i=r.pending,r.pending!==r.pending_buf_size));)Uo(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=No(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=No(e.adler,r.pending_buf,r.pending-i,i)),Mo(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,Uo(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=No(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=No(e.adler,r.pending_buf,r.pending-i,i)),Mo(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,Uo(r,o)}while(0!==o);r.gzhead.hcrc&&r.pending>i&&(e.adler=No(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&&Mo(e),r.pending+2<=r.pending_buf_size&&(Uo(r,255&e.adler),Uo(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Mo(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Bo(t)<=Bo(n)&&4!==t)return Lo(e,-5);if(666===r.status&&0!==e.avail_in)return Lo(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&&(Wo(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=Ro(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Do(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(Do(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Do(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(Wo(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=Ro(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Ro(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Do(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(Do(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Do(e,!1),0===e.strm.avail_out)?1:2}(r,t):Po[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?To(r):5!==t&&(Oo(r,0,0,!1),3===t&&(jo(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Mo(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(Uo(r,255&e.adler),Uo(r,e.adler>>8&255),Uo(r,e.adler>>16&255),Uo(r,e.adler>>24&255),Uo(r,255&e.total_in),Uo(r,e.total_in>>8&255),Uo(r,e.total_in>>16&255),Uo(r,e.total_in>>24&255)):(zo(r,e.adler>>>16),zo(r,65535&e.adler)),Mo(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)}Po=[new Ho(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(Wo(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,Do(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Do(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(Do(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Do(e,!1),e.strm.avail_out),1)})),new Ho(4,4,8,4,Zo),new Ho(4,5,16,8,Zo),new Ho(4,6,32,32,Zo),new Ho(4,4,16,16,qo),new Ho(8,16,32,32,qo),new Ho(8,16,128,128,qo),new Ho(8,32,128,256,qo),new Ho(32,128,258,1024,qo),new Ho(32,258,258,4096,qo)];function Yo(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,g,_,m,y,w,b,E,k,A,S,O;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,O=e.output,a=o-(t-e.avail_out),s=o+(e.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,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))O[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(E=65535&y,p<(w&=15)&&(d+=S[r++]<<p,(p+=8)<w&&(d+=S[r++]<<p,p+=8)),(E+=d&(1<<w)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=w,p-=w,E>(w=o-a)){if((w=E-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,A=f,0===h){if(k+=c-w,w<b){b-=w;do{O[o++]=f[k++]}while(--w);k=o-E,A=O}}else if(h<w){if(k+=c+h-w,(w-=h)<b){b-=w;do{O[o++]=f[k++]}while(--w);if(k=0,h<b){b-=w=h;do{O[o++]=f[k++]}while(--w);k=o-E,A=O}}}else if(k+=h-w,w<b){b-=w;do{O[o++]=f[k++]}while(--w);k=o-E,A=O}for(;b>2;)O[o++]=A[k++],O[o++]=A[k++],O[o++]=A[k++],b-=3;b&&(O[o++]=A[k++],b>1&&(O[o++]=A[k++]))}else{k=o-E;do{O[o++]=O[k++],O[o++]=O[k++],O[o++]=O[k++],b-=3}while(b>2);b&&(O[o++]=O[k++],b>1&&(O[o++]=O[k++]))}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 Ko=[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],Jo=[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],Qo=[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],Xo=[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 ea(e,t,n,r,i,o,a,s){var u,c,l,h,f,d,p,v,g,_=s.bits,m=0,y=0,w=0,b=0,E=0,k=0,A=0,S=0,O=0,T=0,C=null,R=0,x=new Hi(16),I=new Hi(16),N=null,P=0;for(m=0;m<=15;m++)x[m]=0;for(y=0;y<r;y++)x[t[n+y]]++;for(E=_,b=15;b>=1&&0===x[b];b--);if(E>b&&(E=b),0===b)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(w=1;w<b&&0===x[w];w++);for(E<w&&(E=w),S=1,m=1;m<=15;m++)if(S<<=1,(S-=x[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]+x[m];for(y=0;y<r;y++)0!==t[n+y]&&(a[I[t[n+y]]++]=y);if(0===e?(C=N=a,d=19):1===e?(C=Ko,R-=257,N=Jo,P-=257,d=256):(C=Qo,N=Xo,d=-1),T=0,y=0,m=w,f=o,k=E,A=0,l=-1,h=(O=1<<E)-1,1===e&&O>852||2===e&&O>592)return 1;for(;;){p=m-A,a[y]<d?(v=0,g=a[y]):a[y]>d?(v=N[P+a[y]],g=C[R+a[y]]):(v=96,g=0),u=1<<m-A,w=c=1<<k;do{i[f+(T>>A)+(c-=u)]=p<<24|v<<16|g|0}while(0!==c);for(u=1<<m-1;T&u;)u>>=1;if(0!==u?(T&=u-1,T+=u):T=0,y++,0==--x[m]){if(m===b)break;m=t[n+a[y]]}if(m>E&&(T&h)!==l){for(0===A&&(A=E),f+=w,S=1<<(k=m-A);k+A<b&&!((S-=x[k+A])<=0);)k++,S<<=1;if(O+=1<<k,1===e&&O>852||2===e&&O>592)return 1;i[l=T&h]=E<<24|k<<16|f-o|0}}return 0!==T&&(i[f+T]=m-A<<24|64<<16|0),s.bits=E,0}function ta(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function na(){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 Hi(320),this.work=new Hi(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ra(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 Gi(852),t.distcode=t.distdyn=new Gi(592),t.sane=1,t.back=-1,0):-2}(e)):-2}function ia(e,t){var n,r;return e?(r=new na,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,ra(e))):-2}(e,t))&&(e.state=null),n):-2}var oa,aa,sa=!0;function ua(e){if(sa){var t;for(oa=new Gi(512),aa=new Gi(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(ea(1,e.lens,0,288,oa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ea(2,e.lens,0,32,aa,0,e.work,{bits:5}),sa=!1}e.lencode=oa,e.lenbits=9,e.distcode=aa,e.distbits=5}function ca(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,v,g,_,m,y,w,b,E,k,A,S,O=0,T=new qi(4),C=[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,h=s,f=u,k=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,T[0]=255&c,T[1]=c>>>8&255,n.check=No(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){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,E=8+(15&(c>>>=4)),0===n.wbits)n.wbits=E;else if(E>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<E,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&&(T[0]=255&c,T[1]=c>>>8&255,n.check=No(n.check,T,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&&(T[0]=255&c,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,n.check=No(n.check,T,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&&(T[0]=255&c,T[1]=c>>>8&255,n.check=No(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 e;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=No(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&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Zi(n.head.extra,r,o,d,E)),512&n.flags&&(n.check=No(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{E=r[o+d++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E))}while(E&&d<s);if(512&n.flags&&(n.check=No(n.check,r,d,o)),s-=d,o+=d,E)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{E=r[o+d++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E))}while(E&&d<s);if(512&n.flags&&(n.check=No(n.check,r,d,o)),s-=d,o+=d,E)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=ta(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(ua(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;Zi(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[C[n.have++]]=7&c,c>>>=3,l-=3}for(;n.have<19;)n.lens[C[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},k=ea(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,k){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(;_=(O=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&O,!((g=O>>>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}E=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,E=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,E=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++]=E}}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},k=ea(1,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,k){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},k=ea(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,k){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,Yo(e,f),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;_=(O=n.lencode[c&(1<<n.lenbits)-1])>>>16&255,m=65535&O,!((g=O>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(_&&0==(240&_)){for(y=g,w=_,b=m;_=(O=n.lencode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&O,!(y+(g=O>>>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(;_=(O=n.distcode[c&(1<<n.distbits)-1])>>>16&255,m=65535&O,!((g=O>>>24)<=l);){if(0===s)break e;s--,c+=r[o++]<<l,l+=8}if(0==(240&_)){for(y=g,w=_,b=m;_=(O=n.distcode[b+((c&(1<<y+w)-1)>>y)])>>>16&255,m=65535&O,!(y+(g=O>>>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=f-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(f-=u,e.total_out+=f,n.total+=f,f&&(e.adler=n.check=n.flags?No(n.check,i,f,a-f):xo(n.check,i,f,a-f)),f=u,(n.flags?c:ta(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:k=1;break e;case 30:k=-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||f!==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 qi(o.wsize)),r>=o.wsize?(Zi(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),Zi(o.window,t,n-r,i,o.wnext),(r-=i)?(Zi(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,f-e.avail_out),h-=e.avail_in,f-=e.avail_out,e.total_in+=h,e.total_out+=f,n.total+=f,n.wrap&&f&&(e.adler=n.check=n.flags?No(n.check,i,f,e.next_out-f):xo(n.check,i,f,e.next_out-f)),e.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===t)&&0===k&&(k=-5),k}var la;function ha(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 fa(e,t){for(var n=0;n<e.length;n++)this[t+n]=e[n]}ha.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 Wi,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 Lo(e,-2);8===r&&(r=9);var s=new Go;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 qi(2*s.w_size),s.head=new Hi(s.hash_size),s.prev=new Hi(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new qi(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,$o(e)}(this.strm,this.level,8,this.windowBits,this.memLevel,this.strategy);break;case 2:case 4:case 6:case 7:o=ia(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)},ha.prototype.params=function(){throw new Error("deflateParams Not supported")},ha.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")},ha.prototype.write=function(e,t,n,r,i,o,a){this._writeCheck(),this.write_in_progress=!0;var s=this;return V.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},ha.prototype.writeSync=function(e,t,n,r,i,o,a){return this._writeCheck(),this._write(e,t,n,r,i,o,a)},ha.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 _e(0),r=0,n=0),i._set?i.set=i._set:i.set=fa;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=Vo(u,e);break;case 7:case 2:case 4:case 6:s=ca(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]},ha.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?Lo(e,-2):(e.state=null,113===t&&Lo(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)},ha.prototype.reset=function(){switch(this.mode){case 1:case 5:la=$o(this.strm);break;case 2:case 6:la=ra(this.strm)}0!==la&&this._error(la)},ha.prototype._error=function(e){this.onerror(Fi[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()};var da=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:ha});var pa={};Object.keys(da).forEach((function(e){pa[e]=da[e]})),pa.Z_MIN_WINDOWBITS=8,pa.Z_MAX_WINDOWBITS=15,pa.Z_DEFAULT_WINDOWBITS=15,pa.Z_MIN_CHUNK=64,pa.Z_MAX_CHUNK=1/0,pa.Z_DEFAULT_CHUNK=16384,pa.Z_MIN_MEMLEVEL=1,pa.Z_MAX_MEMLEVEL=9,pa.Z_DEFAULT_MEMLEVEL=8,pa.Z_MIN_LEVEL=-1,pa.Z_MAX_LEVEL=9,pa.Z_DEFAULT_LEVEL=pa.Z_DEFAULT_COMPRESSION;var va={Z_OK:pa.Z_OK,Z_STREAM_END:pa.Z_STREAM_END,Z_NEED_DICT:pa.Z_NEED_DICT,Z_ERRNO:pa.Z_ERRNO,Z_STREAM_ERROR:pa.Z_STREAM_ERROR,Z_DATA_ERROR:pa.Z_DATA_ERROR,Z_MEM_ERROR:pa.Z_MEM_ERROR,Z_BUF_ERROR:pa.Z_BUF_ERROR,Z_VERSION_ERROR:pa.Z_VERSION_ERROR};function ga(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=_e.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 _a(e,t){if("string"==typeof t&&(t=new _e(t)),!_e.isBuffer(t))throw new TypeError("Not a string or buffer");var n=pa.Z_FINISH;return e._processChunk(t,n)}function ma(e){if(!(this instanceof ma))return new ma(e);Sa.call(this,e,pa.DEFLATE)}function ya(e){if(!(this instanceof ya))return new ya(e);Sa.call(this,e,pa.INFLATE)}function wa(e){if(!(this instanceof wa))return new wa(e);Sa.call(this,e,pa.GZIP)}function ba(e){if(!(this instanceof ba))return new ba(e);Sa.call(this,e,pa.GUNZIP)}function Ea(e){if(!(this instanceof Ea))return new Ea(e);Sa.call(this,e,pa.DEFLATERAW)}function ka(e){if(!(this instanceof ka))return new ka(e);Sa.call(this,e,pa.INFLATERAW)}function Aa(e){if(!(this instanceof Aa))return new Aa(e);Sa.call(this,e,pa.UNZIP)}function Sa(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||pa.Z_DEFAULT_CHUNK,qn.call(this,e),e.flush&&e.flush!==pa.Z_NO_FLUSH&&e.flush!==pa.Z_PARTIAL_FLUSH&&e.flush!==pa.Z_SYNC_FLUSH&&e.flush!==pa.Z_FULL_FLUSH&&e.flush!==pa.Z_FINISH&&e.flush!==pa.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||pa.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<pa.Z_MIN_CHUNK||e.chunkSize>pa.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<pa.Z_MIN_WINDOWBITS||e.windowBits>pa.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<pa.Z_MIN_LEVEL||e.level>pa.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<pa.Z_MIN_MEMLEVEL||e.memLevel>pa.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=pa.Z_FILTERED&&e.strategy!=pa.Z_HUFFMAN_ONLY&&e.strategy!=pa.Z_RLE&&e.strategy!=pa.Z_FIXED&&e.strategy!=pa.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!_e.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new pa.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=pa.codes[t],n.emit("error",r)};var r=pa.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(r=e.level);var i=pa.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(i=e.strategy),this._binding.init(e.windowBits||pa.Z_DEFAULT_WINDOWBITS,r,e.memLevel||pa.Z_DEFAULT_MEMLEVEL,i,e.dictionary),this._buffer=new _e(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=i,this.once("end",this.close)}Object.keys(va).forEach((function(e){va[va[e]]=e})),dt(Sa,qn),Sa.prototype.params=function(e,t,n){if(e<pa.Z_MIN_LEVEL||e>pa.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=pa.Z_FILTERED&&t!=pa.Z_HUFFMAN_ONLY&&t!=pa.Z_RLE&&t!=pa.Z_FIXED&&t!=pa.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(pa.Z_SYNC_FLUSH,(function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())}))}else V.nextTick(n)},Sa.prototype.reset=function(){return this._binding.reset()},Sa.prototype._flush=function(e){this._transform(new _e(0),"",e)},Sa.prototype.flush=function(e,t){var n=this._writableState;if(("function"==typeof e||void 0===e&&!t)&&(t=e,e=pa.Z_FULL_FLUSH),n.ended)t&&V.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 _e(0),"",t)},Sa.prototype.close=function(e){if(e&&V.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var t=this;V.nextTick((function(){t.emit("close")}))}},Sa.prototype._transform=function(e,t,n){var r,i=this._writableState,o=(i.ending||i.ended)&&(!e||i.length===e.length);if(null===!e&&!_e.isBuffer(e))return n(new Error("invalid input"));o?r=pa.Z_FINISH:(r=this._flushFlag,e.length>=i.length&&(this._flushFlag=this._opts.flush||pa.Z_NO_FLUSH)),this._processChunk(e,r,n)},Sa.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 h=this._binding.writeSync(t,e,o,r,this._buffer,this._offset,i)}while(!this._hadError&&p(h[0],h[1]));if(this._hadError)throw u;var f=_e.concat(c,l);return this.close(),f}var d=this._binding.write(t,e,o,r,this._buffer,this._offset,i);function p(u,h){if(!a._hadError){var f=i-h;if(function(e,t){if(!e)throw new Error(t)}(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 _e(a._chunkSize)),0===h){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},dt(ma,Sa),dt(ya,Sa),dt(wa,Sa),dt(ba,Sa),dt(Ea,Sa),dt(ka,Sa),dt(Aa,Sa);var Oa,Ta={codes:va,createDeflate:function(e){return new ma(e)},createInflate:function(e){return new ya(e)},createDeflateRaw:function(e){return new Ea(e)},createInflateRaw:function(e){return new ka(e)},createGzip:function(e){return new wa(e)},createGunzip:function(e){return new ba(e)},createUnzip:function(e){return new Aa(e)},deflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new ma(t),e,n)},deflateSync:function(e,t){return _a(new ma(t),e)},gzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new wa(t),e,n)},gzipSync:function(e,t){return _a(new wa(t),e)},deflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new Ea(t),e,n)},deflateRawSync:function(e,t){return _a(new Ea(t),e)},unzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new Aa(t),e,n)},unzipSync:function(e,t){return _a(new Aa(t),e)},inflate:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new ya(t),e,n)},inflateSync:function(e,t){return _a(new ya(t),e)},gunzip:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new ba(t),e,n)},gunzipSync:function(e,t){return _a(new ba(t),e)},inflateRaw:function(e,t,n){return"function"==typeof t&&(n=t,t={}),ga(new ka(t),e,n)},inflateRawSync:function(e,t){return _a(new ka(t),e)},Deflate:ma,Inflate:ya,Gzip:wa,Gunzip:ba,DeflateRaw:Ea,InflateRaw:ka,Unzip:Aa,Zlib:Sa},Ca="Promise based HTTP client for the browser and node.js",Ra={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"},xa={type:"git",url:"https://github.com/axios/axios.git"},Ia=["xhr","http","ajax","promise","node"],Na={url:"https://github.com/axios/axios/issues"},Pa="https://github.com/axios/axios",La={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"},Ba={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},ja="dist/axios.min.js",Ma={"follow-redirects":"^1.10.0"},Da=[{path:"./dist/axios.min.js",threshold:"5kB"}],Ua={name:"axios",version:"0.21.1",description:Ca,main:"index.js",scripts:Ra,repository:xa,keywords:Ia,author:"Matt Zabriskie",license:"MIT",bugs:Na,homepage:Pa,devDependencies:La,browser:Ba,jsdelivr:"dist/axios.min.js",unpkg:ja,typings:"./index.d.ts",dependencies:Ma,bundlesize:Da},za=(Oa=Object.freeze({__proto__:null,name:"axios",version:"0.21.1",description:Ca,main:"index.js",scripts:Ra,repository:xa,keywords:Ia,author:"Matt Zabriskie",license:"MIT",bugs:Na,homepage:Pa,devDependencies:La,browser:Ba,jsdelivr:"dist/axios.min.js",unpkg:ja,typings:"./index.d.ts",dependencies:Ma,bundlesize:Da,default:Ua}))&&Oa.default||Oa,Fa=Ui.http,Wa=Ui.https,Za=/https:?/;function qa(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=_e.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,qa(e,t,e.href)}}var Ha=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/"+za.version),o&&!g.isStream(o)){if(_e.isBuffer(o));else if(g.isArrayBuffer(o))o=_e.from(new Uint8Array(o));else{if(!g.isString(o))return i(J("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));o=_e.from(o,"utf-8")}a["Content-Length"]=o.length}var s=void 0;e.auth&&(s=(e.auth.username||"")+":"+(e.auth.password||""));var u=ee(e.baseURL,e.url),c=pr.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=Za.test(l),d=f?e.httpsAgent:e.httpAgent,p={path:m(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,_=e.proxy;if(!_&&!1!==_){var y=l.slice(0,-1)+"_proxy",w=V.env[y]||V.env[y.toUpperCase()];if(w){var b=pr.parse(w),E=V.env.no_proxy||V.env.NO_PROXY,k=!0;if(E)k=!E.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(k&&(_={host:b.hostname,port:b.port,protocol:b.protocol},b.auth)){var A=b.auth.split(":");_.auth={username:A[0],password:A[1]}}}}_&&(p.headers.host=c.hostname+(c.port?":"+c.port:""),qa(p,_,l+"//"+c.hostname+(c.port?":"+c.port:"")+p.path));var S=f&&(!_||Za.test(_.protocol));e.transport?v=e.transport:0===e.maxRedirects?v=Lr:(e.maxRedirects&&(p.maxRedirects=e.maxRedirects),v=S?Wa:Fa),e.maxBodyLength>-1&&(p.maxBodyLength=e.maxBodyLength);var O=v.request(p,(function(t){if(!O.aborted){var n=t,o=t.req||O;if(204!==t.statusCode&&"HEAD"!==o.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":n=n.pipe(Ta.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,Q(r,i,a);else{var s=[];n.on("data",(function(t){s.push(t),e.maxContentLength>-1&&_e.concat(s).length>e.maxContentLength&&(n.destroy(),i(J("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o)))})),n.on("error",(function(t){O.aborted||i(K(t,e,null,o))})),n.on("end",(function(){var t=_e.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=g.stripBOM(t))),a.data=t,Q(r,i,a)}))}}}));O.on("error",(function(t){O.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||i(K(t,e,null,O))})),e.timeout&&O.setTimeout(e.timeout,(function(){O.abort(),i(J("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",O))})),e.cancelToken&&e.cancelToken.promise.then((function(e){O.aborted||(O.abort(),i(e))})),g.isStream(o)?o.on("error",(function(t){i(K(t,e,null,O))})).pipe(O):O.end(o)}))},Ga={"Content-Type":"application/x-www-form-urlencoded"};function $a(e,t){!g.isUndefined(e)&&g.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Va,Ya={adapter:("undefined"!=typeof XMLHttpRequest?Va=re:void 0!==V&&"[object process]"===Object.prototype.toString.call(V)&&(Va=Ha),Va),transformRequest:[function(e,t){return Y(t,"Accept"),Y(t,"Content-Type"),g.isFormData(e)||g.isArrayBuffer(e)||g.isBuffer(e)||g.isStream(e)||g.isFile(e)||g.isBlob(e)?e:g.isArrayBufferView(e)?e.buffer:g.isURLSearchParams(e)?($a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):g.isObject(e)?($a(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}};Ya.headers={common:{Accept:"application/json, text/plain, */*"}},g.forEach(["delete","get","head"],(function(e){Ya.headers[e]={}})),g.forEach(["post","put","patch"],(function(e){Ya.headers[e]=g.merge(Ga)}));var Ka=Ya;function Ja(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Qa=function(e){return Ja(e),e.headers=e.headers||{},e.data=b(e.data,e.headers,e.transformRequest),e.headers=g.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),g.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Ka.adapter)(e).then((function(t){return Ja(e),t.data=b(t.data,t.headers,e.transformResponse),t}),(function(t){return E(t)||(Ja(e),t&&t.response&&(t.response.data=b(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Xa=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 g.isPlainObject(e)&&g.isPlainObject(t)?g.merge(e,t):g.isPlainObject(t)?g.merge({},t):g.isArray(t)?t.slice():t}function u(r){g.isUndefined(t[r])?g.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}g.forEach(r,(function(e){g.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),g.forEach(i,u),g.forEach(o,(function(r){g.isUndefined(t[r])?g.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),g.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 g.forEach(l,u),n};function es(e){this.defaults=e,this.interceptors={request:new w,response:new w}}es.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=Xa(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[Qa,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},es.prototype.getUri=function(e){return e=Xa(this.defaults,e),m(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},g.forEach(["delete","get","head","options"],(function(e){es.prototype[e]=function(t,n){return this.request(Xa(n||{},{method:e,url:t,data:(n||{}).data}))}})),g.forEach(["post","put","patch"],(function(e){es.prototype[e]=function(t,n,r){return this.request(Xa(r||{},{method:e,url:t,data:n}))}}));var ts=es;function ns(e){this.message=e}ns.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},ns.prototype.__CANCEL__=!0;var rs=ns;function is(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 rs(e),t(n.reason))}))}is.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},is.source=function(){var e;return{token:new is((function(t){e=t})),cancel:e}};var os=is;function as(e){var t=new ts(e),n=u(ts.prototype.request,t);return g.extend(n,ts.prototype,t),g.extend(n,t),n}var ss=as(Ka);ss.Axios=ts,ss.create=function(e){return as(Xa(ss.defaults,e))},ss.Cancel=rs,ss.CancelToken=os,ss.isCancel=E,ss.all=function(e){return Promise.all(e)},ss.spread=function(e){return function(t){return e.apply(null,t)}},ss.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError};var us=ss,cs=ss;us.default=cs;var ls,hs,fs,ds,ps,vs,gs,_s,ms,ys,ws,bs=us;exports.NetworkType=void 0,(ls=exports.NetworkType||(exports.NetworkType={})).none="none",ls.wifi="wifi",ls.cellular="cellular",ls.unknown="unknown",exports.PlatformType=void 0,(hs=exports.PlatformType||(exports.PlatformType={})).wp="wp",hs.android="android",hs.iOS="iOS",hs.unknown="unknown",exports.ProfileType=void 0,(fs=exports.ProfileType||(exports.ProfileType={}))[fs.user=1]="user",fs[fs.oa=0]="oa",fs[fs.aliasOA=2]="aliasOA",exports.ChatType=void 0,(ds=exports.ChatType||(exports.ChatType={}))[ds.user=1]="user",ds[ds.oa=0]="oa",exports.PostFeedType=void 0,(ps=exports.PostFeedType||(exports.PostFeedType={}))[ps.image=1]="image",ps[ps.link=4]="link",ps[ps.profile=5]="profile",exports.ShareSheetType=void 0,(vs=exports.ShareSheetType||(exports.ShareSheetType={}))[vs.image=1]="image",vs[vs.gif=11]="gif",vs[vs.video=12]="video",vs[vs.link=4]="link",vs[vs.oa=5]="oa",vs[vs.zmp=20]="zmp",exports.OrientationType=void 0,(gs=exports.OrientationType||(exports.OrientationType={}))[gs.auto=1]="auto",gs[gs.portrait=2]="portrait",gs[gs.landscape=3]="landscape",exports.VibrateType=void 0,(_s=exports.VibrateType||(exports.VibrateType={}))[_s.oneShot=0]="oneShot",exports.NativeCode=void 0,(ms=exports.NativeCode||(exports.NativeCode={}))[ms.token_invalid=-2]="token_invalid",ms[ms.not_permission=-1]="not_permission",ms[ms.client_not_support=-5]="client_not_support",ms[ms.decode_failed=-4]="decode_failed",exports.Events=void 0,(ys=exports.Events||(exports.Events={})).AppPaused="h5.event.paused",ys.AppResumed="h5.event.resumed",ys.NetworkChanged="h5.event.connection.changed",ys.OnDataCallback="h5.event.webview.result",ys.OpenApp="h5.event.open.mp",exports.MediaPickerType=void 0,(ws=exports.MediaPickerType||(exports.MediaPickerType={}))[ws.photo=4]="photo",ws[ws.video=5]="video",ws[ws.file=6]="file",ws[ws.multi_photo=7]="multi_photo",ws[ws.multi_video=8]="multi_video";const Es=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},ks=e=>Es(`${window.location.host}_`+e),As=e=>Es((()=>{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),Ss=window.zAppID,Os=window.APP_ID,Ts=window.APP_CONFIG||{},Cs="h5.zdn.vn_zoauth",Rs="h5.zdn.vn_zlink3rd",xs="h5.zdn.vn_zoauth_vrf",Is="https://graph.zalo.me/v2.0/me",Ns="https://h5.zalo.me/openapi/access_token",Ps="https://oauth.zaloapp.com/v3/access_token",Ls="https://graph.zalo.me/v2.0/me/friends/list",Bs=e=>({NONE:e?-2:0,WIFI:e?0:1,"2G":2,"3G":e?15:2,"4G":e?13:2}),js={GET_DOWNLOADED_STICKER:{name:"action.get.downloaded.sticker",have_callback:!0},OPEN_SHARE_STICKER:{name:"action.open.share.sticker"},OPEN_PROFILE:{name:"action.open.profile"},OPEN_FEED_DETAIL:{name:"action.open.feeddetail"},OPEN_FRIEND_RADA:{name:"action.open.friendrada"},OPEN_INAPP:{name:"action.open.inapp"},OPEN_OUTAPP:{name:"action.open.outapp"},OPEN_PAGE:{name:"action.open.page"},OPEN_PHOTODETAIL:{name:"action.open.photodetail"},OPEN_GALARY:{name:"action.open.galary"},OPEN_GAMECENTER:{name:"action.open.gamecenter"},OPEN_GAMENEWS:{name:"action.open.gamenews"},OPEN_TAB_CONTACT:{name:"action.open.tab.contact"},OPEN_TAB_SOCIAL:{name:"action.open.tab.social"},OPEN_FRIENDSUGGEST:{name:"action.open.friendsuggest"},OPEN_GROUPLIST:{name:"action.open.grouplist"},OPEN_NEARBY:{name:"action.open.nearby"},OPEN_ROOM:{name:"action.open.room"},OPEN_STICKERSTORE:{name:"action.open.stickerstore"},OPEN_CREATECHAT:{name:"action.open.createchat"},COPY_LINK_CATESTICKER:{name:"action.copy.link.catesticker"},REQUEST_BUY_STICKER:{name:"action.request.buy.sticker"},OPEN_CHAT:{name:"action.open.chat"},OPEN_TAB_CHAT:{name:"action.open.tab.chat"},OPEN_CHATGROUP:{name:"action.open.chatgroup"},OPEN_ADDFRIEND:{name:"action.open.addfriend"},OPEN_TAB_MORE:{name:"action.open.tab.more"},OPEN_POSTFEED:{name:"action.open.postfeed"},OPEN_LOGINDEVICES:{name:"action.open.logindevices"},OPEN_SENDSTICKER:{name:"action.open.sendsticker"},REPORT_ABUSE:{name:"action.report.abuse",have_callback:!0},FOLLOW_OA:{name:"action.follow.oa",have_callback:!0},UNFOLLOW_OA:{name:"action.unfollow.oa",have_callback:!0},OPEN_GAMEDETAIL:{name:"action.open.gamedetail"},OPEN_SHARESHEET:{name:"action.open.sharesheet",have_callback:!0},REQUEST_PERMISSION_CAMERA:{name:"action.request.permission.camera"},CHANGE_TITLE_HEADER:{name:"action.change.title.header",skip_jump:!0},WEBVIEW_CLEARCACHE:{name:"action.webview.clearcache"},WEBVIEW_CONFIRMCACHE:{name:"action.webview.confirmcache"},WEBVIEW_ISVISIBLE:{name:"action.webview.isvisible"},WEBVIEW_NETWORKTYPE:{name:"action.webview.networktype",skip_jump:!0},CHANGE_BUTTON_HEADER:{name:"action.change.button.header"},CREATE_OPTIONS_MENU:{name:"action.create.options.menu",skip_jump:!0,have_callback:!0},CREATE_SHORTCUT:{name:"action.create.shortcut"},CHANGE_ACTIONBAR_LEFTBUTTON_TYPE:{name:"action.change.actionbar.leftbutton.type",skip_jump:!0,have_callback:!0},WINDOW_CLOSE:{name:"action.window.close",skip_jump:!0,have_callback:!0},WEBVIEW_CHECKRESERROR:{name:"action.webview.checkResError"},IAP_REQUESTPAYMENT:{name:"action.iap.requestpayment"},ZBROWSER_GETSTATS:{name:"action.zbrowser.getstats"},ZBROWSER_JSBRIDGE:{name:"action.zbrowser.jsbridge",skip_jump:!0,have_callback:!0},PROMPT_AUTHENTICATION:{name:"action.prompt.authentication"},CHANGE_ACTIONBAR_COLOR:{name:"action.change.actionbar.color",skip_jump:!0},PROMPT_AUTHENTICATION_CHECK_STATE:{name:"action.prompt.authentication.check_state"},OPEN_APPSTORE:{name:"action.open.appstore"},GET_LOCATION:{name:"action.get.location",have_callback:!0},QUERY_LOCATION_HIDE:{name:"action.query.location.hide",have_callback:!0},SHOW_TOAST:{name:"action.show.toast",have_callback:!0},OPEN_APP:{name:"action.open.app"},HIDE_KEYBOARD:{name:"action.hide.keyboard"},OPEN_PHONE:{name:"action.open.phone"},OPEN_QR:{name:"action.open.qr"},OPEN_SMS:{name:"action.open.sms"},VIEW_MYQR:{name:"action.view.myqr",have_callback:!0},KEEP_SCREEN:{name:"action.keep.screen",have_callback:!0},CHANGE_AUTOROTATE:{name:"action.change.autorotate",skip_jump:!0},CHECK_APP_INSTALLED:{name:"action.check.app.installed"},QUERY_SHOW:{name:"action.query.show"},QUERY_HIDE:{name:"action.query.hide"},OPEN_INAPPRW:{name:"action.open.inapprw"},ZALORUN_GETTRACKINGSTATUS:{name:"action.zalorun.getTrackingStatus",have_callback:!0},ZALORUN_SETTRACKINGSTATUS:{name:"action.zalorun.setTrackingStatus",have_callback:!0},ZALORUN_GETDAYSTEP:{name:"action.zalorun.getDayStep",have_callback:!0},ZALORUN_FORCESUBMITDATA:{name:"action.zalorun.forceSubmitData",have_callback:!0},ZALORUN_SETWEIGHT:{name:"action.zalorun.setWeight",have_callback:!0},OPEN_PROFILE_EXT:{name:"action.open.profile.ext"},DOWNLOAD_CATE:{name:"action.download.cate",have_callback:!0},JUMP_LOGIN:{name:"action.jump.login",skip_jump:!0,white_list:!0},OPEN_ADTIMA_ADS_INTERSTITIAL:{name:"action.open.adtima.ads.interstitial"},OPEN_ADTIMA_ADS:{name:"action.open.adtima.ads"},GET_ADIDCLIENT:{name:"action.get.adidclient"},SCAN_IBEACON:{name:"action.scan.ibeacon"},INTERACTIVE_VIBRATION:{name:"action.interactive.vibration"},SAVE_IMAGE_GALLERY:{name:"action.save.image.gallery",version_live:{iOS:408}},OPEN_MP:{name:"action.open.mp",version_live:{iOS:402}},CHANGE_ACTIONBAR:{name:"action.change.actionbar",version_live:{iOS:402},skip_jump:!0},ZBROWSER_MPDS:{name:"action.zbrowser.mpds",version_live:{iOS:402}},WEBVIEW_SET_RESULT:{name:"action.webview.set.result",version_live:{iOS:416}},MP_GET_NUMBER:{name:"action.mp.get.number",version_live:{iOS:416}},MP_OPEN_PROFILE_PICKER:{name:"action.mp.open.profile.picker",version_live:{iOS:432}},GET_SUPPORTED_ACTIONS:{name:"action.get.supported.actions",white_list:!0},MP_JOIN_WIFI:{name:"action.mp.join.wifi",version_live:{android:0,iOS:999},have_permission:!1,white_list:!1},PICK_MEDIA:{name:"action.pick.media",version_live:{iOS:999}},MP_CLOSE_LOADINGVIEW:{name:"action.mp.close.loadingview"}},Ms=0,Ds=-1400,Us=-1500,zs=-1401,Fs=-1403,Ws=-1404,Zs={SUCCESS:"Success",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"},qs="apps/get-info",Hs={android:12100571,iOS:400,wp:0,unknown:0},Gs=[js.GET_DOWNLOADED_STICKER.name,js.OPEN_SHARE_STICKER.name,js.OPEN_PROFILE.name,js.OPEN_FEED_DETAIL.name,js.OPEN_FRIEND_RADA.name,js.OPEN_INAPP.name,js.OPEN_OUTAPP.name,js.OPEN_PAGE.name,js.OPEN_PHOTODETAIL.name,js.OPEN_GALARY.name,js.OPEN_GAMECENTER.name,js.OPEN_GAMENEWS.name,js.OPEN_TAB_CONTACT.name,js.OPEN_TAB_SOCIAL.name,js.OPEN_FRIENDSUGGEST.name,js.OPEN_GROUPLIST.name,js.OPEN_NEARBY.name,js.OPEN_ROOM.name,js.OPEN_STICKERSTORE.name,js.OPEN_CREATECHAT.name,js.COPY_LINK_CATESTICKER.name,js.REQUEST_BUY_STICKER.name,js.OPEN_CHAT.name,js.OPEN_TAB_CHAT.name,js.OPEN_CHATGROUP.name,js.OPEN_ADDFRIEND.name,js.OPEN_TAB_MORE.name,js.OPEN_POSTFEED.name,js.OPEN_LOGINDEVICES.name,js.OPEN_SENDSTICKER.name,js.REPORT_ABUSE.name,js.FOLLOW_OA.name,js.UNFOLLOW_OA.name,js.OPEN_GAMEDETAIL.name,js.OPEN_SHARESHEET.name,js.REQUEST_PERMISSION_CAMERA.name,js.CHANGE_TITLE_HEADER.name,js.WEBVIEW_CLEARCACHE.name,js.WEBVIEW_CONFIRMCACHE.name,js.WEBVIEW_ISVISIBLE.name,js.WEBVIEW_NETWORKTYPE.name,js.CHANGE_BUTTON_HEADER.name,js.CREATE_OPTIONS_MENU.name,js.CREATE_SHORTCUT.name,js.CHANGE_ACTIONBAR_LEFTBUTTON_TYPE.name,js.WINDOW_CLOSE.name,js.WEBVIEW_CHECKRESERROR.name,js.IAP_REQUESTPAYMENT.name,js.ZBROWSER_GETSTATS.name,js.ZBROWSER_JSBRIDGE.name,js.PROMPT_AUTHENTICATION.name,js.CHANGE_ACTIONBAR_COLOR.name,js.PROMPT_AUTHENTICATION_CHECK_STATE.name,js.OPEN_APPSTORE.name,js.GET_LOCATION.name,js.QUERY_LOCATION_HIDE.name,js.SHOW_TOAST.name,js.OPEN_APP.name,js.HIDE_KEYBOARD.name,js.OPEN_PHONE.name,js.OPEN_QR.name,js.OPEN_SMS.name,js.VIEW_MYQR.name,js.KEEP_SCREEN.name,js.CHANGE_AUTOROTATE.name,js.CHECK_APP_INSTALLED.name,js.QUERY_SHOW.name,js.QUERY_HIDE.name,js.OPEN_INAPPRW.name,js.ZALORUN_GETTRACKINGSTATUS.name,js.ZALORUN_SETTRACKINGSTATUS.name,js.ZALORUN_GETDAYSTEP.name,js.ZALORUN_FORCESUBMITDATA.name,js.ZALORUN_SETWEIGHT.name,js.OPEN_PROFILE_EXT.name,js.DOWNLOAD_CATE.name,js.JUMP_LOGIN.name,js.OPEN_ADTIMA_ADS_INTERSTITIAL.name,js.OPEN_ADTIMA_ADS.name,js.GET_ADIDCLIENT.name,js.SCAN_IBEACON.name,js.SAVE_IMAGE_GALLERY.name,js.OPEN_MP.name,js.CHANGE_ACTIONBAR.name,js.INTERACTIVE_VIBRATION.name,js.ZBROWSER_MPDS.name],$s=0,Vs=3,Ys=1,Ks=0;class Js{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 Qs extends Js{constructor(e,t){super(e,t),this.message=`${t}. ${Zs.READ_MORE}`,this.handler()}handler(){switch(this.code){case exports.NativeCode.token_invalid:this.code=zs,this.message=Zs.LOGIN_REQUIRED;break;case exports.NativeCode.not_permission:this.code=Fs,this.message=Zs.NOT_PERMISSION;break;case exports.NativeCode.client_not_support:this.code=Ws,this.message=Zs.CLIENT_NOT_SUPPORT;break;case exports.NativeCode.decode_failed:this.message=Zs.DECODE_FAILED}}}const Xs={handler:null,setHandler(e){this.handler=e}};Xs.setHandler(((e,t)=>t instanceof Js?(t.api=e,t):new Js(-2001,s.isNull(t.message)?"Unknown Error":t.message,e)));const eu=(e,t,r)=>{const i=r.value;return r.value=function(...e){return n(this,void 0,void 0,(function*(){const{success:r,fail:o}=Array.isArray(e)&&e.length>0&&e[0];return new Promise(((a,u)=>n(this,void 0,void 0,(function*(){try{const t=yield i.apply(this,e);!s.isNull(r)&&s.isFunction(r)?r.call(null,t,this):a(t)}catch(e){if("login"!==(null==e?void 0:e.api)&&((null==e?void 0:e.code)===zs||(null==e?void 0:e.code)===Fs)){let t=!1;this instanceof zc&&(t=this.getLoginStatus()),t||(e=new Js(zs,Zs.LOGIN_REQUIRED))}const{handler:n}=Xs,r=n.call(null,t,e,this);window.zmpSentry&&window.zmpSentry.throwError(r.toString()),!s.isNull(o)&&s.isFunction(o)?o.call(null,r,this):console.error("Error:",r)}}))))}))},r},tu=(e,t,n)=>{const r=n.value;return n.value=function(...e){try{return r.apply(this,e)}catch(e){if("login"!==(null==e?void 0:e.api)&&((null==e?void 0:e.code)===zs||(null==e?void 0:e.code)===Fs)){let t=!1;this instanceof zc&&(t=this.getLoginStatus()),t||(e=new Js(zs,Zs.LOGIN_REQUIRED))}const{handler:n}=Xs;!s.isNull(n)&&s.isFunction(n)?n.call(null,t,e,this):console.warn(e.message)}},n},nu=(e,t)=>({code:Ms,message:t||Zs.SUCCESS,data:e||{}}),ru={badRequest:e=>new Js(Ds,e),loginFailed:()=>new Js(Ds,Zs.LOGIN_FAILED),loginRequired:()=>new Js(zs,Zs.LOGIN_REQUIRED),missingParam:e=>new Js(Ds,`Missing required argument: ${e}`),wrongTypeParam:(e,t,n)=>new Js(Ds,`Wrong type of parameter '${e}'. Expected ${t}, but got ${n}`),cannotGetShareInfo:()=>new Js(Us,"Can not get app info to share"),lengthInvalid:e=>new Js(Ds,`${e} length is invalid.`)};const iu={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:iu.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("&")}},ou=new RegExp("[\\u0300-\\u036f]","g"),au=new RegExp("[đ|Đ]","g"),su=new RegExp("\\s","g"),uu=ki("zmp:utils:common"),cu=()=>navigator.userAgent||navigator.vendor||window.opera,lu=()=>{const e=cu().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)}},hu=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""},fu=()=>{const e=cu().toLowerCase().split("zalo")[1];if(e){return e.replace(" ","").split("/")[1]||""}return""},du=()=>{let e=lu();return e.isWP?exports.PlatformType.wp:e.isAndroid?exports.PlatformType.android:e.isIOS?exports.PlatformType.iOS:exports.PlatformType.unknown},pu=(e,t)=>{const n=t.toLowerCase(),r="array"===n||"array<number>"===n||"array<string>"===n;return!!("url"===n&&(e=>{try{new URL(e)}catch(e){return!1}return!0})(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)},vu=e=>(e=>{let t=ks(e);return t||(t=As(e),t)?t:Es(e)})(e),gu=e=>{if(s.isObject(JSON)&&JSON.parse&&s.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 s.isObject(e)?e:new Function("return "+e)()},_u=e=>{if(s.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 n=e.length,r=0;r<n;r++)t.push(_u(e[r]));return"["+t.join(",")+"]"}if("object"==typeof e){for(var i in t=new Array,e)t.push('"'+i+'":'+_u(e[i]));return"{"+t.join(",")+"}"}return e.toString()},mu=()=>{try{const e=Number(fu()),t=du();return e>=Hs[t]}catch(e){return!0}},yu=e=>JSON.stringify(e).replace(/"/g,'\\"').replace(/'/g,"'"),wu=e=>{try{if(e){uu(e);const t=e.replace(/\\/g,"").replace(/'/g,"'");return uu("formattedValue",t,JSON.parse(t),typeof JSON.parse(t)),JSON.parse(t)}return null}catch(t){return uu("parse json error:",t),e}},bu=(e,t,r,i,o,a)=>n(void 0,void 0,void 0,(function*(){const n=new URL(location.href),s=new URLSearchParams;let u=`${n.pathname}${n.search}`;a&&(u=`/zapps/${e}${"/"===a[0]?"":"/"}${a}`);const c=new URL(`https://zalo.me/app/link${u}`);s.append("title",r),s.append("description",i||""),s.append("thumbnail",o),s.append("url",c.href),s.append("accessToken",t||"");const l=(yield bs.post("https://h5.zalo.me/openapi/create-sharelink",s,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data;if(!l||0!==l.err)throw ru.cannotGetShareInfo();return c.search=`${c.search}&zshareId=${l.data.shareId}`,Object.assign(Object.assign({},l.data),{shareableLink:c.href})})),Eu=(e,t)=>n=>{if(!(Array.isArray(e)?e.some((e=>pu(n,e))):pu(n,e)))return{error:!0,errorMessage:e};if(t){if(Array.isArray(null==t?void 0:t.values))return{error:!(null==t?void 0:t.values.includes(n)),errorMessage:null==t?void 0:t.values.toString()};if(s.isNumber(null==t?void 0:t.maxLength))return{error:s.isString(n)&&n.length>(null==t?void 0:t.maxLength),errorMessage:`data length must <= ${null==t?void 0:t.maxLength}`};if(s.isNumber(null==t?void 0:t.min)&&s.isNumber(null==t?void 0:t.max))return{error:n<(null==t?void 0:t.min)||n>(null==t?void 0:t.max),errorMessage:`data must be in between ${null==t?void 0:t.min} and ${null==t?void 0:t.max}`};if(s.isNumber(null==t?void 0:t.min))return{error:n<(null==t?void 0:t.min),errorMessage:`data must >= ${null==t?void 0:t.min}`};if(s.isNumber(null==t?void 0:t.max))return{error:n>(null==t?void 0:t.max),errorMessage:`data must <= ${null==t?void 0:t.max}`};if(s.isRegExp(null==t?void 0:t.regex))return{error:!t.regex.test(n),errorMessage:"data must valid"}}return{error:!1}},ku=(e,t,r)=>n(void 0,void 0,void 0,(function*(){const n={appId:e,versionStatus:t};s.isUndefined(r)||(n.currentVersion=r);const i=iu.appendToUrl(`https://h5.zalo.me/${qs}`,n),o=yield fetch(i,{credentials:"include"});if(o.ok){const e=yield o.json();if(e.err<0||!e.data)throw new Error(e);return{name:e.data.name,version:e.data.version,description:e.data.description,appUrl:e.data.appUrl,qrCodeUrl:e.data.qrCodeUrl,logoUrl:e.data.logoUrl}}throw new Error("Can't get app info")}));var Au=a((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],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){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(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(e,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,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(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(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 Su extends Au{constructor(){super(),this.debug=ki("zmp:event-emitter")}static getInstance(){return Su.instance||(Su.instance=new Su),Su.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 Ou={},Tu=function(e,t,n){var r=t||"default";return function(){var t=r in Ou?Ou[r](e,n):e;return t.apply(this,arguments)}};Tu.setWrapper=function(e){var t=arguments.length<=1||void 0===arguments[1]?"default":arguments[1];Ou[t]=e};var Cu={error:{code:1,error_subcode:1357046,message:"Received Invalid JSON reply.",type:"http"}};function Ru(e){try{return null===e?Cu:JSON.parse(e)}catch(e){return Cu}}var xu,Iu={execute:function(e,t,n,r){n.suppress_http_code=1;var i=iu.encode(n);"post"!=t&&(e=iu.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=Tu((function(){o=r,"onload"in i&&i.onload(n)}),"entry","XMLHttpRequest:load"),a=Tu((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(Ru(e.responseText))},o.onerror=function(e){e.responseText?r(Ru(e.responseText)):r({error:{code:1,error_subcode:1357045,message:"unknown error (empty response)",status:e.status,type:"http"}})},o.send(i),!0)}};class Nu extends Au{constructor(){super(),this.debug=ki("zmp:ZaloJSBridge"),this.events=Su.getInstance(),this._accessTk=vu("zacc_session")||"DEFAULT_ACCESS_TOKEN",this._jsAccessTk=vu("zlink3rd")||"DEFAULT_JS_TOKEN",this.results=[],this._userAgent=cu(),this._device=lu(),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 Nu.instance||(Nu.instance=new Nu),Nu.instance}set accessTk(e){this._accessTk=e}set jsAccessTk(e){this._jsAccessTk=e}sendLogData(e){try{Iu.execute("https://h5.zalo.me/log/async","post",{appId:window.APP_ID,data:JSON.stringify(e)},(e=>{}))}catch(e){}}onJSCall(e,t){try{this.debug("onJSCall",e,t);const n=gu(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{this.debug("onMultiJSCall",e,t);const n=gu(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=wu(n);this.debug(r);const i=this.handleEventData(t,r);this.events.emit(t,e,i)}handleEventData(e,t){try{switch(e){case exports.Events.OpenApp:const{url:e}=t,n=new URL(e),r=n.pathname.split(`/zapps/${Os}`)[1];return{path:`${r||"/"}${n.search}`};default:return t}}catch(e){return t}}defaultCallback(e){null!=e&&(e=gu(e))}jsCall(e,t,n,r=!1,i=3,o=!0){try{const a=e.name,u=((e="")=>`${e.normalize("NFD").replace(ou,"").replace(au,"d").replace(su,"").toLowerCase()}_${Math.random().toString(36).substr(2,4)}`)(a);if(!this._device.isMobile||s.isEmpty(a))return this.onJSCall(u,{error_code:-13,error_message:"params invalid!",data:{device:this._device.isMobile,jsToken:this._jsAccessTk,access_token:this._accessTk},action:a}),!1;null==t&&(t={}),n||(n=this.defaultCallback);const c={error_code:-14,error_message:"Request Timeout!",data:{},action:a};this._jsCallFuncCallbacks[u]={timeout:o&&e.have_callback&&setTimeout((()=>{this.onJSCall(u,c)}),8e3),callback:n};try{return t=_u(t),r?this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,window.onMultiJSCall(u)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,`window.onMultiJSCall('${u}')`):this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,window.onJSCall(u)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,`window.onJSCall('${u}')`)}catch(o){if(!(i-- >0)){const e={error_code:-5,error_message:"Not ready!",data:{userAgent:this._userAgent,options:t,jsToken:this._jsAccessTk,access_token:this._accessTk},action:a,js_error:o};return this.onJSCall(u,e),!1}setTimeout((()=>{this.jsCall(e,t,n,r,i)}),500)}}catch(e){console.log("jsCall","error",e)}return!1}}class Pu{constructor(){this.debug=ki("zmp:ZJSBridgeProvider"),xu.set(this,void 0),i(this,xu,Nu.getInstance())}setZAccSession(e){r(this,xu).accessTk=e}setJSToken(e){r(this,xu).jsAccessTk=e}callNative(e,t,i){return this.debug(e.name,t),new Promise(((o,a)=>{const s=r=>n(this,void 0,void 0,(function*(){try{const n=new Qs(r.error_code,`${r.action}: ${r.error_message}`);if(null==i?void 0:i.callback){const e=yield i.callback(r,n);return o(e)}if(r&&r.error_code>=0)o(r.data||{});else if(r&&r.error_code<0){try{window.zmpSentry&&window.zmpSentry.captureMessage(`${e.name}: call native fail`,{extra:{data:t,rs:r}})}catch(e){}return a(n)}}catch(e){return a(e)}})),u=lu().isIOS,c=(e=>{var t;const n=fu(),r=(null===(t=null==e?void 0:e.version_live)||void 0===t?void 0:t.iOS)||0;return!!(Array.isArray(window.ignoreCheckSupport)&&window.ignoreCheckSupport.length>0&&window.ignoreCheckSupport.includes(e.name))||n>=r})(e);if(u&&!c){const t=new Qs(-5,`${e}: Client isn't support this action`);return a(t)}(null==i?void 0:i.delay)?setTimeout((()=>{r(this,xu).jsCall(e,t,s,null==i?void 0:i.isMultiCallback,null==i?void 0:i.nRetry,null==i?void 0:i.haveTimeout)}),i.delay):r(this,xu).jsCall(e,t,s,null==i?void 0:i.isMultiCallback,null==i?void 0:i.nRetry,null==i?void 0:i.haveTimeout)}))}}xu=new WeakMap;var Lu,Bu,ju,Mu,Du;class Uu{static getVersion(){return"2.17.6"}static getSystemInfo(){return{version:hu("version-id")||"",apiVersion:"2.17.6",zaloVersion:fu(),platform:du(),language:navigator.language,zaloLanguage:window.zLanguage||"vi",zaloTheme:window.zTheme||"light"}}static getAppInfo(){return n(this,void 0,void 0,(function*(){const e=this.getAppId(),t=this.getSystemInfo();return yield ku(e,0,t.version)}))}}class zu{static setNavigationBarTitle(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.CHANGE_TITLE_HEADER,{title:e.title},{haveTimeout:!1})}))}static setNavigationBarColor(e){return n(this,void 0,void 0,(function*(){const t={};let n;s.isEmpty(e.textColor)||(t.textColor=e.textColor),s.isString(e.color)&&e.color.length>0?(s.isEmpty(e.color)||(t.backgroundColor=e.color),n=5):(s.isEmpty(e.statusBarColor)||(t.backgroundColor=e.statusBarColor),n=6),this.setActionBarConfig((e=>Object.assign(Object.assign({},e),{actionbarType:n,dataConfig:Object.assign(Object.assign({},e.dataConfig),t)}))),yield this.callNative(js.CHANGE_ACTIONBAR,Object.assign({},this.getActionBarConfig()),{haveTimeout:!1})}))}static setNavigationBarLeftButton(e){return n(this,void 0,void 0,(function*(){const t="none"===e.type||"home"===e.type?Vs:$s,n="home"===e.type||"both"===e.type?Ys:Ks;this.setActionBarConfig((e=>Object.assign(Object.assign({},e),{buttonType:t,dataConfig:Object.assign(Object.assign({},e.dataConfig),{viewInLeftType:t}),homeConfig:Object.assign(Object.assign({},e.homeConfig),{enable:n})}))),yield this.callNative(js.CHANGE_ACTIONBAR_LEFTBUTTON_TYPE,Object.assign({},this.getActionBarConfig()),{haveTimeout:!1})}))}static setNavigationBarRightButton(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.CREATE_OPTIONS_MENU,{supportToolBar:e.supportToolBar,reset:e.reset,menuListItems:e.menuListItems,zapp:this.getAppId()})}))}}class Fu{static setBackgroundColor(e){return n(this,void 0,void 0,(function*(){s.isString(e.backgroundColor)&&e.backgroundColor.length>0&&(yield this.callNative(js.CHANGE_ACTIONBAR,{actionbarType:this.isShowNavBar?5:6,dataConfig:{backgroundColor:e.backgroundColor,textColor:e.textColor}}))}))}}class Wu{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(" ")}}Lu=new WeakMap,Bu=new WeakMap,ju=new WeakMap,Mu=new WeakMap,Du=new WeakMap;const Zu=new class{constructor(){Lu.set(this,3),Bu.set(this,["none","error","warn","info"]),ju.set(this,"[zmp] > "),Mu.set(this,{error:0,warn:0,info:0,firstError:null,lastError:null}),Du.set(this,((e,t,n)=>{r(this,Mu)[r(this,Bu)[e]]++;const o=r(this,Bu)[e];if(i(this,ju,r(this,ju)+("string"!=typeof t?new Wu(t,o,e,n).toString():t)),!(e>r(this,Lu)))switch(e){case 1:console.error(r(this,ju));break;case 2:console.warn(r(this,ju));break;case 3:console.info(r(this,ju));break;default:throw new Error("internal")}}))}setLogLevel(e){i(this,Lu,e)}info(e){r(this,Du).call(this,3,e)}warn(e,t){r(this,Du).call(this,2,e,t)}error(e,t){r(this,Du).call(this,1,e,t)}getMetrics(){return r(this,Mu)}};class qu{static setDeviceOrientation(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.CHANGE_AUTOROTATE,{autoRotate:exports.OrientationType[e.rotate]})}))}static getNetworkType(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.WEBVIEW_NETWORKTYPE,{url:window.location.href,featureId:""}).then((e=>{const t=e.network;let n;const r=lu().isAndroid;switch(t){case Bs(r).NONE:n=exports.NetworkType.none;break;case Bs(r).WIFI:n=exports.NetworkType.wifi;break;case Bs(r)["2G"]:case Bs(r)["3G"]:case Bs(r)["4G"]:n=exports.NetworkType.cellular;break;default:n=exports.NetworkType.unknown}return{networkType:n}}))}))}static onNetworkStatusChange(e){return n(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=>{Zu.error(e,"onNetworkStatusChange")}))}))}))}static startBeaconDiscovery(e){var t,r,i,o,a;return n(this,void 0,void 0,(function*(){const n={subaction:0,scanning_type:s.isNumber(null==e?void 0:e.scanningType)?e.scanningType:0,data:{scan_from_source:s.isString(null==e?void 0:e.scanFromSource)?e.scanFromSource:"",expire:s.isNumber(null==e?void 0:e.expire)?e.expire:3e3,monitor_interval:s.isNumber(null==e?void 0:e.monitorInterval)?e.monitorInterval:60,domain:s.isString(null==e?void 0:e.domain)?e.domain:"",scan_config:{scan_time:s.isNumber(null===(t=null==e?void 0:e.scanConfig)||void 0===t?void 0:t.scanTime)?e.scanConfig.scanTime:15e3,time_between_scan:s.isNumber(null===(r=null==e?void 0:e.scanConfig)||void 0===r?void 0:r.timeBetweenScan)?e.scanConfig.timeBetweenScan:1e4,beacon_timeout:s.isNumber(null===(i=null==e?void 0:e.scanConfig)||void 0===i?void 0:i.beaconTimeout)?e.scanConfig.beaconTimeout:3e4,delayCheckConnectedTimeout:s.isNumber(null===(o=null==e?void 0:e.scanConfig)||void 0===o?void 0:o.delayCheckConnectedTimeout)?e.scanConfig.delayCheckConnectedTimeout:5e3,beaconConnectedTimeout:s.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(js.SCAN_IBEACON,Object.assign({},n)),!0}))}static stopBeaconDiscovery(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.SCAN_IBEACON,Object.assign({},{subaction:2})),!0}))}static getBeacons(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.SCAN_IBEACON,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 n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static startBluetoothDevicesDiscovery(e){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},Object.assign({},e))}))}static openBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static onBluetoothDeviceFound(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static onBluetoothAdapterStateChange(){return n(this,void 0,void 0,(function*(){return Promise.resolve()}))}static getConnectedBluetoothDevices(e){return n(this,void 0,void 0,(function*(){const t={services:e.services||[]};return this.callNative({name:""},t)}))}static getBluetoothDevices(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static getBluetoothAdapterState(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static closeBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static scanQRCode(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.OPEN_QR,{skipOpenLink:!0})}))}static showToast(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.SHOW_TOAST,{toast:e.message})}))}static hideKeyboard(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.HIDE_KEYBOARD,{})}))}static openPhone(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.OPEN_PHONE,{phoneNum:e.phoneNumber,phoneCode:e.phoneNumber})}))}static openSMS(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.OPEN_SMS,{content:e.content,phoneCode:e.phoneNumber})}))}static keepScreen(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.KEEP_SCREEN,{data:{keep_screen_on:e.keepScreenOn?1:0}})}))}static openBioAuthentication(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.PROMPT_AUTHENTICATION,{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 n(this,void 0,void 0,(function*(){return yield this.callNative(js.PROMPT_AUTHENTICATION_CHECK_STATE,{}).then((e=>({bioState:null==e?void 0:e.bio_state})))}))}static vibrate(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.INTERACTIVE_VIBRATION,{type:exports.VibrateType[e.type],vibrate_time:e.milliseconds})}))}static connectWifi(e){return n(this,void 0,void 0,(function*(){let t="open";return s.isString(e.password)&&e.password.length>0&&(t="wpa_wpa2"),yield this.callNative(js.MP_JOIN_WIFI,{ssid:e.SSID,securityType:t,password:e.password,hiddenSsid:e.hiddenSSID})}))}}var Hu,Gu,$u,Vu,Yu,Ku,Ju,Qu,Xu,ec,tc,nc,rc,ic,oc,ac,sc,uc,cc,lc,hc,fc,dc,pc,vc,gc,_c,mc,yc;class wc{constructor(e){Hu.set(this,localStorage),Gu.set(this,void 0),$u.set(this,void 0),lu(),i(this,$u,{keys:new Set,currentSize:0,limitSize:5242880}),i(this,Gu,e),this.findAllCurrentDataByApp(e)}findAllCurrentDataByApp(e){try{let t;for(t in r(this,Hu)){if(e){if(t.split("_")[0]!==e)continue}r(this,$u).keys.add(t)}}catch(e){Zu.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 r(this,Gu)&&(e=`${r(this,Gu)}_${e}`),r(this,$u).keys.has(e)?r(this,Hu).getItem(e):null}set(e){return n(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){r(this,Gu)&&(e=`${r(this,Gu)}_${e}`),r(this,Hu).setItem(e,t),r(this,$u).keys.add(e)}getInfo(){return n(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})(r(this,Hu),r(this,Gu));return{currentSize:s.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number(5120..toFixed(2))}}remove(e){return n(this,void 0,void 0,(function*(){return e.forEach((e=>{this.removeSync(e)})),Promise.resolve({errorKeys:[]})}))}removeSync(e){r(this,Gu)&&(e=`${r(this,Gu)}_${e}`),r(this,$u).keys.has(e)&&(r(this,Hu).removeItem(e),r(this,$u).keys.delete(e))}clear(){return n(this,void 0,void 0,(function*(){return Promise.resolve(this.clearSync())}))}clearSync(){r(this,$u).keys.forEach((e=>{r(this,Gu)&&e.indexOf(r(this,Gu))<0||(r(this,Hu).removeItem(e),r(this,$u).keys.delete(e))}))}}Hu=new WeakMap,Gu=new WeakMap,$u=new WeakMap;class bc extends Pu{constructor(e){super(),Vu.set(this,void 0),Yu.set(this,void 0),i(this,Yu,{keys:new Set,currentSize:0,limitSize:5242880}),i(this,Vu,e)}get(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.ZBROWSER_MPDS,{mpds_action:"mpds.get",mpds_data:{keys:e},appId:r(this,Vu)},{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 n(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(js.ZBROWSER_MPDS,{mpds_action:"mpds.set",mpds_data:{map:e},appId:r(this,Vu)},{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 n(this,void 0,void 0,(function*(){const e=yield this.callNative(js.ZBROWSER_MPDS,{mpds_action:"mpds.get.size",mpds_data:{},appId:r(this,Vu)},{isMultiCallback:!1}).then((e=>{let t=0;return e&&e.mpds_data&&e.mpds_data.size&&(t=e.mpds_data.size),t}));return{currentSize:s.isNumber(e)?Number(e/1024):0,limitSize:Number(5120)}}))}remove(e){return n(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(js.ZBROWSER_MPDS,{mpds_action:"mpds.remove.key",mpds_data:{keys:e},appId:r(this,Vu)},{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 n(this,void 0,void 0,(function*(){yield this.callNative(js.ZBROWSER_MPDS,{mpds_action:"mpds.clear.appData",mpds_data:{},appId:r(this,Vu)})}))}}Vu=new WeakMap,Yu=new WeakMap;class Ec{getDataFromStorage(e){return n(this,void 0,void 0,(function*(){const t=this.getInstance(),n=yield t.get(e),r={};return n.forEach(((e,t)=>{r[t]=wu(e)})),r}))}putDataToStorage(e){return n(this,void 0,void 0,(function*(){const t=this.getInstance(),n={};return Object.entries(e).forEach((([e,t])=>{s.isUndefined(t)||s.isNull(t)||(n[e]=yu(t))})),yield t.set(n)}))}removeDataFromStorage(e){return n(this,void 0,void 0,(function*(){const t=this.getInstance();return yield t.remove(e)}))}clearStorage(){return n(this,void 0,void 0,(function*(){const e=this.getInstance();yield e.clear()}))}getStorageInfo(){return n(this,void 0,void 0,(function*(){const e=this.getInstance();return yield e.getInfo()}))}}class kc extends Ec{constructor(e){super(),Ku.set(this,void 0),i(this,Ku,e)}getInstance(){return new wc(r(this,Ku))}}Ku=new WeakMap;class Ac extends Ec{constructor(e){super(),Ju.set(this,void 0),i(this,Ju,e)}getInstance(){return new bc(r(this,Ju))}}Ju=new WeakMap;class Sc{static setStorage(e){return n(this,void 0,void 0,(function*(){let t=new kc(this.getAppId());return mu()&&(t=new Ac(this.getAppId())),yield t.putDataToStorage(e.data)}))}static getStorage(e){return n(this,void 0,void 0,(function*(){let t=new kc(this.getAppId());mu()&&(t=new Ac(this.getAppId()));return yield t.getDataFromStorage(e.keys)}))}static getStorageInfo(e){return n(this,void 0,void 0,(function*(){let e=new kc(this.getAppId());return mu()&&(e=new Ac(this.getAppId())),yield e.getStorageInfo()}))}static removeStorage(e){return n(this,void 0,void 0,(function*(){let t=new kc(this.getAppId());return mu()&&(t=new Ac(this.getAppId())),yield t.removeDataFromStorage(e.keys)}))}static clearStorage(e={}){return n(this,void 0,void 0,(function*(){let e=new kc(this.getAppId());mu()&&(e=new Ac(this.getAppId())),yield e.clearStorage()}))}}class Oc{static getUserInfo(e){return n(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 bs.get(Is,{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 n(this,void 0,void 0,(function*(){return yield this.callNative(js.MP_GET_NUMBER,{},{isMultiCallback:!0,callback:(e,t)=>{if(0===e.error_code){const t={number:e.data};return Promise.resolve(t)}return Promise.reject(t)},delay:this.isIOS?400:0})}))}}class Tc{static closeApp(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.WINDOW_CLOSE,{})}))}static openMiniApp(e){return n(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("&"),i=yield ku(t,0);yield this.callNative(js.OPEN_MP,{mpUrl:`https://h5.zdn.vn/zapps/${t}/${r.length>0?"?"+r:""}`,mpInfo:{appId:t,appAvtUrl:i.logoUrl||"",appName:i.name||""}})}))}static openWebview(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.OPEN_INAPP,{url:e.url})}))}static closeLoading(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.MP_CLOSE_LOADINGVIEW,{at:(new Date).getTime(),when:e,url:location.href})}))}}class Cc{static getLocation(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.GET_LOCATION,{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:(e,t)=>{if(0===e.error_code){const t=e.data,n={latitude:t.latitude,longitude:t.longitude,timestamp:t.timestamp,provider:t.provider};return Promise.resolve(n)}return Promise.reject(t)},delay:this.isIOS?400:0})}))}static sendLocation(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.QUERY_LOCATION_HIDE,{title:e.title,touserid:e.toUserId,zapp:this.getZAppId()})}))}}class Rc{static requestCameraPermission(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.REQUEST_PERMISSION_CAMERA,{},{callback:(e,t)=>-2===e.error_code||e.error_code>=0?Promise.resolve({userAllow:-2!==e.error_code,message:e.error_message}):Promise.reject(t)})}))}static saveImageToPhotosAlbum(e){return n(this,void 0,void 0,(function*(){let t={};return s.isEmpty(e.imageBase64Data)?s.isEmpty(e.imageUrl)||(t={imageUrl:e.imageUrl}):t={imageBase64Data:e.imageBase64Data},yield this.callNative(js.SAVE_IMAGE_GALLERY,Object.assign({},t))}))}}class xc{static viewOAQr(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.VIEW_MYQR,{dpn:e.displayName,uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openProfile(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.OPEN_PROFILE,{uId:e.id,type:exports.ProfileType[e.type],zapp:this.getZAppId(),sourceId:e.sourceId,sourceIndex:e.sourceIndex})}))}static openChat(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.OPEN_CHAT,{uId:e.id,type:exports.ChatType[e.type],zapp:this.getZAppId(),sourceId:e.sourceId,sourceIndex:e.sourceIndex})}))}static openPostFeed(e){return n(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(js.OPEN_POSTFEED,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 n(this,void 0,void 0,(function*(){yield this.callNative(js.FOLLOW_OA,{uid:e.id,showDialogConfirm:!0,zapp:this.getZAppId()},{haveTimeout:!1})}))}static unfollowOA(e){return n(this,void 0,void 0,(function*(){yield this.callNative(js.UNFOLLOW_OA,{uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openShareSheet(e){return n(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=yield this.getAccessToken(),r=yield bu(this.getAppId(),n||"",e.data.title||"",e.data.description||"",e.data.thumbnail||"",e.data.path);window.forceShareZMP?t={data:{ZInstantAPIInfo:{url:`${r.zinstantApi}`,zinstantdata_id:`templateId=11412&appId=${this.getAppId()}&shareId=${r.shareId}`},previewMsgText:{msg:{en:"Mini App",vi:"Chương trình nhỏ"}},enableReactions:1}}:(t={link:r.shareableLink,chatOnly:e.data.chatOnly?1:0},e.type="link")}return yield this.callNative(js.OPEN_SHARESHEET,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,t,r){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.CREATE_SHORTCUT,{url:e,title:t,iconUrl:r})}))}static openProfilePicker(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.MP_OPEN_PROFILE_PICKER,{maxProfile:e},{isMultiCallback:!0,callback:(e,t)=>0===e.error_code&&Array.isArray(e.data)?Promise.resolve(e.data.map((e=>e.id))):Promise.reject(t)})}))}static getActionsSupported(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.GET_SUPPORTED_ACTIONS,{},{isMultiCallback:!1,callback:(e,t)=>{const n=du();if(Array.isArray(e.actions)&&e.actions.length>0){const t=Object.keys(js).filter((e=>js[e].skip_jump)),n={actions:[...e.actions,...t]};return Promise.resolve(n)}if(n===exports.PlatformType.iOS){const e={actions:Gs};return Promise.resolve(e)}return Promise.reject(t)}})}))}static openMediaPicker(e,t,r,i){return n(this,void 0,void 0,(function*(){const n={type:0,url:"https://zapi-server.tungnt.xyz/upload/photos",maxSize:1048576};return yield this.callNative(js.PICK_MEDIA,{media_type:exports.MediaPickerType[e],edit_view:Object.assign(Object.assign({},{enable:1,aspect_ratio:"1:1"}),t),silent_request:r,upload:n,max_select_item:i},{isMultiCallback:!0,callback:(e,t)=>{var n,r;if(0===e.error_code){const t=wu(null===(n=e.data)||void 0===n?void 0:n.result_content),i={urls:null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.urls};return Promise.resolve(i)}return Promise.reject(t)}})}))}static openOutApp(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.OPEN_OUTAPP,{url:e})}))}}class Ic{static getRouteParams(){let e={};const t=window.location.href;try{let n=new URL(t).searchParams.toString();n&&(e=iu.getParamsAsObject(n))}catch(e){throw new Error("Url không hợp lệ")}return e}static sendDataToPreviousMiniApp(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(js.WEBVIEW_SET_RESULT,{result:yu(e.data)})}))}static onCallbackData(e){return n(this,void 0,void 0,(function*(){yield this.events.on(exports.Events.OnDataCallback,(t=>{e({data:t})}))}))}}class Nc extends Pu{constructor(){var e,t,n,o,a,u,c,l,h,f,d,p,v,g,_,m,y;super(),Qu.set(this,Ss),Xu.set(this,Os),ec.set(this,Ts),tc.set(this,void 0),nc.set(this,void 0),rc.set(this,void 0),ic.set(this,null),oc.set(this,{timer:{getToken:0}}),ac.set(this,void 0),sc.set(this,void 0),uc.set(this,null),this.events=Su.getInstance(),this.isIOS=lu().isIOS,cc.set(this,void 0),this.getActionBarConfig=()=>r(this,cc),this.setActionBarConfig=e=>{i(this,cc,e(r(this,cc)))},lc.set(this,(()=>new Promise(((e,t)=>{s.isUndefined(r(this,uc))||s.isNull(r(this,uc))?this.callNative(js.JUMP_LOGIN,{}).then((t=>{const n=t&&t.cookiesOAuthLogins||[],r=n.find((e=>e.name===Rs));r&&(this.setJSToken(r.value),window.ZJSBridge.setJSToken&&window.ZJSBridge.setJSToken(r.value)),i(this,uc,n),e(n)})).catch((e=>{t(e)})):e(r(this,uc))})))),hc.set(this,zu.setNavigationBarRightButton),this.getVersion=Uu.getVersion,this.getSystemInfo=Uu.getSystemInfo,this.setNavigationBarTitle=zu.setNavigationBarTitle,this.setNavigationBarColor=zu.setNavigationBarColor,this.setNavigationBarLeftButton=zu.setNavigationBarLeftButton,this.setBackgroundColor=Fu.setBackgroundColor,this.setDeviceOrientation=qu.setDeviceOrientation,this.setStorage=Sc.setStorage,this.getStorage=Sc.getStorage,this.getStorageInfo=Sc.getStorageInfo,this.removeStorage=Sc.removeStorage,this.clearStorage=Sc.clearStorage,this.getUserInfo=Oc.getUserInfo,this.getNetworkType=qu.getNetworkType,this.onNetworkStatusChange=qu.onNetworkStatusChange,this.startBeaconDiscovery=qu.startBeaconDiscovery,this.stopBeaconDiscovery=qu.stopBeaconDiscovery,this.getBeacons=qu.getBeacons,this.closeApp=Tc.closeApp,this.getLocation=Cc.getLocation,this.stopBluetoothDevicesDiscovery=qu.stopBluetoothDevicesDiscovery,this.startBluetoothDevicesDiscovery=qu.stopBluetoothDevicesDiscovery,this.openBluetoothAdapter=qu.openBluetoothAdapter,this.onBluetoothDeviceFound=qu.onBluetoothDeviceFound,this.onBluetoothAdapterStateChange=qu.onBluetoothAdapterStateChange,this.getConnectedBluetoothDevices=qu.getConnectedBluetoothDevices,this.getBluetoothDevices=qu.getBluetoothDevices,this.getBluetoothAdapterState=qu.getBluetoothAdapterState,this.closeBluetoothAdapter=qu.closeBluetoothAdapter,this.scanQRCode=qu.scanQRCode,this.openProfile=xc.openProfile,this.openChat=xc.openChat,this.openPostFeed=xc.openPostFeed,this.followOA=xc.followOA,this.unFollowOA=xc.unfollowOA,this.openShareSheet=xc.openShareSheet,this.requestCameraPermission=Rc.requestCameraPermission,this.createShortcut=xc.createShortcut,this.openBioAuthentication=qu.openBioAuthentication,this.checkStateBioAuthentication=qu.checkStateBioAuthentication,this.sendLocation=Cc.sendLocation,this.showToast=qu.showToast,this.hideKeyboard=qu.hideKeyboard,this.openPhone=qu.openPhone,this.openSMS=qu.openSMS,this.viewOAQr=xc.viewOAQr,this.keepScreen=qu.keepScreen,this.saveImageToPhotosAlbum=Rc.saveImageToPhotosAlbum,this.openMiniApp=Tc.openMiniApp,this.vibrate=qu.vibrate,this.openWebview=Tc.openWebview,this.getRouteParams=Ic.getRouteParams,this.getAppInfo=Uu.getAppInfo,this.sendDataToPreviousMiniApp=Ic.sendDataToPreviousMiniApp,this.onCallbackData=Ic.onCallbackData,this.getPhoneNumber=Oc.getPhoneNumber,this.openProfilePicker=xc.openProfilePicker,fc.set(this,xc.getActionsSupported),this.connectWifi=qu.connectWifi,this.openMediaPicker=xc.openMediaPicker,this.openOutApp=xc.openOutApp,this.closeLoading=Tc.closeLoading,i(this,tc,null),i(this,nc,null),i(this,rc,null),this.isShowNavBar=!0,i(this,ac,0),i(this,sc,0);const w="home"===(null===(t=null===(e=r(this,ec))||void 0===e?void 0:e.app)||void 0===t?void 0:t.leftButton)||"both"===(null===(o=null===(n=r(this,ec))||void 0===n?void 0:n.app)||void 0===o?void 0:o.leftButton)?Ys:Ks,b=new URL(location.href),E=s.isString(null===(u=null===(a=r(this,ec))||void 0===a?void 0:a.app)||void 0===u?void 0:u.headerColor)&&(null===(h=null===(l=null===(c=r(this,ec))||void 0===c?void 0:c.app)||void 0===l?void 0:l.headerColor)||void 0===h?void 0:h.length)>0?5:6,k="none"===(null===(d=null===(f=r(this,ec))||void 0===f?void 0:f.app)||void 0===d?void 0:d.leftButton)||"home"===(null===(v=null===(p=r(this,ec))||void 0===p?void 0:p.app)||void 0===v?void 0:v.leftButton)?Vs:$s;i(this,cc,{actionbarType:E,buttonType:k,dataConfig:{backgroundColor:(null===(_=null===(g=r(this,ec))||void 0===g?void 0:g.app)||void 0===_?void 0:_.headerColor)||"",textColor:(null===(y=null===(m=r(this,ec))||void 0===m?void 0:m.app)||void 0===y?void 0:y.textColor)||"",viewInLeftType:k,confirmToExit:1},homeConfig:{enable:w,url:`https://h5.zdn.vn/zapps/${this.getAppId()}/${b.search}`}})}static getInstance(){return Nc.instance||(Nc.instance=new Nc),Nc.instance}getLoginStatus(){return s.isString(r(this,rc))&&r(this,rc).length>0}getAppId(){return r(this,Xu)}getZAppId(){return r(this,Qu)}login(e){return n(this,void 0,void 0,(function*(){const e=yield r(this,lc).call(this),t=e.find((e=>e.name===Cs)),n=e.find((e=>e.name===xs));if(!s.isUndefined(t)&&!s.isNull(t)&&s.isString(t.value)){if(i(this,tc,t.value),s.isUndefined(n)||s.isNull(n)||!s.isString(n.value)?yield this.loginZaloV3():(i(this,nc,n.value),yield this.loginZaloV4()),!r(this,rc))throw ru.loginFailed();return r(this,rc)}throw ru.loginFailed()}))}loginZaloV3(){return n(this,void 0,void 0,(function*(){return yield bs.get(Ps,{params:{app_id:r(this,Qu),redirect_uri:`https://h5.zdn.vn/zapps/${r(this,Xu)}/`,code:r(this,tc),isSDK:!0}}).then((e=>{let t=e.data;if(t.access_token){i(this,rc,t.access_token);const e=1e3*parseInt(t.expires_in);return i(this,sc,e),i(this,ac,(new Date).getTime()),this.setZAccSession(r(this,rc)||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(r(this,rc)||""),r(this,rc)}return null}))}))}loginZaloV4(){return n(this,void 0,void 0,(function*(){const e=new URLSearchParams;e.append("app_id",r(this,Xu)),e.append("code",r(this,tc)||""),e.append("code_verifier",r(this,nc)||""),s.isNull(r(this,ic))?e.append("grant_type","authorization_code"):(e.append("grant_type","refresh_token"),e.append("refresh_token",r(this,ic)||""));return yield bs.post(Ns,e,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((e=>{const t=e.data;if(t.refresh_token&&i(this,ic,t.refresh_token),t.access_token){i(this,rc,t.access_token);const e=1e3*parseInt(t.expires_in);return i(this,sc,e),i(this,ac,(new Date).getTime()),this.setZAccSession(r(this,rc)||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(r(this,rc)||""),r(this,rc)}return null}))}))}getAccessToken(e){return n(this,void 0,void 0,(function*(){const e=(new Date).getTime()-r(this,ac);if(!r(this,rc))throw ru.loginRequired();return e<r(this,sc)?r(this,rc):yield this.login()}))}}Qu=new WeakMap,Xu=new WeakMap,ec=new WeakMap,tc=new WeakMap,nc=new WeakMap,rc=new WeakMap,ic=new WeakMap,oc=new WeakMap,ac=new WeakMap,sc=new WeakMap,uc=new WeakMap,cc=new WeakMap,lc=new WeakMap,hc=new WeakMap,fc=new WeakMap;class Pc{constructor(){dc.set(this,Ss),pc.set(this,Ts),vc.set(this,"DEFAULT ZOAUTH"),gc.set(this,"DEFAULT ACCESS TOKEN"),_c.set(this,{timer:{getToken:0}}),mc.set(this,!1),this.getLoginStatus=()=>r(this,mc),this.getAppId=()=>r(this,dc),this.login=()=>(i(this,mc,!0),Promise.resolve(r(this,vc))),this.getAccessToken=()=>Promise.resolve(r(this,gc)),this.getVersion=Uu.getVersion,this.getSystemInfo=Uu.getSystemInfo,this.setNavigationBarTitle=()=>Promise.resolve(),this.setNavigationBarColor=()=>Promise.resolve(),this.setBackgroundColor=()=>Promise.resolve(),this.setNavigationBarLeftButton=()=>Promise.resolve(),this.setDeviceOrientation=()=>Promise.resolve(),this.setStorage=e=>n(this,void 0,void 0,(function*(){const t=new kc(this.getAppId());return yield t.putDataToStorage(e.data),{errorKeys:[]}})),this.getStorage=e=>n(this,void 0,void 0,(function*(){const t=new kc(this.getAppId());return yield t.getDataFromStorage(e.keys)})),this.getStorageInfo=e=>n(this,void 0,void 0,(function*(){const e=new kc(this.getAppId());return yield e.getStorageInfo()})),this.removeStorage=e=>n(this,void 0,void 0,(function*(){const t=new kc(this.getAppId());return yield t.removeDataFromStorage(e.keys)})),this.clearStorage=e=>n(this,void 0,void 0,(function*(){const e=new kc(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=Ic.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:""})),this.openProfilePicker=()=>(console.warn("This api only works on zalo app"),Promise.resolve([])),this.connectWifi=()=>(console.warn("This api only works on zalo app"),Promise.resolve()),this.openOutApp=e=>(location.href=e,Promise.resolve()),this.closeLoading=e=>Promise.resolve()}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.")}openMediaPicker(e,t,n,r){return console.warn("This api only works on zalo app"),Promise.resolve({urls:[]})}}dc=new WeakMap,pc=new WeakMap,vc=new WeakMap,gc=new WeakMap,_c=new WeakMap,mc=new WeakMap,function(e){!function(t){var n="object"==typeof o?o:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(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===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),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 V&&V.env&&"true"===V.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?te():Map,f=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(!q(e))throw new TypeError;if(!G(t))throw new TypeError;return A(e,t)}if(!q(e))throw new TypeError;if(!D(t))throw new TypeError;if(!D(r)&&!B(r)&&!j(r))throw new TypeError;return j(r)&&(r=void 0),S(e,t,n=Z(n),r)}function v(e,t){function n(n,r){if(!D(n))throw new TypeError;if(!B(r)&&!$(r))throw new TypeError;I(e,t,n,r)}return n}function g(e,t,n,r){if(!D(n))throw new TypeError;return B(r)||(r=Z(r)),I(e,t,n,r)}function _(e,t,n){if(!D(t))throw new TypeError;return B(n)||(n=Z(n)),T(e,t,n)}function m(e,t,n){if(!D(t))throw new TypeError;return B(n)||(n=Z(n)),C(e,t,n)}function y(e,t,n){if(!D(t))throw new TypeError;return B(n)||(n=Z(n)),R(e,t,n)}function w(e,t,n){if(!D(t))throw new TypeError;return B(n)||(n=Z(n)),x(e,t,n)}function b(e,t){if(!D(e))throw new TypeError;return B(t)||(t=Z(t)),N(e,t)}function E(e,t){if(!D(e))throw new TypeError;return B(t)||(t=Z(t)),P(e,t)}function k(e,t,n){if(!D(t))throw new TypeError;B(n)||(n=Z(n));var r=O(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)&&!j(r)){if(!G(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)&&!j(o)){if(!D(o))throw new TypeError;r=o}}return r}function O(e,t,n){var r=d.get(e);if(B(r)){if(!n)return;r=new h,d.set(e,r)}var i=r.get(t);if(B(i)){if(!n)return;i=new h,r.set(t,i)}return i}function T(e,t,n){if(C(e,t,n))return!0;var r=ee(t);return!j(r)&&T(e,r,n)}function C(e,t,n){var r=O(t,n,!1);return!B(r)&&F(r.has(e))}function R(e,t,n){if(C(e,t,n))return x(e,t,n);var r=ee(t);return j(r)?void 0:R(e,r,n)}function x(e,t,n){var r=O(t,n,!1);if(!B(r))return r.get(e)}function I(e,t,n,r){O(n,r,!0).set(e,t)}function N(e,t){var n=P(e,t),r=ee(e);if(null===r)return n;var i=N(r,t);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 P(e,t){var n=[],r=O(e,t,!1);if(B(r))return n;for(var i=K(r.keys()),o=0;;){var a=Q(i);if(!a)return n.length=o,n;var s=J(a);try{n[o]=s}catch(e){try{X(i)}finally{throw e}}o++}}function L(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 j(e){return null===e}function M(e){return"symbol"==typeof e}function D(e){return"object"==typeof e?null!==e:"function"==typeof e}function U(e,t){switch(L(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=Y(e,r);if(void 0!==i){var o=i.call(e,n);if(D(o))throw new TypeError;return o}return z(e,"default"===n?"number":n)}function z(e,t){if("string"===t){var n=e.toString;if(H(n))if(!D(i=n.call(e)))return i;if(H(r=e.valueOf))if(!D(i=r.call(e)))return i}else{var r;if(H(r=e.valueOf))if(!D(i=r.call(e)))return i;var i,o=e.toString;if(H(o))if(!D(i=o.call(e)))return i}throw new TypeError}function F(e){return!!e}function W(e){return""+e}function Z(e){var t=U(e,3);return M(t)?t:W(t)}function q(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 G(e){return"function"==typeof e}function $(e){switch(L(e)){case 3:case 4:return!0;default:return!1}}function Y(e,t){var n=e[t];if(null!=n){if(!H(n))throw new TypeError;return n}}function K(e){var t=Y(e,i);if(!H(t))throw new TypeError;var n=t.call(e);if(!D(n))throw new TypeError;return n}function J(e){return e.value}function Q(e){var t=e.next();return!t.done&&t}function X(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 h}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",E),e("deleteMetadata",k)}(r)}()}(yc||(yc={}));const Lc=Symbol("required"),Bc=Symbol("checkType"),jc=(e,t)=>(n,r,i)=>{let o=Reflect.getOwnMetadata(Lc,n,r)||[];o.push({parameterIndex:i,fields:e,option:t}),Reflect.defineMetadata(Lc,o,n,r)},Mc=(e,t,n)=>(r,i,o)=>{let a=Reflect.getOwnMetadata(Bc,r,i)||[];a.push({parameterIndex:o,type:e,properties:t,defaultValue:n}),Reflect.defineMetadata(Bc,a,r,i)};const Dc=(e,t,n)=>{const r=n.value,i=r.toString().match(/\(.*?\)/)[0].replace(/[()]/gi,"").replace(/\s/gi,"").split(",");return n.value=function(){const n=Reflect.getOwnMetadata(Lc,e,t),o=Reflect.getOwnMetadata(Bc,e,t);return o&&o.forEach((e=>{const{parameterIndex:t,type:n,properties:r,defaultValue:o}=e;let a=arguments[t],u=i[t];const c=typeof a;if(!s.isUndefined(a)){if(!pu(a,n))throw ru.wrongTypeParam(u,n,Array.isArray(a)?"array":null===a?"null":c);"object"===n&&Object.entries(r).forEach((([e,n])=>{const r=e.split("?")[0],i=s.get(a,r);if(s.isUndefined(i)||s.isNull(i)){if(!e.includes("?"))throw ru.missingParam(e);s.isObject(s.get(a,r.split(".")[0]))&&o&&!s.isUndefined(s.get(o,r))&&s.set(arguments[t],r,s.get(o,r))}else if(s.isFunction(n)){const e=n(i);if(e&&e.error)throw ru.wrongTypeParam(`${u}.${r}`,e.errorMessage,typeof i)}}))}})),n&&n.forEach((e=>{const{parameterIndex:t,option:n,fields:r}=e,i=arguments[t],o=null==n?void 0:n.if,a=null==n?void 0:n.defaultValue;let u=!0;o&&(u=Object.keys(o).every((e=>s.get(i,e)===o[e]))),u&&r.forEach((e=>{if(s.isEmpty(s.get(i,e))){if(s.isUndefined(s.get(a,e)))throw ru.missingParam(e);s.set(arguments[t],e,s.get(a,e))}}))})),r.apply(this,arguments)},n};var Uc;class zc{constructor(){this.events=Su.getInstance(),Uc.set(this,void 0),i(this,Uc,this.getServiceInstance()),this.events.addListener=(e,t,n)=>{const r=e;return this.events.addListener(exports.Events[r],t,n)}}login(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).login(e)}))}getLoginStatus(){return r(this,Uc).getLoginStatus()}getAccessToken(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getAccessToken(e)}))}getVersion(){return r(this,Uc).getVersion()}getSystemInfo(){return r(this,Uc).getSystemInfo()}setNavigationBarTitle(e){return n(this,void 0,void 0,(function*(){return r(this,Uc).setNavigationBarTitle(e)}))}setNavigationBarColor(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).setNavigationBarColor(e)}))}setBackgroundColor(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).setBackgroundColor(e)}))}setNavigationBarLeftButton(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).setNavigationBarLeftButton(e)}))}setDeviceOrientation(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).setDeviceOrientation(e)}))}setStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).setStorage(e)}))}getStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getStorage(e)}))}getStorageInfo(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getStorageInfo(e)}))}removeStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).removeStorage(e)}))}clearStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).clearStorage(e)}))}getUserInfo(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getUserInfo(e)}))}getNetworkType(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getNetworkType(e)}))}onNetworkStatusChange(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).onNetworkStatusChange(e)}))}startBeaconDiscovery(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).startBeaconDiscovery(e)}))}stopBeaconDiscovery(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).stopBeaconDiscovery(e)}))}getBeacons(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getBeacons(e)}))}closeApp(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).closeApp(e)}))}getLocation(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getLocation(e)}))}stopBluetoothDevicesDiscovery(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).stopBluetoothDevicesDiscovery()}))}startBluetoothDevicesDiscovery(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).startBluetoothDevicesDiscovery(e)}))}openBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).openBluetoothAdapter()}))}onBluetoothDeviceFound(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).onBluetoothDeviceFound()}))}onBluetoothAdapterStateChange(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).onBluetoothAdapterStateChange()}))}getConnectedBluetoothDevices(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getConnectedBluetoothDevices(e)}))}getBluetoothDevices(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getBluetoothDevices()}))}getBluetoothAdapterState(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getBluetoothAdapterState()}))}closeBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).closeBluetoothAdapter()}))}scanQRCode(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).scanQRCode(e)}))}openProfile(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).openProfile(e)}))}openChat(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).openChat(e)}))}openPostFeed(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).openPostFeed(e)}))}followOA(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).followOA(e)}))}unfollowOA(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).unFollowOA(e)}))}openShareSheet(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).openShareSheet(e)}))}requestCameraPermission(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).requestCameraPermission(e)}))}createShortcut(e){return n(this,void 0,void 0,(function*(){const t=yield ku(Os,0),n=lu().isIOS,i=t.logoUrl||hu("og:image:url")||"",o=t.name||document.title,a=e.params?new URLSearchParams(e.params):new URLSearchParams;if(n){a.append("appId",Os),a.append("appName",o),a.append("appIcon",i);const e=`https://mini.zalo.me/shortcut.html?${a.toString()}`;yield r(this,Uc).openOutApp(encodeURI(e))}else yield r(this,Uc).createShortcut(`https://zalo.me/app/link/zapps/${Os}/?${a.toString()}`,o,i);return nu()}))}openBioAuthentication(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).openBioAuthentication(e)}))}checkStateBioAuthentication(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).checkStateBioAuthentication(e)}))}sendLocation(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).sendLocation(e)}))}showToast(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).showToast(e)}))}hideKeyboard(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).hideKeyboard(e)}))}openPhone(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).openPhone(e)}))}openSMS(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).openSMS(e)}))}viewOAQr(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).viewOAQr(e)}))}keepScreen(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).keepScreen(e)}))}saveImageToGallery(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).saveImageToPhotosAlbum(e)}))}saveImageToPhotosAlbum(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).saveImageToPhotosAlbum(e)}))}openMiniApp(e){return n(this,void 0,void 0,(function*(){if(!s.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 r(this,Uc).openMiniApp(e)}))}vibrate(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).vibrate(e)}))}openWebview(e){return n(this,void 0,void 0,(function*(){yield r(this,Uc).openWebview(e)}))}getRouteParams(){return r(this,Uc).getRouteParams()}getAppInfo(e){return r(this,Uc).getAppInfo()}sendDataToPreviousMiniApp(e){return r(this,Uc).sendDataToPreviousMiniApp(e)}onCallbackData(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).onCallbackData(e)}))}getPhoneNumber(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).getPhoneNumber()}))}openProfilePicker(e){return n(this,void 0,void 0,(function*(){const t=yield r(this,Uc).openProfilePicker(e.maxProfile);let n;if(t.length>0)try{const e=yield this.getAccessToken(),r=(yield bs.post(Ls,{fields:"id,name,picture",user_ids:t},{headers:{"Content-Type":"application/json",access_token:e}})).data;if(0!==r.error||!r.data)throw new Error(r.message);n=t.map((e=>{var t,n,i,o,a,u,c,l,h;return{id:e,profile:{name:null===(n=null===(t=r.data[e])||void 0===t?void 0:t.user_info)||void 0===n?void 0:n.name,avatar:null===(u=null===(a=null===(o=null===(i=r.data[e])||void 0===i?void 0:i.user_info)||void 0===o?void 0:o.picture)||void 0===a?void 0:a.data)||void 0===u?void 0:u.url},code:0!==(null===(c=r.data[e])||void 0===c?void 0:c.error)?-1:0,message:`Get profile: ${s.isUndefined(null===(l=r.data[e])||void 0===l?void 0:l.message)?"Unknown error":null===(h=r.data[e])||void 0===h?void 0:h.message}`}}))}catch(e){n=t.map((t=>({id:t,profile:{name:"",avatar:""},code:-1,message:`Can't get profile: ${e.message}`})))}return{users:n||[]}}))}connectWifi(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).connectWifi(e)}))}openMediaPicker(e){var t,i,o;return n(this,void 0,void 0,(function*(){const n={};s.isUndefined(null===(t=e.editView)||void 0===t?void 0:t.enable)||(null===(i=e.editView)||void 0===i?void 0:i.enable)?n.enable=1:n.enable=0,n.aspect_ratio=null===(o=e.editView)||void 0===o?void 0:o.aspectRatio;const a=!0===e.silentRequest?1:0,u=e.maxSelectItem;return yield r(this,Uc).openMediaPicker(e.type,n,a,u)}))}getShareableLink(e){return n(this,void 0,void 0,(function*(){const t=yield this.getAccessToken();return(yield bu(window.APP_ID,t||"",e.title,e.description,e.thumbnail,e.path)).shareableLink}))}closeLoading(e){return n(this,void 0,void 0,(function*(){return yield r(this,Uc).closeLoading("user action")}))}}Uc=new WeakMap,e([eu],zc.prototype,"login",null),e([tu],zc.prototype,"getLoginStatus",null),e([eu],zc.prototype,"getAccessToken",null),e([tu],zc.prototype,"getVersion",null),e([tu],zc.prototype,"getSystemInfo",null),e([eu,Dc,t(0,Mc("object",{title:Eu("string")}))],zc.prototype,"setNavigationBarTitle",null),e([eu,Dc,t(0,Mc("object",{color:Eu("string"),"textColor?":Eu("string",{values:["white","black"]}),"statusBarColor?":Eu("string")}))],zc.prototype,"setNavigationBarColor",null),e([eu,Dc,t(0,Mc("object",{backgroundColor:Eu("string"),"textColor?":Eu("string",{values:["white","black"]})}))],zc.prototype,"setBackgroundColor",null),e([eu,Dc,t(0,Mc("object",{type:Eu("string",{values:["none","back","home","both"]})}))],zc.prototype,"setNavigationBarLeftButton",null),e([eu,Dc,t(0,Mc("object",{rotate:Eu("string",{values:["auto","portrait","landscape"]})}))],zc.prototype,"setDeviceOrientation",null),e([eu,Dc,t(0,Mc("object",{data:Eu("object")}))],zc.prototype,"setStorage",null),e([eu,Dc,t(0,Mc("object",{keys:Eu("array<string>")}))],zc.prototype,"getStorage",null),e([eu],zc.prototype,"getStorageInfo",null),e([eu,Dc,t(0,Mc("object",{keys:Eu("array<string>")}))],zc.prototype,"removeStorage",null),e([eu],zc.prototype,"clearStorage",null),e([eu,Dc,t(0,Mc("object",{"avatarType?":Eu("string",{values:["small","normal","large"]})}))],zc.prototype,"getUserInfo",null),e([eu],zc.prototype,"getNetworkType",null),e([eu],zc.prototype,"onNetworkStatusChange",null),e([eu],zc.prototype,"startBeaconDiscovery",null),e([eu],zc.prototype,"stopBeaconDiscovery",null),e([eu],zc.prototype,"getBeacons",null),e([eu],zc.prototype,"closeApp",null),e([eu],zc.prototype,"getLocation",null),e([eu],zc.prototype,"stopBluetoothDevicesDiscovery",null),e([eu],zc.prototype,"startBluetoothDevicesDiscovery",null),e([eu],zc.prototype,"openBluetoothAdapter",null),e([eu],zc.prototype,"onBluetoothDeviceFound",null),e([eu],zc.prototype,"onBluetoothAdapterStateChange",null),e([eu],zc.prototype,"getConnectedBluetoothDevices",null),e([eu],zc.prototype,"getBluetoothDevices",null),e([eu],zc.prototype,"getBluetoothAdapterState",null),e([eu],zc.prototype,"closeBluetoothAdapter",null),e([eu],zc.prototype,"scanQRCode",null),e([eu,Dc,t(0,Mc("object",{type:Eu("string",{values:["user","oa","aliasOA"]}),id:Eu("string")}))],zc.prototype,"openProfile",null),e([eu,Dc,t(0,Mc("object",{type:Eu("string",{values:["user","oa"]}),id:Eu("string")}))],zc.prototype,"openChat",null),e([eu,Dc,t(0,jc(["data.imageUrl"],{if:{type:"image"}})),t(0,jc(["data.link"],{if:{type:"link"}})),t(0,jc(["data.id"],{if:{type:"profile"}})),t(0,Mc("object",{type:Eu("string",{values:["image","link","profile"]}),data:Eu("object"),"data.imageUrl?":Eu("url"),"data.link?":Eu("url"),"data.title?":Eu("string"),"data.thumb?":Eu("url"),"data.description?":Eu("string"),"data.avatar?":Eu("url"),"data.id?":Eu("string"),"data.displayName?":Eu("string")}))],zc.prototype,"openPostFeed",null),e([eu,Dc,t(0,Mc("object",{id:Eu("string"),"showDialogConfirm?":Eu("boolean")}))],zc.prototype,"followOA",null),e([eu,Dc,t(0,Mc("object",{id:Eu("string")}))],zc.prototype,"unfollowOA",null),e([eu,Dc,t(0,jc(["data.imageUrl"],{if:{type:"image"}})),t(0,jc(["data.link"],{if:{type:"link"}})),t(0,jc(["data.id"],{if:{type:"oa"}})),t(0,jc(["data.gifUrl"],{if:{type:"gif"}})),t(0,jc(["data.videoThumb","data.videoUrl"],{if:{type:"video"}})),t(0,jc(["data.thumbnail","data.title","data.description"],{if:{type:"zmp"},defaultValue:{data:{description:""}}})),t(0,Mc("object",{type:Eu("string",{values:["image","gif","video","link","oa","zmp"]}),data:Eu("object"),"data.imageUrl?":Eu("url"),"data.gifUrl?":Eu("url"),"data.width?":Eu("number"),"data.height?":Eu("number"),"data.videoThumb?":Eu("url"),"data.videoUrl?":Eu("url"),"data.link?":Eu("url"),"data.chatOnly?":Eu("boolean"),"data.id?":Eu("string"),"data.thumbnail?":Eu("url"),"data.path?":Eu("string"),"data.title?":Eu("string",{maxLength:100}),"data.description?":Eu(["string"],{maxLength:400})}))],zc.prototype,"openShareSheet",null),e([eu],zc.prototype,"requestCameraPermission",null),e([eu],zc.prototype,"createShortcut",null),e([eu,Dc,t(0,Mc("object",{secretData:Eu("string"),"ui?":Eu("object"),"ui.title?":Eu("string"),"ui.subTitle?":Eu("string"),"ui.negativeButtonText?":Eu("string"),"requireFingerprint?":Eu("boolean")},{requireFingerprint:!0,ui:{title:"Xác thực",subTitle:"Sử dụng sinh trắc học của bạn để xác thực",negativeButtonText:"Đóng"}}))],zc.prototype,"openBioAuthentication",null),e([eu],zc.prototype,"checkStateBioAuthentication",null),e([eu,Dc,t(0,Mc("object",{toUserId:Eu("string"),"title?":Eu("string")}))],zc.prototype,"sendLocation",null),e([eu,Dc,t(0,Mc("object",{message:Eu("string")}))],zc.prototype,"showToast",null),e([eu],zc.prototype,"hideKeyboard",null),e([eu,Dc,t(0,Mc("object",{phoneNumber:Eu("string")}))],zc.prototype,"openPhone",null),e([eu,Dc,t(0,Mc("object",{content:Eu("string"),phoneNumber:Eu("string",{regex:/^\+?\d+$/})}))],zc.prototype,"openSMS",null),e([eu,Dc,t(0,Mc("object",{id:Eu("string"),"displayName?":Eu("string")},{displayName:""}))],zc.prototype,"viewOAQr",null),e([eu],zc.prototype,"keepScreen",null),e([eu,Dc,t(0,Mc("object",{"imageBase64Data?":Eu("string"),"imageUrl?":Eu("url")}))],zc.prototype,"saveImageToGallery",null),e([eu,Dc,t(0,Mc("object",{"imageBase64Data?":Eu("string"),"imageUrl?":Eu("url")}))],zc.prototype,"saveImageToPhotosAlbum",null),e([eu,Dc,t(0,Mc("object",{appId:Eu("string"),"params?":Eu("object")}))],zc.prototype,"openMiniApp",null),e([eu,Dc,t(0,Mc("object",{"type?":Eu("string",{values:["oneShot"]}),"milliseconds?":Eu("number")},{type:"oneShot",milliseconds:500}))],zc.prototype,"vibrate",null),e([eu,Dc,t(0,Mc("object",{url:Eu("string")}))],zc.prototype,"openWebview",null),e([tu],zc.prototype,"getRouteParams",null),e([eu],zc.prototype,"getAppInfo",null),e([eu],zc.prototype,"sendDataToPreviousMiniApp",null),e([eu],zc.prototype,"onCallbackData",null),e([eu],zc.prototype,"getPhoneNumber",null),e([eu,Dc,t(0,Mc("object",{"maxProfile?":Eu("number",{min:1,max:10})},{maxProfile:1}))],zc.prototype,"openProfilePicker",null),e([eu,Dc,t(0,jc(["SSID"])),t(0,Mc("object",{SSID:Eu("string"),"password?":Eu("string"),"hiddenSSID?":Eu("boolean")}))],zc.prototype,"connectWifi",null),e([eu,Dc,t(0,Mc("object",{type:Eu("string",{values:["photo","video","file","multi_photo","multi_video"]}),"editView?":Eu("object"),"editView.enable?":Eu("boolean"),"editView.aspectRatio?":Eu("string",{regex:/^\d+:\d+$/}),"silentRequest?":Eu("boolean"),"maxSelectItem?":Eu("number",{min:1})}))],zc.prototype,"openMediaPicker",null),e([eu,Dc,t(0,Mc("object",{title:Eu("string",{maxLength:100}),"thumbnail?":Eu("url"),"path?":Eu("url"),description:Eu(["string"],{maxLength:400})},{description:""}))],zc.prototype,"getShareableLink",null),e([eu,Dc],zc.prototype,"closeLoading",null);class Fc extends zc{getServiceInstance(){return Nc.getInstance()}}class Wc extends zc{getServiceInstance(){return new Pc}}const Zc=lu();exports.default=void 0,window.onJSCall=e=>function(t){Nu.getInstance().onJSCall(e,t)},window.onMultiJSCall=e=>function(t){Nu.getInstance().onMultiJSCall(e,t)};const qc=window.zaloJSV2.zalo_h5_event_handler;window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){qc(e,t,n),Nu.getInstance().nativeEventHandler(e,t,n)}},Zc.isZalo?exports.default=new Fc:exports.default=new Wc,window.ZaloMiniAppSDK=exports.default,exports.SDKCreator=zc,exports.default=exports.default;
|
|
16
|
+
function e(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 t(e,t){return function(n,r){t(n,r,e)}}function n(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 r(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function i(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e,t){return e(t={exports:{}},t.exports),t.exports}var s=a((function(e,t){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,u=32,c=64,l=128,f=256,p=1/0,h=9007199254740991,d=NaN,v=4294967295,g=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",u],["partialRight",c],["rearg",f]],m="[object Arguments]",_="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",E="[object Function]",A="[object GeneratorFunction]",C="[object Map]",S="[object Number]",T="[object Object]",O="[object Promise]",N="[object RegExp]",k="[object Set]",I="[object String]",P="[object Symbol]",R="[object WeakMap]",x="[object ArrayBuffer]",B="[object DataView]",D="[object Float32Array]",j="[object Float64Array]",L="[object Int8Array]",U="[object Int16Array]",M="[object Int32Array]",F="[object Uint8Array]",z="[object Uint8ClampedArray]",W="[object Uint16Array]",H="[object Uint32Array]",$=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,Z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,J=RegExp(V.source),K=RegExp(q.source),Q=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\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]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Ne="\\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",ke="['’]",Ie="[\\ud800-\\udfff]",Pe="["+Ne+"]",Re="["+Ae+"]",xe="\\d+",Be="[\\u2700-\\u27bf]",De="["+Se+"]",je="[^\\ud800-\\udfff"+Ne+xe+Ce+Se+Te+"]",Le="\\ud83c[\\udffb-\\udfff]",Ue="[^\\ud800-\\udfff]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",ze="["+Te+"]",We="(?:"+De+"|"+je+")",He="(?:"+ze+"|"+je+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",Ge="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Re+"|"+Le+")"+"?",Ve="[\\ufe0e\\ufe0f]?",qe=Ve+Ze+("(?:\\u200d(?:"+[Ue,Me,Fe].join("|")+")"+Ve+Ze+")*"),Je="(?:"+[Be,Me,Fe].join("|")+")"+qe,Ke="(?:"+[Ue+Re+"?",Re,Me,Fe,Ie].join("|")+")",Qe=RegExp(ke,"g"),Ye=RegExp(Re,"g"),Xe=RegExp(Le+"(?="+Le+")|"+Ke+qe,"g"),et=RegExp([ze+"?"+De+"+"+$e+"(?="+[Pe,ze,"$"].join("|")+")",He+"+"+Ge+"(?="+[Pe,ze+We,"$"].join("|")+")",ze+"?"+We+"+"+$e,ze+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xe,Je].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+Ae+Oe+"]"),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[D]=ot[j]=ot[L]=ot[U]=ot[M]=ot[F]=ot[z]=ot[W]=ot[H]=!0,ot[m]=ot[_]=ot[x]=ot[y]=ot[B]=ot[w]=ot[b]=ot[E]=ot[C]=ot[S]=ot[T]=ot[N]=ot[k]=ot[I]=ot[R]=!1;var at={};at[m]=at[_]=at[x]=at[B]=at[y]=at[w]=at[D]=at[j]=at[L]=at[U]=at[M]=at[C]=at[S]=at[T]=at[N]=at[k]=at[I]=at[P]=at[F]=at[z]=at[W]=at[H]=!0,at[b]=at[E]=at[R]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,lt="object"==typeof o&&o&&o.Object===Object&&o,ft="object"==typeof self&&self&&self.Object===Object&&self,pt=lt||ft||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,vt=dt&&dt.exports===ht,gt=vt&<.process,mt=function(){try{var e=dt&&dt.require&&dt.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),_t=mt&&mt.isArrayBuffer,yt=mt&&mt.isDate,wt=mt&&mt.isMap,bt=mt&&mt.isRegExp,Et=mt&&mt.isSet,At=mt&&mt.isTypedArray;function Ct(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 Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ot(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Nt(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 kt(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 It(e,t){return!!(null==e?0:e.length)&&Ft(e,t,0)>-1}function Pt(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 Rt(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 xt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Bt(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 Dt(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 jt(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 Lt=$t("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 Mt(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 Ft(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):Mt(e,Wt,n)}function zt(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Wt(e){return e!=e}function Ht(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:d}function $t(e){return function(t){return null==t?n:t[e]}}function Gt(e){return function(t){return null==e?n:e[t]}}function Zt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Vt(e,t){for(var r,i=-1,o=e.length;++i<o;){var a=t(e[i]);a!==n&&(r=r===n?a:r+a)}return r}function qt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e?e.slice(0,dn(e)+1).replace(oe,""):e}function Kt(e){return function(t){return e(t)}}function Qt(e,t){return Rt(t,(function(t){return e[t]}))}function Yt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Ft(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=Gt({"À":"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=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});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 pn(e){return an(e)?function(e){var t=Xe.lastIndex=0;for(;Xe.test(e);)++t;return t}(e):Lt(e)}function hn(e){return an(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function dn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var vn=Gt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gn=function e(t){var o,ae=(t=null==t?pt:gn.defaults(pt.Object(),t,gn.pick(pt,rt))).Array,Ae=t.Date,Ce=t.Error,Se=t.Function,Te=t.Math,Oe=t.Object,Ne=t.RegExp,ke=t.String,Ie=t.TypeError,Pe=ae.prototype,Re=Se.prototype,xe=Oe.prototype,Be=t["__core-js_shared__"],De=Re.toString,je=xe.hasOwnProperty,Le=0,Ue=(o=/[^.]+$/.exec(Be&&Be.keys&&Be.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",Me=xe.toString,Fe=De.call(Oe),ze=pt._,We=Ne("^"+De.call(je).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=vt?t.Buffer:n,$e=t.Symbol,Ge=t.Uint8Array,Ze=He?He.allocUnsafe:n,Ve=un(Oe.getPrototypeOf,Oe),qe=Oe.create,Je=xe.propertyIsEnumerable,Ke=Pe.splice,Xe=$e?$e.isConcatSpreadable:n,tt=$e?$e.iterator:n,st=$e?$e.toStringTag:n,lt=function(){try{var e=ho(Oe,"defineProperty");return e({},"",{}),e}catch(e){}}(),ft=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=Ae&&Ae.now!==pt.Date.now&&Ae.now,dt=t.setTimeout!==pt.setTimeout&&t.setTimeout,gt=Te.ceil,mt=Te.floor,Lt=Oe.getOwnPropertySymbols,Gt=He?He.isBuffer:n,mn=t.isFinite,_n=Pe.join,yn=un(Oe.keys,Oe),wn=Te.max,bn=Te.min,En=Ae.now,An=t.parseInt,Cn=Te.random,Sn=Pe.reverse,Tn=ho(t,"DataView"),On=ho(t,"Map"),Nn=ho(t,"Promise"),kn=ho(t,"Set"),In=ho(t,"WeakMap"),Pn=ho(Oe,"create"),Rn=In&&new In,xn={},Bn=zo(Tn),Dn=zo(On),jn=zo(Nn),Ln=zo(kn),Un=zo(In),Mn=$e?$e.prototype:n,Fn=Mn?Mn.valueOf:n,zn=Mn?Mn.toString:n;function Wn(e){if(is(e)&&!Va(e)&&!(e instanceof Zn)){if(e instanceof Gn)return e;if(je.call(e,"__wrapped__"))return Wo(e)}return new Gn(e)}var Hn=function(){function e(){}return function(t){if(!rs(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function $n(){}function Gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Zn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Vn(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 qn(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.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Jn;++t<n;)this.add(e[t])}function Qn(e){var t=this.__data__=new qn(e);this.size=t.size}function Yn(e,t){var n=Va(e),r=!n&&Za(e),i=!n&&!r&&Qa(e),o=!n&&!r&&!i&&ps(e),a=n||r||i||o,s=a?qt(e.length,ke):[],u=s.length;for(var c in e)!t&&!je.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 Xn(e){var t=e.length;return t?e[Kr(0,t-1)]:n}function er(e,t){return Uo(Pi(e),cr(t,0,e.length))}function tr(e){return Uo(Pi(e))}function nr(e,t,r){(r!==n&&!Ha(e[t],r)||r===n&&!(t in e))&&sr(e,t,r)}function rr(e,t,r){var i=e[t];je.call(e,t)&&Ha(i,r)&&(r!==n||t in e)||sr(e,t,r)}function ir(e,t){for(var n=e.length;n--;)if(Ha(e[n][0],t))return n;return-1}function or(e,t,n,r){return dr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ar(e,t){return e&&Ri(t,Bs(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 r=-1,i=t.length,o=ae(i),a=null==e;++r<i;)o[r]=a?n:ks(e,t[r]);return o}function cr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function lr(e,t,r,i,o,a){var s,u=1&t,c=2&t,l=4&t;if(r&&(s=o?r(e,i,o,a):r(e)),s!==n)return s;if(!rs(e))return e;var f=Va(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Pi(e,s)}else{var p=mo(e),h=p==E||p==A;if(Qa(e))return Si(e,u);if(p==T||p==m||h&&!o){if(s=c||h?{}:yo(e),!u)return c?function(e,t){return Ri(e,go(e),t)}(e,function(e,t){return e&&Ri(t,Ds(t),e)}(s,e)):function(e,t){return Ri(e,vo(e),t)}(e,ar(s,e))}else{if(!at[p])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case x:return Ti(e);case y:case w:return new r(+e);case B:return function(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case j:case L:case U:case M:case F:case z:case W:case H:return Oi(e,n);case C:return new r;case S:case I:return new r(e);case N:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new r;case P:return i=e,Fn?Oe(Fn.call(i)):{}}var i}(e,p,u)}}a||(a=new Qn);var d=a.get(e);if(d)return d;a.set(e,s),cs(e)?e.forEach((function(n){s.add(lr(n,t,r,n,e,a))})):os(e)&&e.forEach((function(n,i){s.set(i,lr(n,t,r,i,e,a))}));var v=f?n:(l?c?ao:oo:c?Ds:Bs)(e);return Tt(v||e,(function(n,i){v&&(n=e[i=n]),rr(s,i,lr(n,t,r,i,e,a))})),s}function fr(e,t,r){var i=r.length;if(null==e)return!i;for(e=Oe(e);i--;){var o=r[i],a=t[o],s=e[o];if(s===n&&!(o in e)||!a(s))return!1}return!0}function pr(e,t,i){if("function"!=typeof e)throw new Ie(r);return Bo((function(){e.apply(n,i)}),t)}function hr(e,t,n,r){var i=-1,o=It,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Rt(t,Kt(n))),r?(o=Pt,a=!1):t.length>=200&&(o=Yt,a=!1,t=new Kn(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 p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,r)||u.push(l)}return u}Wn.templateSettings={escape:Q,evaluate:Y,interpolate:X,variable:"",imports:{_:Wn}},Wn.prototype=$n.prototype,Wn.prototype.constructor=Wn,Gn.prototype=Hn($n.prototype),Gn.prototype.constructor=Gn,Zn.prototype=Hn($n.prototype),Zn.prototype.constructor=Zn,Vn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(Pn){var r=t[e];return r===i?n:r}return je.call(t,e)?t[e]:n},Vn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==n:je.call(t,e)},Vn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pn&&t===n?i:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=ir(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},qn.prototype.get=function(e){var t=this.__data__,r=ir(t,e);return r<0?n:t[r][1]},qn.prototype.has=function(e){return ir(this.__data__,e)>-1},qn.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},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(On||qn),string:new Vn}},Jn.prototype.delete=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Jn.prototype.get=function(e){return fo(this,e).get(e)},Jn.prototype.has=function(e){return fo(this,e).has(e)},Jn.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},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,i),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new qn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(e,t),this.size=n.size,this};var dr=Di(Er),vr=Di(Ar,!0);function gr(e,t){var n=!0;return dr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mr(e,t,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],s=t(a);if(null!=s&&(u===n?s==s&&!fs(s):r(s,u)))var u=s,c=a}return c}function _r(e,t){var n=[];return dr(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):xt(i,s):r||(i[i.length]=s)}return i}var wr=ji(),br=ji(!0);function Er(e,t){return e&&wr(e,t,Bs)}function Ar(e,t){return e&&br(e,t,Bs)}function Cr(e,t){return kt(t,(function(t){return es(e[t])}))}function Sr(e,t){for(var r=0,i=(t=bi(t,e)).length;null!=e&&r<i;)e=e[Fo(t[r++])];return r&&r==i?e:n}function Tr(e,t,n){var r=t(e);return Va(e)?r:xt(r,n(e))}function Or(e){return null==e?e===n?"[object Undefined]":"[object Null]":st&&st in Oe(e)?function(e){var t=je.call(e,st),r=e[st];try{e[st]=n;var i=!0}catch(e){}var o=Me.call(e);i&&(t?e[st]=r:delete e[st]);return o}(e):function(e){return Me.call(e)}(e)}function Nr(e,t){return e>t}function kr(e,t){return null!=e&&je.call(e,t)}function Ir(e,t){return null!=e&&t in Oe(e)}function Pr(e,t,r){for(var i=r?Pt:It,o=e[0].length,a=e.length,s=a,u=ae(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=Rt(f,Kt(t))),c=bn(f.length,c),u[s]=!r&&(t||o>=120&&f.length>=120)?new Kn(s&&f):n}f=e[0];var p=-1,h=u[0];e:for(;++p<o&&l.length<c;){var d=f[p],v=t?t(d):d;if(d=r||0!==d?d:0,!(h?Yt(h,v):i(l,v,r))){for(s=a;--s;){var g=u[s];if(!(g?Yt(g,v):i(e[s],v,r)))continue e}h&&h.push(v),l.push(d)}}return l}function Rr(e,t,r){var i=null==(e=Io(e,t=bi(t,e)))?e:e[Fo(Xo(t))];return null==i?n:Ct(i,e,r)}function xr(e){return is(e)&&Or(e)==m}function Br(e,t,r,i,o){return e===t||(null==e||null==t||!is(e)&&!is(t)?e!=e&&t!=t:function(e,t,r,i,o,a){var s=Va(e),u=Va(t),c=s?_:mo(e),l=u?_:mo(t),f=(c=c==m?T:c)==T,p=(l=l==m?T:l)==T,h=c==l;if(h&&Qa(e)){if(!Qa(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Qn),s||ps(e)?ro(e,t,r,i,o,a):function(e,t,n,r,i,o,a){switch(n){case B:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!o(new Ge(e),new Ge(t)));case y:case w:case S:return Ha(+e,+t);case b:return e.name==t.name&&e.message==t.message;case N:case I:return e==t+"";case C:var s=sn;case k: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 P:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,c,r,i,o,a);if(!(1&r)){var d=f&&je.call(e,"__wrapped__"),v=p&&je.call(t,"__wrapped__");if(d||v){var g=d?e.value():e,E=v?t.value():t;return a||(a=new Qn),o(g,E,r,i,a)}}if(!h)return!1;return a||(a=new Qn),function(e,t,r,i,o,a){var s=1&r,u=oo(e),c=u.length,l=oo(t).length;if(c!=l&&!s)return!1;var f=c;for(;f--;){var p=u[f];if(!(s?p in t:je.call(t,p)))return!1}var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var v=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var m=e[p=u[f]],_=t[p];if(i)var y=s?i(_,m,p,t,e,a):i(m,_,p,e,t,a);if(!(y===n?m===_||o(m,_,r,i,a):y)){v=!1;break}g||(g="constructor"==p)}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,r,i,o,a)}(e,t,r,i,Br,o))}function Dr(e,t,r,i){var o=r.length,a=o,s=!i;if(null==e)return!a;for(e=Oe(e);o--;){var u=r[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=r[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===n&&!(c in e))return!1}else{var p=new Qn;if(i)var h=i(l,f,c,e,t,p);if(!(h===n?Br(f,l,3,i,p):h))return!1}}return!0}function jr(e){return!(!rs(e)||(t=e,Ue&&Ue in t))&&(es(e)?We:me).test(zo(e));var t}function Lr(e){return"function"==typeof e?e:null==e?au:"object"==typeof e?Va(e)?Hr(e[0],e[1]):Wr(e):vu(e)}function Ur(e){if(!To(e))return yn(e);var t=[];for(var n in Oe(e))je.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Mr(e){if(!rs(e))return function(e){var t=[];if(null!=e)for(var n in Oe(e))t.push(n);return t}(e);var t=To(e),n=[];for(var r in e)("constructor"!=r||!t&&je.call(e,r))&&n.push(r);return n}function Fr(e,t){return e<t}function zr(e,t){var n=-1,r=Ja(e)?ae(e.length):[];return dr(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function Wr(e){var t=po(e);return 1==t.length&&t[0][2]?No(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function Hr(e,t){return Ao(e)&&Oo(t)?No(Fo(e),t):function(r){var i=ks(r,e);return i===n&&i===t?Is(r,e):Br(t,i,3)}}function $r(e,t,r,i,o){e!==t&&wr(t,(function(a,s){if(o||(o=new Qn),rs(a))!function(e,t,r,i,o,a,s){var u=Ro(e,r),c=Ro(t,r),l=s.get(c);if(l)return void nr(e,r,l);var f=a?a(u,c,r+"",e,t,s):n,p=f===n;if(p){var h=Va(c),d=!h&&Qa(c),v=!h&&!d&&ps(c);f=c,h||d||v?Va(u)?f=u:Ka(u)?f=Pi(u):d?(p=!1,f=Si(c,!0)):v?(p=!1,f=Oi(c,!0)):f=[]:ss(c)||Za(c)?(f=u,Za(u)?f=ws(u):rs(u)&&!es(u)||(f=yo(c))):p=!1}p&&(s.set(c,f),o(f,c,i,a,s),s.delete(c));nr(e,r,f)}(e,t,s,r,$r,i,o);else{var u=i?i(Ro(e,s),a,s+"",e,t,o):n;u===n&&(u=a),nr(e,s,u)}}),Ds)}function Gr(e,t){var r=e.length;if(r)return bo(t+=t<0?r:0,r)?e[t]:n}function Zr(e,t,n){t=t.length?Rt(t,(function(e){return Va(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[au];var r=-1;return t=Rt(t,Kt(lo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(zr(e,(function(e,n,i){return{criteria:Rt(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=Ni(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 Vr(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 qr(e,t,n,r){var i=r?zt:Ft,o=-1,a=t.length,s=e;for(e===t&&(t=Pi(t)),n&&(s=Rt(e,Kt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Ke.call(s,u,1),Ke.call(e,u,1);return e}function Jr(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)?Ke.call(e,i,1):hi(e,i)}}return e}function Kr(e,t){return e+mt(Cn()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=mt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Do(ko(e,t,au),e+"")}function Xr(e){return Xn(Hs(e))}function ei(e,t){var n=Hs(e);return Uo(n,cr(t,0,n.length))}function ti(e,t,r,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=Fo(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=i?i(f,c,u):n)===n&&(l=rs(f)?f:bo(t[o+1])?[]:{})}rr(u,c,l),u=u[c]}return e}var ni=Rn?function(e,t){return Rn.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(Hs(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 dr(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,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,u=null===t,c=fs(t),l=t===n;o<a;){var f=mt((o+a)/2),p=r(e[f]),h=p!==n,d=null===p,v=p==p,g=fs(p);if(s)var m=i||v;else m=l?v&&(i||h):u?v&&h&&(i||!d):c?v&&h&&!d&&(i||!g):!d&&!g&&(i?p<=t:p<t);m?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||!Ha(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:fs(e)?d:+e}function fi(e){if("string"==typeof e)return e;if(Va(e))return Rt(e,fi)+"";if(fs(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pi(e,t,n){var r=-1,i=It,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Pt;else if(o>=200){var c=t?null:Qi(e);if(c)return ln(c);a=!1,i=Yt,u=new Kn}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 p=u.length;p--;)if(u[p]===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 hi(e,t){return null==(e=Io(e,t=bi(t,e)))||delete e[Fo(Xo(t))]}function di(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 Zn&&(n=n.value()),Bt(t,(function(e,t){return t.func.apply(t.thisArg,xt([e],t.args))}),n)}function mi(e,t,n){var r=e.length;if(r<2)return r?pi(e[0]):[];for(var i=-1,o=ae(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=hr(o[i]||a,e[s],t,n));return pi(yr(o,1),t,n)}function _i(e,t,r){for(var i=-1,o=e.length,a=t.length,s={};++i<o;){var u=i<a?t[i]:n;r(s,e[i],u)}return s}function yi(e){return Ka(e)?e:[]}function wi(e){return"function"==typeof e?e:au}function bi(e,t){return Va(e)?e:Ao(e,t)?[e]:Mo(bs(e))}var Ei=Yr;function Ai(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:oi(e,t,r)}var Ci=ft||function(e){return pt.clearTimeout(e)};function Si(e,t){if(t)return e.slice();var n=e.length,r=Ze?Ze(n):new e.constructor(n);return e.copy(r),r}function Ti(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Oi(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ni(e,t){if(e!==t){var r=e!==n,i=null===e,o=e==e,a=fs(e),s=t!==n,u=null===t,c=t==t,l=fs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&e<t||l&&r&&o&&!i&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function ki(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 Ii(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),p=!r;++i<l;)f[i]=e[i];for(var h=i;++u<c;)f[h+u]=t[u];for(;++a<s;)(p||i<o)&&(f[h+n[a]]=e[i++]);return f}function Pi(e,t){var n=-1,r=e.length;for(t||(t=ae(r));++n<r;)t[n]=e[n];return t}function Ri(e,t,r,i){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=i?i(r[u],e[u],u,r,e):n;c===n&&(c=e[u]),o?sr(r,u,c):rr(r,u,c)}return r}function xi(e,t){return function(n,r){var i=Va(n)?St:or,o=t?t():{};return i(n,e,lo(r,2),o)}}function Bi(e){return Yr((function(t,r){var i=-1,o=r.length,a=o>1?r[o-1]:n,s=o>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(o--,a):n,s&&Eo(r[0],r[1],s)&&(a=o<3?n:a,o=1),t=Oe(t);++i<o;){var u=r[i];u&&e(t,u,i,a)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!Ja(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Oe(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function ji(e){return function(t,n,r){for(var i=-1,o=Oe(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 Li(e){return function(t){var r=an(t=bs(t))?hn(t):n,i=r?r[0]:t.charAt(0),o=r?Ai(r,1).join(""):t.slice(1);return i[e]()+o}}function Ui(e){return function(t){return Bt(eu(Zs(t).replace(Qe,"")),e,"")}}function Mi(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=Hn(e.prototype),r=e.apply(n,t);return rs(r)?r:n}}function Fi(e){return function(t,r,i){var o=Oe(t);if(!Ja(t)){var a=lo(r,3);t=Bs(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,i);return s>-1?o[a?t[s]:s]:n}}function zi(e){return io((function(t){var i=t.length,o=i,a=Gn.prototype.thru;for(e&&t.reverse();o--;){var s=t[o];if("function"!=typeof s)throw new Ie(r);if(a&&!u&&"wrapper"==uo(s))var u=new Gn([],!0)}for(o=u?o:i;++o<i;){var c=uo(s=t[o]),l="wrapper"==c?so(s):n;u=l&&Co(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[uo(l[0])].apply(u,l[3]):1==s.length&&Co(s)?u[c]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Va(n))return u.plant(n).value();for(var r=0,o=i?t[r].apply(this,e):n;++r<i;)o=t[r].call(this,o);return o}}))}function Wi(e,t,r,i,o,a,s,u,c,f){var p=t&l,h=1&t,d=2&t,v=24&t,g=512&t,m=d?n:Mi(e);return function n(){for(var l=arguments.length,_=ae(l),y=l;y--;)_[y]=arguments[y];if(v)var w=co(n),b=tn(_,w);if(i&&(_=ki(_,i,o,v)),a&&(_=Ii(_,a,s,v)),l-=b,v&&l<f){var E=cn(_,w);return Ji(e,t,Wi,n.placeholder,r,_,E,u,c,f-l)}var A=h?r:this,C=d?A[e]:e;return l=_.length,u?_=Po(_,u):g&&l>1&&_.reverse(),p&&c<l&&(_.length=c),this&&this!==pt&&this instanceof n&&(C=m||Mi(C)),C.apply(A,_)}}function Hi(e,t){return function(n,r){return function(e,t,n,r){return Er(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function $i(e,t){return function(r,i){var o;if(r===n&&i===n)return t;if(r!==n&&(o=r),i!==n){if(o===n)return i;"string"==typeof r||"string"==typeof i?(r=fi(r),i=fi(i)):(r=li(r),i=li(i)),o=e(r,i)}return o}}function Gi(e){return io((function(t){return t=Rt(t,Kt(lo())),Yr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function Zi(e,t){var r=(t=t===n?" ":fi(t)).length;if(r<2)return r?Qr(t,e):t;var i=Qr(t,gt(e/pn(t)));return an(t)?Ai(hn(i),0,e).join(""):i.slice(0,e)}function Vi(e){return function(t,r,i){return i&&"number"!=typeof i&&Eo(t,r,i)&&(r=i=n),t=gs(t),r===n?(r=t,t=0):r=gs(r),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,r,i=i===n?t<r?1:-1:gs(i),e)}}function qi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Ji(e,t,r,i,o,a,s,l,f,p){var h=8&t;t|=h?u:c,4&(t&=~(h?c:u))||(t&=-4);var d=[e,t,o,h?a:n,h?s:n,h?n:a,h?n:s,l,f,p],v=r.apply(n,d);return Co(e)&&xo(v,d),v.placeholder=i,jo(v,e,t)}function Ki(e){var t=Te[e];return function(e,n){if(e=ys(e),(n=null==n?0:bn(ms(n),292))&&mn(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 Qi=kn&&1/ln(new kn([,-0]))[1]==p?function(e){return new kn(e)}:fu;function Yi(e){return function(t){var n=mo(t);return n==C?sn(t):n==k?fn(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,i,o,p,h,d,v){var g=2&t;if(!g&&"function"!=typeof e)throw new Ie(r);var m=o?o.length:0;if(m||(t&=-97,o=p=n),d=d===n?d:wn(ms(d),0),v=v===n?v:ms(v),m-=p?p.length:0,t&c){var _=o,y=p;o=p=n}var w=g?n:so(e),b=[e,t,i,o,p,_,y,h,d,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?ki(c,u,t[4]):u,e[4]=c?cn(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ii(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],i=b[2],o=b[3],p=b[4],!(v=b[9]=b[9]===n?g?0:e.length:wn(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==s?function(e,t,r){var i=Mi(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)<r?Ji(e,t,Wi,o.placeholder,n,s,l,n,n,r-a):Ct(this&&this!==pt&&this instanceof o?i:e,this,s)}}(e,t,v):t!=u&&33!=t||p.length?Wi.apply(n,b):function(e,t,n,r){var i=1&t,o=Mi(e);return function t(){for(var a=-1,s=arguments.length,u=-1,c=r.length,l=ae(c+s),f=this&&this!==pt&&this instanceof t?o:e;++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++a];return Ct(f,i?n:this,l)}}(e,t,i,o);else var E=function(e,t,n){var r=1&t,i=Mi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,i);return jo((w?ni:xo)(E,b),e,t)}function eo(e,t,r,i){return e===n||Ha(e,xe[r])&&!je.call(i,r)?t:e}function to(e,t,r,i,o,a){return rs(e)&&rs(t)&&(a.set(t,e),$r(e,t,n,to,a),a.delete(t)),e}function no(e){return ss(e)?n:e}function ro(e,t,r,i,o,a){var s=1&r,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 p=-1,h=!0,d=2&r?new Kn:n;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],g=t[p];if(i)var m=s?i(g,v,p,t,e,a):i(v,g,p,e,t,a);if(m!==n){if(m)continue;h=!1;break}if(d){if(!jt(t,(function(e,t){if(!Yt(d,t)&&(v===e||o(v,e,r,i,a)))return d.push(t)}))){h=!1;break}}else if(v!==g&&!o(v,g,r,i,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function io(e){return Do(ko(e,n,qo),e+"")}function oo(e){return Tr(e,Bs,vo)}function ao(e){return Tr(e,Ds,go)}var so=Rn?function(e){return Rn.get(e)}:fu;function uo(e){for(var t=e.name+"",n=xn[t],r=je.call(xn,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(je.call(Wn,"placeholder")?Wn:e).placeholder}function lo(){var e=Wn.iteratee||su;return e=e===su?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function fo(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function po(e){for(var t=Bs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Oo(i)]}return t}function ho(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return jr(r)?r:n}var vo=Lt?function(e){return null==e?[]:(e=Oe(e),kt(Lt(e),(function(t){return Je.call(e,t)})))}:_u,go=Lt?function(e){for(var t=[];e;)xt(t,vo(e)),e=Ve(e);return t}:_u,mo=Or;function _o(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(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)&&(Va(e)||Za(e))}function yo(e){return"function"!=typeof e.constructor||To(e)?{}:Hn(Ve(e))}function wo(e){return Va(e)||Za(e)||!!(Xe&&e&&e[Xe])}function bo(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Eo(e,t,n){if(!rs(n))return!1;var r=typeof t;return!!("number"==r?Ja(n)&&bo(t,n.length):"string"==r&&t in n)&&Ha(n[t],e)}function Ao(e,t){if(Va(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 Oe(t))}function Co(e){var t=uo(e),n=Wn[t];if("function"!=typeof n||!(t in Zn.prototype))return!1;if(e===n)return!0;var r=so(n);return!!r&&e===r[0]}(Tn&&mo(new Tn(new ArrayBuffer(1)))!=B||On&&mo(new On)!=C||Nn&&mo(Nn.resolve())!=O||kn&&mo(new kn)!=k||In&&mo(new In)!=R)&&(mo=function(e){var t=Or(e),r=t==T?e.constructor:n,i=r?zo(r):"";if(i)switch(i){case Bn:return B;case Dn:return C;case jn:return O;case Ln:return k;case Un:return R}return t});var So=Be?es:yu;function To(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)}function Oo(e){return e==e&&!rs(e)}function No(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Oe(r)))}}function ko(e,t,r){return t=wn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=wn(n.length-t,0),a=ae(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=ae(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Ct(e,this,s)}}function Io(e,t){return t.length<2?e:Sr(e,oi(t,0,-1))}function Po(e,t){for(var r=e.length,i=bn(t.length,r),o=Pi(e);i--;){var a=t[i];e[i]=bo(a,r)?o[a]:n}return e}function Ro(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xo=Lo(ni),Bo=dt||function(e,t){return pt.setTimeout(e,t)},Do=Lo(ri);function jo(e,t,n){var r=t+"";return Do(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 Tt(g,(function(n){var r="_."+n[0];t&n[1]&&!It(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(ce):[]}(r),n)))}function Lo(e){var t=0,r=0;return function(){var i=En(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Uo(e,t){var r=-1,i=e.length,o=i-1;for(t=t===n?i:t;++r<t;){var a=Kr(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Mo=function(e){var t=La(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(pe,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||fs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function zo(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Wo(e){if(e instanceof Zn)return e.clone();var t=new Gn(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ho=Yr((function(e,t){return Ka(e)?hr(e,yr(t,1,Ka,!0)):[]})),$o=Yr((function(e,t){var r=Xo(t);return Ka(r)&&(r=n),Ka(e)?hr(e,yr(t,1,Ka,!0),lo(r,2)):[]})),Go=Yr((function(e,t){var r=Xo(t);return Ka(r)&&(r=n),Ka(e)?hr(e,yr(t,1,Ka,!0),n,r):[]}));function Zo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=wn(r+i,0)),Mt(e,lo(t,3),i)}function Vo(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==n&&(o=ms(r),o=r<0?wn(i+o,0):bn(o,i-1)),Mt(e,lo(t,3),o,!0)}function qo(e){return(null==e?0:e.length)?yr(e,1):[]}function Jo(e){return e&&e.length?e[0]:n}var Ko=Yr((function(e){var t=Rt(e,yi);return t.length&&t[0]===e[0]?Pr(t):[]})),Qo=Yr((function(e){var t=Xo(e),r=Rt(e,yi);return t===Xo(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Pr(r,lo(t,2)):[]})),Yo=Yr((function(e){var t=Xo(e),r=Rt(e,yi);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Pr(r,n,t):[]}));function Xo(e){var t=null==e?0:e.length;return t?e[t-1]:n}var ea=Yr(ta);function ta(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var na=io((function(e,t){var n=null==e?0:e.length,r=ur(e,t);return Jr(e,Rt(t,(function(e){return bo(e,n)?+e:e})).sort(Ni)),r}));function ra(e){return null==e?e:Sn.call(e)}var ia=Yr((function(e){return pi(yr(e,1,Ka,!0))})),oa=Yr((function(e){var t=Xo(e);return Ka(t)&&(t=n),pi(yr(e,1,Ka,!0),lo(t,2))})),aa=Yr((function(e){var t=Xo(e);return t="function"==typeof t?t:n,pi(yr(e,1,Ka,!0),n,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=kt(e,(function(e){if(Ka(e))return t=wn(e.length,t),!0})),qt(t,(function(t){return Rt(e,$t(t))}))}function ua(e,t){if(!e||!e.length)return[];var r=sa(e);return null==t?r:Rt(r,(function(e){return Ct(t,n,e)}))}var ca=Yr((function(e,t){return Ka(e)?hr(e,t):[]})),la=Yr((function(e){return mi(kt(e,Ka))})),fa=Yr((function(e){var t=Xo(e);return Ka(t)&&(t=n),mi(kt(e,Ka),lo(t,2))})),pa=Yr((function(e){var t=Xo(e);return t="function"==typeof t?t:n,mi(kt(e,Ka),n,t)})),ha=Yr(sa);var da=Yr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ua(e,r)}));function va(e){var t=Wn(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var ma=io((function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,o=function(t){return ur(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Zn&&bo(r)?((i=i.slice(r,+r+(t?1:0))).__actions__.push({func:ga,args:[o],thisArg:n}),new Gn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(o)}));var _a=xi((function(e,t,n){je.call(e,n)?++e[n]:sr(e,n,1)}));var ya=Fi(Zo),wa=Fi(Vo);function ba(e,t){return(Va(e)?Tt:dr)(e,lo(t,3))}function Ea(e,t){return(Va(e)?Ot:vr)(e,lo(t,3))}var Aa=xi((function(e,t,n){je.call(e,n)?e[n].push(t):sr(e,n,[t])}));var Ca=Yr((function(e,t,n){var r=-1,i="function"==typeof t,o=Ja(e)?ae(e.length):[];return dr(e,(function(e){o[++r]=i?Ct(t,e,n):Rr(e,t,n)})),o})),Sa=xi((function(e,t,n){sr(e,n,t)}));function Ta(e,t){return(Va(e)?Rt:zr)(e,lo(t,3))}var Oa=xi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Na=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Eo(e,t[0],t[1])?t=[]:n>2&&Eo(t[0],t[1],t[2])&&(t=[t[0]]),Zr(e,yr(t,1),[])})),ka=ht||function(){return pt.Date.now()};function Ia(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Xi(e,l,n,n,n,n,t)}function Pa(e,t){var i;if("function"!=typeof t)throw new Ie(r);return e=ms(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=n),i}}var Ra=Yr((function(e,t,n){var r=1;if(n.length){var i=cn(n,co(Ra));r|=u}return Xi(e,r,t,n,i)})),xa=Yr((function(e,t,n){var r=3;if(n.length){var i=cn(n,co(xa));r|=u}return Xi(t,r,e,n,i)}));function Ba(e,t,i){var o,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new Ie(r);function v(t){var r=o,i=a;return o=a=n,f=t,u=e.apply(i,r)}function g(e){return f=e,c=Bo(_,t),p?v(e):u}function m(e){var r=e-l;return l===n||r>=t||r<0||h&&e-f>=s}function _(){var e=ka();if(m(e))return y(e);c=Bo(_,function(e){var n=t-(e-l);return h?bn(n,s-(e-f)):n}(e))}function y(e){return c=n,d&&o?v(e):(o=a=n,u)}function w(){var e=ka(),r=m(e);if(o=arguments,a=this,l=e,r){if(c===n)return g(l);if(h)return Ci(c),c=Bo(_,t),v(l)}return c===n&&(c=Bo(_,t)),u}return t=ys(t)||0,rs(i)&&(p=!!i.leading,s=(h="maxWait"in i)?wn(ys(i.maxWait)||0,t):s,d="trailing"in i?!!i.trailing:d),w.cancel=function(){c!==n&&Ci(c),f=0,o=l=a=c=n},w.flush=function(){return c===n?u:y(ka())},w}var Da=Yr((function(e,t){return pr(e,1,t)})),ja=Yr((function(e,t,n){return pr(e,ys(t)||0,n)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(r);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(La.Cache||Jn),n}function Ua(e){if("function"!=typeof e)throw new Ie(r);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)}}La.Cache=Jn;var Ma=Ei((function(e,t){var n=(t=1==t.length&&Va(t[0])?Rt(t[0],Kt(lo())):Rt(yr(t,1),Kt(lo()))).length;return Yr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),Fa=Yr((function(e,t){var r=cn(t,co(Fa));return Xi(e,u,n,t,r)})),za=Yr((function(e,t){var r=cn(t,co(za));return Xi(e,c,n,t,r)})),Wa=io((function(e,t){return Xi(e,f,n,n,n,t)}));function Ha(e,t){return e===t||e!=e&&t!=t}var $a=qi(Nr),Ga=qi((function(e,t){return e>=t})),Za=xr(function(){return arguments}())?xr:function(e){return is(e)&&je.call(e,"callee")&&!Je.call(e,"callee")},Va=ae.isArray,qa=_t?Kt(_t):function(e){return is(e)&&Or(e)==x};function Ja(e){return null!=e&&ns(e.length)&&!es(e)}function Ka(e){return is(e)&&Ja(e)}var Qa=Gt||yu,Ya=yt?Kt(yt):function(e){return is(e)&&Or(e)==w};function Xa(e){if(!is(e))return!1;var t=Or(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=Or(e);return t==E||t==A||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ts(e){return"number"==typeof e&&e==ms(e)}function ns(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}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?Kt(wt):function(e){return is(e)&&mo(e)==C};function as(e){return"number"==typeof e||is(e)&&Or(e)==S}function ss(e){if(!is(e)||Or(e)!=T)return!1;var t=Ve(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Fe}var us=bt?Kt(bt):function(e){return is(e)&&Or(e)==N};var cs=Et?Kt(Et):function(e){return is(e)&&mo(e)==k};function ls(e){return"string"==typeof e||!Va(e)&&is(e)&&Or(e)==I}function fs(e){return"symbol"==typeof e||is(e)&&Or(e)==P}var ps=At?Kt(At):function(e){return is(e)&&ns(e.length)&&!!ot[Or(e)]};var hs=qi(Fr),ds=qi((function(e,t){return e<=t}));function vs(e){if(!e)return[];if(Ja(e))return ls(e)?hn(e):Pi(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=mo(e);return(t==C?sn:t==k?ln:Hs)(e)}function gs(e){return e?(e=ys(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=gs(e),n=t%1;return t==t?n?t-n:t:0}function _s(e){return e?cr(ms(e),0,v):0}function ys(e){if("number"==typeof e)return e;if(fs(e))return d;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=Jt(e);var n=ge.test(e);return n||_e.test(e)?ct(e.slice(2),n?2:8):ve.test(e)?d:+e}function ws(e){return Ri(e,Ds(e))}function bs(e){return null==e?"":fi(e)}var Es=Bi((function(e,t){if(To(t)||Ja(t))Ri(t,Bs(t),e);else for(var n in t)je.call(t,n)&&rr(e,n,t[n])})),As=Bi((function(e,t){Ri(t,Ds(t),e)})),Cs=Bi((function(e,t,n,r){Ri(t,Ds(t),e,r)})),Ss=Bi((function(e,t,n,r){Ri(t,Bs(t),e,r)})),Ts=io(ur);var Os=Yr((function(e,t){e=Oe(e);var r=-1,i=t.length,o=i>2?t[2]:n;for(o&&Eo(t[0],t[1],o)&&(i=1);++r<i;)for(var a=t[r],s=Ds(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===n||Ha(f,xe[l])&&!je.call(e,l))&&(e[l]=a[l])}return e})),Ns=Yr((function(e){return e.push(n,to),Ct(Ls,n,e)}));function ks(e,t,r){var i=null==e?n:Sr(e,t);return i===n?r:i}function Is(e,t){return null!=e&&_o(e,t,Ir)}var Ps=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=n}),ru(au)),Rs=Hi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),je.call(e,t)?e[t].push(n):e[t]=[n]}),lo),xs=Yr(Rr);function Bs(e){return Ja(e)?Yn(e):Ur(e)}function Ds(e){return Ja(e)?Yn(e,!0):Mr(e)}var js=Bi((function(e,t,n){$r(e,t,n)})),Ls=Bi((function(e,t,n,r){$r(e,t,n,r)})),Us=io((function(e,t){var n={};if(null==e)return n;var r=!1;t=Rt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ri(e,ao(e),n),r&&(n=lr(n,7,no));for(var i=t.length;i--;)hi(n,t[i]);return n}));var Ms=io((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Is(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Rt(ao(e),(function(e){return[e]}));return t=lo(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var zs=Yi(Bs),Ws=Yi(Ds);function Hs(e){return null==e?[]:Qt(e,Bs(e))}var $s=Ui((function(e,t,n){return t=t.toLowerCase(),e+(n?Gs(t):t)}));function Gs(e){return Xs(bs(e).toLowerCase())}function Zs(e){return(e=bs(e))&&e.replace(we,nn).replace(Ye,"")}var Vs=Ui((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qs=Ui((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Js=Li("toLowerCase");var Ks=Ui((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Qs=Ui((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Ys=Ui((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Li("toUpperCase");function eu(e,t,r){return e=bs(e),(t=r?n:t)===n?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=Yr((function(e,t){try{return Ct(e,n,t)}catch(e){return Xa(e)?e:new Ce(e)}})),nu=io((function(e,t){return Tt(t,(function(t){t=Fo(t),sr(e,t,Ra(e[t],e))})),e}));function ru(e){return function(){return e}}var iu=zi(),ou=zi(!0);function au(e){return e}function su(e){return Lr("function"==typeof e?e:lr(e,1))}var uu=Yr((function(e,t){return function(n){return Rr(n,e,t)}})),cu=Yr((function(e,t){return function(n){return Rr(e,n,t)}}));function lu(e,t,n){var r=Bs(t),i=Cr(t,r);null!=n||rs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Cr(t,Bs(t)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=es(e);return Tt(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__=Pi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,xt([this.value()],arguments))})})),e}function fu(){}var pu=Gi(Rt),hu=Gi(Nt),du=Gi(jt);function vu(e){return Ao(e)?$t(Fo(e)):function(e){return function(t){return Sr(t,e)}}(e)}var gu=Vi(),mu=Vi(!0);function _u(){return[]}function yu(){return!1}var wu=$i((function(e,t){return e+t}),0),bu=Ki("ceil"),Eu=$i((function(e,t){return e/t}),1),Au=Ki("floor");var Cu,Su=$i((function(e,t){return e*t}),1),Tu=Ki("round"),Ou=$i((function(e,t){return e-t}),0);return Wn.after=function(e,t){if("function"!=typeof t)throw new Ie(r);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Wn.ary=Ia,Wn.assign=Es,Wn.assignIn=As,Wn.assignInWith=Cs,Wn.assignWith=Ss,Wn.at=Ts,Wn.before=Pa,Wn.bind=Ra,Wn.bindAll=nu,Wn.bindKey=xa,Wn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},Wn.chain=va,Wn.chunk=function(e,t,r){t=(r?Eo(e,t,r):t===n)?1:wn(ms(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},Wn.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},Wn.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 xt(Va(n)?Pi(n):[n],yr(t,1))},Wn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Ie(r);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},Wn.conforms=function(e){return function(e){var t=Bs(e);return function(n){return fr(n,e,t)}}(lr(e,1))},Wn.constant=ru,Wn.countBy=_a,Wn.create=function(e,t){var n=Hn(e);return null==t?n:ar(n,t)},Wn.curry=function e(t,r,i){var o=Xi(t,8,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Wn.curryRight=function e(t,r,i){var o=Xi(t,s,n,n,n,n,n,r=i?n:r);return o.placeholder=e.placeholder,o},Wn.debounce=Ba,Wn.defaults=Os,Wn.defaultsDeep=Ns,Wn.defer=Da,Wn.delay=ja,Wn.difference=Ho,Wn.differenceBy=$o,Wn.differenceWith=Go,Wn.drop=function(e,t,r){var i=null==e?0:e.length;return i?oi(e,(t=r||t===n?1:ms(t))<0?0:t,i):[]},Wn.dropRight=function(e,t,r){var i=null==e?0:e.length;return i?oi(e,0,(t=i-(t=r||t===n?1:ms(t)))<0?0:t):[]},Wn.dropRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0,!0):[]},Wn.dropWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!0):[]},Wn.fill=function(e,t,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Eo(e,t,r)&&(r=0,i=o),function(e,t,r,i){var o=e.length;for((r=ms(r))<0&&(r=-r>o?0:o+r),(i=i===n||i>o?o:ms(i))<0&&(i+=o),i=r>i?0:_s(i);r<i;)e[r++]=t;return e}(e,t,r,i)):[]},Wn.filter=function(e,t){return(Va(e)?kt:_r)(e,lo(t,3))},Wn.flatMap=function(e,t){return yr(Ta(e,t),1)},Wn.flatMapDeep=function(e,t){return yr(Ta(e,t),p)},Wn.flatMapDepth=function(e,t,r){return r=r===n?1:ms(r),yr(Ta(e,t),r)},Wn.flatten=qo,Wn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,p):[]},Wn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===n?1:ms(t)):[]},Wn.flip=function(e){return Xi(e,512)},Wn.flow=iu,Wn.flowRight=ou,Wn.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},Wn.functions=function(e){return null==e?[]:Cr(e,Bs(e))},Wn.functionsIn=function(e){return null==e?[]:Cr(e,Ds(e))},Wn.groupBy=Aa,Wn.initial=function(e){return(null==e?0:e.length)?oi(e,0,-1):[]},Wn.intersection=Ko,Wn.intersectionBy=Qo,Wn.intersectionWith=Yo,Wn.invert=Ps,Wn.invertBy=Rs,Wn.invokeMap=Ca,Wn.iteratee=su,Wn.keyBy=Sa,Wn.keys=Bs,Wn.keysIn=Ds,Wn.map=Ta,Wn.mapKeys=function(e,t){var n={};return t=lo(t,3),Er(e,(function(e,r,i){sr(n,t(e,r,i),e)})),n},Wn.mapValues=function(e,t){var n={};return t=lo(t,3),Er(e,(function(e,r,i){sr(n,r,t(e,r,i))})),n},Wn.matches=function(e){return Wr(lr(e,1))},Wn.matchesProperty=function(e,t){return Hr(e,lr(t,1))},Wn.memoize=La,Wn.merge=js,Wn.mergeWith=Ls,Wn.method=uu,Wn.methodOf=cu,Wn.mixin=lu,Wn.negate=Ua,Wn.nthArg=function(e){return e=ms(e),Yr((function(t){return Gr(t,e)}))},Wn.omit=Us,Wn.omitBy=function(e,t){return Fs(e,Ua(lo(t)))},Wn.once=function(e){return Pa(2,e)},Wn.orderBy=function(e,t,r,i){return null==e?[]:(Va(t)||(t=null==t?[]:[t]),Va(r=i?n:r)||(r=null==r?[]:[r]),Zr(e,t,r))},Wn.over=pu,Wn.overArgs=Ma,Wn.overEvery=hu,Wn.overSome=du,Wn.partial=Fa,Wn.partialRight=za,Wn.partition=Oa,Wn.pick=Ms,Wn.pickBy=Fs,Wn.property=vu,Wn.propertyOf=function(e){return function(t){return null==e?n:Sr(e,t)}},Wn.pull=ea,Wn.pullAll=ta,Wn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,lo(n,2)):e},Wn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?qr(e,t,n,r):e},Wn.pullAt=na,Wn.range=gu,Wn.rangeRight=mu,Wn.rearg=Wa,Wn.reject=function(e,t){return(Va(e)?kt:_r)(e,Ua(lo(t,3)))},Wn.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 Jr(e,i),n},Wn.rest=function(e,t){if("function"!=typeof e)throw new Ie(r);return Yr(e,t=t===n?t:ms(t))},Wn.reverse=ra,Wn.sampleSize=function(e,t,r){return t=(r?Eo(e,t,r):t===n)?1:ms(t),(Va(e)?er:ei)(e,t)},Wn.set=function(e,t,n){return null==e?e:ti(e,t,n)},Wn.setWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:ti(e,t,r,i)},Wn.shuffle=function(e){return(Va(e)?tr:ii)(e)},Wn.slice=function(e,t,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Eo(e,t,r)?(t=0,r=i):(t=null==t?0:ms(t),r=r===n?i:ms(r)),oi(e,t,r)):[]},Wn.sortBy=Na,Wn.sortedUniq=function(e){return e&&e.length?ci(e):[]},Wn.sortedUniqBy=function(e,t){return e&&e.length?ci(e,lo(t,2)):[]},Wn.split=function(e,t,r){return r&&"number"!=typeof r&&Eo(e,t,r)&&(t=r=n),(r=r===n?v:r>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!us(t))&&!(t=fi(t))&&an(e)?Ai(hn(e),0,r):e.split(t,r):[]},Wn.spread=function(e,t){if("function"!=typeof e)throw new Ie(r);return t=null==t?0:wn(ms(t),0),Yr((function(n){var r=n[t],i=Ai(n,0,t);return r&&xt(i,r),Ct(e,this,i)}))},Wn.tail=function(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]},Wn.take=function(e,t,r){return e&&e.length?oi(e,0,(t=r||t===n?1:ms(t))<0?0:t):[]},Wn.takeRight=function(e,t,r){var i=null==e?0:e.length;return i?oi(e,(t=i-(t=r||t===n?1:ms(t)))<0?0:t,i):[]},Wn.takeRightWhile=function(e,t){return e&&e.length?vi(e,lo(t,3),!1,!0):[]},Wn.takeWhile=function(e,t){return e&&e.length?vi(e,lo(t,3)):[]},Wn.tap=function(e,t){return t(e),e},Wn.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new Ie(r);return rs(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Ba(e,t,{leading:i,maxWait:t,trailing:o})},Wn.thru=ga,Wn.toArray=vs,Wn.toPairs=zs,Wn.toPairsIn=Ws,Wn.toPath=function(e){return Va(e)?Rt(e,Fo):fs(e)?[e]:Pi(Mo(bs(e)))},Wn.toPlainObject=ws,Wn.transform=function(e,t,n){var r=Va(e),i=r||Qa(e)||ps(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:rs(e)&&es(o)?Hn(Ve(e)):{}}return(i?Tt:Er)(e,(function(e,r,i){return t(n,e,r,i)})),n},Wn.unary=function(e){return Ia(e,1)},Wn.union=ia,Wn.unionBy=oa,Wn.unionWith=aa,Wn.uniq=function(e){return e&&e.length?pi(e):[]},Wn.uniqBy=function(e,t){return e&&e.length?pi(e,lo(t,2)):[]},Wn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?pi(e,n,t):[]},Wn.unset=function(e,t){return null==e||hi(e,t)},Wn.unzip=sa,Wn.unzipWith=ua,Wn.update=function(e,t,n){return null==e?e:di(e,t,wi(n))},Wn.updateWith=function(e,t,r,i){return i="function"==typeof i?i:n,null==e?e:di(e,t,wi(r),i)},Wn.values=Hs,Wn.valuesIn=function(e){return null==e?[]:Qt(e,Ds(e))},Wn.without=ca,Wn.words=eu,Wn.wrap=function(e,t){return Fa(wi(t),e)},Wn.xor=la,Wn.xorBy=fa,Wn.xorWith=pa,Wn.zip=ha,Wn.zipObject=function(e,t){return _i(e||[],t||[],rr)},Wn.zipObjectDeep=function(e,t){return _i(e||[],t||[],ti)},Wn.zipWith=da,Wn.entries=zs,Wn.entriesIn=Ws,Wn.extend=As,Wn.extendWith=Cs,lu(Wn,Wn),Wn.add=wu,Wn.attempt=tu,Wn.camelCase=$s,Wn.capitalize=Gs,Wn.ceil=bu,Wn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ys(r))==r?r:0),t!==n&&(t=(t=ys(t))==t?t:0),cr(ys(e),t,r)},Wn.clone=function(e){return lr(e,4)},Wn.cloneDeep=function(e){return lr(e,5)},Wn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)},Wn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},Wn.conformsTo=function(e,t){return null==t||fr(e,t,Bs(t))},Wn.deburr=Zs,Wn.defaultTo=function(e,t){return null==e||e!=e?t:e},Wn.divide=Eu,Wn.endsWith=function(e,t,r){e=bs(e),t=fi(t);var i=e.length,o=r=r===n?i:cr(ms(r),0,i);return(r-=t.length)>=0&&e.slice(r,o)==t},Wn.eq=Ha,Wn.escape=function(e){return(e=bs(e))&&K.test(e)?e.replace(q,rn):e},Wn.escapeRegExp=function(e){return(e=bs(e))&&ie.test(e)?e.replace(re,"\\$&"):e},Wn.every=function(e,t,r){var i=Va(e)?Nt:gr;return r&&Eo(e,t,r)&&(t=n),i(e,lo(t,3))},Wn.find=ya,Wn.findIndex=Zo,Wn.findKey=function(e,t){return Ut(e,lo(t,3),Er)},Wn.findLast=wa,Wn.findLastIndex=Vo,Wn.findLastKey=function(e,t){return Ut(e,lo(t,3),Ar)},Wn.floor=Au,Wn.forEach=ba,Wn.forEachRight=Ea,Wn.forIn=function(e,t){return null==e?e:wr(e,lo(t,3),Ds)},Wn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Ds)},Wn.forOwn=function(e,t){return e&&Er(e,lo(t,3))},Wn.forOwnRight=function(e,t){return e&&Ar(e,lo(t,3))},Wn.get=ks,Wn.gt=$a,Wn.gte=Ga,Wn.has=function(e,t){return null!=e&&_o(e,t,kr)},Wn.hasIn=Is,Wn.head=Jo,Wn.identity=au,Wn.includes=function(e,t,n,r){e=Ja(e)?e:Hs(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=wn(i+n,0)),ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ft(e,t,n)>-1},Wn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=wn(r+i,0)),Ft(e,t,i)},Wn.inRange=function(e,t,r){return t=gs(t),r===n?(r=t,t=0):r=gs(r),function(e,t,n){return e>=bn(t,n)&&e<wn(t,n)}(e=ys(e),t,r)},Wn.invoke=xs,Wn.isArguments=Za,Wn.isArray=Va,Wn.isArrayBuffer=qa,Wn.isArrayLike=Ja,Wn.isArrayLikeObject=Ka,Wn.isBoolean=function(e){return!0===e||!1===e||is(e)&&Or(e)==y},Wn.isBuffer=Qa,Wn.isDate=Ya,Wn.isElement=function(e){return is(e)&&1===e.nodeType&&!ss(e)},Wn.isEmpty=function(e){if(null==e)return!0;if(Ja(e)&&(Va(e)||"string"==typeof e||"function"==typeof e.splice||Qa(e)||ps(e)||Za(e)))return!e.length;var t=mo(e);if(t==C||t==k)return!e.size;if(To(e))return!Ur(e).length;for(var n in e)if(je.call(e,n))return!1;return!0},Wn.isEqual=function(e,t){return Br(e,t)},Wn.isEqualWith=function(e,t,r){var i=(r="function"==typeof r?r:n)?r(e,t):n;return i===n?Br(e,t,n,r):!!i},Wn.isError=Xa,Wn.isFinite=function(e){return"number"==typeof e&&mn(e)},Wn.isFunction=es,Wn.isInteger=ts,Wn.isLength=ns,Wn.isMap=os,Wn.isMatch=function(e,t){return e===t||Dr(e,t,po(t))},Wn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Dr(e,t,po(t),r)},Wn.isNaN=function(e){return as(e)&&e!=+e},Wn.isNative=function(e){if(So(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jr(e)},Wn.isNil=function(e){return null==e},Wn.isNull=function(e){return null===e},Wn.isNumber=as,Wn.isObject=rs,Wn.isObjectLike=is,Wn.isPlainObject=ss,Wn.isRegExp=us,Wn.isSafeInteger=function(e){return ts(e)&&e>=-9007199254740991&&e<=h},Wn.isSet=cs,Wn.isString=ls,Wn.isSymbol=fs,Wn.isTypedArray=ps,Wn.isUndefined=function(e){return e===n},Wn.isWeakMap=function(e){return is(e)&&mo(e)==R},Wn.isWeakSet=function(e){return is(e)&&"[object WeakSet]"==Or(e)},Wn.join=function(e,t){return null==e?"":_n.call(e,t)},Wn.kebabCase=Vs,Wn.last=Xo,Wn.lastIndexOf=function(e,t,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ms(r))<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):Mt(e,Wt,o,!0)},Wn.lowerCase=qs,Wn.lowerFirst=Js,Wn.lt=hs,Wn.lte=ds,Wn.max=function(e){return e&&e.length?mr(e,au,Nr):n},Wn.maxBy=function(e,t){return e&&e.length?mr(e,lo(t,2),Nr):n},Wn.mean=function(e){return Ht(e,au)},Wn.meanBy=function(e,t){return Ht(e,lo(t,2))},Wn.min=function(e){return e&&e.length?mr(e,au,Fr):n},Wn.minBy=function(e,t){return e&&e.length?mr(e,lo(t,2),Fr):n},Wn.stubArray=_u,Wn.stubFalse=yu,Wn.stubObject=function(){return{}},Wn.stubString=function(){return""},Wn.stubTrue=function(){return!0},Wn.multiply=Su,Wn.nth=function(e,t){return e&&e.length?Gr(e,ms(t)):n},Wn.noConflict=function(){return pt._===this&&(pt._=ze),this},Wn.noop=fu,Wn.now=ka,Wn.pad=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Zi(mt(i),n)+e+Zi(gt(i),n)},Wn.padEnd=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;return t&&r<t?e+Zi(t-r,n):e},Wn.padStart=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;return t&&r<t?Zi(t-r,n)+e:e},Wn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),An(bs(e).replace(oe,""),t||0)},Wn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Eo(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=gs(e),t===n?(t=e,e=0):t=gs(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var o=Cn();return bn(e+o*(t-e+ut("1e-"+((o+"").length-1))),t)}return Kr(e,t)},Wn.reduce=function(e,t,n){var r=Va(e)?Bt:Zt,i=arguments.length<3;return r(e,lo(t,4),n,i,dr)},Wn.reduceRight=function(e,t,n){var r=Va(e)?Dt:Zt,i=arguments.length<3;return r(e,lo(t,4),n,i,vr)},Wn.repeat=function(e,t,r){return t=(r?Eo(e,t,r):t===n)?1:ms(t),Qr(bs(e),t)},Wn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Wn.result=function(e,t,r){var i=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=n);++i<o;){var a=null==e?n:e[Fo(t[i])];a===n&&(i=o,a=r),e=es(a)?a.call(e):a}return e},Wn.round=Tu,Wn.runInContext=e,Wn.sample=function(e){return(Va(e)?Xn:Xr)(e)},Wn.size=function(e){if(null==e)return 0;if(Ja(e))return ls(e)?pn(e):e.length;var t=mo(e);return t==C||t==k?e.size:Ur(e).length},Wn.snakeCase=Ks,Wn.some=function(e,t,r){var i=Va(e)?jt:ai;return r&&Eo(e,t,r)&&(t=n),i(e,lo(t,3))},Wn.sortedIndex=function(e,t){return si(e,t)},Wn.sortedIndexBy=function(e,t,n){return ui(e,t,lo(n,2))},Wn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=si(e,t);if(r<n&&Ha(e[r],t))return r}return-1},Wn.sortedLastIndex=function(e,t){return si(e,t,!0)},Wn.sortedLastIndexBy=function(e,t,n){return ui(e,t,lo(n,2),!0)},Wn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=si(e,t,!0)-1;if(Ha(e[n],t))return n}return-1},Wn.startCase=Qs,Wn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:cr(ms(n),0,e.length),t=fi(t),e.slice(n,n+t.length)==t},Wn.subtract=Ou,Wn.sum=function(e){return e&&e.length?Vt(e,au):0},Wn.sumBy=function(e,t){return e&&e.length?Vt(e,lo(t,2)):0},Wn.template=function(e,t,r){var i=Wn.templateSettings;r&&Eo(e,t,r)&&(t=n),e=bs(e),t=Cs({},t,i,eo);var o,a,s=Cs({},t.imports,i.imports,eo),u=Bs(s),c=Qt(s,u),l=0,f=t.interpolate||be,p="__p += '",h=Ne((t.escape||be).source+"|"+f.source+"|"+(f===X?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),d="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),p+=e.slice(l,u).replace(Ee,on),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=je.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new Ce("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace($,""):p).replace(G,"$1").replace(Z,"$1;"),p="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")+p+"return __p\n}";var g=tu((function(){return Se(u,d+"return "+p).apply(n,c)}));if(g.source=p,Xa(g))throw g;return g},Wn.times=function(e,t){if((e=ms(e))<1||e>h)return[];var n=v,r=bn(e,v);t=lo(t),e-=v;for(var i=qt(r,t);++n<e;)t(n);return i},Wn.toFinite=gs,Wn.toInteger=ms,Wn.toLength=_s,Wn.toLower=function(e){return bs(e).toLowerCase()},Wn.toNumber=ys,Wn.toSafeInteger=function(e){return e?cr(ms(e),-9007199254740991,h):0===e?e:0},Wn.toString=bs,Wn.toUpper=function(e){return bs(e).toUpperCase()},Wn.trim=function(e,t,r){if((e=bs(e))&&(r||t===n))return Jt(e);if(!e||!(t=fi(t)))return e;var i=hn(e),o=hn(t);return Ai(i,Xt(i,o),en(i,o)+1).join("")},Wn.trimEnd=function(e,t,r){if((e=bs(e))&&(r||t===n))return e.slice(0,dn(e)+1);if(!e||!(t=fi(t)))return e;var i=hn(e);return Ai(i,0,en(i,hn(t))+1).join("")},Wn.trimStart=function(e,t,r){if((e=bs(e))&&(r||t===n))return e.replace(oe,"");if(!e||!(t=fi(t)))return e;var i=hn(e);return Ai(i,Xt(i,hn(t))).join("")},Wn.truncate=function(e,t){var r=30,i="...";if(rs(t)){var o="separator"in t?t.separator:o;r="length"in t?ms(t.length):r,i="omission"in t?fi(t.omission):i}var a=(e=bs(e)).length;if(an(e)){var s=hn(e);a=s.length}if(r>=a)return e;var u=r-pn(i);if(u<1)return i;var c=s?Ai(s,0,u).join(""):e.slice(0,u);if(o===n)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=Ne(o.source,bs(de.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===n?u:p)}}else if(e.indexOf(fi(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+i},Wn.unescape=function(e){return(e=bs(e))&&J.test(e)?e.replace(V,vn):e},Wn.uniqueId=function(e){var t=++Le;return bs(e)+t},Wn.upperCase=Ys,Wn.upperFirst=Xs,Wn.each=ba,Wn.eachRight=Ea,Wn.first=Jo,lu(Wn,(Cu={},Er(Wn,(function(e,t){je.call(Wn.prototype,t)||(Cu[t]=e)})),Cu),{chain:!1}),Wn.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Wn[e].placeholder=Wn})),Tt(["drop","take"],(function(e,t){Zn.prototype[e]=function(r){r=r===n?1:wn(ms(r),0);var i=this.__filtered__&&!t?new Zn(this):this.clone();return i.__filtered__?i.__takeCount__=bn(r,i.__takeCount__):i.__views__.push({size:bn(r,v),type:e+(i.__dir__<0?"Right":"")}),i},Zn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Zn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Tt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Zn.prototype[e]=function(){return this[n](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Zn.prototype[e]=function(){return this.__filtered__?new Zn(this):this[n](1)}})),Zn.prototype.compact=function(){return this.filter(au)},Zn.prototype.find=function(e){return this.filter(e).head()},Zn.prototype.findLast=function(e){return this.reverse().find(e)},Zn.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new Zn(this):this.map((function(n){return Rr(n,e,t)}))})),Zn.prototype.reject=function(e){return this.filter(Ua(lo(e)))},Zn.prototype.slice=function(e,t){e=ms(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Zn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ms(t))<0?r.dropRight(-t):r.take(t-e)),r)},Zn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Zn.prototype.toArray=function(){return this.take(v)},Er(Zn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=Wn[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(Wn.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,u=t instanceof Zn,c=s[0],l=u||Va(t),f=function(e){var t=o.apply(Wn,xt([e],s));return i&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,v=u&&!h;if(!a&&l){t=v?t:new Zn(this);var g=e.apply(t,s);return g.__actions__.push({func:ga,args:[f],thisArg:n}),new Gn(g,p)}return d&&v?e.apply(this,s):(g=this.thru(f),d?i?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Wn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Va(i)?i:[],e)}return this[n]((function(n){return t.apply(Va(n)?n:[],e)}))}})),Er(Zn.prototype,(function(e,t){var n=Wn[t];if(n){var r=n.name+"";je.call(xn,r)||(xn[r]=[]),xn[r].push({name:t,func:n})}})),xn[Wi(n,2).name]=[{name:"wrapper",func:n}],Zn.prototype.clone=function(){var e=new Zn(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},Zn.prototype.reverse=function(){if(this.__filtered__){var e=new Zn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Zn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(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,p=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return gi(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var v=-1,g=e[c+=t];++v<f;){var m=l[v],_=m.iteratee,y=m.type,w=_(g);if(2==y)g=w;else if(!w){if(1==y)continue e;break e}}d[p++]=g}return d},Wn.prototype.at=ma,Wn.prototype.chain=function(){return va(this)},Wn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Wn.prototype.next=function(){this.__values__===n&&(this.__values__=vs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Wn.prototype.plant=function(e){for(var t,r=this;r instanceof $n;){var i=Wo(r);i.__index__=0,i.__values__=n,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t},Wn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Zn){var t=e;return this.__actions__.length&&(t=new Zn(this)),(t=t.reverse()).__actions__.push({func:ga,args:[ra],thisArg:n}),new Gn(t,this.__chain__)}return this.thru(ra)},Wn.prototype.toJSON=Wn.prototype.valueOf=Wn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},Wn.prototype.first=Wn.prototype.head,tt&&(Wn.prototype[tt]=function(){return this}),Wn}();dt?((dt.exports=gn)._=gn,ht._=gn):pt._=gn}).call(o)})),u=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)}},c=Object.prototype.toString;function l(e){return"[object Array]"===c.call(e)}function f(e){return void 0===e}function p(e){return null!==e&&"object"==typeof e}function h(e){if("[object Object]"!==c.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){return"[object Function]"===c.call(e)}function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(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 g={isArray:l,isArrayBuffer:function(e){return"[object ArrayBuffer]"===c.call(e)},isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(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:p,isPlainObject:h,isUndefined:f,isDate:function(e){return"[object Date]"===c.call(e)},isFile:function(e){return"[object File]"===c.call(e)},isBlob:function(e){return"[object Blob]"===c.call(e)},isFunction:d,isStream:function(e){return p(e)&&d(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:v,merge:function e(){var t={};function n(n,r){h(t[r])&&h(n)?t[r]=e(t[r],n):h(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)v(arguments[r],n);return t},extend:function(e,t,n){return v(t,(function(t,r){e[r]=n&&"function"==typeof t?u(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 m(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var _=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(g.isURLSearchParams(t))r=t.toString();else{var i=[];g.forEach(t,(function(e,t){null!=e&&(g.isArray(e)?t+="[]":e=[e],g.forEach(e,(function(e){g.isDate(e)?e=e.toISOString():g.isObject(e)&&(e=JSON.stringify(e)),i.push(m(t)+"="+m(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 y(){this.handlers=[]}y.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},y.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},y.prototype.forEach=function(e){g.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var w=y,b=function(e,t,n){return g.forEach(n,(function(n){e=n(e,t)})),e},E=function(e){return!(!e||!e.__CANCEL__)},A="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function C(){throw new Error("setTimeout has not been defined")}function S(){throw new Error("clearTimeout has not been defined")}var T=C,O=S;function N(e){if(T===setTimeout)return setTimeout(e,0);if((T===C||!T)&&setTimeout)return T=setTimeout,setTimeout(e,0);try{return T(e,0)}catch(t){try{return T.call(null,e,0)}catch(t){return T.call(this,e,0)}}}"function"==typeof A.setTimeout&&(T=setTimeout),"function"==typeof A.clearTimeout&&(O=clearTimeout);var k,I=[],P=!1,R=-1;function x(){P&&k&&(P=!1,k.length?I=k.concat(I):R=-1,I.length&&B())}function B(){if(!P){var e=N(x);P=!0;for(var t=I.length;t;){for(k=I,I=[];++R<t;)k&&k[R].run();R=-1,t=I.length}k=null,P=!1,function(e){if(O===clearTimeout)return clearTimeout(e);if((O===S||!O)&&clearTimeout)return O=clearTimeout,clearTimeout(e);try{O(e)}catch(t){try{return O.call(null,e)}catch(t){return O.call(this,e)}}}(e)}}function D(e,t){this.fun=e,this.array=t}D.prototype.run=function(){this.fun.apply(null,this.array)};function j(){}var L=j,U=j,M=j,F=j,z=j,W=j,H=j;var $=A.performance||{},G=$.now||$.mozNow||$.msNow||$.oNow||$.webkitNow||function(){return(new Date).getTime()};var Z=new Date;var V={nextTick:function(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];I.push(new D(e,t)),1!==I.length||P||N(B)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:L,addListener:U,once:M,off:F,removeListener:z,removeAllListeners:W,emit:H,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*G.call($),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-Z)/1e3}},q=function(e,t){g.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},J=function(e,t,n,r,i){return 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}(new Error(e),t,n,r,i)},K=g.isStandardBrowserEnv()?{write:function(e,t,n,r,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),g.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),g.isString(r)&&a.push("path="+r),g.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(){}},Q=["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"],Y=g.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=g.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0},X=function(e){return new Promise((function(t,n){var r=e.data,i=e.headers;g.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,c,l=(u=e.baseURL,c=e.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(c)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(u,c):c);if(o.open(e.method.toUpperCase(),_(l,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?(g.forEach(r.split("\n"),(function(e){if(s=e.indexOf(":"),i=g.trim(e.substr(0,s)).toLowerCase(),a=g.trim(e.substr(s+1)),i){if(u[i]&&Q.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};!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(J("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}(t,n,l),o=null}},o.onabort=function(){o&&(n(J("Request aborted",e,"ECONNABORTED",o)),o=null)},o.onerror=function(){n(J("Network Error",e,null,o)),o=null},o.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(J(t,e,"ECONNABORTED",o)),o=null},g.isStandardBrowserEnv()){var f=(e.withCredentials||Y(l))&&e.xsrfCookieName?K.read(e.xsrfCookieName):void 0;f&&(i[e.xsrfHeaderName]=f)}if("setRequestHeader"in o&&g.forEach(i,(function(e,t){void 0===r&&"content-type"===t.toLowerCase()?delete i[t]:o.setRequestHeader(t,e)})),g.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)}))},ee={"Content-Type":"application/x-www-form-urlencoded"};function te(e,t){!g.isUndefined(e)&&g.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var ne,re={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==V&&"[object process]"===Object.prototype.toString.call(V))&&(ne=X),ne),transformRequest:[function(e,t){return q(t,"Accept"),q(t,"Content-Type"),g.isFormData(e)||g.isArrayBuffer(e)||g.isBuffer(e)||g.isStream(e)||g.isFile(e)||g.isBlob(e)?e:g.isArrayBufferView(e)?e.buffer:g.isURLSearchParams(e)?(te(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):g.isObject(e)?(te(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}};re.headers={common:{Accept:"application/json, text/plain, */*"}},g.forEach(["delete","get","head"],(function(e){re.headers[e]={}})),g.forEach(["post","put","patch"],(function(e){re.headers[e]=g.merge(ee)}));var ie=re;function oe(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var ae=function(e){return oe(e),e.headers=e.headers||{},e.data=b(e.data,e.headers,e.transformRequest),e.headers=g.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),g.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||ie.adapter)(e).then((function(t){return oe(e),t.data=b(t.data,t.headers,e.transformResponse),t}),(function(t){return E(t)||(oe(e),t&&t.response&&(t.response.data=b(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},se=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 g.isPlainObject(e)&&g.isPlainObject(t)?g.merge(e,t):g.isPlainObject(t)?g.merge({},t):g.isArray(t)?t.slice():t}function u(r){g.isUndefined(t[r])?g.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}g.forEach(r,(function(e){g.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),g.forEach(i,u),g.forEach(o,(function(r){g.isUndefined(t[r])?g.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),g.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 g.forEach(l,u),n};function ue(e){this.defaults=e,this.interceptors={request:new w,response:new w}}ue.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=se(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[ae,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},ue.prototype.getUri=function(e){return e=se(this.defaults,e),_(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},g.forEach(["delete","get","head","options"],(function(e){ue.prototype[e]=function(t,n){return this.request(se(n||{},{method:e,url:t,data:(n||{}).data}))}})),g.forEach(["post","put","patch"],(function(e){ue.prototype[e]=function(t,n,r){return this.request(se(r||{},{method:e,url:t,data:n}))}}));var ce=ue;function le(e){this.message=e}le.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},le.prototype.__CANCEL__=!0;var fe=le;function pe(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 fe(e),t(n.reason))}))}pe.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},pe.source=function(){var e;return{token:new pe((function(t){e=t})),cancel:e}};var he=pe;function de(e){var t=new ce(e),n=u(ce.prototype.request,t);return g.extend(n,ce.prototype,t),g.extend(n,t),n}var ve=de(ie);ve.Axios=ce,ve.create=function(e){return de(se(ve.defaults,e))},ve.Cancel=fe,ve.CancelToken=he,ve.isCancel=E,ve.all=function(e){return Promise.all(e)},ve.spread=function(e){return function(t){return e.apply(null,t)}},ve.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError};var ge=ve,me=ve;ge.default=me;var _e=ge,ye=1e3,we=60*ye,be=60*we,Ee=24*be,Ae=7*Ee,Ce=365.25*Ee,Se=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*Ce;case"weeks":case"week":case"w":return n*Ae;case"days":case"day":case"d":return n*Ee;case"hours":case"hour":case"hrs":case"hr":case"h":return n*be;case"minutes":case"minute":case"mins":case"min":case"m":return n*we;case"seconds":case"second":case"secs":case"sec":case"s":return n*ye;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>=Ee)return Te(e,t,Ee,"day");if(t>=be)return Te(e,t,be,"hour");if(t>=we)return Te(e,t,we,"minute");if(t>=ye)return Te(e,t,ye,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=Ee)return Math.round(e/Ee)+"d";if(t>=be)return Math.round(e/be)+"h";if(t>=we)return Math.round(e/we)+"m";if(t>=ye)return Math.round(e/ye)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Te(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}var Oe,Ne,ke,Ie,Pe,Re,xe,Be,De,je,Le,Ue=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=Se,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},Me=a((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!==V&&"env"in V&&(e=V.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=Ue(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}));Me.formatArgs,Me.save,Me.load,Me.useColors,Me.storage,Me.destroy,Me.colors,Me.log,exports.NetworkType=void 0,(Oe=exports.NetworkType||(exports.NetworkType={})).none="none",Oe.wifi="wifi",Oe.cellular="cellular",Oe.unknown="unknown",exports.PlatformType=void 0,(Ne=exports.PlatformType||(exports.PlatformType={})).wp="wp",Ne.android="android",Ne.iOS="iOS",Ne.unknown="unknown",exports.ProfileType=void 0,(ke=exports.ProfileType||(exports.ProfileType={}))[ke.user=1]="user",ke[ke.oa=0]="oa",ke[ke.aliasOA=2]="aliasOA",exports.ChatType=void 0,(Ie=exports.ChatType||(exports.ChatType={}))[Ie.user=1]="user",Ie[Ie.oa=0]="oa",exports.PostFeedType=void 0,(Pe=exports.PostFeedType||(exports.PostFeedType={}))[Pe.image=1]="image",Pe[Pe.link=4]="link",Pe[Pe.profile=5]="profile",exports.ShareSheetType=void 0,(Re=exports.ShareSheetType||(exports.ShareSheetType={}))[Re.image=21]="image",Re[Re.gif=11]="gif",Re[Re.video=12]="video",Re[Re.link=4]="link",Re[Re.oa=5]="oa",Re[Re.zmp=20]="zmp",exports.OrientationType=void 0,(xe=exports.OrientationType||(exports.OrientationType={}))[xe.auto=1]="auto",xe[xe.portrait=2]="portrait",xe[xe.landscape=3]="landscape",exports.VibrateType=void 0,(Be=exports.VibrateType||(exports.VibrateType={}))[Be.oneShot=0]="oneShot",exports.NativeCode=void 0,(De=exports.NativeCode||(exports.NativeCode={}))[De.token_invalid=-2]="token_invalid",De[De.not_permission=-1]="not_permission",De[De.client_not_support=-5]="client_not_support",De[De.decode_failed=-4]="decode_failed",exports.Events=void 0,(je=exports.Events||(exports.Events={})).AppPaused="h5.event.paused",je.AppResumed="h5.event.resumed",je.NetworkChanged="h5.event.connection.changed",je.OnDataCallback="h5.event.webview.result",je.OpenApp="h5.event.open.mp",exports.MediaPickerType=void 0,(Le=exports.MediaPickerType||(exports.MediaPickerType={}))[Le.photo=4]="photo",Le[Le.video=5]="video",Le[Le.file=6]="file",Le[Le.multi_photo=7]="multi_photo",Le[Le.multi_video=8]="multi_video";const Fe=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},ze=e=>Fe(`${window.location.host}_`+e),We=e=>Fe((()=>{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),He=window.zAppID,$e=window.APP_ID,Ge=window.APP_CONFIG||{},Ze="h5.zdn.vn_zoauth",Ve="h5.zdn.vn_zlink3rd",qe="h5.zdn.vn_zoauth_vrf",Je="https://graph.zalo.me/v2.0/me",Ke="https://h5.zalo.me/openapi/access_token",Qe="https://oauth.zaloapp.com/v3/access_token",Ye="https://graph.zalo.me/v2.0/me/friends/list",Xe=e=>({NONE:e?-2:0,WIFI:e?0:1,"2G":2,"3G":e?15:2,"4G":e?13:2}),et={GET_DOWNLOADED_STICKER:{name:"action.get.downloaded.sticker",have_callback:!0},OPEN_SHARE_STICKER:{name:"action.open.share.sticker"},OPEN_PROFILE:{name:"action.open.profile"},OPEN_FEED_DETAIL:{name:"action.open.feeddetail"},OPEN_FRIEND_RADA:{name:"action.open.friendrada"},OPEN_INAPP:{name:"action.open.inapp"},OPEN_OUTAPP:{name:"action.open.outapp"},OPEN_PAGE:{name:"action.open.page"},OPEN_PHOTODETAIL:{name:"action.open.photodetail"},OPEN_GALARY:{name:"action.open.galary"},OPEN_GAMECENTER:{name:"action.open.gamecenter"},OPEN_GAMENEWS:{name:"action.open.gamenews"},OPEN_TAB_CONTACT:{name:"action.open.tab.contact"},OPEN_TAB_SOCIAL:{name:"action.open.tab.social"},OPEN_FRIENDSUGGEST:{name:"action.open.friendsuggest"},OPEN_GROUPLIST:{name:"action.open.grouplist"},OPEN_NEARBY:{name:"action.open.nearby"},OPEN_ROOM:{name:"action.open.room"},OPEN_STICKERSTORE:{name:"action.open.stickerstore"},OPEN_CREATECHAT:{name:"action.open.createchat"},COPY_LINK_CATESTICKER:{name:"action.copy.link.catesticker"},REQUEST_BUY_STICKER:{name:"action.request.buy.sticker"},OPEN_CHAT:{name:"action.open.chat"},OPEN_TAB_CHAT:{name:"action.open.tab.chat"},OPEN_CHATGROUP:{name:"action.open.chatgroup"},OPEN_ADDFRIEND:{name:"action.open.addfriend"},OPEN_TAB_MORE:{name:"action.open.tab.more"},OPEN_POSTFEED:{name:"action.open.postfeed"},OPEN_LOGINDEVICES:{name:"action.open.logindevices"},OPEN_SENDSTICKER:{name:"action.open.sendsticker"},REPORT_ABUSE:{name:"action.report.abuse",have_callback:!0},FOLLOW_OA:{name:"action.follow.oa",have_callback:!0},UNFOLLOW_OA:{name:"action.unfollow.oa",have_callback:!0},OPEN_GAMEDETAIL:{name:"action.open.gamedetail"},OPEN_SHARESHEET:{name:"action.open.sharesheet",have_callback:!0},REQUEST_PERMISSION_CAMERA:{name:"action.request.permission.camera"},CHANGE_TITLE_HEADER:{name:"action.change.title.header",skip_jump:!0},WEBVIEW_CLEARCACHE:{name:"action.webview.clearcache"},WEBVIEW_CONFIRMCACHE:{name:"action.webview.confirmcache"},WEBVIEW_ISVISIBLE:{name:"action.webview.isvisible"},WEBVIEW_NETWORKTYPE:{name:"action.webview.networktype",skip_jump:!0},CHANGE_BUTTON_HEADER:{name:"action.change.button.header"},CREATE_OPTIONS_MENU:{name:"action.create.options.menu",skip_jump:!0,have_callback:!0},CREATE_SHORTCUT:{name:"action.create.shortcut"},CHANGE_ACTIONBAR_LEFTBUTTON_TYPE:{name:"action.change.actionbar.leftbutton.type",skip_jump:!0,have_callback:!0},WINDOW_CLOSE:{name:"action.window.close",skip_jump:!0,have_callback:!0},WEBVIEW_CHECKRESERROR:{name:"action.webview.checkResError"},IAP_REQUESTPAYMENT:{name:"action.iap.requestpayment"},ZBROWSER_GETSTATS:{name:"action.zbrowser.getstats"},ZBROWSER_JSBRIDGE:{name:"action.zbrowser.jsbridge",skip_jump:!0,have_callback:!0},PROMPT_AUTHENTICATION:{name:"action.prompt.authentication"},CHANGE_ACTIONBAR_COLOR:{name:"action.change.actionbar.color",skip_jump:!0},PROMPT_AUTHENTICATION_CHECK_STATE:{name:"action.prompt.authentication.check_state"},OPEN_APPSTORE:{name:"action.open.appstore"},GET_LOCATION:{name:"action.get.location",have_callback:!0},QUERY_LOCATION_HIDE:{name:"action.query.location.hide",have_callback:!0},SHOW_TOAST:{name:"action.show.toast",have_callback:!0},OPEN_APP:{name:"action.open.app"},HIDE_KEYBOARD:{name:"action.hide.keyboard"},OPEN_PHONE:{name:"action.open.phone"},OPEN_QR:{name:"action.open.qr"},OPEN_SMS:{name:"action.open.sms"},VIEW_MYQR:{name:"action.view.myqr",have_callback:!0},KEEP_SCREEN:{name:"action.keep.screen",have_callback:!0},CHANGE_AUTOROTATE:{name:"action.change.autorotate",skip_jump:!0},CHECK_APP_INSTALLED:{name:"action.check.app.installed"},QUERY_SHOW:{name:"action.query.show"},QUERY_HIDE:{name:"action.query.hide"},OPEN_INAPPRW:{name:"action.open.inapprw"},ZALORUN_GETTRACKINGSTATUS:{name:"action.zalorun.getTrackingStatus",have_callback:!0},ZALORUN_SETTRACKINGSTATUS:{name:"action.zalorun.setTrackingStatus",have_callback:!0},ZALORUN_GETDAYSTEP:{name:"action.zalorun.getDayStep",have_callback:!0},ZALORUN_FORCESUBMITDATA:{name:"action.zalorun.forceSubmitData",have_callback:!0},ZALORUN_SETWEIGHT:{name:"action.zalorun.setWeight",have_callback:!0},OPEN_PROFILE_EXT:{name:"action.open.profile.ext"},DOWNLOAD_CATE:{name:"action.download.cate",have_callback:!0},JUMP_LOGIN:{name:"action.jump.login",skip_jump:!0,white_list:!0},OPEN_ADTIMA_ADS_INTERSTITIAL:{name:"action.open.adtima.ads.interstitial"},OPEN_ADTIMA_ADS:{name:"action.open.adtima.ads"},GET_ADIDCLIENT:{name:"action.get.adidclient"},SCAN_IBEACON:{name:"action.scan.ibeacon"},INTERACTIVE_VIBRATION:{name:"action.interactive.vibration"},SAVE_IMAGE_GALLERY:{name:"action.save.image.gallery",version_live:{iOS:408}},OPEN_MP:{name:"action.open.mp",version_live:{iOS:402}},CHANGE_ACTIONBAR:{name:"action.change.actionbar",version_live:{iOS:402},skip_jump:!0},ZBROWSER_MPDS:{name:"action.zbrowser.mpds",version_live:{iOS:402}},WEBVIEW_SET_RESULT:{name:"action.webview.set.result",version_live:{iOS:416}},MP_GET_NUMBER:{name:"action.mp.get.number",version_live:{iOS:416}},MP_OPEN_PROFILE_PICKER:{name:"action.mp.open.profile.picker",version_live:{iOS:432}},GET_SUPPORTED_ACTIONS:{name:"action.get.supported.actions",white_list:!0},MP_JOIN_WIFI:{name:"action.mp.join.wifi",version_live:{android:0,iOS:999},have_permission:!1,white_list:!1},PICK_MEDIA:{name:"action.pick.media",version_live:{iOS:999}},MP_CLOSE_LOADINGVIEW:{name:"action.mp.close.loadingview"}},tt=0,nt=-1400,rt=-1500,it=-1401,ot=-1403,at=-1404,st={SUCCESS:"Success",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"},ut="apps/get-info",ct={android:12100571,iOS:400,wp:0,unknown:0},lt=[et.GET_DOWNLOADED_STICKER.name,et.OPEN_SHARE_STICKER.name,et.OPEN_PROFILE.name,et.OPEN_FEED_DETAIL.name,et.OPEN_FRIEND_RADA.name,et.OPEN_INAPP.name,et.OPEN_OUTAPP.name,et.OPEN_PAGE.name,et.OPEN_PHOTODETAIL.name,et.OPEN_GALARY.name,et.OPEN_GAMECENTER.name,et.OPEN_GAMENEWS.name,et.OPEN_TAB_CONTACT.name,et.OPEN_TAB_SOCIAL.name,et.OPEN_FRIENDSUGGEST.name,et.OPEN_GROUPLIST.name,et.OPEN_NEARBY.name,et.OPEN_ROOM.name,et.OPEN_STICKERSTORE.name,et.OPEN_CREATECHAT.name,et.COPY_LINK_CATESTICKER.name,et.REQUEST_BUY_STICKER.name,et.OPEN_CHAT.name,et.OPEN_TAB_CHAT.name,et.OPEN_CHATGROUP.name,et.OPEN_ADDFRIEND.name,et.OPEN_TAB_MORE.name,et.OPEN_POSTFEED.name,et.OPEN_LOGINDEVICES.name,et.OPEN_SENDSTICKER.name,et.REPORT_ABUSE.name,et.FOLLOW_OA.name,et.UNFOLLOW_OA.name,et.OPEN_GAMEDETAIL.name,et.OPEN_SHARESHEET.name,et.REQUEST_PERMISSION_CAMERA.name,et.CHANGE_TITLE_HEADER.name,et.WEBVIEW_CLEARCACHE.name,et.WEBVIEW_CONFIRMCACHE.name,et.WEBVIEW_ISVISIBLE.name,et.WEBVIEW_NETWORKTYPE.name,et.CHANGE_BUTTON_HEADER.name,et.CREATE_OPTIONS_MENU.name,et.CREATE_SHORTCUT.name,et.CHANGE_ACTIONBAR_LEFTBUTTON_TYPE.name,et.WINDOW_CLOSE.name,et.WEBVIEW_CHECKRESERROR.name,et.IAP_REQUESTPAYMENT.name,et.ZBROWSER_GETSTATS.name,et.ZBROWSER_JSBRIDGE.name,et.PROMPT_AUTHENTICATION.name,et.CHANGE_ACTIONBAR_COLOR.name,et.PROMPT_AUTHENTICATION_CHECK_STATE.name,et.OPEN_APPSTORE.name,et.GET_LOCATION.name,et.QUERY_LOCATION_HIDE.name,et.SHOW_TOAST.name,et.OPEN_APP.name,et.HIDE_KEYBOARD.name,et.OPEN_PHONE.name,et.OPEN_QR.name,et.OPEN_SMS.name,et.VIEW_MYQR.name,et.KEEP_SCREEN.name,et.CHANGE_AUTOROTATE.name,et.CHECK_APP_INSTALLED.name,et.QUERY_SHOW.name,et.QUERY_HIDE.name,et.OPEN_INAPPRW.name,et.ZALORUN_GETTRACKINGSTATUS.name,et.ZALORUN_SETTRACKINGSTATUS.name,et.ZALORUN_GETDAYSTEP.name,et.ZALORUN_FORCESUBMITDATA.name,et.ZALORUN_SETWEIGHT.name,et.OPEN_PROFILE_EXT.name,et.DOWNLOAD_CATE.name,et.JUMP_LOGIN.name,et.OPEN_ADTIMA_ADS_INTERSTITIAL.name,et.OPEN_ADTIMA_ADS.name,et.GET_ADIDCLIENT.name,et.SCAN_IBEACON.name,et.SAVE_IMAGE_GALLERY.name,et.OPEN_MP.name,et.CHANGE_ACTIONBAR.name,et.INTERACTIVE_VIBRATION.name,et.ZBROWSER_MPDS.name],ft=0,pt=3,ht=1,dt=0;class vt{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 gt extends vt{constructor(e,t){super(e,t),this.message=`${t}. ${st.READ_MORE}`,this.handler()}handler(){switch(this.code){case exports.NativeCode.token_invalid:this.code=it,this.message=st.LOGIN_REQUIRED;break;case exports.NativeCode.not_permission:this.code=ot,this.message=st.NOT_PERMISSION;break;case exports.NativeCode.client_not_support:this.code=at,this.message=st.CLIENT_NOT_SUPPORT;break;case exports.NativeCode.decode_failed:this.message=st.DECODE_FAILED}}}const mt={handler:null,setHandler(e){this.handler=e}};mt.setHandler(((e,t)=>t instanceof vt?(t.api=e,t):new vt(-2001,s.isNull(t.message)?"Unknown Error":t.message,e)));const _t=(e,t,r)=>{const i=r.value;return r.value=function(...e){return n(this,void 0,void 0,(function*(){const{success:r,fail:o}=Array.isArray(e)&&e.length>0&&e[0];return new Promise(((a,u)=>n(this,void 0,void 0,(function*(){try{const t=yield i.apply(this,e);!s.isNull(r)&&s.isFunction(r)?r.call(null,t,this):a(t)}catch(e){if("login"!==(null==e?void 0:e.api)&&((null==e?void 0:e.code)===it||(null==e?void 0:e.code)===ot)){let t=!1;this instanceof ar&&(t=this.getLoginStatus()),t||(e=new vt(it,st.LOGIN_REQUIRED))}const{handler:n}=mt,r=n.call(null,t,e,this);window.zmpSentry&&window.zmpSentry.throwError(r.toString()),!s.isNull(o)&&s.isFunction(o)?o.call(null,r,this):console.error("Error:",r)}}))))}))},r},yt=(e,t,n)=>{const r=n.value;return n.value=function(...e){try{return r.apply(this,e)}catch(e){if("login"!==(null==e?void 0:e.api)&&((null==e?void 0:e.code)===it||(null==e?void 0:e.code)===ot)){let t=!1;this instanceof ar&&(t=this.getLoginStatus()),t||(e=new vt(it,st.LOGIN_REQUIRED))}const{handler:n}=mt;!s.isNull(n)&&s.isFunction(n)?n.call(null,t,e,this):console.warn(e.message)}},n},wt=(e,t)=>({code:tt,message:t||st.SUCCESS,data:e||{}}),bt={badRequest:e=>new vt(nt,e),loginFailed:()=>new vt(nt,st.LOGIN_FAILED),loginRequired:()=>new vt(it,st.LOGIN_REQUIRED),missingParam:e=>new vt(nt,`Missing required argument: ${e}`),wrongTypeParam:(e,t,n)=>new vt(nt,`Wrong type of parameter '${e}'. Expected ${t}, but got ${n}`),cannotGetShareInfo:()=>new vt(rt,"Can not get app info to share"),lengthInvalid:e=>new vt(nt,`${e} length is invalid.`)};const Et={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:Et.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("&")}},At=new RegExp("[\\u0300-\\u036f]","g"),Ct=new RegExp("[đ|Đ]","g"),St=new RegExp("\\s","g"),Tt=Me("zmp:utils:common"),Ot=e=>{try{new URL(e)}catch(e){return!1}return!0},Nt=()=>navigator.userAgent||navigator.vendor||window.opera,kt=()=>{const e=Nt().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)}},It=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""},Pt=()=>{const e=Nt().toLowerCase().split("zalo")[1];if(e){return e.replace(" ","").split("/")[1]||""}return""},Rt=()=>{let e=kt();return e.isWP?exports.PlatformType.wp:e.isAndroid?exports.PlatformType.android:e.isIOS?exports.PlatformType.iOS:exports.PlatformType.unknown},xt=(e,t)=>{const n=t.toLowerCase(),r=n.split(/[<>]/i),i="array"===r[0];return!!("url"===n&&Ot(e)||i&&("array"===n&&Array.isArray(e)||((e,t)=>Array.isArray(t)&&!t.some((t=>"url"===e?!Ot(t):typeof t!==e)))(r[1],e))||!Array.isArray(e)&&typeof e===t)},Bt=e=>(e=>{let t=ze(e);return t||(t=We(e),t)?t:Fe(e)})(e),Dt=e=>{if(s.isObject(JSON)&&JSON.parse&&s.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 s.isObject(e)?e:new Function("return "+e)()},jt=e=>{if(s.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 n=e.length,r=0;r<n;r++)t.push(jt(e[r]));return"["+t.join(",")+"]"}if("object"==typeof e){for(var i in t=new Array,e)t.push('"'+i+'":'+jt(e[i]));return"{"+t.join(",")+"}"}return e.toString()},Lt=()=>{try{const e=Number(Pt()),t=Rt();return e>=ct[t]}catch(e){return!0}},Ut=e=>JSON.stringify(e).replace(/"/g,'\\"').replace(/'/g,"'"),Mt=e=>{try{if(e){Tt(e);const t=e.replace(/\\/g,"").replace(/'/g,"'");return Tt("formattedValue",t,JSON.parse(t),typeof JSON.parse(t)),JSON.parse(t)}return null}catch(t){return Tt("parse json error:",t),e}},Ft=(e,t,r,i,o,a)=>n(void 0,void 0,void 0,(function*(){const n=new URL(location.href),s=new URLSearchParams;let u=`${n.pathname}${n.search}`;a&&(u=`/zapps/${e}${"/"===a[0]?"":"/"}${a}`);const c=new URL(`https://zalo.me/app/link${u}`);s.append("title",r),s.append("description",i||""),s.append("thumbnail",o),s.append("url",c.href),s.append("accessToken",t||"");const l=(yield _e.post("https://h5.zalo.me/openapi/create-sharelink",s,{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data;if(!l||0!==l.err)throw bt.cannotGetShareInfo();return c.search=`${c.search}&zshareId=${l.data.shareId}`,Object.assign(Object.assign({},l.data),{shareableLink:c.href})})),zt=(e,t)=>n=>{if(!(Array.isArray(e)?e.some((e=>xt(n,e))):xt(n,e)))return{error:!0,errorMessage:e};if(t){if(Array.isArray(null==t?void 0:t.values))return{error:!(null==t?void 0:t.values.includes(n)),errorMessage:null==t?void 0:t.values.toString()};if(s.isNumber(null==t?void 0:t.maxLength))return{error:(s.isString(n)||s.isArray(n))&&n.length>(null==t?void 0:t.maxLength),errorMessage:`data length must <= ${null==t?void 0:t.maxLength}`};if(s.isNumber(null==t?void 0:t.min)&&s.isNumber(null==t?void 0:t.max))return{error:n<(null==t?void 0:t.min)||n>(null==t?void 0:t.max),errorMessage:`data must be in between ${null==t?void 0:t.min} and ${null==t?void 0:t.max}`};if(s.isNumber(null==t?void 0:t.min))return{error:n<(null==t?void 0:t.min),errorMessage:`data must >= ${null==t?void 0:t.min}`};if(s.isNumber(null==t?void 0:t.max))return{error:n>(null==t?void 0:t.max),errorMessage:`data must <= ${null==t?void 0:t.max}`};if(s.isRegExp(null==t?void 0:t.regex))return{error:!t.regex.test(n),errorMessage:"data must valid"}}return{error:!1}},Wt=(e,t,r)=>n(void 0,void 0,void 0,(function*(){const n={appId:e,versionStatus:t};s.isUndefined(r)||(n.currentVersion=r);const i=Et.appendToUrl(`https://h5.zalo.me/${ut}`,n),o=yield fetch(i,{credentials:"include"});if(o.ok){const e=yield o.json();if(e.err<0||!e.data)throw new Error(e);return{name:e.data.name,version:e.data.version,description:e.data.description,appUrl:e.data.appUrl,qrCodeUrl:e.data.qrCodeUrl,logoUrl:e.data.logoUrl}}throw new Error("Can't get app info")}));var Ht=a((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 p,h=l.length;for(c=0;c<h;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(p=1,u=new Array(f-1);p<f;p++)u[p-1]=arguments[p];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 $t extends Ht{constructor(){super(),this.debug=Me("zmp:event-emitter")}static getInstance(){return $t.instance||($t.instance=new $t),$t.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 Gt={},Zt=function(e,t,n){var r=t||"default";return function(){var t=r in Gt?Gt[r](e,n):e;return t.apply(this,arguments)}};Zt.setWrapper=function(e){var t=arguments.length<=1||void 0===arguments[1]?"default":arguments[1];Gt[t]=e};var Vt={error:{code:1,error_subcode:1357046,message:"Received Invalid JSON reply.",type:"http"}};function qt(e){try{return null===e?Vt:JSON.parse(e)}catch(e){return Vt}}var Jt,Kt={execute:function(e,t,n,r){n.suppress_http_code=1;var i=Et.encode(n);"post"!=t&&(e=Et.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=Zt((function(){o=r,"onload"in i&&i.onload(n)}),"entry","XMLHttpRequest:load"),a=Zt((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(qt(e.responseText))},o.onerror=function(e){e.responseText?r(qt(e.responseText)):r({error:{code:1,error_subcode:1357045,message:"unknown error (empty response)",status:e.status,type:"http"}})},o.send(i),!0)}};class Qt extends Ht{constructor(){super(),this.debug=Me("zmp:ZaloJSBridge"),this.events=$t.getInstance(),this._accessTk=Bt("zacc_session")||"DEFAULT_ACCESS_TOKEN",this._jsAccessTk=Bt("zlink3rd")||"DEFAULT_JS_TOKEN",this.results=[],this._userAgent=Nt(),this._device=kt(),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 Qt.instance||(Qt.instance=new Qt),Qt.instance}set accessTk(e){this._accessTk=e}set jsAccessTk(e){this._jsAccessTk=e}sendLogData(e){try{Kt.execute("https://h5.zalo.me/log/async","post",{appId:window.APP_ID,data:JSON.stringify(e)},(e=>{}))}catch(e){}}onJSCall(e,t){try{this.debug("onJSCall",e,t);const n=Dt(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{this.debug("onMultiJSCall",e,t);const n=Dt(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=Mt(n);this.debug(r);const i=this.handleEventData(t,r);this.events.emit(t,e,i)}handleEventData(e,t){try{switch(e){case exports.Events.OpenApp:const{url:e}=t,n=new URL(e),r=n.pathname.split(`/zapps/${$e}`)[1];return{path:`${r||"/"}${n.search}`};default:return t}}catch(e){return t}}defaultCallback(e){null!=e&&(e=Dt(e))}jsCall(e,t,n,r=!1,i=3,o=!0){try{const a=e.name,u=((e="")=>`${e.normalize("NFD").replace(At,"").replace(Ct,"d").replace(St,"").toLowerCase()}_${Math.random().toString(36).substr(2,4)}`)(a);if(!this._device.isMobile||s.isEmpty(a))return this.onJSCall(u,{error_code:-13,error_message:"params invalid!",data:{device:this._device.isMobile,jsToken:this._jsAccessTk,access_token:this._accessTk},action:a}),!1;null==t&&(t={}),n||(n=this.defaultCallback);const c={error_code:-14,error_message:"Request Timeout!",data:{},action:a};this._jsCallFuncCallbacks[u]={timeout:o&&e.have_callback&&setTimeout((()=>{this.onJSCall(u,c)}),8e3),callback:n};try{return t=jt(t),r?this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,window.onMultiJSCall(u)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,`window.onMultiJSCall('${u}')`):this._device.isIOS?ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,window.onJSCall(u)):ZaloJavaScriptInterface.jsCall(this._jsAccessTk,a,this._accessTk,t,`window.onJSCall('${u}')`)}catch(o){if(!(i-- >0)){const e={error_code:-5,error_message:"Not ready!",data:{userAgent:this._userAgent,options:t,jsToken:this._jsAccessTk,access_token:this._accessTk},action:a,js_error:o};return this.onJSCall(u,e),!1}setTimeout((()=>{this.jsCall(e,t,n,r,i)}),500)}}catch(e){console.log("jsCall","error",e)}return!1}}class Yt{constructor(){this.debug=Me("zmp:ZJSBridgeProvider"),Jt.set(this,void 0),i(this,Jt,Qt.getInstance(),"f")}setZAccSession(e){r(this,Jt,"f").accessTk=e}setJSToken(e){r(this,Jt,"f").jsAccessTk=e}callNative(e,t,i){return this.debug(e.name,t),new Promise(((o,a)=>{const s=r=>n(this,void 0,void 0,(function*(){try{const n=new gt(r.error_code,`${r.action}: ${r.error_message}`);if(null==i?void 0:i.callback){const e=yield i.callback(r,n);return o(e)}if(r&&r.error_code>=0)o(r.data||{});else if(r&&r.error_code<0){try{window.zmpSentry&&window.zmpSentry.captureMessage(`${e.name}: call native fail`,{extra:{data:t,rs:r}})}catch(e){}return a(n)}}catch(e){return a(e)}})),u=kt().isIOS,c=(e=>{var t;const n=Pt(),r=(null===(t=null==e?void 0:e.version_live)||void 0===t?void 0:t.iOS)||0;return!!(Array.isArray(window.ignoreCheckSupport)&&window.ignoreCheckSupport.length>0&&window.ignoreCheckSupport.includes(e.name))||n>=r})(e);if(u&&!c){const t=new gt(-5,`${e}: Client isn't support this action`);return a(t)}(null==i?void 0:i.delay)?setTimeout((()=>{r(this,Jt,"f").jsCall(e,t,s,null==i?void 0:i.isMultiCallback,null==i?void 0:i.nRetry,null==i?void 0:i.haveTimeout)}),i.delay):r(this,Jt,"f").jsCall(e,t,s,null==i?void 0:i.isMultiCallback,null==i?void 0:i.nRetry,null==i?void 0:i.haveTimeout)}))}}Jt=new WeakMap;var Xt,en,tn,nn,rn;class on{static getVersion(){return"2.18.0"}static getSystemInfo(){return{version:It("version-id")||"",apiVersion:"2.18.0",zaloVersion:Pt(),platform:Rt(),language:navigator.language,zaloLanguage:window.zLanguage||"vi",zaloTheme:window.zTheme||"light"}}static getAppInfo(){return n(this,void 0,void 0,(function*(){const e=this.getAppId(),t=this.getSystemInfo();return yield Wt(e,0,t.version)}))}}class an{static setNavigationBarTitle(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.CHANGE_TITLE_HEADER,{title:e.title},{haveTimeout:!1})}))}static setNavigationBarColor(e){return n(this,void 0,void 0,(function*(){const t={};let n;s.isEmpty(e.textColor)||(t.textColor=e.textColor),s.isString(e.color)&&e.color.length>0?(s.isEmpty(e.color)||(t.backgroundColor=e.color),n=5):(s.isEmpty(e.statusBarColor)||(t.backgroundColor=e.statusBarColor),n=6),this.setActionBarConfig((e=>Object.assign(Object.assign({},e),{actionbarType:n,dataConfig:Object.assign(Object.assign({},e.dataConfig),t)}))),yield this.callNative(et.CHANGE_ACTIONBAR,Object.assign({},this.getActionBarConfig()),{haveTimeout:!1})}))}static setNavigationBarLeftButton(e){return n(this,void 0,void 0,(function*(){const t="none"===e.type||"home"===e.type?pt:ft,n="home"===e.type||"both"===e.type?ht:dt;this.setActionBarConfig((e=>Object.assign(Object.assign({},e),{buttonType:t,dataConfig:Object.assign(Object.assign({},e.dataConfig),{viewInLeftType:t}),homeConfig:Object.assign(Object.assign({},e.homeConfig),{enable:n})}))),yield this.callNative(et.CHANGE_ACTIONBAR_LEFTBUTTON_TYPE,Object.assign({},this.getActionBarConfig()),{haveTimeout:!1})}))}static setNavigationBarRightButton(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.CREATE_OPTIONS_MENU,{supportToolBar:e.supportToolBar,reset:e.reset,menuListItems:e.menuListItems,zapp:this.getAppId()})}))}}class sn{static setBackgroundColor(e){return n(this,void 0,void 0,(function*(){s.isString(e.backgroundColor)&&e.backgroundColor.length>0&&(yield this.callNative(et.CHANGE_ACTIONBAR,{actionbarType:this.isShowNavBar?5:6,dataConfig:{backgroundColor:e.backgroundColor,textColor:e.textColor}}))}))}}class un{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(" ")}}Xt=new WeakMap,en=new WeakMap,tn=new WeakMap,nn=new WeakMap,rn=new WeakMap;const cn=new class{constructor(){Xt.set(this,3),en.set(this,["none","error","warn","info"]),tn.set(this,"[zmp] > "),nn.set(this,{error:0,warn:0,info:0,firstError:null,lastError:null}),rn.set(this,((e,t,n)=>{r(this,nn,"f")[r(this,en,"f")[e]]++;const o=r(this,en,"f")[e];if(i(this,tn,r(this,tn,"f")+("string"!=typeof t?new un(t,o,e,n).toString():t),"f"),!(e>r(this,Xt,"f")))switch(e){case 1:console.error(r(this,tn,"f"));break;case 2:console.warn(r(this,tn,"f"));break;case 3:console.info(r(this,tn,"f"));break;default:throw new Error("internal")}}))}setLogLevel(e){i(this,Xt,e,"f")}info(e){r(this,rn,"f").call(this,3,e)}warn(e,t){r(this,rn,"f").call(this,2,e,t)}error(e,t){r(this,rn,"f").call(this,1,e,t)}getMetrics(){return r(this,nn,"f")}};class ln{static setDeviceOrientation(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.CHANGE_AUTOROTATE,{autoRotate:exports.OrientationType[e.rotate]})}))}static getNetworkType(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.WEBVIEW_NETWORKTYPE,{url:window.location.href,featureId:""}).then((e=>{const t=e.network;let n;const r=kt().isAndroid;switch(t){case Xe(r).NONE:n=exports.NetworkType.none;break;case Xe(r).WIFI:n=exports.NetworkType.wifi;break;case Xe(r)["2G"]:case Xe(r)["3G"]:case Xe(r)["4G"]:n=exports.NetworkType.cellular;break;default:n=exports.NetworkType.unknown}return{networkType:n}}))}))}static onNetworkStatusChange(e){return n(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=>{cn.error(e,"onNetworkStatusChange")}))}))}))}static startBeaconDiscovery(e){var t,r,i,o,a;return n(this,void 0,void 0,(function*(){const n={subaction:0,scanning_type:s.isNumber(null==e?void 0:e.scanningType)?e.scanningType:0,data:{scan_from_source:s.isString(null==e?void 0:e.scanFromSource)?e.scanFromSource:"",expire:s.isNumber(null==e?void 0:e.expire)?e.expire:3e3,monitor_interval:s.isNumber(null==e?void 0:e.monitorInterval)?e.monitorInterval:60,domain:s.isString(null==e?void 0:e.domain)?e.domain:"",scan_config:{scan_time:s.isNumber(null===(t=null==e?void 0:e.scanConfig)||void 0===t?void 0:t.scanTime)?e.scanConfig.scanTime:15e3,time_between_scan:s.isNumber(null===(r=null==e?void 0:e.scanConfig)||void 0===r?void 0:r.timeBetweenScan)?e.scanConfig.timeBetweenScan:1e4,beacon_timeout:s.isNumber(null===(i=null==e?void 0:e.scanConfig)||void 0===i?void 0:i.beaconTimeout)?e.scanConfig.beaconTimeout:3e4,delayCheckConnectedTimeout:s.isNumber(null===(o=null==e?void 0:e.scanConfig)||void 0===o?void 0:o.delayCheckConnectedTimeout)?e.scanConfig.delayCheckConnectedTimeout:5e3,beaconConnectedTimeout:s.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(et.SCAN_IBEACON,Object.assign({},n)),!0}))}static stopBeaconDiscovery(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.SCAN_IBEACON,Object.assign({},{subaction:2})),!0}))}static getBeacons(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.SCAN_IBEACON,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 n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static startBluetoothDevicesDiscovery(e){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},Object.assign({},e))}))}static openBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static onBluetoothDeviceFound(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static onBluetoothAdapterStateChange(){return n(this,void 0,void 0,(function*(){return Promise.resolve()}))}static getConnectedBluetoothDevices(e){return n(this,void 0,void 0,(function*(){const t={services:e.services||[]};return this.callNative({name:""},t)}))}static getBluetoothDevices(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static getBluetoothAdapterState(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static closeBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return this.callNative({name:""},{})}))}static scanQRCode(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.OPEN_QR,{skipOpenLink:!0})}))}static showToast(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.SHOW_TOAST,{toast:e.message})}))}static hideKeyboard(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.HIDE_KEYBOARD,{})}))}static openPhone(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.OPEN_PHONE,{phoneNum:e.phoneNumber,phoneCode:e.phoneNumber})}))}static openSMS(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.OPEN_SMS,{content:e.content,phoneCode:e.phoneNumber})}))}static keepScreen(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.KEEP_SCREEN,{data:{keep_screen_on:e.keepScreenOn?1:0}})}))}static openBioAuthentication(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.PROMPT_AUTHENTICATION,{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 n(this,void 0,void 0,(function*(){return yield this.callNative(et.PROMPT_AUTHENTICATION_CHECK_STATE,{}).then((e=>({bioState:null==e?void 0:e.bio_state})))}))}static vibrate(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.INTERACTIVE_VIBRATION,{type:exports.VibrateType[e.type],vibrate_time:e.milliseconds})}))}static connectWifi(e){return n(this,void 0,void 0,(function*(){let t="open";return s.isString(e.password)&&e.password.length>0&&(t="wpa_wpa2"),yield this.callNative(et.MP_JOIN_WIFI,{ssid:e.SSID,securityType:t,password:e.password,hiddenSsid:e.hiddenSSID})}))}}var fn,pn,hn,dn,vn,gn,mn,_n,yn,wn,bn,En,An,Cn,Sn,Tn,On,Nn,kn,In,Pn,Rn,xn,Bn,Dn,jn,Ln,Un;class Mn{constructor(e){fn.set(this,localStorage),pn.set(this,void 0),hn.set(this,void 0),kt(),i(this,hn,{keys:new Set,currentSize:0,limitSize:5242880},"f"),i(this,pn,e,"f"),this.findAllCurrentDataByApp(e)}findAllCurrentDataByApp(e){try{let t;for(t in r(this,fn,"f")){if(e){if(t.split("_")[0]!==e)continue}r(this,hn,"f").keys.add(t)}}catch(e){cn.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 r(this,pn,"f")&&(e=`${r(this,pn,"f")}_${e}`),r(this,hn,"f").keys.has(e)?r(this,fn,"f").getItem(e):null}set(e){return n(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){r(this,pn,"f")&&(e=`${r(this,pn,"f")}_${e}`),r(this,fn,"f").setItem(e,t),r(this,hn,"f").keys.add(e)}getInfo(){return n(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})(r(this,fn,"f"),r(this,pn,"f"));return{currentSize:s.isNumber(e)?Number((e/1024).toFixed(2)):0,limitSize:Number(5120..toFixed(2))}}remove(e){return n(this,void 0,void 0,(function*(){return e.forEach((e=>{this.removeSync(e)})),Promise.resolve({errorKeys:[]})}))}removeSync(e){r(this,pn,"f")&&(e=`${r(this,pn,"f")}_${e}`),r(this,hn,"f").keys.has(e)&&(r(this,fn,"f").removeItem(e),r(this,hn,"f").keys.delete(e))}clear(){return n(this,void 0,void 0,(function*(){return Promise.resolve(this.clearSync())}))}clearSync(){r(this,hn,"f").keys.forEach((e=>{r(this,pn,"f")&&e.indexOf(r(this,pn,"f"))<0||(r(this,fn,"f").removeItem(e),r(this,hn,"f").keys.delete(e))}))}}fn=new WeakMap,pn=new WeakMap,hn=new WeakMap;class Fn extends Yt{constructor(e){super(),dn.set(this,void 0),vn.set(this,void 0),i(this,vn,{keys:new Set,currentSize:0,limitSize:5242880},"f"),i(this,dn,e,"f")}get(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.ZBROWSER_MPDS,{mpds_action:"mpds.get",mpds_data:{keys:e},appId:r(this,dn,"f")},{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 n(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(et.ZBROWSER_MPDS,{mpds_action:"mpds.set",mpds_data:{map:e},appId:r(this,dn,"f")},{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 n(this,void 0,void 0,(function*(){const e=yield this.callNative(et.ZBROWSER_MPDS,{mpds_action:"mpds.get.size",mpds_data:{},appId:r(this,dn,"f")},{isMultiCallback:!1}).then((e=>{let t=0;return e&&e.mpds_data&&e.mpds_data.size&&(t=e.mpds_data.size),t}));return{currentSize:s.isNumber(e)?Number(e/1024):0,limitSize:Number(5120)}}))}remove(e){return n(this,void 0,void 0,(function*(){return{errorKeys:yield this.callNative(et.ZBROWSER_MPDS,{mpds_action:"mpds.remove.key",mpds_data:{keys:e},appId:r(this,dn,"f")},{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 n(this,void 0,void 0,(function*(){yield this.callNative(et.ZBROWSER_MPDS,{mpds_action:"mpds.clear.appData",mpds_data:{},appId:r(this,dn,"f")})}))}}dn=new WeakMap,vn=new WeakMap;class zn{getDataFromStorage(e){return n(this,void 0,void 0,(function*(){const t=this.getInstance(),n=yield t.get(e),r={};return n.forEach(((e,t)=>{r[t]=Mt(e)})),r}))}putDataToStorage(e){return n(this,void 0,void 0,(function*(){const t=this.getInstance(),n={};return Object.entries(e).forEach((([e,t])=>{s.isUndefined(t)||s.isNull(t)||(n[e]=Ut(t))})),yield t.set(n)}))}removeDataFromStorage(e){return n(this,void 0,void 0,(function*(){const t=this.getInstance();return yield t.remove(e)}))}clearStorage(){return n(this,void 0,void 0,(function*(){const e=this.getInstance();yield e.clear()}))}getStorageInfo(){return n(this,void 0,void 0,(function*(){const e=this.getInstance();return yield e.getInfo()}))}}class Wn extends zn{constructor(e){super(),gn.set(this,void 0),i(this,gn,e,"f")}getInstance(){return new Mn(r(this,gn,"f"))}}gn=new WeakMap;class Hn extends zn{constructor(e){super(),mn.set(this,void 0),i(this,mn,e,"f")}getInstance(){return new Fn(r(this,mn,"f"))}}mn=new WeakMap;class $n{static setStorage(e){return n(this,void 0,void 0,(function*(){let t=new Wn(this.getAppId());return Lt()&&(t=new Hn(this.getAppId())),yield t.putDataToStorage(e.data)}))}static getStorage(e){return n(this,void 0,void 0,(function*(){let t=new Wn(this.getAppId());Lt()&&(t=new Hn(this.getAppId()));return yield t.getDataFromStorage(e.keys)}))}static getStorageInfo(e){return n(this,void 0,void 0,(function*(){let e=new Wn(this.getAppId());return Lt()&&(e=new Hn(this.getAppId())),yield e.getStorageInfo()}))}static removeStorage(e){return n(this,void 0,void 0,(function*(){let t=new Wn(this.getAppId());return Lt()&&(t=new Hn(this.getAppId())),yield t.removeDataFromStorage(e.keys)}))}static clearStorage(e={}){return n(this,void 0,void 0,(function*(){let e=new Wn(this.getAppId());Lt()&&(e=new Hn(this.getAppId())),yield e.clearStorage()}))}}class Gn{static getUserInfo(e){return n(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 _e.get(Je,{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 n(this,void 0,void 0,(function*(){return yield this.callNative(et.MP_GET_NUMBER,{},{isMultiCallback:!0,callback:(e,t)=>{if(0===e.error_code){const t={number:e.data};return Promise.resolve(t)}return Promise.reject(t)},delay:this.isIOS?400:0})}))}}class Zn{static closeApp(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.WINDOW_CLOSE,{})}))}static openMiniApp(e){return n(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("&"),i=yield Wt(t,0);yield this.callNative(et.OPEN_MP,{mpUrl:`https://h5.zdn.vn/zapps/${t}/${r.length>0?"?"+r:""}`,mpInfo:{appId:t,appAvtUrl:i.logoUrl||"",appName:i.name||""}})}))}static openWebview(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.OPEN_INAPP,{url:e.url})}))}static closeLoading(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.MP_CLOSE_LOADINGVIEW,{at:(new Date).getTime(),when:e,url:location.href})}))}}class Vn{static getLocation(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.GET_LOCATION,{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:(e,t)=>{if(0===e.error_code){const t=e.data,n={latitude:t.latitude,longitude:t.longitude,timestamp:t.timestamp,provider:t.provider};return Promise.resolve(n)}return Promise.reject(t)},delay:this.isIOS?400:0})}))}static sendLocation(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.QUERY_LOCATION_HIDE,{title:e.title,touserid:e.toUserId,zapp:this.getZAppId()})}))}}class qn{static requestCameraPermission(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.REQUEST_PERMISSION_CAMERA,{},{callback:(e,t)=>-2===e.error_code||e.error_code>=0?Promise.resolve({userAllow:-2!==e.error_code,message:e.error_message}):Promise.reject(t)})}))}static saveImageToPhotosAlbum(e){return n(this,void 0,void 0,(function*(){let t={};return s.isEmpty(e.imageBase64Data)?s.isEmpty(e.imageUrl)||(t={imageUrl:e.imageUrl}):t={imageBase64Data:e.imageBase64Data},yield this.callNative(et.SAVE_IMAGE_GALLERY,Object.assign({},t))}))}}class Jn{static viewOAQr(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.VIEW_MYQR,{dpn:e.displayName,uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openProfile(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.OPEN_PROFILE,{uId:e.id,type:exports.ProfileType[e.type],zapp:this.getZAppId(),sourceId:e.sourceId,sourceIndex:e.sourceIndex})}))}static openChat(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.OPEN_CHAT,{uId:e.id,type:exports.ChatType[e.type],zapp:this.getZAppId(),sourceId:e.sourceId,sourceIndex:e.sourceIndex})}))}static openPostFeed(e){return n(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(et.OPEN_POSTFEED,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 n(this,void 0,void 0,(function*(){yield this.callNative(et.FOLLOW_OA,{uid:e.id,showDialogConfirm:!0,zapp:this.getZAppId()},{haveTimeout:!1})}))}static unfollowOA(e){return n(this,void 0,void 0,(function*(){yield this.callNative(et.UNFOLLOW_OA,{uid:e.id,zapp:this.getZAppId()},{haveTimeout:!1})}))}static openShareSheet(e){return n(this,void 0,void 0,(function*(){let t={};switch(e.type){case"image":t={photoUrls:e.data.imageUrls,caption:e.data.caption};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=yield this.getAccessToken(),r=yield Ft(this.getAppId(),n||"",e.data.title||"",e.data.description||"",e.data.thumbnail||"",e.data.path);window.forceShareZMP?t={data:{ZInstantAPIInfo:{url:`${r.zinstantApi}`,zinstantdata_id:`templateId=11412&appId=${this.getAppId()}&shareId=${r.shareId}`},previewMsgText:{msg:{en:"Mini App",vi:"Chương trình nhỏ"}},enableReactions:1}}:(t={link:r.shareableLink,chatOnly:e.data.chatOnly?1:0},e.type="link")}return yield this.callNative(et.OPEN_SHARESHEET,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,t,r){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.CREATE_SHORTCUT,{url:e,title:t,iconUrl:r})}))}static openProfilePicker(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.MP_OPEN_PROFILE_PICKER,{maxProfile:e},{isMultiCallback:!0,callback:(e,t)=>0===e.error_code&&Array.isArray(e.data)?Promise.resolve(e.data.map((e=>e.id))):Promise.reject(t)})}))}static getActionsSupported(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.GET_SUPPORTED_ACTIONS,{},{isMultiCallback:!1,callback:(e,t)=>{const n=Rt();if(Array.isArray(e.actions)&&e.actions.length>0){const t=Object.keys(et).filter((e=>et[e].skip_jump)),n={actions:[...e.actions,...t]};return Promise.resolve(n)}if(n===exports.PlatformType.iOS){const e={actions:lt};return Promise.resolve(e)}return Promise.reject(t)}})}))}static openMediaPicker(e,t,r,i){return n(this,void 0,void 0,(function*(){const n={type:0,url:"https://zapi-server.tungnt.xyz/upload/photos",maxSize:1048576};return yield this.callNative(et.PICK_MEDIA,{media_type:exports.MediaPickerType[e],edit_view:Object.assign(Object.assign({},{enable:1,aspect_ratio:"1:1"}),t),silent_request:r,upload:n,max_select_item:i},{isMultiCallback:!0,callback:(e,t)=>{var n,r;if(0===e.error_code){const t=Mt(null===(n=e.data)||void 0===n?void 0:n.result_content),i={urls:null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.urls};return Promise.resolve(i)}return Promise.reject(t)}})}))}static openOutApp(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.OPEN_OUTAPP,{url:e})}))}}class Kn{static getRouteParams(){let e={};const t=window.location.href;try{let n=new URL(t).searchParams.toString();n&&(e=Et.getParamsAsObject(n))}catch(e){throw new Error("Url không hợp lệ")}return e}static sendDataToPreviousMiniApp(e){return n(this,void 0,void 0,(function*(){return yield this.callNative(et.WEBVIEW_SET_RESULT,{result:Ut(e.data)})}))}static onCallbackData(e){return n(this,void 0,void 0,(function*(){yield this.events.on(exports.Events.OnDataCallback,(t=>{e({data:t})}))}))}}class Qn extends Yt{constructor(){var e,t,n,o,a,u,c,l,f,p,h,d,v,g,m,_,y;super(),_n.set(this,He),yn.set(this,$e),wn.set(this,Ge),bn.set(this,void 0),En.set(this,void 0),An.set(this,void 0),Cn.set(this,null),Sn.set(this,{timer:{getToken:0}}),Tn.set(this,void 0),On.set(this,void 0),Nn.set(this,null),this.events=$t.getInstance(),this.isIOS=kt().isIOS,kn.set(this,void 0),this.getActionBarConfig=()=>r(this,kn,"f"),this.setActionBarConfig=e=>{i(this,kn,e(r(this,kn,"f")),"f")},In.set(this,(()=>new Promise(((e,t)=>{s.isUndefined(r(this,Nn,"f"))||s.isNull(r(this,Nn,"f"))?this.callNative(et.JUMP_LOGIN,{}).then((t=>{const n=t&&t.cookiesOAuthLogins||[],r=n.find((e=>e.name===Ve));r&&(this.setJSToken(r.value),window.ZJSBridge.setJSToken&&window.ZJSBridge.setJSToken(r.value)),i(this,Nn,n,"f"),e(n)})).catch((e=>{t(e)})):e(r(this,Nn,"f"))})))),Pn.set(this,an.setNavigationBarRightButton),this.getVersion=on.getVersion,this.getSystemInfo=on.getSystemInfo,this.setNavigationBarTitle=an.setNavigationBarTitle,this.setNavigationBarColor=an.setNavigationBarColor,this.setNavigationBarLeftButton=an.setNavigationBarLeftButton,this.setBackgroundColor=sn.setBackgroundColor,this.setDeviceOrientation=ln.setDeviceOrientation,this.setStorage=$n.setStorage,this.getStorage=$n.getStorage,this.getStorageInfo=$n.getStorageInfo,this.removeStorage=$n.removeStorage,this.clearStorage=$n.clearStorage,this.getUserInfo=Gn.getUserInfo,this.getNetworkType=ln.getNetworkType,this.onNetworkStatusChange=ln.onNetworkStatusChange,this.startBeaconDiscovery=ln.startBeaconDiscovery,this.stopBeaconDiscovery=ln.stopBeaconDiscovery,this.getBeacons=ln.getBeacons,this.closeApp=Zn.closeApp,this.getLocation=Vn.getLocation,this.stopBluetoothDevicesDiscovery=ln.stopBluetoothDevicesDiscovery,this.startBluetoothDevicesDiscovery=ln.stopBluetoothDevicesDiscovery,this.openBluetoothAdapter=ln.openBluetoothAdapter,this.onBluetoothDeviceFound=ln.onBluetoothDeviceFound,this.onBluetoothAdapterStateChange=ln.onBluetoothAdapterStateChange,this.getConnectedBluetoothDevices=ln.getConnectedBluetoothDevices,this.getBluetoothDevices=ln.getBluetoothDevices,this.getBluetoothAdapterState=ln.getBluetoothAdapterState,this.closeBluetoothAdapter=ln.closeBluetoothAdapter,this.scanQRCode=ln.scanQRCode,this.openProfile=Jn.openProfile,this.openChat=Jn.openChat,this.openPostFeed=Jn.openPostFeed,this.followOA=Jn.followOA,this.unFollowOA=Jn.unfollowOA,this.openShareSheet=Jn.openShareSheet,this.requestCameraPermission=qn.requestCameraPermission,this.createShortcut=Jn.createShortcut,this.openBioAuthentication=ln.openBioAuthentication,this.checkStateBioAuthentication=ln.checkStateBioAuthentication,this.sendLocation=Vn.sendLocation,this.showToast=ln.showToast,this.hideKeyboard=ln.hideKeyboard,this.openPhone=ln.openPhone,this.openSMS=ln.openSMS,this.viewOAQr=Jn.viewOAQr,this.keepScreen=ln.keepScreen,this.saveImageToPhotosAlbum=qn.saveImageToPhotosAlbum,this.openMiniApp=Zn.openMiniApp,this.vibrate=ln.vibrate,this.openWebview=Zn.openWebview,this.getRouteParams=Kn.getRouteParams,this.getAppInfo=on.getAppInfo,this.sendDataToPreviousMiniApp=Kn.sendDataToPreviousMiniApp,this.onCallbackData=Kn.onCallbackData,this.getPhoneNumber=Gn.getPhoneNumber,this.openProfilePicker=Jn.openProfilePicker,Rn.set(this,Jn.getActionsSupported),this.connectWifi=ln.connectWifi,this.openMediaPicker=Jn.openMediaPicker,this.openOutApp=Jn.openOutApp,this.closeLoading=Zn.closeLoading,i(this,bn,null,"f"),i(this,En,null,"f"),i(this,An,null,"f"),this.isShowNavBar=!0,i(this,Tn,0,"f"),i(this,On,0,"f");const w="home"===(null===(t=null===(e=r(this,wn,"f"))||void 0===e?void 0:e.app)||void 0===t?void 0:t.leftButton)||"both"===(null===(o=null===(n=r(this,wn,"f"))||void 0===n?void 0:n.app)||void 0===o?void 0:o.leftButton)?ht:dt,b=new URL(location.href),E=s.isString(null===(u=null===(a=r(this,wn,"f"))||void 0===a?void 0:a.app)||void 0===u?void 0:u.headerColor)&&(null===(f=null===(l=null===(c=r(this,wn,"f"))||void 0===c?void 0:c.app)||void 0===l?void 0:l.headerColor)||void 0===f?void 0:f.length)>0?5:6,A="none"===(null===(h=null===(p=r(this,wn,"f"))||void 0===p?void 0:p.app)||void 0===h?void 0:h.leftButton)||"home"===(null===(v=null===(d=r(this,wn,"f"))||void 0===d?void 0:d.app)||void 0===v?void 0:v.leftButton)?pt:ft;i(this,kn,{actionbarType:E,buttonType:A,dataConfig:{backgroundColor:(null===(m=null===(g=r(this,wn,"f"))||void 0===g?void 0:g.app)||void 0===m?void 0:m.headerColor)||"",textColor:(null===(y=null===(_=r(this,wn,"f"))||void 0===_?void 0:_.app)||void 0===y?void 0:y.textColor)||"",viewInLeftType:A,confirmToExit:1},homeConfig:{enable:w,url:`https://h5.zdn.vn/zapps/${this.getAppId()}/${b.search}`}},"f")}static getInstance(){return Qn.instance||(Qn.instance=new Qn),Qn.instance}getLoginStatus(){return s.isString(r(this,An,"f"))&&r(this,An,"f").length>0}getAppId(){return r(this,yn,"f")}getZAppId(){return r(this,_n,"f")}login(e){return n(this,void 0,void 0,(function*(){const e=yield r(this,In,"f").call(this),t=e.find((e=>e.name===Ze)),n=e.find((e=>e.name===qe));if(!s.isUndefined(t)&&!s.isNull(t)&&s.isString(t.value)){if(i(this,bn,t.value,"f"),s.isUndefined(n)||s.isNull(n)||!s.isString(n.value)?yield this.loginZaloV3():(i(this,En,n.value,"f"),yield this.loginZaloV4()),!r(this,An,"f"))throw bt.loginFailed();return r(this,An,"f")}throw bt.loginFailed()}))}loginZaloV3(){return n(this,void 0,void 0,(function*(){return yield _e.get(Qe,{params:{app_id:r(this,_n,"f"),redirect_uri:`https://h5.zdn.vn/zapps/${r(this,yn,"f")}/`,code:r(this,bn,"f"),isSDK:!0}}).then((e=>{let t=e.data;if(t.access_token){i(this,An,t.access_token,"f");const e=1e3*parseInt(t.expires_in);return i(this,On,e,"f"),i(this,Tn,(new Date).getTime(),"f"),this.setZAccSession(r(this,An,"f")||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(r(this,An,"f")||""),r(this,An,"f")}return null}))}))}loginZaloV4(){return n(this,void 0,void 0,(function*(){const e=new URLSearchParams;e.append("app_id",r(this,yn,"f")),e.append("code",r(this,bn,"f")||""),e.append("code_verifier",r(this,En,"f")||""),s.isNull(r(this,Cn,"f"))?e.append("grant_type","authorization_code"):(e.append("grant_type","refresh_token"),e.append("refresh_token",r(this,Cn,"f")||""));return yield _e.post(Ke,e,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((e=>{const t=e.data;if(t.refresh_token&&i(this,Cn,t.refresh_token,"f"),t.access_token){i(this,An,t.access_token,"f");const e=1e3*parseInt(t.expires_in);return i(this,On,e,"f"),i(this,Tn,(new Date).getTime(),"f"),this.setZAccSession(r(this,An,"f")||""),window.ZJSBridge.setZAccSession&&window.ZJSBridge.setZAccSession(r(this,An,"f")||""),r(this,An,"f")}return null}))}))}getAccessToken(e){return n(this,void 0,void 0,(function*(){const e=(new Date).getTime()-r(this,Tn,"f");if(!r(this,An,"f"))throw bt.loginRequired();return e<r(this,On,"f")?r(this,An,"f"):yield this.login()}))}}_n=new WeakMap,yn=new WeakMap,wn=new WeakMap,bn=new WeakMap,En=new WeakMap,An=new WeakMap,Cn=new WeakMap,Sn=new WeakMap,Tn=new WeakMap,On=new WeakMap,Nn=new WeakMap,kn=new WeakMap,In=new WeakMap,Pn=new WeakMap,Rn=new WeakMap;class Yn{constructor(){xn.set(this,He),Bn.set(this,Ge),Dn.set(this,"DEFAULT ZOAUTH"),jn.set(this,"DEFAULT ACCESS TOKEN"),Ln.set(this,{timer:{getToken:0}}),Un.set(this,!1),this.getLoginStatus=()=>r(this,Un,"f"),this.getAppId=()=>r(this,xn,"f"),this.login=()=>(i(this,Un,!0,"f"),Promise.resolve(r(this,Dn,"f"))),this.getAccessToken=()=>Promise.resolve(r(this,jn,"f")),this.getVersion=on.getVersion,this.getSystemInfo=on.getSystemInfo,this.setNavigationBarTitle=()=>Promise.resolve(),this.setNavigationBarColor=()=>Promise.resolve(),this.setBackgroundColor=()=>Promise.resolve(),this.setNavigationBarLeftButton=()=>Promise.resolve(),this.setDeviceOrientation=()=>Promise.resolve(),this.setStorage=e=>n(this,void 0,void 0,(function*(){const t=new Wn(this.getAppId());return yield t.putDataToStorage(e.data),{errorKeys:[]}})),this.getStorage=e=>n(this,void 0,void 0,(function*(){const t=new Wn(this.getAppId());return yield t.getDataFromStorage(e.keys)})),this.getStorageInfo=e=>n(this,void 0,void 0,(function*(){const e=new Wn(this.getAppId());return yield e.getStorageInfo()})),this.removeStorage=e=>n(this,void 0,void 0,(function*(){const t=new Wn(this.getAppId());return yield t.removeDataFromStorage(e.keys)})),this.clearStorage=e=>n(this,void 0,void 0,(function*(){const e=new Wn(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=Kn.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:""})),this.openProfilePicker=()=>(console.warn("This api only works on zalo app"),Promise.resolve([])),this.connectWifi=()=>(console.warn("This api only works on zalo app"),Promise.resolve()),this.openOutApp=e=>(location.href=e,Promise.resolve()),this.closeLoading=e=>Promise.resolve()}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.")}openMediaPicker(e,t,n,r){return console.warn("This api only works on zalo app"),Promise.resolve({urls:[]})}}xn=new WeakMap,Bn=new WeakMap,Dn=new WeakMap,jn=new WeakMap,Ln=new WeakMap,Un=new WeakMap;const Xn=Symbol("required"),er=Symbol("checkType"),tr=(e,t)=>(n,r,i)=>{let o=Reflect.getOwnMetadata(Xn,n,r)||[];o.push({parameterIndex:i,fields:e,option:t}),Reflect.defineMetadata(Xn,o,n,r)},nr=(e,t,n)=>(r,i,o)=>{let a=Reflect.getOwnMetadata(er,r,i)||[];a.push({parameterIndex:o,type:e,properties:t,defaultValue:n}),Reflect.defineMetadata(er,a,r,i)};const rr=(e,t,n)=>{const r=n.value,i=r.toString().match(/\(.*?\)/)[0].replace(/[()]/gi,"").replace(/\s/gi,"").split(",");return n.value=function(){const n=Reflect.getOwnMetadata(Xn,e,t),o=Reflect.getOwnMetadata(er,e,t);return o&&o.forEach((e=>{const{parameterIndex:t,type:n,properties:r,defaultValue:o}=e;let a=arguments[t],u=i[t];const c=typeof a;if(!s.isUndefined(a)){if(!xt(a,n))throw bt.wrongTypeParam(u,n,Array.isArray(a)?"array":null===a?"null":c);"object"===n&&Object.entries(r).forEach((([e,n])=>{const r=e.split("?")[0],i=s.get(a,r);if(s.isUndefined(i)||s.isNull(i)){if(!e.includes("?"))throw bt.missingParam(e);s.isObject(s.get(a,r.split(".")[0]))&&o&&!s.isUndefined(s.get(o,r))&&s.set(arguments[t],r,s.get(o,r))}else if(s.isFunction(n)){const e=n(i);if(e&&e.error)throw bt.wrongTypeParam(`${u}.${r}`,e.errorMessage,typeof i)}}))}})),n&&n.forEach((e=>{const{parameterIndex:t,option:n,fields:r}=e,i=arguments[t],o=null==n?void 0:n.if,a=null==n?void 0:n.defaultValue;let u=!0;o&&(u=Object.keys(o).every((e=>s.get(i,e)===o[e]))),u&&r.forEach((e=>{if(s.isEmpty(s.get(i,e))){if(s.isUndefined(s.get(a,e)))throw bt.missingParam(e);s.set(arguments[t],e,s.get(a,e))}}))})),r.apply(this,arguments)},n};var ir,or;class ar{constructor(){this.events=$t.getInstance(),ir.set(this,void 0),i(this,ir,this.getServiceInstance(),"f"),this.events.addListener=(e,t,n)=>{const r=e;return this.events.addListener(exports.Events[r],t,n)}}login(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").login(e)}))}getLoginStatus(){return r(this,ir,"f").getLoginStatus()}getAccessToken(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getAccessToken(e)}))}getVersion(){return r(this,ir,"f").getVersion()}getSystemInfo(){return r(this,ir,"f").getSystemInfo()}setNavigationBarTitle(e){return n(this,void 0,void 0,(function*(){return r(this,ir,"f").setNavigationBarTitle(e)}))}setNavigationBarColor(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").setNavigationBarColor(e)}))}setBackgroundColor(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").setBackgroundColor(e)}))}setNavigationBarLeftButton(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").setNavigationBarLeftButton(e)}))}setDeviceOrientation(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").setDeviceOrientation(e)}))}setStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").setStorage(e)}))}getStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getStorage(e)}))}getStorageInfo(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getStorageInfo(e)}))}removeStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").removeStorage(e)}))}clearStorage(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").clearStorage(e)}))}getUserInfo(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getUserInfo(e)}))}getNetworkType(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getNetworkType(e)}))}onNetworkStatusChange(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").onNetworkStatusChange(e)}))}startBeaconDiscovery(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").startBeaconDiscovery(e)}))}stopBeaconDiscovery(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").stopBeaconDiscovery(e)}))}getBeacons(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getBeacons(e)}))}closeApp(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").closeApp(e)}))}getLocation(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getLocation(e)}))}stopBluetoothDevicesDiscovery(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").stopBluetoothDevicesDiscovery()}))}startBluetoothDevicesDiscovery(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").startBluetoothDevicesDiscovery(e)}))}openBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").openBluetoothAdapter()}))}onBluetoothDeviceFound(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").onBluetoothDeviceFound()}))}onBluetoothAdapterStateChange(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").onBluetoothAdapterStateChange()}))}getConnectedBluetoothDevices(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getConnectedBluetoothDevices(e)}))}getBluetoothDevices(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getBluetoothDevices()}))}getBluetoothAdapterState(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getBluetoothAdapterState()}))}closeBluetoothAdapter(){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").closeBluetoothAdapter()}))}scanQRCode(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").scanQRCode(e)}))}openProfile(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").openProfile(e)}))}openChat(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").openChat(e)}))}openPostFeed(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").openPostFeed(e)}))}followOA(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").followOA(e)}))}unfollowOA(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").unFollowOA(e)}))}openShareSheet(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").openShareSheet(e)}))}requestCameraPermission(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").requestCameraPermission(e)}))}createShortcut(e){return n(this,void 0,void 0,(function*(){const t=yield Wt($e,0),n=kt().isIOS,i=t.logoUrl||It("og:image:url")||"",o=t.name||document.title,a=e.params?new URLSearchParams(e.params):new URLSearchParams;if(a.append("utm_source","zalo-shortcut"),a.append("utm_medium","default"),a.append("utm_campaign","default"),n){a.append("appId",$e),a.append("appName",o),a.append("appIcon",i);const e=`https://mini.zalo.me/shortcut.html?${a.toString()}`;yield r(this,ir,"f").openOutApp(encodeURI(e))}else yield r(this,ir,"f").createShortcut(`https://zalo.me/app/link/zapps/${$e}/?${a.toString()}`,o,i);return wt()}))}openBioAuthentication(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").openBioAuthentication(e)}))}checkStateBioAuthentication(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").checkStateBioAuthentication(e)}))}sendLocation(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").sendLocation(e)}))}showToast(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").showToast(e)}))}hideKeyboard(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").hideKeyboard(e)}))}openPhone(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").openPhone(e)}))}openSMS(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").openSMS(e)}))}viewOAQr(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").viewOAQr(e)}))}keepScreen(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").keepScreen(e)}))}saveImageToGallery(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").saveImageToPhotosAlbum(e)}))}saveImageToPhotosAlbum(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").saveImageToPhotosAlbum(e)}))}openMiniApp(e){return n(this,void 0,void 0,(function*(){if(!s.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 r(this,ir,"f").openMiniApp(e)}))}vibrate(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").vibrate(e)}))}openWebview(e){return n(this,void 0,void 0,(function*(){yield r(this,ir,"f").openWebview(e)}))}getRouteParams(){return r(this,ir,"f").getRouteParams()}getAppInfo(e){return r(this,ir,"f").getAppInfo()}sendDataToPreviousMiniApp(e){return r(this,ir,"f").sendDataToPreviousMiniApp(e)}onCallbackData(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").onCallbackData(e)}))}getPhoneNumber(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").getPhoneNumber()}))}openProfilePicker(e){return n(this,void 0,void 0,(function*(){const t=yield r(this,ir,"f").openProfilePicker(e.maxProfile);let n;if(t.length>0)try{const e=yield this.getAccessToken(),r=(yield _e.post(Ye,{fields:"id,name,picture",user_ids:t},{headers:{"Content-Type":"application/json",access_token:e}})).data;if(0!==r.error||!r.data)throw new Error(r.message);n=t.map((e=>{var t,n,i,o,a,u,c,l,f;return{id:e,profile:{name:null===(n=null===(t=r.data[e])||void 0===t?void 0:t.user_info)||void 0===n?void 0:n.name,avatar:null===(u=null===(a=null===(o=null===(i=r.data[e])||void 0===i?void 0:i.user_info)||void 0===o?void 0:o.picture)||void 0===a?void 0:a.data)||void 0===u?void 0:u.url},code:0!==(null===(c=r.data[e])||void 0===c?void 0:c.error)?-1:0,message:`Get profile: ${s.isUndefined(null===(l=r.data[e])||void 0===l?void 0:l.message)?"Unknown error":null===(f=r.data[e])||void 0===f?void 0:f.message}`}}))}catch(e){n=t.map((t=>({id:t,profile:{name:"",avatar:""},code:-1,message:`Can't get profile: ${e.message}`})))}return{users:n||[]}}))}connectWifi(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").connectWifi(e)}))}openMediaPicker(e){var t,i,o;return n(this,void 0,void 0,(function*(){const n={};s.isUndefined(null===(t=e.editView)||void 0===t?void 0:t.enable)||(null===(i=e.editView)||void 0===i?void 0:i.enable)?n.enable=1:n.enable=0,n.aspect_ratio=null===(o=e.editView)||void 0===o?void 0:o.aspectRatio;const a=!0===e.silentRequest?1:0,u=e.maxSelectItem;return yield r(this,ir,"f").openMediaPicker(e.type,n,a,u)}))}getShareableLink(e){return n(this,void 0,void 0,(function*(){const t=yield this.getAccessToken();return(yield Ft(window.APP_ID,t||"",e.title,e.description,e.thumbnail,e.path)).shareableLink}))}closeLoading(e){return n(this,void 0,void 0,(function*(){return yield r(this,ir,"f").closeLoading("user action")}))}}ir=new WeakMap,e([_t],ar.prototype,"login",null),e([yt],ar.prototype,"getLoginStatus",null),e([_t],ar.prototype,"getAccessToken",null),e([yt],ar.prototype,"getVersion",null),e([yt],ar.prototype,"getSystemInfo",null),e([_t,rr,t(0,nr("object",{title:zt("string")}))],ar.prototype,"setNavigationBarTitle",null),e([_t,rr,t(0,nr("object",{color:zt("string"),"textColor?":zt("string",{values:["white","black"]}),"statusBarColor?":zt("string")}))],ar.prototype,"setNavigationBarColor",null),e([_t,rr,t(0,nr("object",{backgroundColor:zt("string"),"textColor?":zt("string",{values:["white","black"]})}))],ar.prototype,"setBackgroundColor",null),e([_t,rr,t(0,nr("object",{type:zt("string",{values:["none","back","home","both"]})}))],ar.prototype,"setNavigationBarLeftButton",null),e([_t,rr,t(0,nr("object",{rotate:zt("string",{values:["auto","portrait","landscape"]})}))],ar.prototype,"setDeviceOrientation",null),e([_t,rr,t(0,nr("object",{data:zt("object")}))],ar.prototype,"setStorage",null),e([_t,rr,t(0,nr("object",{keys:zt("array<string>")}))],ar.prototype,"getStorage",null),e([_t],ar.prototype,"getStorageInfo",null),e([_t,rr,t(0,nr("object",{keys:zt("array<string>")}))],ar.prototype,"removeStorage",null),e([_t],ar.prototype,"clearStorage",null),e([_t,rr,t(0,nr("object",{"avatarType?":zt("string",{values:["small","normal","large"]})}))],ar.prototype,"getUserInfo",null),e([_t],ar.prototype,"getNetworkType",null),e([_t],ar.prototype,"onNetworkStatusChange",null),e([_t],ar.prototype,"startBeaconDiscovery",null),e([_t],ar.prototype,"stopBeaconDiscovery",null),e([_t],ar.prototype,"getBeacons",null),e([_t],ar.prototype,"closeApp",null),e([_t],ar.prototype,"getLocation",null),e([_t],ar.prototype,"stopBluetoothDevicesDiscovery",null),e([_t],ar.prototype,"startBluetoothDevicesDiscovery",null),e([_t],ar.prototype,"openBluetoothAdapter",null),e([_t],ar.prototype,"onBluetoothDeviceFound",null),e([_t],ar.prototype,"onBluetoothAdapterStateChange",null),e([_t],ar.prototype,"getConnectedBluetoothDevices",null),e([_t],ar.prototype,"getBluetoothDevices",null),e([_t],ar.prototype,"getBluetoothAdapterState",null),e([_t],ar.prototype,"closeBluetoothAdapter",null),e([_t],ar.prototype,"scanQRCode",null),e([_t,rr,t(0,nr("object",{type:zt("string",{values:["user","oa","aliasOA"]}),id:zt("string")}))],ar.prototype,"openProfile",null),e([_t,rr,t(0,nr("object",{type:zt("string",{values:["user","oa"]}),id:zt("string")}))],ar.prototype,"openChat",null),e([_t,rr,t(0,tr(["data.imageUrl"],{if:{type:"image"}})),t(0,tr(["data.link"],{if:{type:"link"}})),t(0,tr(["data.id"],{if:{type:"profile"}})),t(0,nr("object",{type:zt("string",{values:["image","link","profile"]}),data:zt("object"),"data.imageUrl?":zt("url"),"data.link?":zt("url"),"data.title?":zt("string"),"data.thumb?":zt("url"),"data.description?":zt("string"),"data.avatar?":zt("url"),"data.id?":zt("string"),"data.displayName?":zt("string")}))],ar.prototype,"openPostFeed",null),e([_t,rr,t(0,nr("object",{id:zt("string"),"showDialogConfirm?":zt("boolean")}))],ar.prototype,"followOA",null),e([_t,rr,t(0,nr("object",{id:zt("string")}))],ar.prototype,"unfollowOA",null),e([_t,rr,t(0,tr(["data.imageUrls"],{if:{type:"image"}})),t(0,tr(["data.link"],{if:{type:"link"}})),t(0,tr(["data.id"],{if:{type:"oa"}})),t(0,tr(["data.gifUrl"],{if:{type:"gif"}})),t(0,tr(["data.videoThumb","data.videoUrl"],{if:{type:"video"}})),t(0,tr(["data.thumbnail","data.title","data.description"],{if:{type:"zmp"},defaultValue:{data:{description:""}}})),t(0,nr("object",{type:zt("string",{values:["image","gif","video","link","oa","zmp"]}),data:zt("object"),"data.imageUrl?":zt("url"),"data.imageUrls?":zt("array<url>",{maxLength:10}),"data.caption?":zt("string"),"data.gifUrl?":zt("url"),"data.width?":zt("number"),"data.height?":zt("number"),"data.videoThumb?":zt("url"),"data.videoUrl?":zt("url"),"data.link?":zt("url"),"data.chatOnly?":zt("boolean"),"data.id?":zt("string"),"data.thumbnail?":zt("url"),"data.path?":zt("string"),"data.title?":zt("string",{maxLength:100}),"data.description?":zt(["string"],{maxLength:400})}))],ar.prototype,"openShareSheet",null),e([_t],ar.prototype,"requestCameraPermission",null),e([_t],ar.prototype,"createShortcut",null),e([_t,rr,t(0,nr("object",{secretData:zt("string"),"ui?":zt("object"),"ui.title?":zt("string"),"ui.subTitle?":zt("string"),"ui.negativeButtonText?":zt("string"),"requireFingerprint?":zt("boolean")},{requireFingerprint:!0,ui:{title:"Xác thực",subTitle:"Sử dụng sinh trắc học của bạn để xác thực",negativeButtonText:"Đóng"}}))],ar.prototype,"openBioAuthentication",null),e([_t],ar.prototype,"checkStateBioAuthentication",null),e([_t,rr,t(0,nr("object",{toUserId:zt("string"),"title?":zt("string")}))],ar.prototype,"sendLocation",null),e([_t,rr,t(0,nr("object",{message:zt("string")}))],ar.prototype,"showToast",null),e([_t],ar.prototype,"hideKeyboard",null),e([_t,rr,t(0,nr("object",{phoneNumber:zt("string")}))],ar.prototype,"openPhone",null),e([_t,rr,t(0,nr("object",{content:zt("string"),phoneNumber:zt("string",{regex:/^\+?\d+$/})}))],ar.prototype,"openSMS",null),e([_t,rr,t(0,nr("object",{id:zt("string"),"displayName?":zt("string")},{displayName:""}))],ar.prototype,"viewOAQr",null),e([_t],ar.prototype,"keepScreen",null),e([_t,rr,t(0,nr("object",{"imageBase64Data?":zt("string"),"imageUrl?":zt("url")}))],ar.prototype,"saveImageToGallery",null),e([_t,rr,t(0,nr("object",{"imageBase64Data?":zt("string"),"imageUrl?":zt("url")}))],ar.prototype,"saveImageToPhotosAlbum",null),e([_t,rr,t(0,nr("object",{appId:zt("string"),"params?":zt("object")}))],ar.prototype,"openMiniApp",null),e([_t,rr,t(0,nr("object",{"type?":zt("string",{values:["oneShot"]}),"milliseconds?":zt("number")},{type:"oneShot",milliseconds:500}))],ar.prototype,"vibrate",null),e([_t,rr,t(0,nr("object",{url:zt("string")}))],ar.prototype,"openWebview",null),e([yt],ar.prototype,"getRouteParams",null),e([_t],ar.prototype,"getAppInfo",null),e([_t],ar.prototype,"sendDataToPreviousMiniApp",null),e([_t],ar.prototype,"onCallbackData",null),e([_t],ar.prototype,"getPhoneNumber",null),e([_t,rr,t(0,nr("object",{"maxProfile?":zt("number",{min:1,max:10})},{maxProfile:1}))],ar.prototype,"openProfilePicker",null),e([_t,rr,t(0,tr(["SSID"])),t(0,nr("object",{SSID:zt("string"),"password?":zt("string"),"hiddenSSID?":zt("boolean")}))],ar.prototype,"connectWifi",null),e([_t,rr,t(0,nr("object",{type:zt("string",{values:["photo","video","file","multi_photo","multi_video"]}),"editView?":zt("object"),"editView.enable?":zt("boolean"),"editView.aspectRatio?":zt("string",{regex:/^\d+:\d+$/}),"silentRequest?":zt("boolean"),"maxSelectItem?":zt("number",{min:1})}))],ar.prototype,"openMediaPicker",null),e([_t,rr,t(0,nr("object",{title:zt("string",{maxLength:100}),"thumbnail?":zt("url"),"path?":zt("url"),description:zt(["string"],{maxLength:400})},{description:""}))],ar.prototype,"getShareableLink",null),e([_t,rr],ar.prototype,"closeLoading",null);class sr extends ar{getServiceInstance(){return Qn.getInstance()}}class ur extends ar{getServiceInstance(){return new Yn}}const cr=kt();exports.default=void 0,window.onJSCall=e=>function(t){Qt.getInstance().onJSCall(e,t)},window.onMultiJSCall=e=>function(t){Qt.getInstance().onMultiJSCall(e,t)};const lr=null===(or=null===window||void 0===window?void 0:window.zaloJSV2)||void 0===or?void 0:or.zalo_h5_event_handler;window.zaloJSV2={zalo_h5_event_handler:function(e,t,n){"function"==typeof lr&&lr(e,t,n),Qt.getInstance().nativeEventHandler(e,t,n)}},cr.isZalo?exports.default=new sr:exports.default=new ur,window.ZaloMiniAppSDK=exports.default,exports.SDKCreator=ar,exports.default=exports.default;
|