UNPKG

@wont/js-sdk

Version:

The JavaScript browser client library for DataEye

2 lines 242 kB
"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var json2={},hasRequiredJson2;function requireJson2(){return hasRequiredJson2||(hasRequiredJson2=1,"object"!=typeof JSON&&(JSON={}),function(){var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,(function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function str(t,e){var r,i,n,s,o,a=gap,h=e[t];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(t)),"function"==typeof rep&&(h=rep.call(e,t,h)),typeof h){case"string":return quote(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(gap+=indent,o=[],"[object Array]"===Object.prototype.toString.apply(h)){for(s=h.length,r=0;r<s;r+=1)o[r]=str(r,h)||"null";return n=0===o.length?"[]":gap?"[\n"+gap+o.join(",\n"+gap)+"\n"+a+"]":"["+o.join(",")+"]",gap=a,n}if(rep&&"object"==typeof rep)for(s=rep.length,r=0;r<s;r+=1)"string"==typeof rep[r]&&(n=str(i=rep[r],h))&&o.push(quote(i)+(gap?": ":":")+n);else for(i in h)Object.prototype.hasOwnProperty.call(h,i)&&(n=str(i,h))&&o.push(quote(i)+(gap?": ":":")+n);return n=0===o.length?"{}":gap?"{\n"+gap+o.join(",\n"+gap)+"\n"+a+"}":"{"+o.join(",")+"}",gap=a,n}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,r){var i;if(gap="",indent="","number"==typeof r)for(i=0;i<r;i+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var r,i,n=t[e];if(n&&"object"==typeof n)for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(void 0!==(i=walk(n,r))?n[r]=i:delete n[r]);return reviver.call(t,e,n)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),json2}requireJson2();var Config$1={LIB_VERSION:"1.0.0"},MAX_REFERRER_STRING_LENGTH=200,ArrayProto=Array.prototype,ObjProto=Object.prototype,slice=ArrayProto.slice,toString$2=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeForEach=ArrayProto.forEach,breaker={},utmTypes=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],_={},T;_.each=function(t,e,r){if(null!==t)if(nativeForEach&&t.forEach===nativeForEach)t.forEach(e,r);else if(t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i,t)===breaker)return}else for(var s in t)if(hasOwnProperty.call(t,s)&&e.call(r,t[s],s,t)===breaker)return},_.extend=function(t){return _.each(slice.call(arguments,1),(function(e){for(var r in e)void 0!==e[r]&&(t[r]=e[r])})),t},_.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+" "+e(t.getHours())+":"+e(t.getMinutes())+":"+e(t.getSeconds())+"."+((r=t.getMilliseconds())<10?"00"+r:r<100?"0"+r:r);var r},_.formatTimeZone=function(t,e){if("number"!=typeof e)return t;var r=t.getTime(),i=6e4*t.getTimezoneOffset();return new Date(r+i+36e5*e)},_.formatJsonString=function(t){try{return JSON.stringify(t,null,8)}catch(e){return JSON.stringify(t)}},_.searchObjDate=function(t,e){(_.check.isObject(t)||_.check.isArray(t))&&_.each(t,(function(r,i){_.check.isObject(r)||_.check.isArray(r)?_.searchObjDate(t[i],e):_.check.isDate(r)&&(t[i]=_.formatDate(_.formatTimeZone(r,e)))}))},_.check={isUndefined:function(t){return void 0===t},isObject:function(t){return"[object Object]"===toString$2.call(t)&&null!==t},isEmptyObject:function(t){if(_.check.isObject(t)){for(var e in t)if(hasOwnProperty.call(t,e))return!1;return!0}return!1},isArray:function(t){return"[object Array]"===toString$2.call(t)},isString:function(t){return"[object String]"===toString$2.call(t)},isDate:function(t){return"[object Date]"===toString$2.call(t)},isNumber:function(t){return"[object Number]"===toString$2.call(t)},isBoolean:function(t){return"[object Boolean]"===toString$2.call(t)},isJSONString:function(t){try{JSON.parse(t)}catch(t){return!1}return!0}},_.UUID=(T=function(){for(var t=1*new Date,e=0;t===1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=String(screen.height*screen.width);t=t&&/\d{5,}/.test(t)?t.toString(16):String(31242*Math.random()).replace(".","").slice(0,8);var e=T()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,r=navigator.userAgent,i=[],n=0;function s(t,e){var r,n=0;for(r=0;r<e.length;r++)n|=i[r]<<8*r;return t^n}for(t=0;t<r.length;t++)e=r.charCodeAt(t),i.unshift(255&e),i.length>=4&&(n=s(n,i),i=[]);return i.length>0&&(n=s(n,i)),n.toString(16)}()+"-"+t+"-"+T();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}),_.UUIDv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))},_.getReferrer=function(t){var e=t||document.referrer;return"string"!=typeof e?"referrer exception"+String(e):(0===e.indexOf("https://www.baidu.com/")&&(e=e.split("?")[0]),"string"==typeof(e=e.slice(0,MAX_REFERRER_STRING_LENGTH))?e:"")},_.url=function(){function t(){return new RegExp(/(.*?)\.?([^\.]*?)\.(com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|net\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/)}function e(t,e){var r=t.charAt(0),i=e.split(r);return r===t?i:i[(t=parseInt(t.substring(1),10))<0?i.length+t:t-1]}function r(t,e){for(var r,i=t.charAt(0),n=e.split("&"),s=[],o={},a=[],h=t.substring(1),c=0,u=n.length;c<u;c++)if((s=n[c].match(/(.*?)=(.*)/))||(s=[n[c],n[c],""]),""!==s[1].replace(/\s/g,"")){if(s[2]=(r=s[2]||"",_.decodeURIComponent(r.replace(/\+/g," "))),h===s[1])return s[2];(a=s[1].match(/(.*)\[([0-9]+)\]/))?(o[a[1]]=o[a[1]]||[],o[a[1]][a[2]]=s[2]):o[s[1]]=s[2]}return i===t?o:o[h]}return function(i,n){var s,o={};if("tld?"===i)return t();if(n=n||window.location.toString(),!i)return n;if(i=i.toString(),s=n.match(/^mailto:([^\/].+)/))o.protocol="mailto",o.email=s[1];else{if((s=n.match(/(.*?)\/#\!(.*)/))&&(n=s[1]+s[2]),(s=n.match(/(.*?)#(.*)/))&&(o.hash=s[2],n=s[1]),o.hash&&i.match(/^#/))return r(i,o.hash);if((s=n.match(/(.*?)\?(.*)/))&&(o.query=s[2],n=s[1]),o.query&&i.match(/^\?/))return r(i,o.query);if((s=n.match(/(.*?)\:?\/\/(.*)/))&&(o.protocol=s[1].toLowerCase(),n=s[2]),(s=n.match(/(.*?)(\/.*)/))&&(o.path=s[2],n=s[1]),o.path=(o.path||"").replace(/^([^\/])/,"/$1").replace(/\/$/,""),i.match(/^[\-0-9]+$/)&&(i=i.replace(/^([^\/])/,"/$1")),i.match(/^\//))return e(i,o.path.substring(1));if((s=e("/-1",o.path.substring(1)))&&(s=s.match(/(.*?)\.(.*)/))&&(o.file=s[0],o.filename=s[1],o.fileext=s[2]),(s=n.match(/(.*)\:([0-9]+)$/))&&(o.port=s[2],n=s[1]),(s=n.match(/(.*?)@(.*)/))&&(o.auth=s[1],n=s[2]),o.auth&&(s=o.auth.match(/(.*)\:(.*)/),o.user=s?s[1]:o.auth,o.pass=s?s[2]:void 0),o.hostname=n.toLowerCase(),"."===i.charAt(0))return e(i,o.hostname);t()&&(s=o.hostname.match(t()))&&(o.tld=s[3],o.domain=s[2]?s[2]+"."+s[3]:void 0,o.sub=s[1]||void 0);var a=o.port?":"+o.port:"";o.protocol=o.protocol||window.location.protocol.replace(":",""),o.port=o.port||("https"===o.protocol?"443":"80"),o.protocol=o.protocol||("443"===o.port?"https":"http"),o.basic=o.protocol+"://"+o.hostname+a}return i in o?o[i]:"{}"===i?o:""}}(),_.hashCode=function(t){if("string"!=typeof t)return 0;var e=0;if(0===t.length)return e;for(var r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return e},_.decodeURIComponent=function(t){var e="";try{e=decodeURIComponent(t)}catch(r){e=t}return e},_.encodeURIComponent=function(t){var e="";try{e=encodeURIComponent(t)}catch(r){e=t}return e},_.utf8Encode=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<i;n++){var o=t.charCodeAt(n),a=null;o<128?r++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==a&&(r>e&&(s+=t.substring(e,r)),s+=a,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},_.base64Encode=function(t){var e,r,i,n,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,h=0,c="",u=[];if(!t)return t;t=_.utf8Encode(t);do{e=(s=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,r=s>>12&63,i=s>>6&63,n=63&s,u[h++]=o.charAt(e)+o.charAt(r)+o.charAt(i)+o.charAt(n)}while(a<t.length);switch(c=u.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},_.cookie={get:function(t){for(var e=t+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var n=r[i];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return _.decodeURIComponent(n.substring(e.length,n.length))}return null},set:function(t,e,r,i,n){var s="",o="",a="";if(r=null===r?73e3:r,i){var h=_.url("domain",location.href);s=h?"; domain=."+h:""}if(r){var c=new Date;"s"===String(r).slice(-1)?c.setTime(c.getTime()+1e3*Number(String(r).slice(0,-1))):c.setTime(c.getTime()+24*r*60*60*1e3),o="; expires="+c.toGMTString()}n&&(a="; secure");var u=t+"="+encodeURIComponent(e)+o+"; path=/"+s+a;return document.cookie=u,u},remove:function(t,e){_.cookie.set(t,"",-1,e)}},_.localStorage={get:function(t){try{return window.localStorage.getItem(t)}catch(t){_.localStorage.error(t)}},parse:function(t){var e;try{e=JSON.parse(_.localStorage.get(t))||null}catch(t){_.localStorage.error(t)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){_.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){_.localStorage.error(t)}},error:function(t){console.error("localStorage error: "+t)},isSupported:function(){var t=!0;try{var e="__funsdatasupport__",r="testIsSupportStorage";_.localStorage.set(e,r),_.localStorage.get(e)!==r&&(t=!1),_.localStorage.remove(e)}catch(e){t=!1}return t}},_.stripEmptyProperties=function(t){var e={};return _.each(t,(function(t,r){_.check.isString(t)&&t.length>0&&(e[r]=t)})),e},_.info={os:function(){var t=navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},browser:function(){var t={type:"",version:""};try{var e=navigator.userAgent.toLowerCase(),r=[];if(null!==e.match(/baidubrowser/)?(t.type="baidu",r.push(/baidubrowser\/([\d.]+)/)):null!==e.match(/bidubrowser/)?(t.type="baidu",r.push(/bidubrowser\/([\d.]+)/)):null!==e.match(/edga/)?(t.type="edge",r.push(/edga\/([\d.]+)/)):null!==e.match(/edgios/)?(t.type="edge",r.push(/edgios\/([\d.]+)/)):null!==e.match(/liebaofast/)?(t.type="liebao",r.push(/liebaofast\/([\d.]+)/)):null!==e.match(/sogoumobilebrowser/)?(t.type="sogou",r.push(/sogoumobilebrowser\/([\d.]+)/)):null!==e.match(/lbbrowser/)?(t.type="liebao",r.push(/lbbrowser\/([\d.]+)/)):null!==e.match(/crios/)?(t.type="chrome",r.push(/crios\/([\d.]+)/)):null!==e.match(/qihoobrowser/)?(t.type="360",r.push(/qihoobrowser\/([\d.]+)/)):null!==e.match(/mxios/)?(t.type="maxthon",r.push(/mxios\/([\d.]+)/)):null!==e.match(/fxios/)?(t.type="firefox",r.push(/fxios\/([\d.\w]+)/)):null!==e.match(/edge/)?(t.type="edge",r.push(/edge\/([\d.]+)/)):null!==e.match(/metasr/)?(t.type="sogou",r.push(/metasr ([\d.]+)/)):null!==e.match(/micromessenger/)?(t.type="micromessenger",r.push(/micromessenger\/([\d.]+)/)):null!==e.match(/mqqbrowser/)?(t.type="qq",r.push(/mqqbrowser\/([\d.]+)/)):null!==e.match(/qqbrowserlite/)?(t.type="qq",r.push(/qqbrowserlite\/([\d.]+)/)):null!==e.match(/tencenttraveler/)?(t.type="qq",r.push(/tencenttraveler\/([\d.]+)/)):null!==e.match(/qqbrowser/)?(t.type="qq",r.push(/qqbrowser\/([\d.]+)/)):null!==e.match(/maxthon/)?(t.type="maxthon",r.push(/maxthon\/([\d.]+)/)):null!==e.match(/ubrowser/)?(t.type="uc",r.push(/ubrowser\/([\d.]+)/)):null!==e.match(/ucbrowser/)?(t.type="uc",r.push(/ucbrowser\/([\d.]+)/)):null!==e.match(/firefox/)?(t.type="firefox",r.push(/firefox\/([\d.]+)/)):null!==e.match(/opera/)?(t.type="opera",r.push(/opera\/([\d.]+)/)):null!==e.match(/opr/)?(t.type="opera",r.push(/opr\/([\d.]+)/)):null!==e.match(/chrome/)?(t.type="chrome",r.push(/chrome\/([\d.]+)/)):null!==e.match(/safari/)?(t.type="safari",r.push(/version\/([\d.]+)/)):null===e.match(/trident/)&&null===e.match(/msie/)||(t.type="ie"),"ie"===t.type){var i=e.match(/trident\/([\d.]+)/)?e.match(/trident\/([\d.]+)/)[1]:"",n=e.match(/msie ([\d.]+)/)?e.match(/msie ([\d.]+)/)[1]:"";""!==i?t.version=String(parseInt(i)+4):""!==n&&(t.version=n)}else r&&(t.version=e.match(r[0])?e.match(r[0])[1]:"")}catch(t){Log.w("getting browser info failed due to ",t)}return t},properties:function(){var t=_.info.browser();return _.extend({"#os":_.info.os(),"#lib_version":Config$1.LIB_VERSION,"#lib":"js","#screen_height":screen.height,"#screen_width":screen.width,"#browser":t.type,"#browser_version":t.version,"#system_language":_.check.isString(navigator.languages[1])?navigator.languages[1].toLowerCase():"Value exception","#ua":_.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"Value exception","#utm":_.getUtm()})},pageProperties:function(){var t=_.getReferrer();return _.stripEmptyProperties({"#referrer":t,"#referrer_host":t?_.url("hostname",t):t,"#url":location.href,"#url_path":location.pathname,"#title":document.title})}},_.getUtm=function(){var t={};return _.each(utmTypes,(function(e){var r=_.getQueryParam(location.href,e);r.length&&(t[e]=r)})),JSON.stringify(t)},_.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=_.decodeURIComponent(t);var r=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":_.decodeURIComponent(r[1])},_.createString=function(t){for(var e=t,r=Math.random().toString(36).substr(2);r.length<e;)r+=Math.random().toString(36).substr(2);return r=r.substr(0,t)},_.createAesKey=function(){return _.createString(16)},_.generateEncryptyData=function(t,e){if(void 0===e)return t;var r=e.publicKey,i=e.version;if(void 0===r||void 0===i)return t;if("undefined"==typeof CryptoJS||"undefined"==typeof JSEncrypt)return t;var n=_.createAesKey();try{var s=CryptoJS.enc.Utf8.parse(n),o=CryptoJS.enc.Utf8.parse(JSON.stringify(t)),a=CryptoJS.AES.encrypt(o,s,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString(),h=new JSEncrypt;h.setPublicKey(r);var c=h.encrypt(n);return!1===c?(Log.w("encryption failed"),t):{pkv:i,ekey:c,payload:a}}catch(t){Log.w("encryption failed")}return t},_.paramType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","")},_.addEvent=function(t,e,r,i){if(document.addEventListener)if("Array"!==this.paramType(t)&&"HTMLCollection"!==this.paramType(t)||!t.length||t===window)t.addEventListener(e,r,i);else for(var n=0;n<t.length;n++)this.addEvent(t[n],e,r,i);else if(t.length&&t!==window)for(var s=0;s<t.length;s++)this.addEvent(t[s],e,r);else t.attachEvent("on"+e,(function(){return r.call(t,window.event)}))},_.getRandom=function(){return(new Date).getTime()+"_"+Math.floor(1e6*Math.random())},_.safeJSONParse=function(t){var e=null;try{e=JSON.parse(t)}catch(e){return t}return e},_.saveObjectVal=function(t,e){_.check.isString(e)||(e=JSON.stringify(e)),_.localStorage.set(t,e)},_.readObjectVal=function(t){var e=_.localStorage.get(t);return e?_.safeJSONParse(e):null},_.indexOf=function(t,e){var r=t.indexOf;if(r)return r.call(t,e);for(var i=0;i<t.length;i++)if(e===t[i])return i;return-1},_.hasEncrypty=function(t){return!!_.check.isObject()&&("undefined"!==t.pkv&&"undefined"!==t.ekey&&"undefined"!==t.payload)},_.addSiteEvent=function(t,e,r,i){function n(t){return t&&(t.preventDefault=n.preventDefault,t.stopPropagation=n.stopPropagation,t._getPath=n._getPath),t}n._getPath=function(){var t;return this.path||this.composedPath&&this.composedPath()||(t=this.target,new s(t)).getParents()};var s=function(t){this.ele=t};n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0};(function(t,e,r){if(void 0===i&&"click"===e&&(i=!0),t&&t.addEventListener)t.addEventListener(e,(function(t){t._getPath=n._getPath,r.call(this,t)}),i);else{var s="on"+e,o=t[s];t[s]=function(t,e,r,i){var s=function(s){if(s=s||n(window.event)){s.target=s.srcElement;var o,a,h=!0;return"function"==typeof r&&(o=r(s)),a=e.call(t,s),"beforeunload"!==i?(!1!==o&&!1!==a||(h=!1),h):void 0}};return s}(t,r,o,e)}}).apply(null,arguments)},_.getURLSearchParams=function(t){for(var e={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var n=r[i].indexOf("=");if(-1!==n){var s=r[i].substring(0,n),o=r[i].substring(n+1);s=_.decodeURIComponent(s),o=_.decodeURIComponent(o),e[s]=o}}return e},_.urlParse=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!=typeof t)return!1;var e=this._values.QueryString||"";for(var r in t)e=new RegExp(r+"[^&]+").test(e)?e.replace(new RegExp(r+"[^&]+"),r+"="+t[r]):"&"===e.slice(-1)?e+r+"="+t[r]:""===e?r+"="+t[r]:e+"&"+r+"="+t[r];this._values.QueryString=e},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Port?":"+this._values.Port:"",t+=this._values.Path,t+=this._values.QueryString?"?"+this._values.QueryString:"",t+=this._values.Fragment?"#"+this._values.Fragment:""},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);e||Log.i("URLParser::_parse -> Invalid URL");var r=t.split("#"),i=r[0],n=r.slice(1).join("#");for(var s in e=this._regex.exec(i),this._fields)void 0!==e[this._fields[s]]&&(this._values[s]=e[this._fields[s]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=n},new e(t)},_.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},_.URL=function(t){var e,r={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(r=new URL(t)).searchParams||(r.searchParams=(e=_.getURLSearchParams(r.search),{get:function(t){return e[t]}}));else{_.check.isString(t)||(t=String(t)),t=_.trim(t);if(!1===/^https?:\/\/.+/.test(t))return void Log.w("Invalid URL");var i=_.urlParse(t);r.hash=i._values.Fragment,r.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",r.href=i._values.URL,r.password=i._values.Password,r.pathname=i._values.Path,r.port=i._values.Port,r.search=i._values.QueryString?"?"+i._values.QueryString:"",r.username=i._values.Username,r.hostname=i._values.Hostname,r.protocol=i._values.Protocol?i._values.Protocol+":":"",r.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",r.searchParams=function(){var t=_.getURLSearchParams("?"+i._values.QueryString);return{get:function(e){return t[e]}}}()}return r};class Log{static i(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"==typeof console&&console.log)try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}static w(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"==typeof console&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}var KEY_NAME_MATCH_REGEX=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/;class PropertyChecker{static stripProperties(t){return _.check.isObject(t)?(_.each(t,(function(t,e){_.check.isString(t)||_.check.isNumber(t)||_.check.isDate(t)||_.check.isBoolean(t)||_.check.isArray(t)||_.check.isObject(t)||Log.w("The format of Data-",e,t," does not meet the requirements and may not be stored correctly. The attribute value only supports String, Number, Date, Boolean, Array,Object")})),t):t}static _checkPropertiesKey(t){var e=!0;return _.each(t,((t,r)=>{KEY_NAME_MATCH_REGEX.test(r)||(Log.w("invalid key: "+r),e=!1)})),e}static event(t){return!(!_.check.isString(t)||!KEY_NAME_MATCH_REGEX.test(t))||(Log.w("Please check the parameter format, eventName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}static propertyName(t){return!(!_.check.isString(t)||!KEY_NAME_MATCH_REGEX.test(t))||(Log.w("Please check the parameter format, propertyName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}static properties(t){return this.stripProperties(t),!t||!!_.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(Log.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1))}static propertiesMust(t){return this.stripProperties(t),void 0===t||!_.check.isObject(t)||_.check.isEmptyObject(t)?(Log.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(Log.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1)}static userId(t){return!(!_.check.isString(t)||!/^.{1,63}$/.test(t))||(Log.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}} /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(t){let e=t.length;for(;--e>=0;)t[e]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([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]),extra_dbits=new Uint8Array([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]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES$1+2));zero$1(static_ltree);const static_dtree=new Array(2*D_CODES$1);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);function StaticTreeDesc(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}zero$1(base_dist);const d_code=t=>t<256?_dist_code[t]:_dist_code[256+(t>>>7)],put_short=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},send_bits=(t,e,r)=>{t.bi_valid>Buf_size-r?(t.bi_buf|=e<<t.bi_valid&65535,put_short(t,t.bi_buf),t.bi_buf=e>>Buf_size-t.bi_valid,t.bi_valid+=r-Buf_size):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},send_code=(t,e,r)=>{send_bits(t,r[2*e],r[2*e+1])},bi_reverse=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},bi_flush=t=>{16===t.bi_valid?(put_short(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)},gen_bitlen=(t,e)=>{const r=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,h=e.stat_desc.max_length;let c,u,l,f,d,p,_=0;for(f=0;f<=MAX_BITS$1;f++)t.bl_count[f]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<HEAP_SIZE$1;c++)u=t.heap[c],f=r[2*r[2*u+1]+1]+1,f>h&&(f=h,_++),r[2*u+1]=f,u>i||(t.bl_count[f]++,d=0,u>=a&&(d=o[u-a]),p=r[2*u],t.opt_len+=p*(f+d),s&&(t.static_len+=p*(n[2*u+1]+d)));if(0!==_){do{for(f=h-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[h]--,_-=2}while(_>0);for(f=h;0!==f;f--)for(u=t.bl_count[f];0!==u;)l=t.heap[--c],l>i||(r[2*l+1]!==f&&(t.opt_len+=(f-r[2*l+1])*r[2*l],r[2*l+1]=f),u--)}},gen_codes=(t,e,r)=>{const i=new Array(MAX_BITS$1+1);let n,s,o=0;for(n=1;n<=MAX_BITS$1;n++)o=o+r[n-1]<<1,i[n]=o;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=bi_reverse(i[e]++,e))}},tr_static_init=()=>{let t,e,r,i,n;const s=new Array(MAX_BITS$1+1);for(r=0,i=0;i<LENGTH_CODES$1-1;i++)for(base_length[i]=r,t=0;t<1<<extra_lbits[i];t++)_length_code[r++]=i;for(_length_code[r-1]=i,n=0,i=0;i<16;i++)for(base_dist[i]=n,t=0;t<1<<extra_dbits[i];t++)_dist_code[n++]=i;for(n>>=7;i<D_CODES$1;i++)for(base_dist[i]=n<<7,t=0;t<1<<extra_dbits[i]-7;t++)_dist_code[256+n++]=i;for(e=0;e<=MAX_BITS$1;e++)s[e]=0;for(t=0;t<=143;)static_ltree[2*t+1]=8,t++,s[8]++;for(;t<=255;)static_ltree[2*t+1]=9,t++,s[9]++;for(;t<=279;)static_ltree[2*t+1]=7,t++,s[7]++;for(;t<=287;)static_ltree[2*t+1]=8,t++,s[8]++;for(gen_codes(static_ltree,L_CODES$1+1,s),t=0;t<D_CODES$1;t++)static_dtree[2*t+1]=5,static_dtree[2*t]=bi_reverse(t,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=t=>{let e;for(e=0;e<L_CODES$1;e++)t.dyn_ltree[2*e]=0;for(e=0;e<D_CODES$1;e++)t.dyn_dtree[2*e]=0;for(e=0;e<BL_CODES$1;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*END_BLOCK]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},bi_windup=t=>{t.bi_valid>8?put_short(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},smaller=(t,e,r,i)=>{const n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]},pqdownheap=(t,e,r)=>{const i=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&smaller(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!smaller(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i},compress_block=(t,e,r)=>{let i,n,s,o,a=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+a++],i+=(255&t.pending_buf[t.sym_buf+a++])<<8,n=t.pending_buf[t.sym_buf+a++],0===i?send_code(t,n,e):(s=_length_code[n],send_code(t,s+LITERALS$1+1,e),o=extra_lbits[s],0!==o&&(n-=base_length[s],send_bits(t,n,o)),i--,s=d_code(i),send_code(t,s,r),o=extra_dbits[s],0!==o&&(i-=base_dist[s],send_bits(t,i,o)))}while(a<t.sym_next);send_code(t,END_BLOCK,e)},build_tree=(t,e)=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let o,a,h,c=-1;for(t.heap_len=0,t.heap_max=HEAP_SIZE$1,o=0;o<s;o++)0!==r[2*o]?(t.heap[++t.heap_len]=c=o,t.depth[o]=0):r[2*o+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=c<2?++c:0,r[2*h]=1,t.depth[h]=0,t.opt_len--,n&&(t.static_len-=i[2*h+1]);for(e.max_code=c,o=t.heap_len>>1;o>=1;o--)pqdownheap(t,r,o);h=s;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],pqdownheap(t,r,1),a=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=a,r[2*h]=r[2*o]+r[2*a],t.depth[h]=(t.depth[o]>=t.depth[a]?t.depth[o]:t.depth[a])+1,r[2*o+1]=r[2*a+1]=h,t.heap[1]=h++,pqdownheap(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],gen_bitlen(t,e),gen_codes(r,c,t.bl_count)},scan_tree=(t,e,r)=>{let i,n,s=-1,o=e[1],a=0,h=7,c=4;for(0===o&&(h=138,c=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=e[2*(i+1)+1],++a<h&&n===o||(a<c?t.bl_tree[2*n]+=a:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*REP_3_6]++):a<=10?t.bl_tree[2*REPZ_3_10]++:t.bl_tree[2*REPZ_11_138]++,a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4))},send_tree=(t,e,r)=>{let i,n,s=-1,o=e[1],a=0,h=7,c=4;for(0===o&&(h=138,c=3),i=0;i<=r;i++)if(n=o,o=e[2*(i+1)+1],!(++a<h&&n===o)){if(a<c)do{send_code(t,n,t.bl_tree)}while(0!=--a);else 0!==n?(n!==s&&(send_code(t,n,t.bl_tree),a--),send_code(t,REP_3_6,t.bl_tree),send_bits(t,a-3,2)):a<=10?(send_code(t,REPZ_3_10,t.bl_tree),send_bits(t,a-3,3)):(send_code(t,REPZ_11_138,t.bl_tree),send_bits(t,a-11,7));a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4)}},build_bl_tree=t=>{let e;for(scan_tree(t,t.dyn_ltree,t.l_desc.max_code),scan_tree(t,t.dyn_dtree,t.d_desc.max_code),build_tree(t,t.bl_desc),e=BL_CODES$1-1;e>=3&&0===t.bl_tree[2*bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e},send_all_trees=(t,e,r,i)=>{let n;for(send_bits(t,e-257,5),send_bits(t,r-1,5),send_bits(t,i-4,4),n=0;n<i;n++)send_bits(t,t.bl_tree[2*bl_order[n]+1],3);send_tree(t,t.dyn_ltree,e-1),send_tree(t,t.dyn_dtree,r-1)},detect_data_type=t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return Z_BINARY;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return Z_TEXT;for(e=32;e<LITERALS$1;e++)if(0!==t.dyn_ltree[2*e])return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=t=>{static_init_done||(tr_static_init(),static_init_done=!0),t.l_desc=new TreeDesc(t.dyn_ltree,static_l_desc),t.d_desc=new TreeDesc(t.dyn_dtree,static_d_desc),t.bl_desc=new TreeDesc(t.bl_tree,static_bl_desc),t.bi_buf=0,t.bi_valid=0,init_block(t)},_tr_stored_block$1=(t,e,r,i)=>{send_bits(t,(STORED_BLOCK<<1)+(i?1:0),3),bi_windup(t),put_short(t,r),put_short(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r},_tr_align$1=t=>{send_bits(t,STATIC_TREES<<1,3),send_code(t,END_BLOCK,static_ltree),bi_flush(t)},_tr_flush_block$1=(t,e,r,i)=>{let n,s,o=0;t.level>0?(t.strm.data_type===Z_UNKNOWN$1&&(t.strm.data_type=detect_data_type(t)),build_tree(t,t.l_desc),build_tree(t,t.d_desc),o=build_bl_tree(t),n=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?_tr_stored_block$1(t,e,r,i):t.strategy===Z_FIXED$1||s===n?(send_bits(t,(STATIC_TREES<<1)+(i?1:0),3),compress_block(t,static_ltree,static_dtree)):(send_bits(t,(DYN_TREES<<1)+(i?1:0),3),send_all_trees(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),compress_block(t,t.dyn_ltree,t.dyn_dtree)),init_block(t),i&&bi_windup(t)},_tr_tally$1=(t,e,r)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(_length_code[r]+LITERALS$1+1)]++,t.dyn_dtree[2*d_code(e)]++),t.sym_next===t.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(t,e,r,i)=>{let n=65535&t,s=t>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{n=n+e[i++]|0,s=s+n|0}while(--o);n%=65521,s%=65521}return n|s<<16};var adler32_1=adler32;const makeTable=()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e},crcTable=new Uint32Array(makeTable()),crc32=(t,e,r,i)=>{const n=crcTable,s=i+r;t^=-1;for(let r=i;r<s;r++)t=t>>>8^n[255&(t^e[r])];return~t};var crc32_1=crc32,messages={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"},constants$2={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_MEM_ERROR:-4,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};const{_tr_init:_tr_init,_tr_stored_block:_tr_stored_block,_tr_flush_block:_tr_flush_block,_tr_tally:_tr_tally,_tr_align:_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH:Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED:Z_FILTERED,Z_HUFFMAN_ONLY:Z_HUFFMAN_ONLY,Z_RLE:Z_RLE,Z_FIXED:Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN:Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(t,e)=>(t.msg=messages[e],e),rank=t=>2*t-(t>4?9:0),zero=t=>{let e=t.length;for(;--e>=0;)t[e]=0},slide_hash=t=>{let e,r,i,n=t.w_size;e=t.hash_size,i=e;do{r=t.head[--i],t.head[i]=r>=n?r-n:0}while(--e);e=n,i=e;do{r=t.prev[--i],t.prev[i]=r>=n?r-n:0}while(--e)};let HASH_ZLIB=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask,HASH=HASH_ZLIB;const flush_pending=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},flush_block_only=(t,e)=>{_tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,flush_pending(t.strm)},put_byte=(t,e)=>{t.pending_buf[t.pending++]=e},putShortMSB=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},read_buf=(t,e,r,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),r),1===t.state.wrap?t.adler=adler32_1(t.adler,e,n,r):2===t.state.wrap&&(t.adler=crc32_1(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},longest_match=(t,e)=>{let r,i,n=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match;const h=t.strstart>t.w_size-MIN_LOOKAHEAD?t.strstart-(t.w_size-MIN_LOOKAHEAD):0,c=t.window,u=t.w_mask,l=t.prev,f=t.strstart+MAX_MATCH;let d=c[s+o-1],p=c[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(r=e,c[r+o]===p&&c[r+o-1]===d&&c[r]===c[s]&&c[++r]===c[s+1]){s+=2,r++;do{}while(c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&s<f);if(i=MAX_MATCH-(f-s),s=f-MAX_MATCH,i>o){if(t.match_start=e,o=i,i>=a)break;d=c[s+o-1],p=c[s+o]}}}while((e=l[e&u])>h&&0!=--n);return o<=t.lookahead?o:t.lookahead},fill_window=t=>{const e=t.w_size;let r,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-MIN_LOOKAHEAD)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),slide_hash(t),i+=e),0===t.strm.avail_in)break;if(r=read_buf(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=MIN_MATCH)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=HASH(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=HASH(t,t.ins_h,t.window[n+MIN_MATCH-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<MIN_MATCH)););}while(t.lookahead<MIN_LOOKAHEAD&&0!==t.strm.avail_in)},deflate_stored=(t,e)=>{let r,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,a=t.strm.avail_in;do{if(r=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>n&&(r=n),r<s&&(0===r&&e!==Z_FINISH$3||e===Z_NO_FLUSH$2||r!==i+t.strm.avail_in))break;o=e===Z_FINISH$3&&r===i+t.strm.avail_in?1:0,_tr_stored_block(t,0,0,o),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,flush_pending(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(read_buf(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===o);return a-=t.strm.avail_in,a&&(a>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=a&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-a,t.strm.next_in),t.strstart),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?BS_FINISH_DONE:e!==Z_NO_FLUSH$2&&e!==Z_FINISH$3&&0===t.strm.avail_in&&t.strstart===t.block_start?BS_BLOCK_DONE:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(read_buf(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===Z_FINISH$3)&&e!==Z_NO_FLUSH$2&&0===t.strm.avail_in&&i<=n)&&(r=i>n?n:i,o=e===Z_FINISH$3&&0===t.strm.avail_in&&r===i?1:0,_tr_stored_block(t,t.block_start,r,o),t.block_start+=r,flush_pending(t.strm)),o?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(t,e)=>{let r,i;for(;;){if(t.lookahead<MIN_LOOKAHEAD){if(fill_window(t),t.lookahead<MIN_LOOKAHEAD&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(0===t.lookahead)break}if(r=0,t.lookahead>=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r)),t.match_length>=MIN_MATCH)if(i=_tr_tally(t,t.strstart-t.match_start,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=MIN_MATCH){t.match_length--;do{t.strstart++,t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+1]);else i=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=t.strstart<MIN_MATCH-1?t.strstart:MIN_MATCH-1,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(t,e)=>{let r,i,n;for(;;){if(t.lookahead<MIN_LOOKAHEAD){if(fill_window(t),t.lookahead<MIN_LOOKAHEAD&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(0===t.lookahead)break}if(r=0,t.lookahead>=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=MIN_MATCH-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r),t.match_length<=5&&(t.strategy===Z_FILTERED||t.match_length===MIN_MATCH&&t.strstart-t.match_start>4096)&&(t.match_length=MIN_MATCH-1)),t.prev_length>=MIN_MATCH&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-MIN_MATCH,i=_tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-MIN_MATCH),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=MIN_MATCH-1,t.strstart++,i&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}else if(t.match_available){if(i=_tr_tally(t,0,t.window[t.strstart-1]),i&&flush_block_only(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return BS_NEED_MORE}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=_tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<MIN_MATCH-1?t.strstart:MIN_MATCH-1,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(t,e)=>{let r,i,n,s;const o=t.window;for(;;){if(t.lookahead<=MAX_MATCH){if(fill_window(t),t.lookahead<=MAX_MATCH&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=MIN_MATCH&&t.strstart>0&&(n=t.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){s=t.strstart+MAX_MATCH;do{}while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<s);t.match_length=MAX_MATCH-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=MIN_MATCH?(r=_tr_tally(t,1,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(t,e)=>{let r;for(;;){if(0===t.lookahead&&(fill_window(t),0===t.lookahead)){if(e===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(t.match_length=0,r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=t=>{t.window_size=2*t.w_size,zero(t.head),t.max_lazy_match=configuration_table[t.level].max_lazy,t.good_match=configuration_table[t.level].good_length,t.nice_match=configuration_table[t.level].nice_length,t.max_chain_length=configuration_table[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=MIN_MATCH-1,t.match_available=0,t.ins_h=0};function DeflateState(){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=Z_DEFLATED$2,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 Uint16Array(2*HEAP_SIZE),this.dyn_dtree=new Uint16Array(2*(2*D_CODES+1)),this.bl_tree=new Uint16Array(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==INIT_STATE&&e.status!==GZIP_STATE&&e.status!==EXTRA_STATE&&e.status!==NAME_STATE&&e.status!==COMMENT_STATE&&e.status!==HCRC_STATE&&e.status!==BUSY_STATE&&e.status!==FINISH_STATE?1:0},deflateResetKeep=t=>{if(deflateStateCheck(t))return err(t,Z_STREAM_ERROR$2);t.total_in=t.total_out=0,t.data_type=Z_UNKNOWN;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?GZIP_STATE:e.wrap?INIT_STATE:BUSY_STATE,t.adler=2===e.wrap?0:1,e.last_flush=-2,_tr_init(e),Z_OK$3},deflateReset=t=>{const e=deflateResetKeep(t);return e===Z_OK$3&&lm_init(t.state),e},deflateSetHeader=(t,e)=>deflateStateCheck(t)||2!==t.state.wrap?Z_STREAM_ERROR$2:(t.state.gzhead=e,Z_OK$3),deflateInit2=(t,e,r,i,n,s)=>{if(!t)return Z_STREAM_ERROR$2;let o=1;if(e===Z_DEFAULT_COMPRESSION$1&&(e=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||i<8||i>15||e<0||e>9||s<0||s>Z_FIXED||8===i&&1!==o)return err(t,Z_STREAM_ERROR$2);8===i&&(i=9);const a=new DeflateState;return t.state=a,a.strm=t,a.status=INIT_STATE,a.wrap=o,a.gzhead=null,a.w_bits=i,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=n+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+MIN_MATCH-1)/MIN_MATCH),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<n+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=e,a.strategy=s,a.method=r,deflateReset(t)},deflateInit=(t,e)=>deflateInit2(t,e,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(t,e)=>{if(deflateStateCheck(t)||e>Z_BLOCK$1||e<0)return t?err(t,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===FINISH_STATE&&e!==Z_FINISH$3)return err(t,0===t.avail_out?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const i=r.last_flush;if(r.last_flush=e,0!==r.pending){if(flush_pending(t),0===t.avail_out)return r.last_flush=-1,Z_OK$3}else if(0===t.avail_in&&rank(e)<=rank(i)&&e!==