@hackler/js-client-sdk
Version:
JavaScript Client(Web Browser) SDK
1 lines • 78.2 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@hackler/sdk-core"),t=require("events"),r=require("uuid"),n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=[0,8,16,32,64,128,256,512],i=e.Logger.log;function a(e,t){return{abort:function(){},responsePromise:new Promise((function(r,n){var o=new XMLHttpRequest;o.open("GET",e),o.onreadystatechange=function(){if(o.readyState===o.DONE){if(0===o.status)return void n(new Error("Request error"));r({statusCode:o.status,body:o.responseText})}},o.setRequestHeader("content-type","application/json"),o.withCredentials=!0,s(o,t),o.send()}))}}function s(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])}var u=function(){function t(e,t){this.sdkKey=e,this.headers=t.headers,this.dispatchUrl=t.dispatchUrl,this.beaconDispatchUrl=t.beaconDispatchUrl||"",this.useBeacon=t.useBeacon}return t.prototype.dispatch=function(e,t){this._post(e,t)},t.prototype.dispatchXhrOrBeacon=function(e,t){this.useBeacon?this._beacon(e,t):this._post(e,t)},t.prototype._post=function(e,t){var r=this._createRequest(e),n=r.payload,o=r.headers;!function(e,t,r,n){var o=JSON.stringify(t),i=new XMLHttpRequest;i.open("POST",e),i.onreadystatechange=function(){i.readyState===i.DONE&&i.status>=200&&i.status<400&&n(i)},i.setRequestHeader("content-type","application/json"),i.withCredentials=!0,s(i,r),i.send(o)}(this.dispatchUrl,n,o,t)},t.prototype._beacon=function(e,t){var r=this._createRequest(e),n=r.payload,o=r.headers;!function(e,t,r,n){var o=!1;if("undefined"!=typeof window&&(o=window&&window.navigator&&window.navigator.sendBeacon&&!0),o){var a=JSON.stringify(t),s=new URLSearchParams;s.append("sdkName",r["X-HACKLE-SDK-NAME"]),s.append("sdkVersion",r["X-HACKLE-SDK-VERSION"]),s.append("sdkTime",r["X-HACKLE-SDK-TIME"]),s.append("data",a),window.navigator.sendBeacon(e,s),n()}else i.error("Does not support sendBeacon"),n()}(this.beaconDispatchUrl,n,o,t)},t.prototype._createRequest=function(t){var r;return{payload:e.toPayload(t),headers:n(((r={})["X-HACKLE-SDK-KEY"]=this.sdkKey,r["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),r),this.headers)}},t}(),c=function(){function e(){}return e.get=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return decodeURIComponent(o.substring(t.length,o.length))}return null},e.set=function(e,t,r,n,o,i){var a="",s="",u="";if(n){var c=function(e){var t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,r=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,n=e.split("."),o=n[n.length-1];(o.length>4||"com"===o||"org"===o)&&(r=t);var i=e.match(r);return i?i[0]:""}(document.location.hostname);a=c?"; domain=."+c:""}if(r){var f=new Date;f.setTime(f.getTime()+24*r*60*60*1e3),s="; expires="+f.toUTCString()}i&&(o=!0,u="; SameSite=None"),o&&(u+="; secure");var l=e+"="+encodeURIComponent(t)+s+"; path=/"+a+u;return document.cookie=l,l},e.remove=function(t,r){e.set(t,"",-1,r,!1,!1)},e}();var f=function(){function e(){}return e.initialize=function(){c.get("_hackle_hid")||v()},e.reInitialize=function(){v()},e}();function l(){var e=c.get("_hackle_id");if(e)return e;var t=c.get("_hackle_hid");return t||v()}function d(e){c.set("_hackle_id",e,3650,!0)}function p(){c.remove("_hackle_id",!0)}function v(){var e=r.v4();return c.set("_hackle_hid",e,3650,!0),e}var h="model",g="name",y="type",w="vendor",m="version",b="mobile",S="tablet",x=function(){function e(){}return e.parse=function(t){return{browser:e.getBrowser(t),cpu:e.getCPU(t),device:e.getDevice(t),engine:e.getEngine(t),os:e.getOS(t)}},e.getBrowser=function(t){var r={name:void 0,version:void 0,major:void 0};return e.mapper.rgx.call(r,t,e.regexes.browser),r.major=e.util.major(r.version),r},e.getCPU=function(t){var r={architecture:void 0};return e.mapper.rgx.call(r,t,e.regexes.cpu),r},e.getDevice=function(t){var r={model:void 0,type:void 0,vendor:void 0};return e.mapper.rgx.call(r,t,e.regexes.device),r},e.getEngine=function(t){var r={name:void 0,version:void 0};return e.mapper.rgx.call(r,t,e.regexes.os),r},e.getOS=function(t){var r={name:void 0,version:void 0};return e.mapper.rgx.call(r,t,e.regexes.os),r},e.util={extend:function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},e.mapper={rgx:function(e,t){for(var r,n,o,i,a,s,u=0;u<t.length&&!a;){var c=t[u],f=t[u+1];for(r=n=0;r<c.length&&!a;)if(a=c[r++].exec(e))for(o=0;o<f.length;o++)s=a[++n],"object"==typeof(i=f[o])&&i.length>0?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;u+=2}},str:function(t,r){for(var n in r)if("object"==typeof r[n]&&r[n].length>0){for(var o=0;o<r[n].length;o++)if(e.util.has(r[n][o],t))return"?"===n?void 0:n}else if(e.util.has(r[n],t))return"?"===n?void 0:n;return t}},e.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},e.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[g,m],[/(opios)[\/\s]+([\w\.]+)/i],[[g,"Opera Mini"],m],[/\s(opr)\/([\w\.]+)/i],[[g,"Opera"],m],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[g,m],[/(konqueror)\/([\w\.]+)/i],[[g,"Konqueror"],m],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[g,"IE"],m],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[g,"Edge"],m],[/(yabrowser)\/([\w\.]+)/i],[[g,"Yandex"],m],[/(Avast)\/([\w\.]+)/i],[[g,"Avast Secure Browser"],m],[/(AVG)\/([\w\.]+)/i],[[g,"AVG Secure Browser"],m],[/(puffin)\/([\w\.]+)/i],[[g,"Puffin"],m],[/(focus)\/([\w\.]+)/i],[[g,"Firefox Focus"],m],[/(opt)\/([\w\.]+)/i],[[g,"Opera Touch"],m],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[g,"UCBrowser"],m],[/(comodo_dragon)\/([\w\.]+)/i],[[g,/_/g," "],m],[/(windowswechat qbcore)\/([\w\.]+)/i],[[g,"WeChat(Win) Desktop"],m],[/(micromessenger)\/([\w\.]+)/i],[[g,"WeChat"],m],[/(brave)\/([\w\.]+)/i],[[g,"Brave"],m],[/(whale)\/([\w\.]+)/i],[[g,"Whale"],m],[/(qqbrowserlite)\/([\w\.]+)/i],[g,m],[/(QQ)\/([\d\.]+)/i],[g,m],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[g,m],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[g,m],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[g,m],[/(MetaSr)[\/\s]?([\w\.]+)/i],[g],[/(LBBROWSER)/i],[g],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[m,[g,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[m,[g,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[g,m],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[m,[g,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[g,/(.+)/,"$1 WebView"],m],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[g,/(.+(?:g|us))(.+)/,"$1 $2"],m],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[g,"Chrome Mobile"],m],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[m,[g,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[g,"Sailfish Browser"],m],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[g,m],[/(dolfin)\/([\w\.]+)/i],[[g,"Dolphin"],m],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[g,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[g,"Opera Coast"],m],[/fxios\/([\w\.-]+)/i],[m,[g,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[m,[g,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[m,g],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[g,"GSA"],m],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[g,[m,e.mapper.str,e.maps.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[g,m],[/(navigator|netscape)\/([\w\.-]+)/i],[[g,"Netscape"],m],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[g,m]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",e.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",e.util.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",e.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[h,w,[y,S]],[/applecoremedia\/[\w\.]+ \((ipad)/],[h,[w,"Apple"],[y,S]],[/(apple\s{0,1}tv)/i],[[h,"Apple TV"],[w,"Apple"],[y,"smarttv"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[w,h,[y,S]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[h,[w,"Amazon"],[y,S]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[h,e.mapper.str,e.maps.device.amazon.model],[w,"Amazon"],[y,b]],[/android.+aft([bms])\sbuild/i],[h,[w,"Amazon"],[y,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[h,w,[y,b]],[/\((ip[honed|\s\w*]+);/i],[h,[w,"Apple"],[y,b]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[w,h,[y,b]],[/\(bb10;\s(\w+)/i],[h,[w,"BlackBerry"],[y,b]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[h,[w,"Asus"],[y,S]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[w,"Sony"],[h,"Xperia Tablet"],[y,S]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[h,[w,"Sony"],[y,b]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[w,h,[y,"console"]],[/android.+;\s(shield)\sbuild/i],[h,[w,"Nvidia"],[y,"console"]],[/(playstation\s[34portablevi]+)/i],[h,[w,"Sony"],[y,"console"]],[/(sprint\s(\w+))/i],[[w,e.mapper.str,e.maps.device.sprint.vendor],[h,e.mapper.str,e.maps.device.sprint.model],[y,b]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[w,[h,/_/g," "],[y,b]],[/(nexus\s9)/i],[h,[w,"HTC"],[y,S]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[h,[w,"Huawei"],[y,b]],[/android.+(bah2?-a?[lw]\d{2})/i],[h,[w,"Huawei"],[y,S]],[/(microsoft);\s(lumia[\s\w]+)/i],[w,h,[y,b]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[h,[w,"Microsoft"],[y,"console"]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[w,"Microsoft"],[y,b]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[h,[w,"Motorola"],[y,b]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[h,[w,"Motorola"],[y,S]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[w,e.util.trim],[h,e.util.trim],[y,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[w,"Samsung"],[y,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[h,[w,"Sharp"],[y,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[w,"Samsung"],h,[y,S]],[/smart-tv.+(samsung)/i],[w,[y,"smarttv"],h],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[w,"Samsung"],h,[y,b]],[/sie-(\w*)/i],[h,[w,"Siemens"],[y,b]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[w,"Nokia"],h,[y,b]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[h,[w,"Acer"],[y,S]],[/android.+([vl]k\-?\d{3})\s+build/i],[h,[w,"LG"],[y,S]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[w,"LG"],h,[y,S]],[/(lg) netcast\.tv/i],[w,h,[y,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[h,[w,"LG"],[y,b]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[w,h,[y,S]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[h,[w,"Lenovo"],[y,S]],[/(lenovo)[_\s-]?([\w-]+)/i],[w,h,[y,b]],[/linux;.+((jolla));/i],[w,h,[y,b]],[/((pebble))app\/[\d\.]+\s/i],[w,h,[y,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[w,h,[y,b]],[/crkey/i],[[h,"Chromecast"],[w,"Google"],[y,"smarttv"]],[/android.+;\s(glass)\s\d/i],[h,[w,"Google"],[y,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[h,[w,"Google"],[y,S]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[h,[w,"Google"],[y,b]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[h,/_/g," "],[w,"Xiaomi"],[y,b]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[h,/_/g," "],[w,"Xiaomi"],[y,S]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[h,[w,"Meizu"],[y,b]],[/(mz)-([\w-]{2,})/i],[[w,"Meizu"],h,[y,b]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[h,[w,"OnePlus"],[y,b]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[h,[w,"RCA"],[y,S]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[h,[w,"Dell"],[y,S]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[h,[w,"Verizon"],[y,S]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[w,"Barnes & Noble"],h,[y,S]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[h,[w,"NuVision"],[y,S]],[/android.+;\s(k88)\sbuild/i],[h,[w,"ZTE"],[y,S]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[h,[w,"Swiss"],[y,b]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[h,[w,"Swiss"],[y,S]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[h,[w,"Zeki"],[y,S]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[w,"Dragon Touch"],h,[y,S]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[h,[w,"Insignia"],[y,S]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[h,[w,"NextBook"],[y,S]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[w,"Voice"],h,[y,b]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[w,"LvTel"],h,[y,b]],[/android.+;\s(PH-1)\s/i],[h,[w,"Essential"],[y,b]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[h,[w,"Envizen"],[y,S]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[w,h,[y,S]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[h,[w,"MachSpeed"],[y,S]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[w,h,[y,S]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[h,[w,"Rotor"],[y,S]],[/android.+(KS(.+))\s+build/i],[h,[w,"Amazon"],[y,S]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[w,h,[y,S]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[y,e.util.lowerize],w,h],[/[\s\/\(](smart-?tv)[;\)]/i],[[y,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[h,[w,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[m,[g,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[g,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[g,m],[/rv\:([\w\.]{1,9}).+(gecko)/i],[m,g]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[g,m],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[g,e.mapper.str,e.maps.os.windows],[m,e.mapper.str,e.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[g,"Windows"],[m,e.mapper.str,e.maps.os.windows.version]],[/\((bb)(10);/i],[[g,"BlackBerry"],m],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[g,m],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[g,"Symbian"],m],[/\((series40);/i],[g],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[g,"Firefox OS"],m],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[g,"Linux"],m],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[g,"Chromium OS"],m],[/(sunos)\s?([\w\.\d]*)/i],[[g,"Solaris"],m],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[g,"Linux"],m],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[g,"iPhone"],[m,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[g,"iPad"],[m,/_/g,"."]],[/(haiku)\s(\w+)/i],[g,m],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[m,/_/g,"."],[g,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[g,"Mac"],[m,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[g,m]]},e}(),E=function(){function e(){}return e.generate=function(e){var t,r;if(void 0===e){var n={hostname:"",pathname:"",host:"",search:"",protocol:""};r={navigator:{userAgent:"",vendor:"",languages:[]},document:{location:n,title:""},location:n,screen:{width:"",height:""}}}else r=e;var o=x.parse(r.navigator.userAgent),i=o.browser,a=o.os,s=o.device,u=s.type?"mobile"===s.type?"Mobile":"ETC":"Web",c=(r.location.protocol||"").replace(":",""),f=r.screen,l="";try{l=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}return{platform:u||"",browserName:i.name||"",browserMajorVersion:i.major||"",browserVersion:i.version||"",osName:a.name||"",osVersion:a.version||"",deviceModel:s.model||"",deviceType:s.type||"",deviceVendor:s.vendor||"",language:(null===(t=r.navigator.languages)||void 0===t?void 0:t[0])||"",userAgent:r.navigator.userAgent||"",pagePath:r.location.pathname||"",pageTitle:r.document.title||"",host:r.location.host||"",protocol:c,referrer:r.document.referrer||"",queryParameter:r.location.search||"",screenWidth:f.width||"",screenHeight:f.height||"",timeZone:l||""}},e}(),A=function(){function t(){}return t.prototype.resolveOrNull=function(e){var t=this._resolveUser(e);return this._resolveHackleUserOrNull(t)},t.prototype._resolveUser=function(e){return e?"string"==typeof e?{id:e}:e:{id:l()}},t.prototype._resolveHackleUserOrNull=function(t){var r=new e.IdentifiersBuilder;r.addIdentifiers(t.identifiers||{}),t.id&&r.add(e.IdentifierType.ID,t.id),t.userId&&r.add(e.IdentifierType.USER,t.userId),r.add(e.IdentifierType.DEVICE,t.deviceId||l());var n=r.build();if(0!==Object.keys(n).length)return{identifiers:n,properties:t.properties||{},hackleProperties:this._getHackleProperties()}},t.prototype._getHackleProperties=function(){var e;return"undefined"!=typeof window&&(e=E.generate(window)),e||{}},t}(),O=e.Logger.log,k=function(){function t(t,r,n){this.hackleInternalClient=new e.HackleInternalClient(t,r,n),this.hackleUserResolver=new A}return t.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},t.prototype.variationDetail=function(t,r,n){var o=n||"A";try{var i=this.hackleUserResolver.resolveOrNull(r);return i?this.hackleInternalClient._experiment(t,i,o):e.Decision.of(o,e.DecisionReason.INVALID_INPUT)}catch(r){return O.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(o,"] : ").concat(r)),e.Decision.of(o,e.DecisionReason.EXCEPTION)}},t.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},t.prototype.featureFlagDetail=function(t,r){try{var n=this.hackleUserResolver.resolveOrNull(r);return n?this.hackleInternalClient._featureFlag(t,n):e.FeatureFlagDecision.off(e.DecisionReason.INVALID_INPUT)}catch(r){return O.error('"Unexpected exception while deciding feature flag['.concat(t,"]. Returning default value[false] : ").concat(r)),e.FeatureFlagDecision.off(e.DecisionReason.EXCEPTION)}},t.prototype.track=function(e,t){O.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.hackleUserResolver.resolveOrNull(t);n&&this.hackleInternalClient._track(r,n)},t.prototype.trackPageView=function(e){O.debug("tracking page view");var t=this.hackleUserResolver.resolveOrNull(null==e?void 0:e.user);t&&this.hackleInternalClient._track({key:"$page_view"},t)},t.prototype.onReady=function(t,r){void 0===r&&(r=e.DEFAULT_ON_READY_TIMEOUT),this.hackleInternalClient._onReady(t,r)},t.prototype.onInitialized=function(e){return this.hackleInternalClient._onInitialized({timeout:null==e?void 0:e.timeout})},t.prototype.close=function(){O.debug("Hackle Client is closing"),this.hackleInternalClient._close()},t.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},t}(),T=function(){function t(e,t,r,n){var o=this;this.workspace=null,this.sdkKey=e,this.httpGetRequest=t,this.eventEmitter=r,this.isStarted=!1,this.updateInterval=n.updateInterval,this.fetchUrl=n.fetchUrl,this.headers=n.headers,this.readyPromiseResolver=function(){},this.readyPromiseRejecter=function(){},this.readyPromise=new Promise((function(e,t){o.readyPromiseResolver=e,o.readyPromiseRejecter=t})),this.currentTimeout=null,this.errorRetryController=new R,this.currentRequest=null,this.syncOnCurrentRequestComplete=!1,this.isReadyPromiseSettled=!1}return t.prototype.onReady=function(){return this.readyPromise},t.prototype.start=function(){this.isStarted||(this.isStarted=!0,this.errorRetryController.reset(),this.fetch())},t.prototype.stop=function(){return this.isStarted=!1,this.currentTimeout&&(clearTimeout(this.currentTimeout),this.currentTimeout=null),this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null),Promise.resolve()},t.prototype.get=function(){return this.workspace},t.prototype.scheduleNextUpdate=function(){var e=this,t=this.errorRetryController.getDelay(),r=Math.max(t,this.updateInterval);this.currentTimeout=setTimeout((function(){e.currentRequest?e.syncOnCurrentRequestComplete=!0:e.fetch()}),r)},t.prototype.fetch=function(){var e,t=this,r=((e={})["X-HACKLE-SDK-KEY"]=this.sdkKey,e["X-HACKLE-SDK-TIME"]=(new Date).getTime().toString(),e["X-HACKLE-SDK-NAME"]=this.headers["X-HACKLE-SDK-NAME"],e["X-HACKLE-SDK-VERSION"]=this.headers["X-HACKLE-SDK-VERSION"],e);this.currentRequest=this.httpGetRequest(this.fetchUrl,r);var n=function(){t.onRequestComplete()};this.currentRequest.responsePromise.then((function(e){t.onRequestResolved(e)}),(function(e){t.onRequestRejected(e)})).then(n,n),this.updateInterval>0&&this.scheduleNextUpdate()},t.prototype.onRequestComplete=function(){this.isStarted&&(this.currentRequest=null,this.syncOnCurrentRequestComplete&&this.fetch(),this.syncOnCurrentRequestComplete=!1)},t.prototype.onRequestResolved=function(t){var r=this;if(this.isStarted&&(void 0!==t.statusCode&&t.statusCode>=200&&t.statusCode<400?this.errorRetryController.reset():401===t.statusCode||403===t.statusCode?this.readyPromiseRejecter(new Error("Invalid key provided.")):this.errorRetryController.countError(),t.body)){var n=JSON.parse(t.body);this.workspace||setTimeout((function(){r.eventEmitter.emit("ready")}),0),this.workspace=e.Workspace.from(n),this.readyPromiseResolver()}},t.prototype.onRequestRejected=function(e){this.isStarted&&(this.errorRetryController.countError(),console.error("Error fetching data",e))},t.prototype.close=function(){this.stop()},t}(),R=function(){function e(){this.errorCount=0}return e.prototype.getDelay=function(){return 0===this.errorCount?0:1e3*o[Math.min(o.length-1,this.errorCount)]+Math.round(1e3*Math.random())},e.prototype.countError=function(){this.errorCount<o.length-1&&this.errorCount++},e.prototype.reset=function(){this.errorCount=0},e}(),I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},j=function(e){return e&&e.Math==Math&&e},C=j("object"==typeof globalThis&&globalThis)||j("object"==typeof window&&window)||j("object"==typeof self&&self)||j("object"==typeof I&&I)||function(){return this}()||Function("return this")(),_={},P=function(e){try{return!!e()}catch(e){return!0}},N=!P((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),L=!P((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),D=L,M=Function.prototype.call,U=D?M.bind(M):function(){return M.apply(M,arguments)},z={},F={}.propertyIsEnumerable,B=Object.getOwnPropertyDescriptor,K=B&&!F.call({1:2},1);z.f=K?function(e){var t=B(this,e);return!!t&&t.enumerable}:F;var q,H,V=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G=L,X=Function.prototype,W=X.bind,Y=X.call,$=G&&W.bind(Y,Y),J=G?function(e){return e&&$(e)}:function(e){return e&&function(){return Y.apply(e,arguments)}},Z=J,Q=Z({}.toString),ee=Z("".slice),te=function(e){return ee(Q(e),8,-1)},re=J,ne=P,oe=te,ie=C.Object,ae=re("".split),se=ne((function(){return!ie("z").propertyIsEnumerable(0)}))?function(e){return"String"==oe(e)?ae(e,""):ie(e)}:ie,ue=C.TypeError,ce=function(e){if(null==e)throw ue("Can't call method on "+e);return e},fe=se,le=ce,de=function(e){return fe(le(e))},pe=function(e){return"function"==typeof e},ve=pe,he=function(e){return"object"==typeof e?null!==e:ve(e)},ge=C,ye=pe,we=function(e){return ye(e)?e:void 0},me=function(e,t){return arguments.length<2?we(ge[e]):ge[e]&&ge[e][t]},be=J({}.isPrototypeOf),Se=me("navigator","userAgent")||"",xe=C,Ee=Se,Ae=xe.process,Oe=xe.Deno,ke=Ae&&Ae.versions||Oe&&Oe.version,Te=ke&&ke.v8;Te&&(H=(q=Te.split("."))[0]>0&&q[0]<4?1:+(q[0]+q[1])),!H&&Ee&&(!(q=Ee.match(/Edge\/(\d+)/))||q[1]>=74)&&(q=Ee.match(/Chrome\/(\d+)/))&&(H=+q[1]);var Re=H,Ie=Re,je=P,Ce=!!Object.getOwnPropertySymbols&&!je((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ie&&Ie<41})),_e=Ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pe=me,Ne=pe,Le=be,De=_e,Me=C.Object,Ue=De?function(e){return"symbol"==typeof e}:function(e){var t=Pe("Symbol");return Ne(t)&&Le(t.prototype,Me(e))},ze=C.String,Fe=function(e){try{return ze(e)}catch(e){return"Object"}},Be=pe,Ke=Fe,qe=C.TypeError,He=function(e){if(Be(e))return e;throw qe(Ke(e)+" is not a function")},Ve=He,Ge=function(e,t){var r=e[t];return null==r?void 0:Ve(r)},Xe=U,We=pe,Ye=he,$e=C.TypeError,Je={exports:{}},Ze=C,Qe=Object.defineProperty,et=function(e,t){try{Qe(Ze,e,{value:t,configurable:!0,writable:!0})}catch(r){Ze[e]=t}return t},tt=et,rt=C["__core-js_shared__"]||tt("__core-js_shared__",{}),nt=rt;(Je.exports=function(e,t){return nt[e]||(nt[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.7",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.7/LICENSE",source:"https://github.com/zloirock/core-js"});var ot=ce,it=C.Object,at=function(e){return it(ot(e))},st=at,ut=J({}.hasOwnProperty),ct=Object.hasOwn||function(e,t){return ut(st(e),t)},ft=J,lt=0,dt=Math.random(),pt=ft(1..toString),vt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+pt(++lt+dt,36)},ht=C,gt=Je.exports,yt=ct,wt=vt,mt=Ce,bt=_e,St=gt("wks"),xt=ht.Symbol,Et=xt&&xt.for,At=bt?xt:xt&&xt.withoutSetter||wt,Ot=function(e){if(!yt(St,e)||!mt&&"string"!=typeof St[e]){var t="Symbol."+e;mt&&yt(xt,e)?St[e]=xt[e]:St[e]=bt&&Et?Et(t):At(t)}return St[e]},kt=U,Tt=he,Rt=Ue,It=Ge,jt=function(e,t){var r,n;if("string"===t&&We(r=e.toString)&&!Ye(n=Xe(r,e)))return n;if(We(r=e.valueOf)&&!Ye(n=Xe(r,e)))return n;if("string"!==t&&We(r=e.toString)&&!Ye(n=Xe(r,e)))return n;throw $e("Can't convert object to primitive value")},Ct=Ot,_t=C.TypeError,Pt=Ct("toPrimitive"),Nt=function(e,t){if(!Tt(e)||Rt(e))return e;var r,n=It(e,Pt);if(n){if(void 0===t&&(t="default"),r=kt(n,e,t),!Tt(r)||Rt(r))return r;throw _t("Can't convert object to primitive value")}return void 0===t&&(t="number"),jt(e,t)},Lt=Ue,Dt=function(e){var t=Nt(e,"string");return Lt(t)?t:t+""},Mt=he,Ut=C.document,zt=Mt(Ut)&&Mt(Ut.createElement),Ft=function(e){return zt?Ut.createElement(e):{}},Bt=Ft,Kt=!N&&!P((function(){return 7!=Object.defineProperty(Bt("div"),"a",{get:function(){return 7}}).a})),qt=N,Ht=U,Vt=z,Gt=V,Xt=de,Wt=Dt,Yt=ct,$t=Kt,Jt=Object.getOwnPropertyDescriptor;_.f=qt?Jt:function(e,t){if(e=Xt(e),t=Wt(t),$t)try{return Jt(e,t)}catch(e){}if(Yt(e,t))return Gt(!Ht(Vt.f,e,t),e[t])};var Zt={},Qt=N&&P((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),er=C,tr=he,rr=er.String,nr=er.TypeError,or=function(e){if(tr(e))return e;throw nr(rr(e)+" is not an object")},ir=N,ar=Kt,sr=Qt,ur=or,cr=Dt,fr=C.TypeError,lr=Object.defineProperty,dr=Object.getOwnPropertyDescriptor;Zt.f=ir?sr?function(e,t,r){if(ur(e),t=cr(t),ur(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=dr(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(ur(e),t=cr(t),ur(r),ar)try{return lr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw fr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var pr=Zt,vr=V,hr=N?function(e,t,r){return pr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},gr={exports:{}},yr=N,wr=ct,mr=Function.prototype,br=yr&&Object.getOwnPropertyDescriptor,Sr=wr(mr,"name"),xr={EXISTS:Sr,PROPER:Sr&&"something"===function(){}.name,CONFIGURABLE:Sr&&(!yr||yr&&br(mr,"name").configurable)},Er=pe,Ar=rt,Or=J(Function.toString);Er(Ar.inspectSource)||(Ar.inspectSource=function(e){return Or(e)});var kr,Tr,Rr,Ir=Ar.inspectSource,jr=pe,Cr=Ir,_r=C.WeakMap,Pr=jr(_r)&&/native code/.test(Cr(_r)),Nr=Je.exports,Lr=vt,Dr=Nr("keys"),Mr=function(e){return Dr[e]||(Dr[e]=Lr(e))},Ur={},zr=Pr,Fr=C,Br=J,Kr=he,qr=hr,Hr=ct,Vr=rt,Gr=Mr,Xr=Ur,Wr=Fr.TypeError,Yr=Fr.WeakMap;if(zr||Vr.state){var $r=Vr.state||(Vr.state=new Yr),Jr=Br($r.get),Zr=Br($r.has),Qr=Br($r.set);kr=function(e,t){if(Zr($r,e))throw new Wr("Object already initialized");return t.facade=e,Qr($r,e,t),t},Tr=function(e){return Jr($r,e)||{}},Rr=function(e){return Zr($r,e)}}else{var en=Gr("state");Xr[en]=!0,kr=function(e,t){if(Hr(e,en))throw new Wr("Object already initialized");return t.facade=e,qr(e,en,t),t},Tr=function(e){return Hr(e,en)?e[en]:{}},Rr=function(e){return Hr(e,en)}}var tn={set:kr,get:Tr,has:Rr,enforce:function(e){return Rr(e)?Tr(e):kr(e,{})},getterFor:function(e){return function(t){var r;if(!Kr(t)||(r=Tr(t)).type!==e)throw Wr("Incompatible receiver, "+e+" required");return r}}},rn=P,nn=pe,on=ct,an=N,sn=xr.CONFIGURABLE,un=Ir,cn=tn.enforce,fn=tn.get,ln=Object.defineProperty,dn=an&&!rn((function(){return 8!==ln((function(){}),"length",{value:8}).length})),pn=String(String).split("String"),vn=gr.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!on(e,"name")||sn&&e.name!==t)&&ln(e,"name",{value:t,configurable:!0}),dn&&r&&on(r,"arity")&&e.length!==r.arity&&ln(e,"length",{value:r.arity});try{r&&on(r,"constructor")&&r.constructor?an&&ln(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=cn(e);return on(n,"source")||(n.source=pn.join("string"==typeof t?t:"")),e};Function.prototype.toString=vn((function(){return nn(this)&&fn(this).source||un(this)}),"toString");var hn=pe,gn=hr,yn=gr.exports,wn=et,mn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;return hn(r)&&yn(r,i,n),n.global?o?e[t]=r:wn(t,r):(n.unsafe?e[t]&&(o=!0):delete e[t],o?e[t]=r:gn(e,t,r)),e},bn={},Sn=Math.ceil,xn=Math.floor,En=Math.trunc||function(e){var t=+e;return(t>0?xn:Sn)(t)},An=function(e){var t=+e;return t!=t||0===t?0:En(t)},On=An,kn=Math.max,Tn=Math.min,Rn=function(e,t){var r=On(e);return r<0?kn(r+t,0):Tn(r,t)},In=An,jn=Math.min,Cn=function(e){return e>0?jn(In(e),9007199254740991):0},_n=function(e){return Cn(e.length)},Pn=de,Nn=Rn,Ln=_n,Dn=function(e){return function(t,r,n){var o,i=Pn(t),a=Ln(i),s=Nn(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},Mn={includes:Dn(!0),indexOf:Dn(!1)},Un=ct,zn=de,Fn=Mn.indexOf,Bn=Ur,Kn=J([].push),qn=function(e,t){var r,n=zn(e),o=0,i=[];for(r in n)!Un(Bn,r)&&Un(n,r)&&Kn(i,r);for(;t.length>o;)Un(n,r=t[o++])&&(~Fn(i,r)||Kn(i,r));return i},Hn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Vn=qn,Gn=Hn.concat("length","prototype");bn.f=Object.getOwnPropertyNames||function(e){return Vn(e,Gn)};var Xn={};Xn.f=Object.getOwnPropertySymbols;var Wn=me,Yn=bn,$n=Xn,Jn=or,Zn=J([].concat),Qn=Wn("Reflect","ownKeys")||function(e){var t=Yn.f(Jn(e)),r=$n.f;return r?Zn(t,r(e)):t},eo=ct,to=Qn,ro=_,no=Zt,oo=function(e,t,r){for(var n=to(t),o=no.f,i=ro.f,a=0;a<n.length;a++){var s=n[a];eo(e,s)||r&&eo(r,s)||o(e,s,i(t,s))}},io=P,ao=pe,so=/#|\.prototype\./,uo=function(e,t){var r=fo[co(e)];return r==po||r!=lo&&(ao(t)?io(t):!!t)},co=uo.normalize=function(e){return String(e).replace(so,".").toLowerCase()},fo=uo.data={},lo=uo.NATIVE="N",po=uo.POLYFILL="P",vo=uo,ho=C,go=_.f,yo=hr,wo=mn,mo=et,bo=oo,So=vo,xo=function(e,t){var r,n,o,i,a,s=e.target,u=e.global,c=e.stat;if(r=u?ho:c?ho[s]||mo(s,{}):(ho[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=go(r,n))&&a.value:r[n],!So(u?n:s+(c?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;bo(i,o)}(e.sham||o&&o.sham)&&yo(i,"sham",!0),wo(r,n,i,e)}},Eo=!P((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ao=C,Oo=ct,ko=pe,To=at,Ro=Eo,Io=Mr("IE_PROTO"),jo=Ao.Object,Co=jo.prototype,_o=Ro?jo.getPrototypeOf:function(e){var t=To(e);if(Oo(t,Io))return t[Io];var r=t.constructor;return ko(r)&&t instanceof r?r.prototype:t instanceof jo?Co:null},Po=C,No=pe,Lo=Po.String,Do=Po.TypeError,Mo=J,Uo=or,zo=function(e){if("object"==typeof e||No(e))return e;throw Do("Can't set "+Lo(e)+" as a prototype")},Fo=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Mo(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Uo(r),zo(n),t?e(r,n):r.__proto__=n,r}}():void 0),Bo={},Ko=qn,qo=Hn,Ho=Object.keys||function(e){return Ko(e,qo)},Vo=N,Go=Qt,Xo=Zt,Wo=or,Yo=de,$o=Ho;Bo.f=Vo&&!Go?Object.defineProperties:function(e,t){Wo(e);for(var r,n=Yo(t),o=$o(t),i=o.length,a=0;i>a;)Xo.f(e,r=o[a++],n[r]);return e};var Jo,Zo=me("document","documentElement"),Qo=or,ei=Bo,ti=Hn,ri=Ur,ni=Zo,oi=Ft,ii=Mr("IE_PROTO"),ai=function(){},si=function(e){return"<script>"+e+"<\/script>"},ui=function(e){e.write(si("")),e.close();var t=e.parentWindow.Object;return e=null,t},ci=function(){try{Jo=new ActiveXObject("htmlfile")}catch(e){}var e,t;ci="undefined"!=typeof document?document.domain&&Jo?ui(Jo):((t=oi("iframe")).style.display="none",ni.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(si("document.F=Object")),e.close(),e.F):ui(Jo);for(var r=ti.length;r--;)delete ci.prototype[ti[r]];return ci()};ri[ii]=!0;var fi=Object.create||function(e,t){var r;return null!==e?(ai.prototype=Qo(e),r=new ai,ai.prototype=null,r[ii]=e):r=ci(),void 0===t?r:ei.f(r,t)},li=Error,di=J("".replace),pi=String(li("zxcasd").stack),vi=/\n\s*at [^:]*:[^\n]*/,hi=vi.test(pi),gi=he,yi=hr,wi=He,mi=L,bi=J(J.bind),Si=function(e,t){return wi(e),void 0===t?e:mi?bi(e,t):function(){return e.apply(t,arguments)}},xi={},Ei=xi,Ai=Ot("iterator"),Oi=Array.prototype,ki=function(e){return void 0!==e&&(Ei.Array===e||Oi[Ai]===e)},Ti={};Ti[Ot("toStringTag")]="z";var Ri="[object z]"===String(Ti),Ii=C,ji=Ri,Ci=pe,_i=te,Pi=Ot("toStringTag"),Ni=Ii.Object,Li="Arguments"==_i(function(){return arguments}()),Di=ji?_i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Ni(e),Pi))?r:Li?_i(t):"Object"==(n=_i(t))&&Ci(t.callee)?"Arguments":n},Mi=Di,Ui=Ge,zi=xi,Fi=Ot("iterator"),Bi=function(e){if(null!=e)return Ui(e,Fi)||Ui(e,"@@iterator")||zi[Mi(e)]},Ki=U,qi=He,Hi=or,Vi=Fe,Gi=Bi,Xi=C.TypeError,Wi=function(e,t){var r=arguments.length<2?Gi(e):t;if(qi(r))return Hi(Ki(r,e));throw Xi(Vi(e)+" is not iterable")},Yi=U,$i=or,Ji=Ge,Zi=function(e,t,r){var n,o;$i(e);try{if(!(n=Ji(e,"return"))){if("throw"===t)throw r;return r}n=Yi(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return $i(n),r},Qi=Si,ea=U,ta=or,ra=Fe,na=ki,oa=_n,ia=be,aa=Wi,sa=Bi,ua=Zi,ca=C.TypeError,fa=function(e,t){this.stopped=e,this.result=t},la=fa.prototype,da=function(e,t,r){var n,o,i,a,s,u,c,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=Qi(t,f),h=function(e){return n&&ua(n,"normal",e),new fa(!0,e)},g=function(e){return l?(ta(e),p?v(e[0],e[1],h):v(e[0],e[1])):p?v(e,h):v(e)};if(d)n=e;else{if(!(o=sa(e)))throw ca(ra(e)+" is not iterable");if(na(o)){for(i=0,a=oa(e);a>i;i++)if((s=g(e[i]))&&ia(la,s))return s;return new fa(!1)}n=aa(e,o)}for(u=n.next;!(c=ea(u,n)).done;){try{s=g(c.value)}catch(e){ua(n,"throw",e)}if("object"==typeof s&&s&&ia(la,s))return s}return new fa(!1)},pa=Di,va=C.String,ha=function(e){if("Symbol"===pa(e))throw TypeError("Cannot convert a Symbol value to a string");return va(e)},ga=ha,ya=V,wa=!P((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ya(1,7)),7!==e.stack)})),ma=xo,ba=C,Sa=be,xa=_o,Ea=Fo,Aa=oo,Oa=fi,ka=hr,Ta=V,Ra=function(e,t){if(hi&&"string"==typeof e&&!li.prepareStackTrace)for(;t--;)e=di(e,vi,"");return e},Ia=function(e,t){gi(t)&&"cause"in t&&yi(e,"cause",t.cause)},ja=da,Ca=function(e,t){return void 0===e?arguments.length<2?"":t:ga(e)},_a=wa,Pa=Ot("toStringTag"),Na=ba.Error,La=[].push,Da=function(e,t){var r,n=arguments.length>2?arguments[2]:void 0,o=Sa(Ma,this);Ea?r=Ea(new Na,o?xa(this):Ma):(r=o?this:Oa(Ma),ka(r,Pa,"Error")),void 0!==t&&ka(r,"message",Ca(t)),_a&&ka(r,"stack",Ra(r.stack,1)),Ia(r,n);var i=[];return ja(e,La,{that:i}),ka(r,"errors",i),r};Ea?Ea(Da,Na):Aa(Da,Na,{name:!0});var Ma=Da.prototype=Oa(Na.prototype,{constructor:Ta(1,Da),message:Ta(1,""),name:Ta(1,"AggregateError")});ma({global:!0,constructor:!0,arity:2},{AggregateError:Da});var Ua=Ot,za=fi,Fa=Zt.f,Ba=Ua("unscopables"),Ka=Array.prototype;null==Ka[Ba]&&Fa(Ka,Ba,{configurable:!0,value:za(null)});var qa,Ha,Va,Ga=function(e){Ka[Ba][e]=!0},Xa=P,Wa=pe,Ya=_o,$a=mn,Ja=Ot("iterator"),Za=!1;[].keys&&("next"in(Va=[].keys())?(Ha=Ya(Ya(Va)))!==Object.prototype&&(qa=Ha):Za=!0);var Qa=null==qa||Xa((function(){var e={};return qa[Ja].call(e)!==e}));Qa&&(qa={}),Wa(qa[Ja])||$a(qa,Ja,(function(){return this}));var es={IteratorPrototype:qa,BUGGY_SAFARI_ITERATORS:Za},ts=Zt.f,rs=ct,ns=Ot("toStringTag"),os=function(e,t,r){e&&!r&&(e=e.prototype),e&&!rs(e,ns)&&ts(e,ns,{configurable:!0,value:t})},is=es.IteratorPrototype,as=fi,ss=V,us=os,cs=xi,fs=function(){return this},ls=xo,ds=U,ps=pe,vs=function(e,t,r,n){var o=t+" Iterator";return e.prototype=as(is,{next:ss(+!n,r)}),us(e,o,!1),cs[o]=fs,e},hs=_o,gs=Fo,ys=os,ws=hr,ms=mn,bs=xi,Ss=xr.PROPER,xs=xr.CONFIGURABLE,Es=es.IteratorPrototype,As=es.BUGGY_SAFARI_ITERATORS,Os=Ot("iterator"),ks=function(){return this},Ts=function(e,t,r,n,o,i,a){vs(r,t,n);var s,u,c,f=function(e){if(e===o&&h)return h;if(!As&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",d=!1,p=e.prototype,v=p[Os]||p["@@iterator"]||o&&p[o],h=!As&&v||f(o),g="Array"==t&&p.entries||v;if(g&&(s=hs(g.call(new e)))!==Object.prototype&&s.next&&(hs(s)!==Es&&(gs?gs(s,Es):ps(s[Os])||ms(s,Os,ks)),ys(s,l,!0)),Ss&&"values"==o&&v&&"values"!==v.name&&(xs?ws(p,"name","values"):(d=!0,h=function(){return ds(v,this)})),o)if(u={values:f("values"),keys:i?h:f("keys"),entries:f("entries")},a)for(c in u)(As||d||!(c in p))&&ms(p,c,u[c]);else ls({target:t,proto:!0,forced:As||d},u);return p[Os]!==h&&ms(p,Os,h,{name:o}),bs[t]=h,u},Rs=de,Is=Ga,js=xi,Cs=tn,_s=Zt.f,Ps=Ts,Ns=N,Ls=Cs.set,Ds=Cs.getterFor("Array Iterator"),Ms=Ps(Array,"Array",(function(e,t){Ls(this,{type:"Array Iterator",target:Rs(e),index:0,kind:t})}),(function(){var e=Ds(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),Us=js.Arguments=js.Array;if(Is("keys"),Is("values"),Is("entries"),Ns&&"values"!==Us.name)try{_s(Us,"name",{value:"values"})}catch(e){}var zs=Di,Fs=Ri?{}.toString:function(){return"[object "+zs(this)+"]"};Ri||mn(Object.prototype,"toString",Fs,{unsafe:!0});var Bs="process"==te(C.process),Ks=me,qs=Zt,Hs=N,Vs=Ot("species"),Gs=function(e){var t=Ks(e),r=qs.f;Hs&&t&&!t[Vs]&&r(t,Vs,{configurable:!0,get:function(){return this}})},Xs=be,Ws=C.TypeError,Ys=function(e,t){if(Xs(t,e))return e;throw Ws("Incorrect invocation")},$s=J,Js=P,Zs=pe,Qs=Di,eu=Ir,tu=function(){},ru=[],nu=me("Reflect","construct"),ou=/^\s*(?:class|function)\b/,iu=$s(ou.exec),au=!ou.exec(tu),su=function(e){if(!Zs(e))return!1;try{return nu(tu,ru,e),!0}catch(e){return!1}},uu=function(e){if(!Zs(e))return!1;switch(Qs(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return au||!!iu(ou,eu(e))}catch(e){return!0}};uu.sham=!0;var cu,fu,lu,du,pu=!nu||Js((function(){var e;return su(su.call)||!su(Object)||!su((function(){e=!0}))||e}))?uu:su,vu=pu,hu=Fe,gu=C.TypeError,yu=or,wu=function(e){if(vu(e))return e;throw gu(hu(e)+" is not a constructor")},mu=Ot("species"),bu=function(e,t){var r,n=yu(e).constructor;return void 0===n||null==(r=yu(n)[mu])?t:wu(r)},Su=L,xu=Function.prototype,Eu=xu.apply,Au=xu.call,Ou="object"==typeof Reflect&&Reflect.apply||(Su?Au.bind(Eu):function(){return Au.apply(Eu,arguments)}),ku=J([].slice),Tu=C.TypeError,Ru=/(?:ipad|iphone|ipod).*applewebkit/i.test(Se),Iu=C,ju=Ou,Cu=Si,_u=pe,Pu=ct,Nu=P,Lu=Zo,Du=ku,Mu=Ft,Uu=function(e,t){if(e<t)throw Tu("Not enough arguments");return e},zu=Ru,Fu=Bs,Bu=Iu.setImmediate,Ku=Iu.clearImmediate,qu=Iu.process,Hu=Iu.Dispatch,Vu=Iu.Function,Gu=Iu.MessageChannel,Xu=Iu.String,Wu=0,Yu={};try{cu=Iu.location}catch(e){}var $u=function(e){if(Pu(Yu,e)){var t=Yu[e];delete Yu[e],t()}},Ju=function(e){return function(){$u(e)}},Zu=function(e){$u(e.data)},Qu=function(e){Iu.postMessage(Xu(e),cu.protocol+"//"+cu.host)};Bu&&Ku||(Bu=function(e){Uu(arguments.length,1);var t=_u(e)?e:Vu(e),r=Du(arguments,1);return Yu[++Wu]=function(){ju(t,void 0,r)},fu(Wu),Wu},Ku=function(e){delete Yu[e]},Fu?fu=function(e){qu.nextTick(Ju(e))}:Hu&&Hu.now?fu=function(e){Hu.now(Ju(e))}:Gu&&!zu?(du=(lu=new Gu).port2,lu.port1.onmessage=Zu,fu=Cu(du.postMessage,du)):Iu.addEventListener&&_u(Iu.postMessage)&&!Iu.importScripts&&cu&&"file:"!==cu.protocol&&!Nu(Qu)?(fu=Qu,Iu.addEventListener("message",Zu,!1)):fu="onreadystatechange"in Mu("script")?function(e){Lu.appendChild(Mu("script")).onreadystatechange=function(){Lu.removeChild(this),$u(e)}}:function(e){setTimeout(Ju(e),0)});var ec,tc,rc,nc,oc,ic,ac,sc,uc={set:Bu,clear:Ku},cc=C,fc=/ipad|iphone|ipod/i.test(Se)&&void 0!==cc.Pebble,lc=/web0s(?!.*chrome)/i.test(Se),dc=C,pc=Si,vc=_.f,hc=uc.set,gc=Ru,yc=fc,wc=lc,mc=Bs,bc=dc.MutationObserver||dc.WebKitMutationObserver,Sc=dc.document,xc=dc.process,Ec=dc.Promise,Ac=vc(dc,"queueMicrotask"),Oc=Ac&&Ac.value;Oc||(ec=function(){var e,t;for(mc&&(e=xc.domain)&&e.exit();tc;){t=tc.fn,tc=tc.next;try{t()}catch(e){throw tc?nc():rc=void 0,e}}rc=void 0,e&&e.enter()},gc||mc||wc||!bc||!Sc?!yc&&Ec&&Ec.resolve?((ac=Ec.resolve(void 0)).constructor=Ec,sc=pc(ac.then,ac),nc=function(){sc(ec)}):mc?nc=function(){xc.nextTick(ec)}:(hc=pc(hc,dc),nc=function(){hc(ec)}):(oc=!0,ic=Sc.createTextNode(""),new bc(ec).observe(ic,{characterData:!0}),nc=function(){ic.data=oc=!oc}));var kc=Oc||function(e){var t={fn:e,next:void 0};rc&&(rc.next=t),tc||(tc=t,nc()),rc=t},Tc=C,Rc=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Ic=function(){this.head=null,this.tail=null};Ic.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var jc=Ic,Cc=C.Promise,_c="object"==typeof window&&"object"!=typeof Deno,Pc=C,Nc=Cc,Lc=pe,Dc=vo,Mc=Ir,Uc=Ot,zc=_c,Fc=Re;Nc&&Nc.prototype;var Bc=Uc("species"),Kc=!1,qc=Lc(Pc.PromiseRejectionEvent),Hc=Dc("Promise",(function(){var e=Mc(Nc),t=e!==String(Nc);if(!t&&66===Fc)return!0;if(Fc>=51&&/native code/.test(e))return!1;var r=new Nc((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Bc]=n,!(Kc=r.then((function(){}))instanceof n)||!t&&zc&&!qc})),Vc={CONSTRUCTOR:Hc,REJECTION_EVENT:qc,SUBCLASSING:Kc},Gc={},Xc=He,Wc=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=Xc(t),this.reject=Xc(r)};Gc.f=function(e){return new Wc(e)};var Yc,$c,Jc,Zc=xo,Qc=Bs,ef=C,tf=U,rf=mn,nf=Fo,of=os,af=Gs,sf=He,uf=pe,cf=he,ff=Ys,lf=bu,df=uc.set,pf=kc,vf=function(e,t){var r=Tc.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},hf=Rc,gf=jc,yf=tn,wf=Cc,mf=Gc,bf=Vc.CONSTRUCTOR,Sf=Vc.REJECTION_EVENT,xf=Vc.SUBCLASSING,Ef=yf.getterFor("Promise"),Af=yf.set,Of=wf&&wf.prototype,kf=wf,Tf=Of,Rf=ef.TypeError,If=ef.document,jf=ef.process,Cf=mf.f,_f=Cf,Pf=!!(If&&If.createEvent&&ef.dispatchEvent),Nf=function(e){var t;return!(!cf(e)||!uf(t=e.then))&&t},Lf=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&Ff(t),t.rejection=1),!0===s?r=i:(f&&f.enter(),r=s(i),f&&(f.exit(),o=!0)),r===e.promise?c(Rf("Promise-chain cycle")):(n=Nf(r))?tf(n,r,u,c):u(r)):c(i)}catch(e){f&&!o&&f.exit(),c(e)}},Df=function(e,t){e.notified||(e.notified=!0,pf((function(){for(var r,n=e.reactions;r=n.get();)Lf(r,e);e.notified=!1,t&&!e.rejection&&Uf(e)})))},Mf=function(e,t,r){var n,o;Pf?((n=If.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),ef.dispatchEvent(n)):n={promise:t,reason:r},!Sf&&(o=ef["on"+e])?o(n):"unhandledrejection"===e&&vf("Unhandled promise rejection",r)},Uf=function(e){tf(df,ef,(function(){var t,r=e.facade,n=e.value;if(zf(e)&&(t=hf((function(){Qc?jf.emit("unhandledRejection",n,r):Mf("unhandledrejection",r,n)})),e.rejection=Qc||zf(e)?2:1,t.error))throw t.value}))},zf=function(e){return 1!==e.rejection&&!e.parent},Ff=function(e){tf(df,ef,(function(){var t=e.facade;Qc?jf.emit("rejectionHandled",t):Mf("rejectionhandled",t,e.value)}))},Bf=function(e,t,r){return function(n){e(t,n,r)}},Kf=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Df(e,!0))},qf=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Rf("Promise can't be resolved itself");var n=Nf(t);n?pf((function(){var r={done:!1};try{tf(n,t,Bf(qf,r,e),Bf(Kf,r,e))}catch(t){Kf(r,t,e)}})):(e.value=t,e.state=1,Df(e,!1))}catch(t){Kf({done:!1},t,e)}}};if(bf&&(Tf=(kf=function(e){ff(this,Tf),sf(e),tf(Yc,this);var t=Ef(this);try{e(Bf(qf,t),Bf(Kf,t))}catch(e){Kf(t,e)}}).prototype,(Yc=function(e){Af(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new gf,rejection:!1,state:0,value:void 0})}).prototype=rf(Tf,"then",(function(e,t){var r=Ef(this),n=Cf(lf(this,kf));return r.parent=!0,n.ok=!uf(e)||e,n.fail=uf(t)&&t,n.domain=Qc?jf.domain:void 0,0==r.state?r.reactions.add(n):pf((function(){Lf(n,r)})),n.promise})),$c=function(){var e=new Yc,t=Ef(e);this.promise=e,this.resolve=Bf(qf,t),this.reject=Bf(Kf,t)},mf.f=Cf=function(e){return e===kf||undefined===e?new $c(e):_f(e)},uf(wf)&&Of!==Object.prototype)){Jc=Of.then,xf||rf(Of,"then",(function(e,t){var r=this;return new kf((function(e,t){tf(Jc,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Of.constructor}catch(e){}nf&&nf(Of,Tf)}Zc({global:!0,constructor:!0,wrap:!0,forced:bf},{Promise:kf}),of(kf,"Promise",!1),af("Promise");var Hf=Ot("iterator"),Vf=!1;try{var Gf=0,Xf={next:function(){return{done:!!Gf++}},return:function(){Vf=!0}};Xf[Hf]=function(){return this},Array.from(Xf,(function(){throw 2}))}catch(e){}var Wf=function(e,t){if(!t&&!Vf)return!1;var r=!1;try{var n={};n[Hf]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Yf=Cc,$f=Vc.CONSTRUCTOR||!Wf((function(e){Yf.all(e).then(void 0,(function(){}))})),Jf=U,Zf=He,Qf=Gc,el=Rc,tl=da;xo({target:"Promise",stat:!0,forced:$f},{all:function(e){var t=this,r=Qf.f(t),n=r.resolve,o=r.reject,i=el((function(){var r=Zf(t.resolve),i=[],a=0,s=1;tl(e,(function(e){var u=a++,c=!1;s++,Jf(r,t,e).then((function(e){c||(c=!0,i[u]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var rl=xo,nl=Vc.CONSTRUCTOR,ol=Cc,il=me,al=pe,sl=mn,ul=ol&&ol.prototype;if(rl({target:"Promise",proto:!0,forced:nl,real:!0},{catch:function(e){return this.then(void 0,e)}}),al(ol)){var cl=il("Promise").prototype.catch;ul.catch!==cl&&sl(ul,"catch",cl,{