   !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t,n){e.exports=n(15)},function(e,t){function n(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,c,"next",e)}function c(e){n(o,i,a,s,c,"throw",e)}s(void 0)}))}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r=n(12),i=n(13),a=n(14);e.exports=function(e,t){return r(e)||i(e,t)||a()}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r,i,a;!function(n){var o=/iPhone/i,s=/iPod/i,c=/iPad/i,u=/\bAndroid(?:.+)Mobile\b/i,l=/Android/i,f=/\bAndroid(?:.+)SD4930UR\b/i,d=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,p=/Windows Phone/i,h=/\bWindows(?:.+)ARM\b/i,g=/BlackBerry/i,m=/BB10/i,b=/Opera Mini/i,v=/\b(CriOS|Chrome)(?:.+)Mobile/i,w=/Mobile(?:.+)Firefox\b/i;function y(e,t){return e.test(t)}function x(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");void 0!==n[1]&&(t=n[0]),void 0!==(n=t.split("Twitter"))[1]&&(t=n[0]);var r={apple:{phone:y(o,t)&&!y(p,t),ipod:y(s,t),tablet:!y(o,t)&&y(c,t)&&!y(p,t),device:(y(o,t)||y(s,t)||y(c,t))&&!y(p,t)},amazon:{phone:y(f,t),tablet:!y(f,t)&&y(d,t),device:y(f,t)||y(d,t)},android:{phone:!y(p,t)&&y(f,t)||!y(p,t)&&y(u,t),tablet:!y(p,t)&&!y(f,t)&&!y(u,t)&&(y(d,t)||y(l,t)),device:!y(p,t)&&(y(f,t)||y(d,t)||y(u,t)||y(l,t))||y(/\bokhttp\b/i,t)},windows:{phone:y(p,t),tablet:y(h,t),device:y(p,t)||y(h,t)},other:{blackberry:y(g,t),blackberry10:y(m,t),opera:y(b,t),firefox:y(w,t),chrome:y(v,t),device:y(g,t)||y(m,t)||y(b,t)||y(w,t)||y(v,t)}};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}e.exports&&"undefined"==typeof window?e.exports=x:e.exports&&"undefined"!=typeof window?(e.exports=x(),e.exports.isMobile=x):(i=[],r=n.isMobile=x(),void 0===(a="function"==typeof r?r.apply(t,i):r)||(e.exports=a))}(this)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e){e.exports=JSON.parse('{"a":"1.5.2"}')},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var s=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=a.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},a=n(18);var o=function(){function e(){}var t;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},(t=[{key:"BROWSER_MAP",get:function(){return a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e,t),e}();t.default=o,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),a=c(n(94)),o=c(n(95)),s=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,a+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=s.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=s.default.find(o,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(a>0){var d=Object.keys(i),p=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(i[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e){return this.isBrowser(e)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?) Version\//],describe:function(e){var t=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return{name:a.OS_MAP.iOS,version:t}}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?) Version\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},function(e,t,n){var r=n(16),i=n(17),a=n(18);e.exports=function(e){return r(e)||i(e)||a()}},function(e,t,n){n(11),e.exports=n(19)},function(e,t){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var a=t[i];if(e.call(r,a,i,t))return a;i++}},configurable:!0,writable:!0})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var i=t&&t.prototype instanceof l?t:l,a=Object.create(i.prototype),o=new k(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=w(o,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,o),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function l(){}function f(){}function d(){}var p={};p[i]=function(){return this};var h=Object.getPrototypeOf,g=h&&h(h(_([])));g&&g!==t&&n.call(g,i)&&(p=g);var m=d.prototype=l.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function v(e){var t;this._invoke=function(r,i){function a(){return new Promise((function(t,a){!function t(r,i,a,o){var s=c(e[r],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return t("throw",e,a,o)}))}o(s.arg)}(r,i,t,a)}))}return t=t?t.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function y(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(y,this),this.reset(!0)}function _(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:M}}function M(){return{value:void 0,done:!0}}return f.prototype=m.constructor=d,d.constructor=f,d[o]=f.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(v.prototype),v.prototype[a]=function(){return this},e.AsyncIterator=v,e.async=function(t,n,r,i){var a=new v(s(t,n,r,i));return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(m),m[o]="Generator",m[i]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=_,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n.n(r),a=n(3),o=n.n(a),s=n(0),c=n.n(s),u=n(1),l=n.n(u),f=n(6),d=n.n(f),p=n(4),h=n.n(p),g=n(7),m=n(8),b=n.n(m),v=new Map(document.cookie.split("; ").map((function(e){return e.split("=")}))),w=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.log).call.apply(e,[console,"[webalert-notification:utils]"].concat(n))},y=b.a.getParser(window.navigator.userAgent);function x(e){return w("(loading) ".concat(e)),new Promise((function(t,n){var r=document.createElement("script");r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){null!=r.readyState&&!0!==/loaded|complete/.test(r.readyState)||(r.onload=r.onreadystatechange=null,w("(loaded) ".concat(e)),t(e))},document.head.appendChild(r)}))}var k=function(){return v.get("_ga")},_=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.log).call.apply(e,[console,"[webalert-notification:api]"].concat(n))},M=function(){function e(){d()(this,e),this.uri="https://push-webalert.conteudo.uol"}var t,n,r,i,a;return h()(e,[{key:"subscribeCampaign",value:(a=l()(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _('subiscrbe campaign "'.concat(n,'"')),r=k(),e.next=4,fetch("".concat(this.uri,"/campaign"),{method:"POST",body:JSON.stringify({campaign:n,gaID:r,subscriptionID:t}),credentials:"omit",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}});case 4:return i=e.sent,e.next=7,i.json();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateToken",value:(i=l()(c.a.mark((function e(t,n){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("update token"),e.next=3,fetch("".concat(this.uri,"/subscribe?id=").concat(t),{method:"PUT",body:JSON.stringify({subscriptionID:n}),credentials:"omit",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}});case 3:return r=e.sent,e.next=6,r.json();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"insertToken",value:(r=l()(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("insert token"),e.next=3,fetch("".concat(this.uri,"/subscribe"),{method:"POST",body:JSON.stringify(t),credentials:"omit",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}});case 3:return n=e.sent,e.next=6,n.json();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"deleteToken",value:(n=l()(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("delete token"),e.next=3,fetch("".concat(this.uri,"/subscribe?id=").concat(t),{method:"DELETE",credentials:"omit",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}});case 3:return n=e.sent,e.next=6,n.json();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getUserSubscriptions",value:(t=l()(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("user subscriptions"),e.next=3,fetch("".concat(this.uri,"/userid?id=").concat(t),{method:"GET",credentials:"omit",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"}});case 3:return n=e.sent,e.next=6,n.json();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),S=n(5),O=n.n(S),P=[{name:"coronavirus",campaign:"campaign-coronavirus",img:"https://conteudo.imguol.com.br/c/_layout/v2/components/webalert-notification/campanhas/corona.png",text:"Você quer receber reportagens especiais sobre o Coronavírus? Tudo sobre o impacto na sua vida, na economia e na política",testUrl:/(noticias|economia)\.uol\.com\.br|www\.uol\.com\.br\/vivabem\//}],A=n(9),E=n.n(A),F=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.log).call.apply(e,[console,"[webalert-notification:audience]"].concat(n))},N=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.error).call.apply(e,[console,"[webalert-notification:audience]"].concat(n))},T=function(){var e=l()(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){return setTimeout(e,t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=l()(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=l()(c.a.mark((function e(t,n){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.hitAudience||!window.hitAudience.countEvent){e.next=6;break}return t([window.hitAudience&&window.hitAudience.countEvent,"countEvent"]),e.abrupt("break",16);case 6:if(!window.uolAnalytics){e.next=11;break}return t([window.uolAnalytics,"uolAnalytics"]),e.abrupt("break",16);case 11:return F("tentando achar função"),e.next=14,T(500);case 14:e.next=0;break;case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function B(e,t){return I.apply(this,arguments)}function I(){return(I=l()(c.a.mark((function e(t,n){var r,i,a,s,u;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==t){e.next=2;break}return e.abrupt("return",N("`component` é valor obrigatório para envio de impressão"));case 2:return e.next=4,L();case 4:if(r=e.sent,i=o()(r,2),a=i[0],s=i[1],u=Math.floor(100*Math.random()),F("sendImpressionCount triggered with randomNumber ".concat(u)),!(u<20)){e.next=20;break}F("sending impression (".concat(s,")")),e.t0=s,e.next="countEvent"===e.t0?15:"uolAnalytics"===e.t0?17:19;break;case 15:return a({component:"webalert-authorization-".concat(t),reference:n,action:"impressao",nonInteraction:!0,impression:1}),e.abrupt("break",20);case 17:return a("event",{category:"webalert-authorization-".concat(t),label:n,action:"impressao",nonInteraction:!0,impression:1}),e.abrupt("break",20);case 19:N("".concat(s," is not a valid type"));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e,t){return R.apply(this,arguments)}function R(){return(R=l()(c.a.mark((function e(t,n){var r,i,a,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==t){e.next=2;break}return e.abrupt("return",N("`component` é valor obrigatório para envio de evento"));case 2:if(void 0!==n){e.next=4;break}return e.abrupt("return",N("`action` é valor obrigatório para envio de evento"));case 4:return e.next=6,L();case 6:r=e.sent,i=o()(r,2),a=i[0],s=i[1],F("sending event (".concat(s,")")),e.t0=s,e.next="countEvent"===e.t0?14:"uolAnalytics"===e.t0?16:18;break;case 14:return a({component:"webalert-authorization-".concat(t),reference:n,action:"clique"}),e.abrupt("break",19);case 16:return a("event",{category:"webalert-authorization-".concat(t),label:n,action:"clique"}),e.abrupt("break",19);case 18:N("".concat(s," is not a valid type"));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var C=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.log).call.apply(e,[console,"[webalert-notification:view]"].concat(n))},D=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.error).call.apply(e,[console,"[webalert-notification:view]"].concat(n))},U={desktop:{"/":{bold:"UOLTextBold",normal:"UOLTextRegular"}},mobile:{"/":{bold:"UOLText-Bold",normal:"UOLText"}},"*":{bold:"UOLText",normal:"UOLText"}},z=function(e){var t=y.getPlatformType();return(U[t]&&U[t][!0===window.isUolNewGraphicDesign?"*":"/"]||U["*"])[e]},W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=n?1:2,i=Math.round(e/r),a=Math.round(t/r);return"-".concat(i,"px, -").concat(a,"px")},q=/android|webos|iphone|ipad|ipod|blackberry|mobile |iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"mobile":"desktop";function G(e,t){if(null!=e){var n=document.querySelector("body");e.classList.remove("webalert_hidden"),n.style.overflow="hidden";var r="componente-visualizado",i="ignorar";t&&(r="".concat(r,"-").concat(t),i="".concat(i,"-").concat(t)),B("instrucao",r),K(".webalert_confirmation_wrapper","click",(function(e){V(e.srcElement||null),j("instrucao",i)}))}}function V(e){null!=e&&(e.parentNode.style.overflow="auto",e.parentNode.removeChild(e))}function Q(e,t){if(!e)return D("container is an invalid element");"default"==t&&(t={name:"default",campaign:"campaign-default",img:"https://conteudo.imguol.com.br/c/_layout/v2/components/webalert-notification/logo-uol.min.png",text:"Você quer receber notificações em tempo real e não perder nenhuma notícia importante?"});var n=document.createElement("div");n.className="webalert_".concat((new Date).getTime()),n.innerHTML=function(e){return'\n        <div class="webalert_container '.concat((t=q,"desktop"==t?"webalert_show_confirmation_message":""),' webalert_load_onscroll" campaign="').concat(e.name,'">\n            <img width="50" height="auto" class="webalert_container_logo_icon" src="').concat(e.img,'" alt="UOL - O melhor conteúdo" />\n            <p class="webalert_container_description">').concat(e.text,'</p>\n            <p class="webalert_container_subdescription">Você pode cancelar quando quiser</p>\n            <button type="button" role="nao" class="webalert_container_click webalert_container_button webalert_container_button_no">não</button>\n            <button type="button" role="sim" class="webalert_container_click webalert_container_button webalert_container_button_yes">aceito</button>\n        </div>\n    ');var t}(t);var r,i,a,o,s,c,u=n.querySelector(".webalert_container"),l="default"==t.name?"".concat("componente-visualizado"):"".concat("componente-visualizado","-").concat(t.name);u.classList.contains("webalert_show_confirmation_message")&&(r=document.querySelector("body"),(i=document.createElement("div")).classList="webalert_confirmation_wrapper webalert_hidden",i.innerHTML='<span class="webalert_confirmation_text">Clique em PERMITIR ou ALLOW para concluir</span>',i.setAttribute("role","modal-close"),r.insertBefore(i,r.firstChild));try{return function(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href","data:text/css;charset=UTF-8,"+encodeURIComponent(function(){return"\n    .webalert_container,\n    .webalert_container * {\n        box-sizing: border-box;\n        font-family: ".concat(z("normal"),";\n    }\n\n    .webalert_container {\n        transform: translateZ(0);\n        position: absolute;\n        top: -250px;\n        z-index: 6000001;\n        padding: 20px 35px 15px 85px;\n        width: ").concat(355,"px;\n        height: ").concat("auto",";\n        border-radius: 10px;\n        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n        border: solid 1px #e6e6e6;\n        background-color: #fcfcfc;\n        transition: top 0.3s;\n    }\n\n    /** Genérico, centraliza */\n    .webalert_container {\n        left: 50%;\n        transform: translate(").concat(W(355),");\n    }\n\n    .webalert_container_show {\n        top: 55px;\n    }\n    /**** FIM Genérico */\n\n    /** HOME do UOL Web */\n    .HU_header .webalert_container_show {\n        top: 50px;\n    }\n    /**** FIM HOME do UOL Web */\n\n    .header .webalert_container {\n        transform: none;\n    }\n\n    @media (min-width: 768px) {\n        .header .webalert_container {\n            left: 10px;\n        }\n    }\n\n    @media (min-width: 992px) {\n        .header .webalert_container {\n            left: calc(100% - (940px / 2) - 50%);\n        }\n    }\n\n    @media (min-width: 1230px) {\n        .header .webalert_container {\n            left: calc(100% - (1170px / 2) - 50%);\n        }\n    }\n\n    @media (max-width: 767px) {\n        .header .webalert_container {\n            left: 50%;\n            transform: translate(").concat(W(355),");\n        }\n    }\n    /**** FIM PGV3 */\n\n    .webalert_container_logo_icon {\n        position: absolute;\n        width: 50px;\n        height: auto;\n        top: 25px;\n        left: 20px;\n    }\n\n    .webalert_container_description {\n        padding: 0;\n        font-weight: normal;\n        font-size: 14px;\n        line-height: 1.29;\n        letter-spacing: normal;\n        color: #333333;\n        margin: 0 0 20px 0;\n    }\n\n    .webalert_container_subdescription {\n        padding: 0;\n        font-weight: normal;\n        font-size: 12px;\n        font-style: italic;\n        line-height: 1.29;\n        letter-spacing: normal;\n        color: #333333;\n        margin: 0 0 20px 0;\n    }\n\n    .webalert_hidden {\n        display: none;\n    }\n\n    .webalert_container_click {\n        cursor: pointer;\n    }\n\n    .webalert_container_button {\n        float: left;\n        width: 100px;\n        line-height: 35px;\n        border-radius: 2px;\n        padding: 0;\n        border: solid 1px #cccccc;\n        background-color: #ffffff;\n        text-transform: uppercase;\n        font-size: 12px;\n        letter-spacing: 0.96px;\n        color: #666;\n        text-align: center;\n        transition: opacity 0.3s;\n    }\n\n    .webalert_container_button_yes {\n        border-width: 0;\n        background-image: linear-gradient(71deg, #d20108, #ff8800 99%, #f9b600);\n        color: #fff;\n        margin-left: 20px;\n    }\n\n    .webalert_container_click:hover {\n        opacity: 0.6;\n    }\n\n    .webalert_confirmation_wrapper {\n        position: fixed;\n        height: 100vh;\n        width: 100%;\n        background: rgba(0, 0, 0, 0.8);\n        z-index: 30000001;\n    }\n\n    .webalert_show_confirmation {\n        overflow: auto;\n    }\n\n    .webalert_confirmation_text {\n        position: absolute;\n        width: auto;\n        padding: 10px 20px;\n        font-family: ").concat(z("normal"),";\n        font-size: 14px;\n        font-weight: 600;\n        text-align: right;\n        color: #fff;\n        background: #2977f3;\n        border-radius: 5px;\n        ").concat((e={firefox:"\n            top: 135px;\n            left: 373px;\n        ",chrome:"\n            top: 145px;\n            left: 133px;\n        "})[/Firefox/i.test(navigator.userAgent.toLowerCase())?"firefox":"chrome"]||e.chrome,"\n    }\n\n    .webalert_load_onscroll {\n        position: fixed;\n        z-index: 90000000;\n    }\n\n    @media (max-width: 767px) {\n        .header .webalert_container {\n            top: 100%;\n        }\n\n        .header .webalert_container.webalert_container_show {\n            top: calc(100% - 250px);\n        }\n    }\n");var e}())),e.appendChild(t)}(document.head),e.insertBefore(n,e.firstChild),a=u,o=l,s=null,(c=new IntersectionObserver((function(e){!1===e[0].isIntersecting&&null!==s?(C("saiu do viewport, removendo timeout"),clearTimeout(s),s=null):!0===e[0].isIntersecting&&null===s&&(C("entrou no viewport, registrando timeout"),s=setTimeout((function(){C("disparando timeout e removendo observer"),c.unobserve(e[0].target),B("modal",o)}),2e3))}))).observe(a),window.addEventListener("scroll",(function(){return e=u,t="webalert_container_show",n=window.innerHeight,void(document.documentElement.scrollTop>n?e.classList.add(t):e.classList.remove(t));var e,t,n})),n}catch(e){throw D("error appending element",e),e}}function K(e,t,n){var r=document.querySelectorAll(e);E()(r).forEach((function(e){return e.addEventListener(t,n)}))}function H(e){try{e.parentNode.removeChild(e)}catch(e){return void C("error removing element",e)}}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.log).call.apply(e,[console,"[webalert-notification:app]"].concat(n))},X=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console.error).call.apply(e,[console,"[webalert-notification:app]"].concat(n))},$=(new Date).getTime(),ee=function(){function e(){var t=this;if(d()(this,e),"localStorage"in window!=1||"Notification"in window!=1||"Promise"in window!=1||"serviceWorker"in navigator!=1||"PushManager"in window!=1||"fetch"in window!=1||"Safari"==y.getBrowserName())return X("UNSUPPORTED_BROWSER"),"UNSUPPORTED_BROWSER";Y('WebalertNotification({ version: "'.concat(g.a,'" })')),this.api=new M,this.settings={localStorage:"pushNotificationUOL",parentSelector:"body",serviceWorker:"/firebase-messaging-sw.js",central:location.hostname.split(".")[0],channel:location.hostname,tags:[],showUi:!0,campaignName:null,firebase:{apiKey:"AIzaSyC7xCg9LEYqiDKkCBsjhMFg-MKTNakYuj8",authDomain:"web-alerts-1194.firebaseapp.com",databaseURL:"https://web-alerts-1194.firebaseio.com/",storageBucket:"gcm-demo-13f40.appspot.com",messagingSenderId:"370456186282"},messaging:null},this.loadDependencies().then((function(){return t.waitDOMLoad()})).then((function(){return t.readPageConfigurations()})).then((function(){return t.getUserId()})).then((function(){return t.migrateFromOldScript()})).then((function(){return t.initializeFirebase()})).then((function(){return t.initializeMessaging()})).then((function(){return t.registerTokenEvents()})).then((function(){return t.getUINotificationPermission()})).then((function(){return t.getToken()})).catch((function(e){return X(e)})).then((function(){return t.sync()}))}var t,n,r,a,s,u,f,p,m,b,v,w,_,S,A,E,F,N;return h()(e,[{key:"platform",get:function(){var e={ismobile:O.a.phone,device:"pc",browser:y.getBrowser()};if(!0===O.a.tablet&&(e.device="tablet"),O.a.phone)for(var t=0,n=["amazon","android","apple"];t<n.length;t++){var r=n[t];if(!0===O.a[r].device){e.device=r;break}}return e}}]),h()(e,[{key:"save",value:function(e){try{var t=Object.assign(this.storage,e);localStorage.setItem(this.settings.localStorage,JSON.stringify(t))}catch(e){X("(save localstorage)",e)}}},{key:"waitDOMLoad",value:(N=l()(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0!==/interactive|complete|loaded/.test(document.readyState)){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return e.abrupt("return",new Promise((function(e){document.addEventListener("DOMContentLoaded",(function(){return e()}))})));case 3:case"end":return e.stop()}}),e)}))),function(){return N.apply(this,arguments)})},{key:"readPageConfigurations",value:(F=l()(c.a.mark((function e(){var t,n,r,i,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=document.querySelector(".uol-notifications-widget"))){e.next=3;break}throw new Error("Elemento .uol-notifications-widget não foi encontrado.");case 3:n=0,r=["data-container","service-worker-path","channel-name","themes","central","show-ui"];case 5:if(!(n<r.length)){e.next=29;break}if(i=r[n],null!==(a=t.getAttribute(i))){e.next=10;break}return e.abrupt("continue",26);case 10:e.t0=i,e.next="data-container"===e.t0?13:"service-worker-path"===e.t0?15:"channel-name"===e.t0?17:"themes"===e.t0?19:"central"===e.t0?21:"show-ui"===e.t0?23:25;break;case 13:return this.settings.parentSelector=a,e.abrupt("break",26);case 15:return this.settings.serviceWorker=a,e.abrupt("break",26);case 17:return this.settings.channelName=a,e.abrupt("break",26);case 19:return this.settings.tags=a.split(",").filter((function(e){return"geral"!==e})),e.abrupt("break",26);case 21:return this.settings.central=a,e.abrupt("break",26);case 23:return this.settings.showUi="true"===a,e.abrupt("break",26);case 25:return e.abrupt("break",26);case 26:n++,e.next=5;break;case 29:case"end":return e.stop()}}),e,this)}))),function(){return F.apply(this,arguments)})},{key:"migrateUserSubscriptions",value:(E=l()(c.a.mark((function e(){var t,n,r,i,a,s,u,l,f,d,p,h,g,m,b,v,w,y,x;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y("migrating user subscriptions"),t=this.storage,n=t.gaID,r=t.central,e.next=4,this.api.getUserSubscriptions(n);case 4:i=e.sent,a=!0,s=!1,u=void 0,e.prev=8,l=i[Symbol.iterator]();case 10:if(a=(f=l.next()).done){e.next=48;break}if("www.uol.com.br"!=(d=f.value).channel){e.next=14;break}return e.abrupt("continue",45);case 14:if(p=d.channel.split("."),h=o()(p,1),g=h[0],void 0!==r[g]){e.next=45;break}Y("migrating channel: ",g),r[g]={lastTimeIn:new Date,accepted:!0},m=!0,b=!1,v=void 0,e.prev=21,w=d.configs.tags[Symbol.iterator]();case 23:if(m=(y=w.next()).done){e.next=31;break}if("geral"!==(x=y.value)){e.next=27;break}return e.abrupt("continue",28);case 27:r["".concat(g,"-").concat(x)]={lastTimeIn:new Date,accepted:!0};case 28:m=!0,e.next=23;break;case 31:e.next=37;break;case 33:e.prev=33,e.t0=e.catch(21),b=!0,v=e.t0;case 37:e.prev=37,e.prev=38,m||null==w.return||w.return();case 40:if(e.prev=40,!b){e.next=43;break}throw v;case 43:return e.finish(40);case 44:return e.finish(37);case 45:a=!0,e.next=10;break;case 48:e.next=54;break;case 50:e.prev=50,e.t1=e.catch(8),s=!0,u=e.t1;case 54:e.prev=54,e.prev=55,a||null==l.return||l.return();case 57:if(e.prev=57,!s){e.next=60;break}throw u;case 60:return e.finish(57);case 61:return e.finish(54);case 62:this.save({central:r,synced:!1});case 64:case"end":return e.stop()}}),e,this,[[8,50,54,62],[21,33,37,45],[38,,40,44],[55,,57,61]])}))),function(){return E.apply(this,arguments)})},{key:"migrateFromOldScript",value:(A=l()(c.a.mark((function e(){var t,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null===(t=localStorage.getItem("uolPushNotification"))){e.next=12;break}if(Y("migrating user data"),"www.uol.com.br"!==(n=JSON.parse(t)).channel){e.next=9;break}return this.save({central:{geral:{lastTimeIn:new Date,accepted:!0}},gaID:n.gaID,token:n.subscriptionID}),e.next=9,this.migrateUserSubscriptions();case 9:localStorage.removeItem("uolPushNotification"),localStorage.removeItem("uolPushNotificationFirstEnable"),localStorage.removeItem("uolPushNotificationsentToServer");case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),X("error migration user data",e.t0);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return A.apply(this,arguments)})},{key:"getUserNotificationPermission",value:(S=l()(c.a.mark((function e(){var t,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("permissions"in navigator)){e.next=6;break}return e.next=3,navigator.permissions.query({name:"notifications"});case 3:return t=e.sent,n=t.state,e.abrupt("return",n);case 6:return e.abrupt("return",Notification.permission);case 7:case"end":return e.stop()}}),e)}))),function(){return S.apply(this,arguments)})},{key:"getUserCentralTags",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="";"www.uol.com.br"===this.settings.channelName&&(t="central-".concat(this.settings.central,"-"));var n=this.settings.tags.map((function(e){return"".concat(t).concat(e)})),r=!0,i=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;void 0===e[c]&&(e[c]=1,this.save({synced:!1}))}}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return e}},{key:"getActiveCampaign",value:(_=l()(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!=P.length){e.next=2;break}return e.abrupt("return",void 0);case 2:if(null!=window.DucksLake){e.next=4;break}return e.abrupt("return",void 0);case 4:return e.next=6,DucksLake.getSubscription("webalert");case 6:if(e.t0=e.sent,e.t0){e.next=9;break}e.t0={};case 9:if(t=e.t0,0!=(n=Object.values(P).filter((function(e){if(0==e.testUrl.test(location.href))return Y("campaign tested false for location"),!1;var n=!0===t[e.campaign],r=!!t.hasOwnProperty(e.campaign)&&$-new Date(t[e.campaign]).getTime()<6048e5;return r&&Y("we already questioned user about campanign: ".concat(e.campaign)),!n&&!r}))).length){e.next=13;break}return e.abrupt("return",void 0);case 13:return r=Math.floor(Math.random()*n.length),e.abrupt("return",n[r]);case 15:case"end":return e.stop()}}),e)}))),function(){return _.apply(this,arguments)})},{key:"doViewSort",value:(w=l()(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["default","campanha"],e.abrupt("return",t[Math.floor(Math.random()*t.length)]);case 2:case"end":return e.stop()}}),e)}))),function(){return w.apply(this,arguments)})},{key:"getCampaignUI",value:(v=l()(c.a.mark((function e(t){var n,r,a,o,s=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.storage,e.next=3,this.getUserNotificationPermission();case 3:return r=e.sent,a=Q(document.querySelector(this.settings.parentSelector),t),e.next=7,DucksLake.getSubscription("webalert");case 7:if(e.t0=e.sent,e.t0){e.next=10;break}e.t0={};case 10:return o=e.t0,Y("show campaign ui notification permission"),this.settings.campaignName=t.campaign,e.abrupt("return",new Promise((function(e,c){K(".webalert_container_click","click",(function(u){H(a);var l=!0;switch(u.srcElement.getAttribute("role")){case"sim":j("modal","".concat("autorizar","-").concat(t.name)),"prompt"===r&&G(document.querySelector(".webalert_confirmation_wrapper")||null,t.name),s.api.subscribeCampaign(n.token,t.campaign),console.log("campaign token",n.token),DucksLake.addSubscription("webalert",Object.assign(o,i()({},t.campaign,!0))),l=!1;break;case"nao":j("modal","".concat("bloquear","-").concat(t.name)),DucksLake.addSubscription("webalert",Object.assign(o,i()({},t.campaign,new Date)));break;case"close":j("modal","".concat("ignorar","-").concat(t.name));break;default:X("unknown role event")}l?c("UI_NOTIFICATION_PERMISSION_DENIED"):e()}))})));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return v.apply(this,arguments)})},{key:"getDefaultUI",value:(b=l()(c.a.mark((function e(t){var n,r,a,o=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.storage,e.next=3,this.getUserNotificationPermission();case 3:return r=e.sent,a=Q(document.querySelector(this.settings.parentSelector),"default"),Y("show ui notification permission"),e.abrupt("return",new Promise((function(e,s){K(".webalert_container_click","click",(function(c){H(a);var u=c.srcElement.getAttribute("role");switch(t.lastTimeIn=new Date,t.accepted="sim"===u,u){case"sim":j("modal","autorizar"),"prompt"===r&&G(document.querySelector(".webalert_confirmation_wrapper")||null);break;case"nao":j("modal","bloquear");break;case"close":j("modal","ignorar");break;default:X("unknown role event")}o.save({synced:!1,central:Z({},n.central,i()({},o.settings.central,t))}),t.accepted?e():s("UI_NOTIFICATION_PERMISSION_DENIED")}))})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"getUINotificationPermission",value:(m=l()(c.a.mark((function e(){var t,n,r,a,o,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.storage,e.next=3,this.getUserNotificationPermission();case 3:return n=e.sent,e.next=6,this.getActiveCampaign();case 6:return r=e.sent,a=void 0===r,e.next=10,this.doViewSort();case 10:if(o=e.sent,"denied"!==n){e.next=14;break}return Y("notifications denied"),e.abrupt("return",Promise.reject("BROWSER_NOTIFICATION_PERMISSION_DENIED"));case 14:if((s=Object.assign({lastTimeIn:"1987-04-06T17:00:00.000Z",accepted:!1},t.central[this.settings.central])).tags=this.getUserCentralTags(Z({},s.tags)),!0!==s.accepted||!t.token||!a){e.next=20;break}return Y("user already give permissions"),this.save({central:Z({},t.central,i()({},this.settings.central,s))}),e.abrupt("return",Promise.resolve());case 20:if(!1!==this.settings.showUi){e.next=27;break}return Y("ui is disabled, by passing"),s.accepted=!0,s.bypass=!0,s.lastTimeIn=new Date,this.save({central:Z({},t.central,i()({},this.settings.central,s))}),e.abrupt("return",Promise.resolve());case 27:if(a||"default"!=o||1!=s.accepted||(o="campanha"),!($-new Date(s.lastTimeIn).getTime()<6048e5&&a)){e.next=33;break}if(Y("we already questioned user"),!0!==s.accepted){e.next=32;break}return e.abrupt("return",Promise.resolve());case 32:return e.abrupt("return",Promise.reject("UI_NOTIFICATION_PERMISSION_DENIED"));case 33:if(a||"campanha"!=o){e.next=39;break}return e.next=36,this.getCampaignUI(r);case 36:e.t0=e.sent,e.next=42;break;case 39:return e.next=41,this.getDefaultUI(s);case 41:e.t0=e.sent;case 42:return e.abrupt("return",e.t0);case 43:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"loadDependencies",value:(p=l()(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,n=["https://www.gstatic.com/firebasejs/6.2.4/firebase-app.js","https://www.gstatic.com/firebasejs/6.2.4/firebase-messaging.js"];case 2:if(!(t<n.length)){e.next=9;break}return r=n[t],e.next=6,x(r);case 6:t++,e.next=2;break;case 9:return e.abrupt("return",Promise.resolve());case 10:case"end":return e.stop()}}),e)}))),function(){return p.apply(this,arguments)})},{key:"initializeFirebase",value:(f=l()(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y("initializing app"),firebase.initializeApp(this.settings.firebase);case 2:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"initializeMessaging",value:(u=l()(c.a.mark((function e(){var t;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y("initializing service worker"),e.next=3,navigator.serviceWorker.register(this.settings.serviceWorker,{scope:"/firebase-cloud-messaging-push-scope",updateViaCache:"none"});case 3:return t=e.sent,Y("initializing firebase messaging"),this.messaging=firebase.messaging(),this.messaging.usePublicVapidKey("BEd84XGoGhdVq4piMRrbvvgp__QmDjh3oqdGnyx4slV4lGGgwoeRbcALLcNss2WTl34N0gXmGOsMM3lCOJOn1cA"),this.messaging.useServiceWorker(t),e.abrupt("return",this.messaging);case 9:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"transformCentralInTags",value:function(){var e=this,t=this.storage.central;return Object.keys(t).filter((function(e){return!0===t[e].accepted})).reduce((function(n,r){"geral"===r?n.push(r):"www.uol.com.br"==e.settings.channel?n.push("central-".concat(r)):n.push("geral");var i=t[r].tags,a=void 0===i?{}:i;return n.concat(Object.keys(a))}),[])}},{key:"sync",value:(s=l()(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!0!==(t=this.storage).synced){e.next=3;break}return e.abrupt("return",Promise.resolve());case 3:if(t.token){e.next=5;break}return e.abrupt("return",Promise.resolve());case 5:if(void 0===t.tokenChangedFrom){e.next=8;break}return e.next=8,this.api.deleteToken(t.tokenChangedFrom);case 8:return n=this.transformCentralInTags(),e.next=11,this.api.insertToken({subscriptionID:t.token,gaID:t.gaID||null,channel:this.settings.channelName,platform:this.platform,configs:{tags:n}});case 11:return 1==(r=e.sent).success?(Y("api synced"),this.save({synced:!0,tokenChangedFrom:void 0})):X("api sync failed",r),e.abrupt("return",Promise.resolve());case 14:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"registerTokenEvents",value:(a=l()(c.a.mark((function e(){var t=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y("registering refresh token events"),e.abrupt("return",this.messaging.onTokenRefresh(l()(c.a.mark((function e(){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y("(token refreshed) ".concat(n)),e.next=3,t.getToken();case 3:n=e.sent;case 4:case"end":return e.stop()}}),e)})))));case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getUserId",value:(r=l()(c.a.mark((function e(){var t,n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.storage,void 0!==(n=k())&&n!==t.gaID&&(Y("getting user id"),this.save({synced:!1,gaID:n}));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getToken",value:(n=l()(c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getBrowserNotificationPermission();case 2:if(t=e.sent,V(document.querySelector(".webalert_confirmation_wrapper")||null),"granted"!=t){e.next=18;break}return Y("getToken() we have permission"),e.next=8,this.messaging.getToken();case 8:if(n=e.sent,r=this.storage,!n||r.token===n){e.next=16;break}return Y("getToken() saving new token: ".concat(n)),this.save({synced:!1,tokenChangedFrom:r.token,token:n}),e.abrupt("return",n);case 16:Y("getToken() token already saved and not changed");case 17:case 18:return e.abrupt("return",null);case 19:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getBrowserNotificationPermission",value:(t=l()(c.a.mark((function e(){var t,n,r,i,a,o;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getUserNotificationPermission();case 2:if("granted"!=(t=e.sent)){e.next=5;break}return e.abrupt("return",t);case 5:return n="componente-visualizado",r="ignorar",i="bloquear",a="autorizar",null!=this.settings.campaignName&&(n="".concat(n,"-").concat(this.settings.campaignName),r="".concat(r,"-").concat(this.settings.campaignName),i="".concat(i,"-").concat(this.settings.campaignName),a="".concat(a,"-").concat(this.settings.campaignName)),Y("requesting user permission"),B("nativo",n),e.next=14,Notification.requestPermission();case 14:o=e.sent,e.t0=o,e.next="default"===e.t0?18:"denied"===e.t0?21:(e.t0,24);break;case 18:return Y("usuário negou permissão (close button)"),j("nativo",r),e.abrupt("break",27);case 21:return Y("usuário negou permissão (no button)"),j("nativo",i),e.abrupt("break",27);case 24:return Y("usuário aceitou"),j("nativo",a),e.abrupt("break",27);case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"messaging",get:function(){return this.settings.messaging},set:function(e){this.settings.messaging=e}},{key:"storage",get:function(){try{var e=localStorage.getItem(this.settings.localStorage);return Object.assign({central:{}},JSON.parse(e)||{})}catch(e){return{}}}}]),e}();t.default=new ee}])}]);   