UNPKG

leaflet.tilelayer.glcolorscale

Version:

Custom Leaflet TileLayer using WebGL to colorize floating-point pixels according to a specified color scale

1 lines 291 kB
this.L=this.L||{},this.L.TileLayer=this.L.TileLayer||{},this.L.TileLayer.GLColorScale=function(e){"use strict";var io=Math.sqrt,ro=Math.abs,oo=Math.floor,so=Math.ceil,lo=Math.min,fo=Math.max,uo=String.fromCharCode;function t(e,t){function n(){this.constructor=e}co(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function n(e,t,n,a){return new(n||(n=Promise))(function(i,r){function o(e){try{l(a.next(e))}catch(t){r(t)}}function s(e){try{l(a["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((a=a.apply(e,t||[])).next())})}function a(e,n){function a(e){return function(t){return i([e,t])}}function i(t){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,s&&(l=2&t[0]?s["return"]:t[0]?s["throw"]||((l=s["return"])&&l.call(s),0):s.next)&&!(l=l.call(s,t[1])).done)return l;switch((s=0,l)&&(t=[2&t[0],l.value]),t[0]){case 0:case 1:l=t;break;case 4:return r.label++,{value:t[1],done:!1};case 5:r.label++,s=t[1],t=[0];continue;case 7:t=r.ops.pop(),r.trys.pop();continue;default:if((l=r.trys,!(l=0<l.length&&l[l.length-1]))&&(6===t[0]||2===t[0])){r=0;continue}if(3===t[0]&&(!l||t[1]>l[0]&&t[1]<l[3])){r.label=t[1];break}if(6===t[0]&&r.label<l[1]){r.label=l[1],l=t;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(t);break}l[2]&&r.ops.pop(),r.trys.pop();continue;}t=n.call(e,r)}catch(n){t=[6,n],s=0}finally{o=l=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}var r={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},o,s,l,d;return d={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(d[Symbol.iterator]=function(){return this}),d}function i(e){var t=yo.call(e,vo),n=e[vo];try{e[vo]=void 0;var a=!0}catch(t){}var i=xo.call(e);return a&&(t?e[vo]=n:delete e[vo]),i}function r(e){return So.call(e)}function o(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ko&&ko in Object(e)?i(e):r(e)}function s(e){return null!=e&&"object"==typeof e}function l(e){return"symbol"==typeof e||s(e)&&o(e)=="[object Symbol]"}function d(e){return"number"==typeof e?e:l(e)?To:+e}function f(e,t){for(var n=-1,a=null==e?0:e.length,i=Array(a);++n<a;)i[n]=t(e[n],n,e);return i}function u(e){if("string"==typeof e)return e;if(Eo(e))return f(e,u)+"";if(l(e))return Co?Co.call(e):"";var t=e+"";return"0"==t&&1/e==-Ao?"-0":t}function c(e,t){return function(n,a){var i;if(void 0===n&&void 0===a)return t;if(void 0!==n&&(i=n),void 0!==a){if(void 0===i)return a;"string"==typeof n||"string"==typeof a?(n=u(n),a=u(a)):(n=d(n),a=d(a)),i=e(n,a)}return i}}function p(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if(l(e))return Lo;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(zo,"");var n=Do.test(e);return n||Ro.test(e)?No(e.slice(2),n?2:8):jo.test(e)?Lo:+e}function m(e){if(!e)return 0===e?e:0;if(e=h(e),e===Fo||e===-Fo){var t=0>e?-1:1;return 1.7976931348623157e+308*t}return e===e?e:0}function g(e){var t=m(e),n=t%1;return t===t?n?t-n:t:0}function b(e){return e}function _(e){if(!p(e))return!1;var t=o(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"}function y(e){return!!Po&&Po in e}function x(e){if(null!=e){try{return Vo.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function v(e){if(!p(e)||y(e))return!1;var t=_(e)?Xo:Go;return t.test(x(e))}function w(e,t){return null==e?void 0:e[t]}function S(e,t){var n=w(e,t);return v(n)?n:void 0}function k(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=Jo(e.prototype),a=e.apply(n,t);return p(a)?a:n}}function T(e,t,n){function a(){var t=this&&this!==go&&this instanceof a?r:e;return t.apply(i?n:this,arguments)}var i=t&1,r=k(e);return a}function E(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 A(e,t,n,a){for(var i=-1,r=e.length,o=n.length,s=-1,l=t.length,d=es(r-o,0),f=Array(l+d),u=!a;++s<l;)f[s]=t[s];for(;++i<o;)(u||i<r)&&(f[n[i]]=e[i]);for(;d--;)f[s++]=e[i++];return f}function B(e,t,n,a){for(var i=-1,r=e.length,o=-1,s=n.length,l=-1,d=t.length,f=ts(r-s,0),u=Array(f+d),c=!a;++i<f;)u[i]=e[i];for(var p=i;++l<d;)u[p+l]=t[l];for(;++o<s;)(c||i<r)&&(u[p+n[o]]=e[i++]);return u}function C(e,t){for(var n=e.length,a=0;n--;)e[n]===t&&++a;return a}function I(){}function z(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function j(){}function D(e){for(var t=e.name+"",n=as[t],a=rs.call(as,t)?n.length:0;a--;){var i=n[a],r=i.func;if(null==r||r==e)return i.name}return t}function R(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function N(e,t){var n=-1,a=e.length;for(t||(t=Array(a));++n<a;)t[n]=e[n];return t}function F(e){if(e instanceof z)return e.clone();var t=new R(e.__wrapped__,e.__chain__);return t.__actions__=N(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function O(e){if(s(e)&&!Eo(e)&&!(e instanceof z)){if(e instanceof R)return e;if(ss.call(e,"__wrapped__"))return F(e)}return new R(e)}function P(e){var t=D(e),n=O[t];if("function"!=typeof n||!(t in z.prototype))return!1;if(e===n)return!0;var a=ns(n);return!!a&&e===a[0]}function M(e){var t=0,n=0;return function(){var a=ls(),i=16-(a-n);if(n=a,!(0<i))t=0;else if(800<=++t)return arguments[0];return e.apply(void 0,arguments)}}function V(e){var t=e.match(fs);return t?t[1].split(us):[]}function W(e,t){var n=t.length;if(!n)return e;var a=n-1;return t[a]=(1<n?"& ":"")+t[a],t=t.join(2<n?", ":" "),e.replace(cs,"{\n/* [wrapped with "+t+"] */\n")}function G(e){return function(){return e}}function H(e,t){for(var n=-1,a=null==e?0:e.length;++n<a&&!(!1===t(e[n],n,e)););return e}function U(e,t,n,a){for(var i=e.length,r=n+(a?1:-1);a?r--:++r<i;)if(t(e[r],r,e))return r;return-1}function Z(e){return e!==e}function X(e,t,n){for(var a=n-1,i=e.length;++a<i;)if(e[a]===t)return a;return-1}function K(e,t,n){return t===t?X(e,t,n):U(e,Z,n)}function Y(e,t){var n=null==e?0:e.length;return!!n&&-1<K(e,t,0)}function Q(e,t){return H(gs,function(n){var a="_."+n[0];t&n[1]&&!Y(e,a)&&e.push(a)}),e.sort()}function $(e,t,n){var a=t+"";return ms(e,W(a,Q(V(a),n)))}function J(e,t,n,a,i,r,o,s,l,d){var f=8&t,u=f?o:void 0,c=f?void 0:o,p=f?r:void 0,h=f?void 0:r;t|=f?32:64,t&=~(f?64:32),4&t||(t&=-4);var m=[e,t,i,p,u,h,c,s,l,d],g=n.apply(void 0,m);return P(e)&&ds(g,m),g.placeholder=a,$(g,e,t)}function ee(e){return e.placeholder}function te(e,t){var n=typeof e;return t=null==t?9007199254740991:t,!!t&&("number"==n||"symbol"!=n&&bs.test(e))&&-1<e&&0==e%1&&e<t}function ne(e,t){for(var n=e.length,a=_s(t.length,n),i=N(e);a--;){var r=t[a];e[a]=te(r,n)?i[r]:void 0}return e}function ae(e,t){for(var n=-1,a=e.length,i=0,r=[];++n<a;){var o=e[n];(o===t||o==="__lodash_placeholder__")&&(e[n]="__lodash_placeholder__",r[i++]=n)}return r}function ie(e,t,n,a,i,r,o,s,l,d){function f(){for(var b=arguments.length,_=Array(b),y=b;y--;)_[y]=arguments[y];if(h)var x=ee(f),v=C(_,x);if(a&&(_=A(_,a,i,h)),r&&(_=B(_,r,o,h)),b-=v,h&&b<d){var w=ae(_,x);return J(e,t,ie,f.placeholder,n,_,w,s,l,d-b)}var S=c?n:this,T=p?S[e]:e;return b=_.length,s?_=ne(_,s):m&&1<b&&_.reverse(),u&&l<b&&(_.length=l),this&&this!==go&&this instanceof f&&(T=g||k(T)),T.apply(S,_)}var u=t&128,c=t&1,p=t&2,h=t&24,m=t&512,g=p?void 0:k(e);return f}function re(e,t,n){function a(){for(var r=arguments.length,o=Array(r),s=r,l=ee(a);s--;)o[s]=arguments[s];var d=3>r&&o[0]!==l&&o[r-1]!==l?[]:ae(o,l);if(r-=d.length,r<n)return J(e,t,ie,a.placeholder,void 0,o,d,void 0,void 0,n-r);var f=this&&this!==go&&this instanceof a?i:e;return E(f,this,o)}var i=k(e);return a}function oe(e,t,n,a){function i(){for(var t=-1,s=arguments.length,l=-1,d=a.length,f=Array(d+s),u=this&&this!==go&&this instanceof i?o:e;++l<d;)f[l]=a[l];for(;s--;)f[l++]=arguments[++t];return E(u,r?n:this,f)}var r=t&1,o=k(e);return i}function se(e,t){var n=e[1],a=t[1],i=n|a,r=131>i,o=128==a&&8==n||128==a&&256==n&&e[7].length<=t[8]||384==a&&t[7].length<=t[8]&&8==n;if(!(r||o))return e;1&a&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?A(l,s,t[4]):s,e[4]=l?ae(e[3],"__lodash_placeholder__"):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?B(l,s,t[6]):s,e[6]=l?ae(e[5],"__lodash_placeholder__"):t[6]),s=t[7],s&&(e[7]=s),128&a&&(e[8]=null==e[8]?t[8]:ys(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function le(e,t,n,a,i,r,o,s){var l=2&t;if(!l&&"function"!=typeof e)throw new TypeError("Expected a function");var d=a?a.length:0;if(d||(t&=-97,a=i=void 0),o=void 0===o?o:xs(g(o),0),s=void 0===s?s:g(s),d-=i?i.length:0,64&t){var f=a,u=i;a=i=void 0}var c=l?void 0:ns(e),p=[e,t,n,a,i,f,u,r,o,s];if(c&&se(p,c),e=p[0],t=p[1],n=p[2],a=p[3],i=p[4],s=p[9]=void 0===p[9]?l?0:e.length:xs(p[9]-d,0),!s&&24&t&&(t&=-25),!t||1==t)var h=T(e,t,n);else h=8==t||16==t?re(e,t,s):32!=t&&33!=t||i.length?ie.apply(void 0,p):oe(e,t,n,a);var m=c?Qo:ds;return $(m(h,p),e,t)}function de(e,t,a){return t=a?void 0:t,t=e&&null==t?e.length:t,le(e,128,void 0,void 0,void 0,void 0,t)}function fe(e,t,n){"__proto__"==t&&ps?ps(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ue(e,t){return e===t||e!==e&&t!==t}function ce(e,t,n){var a=e[t];ws.call(e,t)&&ue(a,n)&&(n!==void 0||t in e)||fe(e,t,n)}function pe(e,t,n,a){var i=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var s=t[r],l=a?a(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?fe(n,s,l):ce(n,s,l)}return n}function he(e,t,n){return t=Ss(void 0===t?e.length-1:t,0),function(){for(var a=arguments,i=-1,r=Ss(a.length-t,0),o=Array(r);++i<r;)o[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(o),E(e,this,s)}}function me(e,t){return ms(he(e,t,b),e+"")}function ge(e){return"number"==typeof e&&-1<e&&0==e%1&&e<=9007199254740991}function be(e){return null!=e&&ge(e.length)&&!_(e)}function _e(e,t,n){if(!p(n))return!1;var a=typeof t;return!("number"==a?!(be(n)&&te(t,n.length)):!("string"==a&&t in n))&&ue(n[t],e)}function ye(e){return me(function(t,n){var a=-1,i=n.length,r=1<i?n[i-1]:void 0,o=2<i?n[2]:void 0;for(r=3<e.length&&"function"==typeof r?(i--,r):void 0,o&&_e(n[0],n[1],o)&&(r=3>i?void 0:r,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,r)}return t})}function xe(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||ks;return e===n}function ve(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}function we(e){return s(e)&&o(e)=="[object Arguments]"}function Se(){return!1}function ke(e){return function(t){return e(t)}}function Te(e,t){var n=Eo(e),a=!n&&Bs(e),i=!n&&!a&&Ds(e),r=!n&&!a&&!i&&Ws(e),o=n||a||i||r,s=o?ve(e.length,String):[],l=s.length;for(var d in e)(t||Hs.call(e,d))&&!(o&&("length"==d||i&&("offset"==d||"parent"==d)||r&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||te(d,l)))&&s.push(d);return s}function Ee(e,t){return function(n){return e(t(n))}}function Ae(e){if(!xe(e))return Us(e);var t=[];for(var n in Object(e))Zs.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Be(e){return be(e)?Te(e):Ae(e)}function Ce(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}function Ie(e){if(!p(e))return Ce(e);var t=xe(e),n=[];for(var a in e)("constructor"!=a||!t&&$s.call(e,a))&&n.push(a);return n}function Le(e){return be(e)?Te(e,!0):Ie(e)}function ze(e,t){if(Eo(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||l(e))||al.test(e)||!nl.test(e)||null!=t&&e in Object(t)}function je(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function De(e,t){for(var n=e.length;n--;)if(ue(e[n][0],t))return n;return-1}function Re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function Ne(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Fe(e,t){var n=e.__data__;return Ne(t)?n["string"==typeof t?"string":"hash"]:n.map}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}function Pe(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var a=arguments,i=t?t.apply(this,a):a[0],r=n.cache;if(r.has(i))return r.get(i);var o=e.apply(this,a);return n.cache=r.set(i,o)||r,o};return n.cache=new(Pe.Cache||Oe),n}function Me(e){return null==e?"":u(e)}function Ve(e,t){return Eo(e)?e:ze(e,t)?[e]:hl(Me(e))}function We(e){if("string"==typeof e||l(e))return e;var t=e+"";return"0"==t&&1/e==-ml?"-0":t}function Ge(e,t){t=Ve(t,e);for(var n=0,a=t.length;null!=e&&n<a;)e=e[We(t[n++])];return n&&n==a?e:void 0}function He(e,t,n){var a=null==e?void 0:Ge(e,t);return a===void 0?n:a}function Ue(e,t){for(var n=-1,a=t.length,i=Array(a);++n<a;)i[n]=null==e?void 0:He(e,t[n]);return i}function qe(e,t){for(var n=-1,a=t.length,i=e.length;++n<a;)e[i+n]=t[n];return e}function Ze(e){return Eo(e)||Bs(e)||!!(gl&&e&&e[gl])}function Xe(e,t,n,a,i){var r=-1,o=e.length;for(n||(n=Ze),i||(i=[]);++r<o;){var s=e[r];0<t&&n(s)?1<t?Xe(s,t-1,n,a,i):qe(i,s):!a&&(i[i.length]=s)}return i}function Ke(e){var t=null==e?0:e.length;return t?Xe(e,1):[]}function Ye(e){return ms(he(e,void 0,Ke),e+"")}function Qe(e){if(!s(e)||o(e)!="[object Object]")return!1;var t=at(e);if(null===t)return!0;var n=vl.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xl.call(n)==wl}function $e(e){if(!s(e))return!1;var t=o(e);return t=="[object Error]"||t=="[object DOMException]"||"string"==typeof e.message&&"string"==typeof e.name&&!Qe(e)}function Je(e,t){var a;if("function"!=typeof t)throw new TypeError("Expected a function");return e=g(e),function(){return 0<--e&&(a=t.apply(this,arguments)),1>=e&&(t=void 0),a}}function et(e,t,n){var a=-1,i=e.length;0>t&&(t=-t>i?0:i+t),n=n>i?i:n,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(i);++a<i;)r[a]=e[a+t];return r}function tt(e,t,n){var a=e.length;return n=void 0===n?a:n,!t&&n>=a?e:et(e,t,n)}function nt(e){return Al.test(e)}function it(e){return e.split("")}function rt(e){return e.match(Ol)||[]}function ot(e){return nt(e)?rt(e):it(e)}function st(e){return function(t){t=Me(t);var n=nt(t)?ot(t):void 0,a=n?n[0]:t.charAt(0),i=n?tt(n,1).join(""):t.slice(1);return a[e]()+i}}function dt(e){return Pl(Me(e).toLowerCase())}function ft(e,t,n,a){var i=-1,r=null==e?0:e.length;for(a&&r&&(n=e[++i]);++i<r;)n=t(n,e[i],i,e);return n}function ut(e){return function(t){return null==e?void 0:e[t]}}function ct(e){return e=Me(e),e&&e.replace(Vl,Ml).replace(Wl,"")}function pt(e){return e.match(Gl)||[]}function ht(e){return Hl.test(e)}function mt(e){return e.match(ud)||[]}function bt(e,t,n){return e=Me(e),t=n?void 0:t,void 0===t?ht(e)?mt(e):pt(e):e.match(t)||[]}function _t(e){return function(t){return ft(bt(ct(t).replace(cd,"")),e,"")}}function yt(e){var t=Math[e];return function(e,n){if(e=h(e),n=null==n?0:hd(g(n),292),n){var a=(Me(e)+"e").split("e"),i=t(a[0]+"e"+(+a[1]+n));return a=(Me(i)+"e").split("e"),+(a[0]+"e"+(+a[1]-n))}return t(e)}}function xt(e){var t=O(e);return t.__chain__=!0,t}function vt(e,t,n){t=(n?_e(e,t,n):void 0===t)?1:bd(g(t),0);var a=null==e?0:e.length;if(!a||1>t)return[];for(var i=0,r=0,o=Array(gd(a/t));i<a;)o[r++]=et(e,i,i+=t);return o}function wt(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function St(e){var t=this.__data__=new Re(e);this.size=t.size}function kt(e,t){return e&&pe(t,Be(t),e)}function Tt(e,t){return e&&pe(t,Le(t),e)}function Et(e,t){if(t)return e.slice();var n=e.length,a=wd?wd(n):new e.constructor(n);return e.copy(a),a}function At(e,t){for(var n=-1,a=null==e?0:e.length,i=0,r=[];++n<a;){var o=e[n];t(o,n,e)&&(r[i++]=o)}return r}function Bt(){return[]}function Ct(e,t){return pe(e,Ed(e),t)}function It(e,t){return pe(e,Bd(e),t)}function Lt(e,t,n){var a=t(e);return Eo(e)?a:qe(a,n(e))}function zt(e){return Lt(e,Be,Ed)}function jt(e){return Lt(e,Le,Bd)}function Dt(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ud.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Rt(e){var t=new e.constructor(e.byteLength);return new qd(t).set(new qd(e)),t}function Nt(e,t){var n=t?Rt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ft(e){var t=new e.constructor(e.source,Zd.exec(e));return t.lastIndex=e.lastIndex,t}function Ot(e){return Kd?Object(Kd.call(e)):{}}function Pt(e,t){var n=t?Rt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Mt(e,t,n){var a=e.constructor;return"[object ArrayBuffer]"===t?Rt(e):"[object Boolean]"===t||"[object Date]"===t?new a(+e):"[object DataView]"===t?Nt(e,n):"[object Float32Array]"===t||"[object Float64Array]"===t||"[object Int8Array]"===t||"[object Int16Array]"===t||"[object Int32Array]"===t||"[object Uint8Array]"===t||"[object Uint8ClampedArray]"===t||"[object Uint16Array]"===t||"[object Uint32Array]"===t?Pt(e,n):"[object Map]"===t?new a:"[object Number]"===t||"[object String]"===t?new a(e):"[object RegExp]"===t?Ft(e):"[object Set]"===t?new a:"[object Symbol]"===t?Ot(e):void 0}function Vt(e){return"function"!=typeof e.constructor||xe(e)?{}:Jo(at(e))}function Wt(e,t,n,a,i,r){var o=1&t,s=2&t,l;if(n&&(l=i?n(e,a,i,r):n(e)),void 0!==l)return l;if(!p(e))return e;var d=Eo(e);if(!d){var f=Gd(e),u="[object Function]"==f||"[object GeneratorFunction]"==f;if(Ds(e))return Et(e,o);if("[object Object]"!=f&&"[object Arguments]"!=f&&(!u||i)){if(!ef[f])return i?e:{};l=Mt(e,f,o)}else if(l=s||u?{}:Vt(e),!o)return s?It(e,Tt(l,e)):Ct(e,kt(l,e))}else if(l=Dt(e),!o)return N(e,l);r||(r=new St);var c=r.get(e);if(c)return c;if(r.set(e,l),Jd(e))return e.forEach(function(a){l.add(Wt(a,t,n,a,e,r))}),l;if(Qd(e))return e.forEach(function(a,i){l.set(i,Wt(a,t,n,i,e,r))}),l;var h=4&t?s?jt:zt:s?keysIn:Be,m=d?void 0:h(e);return H(m||e,function(a,i){m&&(i=a,a=e[i]),ce(l,i,Wt(a,t,n,i,e,r))}),l}function Gt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}function Ht(e,t){for(var n=-1,a=null==e?0:e.length;++n<a;)if(t(e[n],n,e))return!0;return!1}function Ut(e,t){return e.has(t)}function qt(e,t,n,a,i,r){var o=1&n,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var d=r.get(e);if(d&&r.get(t))return d==t;var f=-1,u=!0,c=2&n?new Gt:void 0;for(r.set(e,t),r.set(t,e);++f<s;){var p=e[f],h=t[f];if(a)var m=o?a(h,p,f,t,e,r):a(p,h,f,e,t,r);if(void 0!==m){if(m)continue;u=!1;break}if(c){if(!Ht(t,function(e,t){if(!Ut(c,t)&&(p===e||i(p,e,n,a,r)))return c.push(t)})){u=!1;break}}else if(!(p===h||i(p,h,n,a,r))){u=!1;break}}return r["delete"](e),r["delete"](t),u}function Zt(e){var t=-1,n=Array(e.size);return e.forEach(function(e,a){n[++t]=[a,e]}),n}function Xt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function Kt(e,t,n,a,i,r,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!!(e.byteLength==t.byteLength&&r(new qd(e),new qd(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ue(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Zt;case"[object Set]":var l=1&a;if(s||(s=Xt),e.size!=t.size&&!l)return!1;var d=o.get(e);if(d)return d==t;a|=2,o.set(e,t);var f=qt(s(e),s(t),a,i,r,o);return o["delete"](e),f;case"[object Symbol]":if(nf)return nf.call(e)==nf.call(t);}return!1}function Yt(e,t,n,a,i,r){var o=1&n,s=zt(e),l=s.length,d=zt(t),f=d.length;if(l!=f&&!o)return!1;for(var u=l,c;u--;)if(c=s[u],o?!(c in t):!rf.call(t,c))return!1;var p=r.get(e);if(p&&r.get(t))return p==t;var h=!0;r.set(e,t),r.set(t,e);for(var m=o;++u<l;){c=s[u];var g=e[c],b=t[c];if(a)var _=o?a(b,g,c,t,e,r):a(g,b,c,e,t,r);if(void 0===_?!(g===b||i(g,b,n,a,r)):!_){h=!1;break}m||(m="constructor"==c)}if(h&&!m){var y=e.constructor,x=t.constructor;y!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x)&&(h=!1)}return r["delete"](e),r["delete"](t),h}function Qt(e,t,n,a,i,r){var o=Eo(e),s=Eo(t),l=o?"[object Array]":Gd(e),d=s?"[object Array]":Gd(t);l="[object Arguments]"==l?"[object Object]":l,d="[object Arguments]"==d?"[object Object]":d;var f="[object Object]"==l,u="[object Object]"==d,c=l==d;if(c&&Ds(e)){if(!Ds(t))return!1;o=!0,f=!1}if(c&&!f)return r||(r=new St),o||Ws(e)?qt(e,t,n,a,i,r):Kt(e,t,l,n,a,i,r);if(!(1&n)){var p=f&&sf.call(e,"__wrapped__"),h=u&&sf.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return r||(r=new St),i(m,g,n,a,r)}}return!!c&&(r||(r=new St),Yt(e,t,n,a,i,r))}function $t(e,t,n,a,i){return!(e!==t)||(null!=e&&null!=t&&(s(e)||s(t))?Qt(e,t,n,a,$t,i):e!==e&&t!==t)}function Jt(e,t,n,a){var i=n.length,r=i,o=!a;if(null==e)return!r;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<r;){s=n[i];var l=s[0],d=e[l],f=s[1];if(!(o&&s[2])){var u=new St;if(a)var c=a(d,f,l,e,t,u);if(void 0===c?!$t(f,d,3,a,u):!c)return!1}else if(void 0===d&&!(l in e))return!1}return!0}function en(e){return e===e&&!p(e)}function tn(e){for(var t=Be(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,en(i)]}return t}function nn(e,t){return function(n){return null!=n&&n[e]===t&&(t!==void 0||e in Object(n))}}function an(e){var t=tn(e);return 1==t.length&&t[0][2]?nn(t[0][0],t[0][1]):function(n){return n===e||Jt(n,e,t)}}function rn(e,t){return null!=e&&t in Object(e)}function on(e,t,n){t=Ve(t,e);for(var a=-1,i=t.length,r=!1,o;++a<i&&(o=We(t[a]),!!(r=null!=e&&n(e,o)));)e=e[o];return r||++a!=i?r:(i=null==e?0:e.length,!!i&&ge(i)&&te(o,i)&&(Eo(e)||Bs(e)))}function sn(e,t){return null!=e&&on(e,t,rn)}function ln(e,t){return ze(e)&&en(t)?nn(We(e),t):function(n){var a=He(n,e);return a===void 0&&a===t?sn(n,e):$t(t,a,3)}}function dn(e){return function(t){return null==t?void 0:t[e]}}function fn(e){return function(t){return Ge(t,e)}}function un(e){return ze(e)?dn(We(e)):fn(e)}function cn(e){return"function"==typeof e?e:null==e?b:"object"==typeof e?Eo(e)?ln(e[0],e[1]):an(e):un(e)}function pn(e,t,n){var a=n.length;if(null==e)return!a;for(e=Object(e);a--;){var i=n[a],r=t[i],o=e[i];if(o===void 0&&!(i in e)||!r(o))return!1}return!0}function hn(e){var t=Be(e);return function(n){return pn(n,e,t)}}function mn(e,t,n,a){for(var i=-1,r=null==e?0:e.length;++i<r;){var o=e[i];t(a,o,n(o),e)}return a}function gn(e){return function(t,n,a){for(var i=-1,r=Object(t),o=a(t),s=o.length;s--;){var l=o[e?s:++i];if(!1===n(r[l],l,r))break}return t}}function bn(e,t){return e&&lf(e,t,Be)}function _n(e,t){return function(n,a){if(null==n)return n;if(!be(n))return e(n,a);for(var i=n.length,r=t?i:-1,o=Object(n);(t?r--:++r<i)&&!(!1===a(o[r],r,o)););return n}}function yn(e,t,n,a){return df(e,function(e,i,r){t(a,e,n(e),r)}),a}function xn(e,t){return function(n,a){var i=Eo(n)?mn:yn,r=t?t():{};return i(n,e,cn(a,2),r)}}function vn(e,t,n){t=n?void 0:t;var a=le(e,8,void 0,void 0,void 0,void 0,void 0,t);return a.placeholder=vn.placeholder,a}function wn(e,t,n){t=n?void 0:t;var a=le(e,16,void 0,void 0,void 0,void 0,void 0,t);return a.placeholder=wn.placeholder,a}function Sn(e,t,n){function a(t){var n=_,a=y;return _=y=void 0,c=t,v=e.apply(a,n),v}function i(e){return c=e,w=setTimeout(s,t),m?a(e):v}function r(e){var n=e-S,a=e-c,i=t-n;return g?mf(i,x-a):i}function o(e){var n=e-S,a=e-c;return void 0===S||n>=t||0>n||g&&a>=x}function s(){var e=pf();return o(e)?l(e):void(w=setTimeout(s,r(e)))}function l(e){return(w=void 0,b&&_)?a(e):(_=y=void 0,v)}function d(){void 0!==w&&clearTimeout(w),c=0,_=S=y=w=void 0}function f(){return void 0===w?v:l(pf())}function u(){var e=pf(),n=o(e);if(_=arguments,y=this,S=e,n){if(void 0===w)return i(S);if(g)return w=setTimeout(s,t),a(S)}return void 0===w&&(w=setTimeout(s,t)),v}var c=0,m=!1,g=!1,b=!0,_,y,x,v,w,S;if("function"!=typeof e)throw new TypeError("Expected a function");return t=h(t)||0,p(n)&&(m=!!n.leading,g="maxWait"in n,x=g?hf(h(n.maxWait)||0,t):x,b="trailing"in n?!!n.trailing:b),u.cancel=d,u.flush=f,u}function kn(e,t,n){(n===void 0||ue(e[t],n))&&(n!==void 0||t in e)||fe(e,t,n)}function Tn(e){return s(e)&&be(e)}function En(e,t){return"__proto__"==t?void 0:e[t]}function An(e){return pe(e,Le(e))}function Bn(e,t,n,a,i,r,o){var s=En(e,n),l=En(t,n),d=o.get(l);if(d)return void kn(e,n,d);var f=r?r(s,l,n+"",e,t,o):void 0,u=f===void 0;if(u){var c=Eo(l),h=!c&&Ds(l),m=!c&&!h&&Ws(l);f=l,c||h||m?Eo(s)?f=s:Tn(s)?f=N(s):h?(u=!1,f=Et(l,!0)):m?(u=!1,f=Pt(l,!0)):f=[]:Qe(l)||Bs(l)?(f=s,Bs(s)?f=An(s):(!p(s)||_(s))&&(f=Vt(l))):u=!1}u&&(o.set(l,f),i(f,l,a,r,o),o["delete"](l)),kn(e,n,f)}function Cn(e,t,n,a,i){e===t||lf(t,function(r,o){if(p(r))i||(i=new St),Bn(e,t,o,n,Cn,a,i);else{var s=a?a(En(e,o),r,o+"",e,t,i):void 0;s===void 0&&(s=r),kn(e,o,s)}},Le)}function In(e,t,n,a,i,r){return p(e)&&p(t)&&(r.set(t,e),Cn(e,t,void 0,In,r),r["delete"](t)),e}function Ln(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout(function(){e.apply(void 0,n)},t)}function zn(e,t,n){for(var a=-1,i=null==e?0:e.length;++a<i;)if(n(t,e[a]))return!0;return!1}function jn(e,t,n,a){var i=-1,r=Y,o=!0,s=e.length,l=[],d=t.length;if(!s)return l;n&&(t=f(t,ke(n))),a?(r=zn,o=!1):t.length>=200&&(r=Ut,o=!1,t=new Gt(t));outer:for(;++i<s;){var u=e[i],c=null==n?u:n(u);if(u=a||0!==u?u:0,o&&c===c){for(var p=d;p--;)if(t[p]===c)continue outer;l.push(u)}else r(t,c,a)||l.push(u)}return l}function Dn(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function Rn(e,t,n,a){for(var i=e.length,r=a?i:-1;(a?r--:++r<i)&&t(e[r],r,e););return n?et(e,a?0:r,a?r+1:i):et(e,a?r+1:0,a?i:r)}function Nn(e){return"function"==typeof e?e:b}function Fn(e,t){var n=Eo(e)?H:df;return n(e,Nn(t))}function On(e,t){for(var n=null==e?0:e.length;n--&&!(!1===t(e[n],n,e)););return e}function Pn(e,t){return e&&Af(e,t,Be)}function Mn(e,t){var n=Eo(e)?On:Bf;return n(e,Nn(t))}function Vn(e,t){return f(t,function(t){return[t,e[t]]})}function Wn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Gn(e){return function(t){var n=Gd(t);return"[object Map]"==n?Zt(t):"[object Set]"==n?Wn(t):Vn(t,e(t))}}function Hn(e){return e=Me(e),e&&jf.test(e)?e.replace(zf,Lf):e}function Un(e,t){for(var n=-1,a=null==e?0:e.length;++n<a;)if(!t(e[n],n,e))return!1;return!0}function qn(e,t){var n=!0;return df(e,function(e,a,i){return n=!!t(e,a,i),n}),n}function Zn(e){return e?wt(g(e),0,4294967295):0}function Xn(e,t,n,a){var i=e.length;for(n=g(n),0>n&&(n=-n>i?0:i+n),a=void 0===a||a>i?i:g(a),0>a&&(a+=i),a=n>a?0:Zn(a);n<a;)e[n++]=t;return e}function Kn(e,t){var n=[];return df(e,function(e,a,i){t(e,a,i)&&n.push(e)}),n}function Yn(e){return function(t,n,a){var i=Object(t);if(!be(t)){var r=cn(n,3);t=Be(t),n=function(e){return r(i[e],e,i)}}var o=e(t,n,a);return-1<o?i[r?t[o]:o]:void 0}}function Qn(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var i=null==n?0:g(n);return 0>i&&(i=Nf(a+i,0)),U(e,cn(t,3),i)}function $n(e,t,n){var a;return n(e,function(e,n,i){if(t(e,n,i))return a=n,!1}),a}function Jn(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var i=a-1;return void 0!==n&&(i=g(n),i=0>n?Of(a+i,0):Pf(i,a-1)),U(e,cn(t,3),i,!0)}function ea(e){return e&&e.length?e[0]:void 0}function ta(e,t){var n=-1,a=be(e)?Array(e.length):[];return df(e,function(e,i,r){a[++n]=t(e,i,r)}),a}function na(e,t){var n=Eo(e)?f:ta;return n(e,cn(t,3))}function aa(e,t){return Xe(na(e,t),1)}function ia(e){return Ye(function(t){var n=t.length,a=n,i=R.prototype.thru;for(e&&t.reverse();a--;){var r=t[a];if("function"!=typeof r)throw new TypeError("Expected a function");if(i&&!o&&"wrapper"==D(r))var o=new R([],!0)}for(a=o?a:n;++a<n;){r=t[a];var s=D(r),l="wrapper"==s?ns(r):void 0;o=l&&P(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?o[D(l[0])].apply(o,l[3]):1==r.length&&P(r)?o[s]():o.thru(r)}return function(){var e=arguments,a=e[0];if(o&&1==e.length&&Eo(a))return o.plant(a).value();for(var i=0,r=n?t[i].apply(this,e):a;++i<n;)r=t[i].call(this,r);return r}})}function ra(e,t){return At(t,function(t){return _(e[t])})}function oa(e,t){return e>t}function sa(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=h(t),n=h(n)),e(t,n)}}function la(e,t){return null!=e&&Kf.call(e,t)}function da(e,t,n){return e>=Qf(t,n)&&e<Yf(t,n)}function fa(e){return"string"==typeof e||!Eo(e)&&s(e)&&o(e)=="[object String]"}function ua(e,t){return f(t,function(t){return e[t]})}function ca(e){return null==e?[]:ua(e,Be(e))}function pa(e,t,n){for(var a=n?zn:Y,i=e[0].length,r=e.length,o=r,s=Array(r),l=1/0,d=[];o--;){var u=e[o];o&&t&&(u=f(u,ke(t))),l=$f(u.length,l),s[o]=!n&&(t||120<=i&&120<=u.length)?new Gt(o&&u):void 0}u=e[0];var c=-1,p=s[0];outer:for(;++c<i&&d.length<l;){var h=u[c],m=t?t(h):h;if(h=n||0!==h?h:0,p?!Ut(p,m):!a(d,m,n)){for(o=r;--o;){var g=s[o];if(g?!Ut(g,m):!a(e[o],m,n))continue outer}p&&p.push(m),d.push(h)}}return d}function ha(e){return Tn(e)?e:[]}function ma(e,t,n,a){return bn(e,function(e,i,r){t(a,n(e),i,r)}),a}function ga(e,t){return function(n,a){return ma(n,e,t(a),{})}}function ba(e,t){return 2>t.length?e:Ge(e,et(t,0,-1))}function _a(e,t,n){t=Ve(t,e),e=ba(e,t);var a=null==e?e:e[We(Dn(t))];return null==a?void 0:E(a,e,n)}function ya(e){if(null==e)return!0;if(be(e)&&(Eo(e)||"string"==typeof e||"function"==typeof e.splice||Ds(e)||Ws(e)||Bs(e)))return!e.length;var t=Gd(e);if(t=="[object Map]"||t=="[object Set]")return!e.size;if(xe(e))return!Ae(e).length;for(var n in e)if(gu.call(e,n))return!1;return!0}function xa(e){return"number"==typeof e&&e==g(e)}function va(e){return"number"==typeof e||s(e)&&o(e)=="[object Number]"}function wa(e){return e===void 0}function Sa(e,t,n){for(var a=n+1;a--;)if(e[a]===t)return a;return a}function ka(e,t){return e<t}function Ta(e,t){var n={};return t=cn(t,3),bn(e,function(e,a,i){fe(n,a,t(e,a,i))}),n}function Ea(e,t,n){for(var a=-1,i=e.length;++a<i;){var r=e[a],o=t(r);if(null!=o&&(s===void 0?o===o&&!l(o):n(o,s)))var s=o,d=r}return d}function Aa(e,t){for(var n=-1,a=e.length,i;++n<a;){var r=t(e[n]);r!==void 0&&(i=i===void 0?r:i+r)}return i}function Ba(e,t){var n=null==e?0:e.length;return n?Aa(e,t)/n:Bu}function Ca(e,t,n){var a=Be(t),i=ra(t,a),r=!(p(n)&&"chain"in n)||!!n.chain,o=_(e);return H(i,function(n){var a=t[n];e[n]=a,o&&(e.prototype[n]=function(){var t=this.__chain__;if(r||t){var n=e(this.__wrapped__),i=n.__actions__=N(this.__actions__);return i.push({func:a,args:arguments,thisArg:e}),n.__chain__=t,n}return a.apply(e,qe([this.value()],arguments))})}),e}function Ia(e){if("function"!=typeof e)throw new TypeError("Expected a function");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)}}function La(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function za(e){if(!e)return[];if(be(e))return fa(e)?ot(e):N(e);if(ju&&e[ju])return La(e[ju]());var t=Gd(e),n=t=="[object Map]"?Zt:t=="[object Set]"?Xt:ca;return n(e)}function ja(e,t){var a=e.length;if(a)return t+=0>t?a:0,te(t,a)?e[t]:void 0}function Da(e,t){return t=Ve(t,e),e=ba(e,t),null==e||delete e[We(Dn(t))]}function Ra(e){return Qe(e)?void 0:e}function Na(e,t,n,a){if(!p(e))return e;t=Ve(t,e);for(var i=-1,r=t.length,o=e;null!=o&&++i<r;){var s=We(t[i]),l=n;if(i!=r-1){var d=o[s];l=a?a(d,s,o):void 0,l===void 0&&(l=p(d)?d:te(t[i+1])?[]:{})}ce(o,s,l),o=o[s]}return e}function Fa(e,t,n){for(var a=-1,i=t.length,r={};++a<i;){var o=t[a],s=Ge(e,o);n(s,o)&&Na(r,Ve(o,e),s)}return r}function Oa(e,t){if(null==e)return{};var n=f(jt(e),function(e){return[e]});return t=cn(t),Fa(e,n,function(e,n){return t(e,n[0])})}function Pa(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Ma(e,t){if(e!==t){var n=e!==void 0,a=null===e,i=e===e,r=l(e),o=t!==void 0,s=null===t,d=t===t,f=l(t);if(!s&&!f&&!r&&e>t||r&&o&&d&&!s&&!f||a&&o&&d||!n&&d||!i)return 1;if(!a&&!r&&!f&&e<t||f&&n&&i&&!a&&!r||s&&n&&i||!o&&i||!d)return-1}return 0}function Va(e,t,n){for(var a=-1,i=e.criteria,r=t.criteria,o=i.length,s=n.length;++a<o;){var l=Ma(i[a],r[a]);if(l){if(a>=s)return l;var d=n[a];return l*("desc"==d?-1:1)}}return e.index-t.index}function Wa(e,t,n){var a=-1;t=f(t.length?t:[b],ke(cn));var i=ta(e,function(e){var n=f(t,function(t){return t(e)});return{criteria:n,index:++a,value:e}});return Pa(i,function(e,t){return Va(e,t,n)})}function Ga(e){return Ye(function(t){return t=f(t,ke(cn)),me(function(n){var a=this;return e(t,function(e){return E(e,a,n)})})})}function Ha(e,t){var a="";if(!e||1>t||t>9007199254740991)return a;do t%2&&(a+=e),t=Pu(t/2),t&&(e+=e);while(t);return a}function Ua(e){for(var t=Qu.lastIndex=0;Qu.test(e);)++t;return t}function qa(e){return nt(e)?Ua(e):Mu(e)}function Za(e,t){t=t===void 0?" ":u(t);var n=t.length;if(2>n)return n?Ha(t,e):t;var a=Ha(t,$u(e/qa(t)));return nt(t)?tt(ot(a),0,e).join(""):a.slice(0,e)}function Xa(e,t){return Fa(e,t,function(t,n){return sn(e,n)})}function Ka(e,t,n,a){for(var i=n-1,r=e.length;++i<r;)if(a(e[i],t))return i;return-1}function Ya(e,t,n,a){var i=a?Ka:K,r=-1,o=t.length,s=e;for(e===t&&(t=N(t)),n&&(s=f(e,ke(n)));++r<o;)for(var l=0,d=t[r],u=n?n(d):d;-1<(l=i(s,u,l,a));)s!==e&&oc.call(s,l,1),oc.call(e,l,1);return e}function Qa(e,t){return e&&e.length&&t&&t.length?Ya(e,t):e}function $a(e,t){for(var n=e?t.length:0,a=n-1;n--;){var i=t[n];if(n==a||i!==r){var r=i;te(i)?dc.call(e,i,1):Da(e,i)}}return e}function Ja(e,t){return e+uc(cc()*(t-e+1))}function ei(e,t,n,a){for(var i=-1,r=gc(mc((t-e)/(n||1)),0),o=Array(r);r--;)o[a?r:++i]=e,e+=n;return o}function ti(e){return function(t,n,a){return a&&"number"!=typeof a&&_e(t,n,a)&&(n=a=void 0),t=m(t),void 0===n?(n=t,t=0):n=m(n),a=void 0===a?t<n?1:-1:m(a),ei(t,n,a,e)}}function ni(e,t,n,a,i){return i(e,function(e,i,r){n=a?(a=!1,e):t(n,e,i,r)}),n}function ai(e,t,n,a){var i=null==e?0:e.length;for(a&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function ii(e){return null==e?e:vc.call(e)}function ri(e){var t=e.length;return t?e[Ja(0,t-1)]:void 0}function oi(e){return ri(ca(e))}function si(e,t){var n=-1,a=e.length;for(t=void 0===t?a:t;++n<t;){var i=Ja(n,a-1),r=e[i];e[i]=e[n],e[n]=r}return e.length=t,e}function li(e,t){return si(N(e),wt(t,0,e.length))}function di(e,t){var n=ca(e);return si(n,wt(t,0,n.length))}function fi(e){return si(N(e))}function ui(e){return si(ca(e))}function ci(e,t){var n;return df(e,function(e,a,i){return n=t(e,a,i),!n}),!!n}function pi(e,t,n,a){t=n(t);for(var i=0,r=null==e?0:e.length,o=t!==t,s=null===t,d=l(t),f=void 0===t;i<r;){var u=Tc((i+r)/2),c=n(e[u]),p=c!==void 0,h=null===c,m=c===c,g=l(c);if(o)var b=a||m;else b=f?m&&(a||p):s?m&&p&&(a||!h):d?m&&p&&!h&&(a||!g):!(h||g)&&(a?c<=t:c<t);b?i=u+1:r=u}return Ec(r,4294967294)}function hi(e,t,n){var a=0,i=null==e?a:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;a<i;){var r=a+i>>>1,o=e[r];null!==o&&!l(o)&&(n?o<=t:o<t)?a=r+1:i=r}return i}return pi(e,t,b,n)}function mi(e,t){for(var n=-1,a=e.length,i=0,r=[];++n<a;){var o=e[n],s=t?t(o):o;if(!n||!ue(s,l)){var l=s;r[i++]=0===o?0:o}}return r}function gi(e,t,n,a){return void 0===e||ue(e,Cc[n])&&!Ic.call(a,n)?t:e}function bi(e){return"\\"+Lc[e]}function _i(e,t,n){var a=Rc.imports._.templateSettings||Rc;n&&_e(e,t,n)&&(t=void 0),e=Me(e),t=el({},t,a,gi);var i=el({},t.imports,a.imports,gi),r=Be(i),o=ua(i,r),s=0,l=t.interpolate||Mc,d="__p += '",f=RegExp((t.escape||Mc).source+"|"+l.source+"|"+(l===zc?Pc:Mc).source+"|"+(t.evaluate||Mc).source+"|$","g"),u="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"",c,p;e.replace(f,function(t,n,a,i,r,o){return a||(a=i),d+=e.slice(s,o).replace(Vc,bi),n&&(c=!0,d+="' +\n__e("+n+") +\n'"),r&&(p=!0,d+="';\n"+r+";\n__p += '"),a&&(d+="' +\n((__t = ("+a+")) == null ? '' : __t) +\n'"),s=o+t.length,t}),d+="';\n";var h=t.variable;h||(d="with (obj) {\n"+d+"\n}\n"),d=(p?d.replace(Nc,""):d).replace(Fc,"$1").replace(Oc,"$1;"),d="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(c?", __e = _.escape":"")+(p?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=Sl(function(){return Function(r,u+"return "+d).apply(void 0,o)});if(m.source=d,$e(m))throw m;return m}function yi(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return p(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),Sn(e,t,{leading:a,maxWait:t,trailing:i})}function xi(e,t){return t(e)}function vi(e,t){var n=e;return n instanceof z&&(n=n.value()),ft(t,function(e,t){return t.func.apply(t.thisArg,qe([e],t.args))},n)}function wi(){return vi(this.__wrapped__,this.__actions__)}function Si(e,t){for(var n=e.length;n--&&-1<K(t,e[n],0););return n}function ki(e,t){for(var n=-1,a=e.length;++n<a&&-1<K(t,e[n],0););return n}function Ti(e,t){var n=30,a="...";if(p(t)){var i="separator"in t?t.separator:i;n="length"in t?g(t.length):n,a="omission"in t?u(t.omission):a}e=Me(e);var r=e.length;if(nt(e)){var o=ot(e);r=o.length}if(n>=r)return e;var s=n-qa(a);if(1>s)return a;var l=o?tt(o,0,s).join(""):e.slice(0,s);if(void 0===i)return l+a;if(o&&(s+=l.length-s),xu(i)){if(e.slice(s).search(i)){var d=l,f;for(i.global||(i=RegExp(i.source,Me(Uc.exec(i))+"g")),i.lastIndex=0;f=i.exec(d);)var c=f.index;l=l.slice(0,void 0===c?s:c)}}else if(e.indexOf(u(i),s)!=s){var h=l.lastIndexOf(i);-1<h&&(l=l.slice(0,h))}return l+a}function Ei(e,t,n){var a=-1,i=Y,r=e.length,o=!0,s=[],l=s;if(n)o=!1,i=zn;else if(r>=200){var d=t?null:Kc(e);if(d)return Xt(d);o=!1,i=Ut,l=new Gt}else l=t?[]:s;outer:for(;++a<r;){var f=e[a],u=t?t(f):f;if(f=n||0!==f?f:0,o&&u===u){for(var c=l.length;c--;)if(l[c]===u)continue outer;t&&l.push(u),s.push(f)}else i(l,u,n)||(l!==s&&l.push(u),s.push(f))}return s}function Ai(e){var t=++Jc;return Me(e)+t}function Bi(e){if(!(e&&e.length))return[];var t=0;return e=At(e,function(e){if(Tn(e))return t=ep(e.length,t),!0}),ve(t,function(t){return f(e,dn(t))})}function Ci(e,t){if(!(e&&e.length))return[];var n=Bi(e);return null==t?n:f(n,function(e){return E(t,void 0,e)})}function Ii(e,t,n,a){return Na(e,t,n(Ge(e,t)),a)}function Li(e,t,n){var a=e.length;if(2>a)return a?Ei(e[0]):[];for(var i=-1,r=Array(a);++i<a;)for(var o=e[i],s=-1;++s<a;)s!=i&&(r[i]=jn(r[i]||o,e[s],t,n));return Ei(Xe(r,1),t,n)}function zi(e,t,n){for(var a=-1,i=e.length,r=t.length,o={};++a<i;){var s=a<r?t[a]:void 0;n(o,e[a],s)}return o}function ji(e,t,n){for(var a=-1,i=n.length;++a<i;){var r=n[a],o=r.size;switch(r.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=xp(t,e+o);break;case"takeRight":e=yp(e,t-o);}}return{start:e,end:t}}function Di(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Ri(e,t){return t={exports:{}},e(t,t.exports),t.exports}function Ni(e){for(var t=e.length;0<=--t;)e[t]=0}function Fi(e,t,n,a,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=a,this.max_length=i,this.has_stree=e&&e.length}function Oi(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Pi(e){return 256>e?Xp[e]:Xp[256+(e>>>7)]}function Mi(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=255&t>>>8}function Vi(e,t,n){e.bi_valid>16-n?(e.bi_buf|=65535&t<<e.bi_valid,Mi(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=65535&t<<e.bi_valid,e.bi_valid+=n)}function Wi(e,t,n){Vi(e,n[2*t],n[2*t+1])}function Gi(e,t){var n=0;do n|=1&e,e>>>=1,n<<=1;while(0<--t);return n>>>1}function Hi(e){16===e.bi_valid?(Mi(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function Ui(e,t){var a=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,d=t.stat_desc.max_length,u=0,c,p,g,b,_,y;for(b=0;b<=15;b++)e.bl_count[b]=0;for(a[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;573>c;c++)(p=e.heap[c],b=a[2*a[2*p+1]+1]+1,b>d&&(b=d,u++),a[2*p+1]=b,!(p>i))&&(e.bl_count[b]++,_=0,p>=l&&(_=s[p-l]),y=a[2*p],e.opt_len+=y*(b+_),o&&(e.static_len+=y*(r[2*p+1]+_)));if(0!==u){do{for(b=d-1;0===e.bl_count[b];)b--;e.bl_count[b]--,e.bl_count[b+1]+=2,e.bl_count[d]--,u-=2}while(0<u);for(b=d;0!==b;b--)for(p=e.bl_count[b];0!==p;)(g=e.heap[--c],!(g>i))&&(a[2*g+1]!==b&&(e.opt_len+=(b-a[2*g+1])*a[2*g],a[2*g+1]=b),p--)}}function qi(e,t,a){var i=Array(16),r=0,o,s;for(o=1;o<=15;o++)i[o]=r=r+a[o-1]<<1;for(s=0;s<=t;s++){var l=e[2*s+1];0!==l&&(e[2*s]=Gi(i[l]++,l))}}function Zi(){var e=Array(16),t,a,i,r,o;for(i=0,r=0;r<28;r++)for(Yp[r]=i,t=0;t<1<<Wp[r];t++)Kp[i++]=r;for(Kp[i-1]=r,o=0,r=0;16>r;r++)for(Qp[r]=o,t=0;t<1<<Gp[r];t++)Xp[o++]=r;for(o>>=7;r<30;r++)for(Qp[r]=o<<7,t=0;t<1<<Gp[r]-7;t++)Xp[256+o++]=r;for(a=0;a<=15;a++)e[a]=0;for(t=0;143>=t;)qp[2*t+1]=8,t++,e[8]++;for(;255>=t;)qp[2*t+1]=9,t++,e[9]++;for(;279>=t;)qp[2*t+1]=7,t++,e[7]++;for(;287>=t;)qp[2*t+1]=8,t++,e[8]++;for(qi(qp,287,e),t=0;t<30;t++)Zp[2*t+1]=5,Zp[2*t]=Gi(t,5);ih=new Fi(qp,Wp,257,286,15),rh=new Fi(Zp,Gp,0,30,15),oh=new Fi([],Hp,0,19,7)}function Xi(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 Ki(e){8<e.bi_valid?Mi(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Yi(e,t,n,a){Ki(e),a&&(Mi(e,n),Mi(e,~n)),zp.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function Qi(e,t,n,a){var i=2*t,r=2*n;return e[i]<e[r]||e[i]===e[r]&&a[t]<=a[n]}function $i(e,t,n){for(var a=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Qi(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Qi(t,a,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=a}function Ji(e,t,n){var a=0,i,r,o,s;if(0!==e.last_lit)do i=e.pending_buf[e.d_buf+2*a]<<8|e.pending_buf[e.d_buf+2*a+1],r=e.pending_buf[e.l_buf+a],a++,0===i?Wi(e,r,t):(o=Kp[r],Wi(e,o+256+1,t),s=Wp[o],0!==s&&(r-=Yp[o],Vi(e,r,s)),i--,o=Pi(i),Wi(e,o,n),s=Gp[o],0!==s&&(i-=Qp[o],Vi(e,i,s)));while(a<e.last_lit);Wi(e,256,t)}function er(e,t){var a=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems,s=-1,l,d,f;for(e.heap_len=0,e.heap_max=573,l=0;l<o;l++)0===a[2*l]?a[2*l+1]=0:(e.heap[++e.heap_len]=s=l,e.depth[l]=0);for(;2>e.heap_len;)f=e.heap[++e.heap_len]=2>s?++s:0,a[2*f]=1,e.depth[f]=0,e.opt_len--,r&&(e.static_len-=i[2*f+1]);for(t.max_code=s,l=e.heap_len>>1;1<=l;l--)$i(e,a,l);f=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],$i(e,a,1),d=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=d,a[2*f]=a[2*l]+a[2*d],e.depth[f]=(e.depth[l]>=e.depth[d]?e.depth[l]:e.depth[d])+1,a[2*l+1]=a[2*d+1]=f,e.heap[1]=f++,$i(e,a,1);while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],Ui(e,t),qi(a,s,e.bl_count)}function tr(e,t,a){var i=-1,r=t[1],o=0,s=7,l=4,d,f;for(0===r&&(s=138,l=3),t[2*(a+1)+1]=65535,d=0;d<=a;d++){if(f=r,r=t[2*(d+1)+1],++o<s&&f===r)continue;else o<l?e.bl_tree[2*f]+=o:0===f?10>=o?e.bl_tree[34]++:e.bl_tree[36]++:(f!==i&&e.bl_tree[2*f]++,e.bl_tree[32]++);o=0,i=f,0===r?(s=138,l=3):f===r?(s=6,l=3):(s=7,l=4)}}function nr(e,t,a){var i=-1,r=t[1],o=0,s=7,l=4,d,f;for(0===r&&(s=138,l=3),d=0;d<=a;d++){if(f=r,r=t[2*(d+1)+1],++o<s&&f===r)continue;else if(o<l)do Wi(e,f,e.bl_tree);while(0!=--o);else 0===f?10>=o?(Wi(e,17,e.bl_tree),Vi(e,o-3,3)):(Wi(e,18,e.bl_tree),Vi(e,o-11,7)):(f!==i&&(Wi(e,f,e.bl_tree),o--),Wi(e,16,e.bl_tree),Vi(e,o-3,2));o=0,i=f,0===r?(s=138,l=3):f===r?(s=6,l=3):(s=7,l=4)}}function ar(e){var t;for(tr(e,e.dyn_ltree,e.l_desc.max_code),tr(e,e.dyn_dtree,e.d_desc.max_code),er(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*Up[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function ir(e,t,n,a){var i;for(Vi(e,t-257,5),Vi(e,n-1,5),Vi(e,a-4,4),i=0;i<a;i++)Vi(e,e.bl_tree[2*Up[i]+1],3);nr(e,e.dyn_ltree,t-1),nr(e,e.dyn_dtree,n-1)}function rr(e){var t=4093624447,a;for(a=0;31>=a;a++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*a])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(a=32;a<256;a++)if(0!==e.dyn_ltree[2*a])return 1;return 0}function or(e){$p||(Zi(),$p=!0),e.l_desc=new Oi(e.dyn_ltree,ih),e.d_desc=new Oi(e.dyn_dtree,rh),e.bl_desc=new Oi(e.bl_tree,oh),e.bi_buf=0,e.bi_valid=0,Xi(e)}function sr(e,t,n,a){Vi(e,0+(a?1:0),3),Yi(e,t,n,!0)}function lr(e,t){return e.msg=ah[t],t}function dr(e){return(e<<1)-(4<e?9:0)}function fr(e){for(var t=e.length;0<=--t;)e[t]=0}function ur(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out);0===n||(zp.arraySet(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 cr(e,t){Jp._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ur(e.strm)}function pr(e,t){e.pending_buf[e.pending++]=t}function hr(e,t){e.pending_buf[e.pending++]=255&t>>>8,e.pending_buf[e.pending++]=255&t}function mr(e,t,n,a){var i=e.avail_in;return(i>a&&(i=a),0===i)?0:(e.avail_in-=i,zp.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=eh(e.adler,t,i,n):2===e.state.wrap&&(e.adler=nh(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function gr(e,t){var n=e.max_chain_length,a=e.strstart,i=e.prev_length,r=e.nice_match,o=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,s=e.window,l=e.w_mask,d=e.prev,f=e.strstart+258,u=s[a+i-1],c=s[a+i],p,h;e.prev_length>=e.good_match&&(n>>=2),r>e.lookahead&&(r=e.lookahead);do{if(p=t,s[p+i]!==c||s[p+i-1]!==u||s[p]!==s[a]||s[++p]!==s[a+1])continue;a+=2,p++;do;while(s[++a]===s[++p]&&s[++a]===s[++p]&&s[++a]===s[++p]&&s[++a]===s[++p]&&s[++a]===s[++p]&&s[++a]===s[++p]&&s[++a]===s[++p]&&s[++a]===s[++p]&&a<f);if(h=258-(f-a),a=f-258,h>i){if(e.match_start=t,i=h,h>=r)break;u=s[a+i-1],c=s[a+i]}}while((t=d[t&l])>o&&0!=--n);return i<=e.lookahead?i:e.lookahead}function br(e){var t=e.w_size,a,i,r,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){zp.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,a=i;do r=e.head[--a],e.head[a]=r>=t?r-t:0;while(--i);i=t,a=i;do r=e.prev[--a],e.prev[a]=r>=t?r-t:0;while(--i);o+=t}if(0===e.strm.avail_in)break;if(i=mr(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=i,3<=e.lookahead+e.insert)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+3-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(3>e.lookahead+e.insert)););}while(262>e.lookahead&&0!==e.strm.avail_in)}function _r(e,t){for(var n,a;;){if(262>e.lookahead){if(br(e),262>e.lookahead&&0===t)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(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=gr(e,n)),!(3<=e.match_length))a=Jp._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;else if(a=Jp._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){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;if(a&&(cr(e,!1),0===e.strm.avail_out))return 1}return e.insert=2>e.strstart?e.strstart:2,4===t?(cr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(cr(e,!1),0===e.strm.avail_out)?1:2}function yr(e,t){for(var n,a,i;;){if(262>e.lookahead){if(br(e),262>e.lookahead&&0===t)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(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=gr(e,n),5>=e.match_length&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),3<=e.prev_length&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,a=Jp._tr_tally(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++,a&&(cr(e,!1),0===e.strm.avail_out))return 1}else if(!e.match_available)e.match_available=1,e.strstart++,e.lookahead--;else if(a=Jp._tr_tally(e,0,e.window[e.strstart-1]),a&&cr(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}return e.match_available&&(a=Jp._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=2>e.strstart?e.strstart:2,4===t?(cr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(cr(e,!1),0===e.strm.avail_out)?1:2}function xr(e,t){for(var n=e.window,a,i,r,o;;){if(258>=e.lookahead){if(br(e),258>=e.lookahead&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=e.strstart-1,i=n[r],i===n[++r]&&i===n[++r]&&i===n[++r])){o=e.strstart+258;do;while(i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&r<o);e.match_length=258-(o-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(3<=e.match_length?(a=Jp._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=Jp._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),a&&(cr(e,!1),0===e.strm.avail_out))return 1}re