@bi_funsdata/js-sdk 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd.min.js CHANGED
@@ -1,4 +1,10 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).funsdata=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function r(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var h,c="1.0.3",u=Array.prototype,l=Object.prototype,f=u.slice,p=l.toString,d=l.hasOwnProperty,g=u.forEach,m={},v=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],_={};_.each=function(t,e,r){if(null!==t)if(g&&t.forEach===g)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)===m)return}else for(var s in t)if(d.call(t,s)&&e.call(r,t[s],s,t)===m)return},_.extend=function(t){return _.each(f.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]"===p.call(t)&&null!==t},isEmptyObject:function(t){if(_.check.isObject(t)){for(var e in t)if(d.call(t,e))return!1;return!0}return!1},isArray:function(t){return"[object Array]"===p.call(t)},isString:function(t){return"[object String]"===p.call(t)},isDate:function(t){return"[object Date]"===p.call(t)},isNumber:function(t){return"[object Number]"===p.call(t)},isBoolean:function(t){return"[object Boolean]"===p.call(t)},isJSONString:function(t){try{JSON.parse(t)}catch(t){return!1}return!0}},_.UUID=(h=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=h()+"-"+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+"-"+h();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,200))?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){return _.decodeURIComponent(t.replace(/\+/g," "))}function r(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 i(t,r){for(var i=t.charAt(0),n=r.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]=e(s[2]||""),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(e,n){var s,o={};if("tld?"===e)return t();if(n=n||window.location.toString(),!e)return n;if(e=e.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&&e.match(/^#/))return i(e,o.hash);if((s=n.match(/(.*?)\?(.*)/))&&(o.query=s[2],n=s[1]),o.query&&e.match(/^\?/))return i(e,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(/\/$/,""),e.match(/^[\-0-9]+$/)&&(e=e.replace(/^([^\/])/,"/$1")),e.match(/^\//))return r(e,o.path.substring(1));if((s=r("/-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(),"."===e.charAt(0))return r(e,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 e in o?o[e]:"{}"===e?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&=e;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){y.w("getting browser info failed due to ",t)}return t},properties:function(){var t=_.info.browser();return _.extend({"#os":_.info.os(),"#lib_version":c,"#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(v,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?(y.w("encryption failed"),t):{pkv:i,ekey:c,payload:a}}catch(t){y.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"!==a(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||y.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 y.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},_.normalizeTopLevelKeys=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("object"!==a(t)||null===t||Array.isArray(t))return{};var r={};for(var i in t){if(Object.hasOwnProperty.call(t,i))r[e&&Object.keys(_.info.pageProperties()).includes(i)?i:i.replace(/^#+/,"").toLowerCase()]=t[i]}return r};var y=function(){return r(function e(){t(this,e)},null,[{key:"i",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":a(console))&&console.log)try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}},{key:"w",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":a(console))&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}])}(),b=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/,w=function(){return r(function e(){t(this,e)},null,[{key:"stripProperties",value:function(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)||y.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}},{key:"_checkPropertiesKey",value:function(t){var e=!0;return _.each(t,function(t,r){b.test(r)||(y.w("invalid key: "+r),e=!1)}),e}},{key:"event",value:function(t){return!(!_.check.isString(t)||!b.test(t))||(y.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)}},{key:"propertyName",value:function(t){return!(!_.check.isString(t)||!b.test(t))||(y.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)}},{key:"properties",value:function(t){return this.stripProperties(t),!t||!!_.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(y.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))}},{key:"propertiesMust",value:function(t){return this.stripProperties(t),void 0===t||!_.check.isObject(t)||_.check.isEmptyObject(t)?(y.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(y.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)}},{key:"userId",value:function(t){return!(!_.check.isString(t)||!/^.{1,63}$/.test(t))||(y.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}])}(),S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T,k,E,D,O,A,P,C,R,I,B={},z={},N={};function U(){if(T)return N;T=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,r=286,i=30,n=15,s=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]),o=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]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new Array(576);t(c);const u=new Array(60);t(u);const l=new Array(512);t(l);const f=new Array(256);t(f);const p=new Array(29);t(p);const d=new Array(i);function g(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 m,v,_;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const b=t=>t<256?l[t]:l[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},S=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},x=(t,e,r)=>{S(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},E=(t,e,r)=>{const i=new Array(16);let s,o,a=0;for(s=1;s<=n;s++)a=a+r[s-1]<<1,i[s]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(i[e]++,e))}},D=t=>{let e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},O=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=(t,e,r,i)=>{const n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]},P=(t,e,r)=>{const i=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&A(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!A(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i},C=(t,r,i)=>{let n,a,h,c,u=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+u++],n+=(255&t.pending_buf[t.sym_buf+u++])<<8,a=t.pending_buf[t.sym_buf+u++],0===n?x(t,a,r):(h=f[a],x(t,h+e+1,r),c=s[h],0!==c&&(a-=p[h],S(t,a,c)),n--,h=b(n),x(t,h,i),c=o[h],0!==c&&(n-=d[h],S(t,n,c)))}while(u<t.sym_next);x(t,256,r)},R=(t,e)=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,h,c,u=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<o;a++)0!==r[2*a]?(t.heap[++t.heap_len]=u=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)c=t.heap[++t.heap_len]=u<2?++u:0,r[2*c]=1,t.depth[c]=0,t.opt_len--,s&&(t.static_len-=i[2*c+1]);for(e.max_code=u,a=t.heap_len>>1;a>=1;a--)P(t,r,a);c=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,r,1),h=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=h,r[2*c]=r[2*a]+r[2*h],t.depth[c]=(t.depth[a]>=t.depth[h]?t.depth[a]:t.depth[h])+1,r[2*a+1]=r[2*h+1]=c,t.heap[1]=c++,P(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,i=e.max_code,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,h=e.stat_desc.extra_base,c=e.stat_desc.max_length;let u,l,f,p,d,g,m=0;for(p=0;p<=n;p++)t.bl_count[p]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],p=r[2*r[2*l+1]+1]+1,p>c&&(p=c,m++),r[2*l+1]=p,l>i||(t.bl_count[p]++,d=0,l>=h&&(d=a[l-h]),g=r[2*l],t.opt_len+=g*(p+d),o&&(t.static_len+=g*(s[2*l+1]+d)));if(0!==m){do{for(p=c-1;0===t.bl_count[p];)p--;t.bl_count[p]--,t.bl_count[p+1]+=2,t.bl_count[c]--,m-=2}while(m>0);for(p=c;0!==p;p--)for(l=t.bl_count[p];0!==l;)f=t.heap[--u],f>i||(r[2*f+1]!==p&&(t.opt_len+=(p-r[2*f+1])*r[2*f],r[2*f+1]=p),l--)}})(t,e),E(r,u,t.bl_count)},I=(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[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4))},B=(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{x(t,n,t.bl_tree)}while(0!==--a);else 0!==n?(n!==s&&(x(t,n,t.bl_tree),a--),x(t,16,t.bl_tree),S(t,a-3,2)):a<=10?(x(t,17,t.bl_tree),S(t,a-3,3)):(x(t,18,t.bl_tree),S(t,a-11,7));a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4)}};let z=!1;const U=(t,e,r,i)=>{S(t,0+(i?1:0),3),O(t),w(t,r),w(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};return N._tr_init=t=>{z||((()=>{let t,e,h,y,b;const w=new Array(16);for(h=0,y=0;y<28;y++)for(p[y]=h,t=0;t<1<<s[y];t++)f[h++]=y;for(f[h-1]=y,b=0,y=0;y<16;y++)for(d[y]=b,t=0;t<1<<o[y];t++)l[b++]=y;for(b>>=7;y<i;y++)for(d[y]=b<<7,t=0;t<1<<o[y]-7;t++)l[256+b++]=y;for(e=0;e<=n;e++)w[e]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,w[8]++;for(;t<=255;)c[2*t+1]=9,t++,w[9]++;for(;t<=279;)c[2*t+1]=7,t++,w[7]++;for(;t<=287;)c[2*t+1]=8,t++,w[8]++;for(E(c,287,w),t=0;t<i;t++)u[2*t+1]=5,u[2*t]=k(t,5);m=new g(c,s,257,r,n),v=new g(u,o,0,i,n),_=new g(new Array(0),a,0,19,7)})(),z=!0),t.l_desc=new y(t.dyn_ltree,m),t.d_desc=new y(t.dyn_dtree,v),t.bl_desc=new y(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,D(t)},N._tr_stored_block=U,N._tr_flush_block=(t,r,i,n)=>{let s,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let r,i=4093624447;for(r=0;r<=31;r++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*r])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(r=32;r<e;r++)if(0!==t.dyn_ltree[2*r])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),a=(t=>{let e;for(I(t,t.dyn_ltree,t.l_desc.max_code),I(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=s&&(s=o)):s=o=i+5,i+4<=s&&-1!==r?U(t,r,i,n):4===t.strategy||o===s?(S(t,2+(n?1:0),3),C(t,c,u)):(S(t,4+(n?1:0),3),((t,e,r,i)=>{let n;for(S(t,e-257,5),S(t,r-1,5),S(t,i-4,4),n=0;n<i;n++)S(t,t.bl_tree[2*h[n]+1],3);B(t,t.dyn_ltree,e-1),B(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),C(t,t.dyn_ltree,t.dyn_dtree)),D(t),n&&O(t)},N._tr_tally=(t,r,i)=>(t.pending_buf[t.sym_buf+t.sym_next++]=r,t.pending_buf[t.sym_buf+t.sym_next++]=r>>8,t.pending_buf[t.sym_buf+t.sym_next++]=i,0===r?t.dyn_ltree[2*i]++:(t.matches++,r--,t.dyn_ltree[2*(f[i]+e+1)]++,t.dyn_dtree[2*b(r)]++),t.sym_next===t.sym_end),N._tr_align=t=>{S(t,2,3),x(t,256,c),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},N}function j(){return P?A:(P=1,A={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function L(){return R?C:(R=1,C={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})}function M(){if(I)return z;I=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:r,_tr_tally:i,_tr_align:n}=U(),s=E?k:(E=1,k=(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}),o=function(){if(O)return D;O=1;const t=new Uint32Array((()=>{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})());return D=(e,r,i,n)=>{const s=t,o=n+i;e^=-1;for(let t=n;t<o;t++)e=e>>>8^s[255&(e^r[t])];return-1^e},D}(),a=j(),{Z_NO_FLUSH:h,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:f,Z_OK:p,Z_STREAM_END:d,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_BUF_ERROR:v,Z_DEFAULT_COMPRESSION:_,Z_FILTERED:y,Z_HUFFMAN_ONLY:b,Z_RLE:w,Z_FIXED:S,Z_DEFAULT_STRATEGY:x,Z_UNKNOWN:T,Z_DEFLATED:A}=L(),P=258,C=262,R=42,B=113,N=666,M=(t,e)=>(t.msg=a[e],e),V=t=>2*t-(t>4?9:0),q=t=>{let e=t.length;for(;--e>=0;)t[e]=0},H=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 F=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const K=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))},Z=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,K(t.strm)},J=(t,e)=>{t.pending_buf[t.pending++]=e},$=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},W=(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=s(t.adler,e,n,r):2===t.state.wrap&&(t.adler=o(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},G=(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-C?t.strstart-(t.w_size-C):0,c=t.window,u=t.w_mask,l=t.prev,f=t.strstart+P;let p=c[s+o-1],d=c[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(r=e,c[r+o]===d&&c[r+o-1]===p&&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=P-(f-s),s=f-P,i>o){if(t.match_start=e,o=i,i>=a)break;p=c[s+o-1],d=c[s+o]}}}while((e=l[e&u])>h&&0!==--n);return o<=t.lookahead?o:t.lookahead},X=t=>{const e=t.w_size;let r,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-C)&&(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),H(t),i+=e),0===t.strm.avail_in)break;if(r=W(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=F(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=F(t,t.ins_h,t.window[n+3-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<3)););}while(t.lookahead<C&&0!==t.strm.avail_in)},Y=(t,r)=>{let i,n,s,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,c=t.strm.avail_in;do{if(i=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,n=t.strstart-t.block_start,i>n+t.strm.avail_in&&(i=n+t.strm.avail_in),i>s&&(i=s),i<o&&(0===i&&r!==l||r===h||i!==n+t.strm.avail_in))break;a=r===l&&i===n+t.strm.avail_in?1:0,e(t,0,0,a),t.pending_buf[t.pending-4]=i,t.pending_buf[t.pending-3]=i>>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,K(t.strm),n&&(n>i&&(n=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,i-=n),i&&(W(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(0===a);return c-=t.strm.avail_in,c&&(c>=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<=c&&(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-c,t.strm.next_in),t.strstart),t.strstart+=c,t.insert+=c>t.w_size-t.insert?t.w_size-t.insert:c),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a?4:r!==h&&r!==l&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(s=t.window_size-t.strstart,t.strm.avail_in>s&&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++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&(W(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,o=s>t.w_size?t.w_size:s,n=t.strstart-t.block_start,(n>=o||(n||r===l)&&r!==h&&0===t.strm.avail_in&&n<=s)&&(i=n>s?s:n,a=r===l&&0===t.strm.avail_in&&i===n?1:0,e(t,t.block_start,i,a),t.block_start+=i,K(t.strm)),a?3:1)},Q=(t,e)=>{let r,n;for(;;){if(t.lookahead<C){if(X(t),t.lookahead<C&&e===h)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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-C&&(t.match_length=G(t,r)),t.match_length>=3)if(n=i(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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=F(t,t.ins_h,t.window[t.strstart+1]);else n=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2},tt=(t,e)=>{let r,n,s;for(;;){if(t.lookahead<C){if(X(t),t.lookahead<C&&e===h)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-C&&(t.match_length=G(t,r),t.match_length<=5&&(t.strategy===y||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-3,n=i(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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=2,t.strstart++,n&&(Z(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=i(t,0,t.window[t.strstart-1]),n&&Z(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2};function et(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 rt=[new et(0,0,0,0,Y),new et(4,4,8,4,Q),new et(4,5,16,8,Q),new et(4,6,32,32,Q),new et(4,4,16,16,tt),new et(8,16,32,32,tt),new et(8,16,128,128,tt),new et(8,32,128,256,tt),new et(32,128,258,1024,tt),new et(32,258,258,4096,tt)];function it(){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=A,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),q(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 nt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==R&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==B&&e.status!==N?1:0},st=e=>{if(nt(e))return M(e,g);e.total_in=e.total_out=0,e.data_type=T;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=2===r.wrap?57:r.wrap?R:B,e.adler=2===r.wrap?0:1,r.last_flush=-2,t(r),p},ot=t=>{const e=st(t);var r;return e===p&&((r=t.state).window_size=2*r.w_size,q(r.head),r.max_lazy_match=rt[r.level].max_lazy,r.good_match=rt[r.level].good_length,r.nice_match=rt[r.level].nice_length,r.max_chain_length=rt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},at=(t,e,r,i,n,s)=>{if(!t)return g;let o=1;if(e===_&&(e=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>9||r!==A||i<8||i>15||e<0||e>9||s<0||s>S||8===i&&1!==o)return M(t,g);8===i&&(i=9);const a=new it;return t.state=a,a.strm=t,a.status=R,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+3-1)/3),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,ot(t)};return z.deflateInit=(t,e)=>at(t,e,A,15,8,x),z.deflateInit2=at,z.deflateReset=ot,z.deflateResetKeep=st,z.deflateSetHeader=(t,e)=>nt(t)||2!==t.state.wrap?g:(t.state.gzhead=e,p),z.deflate=(t,r)=>{if(nt(t)||r>f||r<0)return t?M(t,g):g;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===N&&r!==l)return M(t,0===t.avail_out?v:g);const a=s.last_flush;if(s.last_flush=r,0!==s.pending){if(K(t),0===t.avail_out)return s.last_flush=-1,p}else if(0===t.avail_in&&V(r)<=V(a)&&r!==l)return M(t,v);if(s.status===N&&0!==t.avail_in)return M(t,v);if(s.status===R&&0===s.wrap&&(s.status=B),s.status===R){let e=A+(s.w_bits-8<<4)<<8,r=-1;if(r=s.strategy>=b||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=r<<6,0!==s.strstart&&(e|=32),e+=31-e%31,$(s,e),0!==s.strstart&&($(s,t.adler>>>16),$(s,65535&t.adler)),t.adler=1,s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p}if(57===s.status)if(t.adler=0,J(s,31),J(s,139),J(s,8),s.gzhead)J(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),J(s,255&s.gzhead.time),J(s,s.gzhead.time>>8&255),J(s,s.gzhead.time>>16&255),J(s,s.gzhead.time>>24&255),J(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),J(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(J(s,255&s.gzhead.extra.length),J(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=o(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(J(s,0),J(s,0),J(s,0),J(s,0),J(s,0),J(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),J(s,3),s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p;if(69===s.status){if(s.gzhead.extra){let e=s.pending,r=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+r>s.pending_buf_size;){let i=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=o(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=i,K(t),0!==s.pending)return s.last_flush=-1,p;e=0,r-=i}let i=new Uint8Array(s.gzhead.extra);s.pending_buf.set(i.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending+=r,s.gzhead.hcrc&&s.pending>e&&(t.adler=o(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),K(t),0!==s.pending)return s.last_flush=-1,p;r=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,J(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),K(t),0!==s.pending)return s.last_flush=-1,p;r=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,J(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(K(t),0!==s.pending))return s.last_flush=-1,p;J(s,255&t.adler),J(s,t.adler>>8&255),t.adler=0}if(s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p}if(0!==t.avail_in||0!==s.lookahead||r!==h&&s.status!==N){let o=0===s.level?Y(s,r):s.strategy===b?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(X(t),0===t.lookahead)){if(e===h)return 1;break}if(t.match_length=0,r=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2})(s,r):s.strategy===w?((t,e)=>{let r,n,s,o;const a=t.window;for(;;){if(t.lookahead<=P){if(X(t),t.lookahead<=P&&e===h)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,n=a[s],n===a[++s]&&n===a[++s]&&n===a[++s])){o=t.strstart+P;do{}while(n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&s<o);t.match_length=P-(o-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=i(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2})(s,r):rt[s.level].func(s,r);if(3!==o&&4!==o||(s.status=N),1===o||3===o)return 0===t.avail_out&&(s.last_flush=-1),p;if(2===o&&(r===c?n(s):r!==f&&(e(s,0,0,!1),r===u&&(q(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),K(t),0===t.avail_out))return s.last_flush=-1,p}return r!==l?p:s.wrap<=0?d:(2===s.wrap?(J(s,255&t.adler),J(s,t.adler>>8&255),J(s,t.adler>>16&255),J(s,t.adler>>24&255),J(s,255&t.total_in),J(s,t.total_in>>8&255),J(s,t.total_in>>16&255),J(s,t.total_in>>24&255)):($(s,t.adler>>>16),$(s,65535&t.adler)),K(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?p:d)},z.deflateEnd=t=>{if(nt(t))return g;const e=t.state.status;return t.state=null,e===B?M(t,m):p},z.deflateSetDictionary=(t,e)=>{let r=e.length;if(nt(t))return g;const i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==R||i.lookahead)return g;if(1===n&&(t.adler=s(t.adler,e,r,0)),i.wrap=0,r>=i.w_size){0===n&&(q(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(r-i.w_size,r),0),e=t,r=i.w_size}const o=t.avail_in,a=t.next_in,h=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,X(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=F(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,X(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=a,t.input=h,t.avail_in=o,i.wrap=n,p},z.deflateInfo="pako deflate (from Nodeca project)",z}var V,q={};var H,F,K,Z,J={};function $(){if(H)return J;H=1;let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const e=new Uint8Array(256);for(let t=0;t<256;t++)e[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;e[254]=e[254]=1,J.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,i,n,s,o=t.length,a=0;for(n=0;n<o;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(a),s=0,n=0;s<a;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e};return J.buf2string=(r,i)=>{const n=i||r.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(r.subarray(0,i));let s,o;const a=new Array(2*n);for(o=0,s=0;s<n;){let t=r[s++];if(t<128){a[o++]=t;continue}let i=e[t];if(i>4)a[o++]=65533,s+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&s<n;)t=t<<6|63&r[s++],i--;i>1?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let i="";for(let t=0;t<r;t++)i+=String.fromCharCode(e[t]);return i})(a,o)},J.utf8border=(t,r)=>{(r=r||t.length)>t.length&&(r=t.length);let i=r-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?r:i+e[t[i]]>r?i:r},J}var W=function(){if(Z)return B;Z=1;const t=M(),e=function(){if(V)return q;V=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return q.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const r in i)t(i,r)&&(e[r]=i[r])}}return e},q.flattenChunks=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];r.set(n,i),i+=n.length}return r},q}(),r=$(),i=j(),n=K?F:(K=1,F=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}),s=Object.prototype.toString,{Z_NO_FLUSH:o,Z_SYNC_FLUSH:a,Z_FULL_FLUSH:h,Z_FINISH:c,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:f,Z_DEFAULT_STRATEGY:p,Z_DEFLATED:d}=L();function g(o){this.options=e.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:p},o||{});let a=this.options;a.raw&&a.windowBits>0?a.windowBits=-a.windowBits:a.gzip&&a.windowBits>0&&a.windowBits<16&&(a.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;let h=t.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(h!==u)throw new Error(i[h]);if(a.header&&t.deflateSetHeader(this.strm,a.header),a.dictionary){let e;if(e="string"==typeof a.dictionary?r.string2buf(a.dictionary):"[object ArrayBuffer]"===s.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,h=t.deflateSetDictionary(this.strm,e),h!==u)throw new Error(i[h]);this._dict_set=!0}}function m(t,e){const r=new g(e);if(r.push(t,!0),r.err)throw r.msg||i[r.err];return r.result}return g.prototype.push=function(e,i){const n=this.strm,f=this.options.chunkSize;let p,d;if(this.ended)return!1;for(d=i===~~i?i:!0===i?c:o,"string"==typeof e?n.input=r.string2buf(e):"[object ArrayBuffer]"===s.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(f),n.next_out=0,n.avail_out=f),(d===a||d===h)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(p=t.deflate(n,d),p===l)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),p=t.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===u;if(0!==n.avail_out){if(d>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===u&&(this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},B.Deflate=g,B.deflate=m,B.deflateRaw=function(t,e){return(e=e||{}).raw=!0,m(t,e)},B.gzip=function(t,e){return(e=e||{}).gzip=!0,m(t,e)},B.constants=L(),B}();function G(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function X(t,e){return t&e}function Y(t,e){return t|e}function Q(t,e){return t^e}function tt(t,e){return t&~e}function et(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function rt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var it,nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function st(t){var e,r,i="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),i+=nt.charAt(r>>6)+nt.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),i+=nt.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),i+=nt.charAt(r>>2)+nt.charAt((3&r)<<4));(3&i.length)>0;)i+="=";return i}function ot(t){var e,r="",i=0,n=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var s=nt.indexOf(t.charAt(e));s<0||(0==i?(r+=G(s>>2),n=3&s,i=1):1==i?(r+=G(n<<2|s>>4),n=15&s,i=2):2==i?(r+=G(n),r+=G(s>>2),n=3&s,i=3):(r+=G(n<<2|s>>4),r+=G(15&s),i=0))}return 1==i&&(r+=G(n<<2)),r}var at,ht=function(t){var e;if(void 0===it){var r="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(it={},e=0;e<16;++e)it[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)it[r.charAt(e)]=e;for(e=0;e<8;++e)it[i.charAt(e)]=-1}var n=[],s=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=it[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);s|=a,++o>=2?(n[n.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n},ct={decode:function(t){var e;if(void 0===at){var r="= \f\n\r\t \u2028\u2029";for(at=Object.create(null),e=0;e<64;++e)at["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(at["-"]=62,at._=63,e=0;e<9;++e)at[r.charAt(e)]=-1}var i=[],n=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=at[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);n|=o,++s>=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=ct.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return ct.decode(t)}},ut=1e13,lt=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var r,i,n=this.buf,s=n.length;for(r=0;r<s;++r)(i=n[r]*t+e)<ut?e=0:i-=(e=0|i/ut)*ut,n[r]=i;e>0&&(n[r]=e)},t.prototype.sub=function(t){var e,r,i=this.buf,n=i.length;for(e=0;e<n;++e)(r=i[e]-t)<0?(r+=ut,t=1):t=0,i[e]=r;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,r=e[e.length-1].toString(),i=e.length-2;i>=0;--i)r+=(ut+e[i]).toString().substring(1);return r},t.prototype.valueOf=function(){for(var t=this.buf,e=0,r=t.length-1;r>=0;--r)e=e*ut+t[r];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),ft=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,pt=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function dt(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var gt,mt=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,r){for(var i="",n=t;n<e;++n)if(i+=this.hexByte(this.get(n)),!0!==r)switch(15&n){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},t.prototype.isASCII=function(t,e){for(var r=t;r<e;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var r="",i=t;i<e;++i)r+=String.fromCharCode(this.get(i));return r},t.prototype.parseStringUTF=function(t,e){for(var r="",i=t;i<e;){var n=this.get(i++);r+=n<128?String.fromCharCode(n):n>191&&n<224?String.fromCharCode((31&n)<<6|63&this.get(i++)):String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return r},t.prototype.parseStringBMP=function(t,e){for(var r,i,n="",s=t;s<e;)r=this.get(s++),i=this.get(s++),n+=String.fromCharCode(r<<8|i);return n},t.prototype.parseTime=function(t,e,r){var i=this.parseStringISO(t,e),n=(r?ft:pt).exec(i);return n?(r&&(n[1]=+n[1],n[1]+=+n[1]<70?2e3:1900),i=n[1]+"-"+n[2]+"-"+n[3]+" "+n[4],n[5]&&(i+=":"+n[5],n[6]&&(i+=":"+n[6],n[7]&&(i+="."+n[7]))),n[8]&&(i+=" UTC","Z"!=n[8]&&(i+=n[8],n[9]&&(i+=":"+n[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(t,e){for(var r,i=this.get(t),n=i>127,s=n?255:0,o="";i==s&&++t<e;)i=this.get(t);if(0===(r=e-t))return n?-1:0;if(r>4){for(o=i,r<<=3;!(128&(+o^s));)o=+o<<1,--r;o="("+r+" bit)\n"}n&&(i-=256);for(var a=new lt(i),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return o+a.toString()},t.prototype.parseBitString=function(t,e,r){for(var i=this.get(t),n="("+((e-t-1<<3)-i)+" bit)\n",s="",o=t+1;o<e;++o){for(var a=this.get(o),h=o==e-1?i:0,c=7;c>=h;--c)s+=a>>c&1?"1":"0";if(s.length>r)return n+dt(s,r)}return n+s},t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return dt(this.parseStringISO(t,e),r);var i=e-t,n="("+i+" byte)\n";i>(r/=2)&&(e=t+r);for(var s=t;s<e;++s)n+=this.hexByte(this.get(s));return i>r&&(n+="…"),n},t.prototype.parseOID=function(t,e,r){for(var i="",n=new lt,s=0,o=t;o<e;++o){var a=this.get(o);if(n.mulAdd(128,127&a),s+=7,!(128&a)){if(""===i)if((n=n.simplify())instanceof lt)n.sub(80),i="2."+n.toString();else{var h=n<80?n<40?0:1:2;i=h+"."+(n-40*h)}else i+="."+n.toString();if(i.length>r)return dt(i,r);n=new lt,s=0}}return s>0&&(i+=".incomplete"),i},t}(),vt=function(){function t(t,e,r,i,n){if(!(i instanceof _t))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=r,this.tag=i,this.sub=n}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return dt(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return dt(this.stream.parseStringISO(e,e+r),t);case 30:return dt(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r<i;++r)e+=this.sub[r].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),r=127&e;if(r==e)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i<r;++i)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,r=2*this.length;return t.substring(e,e+r)},t.decode=function(e){var r;r=e instanceof mt?e:new mt(e,0);var i=new mt(r),n=new _t(r),s=t.decodeLength(r),o=r.pos,a=o-i.pos,h=null,c=function(){var e=[];if(null!==s){for(var i=o+s;r.pos<i;)e[e.length]=t.decode(r);if(r.pos!=i)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=t.decode(r);if(n.tag.isEOC())break;e[e.length]=n}s=o-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(n.tagConstructed)h=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=c();for(var u=0;u<h.length;++u)if(h[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);r.pos=o+Math.abs(s)}return new t(i,a,s,n,h)},t}(),_t=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var r=new lt;do{e=t.get(),r.mulAdd(128,127&e)}while(128&e);this.tagNumber=r.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),yt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],bt=(1<<26)/yt[yt.length-1],wt=function(){function t(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,s="",o=this.t,a=this.DB-o*this.DB%e;if(o-- >0)for(a<this.DB&&(r=this[o]>>a)>0&&(n=!0,s=G(r));o>=0;)a<e?(r=(this[o]&(1<<a)-1)<<e-a,r|=this[--o]>>(a+=this.DB-e)):(r=this[o]>>(a-=e)&i,a<=0&&(a+=this.DB,--o)),r>0&&(n=!0),n&&(s+=G(r));return n?s:"0"},t.prototype.negate=function(){var e=Et();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Bt(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=Et();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new xt(e):new Tt(e),this.exp(t,r)},t.prototype.clone=function(){var t=Et();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this[t]&(1<<i)-1)<<8-i,r|=this[--t]>>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&r&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=Et();return this.bitwiseTo(t,X,e),e},t.prototype.or=function(t){var e=Et();return this.bitwiseTo(t,Y,e),e},t.prototype.xor=function(t){var e=Et();return this.bitwiseTo(t,Q,e),e},t.prototype.andNot=function(t){var e=Et();return this.bitwiseTo(t,tt,e),e},t.prototype.not=function(){for(var t=Et(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=Et();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=Et();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+et(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=rt(this[r]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,Y)},t.prototype.clearBit=function(t){return this.changeBit(t,tt)},t.prototype.flipBit=function(t){return this.changeBit(t,Q)},t.prototype.add=function(t){var e=Et();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=Et();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=Et();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=Et();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=Et();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=Et(),r=Et();return this.divRemTo(t,e,r),[e,r]},t.prototype.modPow=function(t,e){var r,i,n=t.bitLength(),s=It(1);if(n<=0)return s;r=n<18?1:n<48?3:n<144?4:n<768?5:6,i=n<8?new xt(e):e.isEven()?new kt(e):new Tt(e);var o=[],a=3,h=r-1,c=(1<<r)-1;if(o[1]=i.convert(this),r>1){var u=Et();for(i.sqrTo(o[1],u);a<=c;)o[a]=Et(),i.mulTo(u,o[a-2],o[a]),a+=2}var l,f,p=t.t-1,d=!0,g=Et();for(n=Bt(t[p])-1;p>=0;){for(n>=h?l=t[p]>>n-h&c:(l=(t[p]&(1<<n+1)-1)<<h-n,p>0&&(l|=t[p-1]>>this.DB+n-h)),a=r;!(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--p),d)o[l].copyTo(s),d=!1;else{for(;a>1;)i.sqrTo(s,g),i.sqrTo(g,s),a-=2;a>0?i.sqrTo(s,g):(f=s,s=g,g=f),i.mulTo(g,o[l],s)}for(;p>=0&&!(t[p]&1<<n);)i.sqrTo(s,g),f=s,s=g,g=f,--n<0&&(n=this.DB-1,--p)}return i.revert(s)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||0==e.signum())return t.ZERO;for(var i=e.clone(),n=this.clone(),s=It(1),o=It(0),a=It(0),h=It(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),r?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(e,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);i.compareTo(n)>=0?(i.subTo(n,i),r&&s.subTo(a,s),o.subTo(h,o)):(n.subTo(i,n),r&&a.subTo(s,a),h.subTo(o,h))}return 0!=n.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new St)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return e;for(n<s&&(s=n),s>0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},t.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=yt[yt.length-1]){for(e=0;e<yt.length;++e)if(r[0]==yt[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<yt.length;){for(var i=yt[e],n=e+1;n<yt.length&&i<bt;)i*=yt[n++];for(i=r.modInt(i);e<n;)if(i%yt[e++]==0)return!1}return r.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else{if(4!=r)return void this.fromRadix(e,r);i=2}this.t=0,this.s=0;for(var n=e.length,s=!1,o=0;--n>=0;){var a=8==i?255&+e[n]:Rt(e,n);a<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==o?this[this.t++]=a:o+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=i)>=this.DB&&(o-=this.DB))}8==i&&128&+e[0]&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,i=this.DB-r,n=(1<<i)-1,s=Math.floor(t/this.DB),o=this.s<<r&this.DM,a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>i|o,o=(this[a]&n)<<r;for(a=s-1;a>=0;--a)e[a]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,s=(1<<i)-1;e[0]=this[r]>>i;for(var o=r+1;o<this.t;++o)e[o-r-1]|=(this[o]&s)<<n,e[o-r]=this[o]>>i;i>0&&(e[this.t-r-1]|=(this.s&s)<<n),e.t=this.t-r,e.clamp()}},t.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]-t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t[r],e[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},t.prototype.multiplyTo=function(e,r){var i=this.abs(),n=e.abs(),s=i.t;for(r.t=s+n.t;--s>=0;)r[s]=0;for(s=0;s<n.t;++s)r[s+i.t]=i.am(0,n[s],r,s,0,i.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t)return null!=r&&r.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Et());var o=Et(),a=this.s,h=e.s,c=this.DB-Bt(n[n.t-1]);c>0?(n.lShiftTo(c,o),s.lShiftTo(c,i)):(n.copyTo(o),s.copyTo(i));var u=o.t,l=o[u-1];if(0!=l){var f=l*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,g=1<<this.F2,m=i.t,v=m-u,_=null==r?Et():r;for(o.dlShiftTo(v,_),i.compareTo(_)>=0&&(i[i.t++]=1,i.subTo(_,i)),t.ONE.dlShiftTo(u,_),_.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--v>=0;){var y=i[--m]==l?this.DM:Math.floor(i[m]*p+(i[m-1]+g)*d);if((i[m]+=o.am(0,y,i,v,0,u))<y)for(o.dlShiftTo(v,_),i.subTo(_,i);i[m]<--y;)i.subTo(_,i)}null!=r&&(i.drShiftTo(u,r),a!=h&&t.ZERO.subTo(r,r)),i.t=u,i.clamp(),c>0&&i.rShiftTo(c,i),a<0&&t.ZERO.subTo(i,i)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=Et(),n=Et(),s=r.convert(this),o=Bt(e)-1;for(s.copyTo(i);--o>=0;)if(r.sqrTo(i,n),(e&1<<o)>0)r.mulTo(n,s,i);else{var a=i;i=n,n=a}return r.revert(i)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=It(r),n=Et(),s=Et(),o="";for(this.divRemTo(i,n,s);n.signum()>0;)o=(r+s.intValue()).toString(t).substring(1)+o,n.divRemTo(i,n,s);return s.intValue().toString(t)+o},t.prototype.fromRadix=function(e,r){this.fromInt(0),null==r&&(r=10);for(var i=this.chunkSize(r),n=Math.pow(r,i),s=!1,o=0,a=0,h=0;h<e.length;++h){var c=Rt(e,h);c<0?"-"==e.charAt(h)&&0==this.signum()&&(s=!0):(a=r*a+c,++o>=i&&(this.dMultiply(n),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(r,o)),this.dAddOffset(a,0)),s&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var n=[],s=7&e;n.length=1+(e>>3),r.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}},t.prototype.bitwiseTo=function(t,e,r){var i,n,s=Math.min(t.t,this.t);for(i=0;i<s;++i)r[i]=e(this[i],t[i]);if(t.t<this.t){for(n=t.s&this.DM,i=s;i<this.t;++i)r[i]=e(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=s;i<t.t;++i)r[i]=e(n,t[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},t.prototype.changeBit=function(e,r){var i=t.ONE.shiftLeft(e);return this.bitwiseTo(i,r,i),i},t.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]+t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t[r],e[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},t.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r[this.t+i-e]=this.am(e-i,t[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),i=r.getLowestSetBit();if(i<=0)return!1;var n=r.shiftRight(i);(e=e+1>>1)>yt.length&&(e=yt.length);for(var s=Et(),o=0;o<e;++o){s.fromInt(yt[Math.floor(Math.random()*yt.length)]);var a=s.modPow(n,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(r)){for(var h=1;h++<i&&0!=a.compareTo(r);)if(0==(a=a.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=a.compareTo(r))return!1}}return!0},t.prototype.square=function(){var t=Et();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var r=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(r.compareTo(i)<0){var n=r;r=i,i=n}var s=r.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)e(r);else{s<o&&(o=s),o>0&&(r.rShiftTo(o,r),i.rShiftTo(o,i));var a=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(a,0):(o>0&&i.lShiftTo(o,i),setTimeout(function(){e(i)},0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Y,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>e&&s.subTo(t.ONE.shiftLeft(e-1),s),s.isProbablePrime(r)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],h=7&e;a.length=1+(e>>3),r.nextBytes(a),h>0?a[0]&=(1<<h)-1:a[0]=0,this.fromString(a,256)}},t}(),St=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),xt=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),Tt=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=Et();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(wt.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=Et();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],i=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),kt=function(){function t(t){this.m=t,this.r2=Et(),this.q3=Et(),wt.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Et();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function Et(){return new wt(null)}function Dt(t,e){return new wt(t,e)}var Ot="undefined"!=typeof navigator;Ot&&"Microsoft Internet Explorer"==navigator.appName?(wt.prototype.am=function(t,e,r,i,n,s){for(var o=32767&e,a=e>>15;--s>=0;){var h=32767&this[t],c=this[t++]>>15,u=a*h+c*o;n=((h=o*h+((32767&u)<<15)+r[i]+(1073741823&n))>>>30)+(u>>>15)+a*c+(n>>>30),r[i++]=1073741823&h}return n},gt=30):Ot&&"Netscape"!=navigator.appName?(wt.prototype.am=function(t,e,r,i,n,s){for(;--s>=0;){var o=e*this[t++]+r[i]+n;n=Math.floor(o/67108864),r[i++]=67108863&o}return n},gt=26):(wt.prototype.am=function(t,e,r,i,n,s){for(var o=16383&e,a=e>>14;--s>=0;){var h=16383&this[t],c=this[t++]>>14,u=a*h+c*o;n=((h=o*h+((16383&u)<<14)+r[i]+n)>>28)+(u>>14)+a*c,r[i++]=268435455&h}return n},gt=28),wt.prototype.DB=gt,wt.prototype.DM=(1<<gt)-1,wt.prototype.DV=1<<gt;wt.prototype.FV=Math.pow(2,52),wt.prototype.F1=52-gt,wt.prototype.F2=2*gt-52;var At,Pt,Ct=[];for(At="0".charCodeAt(0),Pt=0;Pt<=9;++Pt)Ct[At++]=Pt;for(At="a".charCodeAt(0),Pt=10;Pt<36;++Pt)Ct[At++]=Pt;for(At="A".charCodeAt(0),Pt=10;Pt<36;++Pt)Ct[At++]=Pt;function Rt(t,e){var r=Ct[t.charCodeAt(e)];return null==r?-1:r}function It(t){var e=Et();return e.fromInt(t),e}function Bt(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}wt.ZERO=It(0),wt.ONE=It(1);var zt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,r,i;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[r],this.S[r]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var Nt,Ut,jt=null;if(null==jt){jt=[],Ut=0;var Lt=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var Mt=new Uint32Array(256);for(self.crypto.getRandomValues(Mt),Lt=0;Lt<Mt.length;++Lt)jt[Ut++]=255&Mt[Lt]}var Vt=0,qt=function(t){if((Vt=Vt||0)>=256||Ut>=256)self.removeEventListener?self.removeEventListener("mousemove",qt,!1):self.detachEvent&&self.detachEvent("onmousemove",qt);else try{var e=t.x+t.y;jt[Ut++]=255&e,Vt+=1}catch(t){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",qt,!1):self.attachEvent&&self.attachEvent("onmousemove",qt))}function Ht(){if(null==Nt){for(Nt=new zt;Ut<256;){var t=Math.floor(65536*Math.random());jt[Ut++]=255&t}for(Nt.init(jt),Ut=0;Ut<jt.length;++Ut)jt[Ut]=0;Ut=0}return Nt.next()}var Ft=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Ht()},t}();function Kt(t){return function(t){for(var e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t,e){var r,i,n,s,o,a,h,c,u,l,f,p,d=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),g=new Array(64);for(t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e,u=0;u<t.length;u+=16){for(r=d[0],i=d[1],n=d[2],s=d[3],o=d[4],a=d[5],h=d[6],c=d[7],l=0;l<64;l++)g[l]=l<16?t[l+u]:re(re(re(te(g[l-2]),g[l-7]),Qt(g[l-15])),g[l-16]),f=re(re(re(re(c,Yt(o)),Wt(o,a,h)),ee[l]),g[l]),p=re(Xt(r),Gt(r,i,n)),c=h,h=a,a=o,o=re(s,f),s=n,n=i,i=r,r=re(f,p);d[0]=re(r,d[0]),d[1]=re(i,d[1]),d[2]=re(n,d[2]),d[3]=re(s,d[3]),d[4]=re(o,d[4]),d[5]=re(a,d[5]),d[6]=re(h,d[6]),d[7]=re(c,d[7])}return d}(function(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<24-r%32;return e}(t),8*t.length))}function Zt(t){for(var e="0123456789abcdef",r="",i=0;i<t.length;i++){var n=t.charCodeAt(i);r+=e.charAt(n>>>4&15)+e.charAt(15&n)}return r}function Jt(t,e){return t>>>e|t<<32-e}function $t(t,e){return t>>>e}function Wt(t,e,r){return t&e^~t&r}function Gt(t,e,r){return t&e^t&r^e&r}function Xt(t){return Jt(t,2)^Jt(t,13)^Jt(t,22)}function Yt(t){return Jt(t,6)^Jt(t,11)^Jt(t,25)}function Qt(t){return Jt(t,7)^Jt(t,18)^$t(t,3)}function te(t){return Jt(t,17)^Jt(t,19)^$t(t,10)}var ee=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function re(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function ie(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],i=t.length-1;i>=0&&e>0;){var n=t.charCodeAt(i--);n<128?r[--e]=n:n>127&&n<2048?(r[--e]=63&n|128,r[--e]=n>>6|192):(r[--e]=63&n|128,r[--e]=n>>6&63|128,r[--e]=n>>12|224)}r[--e]=0;for(var s=new Ft,o=[];e>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);r[--e]=o[0]}return r[--e]=2,r[--e]=0,new wt(r)}function ne(t,e,r){for(var i="",n=0;i.length<e;)i+=r(String.fromCharCode.apply(String,t.concat([(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))),n+=1;return i}function se(t,e){var r=Kt;if(t.length+64+2>e)throw"Message too long for RSA";var i,n="";for(i=0;i<e-t.length-64-2;i+=1)n+="\0";var s=r("")+n+""+t,o=new Array(32);(new Ft).nextBytes(o);var a=ne(o,s.length,r),h=[];for(i=0;i<s.length;i+=1)h[i]=s.charCodeAt(i)^a.charCodeAt(i);var c=ne(h,o.length,r),u=[0];for(i=0;i<o.length;i+=1)u[i+1]=o[i]^c.charCodeAt(i);return new wt(u.concat(h))}var oe=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t,e){void 0===e&&(e=ie);var r=this.n.bitLength()+7>>3,i=e(t,r);if(null==i)return null;var n=this.doPublic(i);if(null==n)return null;for(var s=n.toString(16),o=s.length,a=0;a<2*r-o;a++)s="0"+s;return s},t.prototype.setPrivate=function(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16),this.d=Dt(r,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,r,i,n,s,o,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16),this.d=Dt(r,16),this.p=Dt(i,16),this.q=Dt(n,16),this.dmp1=Dt(s,16),this.dmq1=Dt(o,16),this.coeff=Dt(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var r=new Ft,i=t>>1;this.e=parseInt(e,16);for(var n=new wt(e,16);;){for(;this.p=new wt(t-i,1,r),0!=this.p.subtract(wt.ONE).gcd(n).compareTo(wt.ONE)||!this.p.isProbablePrime(10););for(;this.q=new wt(i,1,r),0!=this.q.subtract(wt.ONE).gcd(n).compareTo(wt.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(wt.ONE),a=this.q.subtract(wt.ONE),h=o.multiply(a);if(0==h.gcd(n).compareTo(wt.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=Dt(t,16),r=this.doPrivate(e);return null==r?null:function(t,e){var r=t.toByteArray(),i=0;for(;i<r.length&&0==r[i];)++i;if(r.length-i!=e-1||2!=r[i])return null;++i;for(;0!=r[i];)if(++i>=r.length)return null;var n="";for(;++i<r.length;){var s=255&r[i];s<128?n+=String.fromCharCode(s):s>191&&s<224?(n+=String.fromCharCode((31&s)<<6|63&r[i+1]),++i):(n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]),i+=2)}return n}(r,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var i=new Ft,n=t>>1;this.e=parseInt(e,16);var s=new wt(e,16),o=this,a=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(wt.ONE),i=o.q.subtract(wt.ONE),n=e.multiply(i);0==n.gcd(s).compareTo(wt.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(n),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(i),o.coeff=o.q.modInverse(o.p),setTimeout(function(){r()},0)):setTimeout(a,0)},h=function(){o.q=Et(),o.q.fromNumberAsync(n,1,i,function(){o.q.subtract(wt.ONE).gcda(s,function(t){0==t.compareTo(wt.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)})})},c=function(){o.p=Et(),o.p.fromNumberAsync(t-n,1,i,function(){o.p.subtract(wt.ONE).gcda(s,function(t){0==t.compareTo(wt.ONE)&&o.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,r){var i=(ae[r]||"")+e(t).toString(),n=this.n.bitLength()/4,s=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,i="",n=0;n<r;n+=2)i+="ff";return Dt("0001"+i+"00"+t,16)}(i,n);if(null==s)return null;var o=this.doPrivate(s);if(null==o)return null;for(var a=o.toString(16),h=a.length,c=0;c<n-h;c++)a="0"+a;return a},t.prototype.verify=function(t,e,r){var i=Dt(e,16),n=this.doPublic(i);return null==n?null:function(t){for(var e in ae)if(ae.hasOwnProperty(e)){var r=ae[e],i=r.length;if(t.substring(0,i)==r)return t.substring(i)}return t}(n.toString(16).replace(/^1f+00/,""))==r(t).toString()},t}();var ae={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function he(t,e,r){if(!e||!t)throw new Error("extend failed, please check that all dependencies are included.");var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e)}
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).funsdata=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function r(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var h,c="1.0.4",u=Array.prototype,l=Object.prototype,f=u.slice,p=l.toString,d=l.hasOwnProperty,g=u.forEach,m={},v=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],_={};_.each=function(t,e,r){if(null!==t)if(g&&t.forEach===g)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)===m)return}else for(var s in t)if(d.call(t,s)&&e.call(r,t[s],s,t)===m)return},_.extend=function(t){return _.each(f.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]"===p.call(t)&&null!==t},isEmptyObject:function(t){if(_.check.isObject(t)){for(var e in t)if(d.call(t,e))return!1;return!0}return!1},isArray:function(t){return"[object Array]"===p.call(t)},isString:function(t){return"[object String]"===p.call(t)},isDate:function(t){return"[object Date]"===p.call(t)},isNumber:function(t){return"[object Number]"===p.call(t)},isBoolean:function(t){return"[object Boolean]"===p.call(t)},isJSONString:function(t){try{JSON.parse(t)}catch(t){return!1}return!0}},_.UUID=(h=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=h()+"-"+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+"-"+h();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,200))?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){y.w("getting browser info failed due to ",t)}return t},properties:function(){var t=_.info.browser();return _.extend({"#os":_.info.os(),"#lib_version":c,"#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,"#domain":location.hostname.toLowerCase()})}},_.getUtm=function(){var t={};return _.each(v,(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?(y.w("encryption failed"),t):{pkv:i,ekey:c,payload:a}}catch(t){y.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"!==a(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||y.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 y.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},_.normalizeTopLevelKeys=function(t){if("object"!==a(t)||null===t||Array.isArray(t))return{};var e={};for(var r in t){if(Object.hasOwnProperty.call(t,r))e[r.replace(/^#+/,"").toLowerCase()]=t[r]}return e},_.info.osVersion=function(){var t,e=navigator.userAgent,r=_.info.os();if("Windows"===r)t=e.match(/Windows NT ([\d.]+)/);else if("iOS"===r){if(t=e.match(/OS ([\d_]+)/))return t[1].replace(/_/g,".")}else if("Android"===r)t=e.match(/Android ([\d.]+)/);else if("Mac OS X"===r&&(t=e.match(/Mac OS X ([\d_.]+)/)))return t[1].replace(/_/g,".");return t?t[1]:""},_.info.networkType=function(){var t=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return t&&(t.effectiveType||t.type)||""},_.info.deviceType=function(){var t=navigator.userAgent;return/iPad/i.test(t)?"tablet":/Mobile|iPhone|iPod|Android.*Mobile|Windows Phone/i.test(t)?"mobile":/Android/i.test(t)?"tablet":"desktop"};var y=function(){return r((function e(){t(this,e)}),null,[{key:"i",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":a(console))&&console.log)try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}},{key:"w",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":a(console))&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}])}(),b=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/,w=function(){return r((function e(){t(this,e)}),null,[{key:"stripProperties",value:function(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)||y.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}},{key:"_checkPropertiesKey",value:function(t){var e=!0;return _.each(t,(function(t,r){b.test(r)||(y.w("invalid key: "+r),e=!1)})),e}},{key:"event",value:function(t){return!(!_.check.isString(t)||!b.test(t))||(y.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)}},{key:"propertyName",value:function(t){return!(!_.check.isString(t)||!b.test(t))||(y.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)}},{key:"properties",value:function(t){return this.stripProperties(t),!t||!!_.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(y.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))}},{key:"propertiesMust",value:function(t){return this.stripProperties(t),void 0===t||!_.check.isObject(t)||_.check.isEmptyObject(t)?(y.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(y.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)}},{key:"userId",value:function(t){return!(!_.check.isString(t)||!/^.{1,63}$/.test(t))||(y.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}])}(),S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T,k,E,D,O,A,P,I,R,C,B={},z={},N={};function U(){if(T)return N;T=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,r=286,i=30,n=15,s=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]),o=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]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new Array(576);t(c);const u=new Array(60);t(u);const l=new Array(512);t(l);const f=new Array(256);t(f);const p=new Array(29);t(p);const d=new Array(i);function g(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 m,v,_;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const b=t=>t<256?l[t]:l[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},S=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},x=(t,e,r)=>{S(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},E=(t,e,r)=>{const i=new Array(16);let s,o,a=0;for(s=1;s<=n;s++)a=a+r[s-1]<<1,i[s]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(i[e]++,e))}},D=t=>{let e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},O=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=(t,e,r,i)=>{const n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]},P=(t,e,r)=>{const i=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&A(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!A(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i},I=(t,r,i)=>{let n,a,h,c,u=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+u++],n+=(255&t.pending_buf[t.sym_buf+u++])<<8,a=t.pending_buf[t.sym_buf+u++],0===n?x(t,a,r):(h=f[a],x(t,h+e+1,r),c=s[h],0!==c&&(a-=p[h],S(t,a,c)),n--,h=b(n),x(t,h,i),c=o[h],0!==c&&(n-=d[h],S(t,n,c)))}while(u<t.sym_next);x(t,256,r)},R=(t,e)=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,h,c,u=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<o;a++)0!==r[2*a]?(t.heap[++t.heap_len]=u=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)c=t.heap[++t.heap_len]=u<2?++u:0,r[2*c]=1,t.depth[c]=0,t.opt_len--,s&&(t.static_len-=i[2*c+1]);for(e.max_code=u,a=t.heap_len>>1;a>=1;a--)P(t,r,a);c=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,r,1),h=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=h,r[2*c]=r[2*a]+r[2*h],t.depth[c]=(t.depth[a]>=t.depth[h]?t.depth[a]:t.depth[h])+1,r[2*a+1]=r[2*h+1]=c,t.heap[1]=c++,P(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,i=e.max_code,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,h=e.stat_desc.extra_base,c=e.stat_desc.max_length;let u,l,f,p,d,g,m=0;for(p=0;p<=n;p++)t.bl_count[p]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],p=r[2*r[2*l+1]+1]+1,p>c&&(p=c,m++),r[2*l+1]=p,l>i||(t.bl_count[p]++,d=0,l>=h&&(d=a[l-h]),g=r[2*l],t.opt_len+=g*(p+d),o&&(t.static_len+=g*(s[2*l+1]+d)));if(0!==m){do{for(p=c-1;0===t.bl_count[p];)p--;t.bl_count[p]--,t.bl_count[p+1]+=2,t.bl_count[c]--,m-=2}while(m>0);for(p=c;0!==p;p--)for(l=t.bl_count[p];0!==l;)f=t.heap[--u],f>i||(r[2*f+1]!==p&&(t.opt_len+=(p-r[2*f+1])*r[2*f],r[2*f+1]=p),l--)}})(t,e),E(r,u,t.bl_count)},C=(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[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4))},B=(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{x(t,n,t.bl_tree)}while(0!=--a);else 0!==n?(n!==s&&(x(t,n,t.bl_tree),a--),x(t,16,t.bl_tree),S(t,a-3,2)):a<=10?(x(t,17,t.bl_tree),S(t,a-3,3)):(x(t,18,t.bl_tree),S(t,a-11,7));a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4)}};let z=!1;const U=(t,e,r,i)=>{S(t,0+(i?1:0),3),O(t),w(t,r),w(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};return N._tr_init=t=>{z||((()=>{let t,e,h,y,b;const w=new Array(16);for(h=0,y=0;y<28;y++)for(p[y]=h,t=0;t<1<<s[y];t++)f[h++]=y;for(f[h-1]=y,b=0,y=0;y<16;y++)for(d[y]=b,t=0;t<1<<o[y];t++)l[b++]=y;for(b>>=7;y<i;y++)for(d[y]=b<<7,t=0;t<1<<o[y]-7;t++)l[256+b++]=y;for(e=0;e<=n;e++)w[e]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,w[8]++;for(;t<=255;)c[2*t+1]=9,t++,w[9]++;for(;t<=279;)c[2*t+1]=7,t++,w[7]++;for(;t<=287;)c[2*t+1]=8,t++,w[8]++;for(E(c,287,w),t=0;t<i;t++)u[2*t+1]=5,u[2*t]=k(t,5);m=new g(c,s,257,r,n),v=new g(u,o,0,i,n),_=new g(new Array(0),a,0,19,7)})(),z=!0),t.l_desc=new y(t.dyn_ltree,m),t.d_desc=new y(t.dyn_dtree,v),t.bl_desc=new y(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,D(t)},N._tr_stored_block=U,N._tr_flush_block=(t,r,i,n)=>{let s,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let r,i=4093624447;for(r=0;r<=31;r++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*r])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(r=32;r<e;r++)if(0!==t.dyn_ltree[2*r])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),a=(t=>{let e;for(C(t,t.dyn_ltree,t.l_desc.max_code),C(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=s&&(s=o)):s=o=i+5,i+4<=s&&-1!==r?U(t,r,i,n):4===t.strategy||o===s?(S(t,2+(n?1:0),3),I(t,c,u)):(S(t,4+(n?1:0),3),((t,e,r,i)=>{let n;for(S(t,e-257,5),S(t,r-1,5),S(t,i-4,4),n=0;n<i;n++)S(t,t.bl_tree[2*h[n]+1],3);B(t,t.dyn_ltree,e-1),B(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),I(t,t.dyn_ltree,t.dyn_dtree)),D(t),n&&O(t)},N._tr_tally=(t,r,i)=>(t.pending_buf[t.sym_buf+t.sym_next++]=r,t.pending_buf[t.sym_buf+t.sym_next++]=r>>8,t.pending_buf[t.sym_buf+t.sym_next++]=i,0===r?t.dyn_ltree[2*i]++:(t.matches++,r--,t.dyn_ltree[2*(f[i]+e+1)]++,t.dyn_dtree[2*b(r)]++),t.sym_next===t.sym_end),N._tr_align=t=>{S(t,2,3),x(t,256,c),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},N}function L(){return P?A:(P=1,A={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function j(){return R?I:(R=1,I={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})}function M(){if(C)return z;C=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:r,_tr_tally:i,_tr_align:n}=U(),s=E?k:(E=1,k=(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}),o=function(){if(O)return D;O=1;const t=new Uint32Array((()=>{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})());return D=(e,r,i,n)=>{const s=t,o=n+i;e^=-1;for(let t=n;t<o;t++)e=e>>>8^s[255&(e^r[t])];return~e},D}(),a=L(),{Z_NO_FLUSH:h,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:f,Z_OK:p,Z_STREAM_END:d,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_BUF_ERROR:v,Z_DEFAULT_COMPRESSION:_,Z_FILTERED:y,Z_HUFFMAN_ONLY:b,Z_RLE:w,Z_FIXED:S,Z_DEFAULT_STRATEGY:x,Z_UNKNOWN:T,Z_DEFLATED:A}=j(),P=258,I=262,R=42,B=113,N=666,M=(t,e)=>(t.msg=a[e],e),V=t=>2*t-(t>4?9:0),q=t=>{let e=t.length;for(;--e>=0;)t[e]=0},H=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 F=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const K=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))},Z=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,K(t.strm)},J=(t,e)=>{t.pending_buf[t.pending++]=e},W=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},$=(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=s(t.adler,e,n,r):2===t.state.wrap&&(t.adler=o(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},X=(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-I?t.strstart-(t.w_size-I):0,c=t.window,u=t.w_mask,l=t.prev,f=t.strstart+P;let p=c[s+o-1],d=c[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(r=e,c[r+o]===d&&c[r+o-1]===p&&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=P-(f-s),s=f-P,i>o){if(t.match_start=e,o=i,i>=a)break;p=c[s+o-1],d=c[s+o]}}}while((e=l[e&u])>h&&0!=--n);return o<=t.lookahead?o:t.lookahead},G=t=>{const e=t.w_size;let r,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-I)&&(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),H(t),i+=e),0===t.strm.avail_in)break;if(r=$(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=F(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=F(t,t.ins_h,t.window[n+3-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<3)););}while(t.lookahead<I&&0!==t.strm.avail_in)},Y=(t,r)=>{let i,n,s,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,c=t.strm.avail_in;do{if(i=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,n=t.strstart-t.block_start,i>n+t.strm.avail_in&&(i=n+t.strm.avail_in),i>s&&(i=s),i<o&&(0===i&&r!==l||r===h||i!==n+t.strm.avail_in))break;a=r===l&&i===n+t.strm.avail_in?1:0,e(t,0,0,a),t.pending_buf[t.pending-4]=i,t.pending_buf[t.pending-3]=i>>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,K(t.strm),n&&(n>i&&(n=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,i-=n),i&&($(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(0===a);return c-=t.strm.avail_in,c&&(c>=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<=c&&(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-c,t.strm.next_in),t.strstart),t.strstart+=c,t.insert+=c>t.w_size-t.insert?t.w_size-t.insert:c),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a?4:r!==h&&r!==l&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(s=t.window_size-t.strstart,t.strm.avail_in>s&&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++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&($(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,o=s>t.w_size?t.w_size:s,n=t.strstart-t.block_start,(n>=o||(n||r===l)&&r!==h&&0===t.strm.avail_in&&n<=s)&&(i=n>s?s:n,a=r===l&&0===t.strm.avail_in&&i===n?1:0,e(t,t.block_start,i,a),t.block_start+=i,K(t.strm)),a?3:1)},Q=(t,e)=>{let r,n;for(;;){if(t.lookahead<I){if(G(t),t.lookahead<I&&e===h)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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-I&&(t.match_length=X(t,r)),t.match_length>=3)if(n=i(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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=F(t,t.ins_h,t.window[t.strstart+1]);else n=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2},tt=(t,e)=>{let r,n,s;for(;;){if(t.lookahead<I){if(G(t),t.lookahead<I&&e===h)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-I&&(t.match_length=X(t,r),t.match_length<=5&&(t.strategy===y||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-3,n=i(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-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=2,t.strstart++,n&&(Z(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=i(t,0,t.window[t.strstart-1]),n&&Z(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2};function et(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 rt=[new et(0,0,0,0,Y),new et(4,4,8,4,Q),new et(4,5,16,8,Q),new et(4,6,32,32,Q),new et(4,4,16,16,tt),new et(8,16,32,32,tt),new et(8,16,128,128,tt),new et(8,32,128,256,tt),new et(32,128,258,1024,tt),new et(32,258,258,4096,tt)];function it(){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=A,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(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),q(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 nt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==R&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==B&&e.status!==N?1:0},st=e=>{if(nt(e))return M(e,g);e.total_in=e.total_out=0,e.data_type=T;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=2===r.wrap?57:r.wrap?R:B,e.adler=2===r.wrap?0:1,r.last_flush=-2,t(r),p},ot=t=>{const e=st(t);var r;return e===p&&((r=t.state).window_size=2*r.w_size,q(r.head),r.max_lazy_match=rt[r.level].max_lazy,r.good_match=rt[r.level].good_length,r.nice_match=rt[r.level].nice_length,r.max_chain_length=rt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},at=(t,e,r,i,n,s)=>{if(!t)return g;let o=1;if(e===_&&(e=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>9||r!==A||i<8||i>15||e<0||e>9||s<0||s>S||8===i&&1!==o)return M(t,g);8===i&&(i=9);const a=new it;return t.state=a,a.strm=t,a.status=R,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+3-1)/3),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,ot(t)};return z.deflateInit=(t,e)=>at(t,e,A,15,8,x),z.deflateInit2=at,z.deflateReset=ot,z.deflateResetKeep=st,z.deflateSetHeader=(t,e)=>nt(t)||2!==t.state.wrap?g:(t.state.gzhead=e,p),z.deflate=(t,r)=>{if(nt(t)||r>f||r<0)return t?M(t,g):g;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===N&&r!==l)return M(t,0===t.avail_out?v:g);const a=s.last_flush;if(s.last_flush=r,0!==s.pending){if(K(t),0===t.avail_out)return s.last_flush=-1,p}else if(0===t.avail_in&&V(r)<=V(a)&&r!==l)return M(t,v);if(s.status===N&&0!==t.avail_in)return M(t,v);if(s.status===R&&0===s.wrap&&(s.status=B),s.status===R){let e=A+(s.w_bits-8<<4)<<8,r=-1;if(r=s.strategy>=b||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=r<<6,0!==s.strstart&&(e|=32),e+=31-e%31,W(s,e),0!==s.strstart&&(W(s,t.adler>>>16),W(s,65535&t.adler)),t.adler=1,s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p}if(57===s.status)if(t.adler=0,J(s,31),J(s,139),J(s,8),s.gzhead)J(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),J(s,255&s.gzhead.time),J(s,s.gzhead.time>>8&255),J(s,s.gzhead.time>>16&255),J(s,s.gzhead.time>>24&255),J(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),J(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(J(s,255&s.gzhead.extra.length),J(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=o(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(J(s,0),J(s,0),J(s,0),J(s,0),J(s,0),J(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),J(s,3),s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p;if(69===s.status){if(s.gzhead.extra){let e=s.pending,r=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+r>s.pending_buf_size;){let i=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=o(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=i,K(t),0!==s.pending)return s.last_flush=-1,p;e=0,r-=i}let i=new Uint8Array(s.gzhead.extra);s.pending_buf.set(i.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending+=r,s.gzhead.hcrc&&s.pending>e&&(t.adler=o(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),K(t),0!==s.pending)return s.last_flush=-1,p;r=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,J(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),K(t),0!==s.pending)return s.last_flush=-1,p;r=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,J(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(K(t),0!==s.pending))return s.last_flush=-1,p;J(s,255&t.adler),J(s,t.adler>>8&255),t.adler=0}if(s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p}if(0!==t.avail_in||0!==s.lookahead||r!==h&&s.status!==N){let o=0===s.level?Y(s,r):s.strategy===b?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(G(t),0===t.lookahead)){if(e===h)return 1;break}if(t.match_length=0,r=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2})(s,r):s.strategy===w?((t,e)=>{let r,n,s,o;const a=t.window;for(;;){if(t.lookahead<=P){if(G(t),t.lookahead<=P&&e===h)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,n=a[s],n===a[++s]&&n===a[++s]&&n===a[++s])){o=t.strstart+P;do{}while(n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&s<o);t.match_length=P-(o-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=i(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2})(s,r):rt[s.level].func(s,r);if(3!==o&&4!==o||(s.status=N),1===o||3===o)return 0===t.avail_out&&(s.last_flush=-1),p;if(2===o&&(r===c?n(s):r!==f&&(e(s,0,0,!1),r===u&&(q(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),K(t),0===t.avail_out))return s.last_flush=-1,p}return r!==l?p:s.wrap<=0?d:(2===s.wrap?(J(s,255&t.adler),J(s,t.adler>>8&255),J(s,t.adler>>16&255),J(s,t.adler>>24&255),J(s,255&t.total_in),J(s,t.total_in>>8&255),J(s,t.total_in>>16&255),J(s,t.total_in>>24&255)):(W(s,t.adler>>>16),W(s,65535&t.adler)),K(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?p:d)},z.deflateEnd=t=>{if(nt(t))return g;const e=t.state.status;return t.state=null,e===B?M(t,m):p},z.deflateSetDictionary=(t,e)=>{let r=e.length;if(nt(t))return g;const i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==R||i.lookahead)return g;if(1===n&&(t.adler=s(t.adler,e,r,0)),i.wrap=0,r>=i.w_size){0===n&&(q(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(r-i.w_size,r),0),e=t,r=i.w_size}const o=t.avail_in,a=t.next_in,h=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,G(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=F(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,G(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=a,t.input=h,t.avail_in=o,i.wrap=n,p},z.deflateInfo="pako deflate (from Nodeca project)",z}var V,q={};var H,F,K,Z,J={};function W(){if(H)return J;H=1;let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const e=new Uint8Array(256);for(let t=0;t<256;t++)e[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;e[254]=e[254]=1,J.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,i,n,s,o=t.length,a=0;for(n=0;n<o;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(a),s=0,n=0;s<a;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e};return J.buf2string=(r,i)=>{const n=i||r.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(r.subarray(0,i));let s,o;const a=new Array(2*n);for(o=0,s=0;s<n;){let t=r[s++];if(t<128){a[o++]=t;continue}let i=e[t];if(i>4)a[o++]=65533,s+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&s<n;)t=t<<6|63&r[s++],i--;i>1?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let i="";for(let t=0;t<r;t++)i+=String.fromCharCode(e[t]);return i})(a,o)},J.utf8border=(t,r)=>{(r=r||t.length)>t.length&&(r=t.length);let i=r-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?r:i+e[t[i]]>r?i:r},J}var $=function(){if(Z)return B;Z=1;const t=M(),e=function(){if(V)return q;V=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return q.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const r in i)t(i,r)&&(e[r]=i[r])}}return e},q.flattenChunks=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];r.set(n,i),i+=n.length}return r},q}(),r=W(),i=L(),n=K?F:(K=1,F=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}),s=Object.prototype.toString,{Z_NO_FLUSH:o,Z_SYNC_FLUSH:a,Z_FULL_FLUSH:h,Z_FINISH:c,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:f,Z_DEFAULT_STRATEGY:p,Z_DEFLATED:d}=j();function g(o){this.options=e.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:p},o||{});let a=this.options;a.raw&&a.windowBits>0?a.windowBits=-a.windowBits:a.gzip&&a.windowBits>0&&a.windowBits<16&&(a.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;let h=t.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(h!==u)throw new Error(i[h]);if(a.header&&t.deflateSetHeader(this.strm,a.header),a.dictionary){let e;if(e="string"==typeof a.dictionary?r.string2buf(a.dictionary):"[object ArrayBuffer]"===s.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,h=t.deflateSetDictionary(this.strm,e),h!==u)throw new Error(i[h]);this._dict_set=!0}}function m(t,e){const r=new g(e);if(r.push(t,!0),r.err)throw r.msg||i[r.err];return r.result}return g.prototype.push=function(e,i){const n=this.strm,f=this.options.chunkSize;let p,d;if(this.ended)return!1;for(d=i===~~i?i:!0===i?c:o,"string"==typeof e?n.input=r.string2buf(e):"[object ArrayBuffer]"===s.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(f),n.next_out=0,n.avail_out=f),(d===a||d===h)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(p=t.deflate(n,d),p===l)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),p=t.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===u;if(0!==n.avail_out){if(d>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===u&&(this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},B.Deflate=g,B.deflate=m,B.deflateRaw=function(t,e){return(e=e||{}).raw=!0,m(t,e)},B.gzip=function(t,e){return(e=e||{}).gzip=!0,m(t,e)},B.constants=j(),B}();function X(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function G(t,e){return t&e}function Y(t,e){return t|e}function Q(t,e){return t^e}function tt(t,e){return t&~e}function et(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function rt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var it,nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function st(t){var e,r,i="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),i+=nt.charAt(r>>6)+nt.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),i+=nt.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),i+=nt.charAt(r>>2)+nt.charAt((3&r)<<4));(3&i.length)>0;)i+="=";return i}function ot(t){var e,r="",i=0,n=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var s=nt.indexOf(t.charAt(e));s<0||(0==i?(r+=X(s>>2),n=3&s,i=1):1==i?(r+=X(n<<2|s>>4),n=15&s,i=2):2==i?(r+=X(n),r+=X(s>>2),n=3&s,i=3):(r+=X(n<<2|s>>4),r+=X(15&s),i=0))}return 1==i&&(r+=X(n<<2)),r}var at,ht=function(t){var e;if(void 0===it){var r="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(it={},e=0;e<16;++e)it[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)it[r.charAt(e)]=e;for(e=0;e<8;++e)it[i.charAt(e)]=-1}var n=[],s=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=it[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);s|=a,++o>=2?(n[n.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n},ct={decode:function(t){var e;if(void 0===at){var r="= \f\n\r\t \u2028\u2029";for(at=Object.create(null),e=0;e<64;++e)at["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(at["-"]=62,at._=63,e=0;e<9;++e)at[r.charAt(e)]=-1}var i=[],n=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=at[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);n|=o,++s>=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=ct.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return ct.decode(t)}},ut=1e13,lt=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var r,i,n=this.buf,s=n.length;for(r=0;r<s;++r)(i=n[r]*t+e)<ut?e=0:i-=(e=0|i/ut)*ut,n[r]=i;e>0&&(n[r]=e)},t.prototype.sub=function(t){var e,r,i=this.buf,n=i.length;for(e=0;e<n;++e)(r=i[e]-t)<0?(r+=ut,t=1):t=0,i[e]=r;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,r=e[e.length-1].toString(),i=e.length-2;i>=0;--i)r+=(ut+e[i]).toString().substring(1);return r},t.prototype.valueOf=function(){for(var t=this.buf,e=0,r=t.length-1;r>=0;--r)e=e*ut+t[r];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),ft=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,pt=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function dt(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var gt,mt=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,r){for(var i="",n=t;n<e;++n)if(i+=this.hexByte(this.get(n)),!0!==r)switch(15&n){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},t.prototype.isASCII=function(t,e){for(var r=t;r<e;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var r="",i=t;i<e;++i)r+=String.fromCharCode(this.get(i));return r},t.prototype.parseStringUTF=function(t,e){for(var r="",i=t;i<e;){var n=this.get(i++);r+=n<128?String.fromCharCode(n):n>191&&n<224?String.fromCharCode((31&n)<<6|63&this.get(i++)):String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return r},t.prototype.parseStringBMP=function(t,e){for(var r,i,n="",s=t;s<e;)r=this.get(s++),i=this.get(s++),n+=String.fromCharCode(r<<8|i);return n},t.prototype.parseTime=function(t,e,r){var i=this.parseStringISO(t,e),n=(r?ft:pt).exec(i);return n?(r&&(n[1]=+n[1],n[1]+=+n[1]<70?2e3:1900),i=n[1]+"-"+n[2]+"-"+n[3]+" "+n[4],n[5]&&(i+=":"+n[5],n[6]&&(i+=":"+n[6],n[7]&&(i+="."+n[7]))),n[8]&&(i+=" UTC","Z"!=n[8]&&(i+=n[8],n[9]&&(i+=":"+n[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(t,e){for(var r,i=this.get(t),n=i>127,s=n?255:0,o="";i==s&&++t<e;)i=this.get(t);if(0===(r=e-t))return n?-1:0;if(r>4){for(o=i,r<<=3;!(128&(+o^s));)o=+o<<1,--r;o="("+r+" bit)\n"}n&&(i-=256);for(var a=new lt(i),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return o+a.toString()},t.prototype.parseBitString=function(t,e,r){for(var i=this.get(t),n="("+((e-t-1<<3)-i)+" bit)\n",s="",o=t+1;o<e;++o){for(var a=this.get(o),h=o==e-1?i:0,c=7;c>=h;--c)s+=a>>c&1?"1":"0";if(s.length>r)return n+dt(s,r)}return n+s},t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return dt(this.parseStringISO(t,e),r);var i=e-t,n="("+i+" byte)\n";i>(r/=2)&&(e=t+r);for(var s=t;s<e;++s)n+=this.hexByte(this.get(s));return i>r&&(n+="…"),n},t.prototype.parseOID=function(t,e,r){for(var i="",n=new lt,s=0,o=t;o<e;++o){var a=this.get(o);if(n.mulAdd(128,127&a),s+=7,!(128&a)){if(""===i)if((n=n.simplify())instanceof lt)n.sub(80),i="2."+n.toString();else{var h=n<80?n<40?0:1:2;i=h+"."+(n-40*h)}else i+="."+n.toString();if(i.length>r)return dt(i,r);n=new lt,s=0}}return s>0&&(i+=".incomplete"),i},t}(),vt=function(){function t(t,e,r,i,n){if(!(i instanceof _t))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=r,this.tag=i,this.sub=n}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return dt(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return dt(this.stream.parseStringISO(e,e+r),t);case 30:return dt(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r<i;++r)e+=this.sub[r].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),r=127&e;if(r==e)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i<r;++i)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,r=2*this.length;return t.substr(e,r)},t.decode=function(e){var r;r=e instanceof mt?e:new mt(e,0);var i=new mt(r),n=new _t(r),s=t.decodeLength(r),o=r.pos,a=o-i.pos,h=null,c=function(){var e=[];if(null!==s){for(var i=o+s;r.pos<i;)e[e.length]=t.decode(r);if(r.pos!=i)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=t.decode(r);if(n.tag.isEOC())break;e[e.length]=n}s=o-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(n.tagConstructed)h=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=c();for(var u=0;u<h.length;++u)if(h[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);r.pos=o+Math.abs(s)}return new t(i,a,s,n,h)},t}(),_t=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var r=new lt;do{e=t.get(),r.mulAdd(128,127&e)}while(128&e);this.tagNumber=r.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),yt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],bt=(1<<26)/yt[yt.length-1],wt=function(){function t(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,s="",o=this.t,a=this.DB-o*this.DB%e;if(o-- >0)for(a<this.DB&&(r=this[o]>>a)>0&&(n=!0,s=X(r));o>=0;)a<e?(r=(this[o]&(1<<a)-1)<<e-a,r|=this[--o]>>(a+=this.DB-e)):(r=this[o]>>(a-=e)&i,a<=0&&(a+=this.DB,--o)),r>0&&(n=!0),n&&(s+=X(r));return n?s:"0"},t.prototype.negate=function(){var e=Et();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Bt(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=Et();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new xt(e):new Tt(e),this.exp(t,r)},t.prototype.clone=function(){var t=Et();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this[t]&(1<<i)-1)<<8-i,r|=this[--t]>>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&r&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=Et();return this.bitwiseTo(t,G,e),e},t.prototype.or=function(t){var e=Et();return this.bitwiseTo(t,Y,e),e},t.prototype.xor=function(t){var e=Et();return this.bitwiseTo(t,Q,e),e},t.prototype.andNot=function(t){var e=Et();return this.bitwiseTo(t,tt,e),e},t.prototype.not=function(){for(var t=Et(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=Et();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=Et();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+et(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=rt(this[r]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,Y)},t.prototype.clearBit=function(t){return this.changeBit(t,tt)},t.prototype.flipBit=function(t){return this.changeBit(t,Q)},t.prototype.add=function(t){var e=Et();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=Et();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=Et();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=Et();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=Et();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=Et(),r=Et();return this.divRemTo(t,e,r),[e,r]},t.prototype.modPow=function(t,e){var r,i,n=t.bitLength(),s=Ct(1);if(n<=0)return s;r=n<18?1:n<48?3:n<144?4:n<768?5:6,i=n<8?new xt(e):e.isEven()?new kt(e):new Tt(e);var o=[],a=3,h=r-1,c=(1<<r)-1;if(o[1]=i.convert(this),r>1){var u=Et();for(i.sqrTo(o[1],u);a<=c;)o[a]=Et(),i.mulTo(u,o[a-2],o[a]),a+=2}var l,f,p=t.t-1,d=!0,g=Et();for(n=Bt(t[p])-1;p>=0;){for(n>=h?l=t[p]>>n-h&c:(l=(t[p]&(1<<n+1)-1)<<h-n,p>0&&(l|=t[p-1]>>this.DB+n-h)),a=r;!(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--p),d)o[l].copyTo(s),d=!1;else{for(;a>1;)i.sqrTo(s,g),i.sqrTo(g,s),a-=2;a>0?i.sqrTo(s,g):(f=s,s=g,g=f),i.mulTo(g,o[l],s)}for(;p>=0&&!(t[p]&1<<n);)i.sqrTo(s,g),f=s,s=g,g=f,--n<0&&(n=this.DB-1,--p)}return i.revert(s)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||0==e.signum())return t.ZERO;for(var i=e.clone(),n=this.clone(),s=Ct(1),o=Ct(0),a=Ct(0),h=Ct(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),r?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(e,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);i.compareTo(n)>=0?(i.subTo(n,i),r&&s.subTo(a,s),o.subTo(h,o)):(n.subTo(i,n),r&&a.subTo(s,a),h.subTo(o,h))}return 0!=n.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new St)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return e;for(n<s&&(s=n),s>0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},t.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=yt[yt.length-1]){for(e=0;e<yt.length;++e)if(r[0]==yt[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<yt.length;){for(var i=yt[e],n=e+1;n<yt.length&&i<bt;)i*=yt[n++];for(i=r.modInt(i);e<n;)if(i%yt[e++]==0)return!1}return r.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else{if(4!=r)return void this.fromRadix(e,r);i=2}this.t=0,this.s=0;for(var n=e.length,s=!1,o=0;--n>=0;){var a=8==i?255&+e[n]:Rt(e,n);a<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==o?this[this.t++]=a:o+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=i)>=this.DB&&(o-=this.DB))}8==i&&128&+e[0]&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,i=this.DB-r,n=(1<<i)-1,s=Math.floor(t/this.DB),o=this.s<<r&this.DM,a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>i|o,o=(this[a]&n)<<r;for(a=s-1;a>=0;--a)e[a]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,s=(1<<i)-1;e[0]=this[r]>>i;for(var o=r+1;o<this.t;++o)e[o-r-1]|=(this[o]&s)<<n,e[o-r]=this[o]>>i;i>0&&(e[this.t-r-1]|=(this.s&s)<<n),e.t=this.t-r,e.clamp()}},t.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]-t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t[r],e[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},t.prototype.multiplyTo=function(e,r){var i=this.abs(),n=e.abs(),s=i.t;for(r.t=s+n.t;--s>=0;)r[s]=0;for(s=0;s<n.t;++s)r[s+i.t]=i.am(0,n[s],r,s,0,i.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t)return null!=r&&r.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Et());var o=Et(),a=this.s,h=e.s,c=this.DB-Bt(n[n.t-1]);c>0?(n.lShiftTo(c,o),s.lShiftTo(c,i)):(n.copyTo(o),s.copyTo(i));var u=o.t,l=o[u-1];if(0!=l){var f=l*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,g=1<<this.F2,m=i.t,v=m-u,_=null==r?Et():r;for(o.dlShiftTo(v,_),i.compareTo(_)>=0&&(i[i.t++]=1,i.subTo(_,i)),t.ONE.dlShiftTo(u,_),_.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--v>=0;){var y=i[--m]==l?this.DM:Math.floor(i[m]*p+(i[m-1]+g)*d);if((i[m]+=o.am(0,y,i,v,0,u))<y)for(o.dlShiftTo(v,_),i.subTo(_,i);i[m]<--y;)i.subTo(_,i)}null!=r&&(i.drShiftTo(u,r),a!=h&&t.ZERO.subTo(r,r)),i.t=u,i.clamp(),c>0&&i.rShiftTo(c,i),a<0&&t.ZERO.subTo(i,i)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=Et(),n=Et(),s=r.convert(this),o=Bt(e)-1;for(s.copyTo(i);--o>=0;)if(r.sqrTo(i,n),(e&1<<o)>0)r.mulTo(n,s,i);else{var a=i;i=n,n=a}return r.revert(i)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=Ct(r),n=Et(),s=Et(),o="";for(this.divRemTo(i,n,s);n.signum()>0;)o=(r+s.intValue()).toString(t).substr(1)+o,n.divRemTo(i,n,s);return s.intValue().toString(t)+o},t.prototype.fromRadix=function(e,r){this.fromInt(0),null==r&&(r=10);for(var i=this.chunkSize(r),n=Math.pow(r,i),s=!1,o=0,a=0,h=0;h<e.length;++h){var c=Rt(e,h);c<0?"-"==e.charAt(h)&&0==this.signum()&&(s=!0):(a=r*a+c,++o>=i&&(this.dMultiply(n),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(r,o)),this.dAddOffset(a,0)),s&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var n=[],s=7&e;n.length=1+(e>>3),r.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}},t.prototype.bitwiseTo=function(t,e,r){var i,n,s=Math.min(t.t,this.t);for(i=0;i<s;++i)r[i]=e(this[i],t[i]);if(t.t<this.t){for(n=t.s&this.DM,i=s;i<this.t;++i)r[i]=e(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=s;i<t.t;++i)r[i]=e(n,t[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},t.prototype.changeBit=function(e,r){var i=t.ONE.shiftLeft(e);return this.bitwiseTo(i,r,i),i},t.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]+t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t[r],e[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},t.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r[this.t+i-e]=this.am(e-i,t[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),i=r.getLowestSetBit();if(i<=0)return!1;var n=r.shiftRight(i);(e=e+1>>1)>yt.length&&(e=yt.length);for(var s=Et(),o=0;o<e;++o){s.fromInt(yt[Math.floor(Math.random()*yt.length)]);var a=s.modPow(n,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(r)){for(var h=1;h++<i&&0!=a.compareTo(r);)if(0==(a=a.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=a.compareTo(r))return!1}}return!0},t.prototype.square=function(){var t=Et();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var r=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(r.compareTo(i)<0){var n=r;r=i,i=n}var s=r.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)e(r);else{s<o&&(o=s),o>0&&(r.rShiftTo(o,r),i.rShiftTo(o,i));var a=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(a,0):(o>0&&i.lShiftTo(o,i),setTimeout((function(){e(i)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Y,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>e&&s.subTo(t.ONE.shiftLeft(e-1),s),s.isProbablePrime(r)?setTimeout((function(){n()}),0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],h=7&e;a.length=1+(e>>3),r.nextBytes(a),h>0?a[0]&=(1<<h)-1:a[0]=0,this.fromString(a,256)}},t}(),St=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),xt=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),Tt=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=Et();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(wt.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=Et();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],i=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),kt=function(){function t(t){this.m=t,this.r2=Et(),this.q3=Et(),wt.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Et();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function Et(){return new wt(null)}function Dt(t,e){return new wt(t,e)}var Ot="undefined"!=typeof navigator;Ot&&"Microsoft Internet Explorer"==navigator.appName?(wt.prototype.am=function(t,e,r,i,n,s){for(var o=32767&e,a=e>>15;--s>=0;){var h=32767&this[t],c=this[t++]>>15,u=a*h+c*o;n=((h=o*h+((32767&u)<<15)+r[i]+(1073741823&n))>>>30)+(u>>>15)+a*c+(n>>>30),r[i++]=1073741823&h}return n},gt=30):Ot&&"Netscape"!=navigator.appName?(wt.prototype.am=function(t,e,r,i,n,s){for(;--s>=0;){var o=e*this[t++]+r[i]+n;n=Math.floor(o/67108864),r[i++]=67108863&o}return n},gt=26):(wt.prototype.am=function(t,e,r,i,n,s){for(var o=16383&e,a=e>>14;--s>=0;){var h=16383&this[t],c=this[t++]>>14,u=a*h+c*o;n=((h=o*h+((16383&u)<<14)+r[i]+n)>>28)+(u>>14)+a*c,r[i++]=268435455&h}return n},gt=28),wt.prototype.DB=gt,wt.prototype.DM=(1<<gt)-1,wt.prototype.DV=1<<gt;wt.prototype.FV=Math.pow(2,52),wt.prototype.F1=52-gt,wt.prototype.F2=2*gt-52;var At,Pt,It=[];for(At="0".charCodeAt(0),Pt=0;Pt<=9;++Pt)It[At++]=Pt;for(At="a".charCodeAt(0),Pt=10;Pt<36;++Pt)It[At++]=Pt;for(At="A".charCodeAt(0),Pt=10;Pt<36;++Pt)It[At++]=Pt;function Rt(t,e){var r=It[t.charCodeAt(e)];return null==r?-1:r}function Ct(t){var e=Et();return e.fromInt(t),e}function Bt(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}wt.ZERO=Ct(0),wt.ONE=Ct(1);var zt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,r,i;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[r],this.S[r]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var Nt,Ut,Lt=null;if(null==Lt){Lt=[],Ut=0;var jt=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var Mt=new Uint32Array(256);for(window.crypto.getRandomValues(Mt),jt=0;jt<Mt.length;++jt)Lt[Ut++]=255&Mt[jt]}var Vt=0,qt=function(t){if((Vt=Vt||0)>=256||Ut>=256)window.removeEventListener?window.removeEventListener("mousemove",qt,!1):window.detachEvent&&window.detachEvent("onmousemove",qt);else try{var e=t.x+t.y;Lt[Ut++]=255&e,Vt+=1}catch(t){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",qt,!1):window.attachEvent&&window.attachEvent("onmousemove",qt))}function Ht(){if(null==Nt){for(Nt=new zt;Ut<256;){var t=Math.floor(65536*Math.random());Lt[Ut++]=255&t}for(Nt.init(Lt),Ut=0;Ut<Lt.length;++Ut)Lt[Ut]=0;Ut=0}return Nt.next()}var Ft=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Ht()},t}();var Kt=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,r=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],i=t.length-1;i>=0&&e>0;){var n=t.charCodeAt(i--);n<128?r[--e]=n:n>127&&n<2048?(r[--e]=63&n|128,r[--e]=n>>6|192):(r[--e]=63&n|128,r[--e]=n>>6&63|128,r[--e]=n>>12|224)}r[--e]=0;for(var s=new Ft,o=[];e>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);r[--e]=o[0]}return r[--e]=2,r[--e]=0,new wt(r)}(t,e);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var n=i.toString(16),s=n.length,o=0;o<2*e-s;o++)n="0"+n;return n},t.prototype.setPrivate=function(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16),this.d=Dt(r,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,r,i,n,s,o,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16),this.d=Dt(r,16),this.p=Dt(i,16),this.q=Dt(n,16),this.dmp1=Dt(s,16),this.dmq1=Dt(o,16),this.coeff=Dt(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var r=new Ft,i=t>>1;this.e=parseInt(e,16);for(var n=new wt(e,16);;){for(;this.p=new wt(t-i,1,r),0!=this.p.subtract(wt.ONE).gcd(n).compareTo(wt.ONE)||!this.p.isProbablePrime(10););for(;this.q=new wt(i,1,r),0!=this.q.subtract(wt.ONE).gcd(n).compareTo(wt.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(wt.ONE),a=this.q.subtract(wt.ONE),h=o.multiply(a);if(0==h.gcd(n).compareTo(wt.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=Dt(t,16),r=this.doPrivate(e);return null==r?null:function(t,e){var r=t.toByteArray(),i=0;for(;i<r.length&&0==r[i];)++i;if(r.length-i!=e-1||2!=r[i])return null;++i;for(;0!=r[i];)if(++i>=r.length)return null;var n="";for(;++i<r.length;){var s=255&r[i];s<128?n+=String.fromCharCode(s):s>191&&s<224?(n+=String.fromCharCode((31&s)<<6|63&r[i+1]),++i):(n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]),i+=2)}return n}(r,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var i=new Ft,n=t>>1;this.e=parseInt(e,16);var s=new wt(e,16),o=this,a=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(wt.ONE),i=o.q.subtract(wt.ONE),n=e.multiply(i);0==n.gcd(s).compareTo(wt.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(n),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(i),o.coeff=o.q.modInverse(o.p),setTimeout((function(){r()}),0)):setTimeout(a,0)},h=function(){o.q=Et(),o.q.fromNumberAsync(n,1,i,(function(){o.q.subtract(wt.ONE).gcda(s,(function(t){0==t.compareTo(wt.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)}))}))},c=function(){o.p=Et(),o.p.fromNumberAsync(t-n,1,i,(function(){o.p.subtract(wt.ONE).gcda(s,(function(t){0==t.compareTo(wt.ONE)&&o.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,r){var i=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,i="",n=0;n<r;n+=2)i+="ff";return Dt("0001"+i+"00"+t,16)}((Zt[r]||"")+e(t).toString(),this.n.bitLength()/4);if(null==i)return null;var n=this.doPrivate(i);if(null==n)return null;var s=n.toString(16);return 1&s.length?"0"+s:s},t.prototype.verify=function(t,e,r){var i=Dt(e,16),n=this.doPublic(i);return null==n?null:function(t){for(var e in Zt)if(Zt.hasOwnProperty(e)){var r=Zt[e],i=r.length;if(t.substr(0,i)==r)return t.substr(i)}return t}
2
+ /*!
3
+ Copyright (c) 2011, Yahoo! Inc. All rights reserved.
4
+ Code licensed under the BSD License:
5
+ http://developer.yahoo.com/yui/license.html
6
+ version: 2.9.0
7
+ */(n.toString(16).replace(/^1f+00/,""))==r(t).toString()},t}();var Zt={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};var Jt={};Jt.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),r){var n;for(n in r)t.prototype[n]=r[n];var s=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(t,e){for(n=0;n<o.length;n+=1){var r=o[n],i=e[r];"function"==typeof i&&i!=Object.prototype[r]&&(t[r]=i)}})}catch(t){}s(t.prototype,r)}}};
2
8
  /**
3
9
  * @fileOverview
4
10
  * @name asn1-1.0.js
@@ -6,4 +12,5 @@
6
12
  * @version asn1 1.0.13 (2017-Jun-02)
7
13
  * @since jsrsasign 2.1
8
14
  * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
9
- */var ce={};void 0!==ce.asn1&&ce.asn1||(ce.asn1={}),ce.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substring(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substring(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",n=0;n<r;n++)i+="f";e=new wt(i,16).xor(t).add(wt.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=ce.asn1,r=e.DERBoolean,i=e.DERInteger,n=e.DERBitString,s=e.DEROctetString,o=e.DERNull,a=e.DERObjectIdentifier,h=e.DEREnumerated,c=e.DERUTF8String,u=e.DERNumericString,l=e.DERPrintableString,f=e.DERTeletexString,p=e.DERIA5String,d=e.DERUTCTime,g=e.DERGeneralizedTime,m=e.DERSequence,v=e.DERSet,_=e.DERTaggedObject,y=e.ASN1Util.newObject,b=Object.keys(t);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(t[w]);if("int"==w)return new i(t[w]);if("bitstr"==w)return new n(t[w]);if("octstr"==w)return new s(t[w]);if("null"==w)return new o(t[w]);if("oid"==w)return new a(t[w]);if("enum"==w)return new h(t[w]);if("utf8str"==w)return new c(t[w]);if("numstr"==w)return new u(t[w]);if("prnstr"==w)return new l(t[w]);if("telstr"==w)return new f(t[w]);if("ia5str"==w)return new p(t[w]);if("utctime"==w)return new d(t[w]);if("gentime"==w)return new g(t[w]);if("seq"==w){for(var S=t[w],x=[],T=0;T<S.length;T++){var k=y(S[T]);x.push(k)}return new m({array:x})}if("set"==w){for(S=t[w],x=[],T=0;T<S.length;T++){k=y(S[T]);x.push(k)}return new v({array:x})}if("tag"==w){var E=t[w];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var D=y(E[2]);return new _({tag:E[0],explicit:E[1],obj:D})}var O={};if(void 0!==E.explicit&&(O.explicit=E.explicit),void 0!==E.tag&&(O.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return O.obj=y(E.obj),new _(O)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},ce.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",r=parseInt(t.substring(0,2),16),i=(e=Math.floor(r/40)+"."+r%40,""),n=2;n<t.length;n+=2){var s=("00000000"+parseInt(t.substring(n,n+2),16).toString(2)).slice(-8);if(i+=s.substring(1,8),"0"==s.substring(0,1))e=e+"."+new wt(i,2).toString(10),i=""}return e},ce.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new wt(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substring(o,o+7);o!=i.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);return i},ce.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var r=e.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},ce.asn1.DERAbstractString=function(t){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},he(ce.asn1.DERAbstractString,ce.asn1.ASN1Object),ce.asn1.DERAbstractTime=function(t){ce.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,r){var i=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substring(2,4));var o=s+i(String(n.getMonth()+1),2)+i(String(n.getDate()),2)+i(String(n.getHours()),2)+i(String(n.getMinutes()),2)+i(String(n.getSeconds()),2);if(!0===r){var a=n.getMilliseconds();if(0!=a){var h=i(String(a),3);o=o+"."+(h=h.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,r,i,n,s){var o=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},he(ce.asn1.DERAbstractTime,ce.asn1.ASN1Object),ce.asn1.DERAbstractStructured=function(t){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},he(ce.asn1.DERAbstractStructured,ce.asn1.ASN1Object),ce.asn1.DERBoolean=function(){ce.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},he(ce.asn1.DERBoolean,ce.asn1.ASN1Object),ce.asn1.DERInteger=function(t){ce.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new wt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},he(ce.asn1.DERInteger,ce.asn1.ASN1Object),ce.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ce.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}ce.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var r="0"+t;this.hTLV=null,this.isModified=!0,this.hV=r+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var r=0;r<=e;r++)t+="0";var i="";for(r=0;r<t.length-1;r+=8){var n=t.substring(r,r+8),s=parseInt(n,2).toString(16);1==s.length&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",r=0;r<t.length;r++)1==t[r]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},he(ce.asn1.DERBitString,ce.asn1.ASN1Object),ce.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ce.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}ce.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},he(ce.asn1.DEROctetString,ce.asn1.DERAbstractString),ce.asn1.DERNull=function(){ce.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},he(ce.asn1.DERNull,ce.asn1.ASN1Object),ce.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new wt(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substring(o,o+7);o!=i.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};ce.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(t){var e=ce.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},he(ce.asn1.DERObjectIdentifier,ce.asn1.ASN1Object),ce.asn1.DEREnumerated=function(t){ce.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new wt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},he(ce.asn1.DEREnumerated,ce.asn1.ASN1Object),ce.asn1.DERUTF8String=function(t){ce.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},he(ce.asn1.DERUTF8String,ce.asn1.DERAbstractString),ce.asn1.DERNumericString=function(t){ce.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},he(ce.asn1.DERNumericString,ce.asn1.DERAbstractString),ce.asn1.DERPrintableString=function(t){ce.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},he(ce.asn1.DERPrintableString,ce.asn1.DERAbstractString),ce.asn1.DERTeletexString=function(t){ce.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},he(ce.asn1.DERTeletexString,ce.asn1.DERAbstractString),ce.asn1.DERIA5String=function(t){ce.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},he(ce.asn1.DERIA5String,ce.asn1.DERAbstractString),ce.asn1.DERUTCTime=function(t){ce.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},he(ce.asn1.DERUTCTime,ce.asn1.DERAbstractTime),ce.asn1.DERGeneralizedTime=function(t){ce.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},he(ce.asn1.DERGeneralizedTime,ce.asn1.DERAbstractTime),ce.asn1.DERSequence=function(t){ce.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},he(ce.asn1.DERSequence,ce.asn1.DERAbstractStructured),ce.asn1.DERSet=function(t){ce.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},he(ce.asn1.DERSet,ce.asn1.DERAbstractStructured),ce.asn1.DERTaggedObject=function(t){ce.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},he(ce.asn1.DERTaggedObject,ce.asn1.ASN1Object);var ue,le,fe=(ue=function(t,e){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ue(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ue(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),pe=function(t){function e(r){var i=t.call(this)||this;return r&&("string"==typeof r?i.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&i.parsePropertiesFrom(r)),i}return fe(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?ht(t):ct.unarmor(t),n=vt.decode(i);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=Dt(e,16),r=n.sub[2].getHexStringValue(),this.e=parseInt(r,16);var s=n.sub[3].getHexStringValue();this.d=Dt(s,16);var o=n.sub[4].getHexStringValue();this.p=Dt(o,16);var a=n.sub[5].getHexStringValue();this.q=Dt(a,16);var h=n.sub[6].getHexStringValue();this.dmp1=Dt(h,16);var c=n.sub[7].getHexStringValue();this.dmq1=Dt(c,16);var u=n.sub[8].getHexStringValue();this.coeff=Dt(u,16)}else{if(2!==n.sub.length)return!1;if(n.sub[0].sub){var l=n.sub[1].sub[0];e=l.sub[0].getHexStringValue(),this.n=Dt(e,16),r=l.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else e=n.sub[0].getHexStringValue(),this.n=Dt(e,16),r=n.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new ce.asn1.DERInteger({int:0}),new ce.asn1.DERInteger({bigint:this.n}),new ce.asn1.DERInteger({int:this.e}),new ce.asn1.DERInteger({bigint:this.d}),new ce.asn1.DERInteger({bigint:this.p}),new ce.asn1.DERInteger({bigint:this.q}),new ce.asn1.DERInteger({bigint:this.dmp1}),new ce.asn1.DERInteger({bigint:this.dmq1}),new ce.asn1.DERInteger({bigint:this.coeff})]};return new ce.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return st(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new ce.asn1.DERSequence({array:[new ce.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new ce.asn1.DERNull]}),e=new ce.asn1.DERSequence({array:[new ce.asn1.DERInteger({bigint:this.n}),new ce.asn1.DERInteger({int:this.e})]}),r=new ce.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new ce.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return st(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var r="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(oe),de="undefined"!=typeof process?null===(le=process.env)||void 0===le?void 0:le.npm_package_version:void 0,ge=function(){function t(t){void 0===t&&(t={}),this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=t.key||null}return t.prototype.setKey=function(t){t?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new pe(t)):!this.key&&this.log&&console.error("A key was not set.")},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(ot(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return st(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.encryptOAEP=function(t){try{return st(this.getKey().encrypt(t,se))}catch(t){return!1}},t.prototype.sign=function(t,e,r){void 0===e&&(e=function(t){return t}),void 0===r&&(r="");try{return st(this.getKey().sign(t,e,r))}catch(t){return!1}},t.prototype.signSha256=function(t){return this.sign(t,function(t){return Zt(Kt(t))},"sha256")},t.prototype.verify=function(t,e,r){void 0===r&&(r=function(t){return t});try{return this.getKey().verify(t,ot(e),r)}catch(t){return!1}},t.prototype.verifySha256=function(t,e){return this.verify(t,e,function(t){return Zt(Kt(t))})},t.prototype.getKey=function(t){if(!this.key){if(this.key=new pe,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=de,t}(),me={exports:{}};var ve,_e={exports:{}};function ye(){return ve||(ve=1,function(t){t.exports=function(){var t=t||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==S&&S.crypto&&(r=S.crypto),!r)try{r=require("crypto")}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},o=s.lib={},a=o.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=o.WordArray=a.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var s=0;s<n;s++){var o=r[s>>>2]>>>24-s%4*8&255;e[i+s>>>2]|=o<<24-(i+s)%4*8}else for(var a=0;a<n;a+=4)e[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new h.init(e,t)}}),c=s.enc={},u=c.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push((s>>>4).toString(16)),i.push((15&s).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new h.init(r,e/2)}},l=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new h.init(r,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},p=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,s=i.sigBytes,o=this.blockSize,a=s/(4*o),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,u=t.min(4*c,s);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(n,l);r=n.splice(0,c),i.sigBytes-=u}return new h.init(r,u)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});o.Hasher=p.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new d.HMAC.init(t,r).finalize(e)}}});var d=s.algo={};return s}(Math);return t}()}(_e)),_e.exports}var be;var we,Se=x((be||(be=1,function(t){t.exports=function(t){return t.enc.Utf8}(ye())}(me)),me.exports)),xe={exports:{}},Te={exports:{}};function ke(){return we||(we=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function i(t,e,i){for(var n=[],s=0,o=0;o<e;o++)if(o%4){var a=i[t.charCodeAt(o-1)]<<o%4*2|i[t.charCodeAt(o)]>>>6-o%4*2;n[s>>>2]|=a<<24-s%4*8,s++}return r.create(n,s)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],s=0;s<r;s+=3)for(var o=(e[s>>>2]>>>24-s%4*8&255)<<16|(e[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|e[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<r;a++)n.push(i.charAt(o>>>6*(3-a)&63));var h=i.charAt(64);if(h)for(;n.length%4;)n.push(h);return n.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<r.length;s++)n[r.charCodeAt(s)]=s}var o=r.charAt(64);if(o){var a=t.indexOf(o);-1!==a&&(e=a)}return i(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(ye())}(Te)),Te.exports}var Ee,De={exports:{}};function Oe(){return Ee||(Ee=1,function(t){t.exports=function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,s=i.Hasher,o=r.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var h=o.MD5=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var s=this._hash.words,o=t[e+0],h=t[e+1],p=t[e+2],d=t[e+3],g=t[e+4],m=t[e+5],v=t[e+6],_=t[e+7],y=t[e+8],b=t[e+9],w=t[e+10],S=t[e+11],x=t[e+12],T=t[e+13],k=t[e+14],E=t[e+15],D=s[0],O=s[1],A=s[2],P=s[3];D=c(D,O,A,P,o,7,a[0]),P=c(P,D,O,A,h,12,a[1]),A=c(A,P,D,O,p,17,a[2]),O=c(O,A,P,D,d,22,a[3]),D=c(D,O,A,P,g,7,a[4]),P=c(P,D,O,A,m,12,a[5]),A=c(A,P,D,O,v,17,a[6]),O=c(O,A,P,D,_,22,a[7]),D=c(D,O,A,P,y,7,a[8]),P=c(P,D,O,A,b,12,a[9]),A=c(A,P,D,O,w,17,a[10]),O=c(O,A,P,D,S,22,a[11]),D=c(D,O,A,P,x,7,a[12]),P=c(P,D,O,A,T,12,a[13]),A=c(A,P,D,O,k,17,a[14]),D=u(D,O=c(O,A,P,D,E,22,a[15]),A,P,h,5,a[16]),P=u(P,D,O,A,v,9,a[17]),A=u(A,P,D,O,S,14,a[18]),O=u(O,A,P,D,o,20,a[19]),D=u(D,O,A,P,m,5,a[20]),P=u(P,D,O,A,w,9,a[21]),A=u(A,P,D,O,E,14,a[22]),O=u(O,A,P,D,g,20,a[23]),D=u(D,O,A,P,b,5,a[24]),P=u(P,D,O,A,k,9,a[25]),A=u(A,P,D,O,d,14,a[26]),O=u(O,A,P,D,y,20,a[27]),D=u(D,O,A,P,T,5,a[28]),P=u(P,D,O,A,p,9,a[29]),A=u(A,P,D,O,_,14,a[30]),D=l(D,O=u(O,A,P,D,x,20,a[31]),A,P,m,4,a[32]),P=l(P,D,O,A,y,11,a[33]),A=l(A,P,D,O,S,16,a[34]),O=l(O,A,P,D,k,23,a[35]),D=l(D,O,A,P,h,4,a[36]),P=l(P,D,O,A,g,11,a[37]),A=l(A,P,D,O,_,16,a[38]),O=l(O,A,P,D,w,23,a[39]),D=l(D,O,A,P,T,4,a[40]),P=l(P,D,O,A,o,11,a[41]),A=l(A,P,D,O,d,16,a[42]),O=l(O,A,P,D,v,23,a[43]),D=l(D,O,A,P,b,4,a[44]),P=l(P,D,O,A,x,11,a[45]),A=l(A,P,D,O,E,16,a[46]),D=f(D,O=l(O,A,P,D,p,23,a[47]),A,P,o,6,a[48]),P=f(P,D,O,A,_,10,a[49]),A=f(A,P,D,O,k,15,a[50]),O=f(O,A,P,D,m,21,a[51]),D=f(D,O,A,P,x,6,a[52]),P=f(P,D,O,A,d,10,a[53]),A=f(A,P,D,O,w,15,a[54]),O=f(O,A,P,D,h,21,a[55]),D=f(D,O,A,P,y,6,a[56]),P=f(P,D,O,A,E,10,a[57]),A=f(A,P,D,O,v,15,a[58]),O=f(O,A,P,D,T,21,a[59]),D=f(D,O,A,P,g,6,a[60]),P=f(P,D,O,A,S,10,a[61]),A=f(A,P,D,O,p,15,a[62]),O=f(O,A,P,D,b,21,a[63]),s[0]=s[0]+D|0,s[1]=s[1]+O|0,s[2]=s[2]+A|0,s[3]=s[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var s=e.floor(i/4294967296),o=i;r[15+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,h=a.words,c=0;c<4;c++){var u=h[c];h[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,r,i,n,s,o){var a=t+(e&r|~e&i)+n+o;return(a<<s|a>>>32-s)+e}function u(t,e,r,i,n,s,o){var a=t+(e&i|r&~i)+n+o;return(a<<s|a>>>32-s)+e}function l(t,e,r,i,n,s,o){var a=t+(e^r^i)+n+o;return(a<<s|a>>>32-s)+e}function f(t,e,r,i,n,s,o){var a=t+(r^(e|~i))+n+o;return(a<<s|a>>>32-s)+e}r.MD5=s._createHelper(h),r.HmacMD5=s._createHmacHelper(h)}(Math),t.MD5}(ye())}(De)),De.exports}var Ae,Pe={exports:{}},Ce={exports:{}};function Re(){return Ae||(Ae=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.WordArray,n=r.Hasher,s=e.algo,o=[],a=s.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],a=r[3],h=r[4],c=0;c<80;c++){if(c<16)o[c]=0|t[e+c];else{var u=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=u<<1|u>>>31}var l=(i<<5|i>>>27)+h+o[c];l+=c<20?1518500249+(n&s|~n&a):c<40?1859775393+(n^s^a):c<60?(n&s|n&a|s&a)-1894007588:(n^s^a)-899497514,h=a,a=s,s=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+h|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(a),e.HmacSHA1=n._createHmacHelper(a),t.SHA1;var e,r,i,n,s,o,a}(ye())}(Ce)),Ce.exports}var Ie,Be={exports:{}};var ze;function Ne(){return ze||(ze=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.Base,n=r.WordArray,s=e.algo,o=s.MD5,a=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,s=i.hasher.create(),o=n.create(),a=o.words,h=i.keySize,c=i.iterations;a.length<h;){r&&s.update(r),r=s.update(t).finalize(e),s.reset();for(var u=1;u<c;u++)r=s.finalize(r),s.reset();o.concat(r)}return o.sigBytes=4*h,o}}),e.EvpKDF=function(t,e,r){return a.create(r).compute(t,e)},t.EvpKDF;var e,r,i,n,s,o,a}(ye(),Re(),Ie||(Ie=1,function(t){t.exports=function(t){var e,r,i;r=(e=t).lib.Base,i=e.enc.Utf8,e.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var s=this._oKey=e.clone(),o=this._iKey=e.clone(),a=s.words,h=o.words,c=0;c<r;c++)a[c]^=1549556828,h[c]^=909522486;s.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}})}(ye())}(Be)))}(Pe)),Pe.exports}var Ue,je={exports:{}};var Le;var Me=(Le||(Le=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,i=e.algo,n=[],s=[],o=[],a=[],h=[],c=[],u=[],l=[],f=[],p=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,i=0;for(e=0;e<256;e++){var d=i^i<<1^i<<2^i<<3^i<<4;d=d>>>8^255&d^99,n[r]=d,s[d]=r;var g=t[r],m=t[g],v=t[m],_=257*t[d]^16843008*d;o[r]=_<<24|_>>>8,a[r]=_<<16|_>>>16,h[r]=_<<8|_>>>24,c[r]=_,_=16843009*v^65537*m^257*g^16843008*r,u[d]=_<<24|_>>>8,l[d]=_<<16|_>>>16,f[d]=_<<8|_>>>24,p[d]=_,r?(r=g^t[t[t[v^g]]],i^=t[t[i]]):r=i=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],g=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*((this._nRounds=r+6)+1),s=this._keySchedule=[],o=0;o<i;o++)o<r?s[o]=e[o]:(c=s[o-1],o%r?r>6&&o%r==4&&(c=n[c>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c]):(c=n[(c=c<<8|c>>>24)>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c],c^=d[o/r|0]<<24),s[o]=s[o-r]^c);for(var a=this._invKeySchedule=[],h=0;h<i;h++){if(o=i-h,h%4)var c=s[o];else c=s[o-4];a[h]=h<4||o<=4?c:u[n[c>>>24]]^l[n[c>>>16&255]]^f[n[c>>>8&255]]^p[n[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,a,h,c,n)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,u,l,f,p,s),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,s,o,a){for(var h=this._nRounds,c=t[e]^r[0],u=t[e+1]^r[1],l=t[e+2]^r[2],f=t[e+3]^r[3],p=4,d=1;d<h;d++){var g=i[c>>>24]^n[u>>>16&255]^s[l>>>8&255]^o[255&f]^r[p++],m=i[u>>>24]^n[l>>>16&255]^s[f>>>8&255]^o[255&c]^r[p++],v=i[l>>>24]^n[f>>>16&255]^s[c>>>8&255]^o[255&u]^r[p++],_=i[f>>>24]^n[c>>>16&255]^s[u>>>8&255]^o[255&l]^r[p++];c=g,u=m,l=v,f=_}g=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[p++],m=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^r[p++],v=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^r[p++],_=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^r[p++],t[e]=g,t[e+1]=m,t[e+2]=v,t[e+3]=_},keySize:8});e.AES=r._createHelper(g)}(),t.AES}(ye(),ke(),Oe(),Ne(),Ue||(Ue=1,function(t){t.exports=function(t){t.lib.Cipher||function(e){var r=t,i=r.lib,n=i.Base,s=i.WordArray,o=i.BufferedBlockAlgorithm,a=r.enc;a.Utf8;var h=a.Base64,c=r.algo.EvpKDF,u=i.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?y:v}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()});i.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},f=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),p=l.CBC=function(){var t=f.extend();function r(t,r,i){var n,s=this._iv;s?(n=s,this._iv=e):n=this._prevBlock;for(var o=0;o<i;o++)t[r+o]^=n[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize;r.call(this,t,e,n),i.encryptBlock(t,e),this._prevBlock=t.slice(e,e+n)}}),t.Decryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,s=t.slice(e,e+n);i.decryptBlock(t,e),r.call(this,t,e,n),this._prevBlock=s}}),t}(),d=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,i=r-t.sigBytes%r,n=i<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(n);var h=s.create(o,i);t.concat(h)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:d}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var g=i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),m=(r.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(e):e).toString(h)},parse:function(t){var e,r=h.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=s.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),g.create({ciphertext:r,salt:e})}},v=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),s=n.finalize(e),o=n.cfg;return g.create({ciphertext:s,key:r,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=(r.kdf={}).OpenSSL={execute:function(t,e,r,i,n){if(i||(i=s.random(8)),n)o=c.create({keySize:e+r,hasher:n}).compute(t,i);else var o=c.create({keySize:e+r}).compute(t,i);var a=s.create(o.words.slice(e),4*r);return o.sigBytes=4*e,g.create({key:o,iv:a,salt:i})}},y=i.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:_}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize,i.salt,i.hasher);i.iv=n.iv;var s=v.encrypt.call(this,t,e,n.key,i);return s.mixIn(n),s},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt,i.hasher);return i.iv=n.iv,v.decrypt.call(this,t,e,n.key,i)}})}()}(ye(),Ne())}(je)))}(xe)),xe.exports),Ve=x(Me),qe="funsdata",He={_name:qe,appId:"",persistence:"localStorage",persistencePrefix:"FunsDataJSSDK",persistenceEnabled:!0,crossSubDomain:!0,maxReferrerStringLength:200,showLog:!0,dataSendTimeout:3e3,useAppTrack:!1,strict:!1,tryCount:3,enableCalibrationTime:!1},Fe=function(t){this._state={},this.crossSubDomain=t.crossSubDomain,this.enabled=t.persistenceEnabled;var e=null;if(this.enabled){if(!1===t.crossSubDomain){var r=_.url("sub",location.href);this.name="string"==typeof r&&""!==r?t.persistencePrefix+"_"+r:t.persistencePrefix+"_root"}else this.name=t.persistencePrefix+"_cross";var i=t.persistence;"cookie"!==i&&"localStorage"!==i&&(y.i("Unknown persistence type "+i+"; falling back to cookie"),i=t.persistence="cookie"),"localStorage"===i&&_.localStorage.isSupported()?(this.storage=_.localStorage,(e=_.cookie.get(this.name))&&_.cookie.remove(this.name,this.crossSubDomain)):(y.i("localStorage is not support by the browser; falling back to cookie"),this.storage=_.cookie)}if(this._load(e),!this.getDistinctId()){var n=t.uuid?t.uuid:_.UUID();this._setDeviceId(n),this.setDistinctId(n)}};Fe.prototype._load=function(t){var e;this.enabled&&(null!==(e=null!==t?t:this.storage.get(this.name))&&_.check.isJSONString(e)&&(this._state=_.extend({},JSON.parse(e))),null!==t&&this._save())},Fe.prototype.getDistinctId=function(){return this._state.distinct_id},Fe.prototype.setDistinctId=function(t){this._set("distinct_id",t)},Fe.prototype.setEnableTracking=function(t){this._set("enable_tracking",t)},Fe.prototype.getEnableTracking=function(){return!!_.check.isUndefined(this._state.enable_tracking)||this._state.enable_tracking},Fe.prototype.clear=function(){this._state={},this._save()},Fe.prototype.setOptTracking=function(t){this._set("opt_tracking",t)},Fe.prototype.getOptTracking=function(){return!!_.check.isUndefined(this._state.opt_tracking)||this._state.opt_tracking},Fe.prototype.getAccountId=function(){return this._state.account_id},Fe.prototype.setAccountId=function(t){this._set("account_id",t)},Fe.prototype.getDeviceId=function(){return this._state.device_id},Fe.prototype.setSuperProperties=function(t){this._set("super_properties",t)},Fe.prototype.getSuperProperties=function(){return this._state.super_properties||{}},Fe.prototype.setEventTimer=function(t,e){var r=this._state.event_timers||{};r[t]=e,this._set("event_timers",r)},Fe.prototype.clearEventTimer=function(){this._set("event_timers",{})},Fe.prototype.removeEventTimer=function(t){var e=(this._state.event_timers||{})[t];return _.check.isUndefined(e)||(delete this._state.event_timers[t],this._save()),e},Fe.prototype._setDeviceId=function(t){this._state.device_id?y.w("Current device_id is ",this.getDeviceId(),", it couldn't been set to: ",t):this._set("device_id",t)},Fe.prototype._save=function(){this.enabled&&this.storage.set(this.name,JSON.stringify(this._state),73e3,this.crossSubDomain)},Fe.prototype._set=function(t,e){this._state=this._state||{},this._state[t]=e,this._save()};var Ke=function(){};Ke.prototype.trackLink=function(t,e,r){var i=this;if(this._isCollectData()){var n=this._getConfig("strict");if(w.properties(r)||!n){if(t&&_.check.isObject(t)){var s=[];_.each(t,function(t,e){t&&_.check.isArray(t)&&_.each(t,function(t){switch(e){case"tag":_.each(document.getElementsByTagName(t),function(t){s.indexOf(t)<0&&s.push(t)});break;case"class":_.each(document.getElementsByClassName(t),function(t){s.indexOf(t)<0&&s.push(t)});break;case"id":var r=document.getElementById(t);null!==r&&s.indexOf(r)<0&&s.push(r)}})}),_.each(s,function(t){if(null!==t){var s=_.extend({},_.info.pageProperties(),r);s["#element_type"]=t.nodeName.toLowerCase(),_.check.isUndefined(s.name)&&(s.name=t.getAttribute("td-name")||t.innerHTML||t.value||"Unable to get Identify"),t.addEventListener("click",function(){i._sendRequest({type:"track",event:e,properties:n?w.stripProperties(s):s})})}})}}else y.w("trackLink failed due to invalid properties.")}},Ke.prototype.setPageProperty=function(t){this._isCollectData()&&(w.properties(t)||!this._getConfig("strict")?_.extend(this.currentProps,t):y.w("Page property setting error"))},Ke.prototype.getPageProperty=function(){return this.currentProps},Ke.prototype.getPresetProperties=function(){var t=_.info.properties(),e={};e.os=t["#os"],e.screenWidth=t["#screen_width"],e.screenHeight=t["#screen_height"],e.browser=t["#browser"],e.browserVersion=t["#browser_version"],e.deviceId=this.getDeviceId();var r=0-(new Date).getTimezoneOffset()/60;return this._getConfig("zoneOffset")&&(r=this._getConfig("zoneOffset")),e.zoneOffset=r,e.toEventPresetProperties=function(){return{"#os":e.os,"#screen_width":e.screenWidth,"#screen_height":e.screenHeight,"#browser":e.browser,"#browser_version":e.browserVersion,"#device_id":e.deviceId,"#zone_offset":e.zoneOffset}},e},Ke.prototype.login=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),w.userId(t)||!this._getConfig("strict")?t!==this.persistence.getAccountId()&&this.persistence.setAccountId(t):y.e("The parameters of the login API must be strings"))},Ke.prototype.logout=function(t){if(this._isCollectData()){if(!0===t){var e=_.UUID();this.persistence.setDistinctId(e)}this.persistence.setAccountId("")}},Ke.prototype.userSet=function(t,e){this._isCollectData()&&(!w.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_set",properties:t},e))},Ke.prototype.userSetOnce=function(t,e){this._isCollectData()&&(!w.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_setOnce",properties:t},e))},Ke.prototype.userUnset=function(t,e){if(this._isCollectData()&&(w.propertyName(t)||!this._getConfig("strict"))){var r={};r[t]=0,this._sendRequest({type:"user_unset",properties:r},e)}},Ke.prototype.userAdd=function(t,e){if(this._isCollectData()){if(_.check.isString(t)){var r=t;(t={})[r]=1}w.propertiesMust(t)&&(!function(t){for(var e in t)if(!/-*\d+/.test(String(t[e])))return!1;return!0}(t)&&this._getConfig("strict")?y.w("The property value of useradd api must be a number"):this._sendRequest({type:"user_add",properties:t},e))}},Ke.prototype.userAppend=function(t,e){this._isCollectData()&&(w.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_append",properties:t},e):y.w("The value in the userAppend property can only be Array"))},Ke.prototype.userUniqAppend=function(t,e){this._isCollectData()&&(w.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_uniq_append",properties:t},e):y.w("The value in the userUniqAppend property can only be Array"))},Ke.prototype.flush=function(){this.batchConsumer&&!this._isDebug()&&this.batchConsumer.flush()},Ke.prototype.userDel=function(t){this._isCollectData()&&this._sendRequest({type:"user_del"},t)},Ke.prototype._sendRequest=function(t,e,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=_.check.isUndefined(t.time)||!_.check.isDate(t.time)?new Date:t.time,o={data:[{"#type":t.type,"#time":_.formatDate(_.formatTimeZone(n,this._getConfig("zoneOffset"))),"#distinct_id":this.persistence.getDistinctId()}]};this.persistence.getAccountId()&&(o.data[0]["#account_id"]=this.persistence.getAccountId());var h=0-n.getTimezoneOffset()/60;if(o.automaticData=_.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":h},_.info.properties()),"track"===t.type||"track_update"===t.type||"track_overwrite"===t.type){o.data[0]["#event_name"]=t.event,"track_update"===t.type||"track_overwrite"===t.type?o.data[0]["#event_id"]=t.extraId:t.firstCheckId&&(o.data[0]["#first_check_id"]=t.firstCheckId),o.data[0].properties=_.extend({},_.normalizeTopLevelKeys(s(s(s({},this.getSuperProperties()),this.dynamicProperties?this.dynamicProperties():{}),this.getPageProperty())));var c=this.persistence.removeEventTimer(t.event);if(!_.check.isUndefined(c)){var u=(new Date).getTime()-c,l=parseFloat((u/1e3).toFixed(3));l>86400&&(l=86400),o.data[0].properties["#duration"]=l}}else o.data[0].properties={};if(_.check.isObject(t.properties)&&!_.check.isEmptyObject(t.properties)&&_.extend(o.data[0].properties,_.normalizeTopLevelKeys(t.properties,!0)),_.searchObjDate(o.data[0],this._getConfig("zoneOffset")),o.data[0]=_.generateEncryptyData(o.data[0],this._getConfig("secretKey")),o["#app_id"]=this._getConfig("appId"),o["#flush_time"]=_.formatTimeZone(new Date,this._getConfig("zoneOffset")).getTime(),y.i(o),this._getConfig("useAppTrack")){var f=window.FunsData_APP_JS_Bridge||{};if("object"===a(f)&&f.funsdata_track)return f.funsdata_track(JSON.stringify(o)),void("function"==typeof e&&e());if(/td-sdk-ios/.test(navigator.userAgent)&&!window.MSStream){var p=document.createElement("iframe");return p.setAttribute("src","funsanalytics://trackEvent?event="+_.encodeURIComponent(JSON.stringify(o))),document.documentElement.appendChild(p),p.parentNode.removeChild(p),p=null,void("function"==typeof e&&e())}}o.data[0]["#uuid"]=_.UUIDv4();var d=JSON.stringify(o),g=this;if(this._isEncrypt()&&g.crypto){var m=Math.round(1e16*Math.random())+"",v=[];o.data.forEach(function(t){v.push({ekey:g._encryptPass(m,g.crypto.pub_key),pkv:g.crypto.version,payload:g._encryptInfo(JSON.stringify(t),m)})}),o.data=v,o.client="js"}return new Je(JSON.stringify(o),this._getConfig("serverUrl"),this._getConfig("tryCount"),e,this._isDebug(),i).run(d)};function Ze(t){this.config=t,this.timer=null,this.batchConfig=_.extend({size:5,interval:5e3,storageLimit:200},this.config.batch),this.batchConfig.size<1&&(this.batchConfig.size=1),this.batchConfig.size>30&&(this.batchConfig.size=30),this.prefix=this.config.persistencePrefix,this.tabKey=this.prefix+"tab_"+this.config.appId,this.storageLimit=this.batchConfig.storageLimit}Ze.prototype={batchInterval:function(){var t=this;t.timer=setTimeout(function(){t.recycle(),t.send(),clearTimeout(t.timer),t.batchInterval()},this.batchConfig.interval)},add:function(t){var e=t,r=this.prefix+"ta_"+this.config.appId+"_"+String(_.getRandom()),i=_.localStorage.get(this.tabKey);if((i=null===i?[]:_.safeJSONParse(i)||[]).length<=this.storageLimit)i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);else{var n=i.splice(0,20);i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);for(var s={},o=[],a=0;a<n.length;a++){var h=_.readObjectVal(n[a]);_.hasEncrypty(h)||(h=_.generateEncryptyData(h,this.config.secretKey)),o.push(h)}s.data=o,s["#app_id"]=this.config.appId,s["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(s,n)}},flush:function(){clearTimeout(this.timer),this.send(),this.batchInterval()},send:function(){var t=_.localStorage.get(this.tabKey);if(t&&(t=_.safeJSONParse(t)||[]).length){for(var e={},r=[],i=[],n=t.length<this.batchConfig.size?t.length:this.batchConfig.size,s=0;s<n;s++){var o=_.readObjectVal(t[s]);_.hasEncrypty(o)||(o=_.generateEncryptyData(o,this.config.secretKey)),r.push(o),i.push(t[s])}e.data=r,e["#app_id"]=this.config.appId,e["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(e,i)}},request:function(t,e){var r=this;y.i("flush data"),y.i(t);var i=JSON.stringify(t),n=_.base64Encode(i),s="crc="+_.hashCode(n);_.encodeURIComponent(n),_.encodeURIComponent(s),new Je(i,this.config.serverUrl,this.config.tryCount,function(){r.remove(e)},!1).run()},remove:function(t){var e=_.localStorage.get(this.tabKey);if(e){for(var r=_.safeJSONParse(e)||[],i=0;i<t.length;i++){var n=_.indexOf(r,t[i]);n>-1&&r.splice(n,1),_.localStorage.remove(t[i])}_.localStorage.set(this.tabKey,JSON.stringify(r))}},recycle:function(){var t=_.localStorage.get(this.tabKey);if(t&&0===(t=_.safeJSONParse(t)||[]).length){for(var e=0;e<localStorage.length;e++){var r=localStorage.key(e);0===r.indexOf(this.prefix+"ta_"+this.config.appId)&&t.push(r)}t.length>0&&_.localStorage.set(this.tabKey,JSON.stringify(t))}}};var Je=function(){return r(function e(r,i,n,s,o){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];t(this,e),this.data=r,this.serverUrl=i,this.tryCount=n||3,this.callback=s,this.isDebug=o,this.ifSend=a},[{key:"run",value:function(t){var e=null;e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var r=this;return e.open("post",this.serverUrl,!0),e.setRequestHeader("Content-type",r.isDebug?"application/json;charset=UTF-8":"application/gzip"),e.onreadystatechange=function(){if(4===e.readyState)if(e.status>=200&&e.status<300||304===e.status){if(r.callback&&r.callback(),r.isDebug){var t=JSON.parse(e.response);0!==t.errorLevel?y.w(t):y.i(t)}}else r.onFailed()},r.ifSend&&(r.isDebug?e.send(r.data):e.send(W.gzip(r.data,{to:"string"}))),r.ifSend?new Promise(function(r,i){e.onload=function(){4===e.readyState&&(200===e.status?r({res:e.responseText,req:t}):i(e))},e.onerror=function(){i(e)}}):t}},{key:"onFailed",value:function(){--this.tryCount>0&&this.run()}}])}();Ke.prototype._isDebug=function(){return"debug"===this._getConfig("mode")||"debug_only"===this._getConfig("mode")},Ke.prototype._isEncrypt=function(){return!0===this._getConfig("encrypt")},Ke.prototype._setEncrypt=function(){var t=this,e=new XMLHttpRequest;e.open("get","https://deapi.funsdata.com/v1/settings",!0),e.send(),e.onload=function(){4===e.readyState&&(200===e.status?t.crypto=JSON.parse(e.responseText).data.crypto:console.error("公钥拉取失败!"))}},Ke.prototype._encryptInfo=function(t,e){var r=Se.parse(e),i=Se.parse(t);return Ve.encrypt(i,r,{iv:r}).toString()},Ke.prototype._encryptPass=function(t,e){var r=new ge;return r.setPublicKey(e),r.encrypt(t)},Ke.prototype.startHeartbeat=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=this;if(e.heartbeatInterval)console.warn("已设置心跳");else{var r={interval:t};e.heartbeatInterval=setInterval(function(){if("visible"===document.visibilityState)if(e.heartbeatProps){var t=s(s({},r),e.heartbeatProps);e.track("Heartbeat",t)}else e.track("Heartbeat",r)},t)}},Ke.prototype.clearHeartbeat=function(){var t=this;t.heartbeatInterval?(clearInterval(t.heartbeatInterval),t.removeHeartbeatProps(),t.heartbeatInterval=void 0):console.warn("未设置心跳")},Ke.prototype.setHeartbeatProps=function(t){if(t)if("object"!==a(t)||Array.isArray(t))console.warn("心跳上报参数不符合规范");else{var e=this;e.heartbeatProps||(e.heartbeatProps={}),e.heartbeatProps=s(s({},e.heartbeatProps),t)}},Ke.prototype.removeHeartbeatProps=function(t){var e=this;t?"string"==typeof t?e.heartbeatProps[t]&&delete e.heartbeatProps[t]:Array.isArray(t)?t.forEach(function(t){e.heartbeatProps[t]&&delete e.heartbeatProps[t]}):console.warn("删除心跳参数不符合规范"):e.heartbeatProps={}},Ke.prototype._sendRequestWithImage=function(t,e){function r(t){t&&!t.hasCalled&&(t.hasCalled=!0,t.callback&&t.callback())}var i=(-1!==this._getConfig("serverUrl").indexOf("?")?this._getConfig("serverUrl"):this._getConfig("serverUrl")+"?")+t,n=document.createElement("img");n.callback=e,setTimeout(r,this._getConfig("dataSendTimeout"),n),n.onload=function(){this.onload=null,r(this)},n.onerror=function(){this.onerror=null,r(this)},n.onabort=function(){this.onabort=null,r(this)},n.src=i},Ke.prototype.track=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||w.event(t)&&w.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i):void 0},Ke.prototype.getTrackData=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||w.event(t)&&w.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i,void 0,!1):void 0},Ke.prototype.trackUpdate=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_update",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):y.e("The parameter of updateble event does not meet the requirements"))},Ke.prototype.trackOverwrite=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_overwrite",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):y.e("The parameter of overwritable event does not meet the requirements"))},Ke.prototype.trackFirstEvent=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t.eventName,time:t.eventTime,properties:t.properties,firstCheckId:t.firstCheckId?t.firstCheckId:this.getDeviceId()},t.callback):y.e("The parameter of first event does not meet the requirements"))},Ke.prototype.trackWithBeacon=function(t,e,r,i){"ta_page_hide"!==t?(w.event(t)&&w.properties(e)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0):this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0)},Ke.prototype.identify=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),w.userId(t)||!this._getConfig("strict")?t!==this.persistence.getDistinctId()&&this.persistence.setDistinctId(t):y.e("The parameter of identify API requires a string"))},Ke.prototype.getDistinctId=function(){return this.persistence.getDistinctId()},Ke.prototype.getDeviceId=function(){return this.persistence.getDeviceId()},Ke.prototype._isCollectData=function(){return this.persistence.getOptTracking()&&this.persistence.getEnableTracking()},Ke.prototype.setSuperProperties=function(t){this._isCollectData()&&(w.propertiesMust(t)||!this._getConfig("strict")?this.persistence.setSuperProperties(_.extend({},this.getSuperProperties(),t)):y.w("The paramater of setSuperProperties API requires object"))},Ke.prototype.getSuperProperties=function(){return this.persistence.getSuperProperties()},Ke.prototype.clearSuperProperties=function(){this._isCollectData()&&this.persistence.setSuperProperties({})},Ke.prototype.unsetSuperProperty=function(t){if(this._isCollectData()&&_.check.isString(t)){var e=this.getSuperProperties();delete e[t],this.persistence.setSuperProperties(e)}},Ke.prototype.setDynamicSuperProperties=function(t){this._isCollectData()&&("function"==typeof t?w.properties(t())||!this._getConfig("strict")?this.dynamicProperties=t:y.w("The return value of dynamic properties requires an object"):y.w("The paramater of setDynamicSuperProperties API requires function type"))},Ke.prototype.timeEvent=function(t){this._isCollectData()&&(_.check.isUndefined(t)?y.w("No event name provided to timeEvent"):this.persistence.setEventTimer(t,(new Date).getTime()))},Ke.prototype.quick=function(t,e){if(this._isCollectData())if("string"==typeof t&&"autoTrack"===t){var r={};w.properties(e)&&_.extend(r,e),this._sendRequest({type:"track",event:"ta_pageview",properties:_.extend(r,_.info.pageProperties())})}else"string"==typeof t&&"siteLinker"===t?We.init(this,e):y.w("The quick method does not support the parameter of"+t)},Ke.prototype._setConfig=function(t){_.check.isObject(t)&&(_.extend(this.config,t),this._getConfig("persistencePrefix")||(this.config.persistencePrefix=this.config.cookiePrefix),this.persistence)},Ke.prototype._getConfig=function(t){return this.config[t]},Ke.prototype.init=function(t){if(_.check.isUndefined(this.config)){this.version=c,this.config={},this.currentProps=this.currentProps||{},this._setConfig(_.extend({},He,t)),this.persistence=new Fe(this.config);var e=this._getConfig("appId");_.check.isUndefined(e)||this._setConfig({appId:e.replace(/\s*/g,"")}),y.showLog=this._getConfig("showLog"),this._isDebug()?this._setConfig({serverUrl:t.serverUrl+"/json"}):this._setConfig({serverUrl:t.serverUrl}),this._isEncrypt()&&this._setEncrypt(),void 0!==this._getConfig("batch")&&!1!==this._getConfig("batch")&&_.localStorage.isSupported()&&(this.batchConsumer=new Ze(this.config),this.batchConsumer.batchInterval()),new $e(this,this._getConfig("autoTrack")).start();var r="normal";this.config.mode&&(r=this.config.mode),y.i("DataEye Analytics SDK initialized successfully with mode: "+r+", APP ID : "+this.config.appId+", server url: "+this.config.serverUrl+", libversion: "+c)}else y.i("The FunsData libraray has been initialized.")};var $e=function(){return r(function e(r,i){t(this,e),this.taLib=r,"Object"===_.paramType(i)&&"Boolean"===_.paramType(i.pageShow)?this.autoPageShow=i.pageShow:this.autoPageShow=!1,"Object"===_.paramType(i)&&"Boolean"===_.paramType(i.pageHide)?this.autoPageHide=i.pageHide:this.autoPageHide=!1},[{key:"start",value:function(){var t=this;t.trackPageShowEvent(),"onvisibilitychange"in document&&_.addEvent(document,"visibilitychange",function(){document.hidden?t.trackPageHideEvent():t.trackPageShowEvent()})}},{key:"trackPageShowEvent",value:function(){this.autoPageShow&&this.taLib.track("ta_page_show",_.info.pageProperties()),this.taLib.timeEvent("ta_page_hide")}},{key:"trackPageHideEvent",value:function(){this.autoPageHide&&this.taLib.trackWithBeacon("ta_page_hide",_.info.pageProperties())}},{key:"trackPageHideEventOnClose",value:function(){this.autoPageHide&&this.isPageShow&&this.taLib.trackWithBeacon("ta_page_hide",_.info.pageProperties())}}])}();Ke.prototype.initInstance=function(t,e){if(!_.check.isString(t)||!_.check.isUndefined(e)&&!_.check.isObject(e))return y.w("invalid parameter of initInstance(string, object)."),null;if(this._getConfig("_name")!==qe)return y.w("This function is allowed for master instance only"),null;if(t===qe||this[t])return y.w("The name ",t," couldn't be used for create new instance."),null;_.check.isUndefined(e)&&(e={});var r=new Ke,i=_.extend({},this.config,{_name:t,persistenceEnabled:!1,uuid:this.getDeviceId()},e);i.persistenceEnabled&&(i.persistencePrefix=i.persistencePrefix+"_"+t),r.init(i),this[t]=r},Ke.prototype.enableTracking=function(t){"boolean"==typeof t&&this.persistence.setEnableTracking(t)},Ke.prototype.optOutTracking=function(){this.persistence.setSuperProperties({}),this.persistence.setAccountId(""),this.persistence.clearEventTimer(),this.persistence.setOptTracking(!1)},Ke.prototype.optInTracking=function(){this.persistence.setOptTracking(!0)},Ke.prototype.setTrackStatus=function(t){if(_.check.isObject(t)){var e=t.status;y.i("swtich track status : "+e),"pause"===e?this.enableTracking(!1):"stop"===e?this.optOutTracking():"normal"===e&&(this.enableTracking(!0),this.optInTracking())}};var We={};return We.getPartUrl=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return!0;return!1},We.getPartHash=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return this.option[r].after_hash;return!1},We.getCurrenId=function(){var t=this.ta.getDistinctId();return encodeURIComponent("d"+t)},We.rewriteUrl=function(t,e){var r=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t),i="";if(r){var n,s=r[1]||"",o=r[2]||"",a=r[3]||"";if(this.getPartHash(t))n=a.indexOf("_tasdk"),i=a.indexOf("?")>-1?n>-1?s+o+"#"+a.substring(1,n)+"_tasdk="+this.getCurrenId():s+o+"#"+a.substring(1)+"&_tasdk="+this.getCurrenId():s+o+"#"+a.substring(1)+"?_tasdk="+this.getCurrenId();else n=o.indexOf("_tasdk"),i=/^\?(\w)+/.test(o)?n>-1?s+"?"+o.substring(1,n)+"_tasdk="+this.getCurrenId()+a:s+"?"+o.substring(1)+"&_tasdk="+this.getCurrenId()+a:s+"?"+o.substring(1)+"_tasdk="+this.getCurrenId()+a;return e&&(e.href=i),i}},We.addClickListen=function(){var t=this,e=function(e){var r,i,n=e.target,s=n.tagName.toLowerCase(),o=n.parentNode;if("a"===s&&n.href||o&&o.tagName&&"a"===o.tagName.toLowerCase()&&o.href){"a"===s&&n.href?(r=n.href,i=n):(r=o.href,i=o);var a=_.URL(r).protocol;"http:"!==a&&"https:"!==a||t.getPartUrl(r)&&t.rewriteUrl(r,i)}};_.addSiteEvent(document,"mousedown",e),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&_.addSiteEvent(document,"pointerdown",e)},We.getUrlId=function(){var t=location.href.match(/_tasdk=([aufd][^\?\#\&\=]+)/);return _.check.isArray(t)&&t[1]?decodeURIComponent(t[1]):""},We.setRefferId=function(){var t=this.ta.getDistinctId(),e=this.getUrlId();if(""===e)return!1;var r="d"===e.substring(0,1);if((e=e.substring(1))===t)return!1;e&&r&&this.ta.identify(e)},We.init=function(t,e){this.isInited||(this.isInited=!0,this.ta=t,this.setRefferId(),_.check.isObject(e)&&_.check.isArray(e.linker)&&e.linker.length>0&&(this.addClickListen(),this.option=e.linker,this.option=function(t){for(var e=t.length,r=[],i=0;i<e;i++)/[A-Za-z0-9]+\./.test(t[i].part_url)&&"[object Boolean]"===Object.prototype.toString.call(t[i].after_hash)?r.push(t[i]):y.w("The configuration of linker "+(i+1)+" is not supported.Please check format");return r}(this.option)))},new Ke});
15
+ */
16
+ var Wt={};void 0!==Wt.asn1&&Wt.asn1||(Wt.asn1={}),Wt.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substr(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",n=0;n<r;n++)i+="f";e=new wt(i,16).xor(t).add(wt.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=Wt.asn1,r=e.DERBoolean,i=e.DERInteger,n=e.DERBitString,s=e.DEROctetString,o=e.DERNull,a=e.DERObjectIdentifier,h=e.DEREnumerated,c=e.DERUTF8String,u=e.DERNumericString,l=e.DERPrintableString,f=e.DERTeletexString,p=e.DERIA5String,d=e.DERUTCTime,g=e.DERGeneralizedTime,m=e.DERSequence,v=e.DERSet,_=e.DERTaggedObject,y=e.ASN1Util.newObject,b=Object.keys(t);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(t[w]);if("int"==w)return new i(t[w]);if("bitstr"==w)return new n(t[w]);if("octstr"==w)return new s(t[w]);if("null"==w)return new o(t[w]);if("oid"==w)return new a(t[w]);if("enum"==w)return new h(t[w]);if("utf8str"==w)return new c(t[w]);if("numstr"==w)return new u(t[w]);if("prnstr"==w)return new l(t[w]);if("telstr"==w)return new f(t[w]);if("ia5str"==w)return new p(t[w]);if("utctime"==w)return new d(t[w]);if("gentime"==w)return new g(t[w]);if("seq"==w){for(var S=t[w],x=[],T=0;T<S.length;T++){var k=y(S[T]);x.push(k)}return new m({array:x})}if("set"==w){for(S=t[w],x=[],T=0;T<S.length;T++){k=y(S[T]);x.push(k)}return new v({array:x})}if("tag"==w){var E=t[w];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var D=y(E[2]);return new _({tag:E[0],explicit:E[1],obj:D})}var O={};if(void 0!==E.explicit&&(O.explicit=E.explicit),void 0!==E.tag&&(O.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return O.obj=y(E.obj),new _(O)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},Wt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",r=parseInt(t.substr(0,2),16),i=(e=Math.floor(r/40)+"."+r%40,""),n=2;n<t.length;n+=2){var s=("00000000"+parseInt(t.substr(n,2),16).toString(2)).slice(-8);if(i+=s.substr(1,7),"0"==s.substr(0,1))e=e+"."+new wt(i,2).toString(10),i=""}return e},Wt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new wt(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substr(o,7);o!=i.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);return i},Wt.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var r=e.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},Wt.asn1.DERAbstractString=function(t){Wt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},Jt.lang.extend(Wt.asn1.DERAbstractString,Wt.asn1.ASN1Object),Wt.asn1.DERAbstractTime=function(t){Wt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,r){var i=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=s+i(String(n.getMonth()+1),2)+i(String(n.getDate()),2)+i(String(n.getHours()),2)+i(String(n.getMinutes()),2)+i(String(n.getSeconds()),2);if(!0===r){var a=n.getMilliseconds();if(0!=a){var h=i(String(a),3);o=o+"."+(h=h.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,r,i,n,s){var o=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},Jt.lang.extend(Wt.asn1.DERAbstractTime,Wt.asn1.ASN1Object),Wt.asn1.DERAbstractStructured=function(t){Wt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},Jt.lang.extend(Wt.asn1.DERAbstractStructured,Wt.asn1.ASN1Object),Wt.asn1.DERBoolean=function(){Wt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Jt.lang.extend(Wt.asn1.DERBoolean,Wt.asn1.ASN1Object),Wt.asn1.DERInteger=function(t){Wt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Wt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new wt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},Jt.lang.extend(Wt.asn1.DERInteger,Wt.asn1.ASN1Object),Wt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=Wt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}Wt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var r="0"+t;this.hTLV=null,this.isModified=!0,this.hV=r+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var r=0;r<=e;r++)t+="0";var i="";for(r=0;r<t.length-1;r+=8){var n=t.substr(r,8),s=parseInt(n,2).toString(16);1==s.length&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",r=0;r<t.length;r++)1==t[r]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},Jt.lang.extend(Wt.asn1.DERBitString,Wt.asn1.ASN1Object),Wt.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=Wt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}Wt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},Jt.lang.extend(Wt.asn1.DEROctetString,Wt.asn1.DERAbstractString),Wt.asn1.DERNull=function(){Wt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Jt.lang.extend(Wt.asn1.DERNull,Wt.asn1.ASN1Object),Wt.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new wt(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substr(o,7);o!=i.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};Wt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(t){var e=Wt.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},Jt.lang.extend(Wt.asn1.DERObjectIdentifier,Wt.asn1.ASN1Object),Wt.asn1.DEREnumerated=function(t){Wt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Wt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new wt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},Jt.lang.extend(Wt.asn1.DEREnumerated,Wt.asn1.ASN1Object),Wt.asn1.DERUTF8String=function(t){Wt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},Jt.lang.extend(Wt.asn1.DERUTF8String,Wt.asn1.DERAbstractString),Wt.asn1.DERNumericString=function(t){Wt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},Jt.lang.extend(Wt.asn1.DERNumericString,Wt.asn1.DERAbstractString),Wt.asn1.DERPrintableString=function(t){Wt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},Jt.lang.extend(Wt.asn1.DERPrintableString,Wt.asn1.DERAbstractString),Wt.asn1.DERTeletexString=function(t){Wt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},Jt.lang.extend(Wt.asn1.DERTeletexString,Wt.asn1.DERAbstractString),Wt.asn1.DERIA5String=function(t){Wt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},Jt.lang.extend(Wt.asn1.DERIA5String,Wt.asn1.DERAbstractString),Wt.asn1.DERUTCTime=function(t){Wt.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},Jt.lang.extend(Wt.asn1.DERUTCTime,Wt.asn1.DERAbstractTime),Wt.asn1.DERGeneralizedTime=function(t){Wt.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},Jt.lang.extend(Wt.asn1.DERGeneralizedTime,Wt.asn1.DERAbstractTime),Wt.asn1.DERSequence=function(t){Wt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},Jt.lang.extend(Wt.asn1.DERSequence,Wt.asn1.DERAbstractStructured),Wt.asn1.DERSet=function(t){Wt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},Jt.lang.extend(Wt.asn1.DERSet,Wt.asn1.DERAbstractStructured),Wt.asn1.DERTaggedObject=function(t){Wt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},Jt.lang.extend(Wt.asn1.DERTaggedObject,Wt.asn1.ASN1Object);var $t,Xt,Gt=($t=function(t,e){return $t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},$t(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}$t(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Yt=function(t){function e(r){var i=t.call(this)||this;return r&&("string"==typeof r?i.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&i.parsePropertiesFrom(r)),i}return Gt(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?ht(t):ct.unarmor(t),n=vt.decode(i);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=Dt(e,16),r=n.sub[2].getHexStringValue(),this.e=parseInt(r,16);var s=n.sub[3].getHexStringValue();this.d=Dt(s,16);var o=n.sub[4].getHexStringValue();this.p=Dt(o,16);var a=n.sub[5].getHexStringValue();this.q=Dt(a,16);var h=n.sub[6].getHexStringValue();this.dmp1=Dt(h,16);var c=n.sub[7].getHexStringValue();this.dmq1=Dt(c,16);var u=n.sub[8].getHexStringValue();this.coeff=Dt(u,16)}else{if(2!==n.sub.length)return!1;if(n.sub[0].sub){var l=n.sub[1].sub[0];e=l.sub[0].getHexStringValue(),this.n=Dt(e,16),r=l.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else e=n.sub[0].getHexStringValue(),this.n=Dt(e,16),r=n.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new Wt.asn1.DERInteger({int:0}),new Wt.asn1.DERInteger({bigint:this.n}),new Wt.asn1.DERInteger({int:this.e}),new Wt.asn1.DERInteger({bigint:this.d}),new Wt.asn1.DERInteger({bigint:this.p}),new Wt.asn1.DERInteger({bigint:this.q}),new Wt.asn1.DERInteger({bigint:this.dmp1}),new Wt.asn1.DERInteger({bigint:this.dmq1}),new Wt.asn1.DERInteger({bigint:this.coeff})]};return new Wt.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return st(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new Wt.asn1.DERSequence({array:[new Wt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new Wt.asn1.DERNull]}),e=new Wt.asn1.DERSequence({array:[new Wt.asn1.DERInteger({bigint:this.n}),new Wt.asn1.DERInteger({int:this.e})]}),r=new Wt.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new Wt.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return st(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var r="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(Kt),Qt="undefined"!=typeof process?null===(Xt=process.env)||void 0===Xt?void 0:Xt.npm_package_version:void 0,te=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Yt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(ot(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return st(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,r){try{return st(this.getKey().sign(t,e,r))}catch(t){return!1}},t.prototype.verify=function(t,e,r){try{return this.getKey().verify(t,ot(e),r)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new Yt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=Qt,t}(),ee={exports:{}};var re,ie={exports:{}};function ne(){return re||(re=1,function(t){t.exports=function(){var t=t||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==S&&S.crypto&&(r=S.crypto),!r)try{r=require("crypto")}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},o=s.lib={},a=o.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=o.WordArray=a.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var s=0;s<n;s++){var o=r[s>>>2]>>>24-s%4*8&255;e[i+s>>>2]|=o<<24-(i+s)%4*8}else for(var a=0;a<n;a+=4)e[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new h.init(e,t)}}),c=s.enc={},u=c.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push((s>>>4).toString(16)),i.push((15&s).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new h.init(r,e/2)}},l=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new h.init(r,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},p=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,s=i.sigBytes,o=this.blockSize,a=s/(4*o),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,u=t.min(4*c,s);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(n,l);r=n.splice(0,c),i.sigBytes-=u}return new h.init(r,u)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});o.Hasher=p.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new d.HMAC.init(t,r).finalize(e)}}});var d=s.algo={};return s}(Math);return t}()}(ie)),ie.exports}var se;var oe,ae=x((se||(se=1,function(t){t.exports=function(t){return t.enc.Utf8}(ne())}(ee)),ee.exports)),he={exports:{}},ce={exports:{}};function ue(){return oe||(oe=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function i(t,e,i){for(var n=[],s=0,o=0;o<e;o++)if(o%4){var a=i[t.charCodeAt(o-1)]<<o%4*2|i[t.charCodeAt(o)]>>>6-o%4*2;n[s>>>2]|=a<<24-s%4*8,s++}return r.create(n,s)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],s=0;s<r;s+=3)for(var o=(e[s>>>2]>>>24-s%4*8&255)<<16|(e[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|e[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<r;a++)n.push(i.charAt(o>>>6*(3-a)&63));var h=i.charAt(64);if(h)for(;n.length%4;)n.push(h);return n.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<r.length;s++)n[r.charCodeAt(s)]=s}var o=r.charAt(64);if(o){var a=t.indexOf(o);-1!==a&&(e=a)}return i(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(ne())}(ce)),ce.exports}var le,fe={exports:{}};function pe(){return le||(le=1,function(t){t.exports=function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,s=i.Hasher,o=r.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var h=o.MD5=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var s=this._hash.words,o=t[e+0],h=t[e+1],p=t[e+2],d=t[e+3],g=t[e+4],m=t[e+5],v=t[e+6],_=t[e+7],y=t[e+8],b=t[e+9],w=t[e+10],S=t[e+11],x=t[e+12],T=t[e+13],k=t[e+14],E=t[e+15],D=s[0],O=s[1],A=s[2],P=s[3];D=c(D,O,A,P,o,7,a[0]),P=c(P,D,O,A,h,12,a[1]),A=c(A,P,D,O,p,17,a[2]),O=c(O,A,P,D,d,22,a[3]),D=c(D,O,A,P,g,7,a[4]),P=c(P,D,O,A,m,12,a[5]),A=c(A,P,D,O,v,17,a[6]),O=c(O,A,P,D,_,22,a[7]),D=c(D,O,A,P,y,7,a[8]),P=c(P,D,O,A,b,12,a[9]),A=c(A,P,D,O,w,17,a[10]),O=c(O,A,P,D,S,22,a[11]),D=c(D,O,A,P,x,7,a[12]),P=c(P,D,O,A,T,12,a[13]),A=c(A,P,D,O,k,17,a[14]),D=u(D,O=c(O,A,P,D,E,22,a[15]),A,P,h,5,a[16]),P=u(P,D,O,A,v,9,a[17]),A=u(A,P,D,O,S,14,a[18]),O=u(O,A,P,D,o,20,a[19]),D=u(D,O,A,P,m,5,a[20]),P=u(P,D,O,A,w,9,a[21]),A=u(A,P,D,O,E,14,a[22]),O=u(O,A,P,D,g,20,a[23]),D=u(D,O,A,P,b,5,a[24]),P=u(P,D,O,A,k,9,a[25]),A=u(A,P,D,O,d,14,a[26]),O=u(O,A,P,D,y,20,a[27]),D=u(D,O,A,P,T,5,a[28]),P=u(P,D,O,A,p,9,a[29]),A=u(A,P,D,O,_,14,a[30]),D=l(D,O=u(O,A,P,D,x,20,a[31]),A,P,m,4,a[32]),P=l(P,D,O,A,y,11,a[33]),A=l(A,P,D,O,S,16,a[34]),O=l(O,A,P,D,k,23,a[35]),D=l(D,O,A,P,h,4,a[36]),P=l(P,D,O,A,g,11,a[37]),A=l(A,P,D,O,_,16,a[38]),O=l(O,A,P,D,w,23,a[39]),D=l(D,O,A,P,T,4,a[40]),P=l(P,D,O,A,o,11,a[41]),A=l(A,P,D,O,d,16,a[42]),O=l(O,A,P,D,v,23,a[43]),D=l(D,O,A,P,b,4,a[44]),P=l(P,D,O,A,x,11,a[45]),A=l(A,P,D,O,E,16,a[46]),D=f(D,O=l(O,A,P,D,p,23,a[47]),A,P,o,6,a[48]),P=f(P,D,O,A,_,10,a[49]),A=f(A,P,D,O,k,15,a[50]),O=f(O,A,P,D,m,21,a[51]),D=f(D,O,A,P,x,6,a[52]),P=f(P,D,O,A,d,10,a[53]),A=f(A,P,D,O,w,15,a[54]),O=f(O,A,P,D,h,21,a[55]),D=f(D,O,A,P,y,6,a[56]),P=f(P,D,O,A,E,10,a[57]),A=f(A,P,D,O,v,15,a[58]),O=f(O,A,P,D,T,21,a[59]),D=f(D,O,A,P,g,6,a[60]),P=f(P,D,O,A,S,10,a[61]),A=f(A,P,D,O,p,15,a[62]),O=f(O,A,P,D,b,21,a[63]),s[0]=s[0]+D|0,s[1]=s[1]+O|0,s[2]=s[2]+A|0,s[3]=s[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var s=e.floor(i/4294967296),o=i;r[15+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,h=a.words,c=0;c<4;c++){var u=h[c];h[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,r,i,n,s,o){var a=t+(e&r|~e&i)+n+o;return(a<<s|a>>>32-s)+e}function u(t,e,r,i,n,s,o){var a=t+(e&i|r&~i)+n+o;return(a<<s|a>>>32-s)+e}function l(t,e,r,i,n,s,o){var a=t+(e^r^i)+n+o;return(a<<s|a>>>32-s)+e}function f(t,e,r,i,n,s,o){var a=t+(r^(e|~i))+n+o;return(a<<s|a>>>32-s)+e}r.MD5=s._createHelper(h),r.HmacMD5=s._createHmacHelper(h)}(Math),t.MD5}(ne())}(fe)),fe.exports}var de,ge={exports:{}},me={exports:{}};function ve(){return de||(de=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.WordArray,n=r.Hasher,s=e.algo,o=[],a=s.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],a=r[3],h=r[4],c=0;c<80;c++){if(c<16)o[c]=0|t[e+c];else{var u=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=u<<1|u>>>31}var l=(i<<5|i>>>27)+h+o[c];l+=c<20?1518500249+(n&s|~n&a):c<40?1859775393+(n^s^a):c<60?(n&s|n&a|s&a)-1894007588:(n^s^a)-899497514,h=a,a=s,s=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+h|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(a),e.HmacSHA1=n._createHmacHelper(a),t.SHA1;var e,r,i,n,s,o,a}(ne())}(me)),me.exports}var _e,ye={exports:{}};var be;function we(){return be||(be=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.Base,n=r.WordArray,s=e.algo,o=s.MD5,a=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,s=i.hasher.create(),o=n.create(),a=o.words,h=i.keySize,c=i.iterations;a.length<h;){r&&s.update(r),r=s.update(t).finalize(e),s.reset();for(var u=1;u<c;u++)r=s.finalize(r),s.reset();o.concat(r)}return o.sigBytes=4*h,o}}),e.EvpKDF=function(t,e,r){return a.create(r).compute(t,e)},t.EvpKDF;var e,r,i,n,s,o,a}(ne(),ve(),_e||(_e=1,function(t){t.exports=function(t){var e,r,i;r=(e=t).lib.Base,i=e.enc.Utf8,e.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var s=this._oKey=e.clone(),o=this._iKey=e.clone(),a=s.words,h=o.words,c=0;c<r;c++)a[c]^=1549556828,h[c]^=909522486;s.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}})}(ne())}(ye)))}(ge)),ge.exports}var Se,xe={exports:{}};var Te;var ke=(Te||(Te=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,i=e.algo,n=[],s=[],o=[],a=[],h=[],c=[],u=[],l=[],f=[],p=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,i=0;for(e=0;e<256;e++){var d=i^i<<1^i<<2^i<<3^i<<4;d=d>>>8^255&d^99,n[r]=d,s[d]=r;var g=t[r],m=t[g],v=t[m],_=257*t[d]^16843008*d;o[r]=_<<24|_>>>8,a[r]=_<<16|_>>>16,h[r]=_<<8|_>>>24,c[r]=_,_=16843009*v^65537*m^257*g^16843008*r,u[d]=_<<24|_>>>8,l[d]=_<<16|_>>>16,f[d]=_<<8|_>>>24,p[d]=_,r?(r=g^t[t[t[v^g]]],i^=t[t[i]]):r=i=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],g=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*((this._nRounds=r+6)+1),s=this._keySchedule=[],o=0;o<i;o++)o<r?s[o]=e[o]:(c=s[o-1],o%r?r>6&&o%r==4&&(c=n[c>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c]):(c=n[(c=c<<8|c>>>24)>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c],c^=d[o/r|0]<<24),s[o]=s[o-r]^c);for(var a=this._invKeySchedule=[],h=0;h<i;h++){if(o=i-h,h%4)var c=s[o];else c=s[o-4];a[h]=h<4||o<=4?c:u[n[c>>>24]]^l[n[c>>>16&255]]^f[n[c>>>8&255]]^p[n[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,a,h,c,n)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,u,l,f,p,s),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,s,o,a){for(var h=this._nRounds,c=t[e]^r[0],u=t[e+1]^r[1],l=t[e+2]^r[2],f=t[e+3]^r[3],p=4,d=1;d<h;d++){var g=i[c>>>24]^n[u>>>16&255]^s[l>>>8&255]^o[255&f]^r[p++],m=i[u>>>24]^n[l>>>16&255]^s[f>>>8&255]^o[255&c]^r[p++],v=i[l>>>24]^n[f>>>16&255]^s[c>>>8&255]^o[255&u]^r[p++],_=i[f>>>24]^n[c>>>16&255]^s[u>>>8&255]^o[255&l]^r[p++];c=g,u=m,l=v,f=_}g=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[p++],m=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^r[p++],v=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^r[p++],_=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^r[p++],t[e]=g,t[e+1]=m,t[e+2]=v,t[e+3]=_},keySize:8});e.AES=r._createHelper(g)}(),t.AES}(ne(),ue(),pe(),we(),Se||(Se=1,function(t){t.exports=function(t){t.lib.Cipher||function(e){var r=t,i=r.lib,n=i.Base,s=i.WordArray,o=i.BufferedBlockAlgorithm,a=r.enc;a.Utf8;var h=a.Base64,c=r.algo.EvpKDF,u=i.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?y:v}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()});i.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},f=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),p=l.CBC=function(){var t=f.extend();function r(t,r,i){var n,s=this._iv;s?(n=s,this._iv=e):n=this._prevBlock;for(var o=0;o<i;o++)t[r+o]^=n[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize;r.call(this,t,e,n),i.encryptBlock(t,e),this._prevBlock=t.slice(e,e+n)}}),t.Decryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,s=t.slice(e,e+n);i.decryptBlock(t,e),r.call(this,t,e,n),this._prevBlock=s}}),t}(),d=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,i=r-t.sigBytes%r,n=i<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(n);var h=s.create(o,i);t.concat(h)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:d}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var g=i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),m=(r.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(e):e).toString(h)},parse:function(t){var e,r=h.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=s.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),g.create({ciphertext:r,salt:e})}},v=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),s=n.finalize(e),o=n.cfg;return g.create({ciphertext:s,key:r,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=(r.kdf={}).OpenSSL={execute:function(t,e,r,i,n){if(i||(i=s.random(8)),n)o=c.create({keySize:e+r,hasher:n}).compute(t,i);else var o=c.create({keySize:e+r}).compute(t,i);var a=s.create(o.words.slice(e),4*r);return o.sigBytes=4*e,g.create({key:o,iv:a,salt:i})}},y=i.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:_}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize,i.salt,i.hasher);i.iv=n.iv;var s=v.encrypt.call(this,t,e,n.key,i);return s.mixIn(n),s},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt,i.hasher);return i.iv=n.iv,v.decrypt.call(this,t,e,n.key,i)}})}()}(ne(),we())}(xe)))}(he)),he.exports),Ee=x(ke),De="funsdata",Oe={_name:De,appId:"",persistence:"localStorage",persistencePrefix:"FunsDataJSSDK",persistenceEnabled:!0,crossSubDomain:!0,maxReferrerStringLength:200,showLog:!0,dataSendTimeout:3e3,useAppTrack:!1,strict:!1,tryCount:3,enableCalibrationTime:!1},Ae=function(t){this._state={},this.crossSubDomain=t.crossSubDomain,this.enabled=t.persistenceEnabled;var e=null;if(this.enabled){if(!1===t.crossSubDomain){var r=_.url("sub",location.href);this.name="string"==typeof r&&""!==r?t.persistencePrefix+"_"+r:t.persistencePrefix+"_root"}else this.name=t.persistencePrefix+"_cross";var i=t.persistence;"cookie"!==i&&"localStorage"!==i&&(y.i("Unknown persistence type "+i+"; falling back to cookie"),i=t.persistence="cookie"),"localStorage"===i&&_.localStorage.isSupported()?(this.storage=_.localStorage,(e=_.cookie.get(this.name))&&_.cookie.remove(this.name,this.crossSubDomain)):(y.i("localStorage is not support by the browser; falling back to cookie"),this.storage=_.cookie)}if(this._load(e),!this.getDistinctId()){var n=t.uuid?t.uuid:_.UUID();this._setDeviceId(n),this.setDistinctId(n)}};Ae.prototype._load=function(t){var e;this.enabled&&(null!==(e=null!==t?t:this.storage.get(this.name))&&_.check.isJSONString(e)&&(this._state=_.extend({},JSON.parse(e))),null!==t&&this._save())},Ae.prototype.getDistinctId=function(){return this._state.distinct_id},Ae.prototype.setDistinctId=function(t){this._set("distinct_id",t)},Ae.prototype.setEnableTracking=function(t){this._set("enable_tracking",t)},Ae.prototype.getEnableTracking=function(){return!!_.check.isUndefined(this._state.enable_tracking)||this._state.enable_tracking},Ae.prototype.clear=function(){this._state={},this._save()},Ae.prototype.setOptTracking=function(t){this._set("opt_tracking",t)},Ae.prototype.getOptTracking=function(){return!!_.check.isUndefined(this._state.opt_tracking)||this._state.opt_tracking},Ae.prototype.getAccountId=function(){return this._state.account_id},Ae.prototype.setAccountId=function(t){this._set("account_id",t)},Ae.prototype.getDeviceId=function(){return this._state.device_id},Ae.prototype.setSuperProperties=function(t){this._set("super_properties",t)},Ae.prototype.getSuperProperties=function(){return this._state.super_properties||{}},Ae.prototype.setEventTimer=function(t,e){var r=this._state.event_timers||{};r[t]=e,this._set("event_timers",r)},Ae.prototype.clearEventTimer=function(){this._set("event_timers",{})},Ae.prototype.removeEventTimer=function(t){var e=(this._state.event_timers||{})[t];return _.check.isUndefined(e)||(delete this._state.event_timers[t],this._save()),e},Ae.prototype._setDeviceId=function(t){this._state.device_id?y.w("Current device_id is ",this.getDeviceId(),", it couldn't been set to: ",t):this._set("device_id",t)},Ae.prototype._save=function(){this.enabled&&this.storage.set(this.name,JSON.stringify(this._state),73e3,this.crossSubDomain)},Ae.prototype._set=function(t,e){this._state=this._state||{},this._state[t]=e,this._save()};var Pe=function(){};Pe.prototype.trackLink=function(t,e,r){var i=this;if(this._isCollectData()){var n=this._getConfig("strict");if(w.properties(r)||!n){if(t&&_.check.isObject(t)){var s=[];_.each(t,(function(t,e){t&&_.check.isArray(t)&&_.each(t,(function(t){switch(e){case"tag":_.each(document.getElementsByTagName(t),(function(t){s.indexOf(t)<0&&s.push(t)}));break;case"class":_.each(document.getElementsByClassName(t),(function(t){s.indexOf(t)<0&&s.push(t)}));break;case"id":var r=document.getElementById(t);null!==r&&s.indexOf(r)<0&&s.push(r)}}))})),_.each(s,(function(t){if(null!==t){var s=_.extend({},r);s["#element_type"]=t.nodeName.toLowerCase(),_.check.isUndefined(s.name)&&(s.name=t.getAttribute("td-name")||t.innerHTML||t.value||"Unable to get Identify"),t.addEventListener("click",(function(){i._sendRequest({type:"track",event:e,properties:n?w.stripProperties(s):s})}))}}))}}else y.w("trackLink failed due to invalid properties.")}},Pe.prototype.setPageProperty=function(t){this._isCollectData()&&(w.properties(t)||!this._getConfig("strict")?_.extend(this.currentProps,t):y.w("Page property setting error"))},Pe.prototype.getPageProperty=function(){return this.currentProps},Pe.prototype.getPresetProperties=function(){var t=_.info.properties(),e={};e.os=t["#os"],e.screenWidth=t["#screen_width"],e.screenHeight=t["#screen_height"],e.browser=t["#browser"],e.browserVersion=t["#browser_version"],e.deviceId=this.getDeviceId();var r=0-(new Date).getTimezoneOffset()/60;return this._getConfig("zoneOffset")&&(r=this._getConfig("zoneOffset")),e.zoneOffset=r,e.toEventPresetProperties=function(){return{"#os":e.os,"#screen_width":e.screenWidth,"#screen_height":e.screenHeight,"#browser":e.browser,"#browser_version":e.browserVersion,"#device_id":e.deviceId,"#zone_offset":e.zoneOffset}},e},Pe.prototype.login=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),w.userId(t)||!this._getConfig("strict")?t!==this.persistence.getAccountId()&&this.persistence.setAccountId(t):y.e("The parameters of the login API must be strings"))},Pe.prototype.logout=function(t){if(this._isCollectData()){if(!0===t){var e=_.UUID();this.persistence.setDistinctId(e)}this.persistence.setAccountId("")}},Pe.prototype.userSet=function(t,e){this._isCollectData()&&(!w.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_set",properties:t},e))},Pe.prototype.userSetOnce=function(t,e){this._isCollectData()&&(!w.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_setOnce",properties:t},e))},Pe.prototype.userUnset=function(t,e){if(this._isCollectData()&&(w.propertyName(t)||!this._getConfig("strict"))){var r={};r[t]=0,this._sendRequest({type:"user_unset",properties:r},e)}},Pe.prototype.userAdd=function(t,e){if(this._isCollectData()){if(_.check.isString(t)){var r=t;(t={})[r]=1}w.propertiesMust(t)&&(!function(t){for(var e in t)if(!/-*\d+/.test(String(t[e])))return!1;return!0}(t)&&this._getConfig("strict")?y.w("The property value of useradd api must be a number"):this._sendRequest({type:"user_add",properties:t},e))}},Pe.prototype.userAppend=function(t,e){this._isCollectData()&&(w.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_append",properties:t},e):y.w("The value in the userAppend property can only be Array"))},Pe.prototype.userUniqAppend=function(t,e){this._isCollectData()&&(w.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_uniq_append",properties:t},e):y.w("The value in the userUniqAppend property can only be Array"))},Pe.prototype.flush=function(){this.batchConsumer&&!this._isDebug()&&this.batchConsumer.flush()},Pe.prototype.userDel=function(t){this._isCollectData()&&this._sendRequest({type:"user_del"},t)},Pe.prototype._sendRequest=function(t,e,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=_.check.isUndefined(t.time)||!_.check.isDate(t.time)?new Date:t.time,o=_.formatTimeZone(n,this._getConfig("zoneOffset")),h={data:[{"#type":t.type,"#time":_.formatDate(o),"#timestamp":o.getTime(),"#distinct_id":this.persistence.getDistinctId()}]};this.persistence.getAccountId()&&(h.data[0]["#account_id"]=this.persistence.getAccountId());var u=0-n.getTimezoneOffset()/60;h.data[0]["#zone_offset"]=u,h.data[0]["#lib_version"]=c,h.data[0]["#system_language"]=_.check.isString(navigator.languages&&navigator.languages[1])?navigator.languages[1].toLowerCase():"",h.data[0]["#os_version"]=_.info.osVersion(),h.data[0]["#network_type"]=_.info.networkType();var l=_.info.browser();if(h.automaticData={"#lib":"js","#os":_.info.os(),"#device_id":this.persistence.getDeviceId(),"#screen_height":screen.height,"#screen_width":screen.width,"#ua":_.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"","#browser":l.type,"#browser_version":l.version,"#device_type":_.info.deviceType()},"track"===t.type||"track_update"===t.type||"track_overwrite"===t.type){h.data[0]["#event_name"]=t.event,"track_update"===t.type||"track_overwrite"===t.type?h.data[0]["#event_id"]=t.extraId:t.firstCheckId&&(h.data[0]["#first_check_id"]=t.firstCheckId);var f=_.info.pageProperties();_.each(f,(function(t,e){h.data[0][e]=t})),h.data[0]["#utm"]=_.getUtm(),h.data[0].properties=_.extend({},_.normalizeTopLevelKeys(s(s(s({},this.getSuperProperties()),this.dynamicProperties?this.dynamicProperties():{}),this.getPageProperty())));var p=this.persistence.removeEventTimer(t.event);if(!_.check.isUndefined(p)){var d=(new Date).getTime()-p,g=parseFloat((d/1e3).toFixed(3));g>86400&&(g=86400),h.data[0]["#duration"]=g}}else h.data[0].properties={};if(_.check.isObject(t.properties)&&!_.check.isEmptyObject(t.properties)&&_.extend(h.data[0].properties,_.normalizeTopLevelKeys(t.properties)),_.searchObjDate(h.data[0],this._getConfig("zoneOffset")),h.data[0]=_.generateEncryptyData(h.data[0],this._getConfig("secretKey")),h["#app_id"]=this._getConfig("appId"),h["#flush_time"]=_.formatTimeZone(new Date,this._getConfig("zoneOffset")).getTime(),y.i(h),this._getConfig("useAppTrack")){var m=window.FunsData_APP_JS_Bridge||{};if("object"===a(m)&&m.funsdata_track)return m.funsdata_track(JSON.stringify(h)),void("function"==typeof e&&e());if(/td-sdk-ios/.test(navigator.userAgent)&&!window.MSStream){var v=document.createElement("iframe");return v.setAttribute("src","funsanalytics://trackEvent?event="+_.encodeURIComponent(JSON.stringify(h))),document.documentElement.appendChild(v),v.parentNode.removeChild(v),v=null,void("function"==typeof e&&e())}}h.data[0]["#uuid"]=_.UUIDv4();var b=JSON.stringify(h),w=this;if(this._isEncrypt()&&w.crypto){var S=Math.round(1e16*Math.random())+"",x=[];h.data.forEach((function(t){x.push({ekey:w._encryptPass(S,w.crypto.pub_key),pkv:w.crypto.version,payload:w._encryptInfo(JSON.stringify(t),S)})})),h.data=x,h.client="js"}return new Re(JSON.stringify(h),this._getConfig("serverUrl"),this._getConfig("tryCount"),e,this._isDebug(),i).run(b)};function Ie(t){this.config=t,this.timer=null,this.batchConfig=_.extend({size:5,interval:5e3,storageLimit:200},this.config.batch),this.batchConfig.size<1&&(this.batchConfig.size=1),this.batchConfig.size>30&&(this.batchConfig.size=30),this.prefix=this.config.persistencePrefix,this.tabKey=this.prefix+"tab_"+this.config.appId,this.storageLimit=this.batchConfig.storageLimit}Ie.prototype={batchInterval:function(){var t=this;t.timer=setTimeout((function(){t.recycle(),t.send(),clearTimeout(t.timer),t.batchInterval()}),this.batchConfig.interval)},add:function(t){var e=t,r=this.prefix+"ta_"+this.config.appId+"_"+String(_.getRandom()),i=_.localStorage.get(this.tabKey);if((i=null===i?[]:_.safeJSONParse(i)||[]).length<=this.storageLimit)i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);else{var n=i.splice(0,20);i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);for(var s={},o=[],a=0;a<n.length;a++){var h=_.readObjectVal(n[a]);_.hasEncrypty(h)||(h=_.generateEncryptyData(h,this.config.secretKey)),o.push(h)}s.data=o,s["#app_id"]=this.config.appId,s["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(s,n)}},flush:function(){clearTimeout(this.timer),this.send(),this.batchInterval()},send:function(){var t=_.localStorage.get(this.tabKey);if(t&&(t=_.safeJSONParse(t)||[]).length){for(var e={},r=[],i=[],n=t.length<this.batchConfig.size?t.length:this.batchConfig.size,s=0;s<n;s++){var o=_.readObjectVal(t[s]);_.hasEncrypty(o)||(o=_.generateEncryptyData(o,this.config.secretKey)),r.push(o),i.push(t[s])}e.data=r,e["#app_id"]=this.config.appId,e["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(e,i)}},request:function(t,e){var r=this;y.i("flush data"),y.i(t);var i=JSON.stringify(t),n=_.base64Encode(i),s="crc="+_.hashCode(n);_.encodeURIComponent(n),_.encodeURIComponent(s),new Re(i,this.config.serverUrl,this.config.tryCount,(function(){r.remove(e)}),!1).run()},remove:function(t){var e=_.localStorage.get(this.tabKey);if(e){for(var r=_.safeJSONParse(e)||[],i=0;i<t.length;i++){var n=_.indexOf(r,t[i]);n>-1&&r.splice(n,1),_.localStorage.remove(t[i])}_.localStorage.set(this.tabKey,JSON.stringify(r))}},recycle:function(){var t=_.localStorage.get(this.tabKey);if(t&&0===(t=_.safeJSONParse(t)||[]).length){for(var e=0;e<localStorage.length;e++){var r=localStorage.key(e);0===r.indexOf(this.prefix+"ta_"+this.config.appId)&&t.push(r)}t.length>0&&_.localStorage.set(this.tabKey,JSON.stringify(t))}}};var Re=function(){return r((function e(r,i,n,s,o){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];t(this,e),this.data=r,this.serverUrl=i,this.tryCount=n||3,this.callback=s,this.isDebug=o,this.ifSend=a}),[{key:"run",value:function(t){var e=null;e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var r=this;return e.open("post",this.serverUrl,!0),e.setRequestHeader("Content-type",r.isDebug?"application/json;charset=UTF-8":"application/gzip"),e.onreadystatechange=function(){if(4===e.readyState)if(e.status>=200&&e.status<300||304===e.status){if(r.callback&&r.callback(),r.isDebug){var t=JSON.parse(e.response);0!==t.errorLevel?y.w(t):y.i(t)}}else r.onFailed()},r.ifSend&&(r.isDebug?e.send(r.data):e.send($.gzip(r.data,{to:"string"}))),r.ifSend?new Promise((function(r,i){e.onload=function(){4===e.readyState&&(200===e.status?r({res:e.responseText,req:t}):i(e))},e.onerror=function(){i(e)}})):t}},{key:"onFailed",value:function(){--this.tryCount>0&&this.run()}}])}();Pe.prototype._isDebug=function(){return"debug"===this._getConfig("mode")||"debug_only"===this._getConfig("mode")},Pe.prototype._isEncrypt=function(){return!0===this._getConfig("encrypt")},Pe.prototype._setEncrypt=function(){var t=this,e=new XMLHttpRequest;e.open("get","https://deapi.funsdata.com/v1/settings",!0),e.send(),e.onload=function(){4===e.readyState&&(200===e.status?t.crypto=JSON.parse(e.responseText).data.crypto:console.error("公钥拉取失败!"))}},Pe.prototype._encryptInfo=function(t,e){var r=ae.parse(e),i=ae.parse(t);return Ee.encrypt(i,r,{iv:r}).toString()},Pe.prototype._encryptPass=function(t,e){var r=new te;return r.setPublicKey(e),r.encrypt(t)},Pe.prototype.startHeartbeat=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=this;if(e.heartbeatInterval)console.warn("已设置心跳");else{var r={interval:t};e.heartbeatInterval=setInterval((function(){if("visible"===document.visibilityState)if(e.heartbeatProps){var t=s(s({},r),e.heartbeatProps);e.track("Heartbeat",t)}else e.track("Heartbeat",r)}),t)}},Pe.prototype.clearHeartbeat=function(){var t=this;t.heartbeatInterval?(clearInterval(t.heartbeatInterval),t.removeHeartbeatProps(),t.heartbeatInterval=void 0):console.warn("未设置心跳")},Pe.prototype.setHeartbeatProps=function(t){if(t)if("object"!==a(t)||Array.isArray(t))console.warn("心跳上报参数不符合规范");else{var e=this;e.heartbeatProps||(e.heartbeatProps={}),e.heartbeatProps=s(s({},e.heartbeatProps),t)}},Pe.prototype.removeHeartbeatProps=function(t){var e=this;t?"string"==typeof t?e.heartbeatProps[t]&&delete e.heartbeatProps[t]:Array.isArray(t)?t.forEach((function(t){e.heartbeatProps[t]&&delete e.heartbeatProps[t]})):console.warn("删除心跳参数不符合规范"):e.heartbeatProps={}},Pe.prototype._sendRequestWithImage=function(t,e){function r(t){t&&!t.hasCalled&&(t.hasCalled=!0,t.callback&&t.callback())}var i=(-1!==this._getConfig("serverUrl").indexOf("?")?this._getConfig("serverUrl"):this._getConfig("serverUrl")+"?")+t,n=document.createElement("img");n.callback=e,setTimeout(r,this._getConfig("dataSendTimeout"),n),n.onload=function(){this.onload=null,r(this)},n.onerror=function(){this.onerror=null,r(this)},n.onabort=function(){this.onabort=null,r(this)},n.src=i},Pe.prototype.track=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||w.event(t)&&w.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i):void 0},Pe.prototype.getTrackData=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||w.event(t)&&w.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i,void 0,!1):void 0},Pe.prototype.trackUpdate=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_update",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):y.e("The parameter of updateble event does not meet the requirements"))},Pe.prototype.trackOverwrite=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_overwrite",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):y.e("The parameter of overwritable event does not meet the requirements"))},Pe.prototype.trackFirstEvent=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t.eventName,time:t.eventTime,properties:t.properties,firstCheckId:t.firstCheckId?t.firstCheckId:this.getDeviceId()},t.callback):y.e("The parameter of first event does not meet the requirements"))},Pe.prototype.trackWithBeacon=function(t,e,r,i){"ta_page_hide"!==t?(w.event(t)&&w.properties(e)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0):this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0)},Pe.prototype.identify=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),w.userId(t)||!this._getConfig("strict")?t!==this.persistence.getDistinctId()&&this.persistence.setDistinctId(t):y.e("The parameter of identify API requires a string"))},Pe.prototype.getDistinctId=function(){return this.persistence.getDistinctId()},Pe.prototype.getDeviceId=function(){return this.persistence.getDeviceId()},Pe.prototype._isCollectData=function(){return this.persistence.getOptTracking()&&this.persistence.getEnableTracking()},Pe.prototype.setSuperProperties=function(t){this._isCollectData()&&(w.propertiesMust(t)||!this._getConfig("strict")?this.persistence.setSuperProperties(_.extend({},this.getSuperProperties(),t)):y.w("The paramater of setSuperProperties API requires object"))},Pe.prototype.getSuperProperties=function(){return this.persistence.getSuperProperties()},Pe.prototype.clearSuperProperties=function(){this._isCollectData()&&this.persistence.setSuperProperties({})},Pe.prototype.unsetSuperProperty=function(t){if(this._isCollectData()&&_.check.isString(t)){var e=this.getSuperProperties();delete e[t],this.persistence.setSuperProperties(e)}},Pe.prototype.setDynamicSuperProperties=function(t){this._isCollectData()&&("function"==typeof t?w.properties(t())||!this._getConfig("strict")?this.dynamicProperties=t:y.w("The return value of dynamic properties requires an object"):y.w("The paramater of setDynamicSuperProperties API requires function type"))},Pe.prototype.timeEvent=function(t){this._isCollectData()&&(_.check.isUndefined(t)?y.w("No event name provided to timeEvent"):this.persistence.setEventTimer(t,(new Date).getTime()))},Pe.prototype.quick=function(t,e){if(this._isCollectData())if("string"==typeof t&&"autoTrack"===t){var r={};w.properties(e)&&_.extend(r,e),this._sendRequest({type:"track",event:"ta_pageview",properties:r})}else"string"==typeof t&&"siteLinker"===t?Be.init(this,e):y.w("The quick method does not support the parameter of"+t)},Pe.prototype.getLinkerUrl=function(t){return _.check.isString(t)&&""!==t?(Be.ta=Be.ta||this,Be.rewriteUrl(t)||t):(y.w("getLinkerUrl requires a non-empty URL string"),t)},Pe.prototype._setConfig=function(t){_.check.isObject(t)&&(_.extend(this.config,t),this._getConfig("persistencePrefix")||(this.config.persistencePrefix=this.config.cookiePrefix),this.persistence)},Pe.prototype._getConfig=function(t){return this.config[t]},Pe.prototype.init=function(t){if(_.check.isUndefined(this.config)){this.version=c,this.config={},this.currentProps=this.currentProps||{},this._setConfig(_.extend({},Oe,t)),this.persistence=new Ae(this.config);var e=this._getConfig("appId");_.check.isUndefined(e)||this._setConfig({appId:e.replace(/\s*/g,"")}),y.showLog=this._getConfig("showLog"),this._isDebug()?this._setConfig({serverUrl:t.serverUrl+"/json"}):this._setConfig({serverUrl:t.serverUrl}),this._isEncrypt()&&this._setEncrypt(),void 0!==this._getConfig("batch")&&!1!==this._getConfig("batch")&&_.localStorage.isSupported()&&(this.batchConsumer=new Ie(this.config),this.batchConsumer.batchInterval()),new Ce(this,this._getConfig("autoTrack")).start();var r="normal";this.config.mode&&(r=this.config.mode),y.i("DataEye Analytics SDK initialized successfully with mode: "+r+", APP ID : "+this.config.appId+", server url: "+this.config.serverUrl+", libversion: "+c)}else y.i("The FunsData libraray has been initialized.")};var Ce=function(){return r((function e(r,i){t(this,e),this.taLib=r,"Object"===_.paramType(i)&&"Boolean"===_.paramType(i.pageShow)?this.autoPageShow=i.pageShow:this.autoPageShow=!1,"Object"===_.paramType(i)&&"Boolean"===_.paramType(i.pageHide)?this.autoPageHide=i.pageHide:this.autoPageHide=!1}),[{key:"start",value:function(){var t=this;t.trackPageShowEvent(),"onvisibilitychange"in document&&_.addEvent(document,"visibilitychange",(function(){document.hidden?t.trackPageHideEvent():t.trackPageShowEvent()}))}},{key:"trackPageShowEvent",value:function(){this.autoPageShow&&this.taLib.track("ta_page_show"),this.taLib.timeEvent("ta_page_hide")}},{key:"trackPageHideEvent",value:function(){this.autoPageHide&&this.taLib.trackWithBeacon("ta_page_hide")}},{key:"trackPageHideEventOnClose",value:function(){this.autoPageHide&&this.isPageShow&&this.taLib.trackWithBeacon("ta_page_hide")}}])}();Pe.prototype.initInstance=function(t,e){if(!_.check.isString(t)||!_.check.isUndefined(e)&&!_.check.isObject(e))return y.w("invalid parameter of initInstance(string, object)."),null;if(this._getConfig("_name")!==De)return y.w("This function is allowed for master instance only"),null;if(t===De||this[t])return y.w("The name ",t," couldn't be used for create new instance."),null;_.check.isUndefined(e)&&(e={});var r=new Pe,i=_.extend({},this.config,{_name:t,persistenceEnabled:!1,uuid:this.getDeviceId()},e);i.persistenceEnabled&&(i.persistencePrefix=i.persistencePrefix+"_"+t),r.init(i),this[t]=r},Pe.prototype.enableTracking=function(t){"boolean"==typeof t&&this.persistence.setEnableTracking(t)},Pe.prototype.optOutTracking=function(){this.persistence.setSuperProperties({}),this.persistence.setAccountId(""),this.persistence.clearEventTimer(),this.persistence.setOptTracking(!1)},Pe.prototype.optInTracking=function(){this.persistence.setOptTracking(!0)},Pe.prototype.setTrackStatus=function(t){if(_.check.isObject(t)){var e=t.status;y.i("swtich track status : "+e),"pause"===e?this.enableTracking(!1):"stop"===e?this.optOutTracking():"normal"===e&&(this.enableTracking(!0),this.optInTracking())}};var Be={};return Be.getPartUrl=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return!0;return!1},Be.getPartHash=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return this.option[r].after_hash;return!1},Be.getCurrenId=function(){var t=this.ta.getDeviceId()||"",e=this.ta.getDistinctId()||"",r=this.ta.persistence.getAccountId()||"";return encodeURIComponent(t+"|"+e+"|"+r)},Be.rewriteUrl=function(t,e){var r=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t),i="";if(r){var n,s=r[1]||"",o=r[2]||"",a=r[3]||"";if(this.getPartHash(t))n=a.indexOf("_tasdk"),i=a.indexOf("?")>-1?n>-1?s+o+"#"+a.substring(1,n)+"_tasdk="+this.getCurrenId():s+o+"#"+a.substring(1)+"&_tasdk="+this.getCurrenId():s+o+"#"+a.substring(1)+"?_tasdk="+this.getCurrenId();else n=o.indexOf("_tasdk"),i=/^\?(\w)+/.test(o)?n>-1?s+"?"+o.substring(1,n)+"_tasdk="+this.getCurrenId()+a:s+"?"+o.substring(1)+"&_tasdk="+this.getCurrenId()+a:s+"?"+o.substring(1)+"_tasdk="+this.getCurrenId()+a;return e&&(e.href=i),i}},Be.addClickListen=function(){var t=this,e=function(e){var r,i,n=e.target,s=n.tagName.toLowerCase(),o=n.parentNode;if("a"===s&&n.href||o&&o.tagName&&"a"===o.tagName.toLowerCase()&&o.href){"a"===s&&n.href?(r=n.href,i=n):(r=o.href,i=o);var a=_.URL(r).protocol;"http:"!==a&&"https:"!==a||t.getPartUrl(r)&&t.rewriteUrl(r,i)}};_.addSiteEvent(document,"mousedown",e),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&_.addSiteEvent(document,"pointerdown",e)},Be.getUrlId=function(){var t=location.href.match(/_tasdk=([^\?\#\&\=]+)/);if(_.check.isArray(t)&&t[1]){var e=decodeURIComponent(t[1]);if(e.indexOf("|")>-1){var r=e.split("|");return{deviceId:r[0]||"",distinctId:r[1]||"",accountId:r[2]||""}}return/^[aufd]/.test(e)?{distinctId:e.substring(1),_legacy:!0}:null}return null},Be.removeUrlParam=function(){if("undefined"!=typeof history&&history.replaceState)try{var t=location.href,e=t.replace(/([?&])_tasdk=[^&#]*&?/,(function(t,e){return"&"===t.slice(-1)?e:"?"===e?"?":""}));(e=e.replace(/\?$/,"").replace(/\?&/,"?").replace(/&&+/,"&"))!==t&&history.replaceState(history.state,"",e)}catch(t){y.w("Failed to clean _tasdk from URL")}},Be.setRefferId=function(){var t=this.getUrlId();if(!t)return!1;if(t._legacy){var e=this.ta.getDistinctId();return t.distinctId&&t.distinctId!==e&&this.ta.identify(t.distinctId),void this.removeUrlParam()}t.deviceId&&this.ta.persistence._set("device_id",t.deviceId),t.distinctId&&this.ta.persistence.setDistinctId(t.distinctId),t.accountId&&this.ta.persistence.setAccountId(t.accountId),this.removeUrlParam()},Be.init=function(t,e){this.isInited||(this.isInited=!0,this.ta=t,this.setRefferId(),_.check.isObject(e)&&_.check.isArray(e.linker)&&e.linker.length>0&&(this.addClickListen(),this.option=e.linker,this.option=function(t){for(var e=t.length,r=[],i=0;i<e;i++)/[A-Za-z0-9]+\./.test(t[i].part_url)&&"[object Boolean]"===Object.prototype.toString.call(t[i].after_hash)?r.push(t[i]):y.w("The configuration of linker "+(i+1)+" is not supported.Please check format");return r}(this.option)))},new Pe}));