@oila/0account 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/0account.js +1 -0
- package/package.json +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Oila GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/0account.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(window,(function(){return function(e){var t={};function o(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=4)}([function(e,t,o){(function(e,i){var n;(function(){function r(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function a(e){return e=u(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:r(e)}function s(e,t){for(var o in e)v.call(e,o)&&t(e[o],o,e)}function l(e){return null==e?r(e):S.call(e).slice(8,-1)}function c(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function d(e,t){var o=null;return function(e,t){var o=-1,i=e?e.length:0;if("number"==typeof i&&-1<i&&i<=b)for(;++o<i;)t(e[o],o,e);else s(e,t)}(e,(function(i,n){o=t(o,i,n,e)})),o}function u(e){return String(e).replace(/^ +| +$/g,"")}var h={function:!0,object:!0},p=h[typeof window]&&window||this,m=h[typeof t]&&t;h=h[typeof e]&&e&&!e.nodeType&&e;var f=m&&h&&"object"==typeof i&&i;!f||f.global!==f&&f.window!==f&&f.self!==f||(p=f);var b=Math.pow(2,53)-1,g=/\bOpera/,v=(f=Object.prototype).hasOwnProperty,S=f.toString,w=function e(t){function o(e){return d(e,(function(e,o){var i=o.pattern||c(o);return!e&&(e=RegExp("\\b"+i+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+i+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+i+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(o.label&&!RegExp(i,"i").test(o.label)?o.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),o=o.label||o,e=a(e[0].replace(RegExp(i,"i"),o).replace(RegExp("; *(?:"+o+"[_-])?","i")," ").replace(RegExp("("+o+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}function i(e){return d(e,(function(e,o){return e||(RegExp(o+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}var n=p,r=t&&"object"==typeof t&&"String"!=l(t);r&&(n=t,t=null);var h=n.navigator||{},m=h.userAgent||"";t||(t=m);var f=r?!!h.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(S.toString()),b=r?"Object":"ScriptBridgingProxyObject",v=r?"Object":"Environment",w=r&&n.java?"JavaPackage":l(n.java),x=r?"Object":"RuntimeObject";v=(w=/\bJava/.test(w)&&n.java)&&l(n.environment)==v;var y,E=w?"a":"α",C=w?"b":"β",O=n.document||{},k=n.operamini||n.opera,M=g.test(M=r&&k?k["[[Class]]"]:l(k))?M:k=null,A=t;r=[];var R=null,z=t==m;m=z&&k&&"function"==typeof k.version&&k.version();var I=d([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,o){return e||RegExp("\\b"+(o.pattern||c(o))+"\\b","i").exec(t)&&(o.label||o)})),P=d(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],(function(e,o){return e||RegExp("\\b"+(o.pattern||c(o))+"\\b","i").exec(t)&&(o.label||o)})),B=o([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),N=d({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}},(function(e,o,i){return e||(o[B]||o[/^[a-z]+(?: +[a-z]+\b)*/i.exec(B)]||RegExp("\\b"+c(i)+"(?:\\b|\\w*\\d)","i").exec(t))&&i})),T=d(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],(function(e,o){var i=o.pattern||c(o);if(!e&&(e=RegExp("\\b"+i+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))){var n=e,r=o.label||o,s={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};i&&r&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(s=s[/[\d.]+$/.exec(n)])&&(n="Windows "+s),n=String(n),i&&r&&(n=n.replace(RegExp(i,"i"),r)),e=n=a(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}return e}));if(I&&(I=[I]),/\bAndroid\b/.test(T)&&!B&&(y=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(t))&&(B=u(y[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),N&&!B?B=o([N]):N&&B&&(B=B.replace(RegExp("^("+c(N)+")[-_.\\s]","i"),N+" ").replace(RegExp("^("+c(N)+")[-_.]?(\\w)","i"),N+" $2")),(y=/\bGoogle TV\b/.exec(B))&&(B=y[0]),/\bSimulator\b/i.test(t)&&(B=(B?B+" ":"")+"Simulator"),"Opera Mini"==P&&/\bOPiOS\b/.test(t)&&r.push("running in Turbo/Uncompressed mode"),"IE"==P&&/\blike iPhone OS\b/.test(t)?(N=(y=e(t.replace(/like iPhone OS/,""))).manufacturer,B=y.product):/^iP/.test(B)?(P||(P="Safari"),T="iOS"+((y=/ OS ([\d_]+)/i.exec(t))?" "+y[1].replace(/_/g,"."):"")):"Konqueror"==P&&/^Linux\b/i.test(T)?T="Kubuntu":N&&"Google"!=N&&(/Chrome/.test(P)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(B))||/\bAndroid\b/.test(T)&&/^Chrome/.test(P)&&/\bVersion\//i.test(t)?(P="Android Browser",T=/\bAndroid\b/.test(T)?T:"Android"):"Silk"==P?(/\bMobi/i.test(t)||(T="Android",r.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&r.unshift("accelerated")):"UC Browser"==P&&/\bUCWEB\b/.test(t)?r.push("speed mode"):"PaleMoon"==P&&(y=/\bFirefox\/([\d.]+)\b/.exec(t))?r.push("identifying as Firefox "+y[1]):"Firefox"==P&&(y=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(T||(T="Firefox OS"),B||(B=y[1])):!P||(y=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(P))?(P&&!B&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(y+"/")+8))&&(P=null),(y=B||N||T)&&(B||N||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(T))&&(P=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(T)?T:y)+" Browser")):"Electron"==P&&(y=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&r.push("Chromium "+y),m||(m=i(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",c(P),"(?:Firefox|Minefield|NetFront)"])),(y=("iCab"==I&&3<parseFloat(m)?"WebKit":/\bOpera\b/.test(P)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(I)&&"WebKit"||!I&&/\bMSIE\b/i.test(t)&&("Mac OS"==T?"Tasman":"Trident")||"WebKit"==I&&/\bPlayStation\b(?! Vita\b)/i.test(P)&&"NetFront")&&(I=[y]),"IE"==P&&(y=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(P+=" Mobile",T="Windows Phone "+(/\+$/.test(y)?y:y+".x"),r.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(P="IE Mobile",T="Windows Phone 8.x",r.unshift("desktop mode"),m||(m=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=P&&"Trident"==I&&(y=/\brv:([\d.]+)/.exec(t))&&(P&&r.push("identifying as "+P+(m?" "+m:"")),P="IE",m=y[1]),z){if(function(e,t){var o=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(o)||"object"==o&&!e[t])}(n,"global"))if(w&&(A=(y=w.lang.System).getProperty("os.arch"),T=T||y.getProperty("os.name")+" "+y.getProperty("os.version")),v){try{m=n.require("ringo/engine").version.join("."),P="RingoJS"}catch(e){(y=n.system)&&y.global.system==n.system&&(P="Narwhal",T||(T=y[0].os||null))}P||(P="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(y=n.process)&&("object"==typeof y.versions&&("string"==typeof y.versions.electron?(r.push("Node "+y.versions.node),P="Electron",m=y.versions.electron):"string"==typeof y.versions.nw&&(r.push("Chromium "+m,"Node "+y.versions.node),P="NW.js",m=y.versions.nw)),P||(P="Node.js",A=y.arch,T=y.platform,m=(m=/[\d.]+/.exec(y.version))?m[0]:null));else l(y=n.runtime)==b?(P="Adobe AIR",T=y.flash.system.Capabilities.os):l(y=n.phantom)==x?(P="PhantomJS",m=(y=y.version||null)&&y.major+"."+y.minor+"."+y.patch):"number"==typeof O.documentMode&&(y=/\bTrident\/(\d+)/i.exec(t))?(m=[m,O.documentMode],(y=+y[1]+4)!=m[1]&&(r.push("IE "+m[1]+" mode"),I&&(I[1]=""),m[1]=y),m="IE"==P?String(m[1].toFixed(1)):m[0]):"number"==typeof O.documentMode&&/^(?:Chrome|Firefox)\b/.test(P)&&(r.push("masking as "+P+" "+m),P="IE",m="11.0",I=["Trident"],T="Windows");T=T&&a(T)}if(m&&(y=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(m)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(z&&h.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(R=/b/i.test(y)?"beta":"alpha",m=m.replace(RegExp(y+"\\+?$"),"")+("beta"==R?C:E)+(/\d+\+?/.exec(y)||"")),"Fennec"==P||"Firefox"==P&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(T))P="Firefox Mobile";else if("Maxthon"==P&&m)m=m.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(B))"Xbox 360"==B&&(T=null),"Xbox 360"==B&&/\bIEMobile\b/.test(t)&&r.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(P)&&(!P||B||/Browser|Mobi/.test(P))||"Windows CE"!=T&&!/Mobi/i.test(t))if("IE"==P&&z)try{null===n.external&&r.unshift("platform preview")}catch(e){r.unshift("embedded")}else(/\bBlackBerry\b/.test(B)||/\bBB10\b/.test(t))&&(y=(RegExp(B.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||m)?(T=((y=[y,/BB10/.test(t)])[1]?(B=null,N="BlackBerry"):"Device Software")+" "+y[0],m=null):this!=s&&"Wii"!=B&&(z&&k||/Opera/.test(P)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==P&&/\bOS X (?:\d+\.){2,}/.test(T)||"IE"==P&&(T&&!/^Win/.test(T)&&5.5<m||/\bWindows XP\b/.test(T)&&8<m||8==m&&!/\bTrident\b/.test(t)))&&!g.test(y=e.call(s,t.replace(g,"")+";"))&&y.name&&(y="ing as "+y.name+((y=y.version)?" "+y:""),g.test(P)?(/\bIE\b/.test(y)&&"Mac OS"==T&&(T=null),y="identify"+y):(y="mask"+y,P=M?a(M.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(y)&&(T=null),z||(m=null)),I=["Presto"],r.push(y));else P+=" Mobile";if((y=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(y=[parseFloat(y.replace(/\.(\d)$/,".0$1")),y],"Safari"==P&&"+"==y[1].slice(-1)?(P="WebKit Nightly",R="alpha",m=y[1].slice(0,-1)):m!=y[1]&&m!=(y[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(m=null),y[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==y[0]&&537.36==y[2]&&28<=parseFloat(y[1])&&"WebKit"==I&&(I=["Blink"]),z&&(f||y[1])?(I&&(I[1]="like Chrome"),y=y[1]||(530>(y=y[0])?1:532>y?2:532.05>y?3:533>y?4:534.03>y?5:534.07>y?6:534.1>y?7:534.13>y?8:534.16>y?9:534.24>y?10:534.3>y?11:535.01>y?12:535.02>y?"13+":535.07>y?15:535.11>y?16:535.19>y?17:536.05>y?18:536.1>y?19:537.01>y?20:537.11>y?"21+":537.13>y?23:537.18>y?24:537.24>y?25:537.36>y?26:"Blink"!=I?"27":"28")):(I&&(I[1]="like Safari"),y=400>(y=y[0])?1:500>y?2:526>y?3:533>y?4:534>y?"4+":535>y?5:537>y?6:538>y?7:601>y?8:602>y?9:604>y?10:606>y?11:608>y?12:"12"),I&&(I[1]+=" "+(y+="number"==typeof y?".x":/[.+]/.test(y)?"":"+")),"Safari"==P&&(!m||45<parseInt(m))?m=y:"Chrome"==P&&/\bHeadlessChrome/i.test(t)&&r.unshift("headless")),"Opera"==P&&(y=/\bzbov|zvav$/.exec(T))?(P+=" ",r.unshift("desktop mode"),"zvav"==y?(P+="Mini",m=null):P+="Mobile",T=T.replace(RegExp(" *"+y+"$"),"")):"Safari"==P&&/\bChrome\b/.exec(I&&I[1])?(r.unshift("desktop mode"),P="Chrome Mobile",m=null,/\bOS X\b/.test(T)?(N="Apple",T="iOS 4.3+"):T=null):/\bSRWare Iron\b/.test(P)&&!m&&(m=i("Chrome")),m&&0==m.indexOf(y=/[\d.]+$/.exec(T))&&-1<t.indexOf("/"+y+"-")&&(T=u(T.replace(y,""))),T&&-1!=T.indexOf(P)&&!RegExp(P+" OS").test(T)&&(T=T.replace(RegExp(" *"+c(P)+" *"),"")),I&&!/\b(?:Avant|Nook)\b/.test(P)&&(/Browser|Lunascape|Maxthon/.test(P)||"Safari"!=P&&/^iOS/.test(T)&&/\bSafari\b/.test(I[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(P)&&I[1])&&(y=I[I.length-1])&&r.push(y),r.length&&(r=["("+r.join("; ")+")"]),N&&B&&0>B.indexOf(N)&&r.push("on "+N),B&&r.push((/^on /.test(r[r.length-1])?"":"on ")+B),T){var W=(y=/ ([\d.+]+)$/.exec(T))&&"/"==T.charAt(T.length-y[0].length-1);T={architecture:32,family:y&&!W?T.replace(y[0],""):T,version:y?y[1]:null,toString:function(){var e=this.version;return this.family+(e&&!W?" "+e:"")+(64==this.architecture?" 64-bit":"")}}}return(y=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(A))&&!/\bi686\b/i.test(A)?(T&&(T.architecture=64,T.family=T.family.replace(RegExp(" *"+y),"")),P&&(/\bWOW64\b/i.test(t)||z&&/\w(?:86|32)$/.test(h.cpuClass||h.platform)&&!/\bWin64; x64\b/i.test(t))&&r.unshift("32-bit")):T&&/^OS X/.test(T.family)&&"Chrome"==P&&39<=parseFloat(m)&&(T.architecture=64),t||(t=null),(n={}).description=t,n.layout=I&&I[0],n.manufacturer=N,n.name=P,n.prerelease=R,n.product=B,n.ua=t,n.version=P&&m,n.os=T||{architecture:null,family:null,version:null,toString:function(){return"null"}},n.parse=e,n.toString=function(){return this.description||""},n.version&&r.unshift(m),n.name&&r.unshift(P),T&&P&&(T!=String(T).split(" ")[0]||T!=P.split(" ")[0]&&!B)&&r.push(B?"("+T+")":"on "+T),r.length&&(n.description=r.join(" ")),n}();p.platform=w,void 0===(n=function(){return w}.call(t,o,t,e))||(e.exports=n)}).call(this),function(){function r(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function a(e){return e=u(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:r(e)}function s(e,t){for(var o in e)v.call(e,o)&&t(e[o],o,e)}function l(e){return null==e?r(e):S.call(e).slice(8,-1)}function c(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function d(e,t){var o=null;return function(e,t){var o=-1,i=e?e.length:0;if("number"==typeof i&&-1<i&&i<=b)for(;++o<i;)t(e[o],o,e);else s(e,t)}(e,(function(i,n){o=t(o,i,n,e)})),o}function u(e){return String(e).replace(/^ +| +$/g,"")}var h={function:!0,object:!0},p=h[typeof window]&&window||this,m=h[typeof t]&&t;h=h[typeof e]&&e&&!e.nodeType&&e;var f=m&&h&&"object"==typeof i&&i;!f||f.global!==f&&f.window!==f&&f.self!==f||(p=f);var b=Math.pow(2,53)-1,g=/\bOpera/,v=(f=Object.prototype).hasOwnProperty,S=f.toString,w=function e(t){function o(e){return d(e,(function(e,o){var i=o.pattern||c(o);return!e&&(e=RegExp("\\b"+i+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+i+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+i+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(o.label&&!RegExp(i,"i").test(o.label)?o.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),o=o.label||o,e=a(e[0].replace(RegExp(i,"i"),o).replace(RegExp("; *(?:"+o+"[_-])?","i")," ").replace(RegExp("("+o+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}function i(e){return d(e,(function(e,o){return e||(RegExp(o+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}var n=p,r=t&&"object"==typeof t&&"String"!=l(t);r&&(n=t,t=null);var h=n.navigator||{},m=h.userAgent||"";t||(t=m);var f=r?!!h.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(S.toString()),b=r?"Object":"ScriptBridgingProxyObject",v=r?"Object":"Environment",w=r&&n.java?"JavaPackage":l(n.java),x=r?"Object":"RuntimeObject";v=(w=/\bJava/.test(w)&&n.java)&&l(n.environment)==v;var y,E=w?"a":"α",C=w?"b":"β",O=n.document||{},k=n.operamini||n.opera,M=g.test(M=r&&k?k["[[Class]]"]:l(k))?M:k=null,A=t;r=[];var R=null,z=t==m;m=z&&k&&"function"==typeof k.version&&k.version();var I=d([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,o){return e||RegExp("\\b"+(o.pattern||c(o))+"\\b","i").exec(t)&&(o.label||o)})),P=d(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],(function(e,o){return e||RegExp("\\b"+(o.pattern||c(o))+"\\b","i").exec(t)&&(o.label||o)})),B=o([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),N=d({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}},(function(e,o,i){return e||(o[B]||o[/^[a-z]+(?: +[a-z]+\b)*/i.exec(B)]||RegExp("\\b"+c(i)+"(?:\\b|\\w*\\d)","i").exec(t))&&i})),T=d(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],(function(e,o){var i=o.pattern||c(o);if(!e&&(e=RegExp("\\b"+i+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))){var n=e,r=o.label||o,s={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};i&&r&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(s=s[/[\d.]+$/.exec(n)])&&(n="Windows "+s),n=String(n),i&&r&&(n=n.replace(RegExp(i,"i"),r)),e=n=a(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}return e}));if(I&&(I=[I]),/\bAndroid\b/.test(T)&&!B&&(y=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(t))&&(B=u(y[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),N&&!B?B=o([N]):N&&B&&(B=B.replace(RegExp("^("+c(N)+")[-_.\\s]","i"),N+" ").replace(RegExp("^("+c(N)+")[-_.]?(\\w)","i"),N+" $2")),(y=/\bGoogle TV\b/.exec(B))&&(B=y[0]),/\bSimulator\b/i.test(t)&&(B=(B?B+" ":"")+"Simulator"),"Opera Mini"==P&&/\bOPiOS\b/.test(t)&&r.push("running in Turbo/Uncompressed mode"),"IE"==P&&/\blike iPhone OS\b/.test(t)?(N=(y=e(t.replace(/like iPhone OS/,""))).manufacturer,B=y.product):/^iP/.test(B)?(P||(P="Safari"),T="iOS"+((y=/ OS ([\d_]+)/i.exec(t))?" "+y[1].replace(/_/g,"."):"")):"Konqueror"==P&&/^Linux\b/i.test(T)?T="Kubuntu":N&&"Google"!=N&&(/Chrome/.test(P)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(B))||/\bAndroid\b/.test(T)&&/^Chrome/.test(P)&&/\bVersion\//i.test(t)?(P="Android Browser",T=/\bAndroid\b/.test(T)?T:"Android"):"Silk"==P?(/\bMobi/i.test(t)||(T="Android",r.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&r.unshift("accelerated")):"UC Browser"==P&&/\bUCWEB\b/.test(t)?r.push("speed mode"):"PaleMoon"==P&&(y=/\bFirefox\/([\d.]+)\b/.exec(t))?r.push("identifying as Firefox "+y[1]):"Firefox"==P&&(y=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(T||(T="Firefox OS"),B||(B=y[1])):!P||(y=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(P))?(P&&!B&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(y+"/")+8))&&(P=null),(y=B||N||T)&&(B||N||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(T))&&(P=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(T)?T:y)+" Browser")):"Electron"==P&&(y=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&r.push("Chromium "+y),m||(m=i(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",c(P),"(?:Firefox|Minefield|NetFront)"])),(y=("iCab"==I&&3<parseFloat(m)?"WebKit":/\bOpera\b/.test(P)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(I)&&"WebKit"||!I&&/\bMSIE\b/i.test(t)&&("Mac OS"==T?"Tasman":"Trident")||"WebKit"==I&&/\bPlayStation\b(?! Vita\b)/i.test(P)&&"NetFront")&&(I=[y]),"IE"==P&&(y=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(P+=" Mobile",T="Windows Phone "+(/\+$/.test(y)?y:y+".x"),r.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(P="IE Mobile",T="Windows Phone 8.x",r.unshift("desktop mode"),m||(m=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=P&&"Trident"==I&&(y=/\brv:([\d.]+)/.exec(t))&&(P&&r.push("identifying as "+P+(m?" "+m:"")),P="IE",m=y[1]),z){if(function(e,t){var o=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(o)||"object"==o&&!e[t])}(n,"global"))if(w&&(A=(y=w.lang.System).getProperty("os.arch"),T=T||y.getProperty("os.name")+" "+y.getProperty("os.version")),v){try{m=n.require("ringo/engine").version.join("."),P="RingoJS"}catch(e){(y=n.system)&&y.global.system==n.system&&(P="Narwhal",T||(T=y[0].os||null))}P||(P="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(y=n.process)&&("object"==typeof y.versions&&("string"==typeof y.versions.electron?(r.push("Node "+y.versions.node),P="Electron",m=y.versions.electron):"string"==typeof y.versions.nw&&(r.push("Chromium "+m,"Node "+y.versions.node),P="NW.js",m=y.versions.nw)),P||(P="Node.js",A=y.arch,T=y.platform,m=(m=/[\d.]+/.exec(y.version))?m[0]:null));else l(y=n.runtime)==b?(P="Adobe AIR",T=y.flash.system.Capabilities.os):l(y=n.phantom)==x?(P="PhantomJS",m=(y=y.version||null)&&y.major+"."+y.minor+"."+y.patch):"number"==typeof O.documentMode&&(y=/\bTrident\/(\d+)/i.exec(t))?(m=[m,O.documentMode],(y=+y[1]+4)!=m[1]&&(r.push("IE "+m[1]+" mode"),I&&(I[1]=""),m[1]=y),m="IE"==P?String(m[1].toFixed(1)):m[0]):"number"==typeof O.documentMode&&/^(?:Chrome|Firefox)\b/.test(P)&&(r.push("masking as "+P+" "+m),P="IE",m="11.0",I=["Trident"],T="Windows");T=T&&a(T)}if(m&&(y=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(m)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(z&&h.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(R=/b/i.test(y)?"beta":"alpha",m=m.replace(RegExp(y+"\\+?$"),"")+("beta"==R?C:E)+(/\d+\+?/.exec(y)||"")),"Fennec"==P||"Firefox"==P&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(T))P="Firefox Mobile";else if("Maxthon"==P&&m)m=m.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(B))"Xbox 360"==B&&(T=null),"Xbox 360"==B&&/\bIEMobile\b/.test(t)&&r.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(P)&&(!P||B||/Browser|Mobi/.test(P))||"Windows CE"!=T&&!/Mobi/i.test(t))if("IE"==P&&z)try{null===n.external&&r.unshift("platform preview")}catch(e){r.unshift("embedded")}else(/\bBlackBerry\b/.test(B)||/\bBB10\b/.test(t))&&(y=(RegExp(B.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||m)?(T=((y=[y,/BB10/.test(t)])[1]?(B=null,N="BlackBerry"):"Device Software")+" "+y[0],m=null):this!=s&&"Wii"!=B&&(z&&k||/Opera/.test(P)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==P&&/\bOS X (?:\d+\.){2,}/.test(T)||"IE"==P&&(T&&!/^Win/.test(T)&&5.5<m||/\bWindows XP\b/.test(T)&&8<m||8==m&&!/\bTrident\b/.test(t)))&&!g.test(y=e.call(s,t.replace(g,"")+";"))&&y.name&&(y="ing as "+y.name+((y=y.version)?" "+y:""),g.test(P)?(/\bIE\b/.test(y)&&"Mac OS"==T&&(T=null),y="identify"+y):(y="mask"+y,P=M?a(M.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(y)&&(T=null),z||(m=null)),I=["Presto"],r.push(y));else P+=" Mobile";if((y=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(y=[parseFloat(y.replace(/\.(\d)$/,".0$1")),y],"Safari"==P&&"+"==y[1].slice(-1)?(P="WebKit Nightly",R="alpha",m=y[1].slice(0,-1)):m!=y[1]&&m!=(y[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(m=null),y[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(t)||0)[1],537.36==y[0]&&537.36==y[2]&&28<=parseFloat(y[1])&&"WebKit"==I&&(I=["Blink"]),z&&(f||y[1])?(I&&(I[1]="like Chrome"),y=y[1]||(530>(y=y[0])?1:532>y?2:532.05>y?3:533>y?4:534.03>y?5:534.07>y?6:534.1>y?7:534.13>y?8:534.16>y?9:534.24>y?10:534.3>y?11:535.01>y?12:535.02>y?"13+":535.07>y?15:535.11>y?16:535.19>y?17:536.05>y?18:536.1>y?19:537.01>y?20:537.11>y?"21+":537.13>y?23:537.18>y?24:537.24>y?25:537.36>y?26:"Blink"!=I?"27":"28")):(I&&(I[1]="like Safari"),y=400>(y=y[0])?1:500>y?2:526>y?3:533>y?4:534>y?"4+":535>y?5:537>y?6:538>y?7:601>y?8:602>y?9:604>y?10:606>y?11:608>y?12:"12"),I&&(I[1]+=" "+(y+="number"==typeof y?".x":/[.+]/.test(y)?"":"+")),"Safari"==P&&(!m||45<parseInt(m))?m=y:"Chrome"==P&&/\bHeadlessChrome/i.test(t)&&r.unshift("headless")),"Opera"==P&&(y=/\bzbov|zvav$/.exec(T))?(P+=" ",r.unshift("desktop mode"),"zvav"==y?(P+="Mini",m=null):P+="Mobile",T=T.replace(RegExp(" *"+y+"$"),"")):"Safari"==P&&/\bChrome\b/.exec(I&&I[1])?(r.unshift("desktop mode"),P="Chrome Mobile",m=null,/\bOS X\b/.test(T)?(N="Apple",T="iOS 4.3+"):T=null):/\bSRWare Iron\b/.test(P)&&!m&&(m=i("Chrome")),m&&0==m.indexOf(y=/[\d.]+$/.exec(T))&&-1<t.indexOf("/"+y+"-")&&(T=u(T.replace(y,""))),T&&-1!=T.indexOf(P)&&!RegExp(P+" OS").test(T)&&(T=T.replace(RegExp(" *"+c(P)+" *"),"")),I&&!/\b(?:Avant|Nook)\b/.test(P)&&(/Browser|Lunascape|Maxthon/.test(P)||"Safari"!=P&&/^iOS/.test(T)&&/\bSafari\b/.test(I[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(P)&&I[1])&&(y=I[I.length-1])&&r.push(y),r.length&&(r=["("+r.join("; ")+")"]),N&&B&&0>B.indexOf(N)&&r.push("on "+N),B&&r.push((/^on /.test(r[r.length-1])?"":"on ")+B),T){var W=(y=/ ([\d.+]+)$/.exec(T))&&"/"==T.charAt(T.length-y[0].length-1);T={architecture:32,family:y&&!W?T.replace(y[0],""):T,version:y?y[1]:null,toString:function(){var e=this.version;return this.family+(e&&!W?" "+e:"")+(64==this.architecture?" 64-bit":"")}}}return(y=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(A))&&!/\bi686\b/i.test(A)?(T&&(T.architecture=64,T.family=T.family.replace(RegExp(" *"+y),"")),P&&(/\bWOW64\b/i.test(t)||z&&/\w(?:86|32)$/.test(h.cpuClass||h.platform)&&!/\bWin64; x64\b/i.test(t))&&r.unshift("32-bit")):T&&/^OS X/.test(T.family)&&"Chrome"==P&&39<=parseFloat(m)&&(T.architecture=64),t||(t=null),(n={}).description=t,n.layout=I&&I[0],n.manufacturer=N,n.name=P,n.prerelease=R,n.product=B,n.ua=t,n.version=P&&m,n.os=T||{architecture:null,family:null,version:null,toString:function(){return"null"}},n.parse=e,n.toString=function(){return this.description||""},n.version&&r.unshift(m),n.name&&r.unshift(P),T&&P&&(T!=String(T).split(" ")[0]||T!=P.split(" ")[0]&&!B)&&r.push(B?"("+T+")":"on "+T),r.length&&(n.description=r.join(" ")),n}();p.platform=w,void 0===(n=function(){return w}.call(t,o,t,e))||(e.exports=n)}.call(this)}).call(this,o(2)(e),o(3))},function(e,t){const o={getUserAgent:function(){return window.navigator.userAgent},userAgentContains:function(e){return e=e.toLowerCase(),this.getUserAgent().toLowerCase().indexOf(e)>-1},isOSX:function(){return this.userAgentContains("Macintosh")},isFirefox:function(){return this.userAgentContains("firefox")},isInternetExplorer:function(){return this.userAgentContains("trident")},isIE:function(){var e=this.getUserAgent().toLowerCase();return e.indexOf("msie")>0||e.indexOf("trident/")>0},isEdge:function(){return this.getUserAgent().toLowerCase().indexOf("edge")>0},isChrome:function(){const e=window.chrome,t=window.navigator,o=t.vendor,i=void 0!==window.opr,n=t.userAgent.indexOf("Edge")>-1,r=t.userAgent.match("CriOS");return null!=e&&"Google Inc."===o&&!1===i&&!1===n||r},isOpera:function(){return this.userAgentContains(" OPR/")}};let i;const n=(e,t,o)=>e.addEventListener?(e.addEventListener(t,o),{remove:function(){e.removeEventListener(t,o)}}):(e.attachEvent(t,o),{remove:function(){e.detachEvent(t,o)}}),r=(e,t)=>{let o=document.createElement("iframe");return o.src=t,o.id="hiddenIframe",o.style.display="none",e.appendChild(o),o},a=(e,t,o)=>{const a=setTimeout((function(){t(),l.remove()}),i);let s=document.querySelector("#hiddenIframe");s||(s=r(document.body,"about:blank"));const l=n(window,"blur",()=>{clearTimeout(a),l.remove(),o()});s.contentWindow.location.href=e};e.exports=(e,t,s,l=2e3,c)=>{const d=()=>{t&&t()},u=()=>{s&&s()},h=()=>{if(o.isFirefox()){(()=>{const e=window.navigator.userAgent;let t,o=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(o[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],parseFloat(t[1])||""):"Chrome"===o[1]&&(t=e.match(/\b(OPR|Edge)\/(\d+)/),null!=t)?parseFloat(t[2]):(o=o[2]?[o[1],o[2]]:[window.navigator.appName,window.navigator.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&o.splice(1,1,t[1]),parseFloat(o[1]))})()>=64?a(e,d,u):((e,t,o)=>{let i=document.querySelector("#hiddenIframe");i||(i=r(document.body,"about:blank"));try{i.contentWindow.location.href=e,o()}catch(e){"NS_ERROR_UNKNOWN_PROTOCOL"==e.name&&t()}})(e,d,u)}else o.isChrome()?((e,t,o)=>{const r=setTimeout((function(){t(),s.remove()}),i);let a=window;for(;a.parent&&a!=a.parent;)a=a.parent;const s=n(a,"blur",()=>{clearTimeout(r),s.remove(),o()});window.location.href=e})(e,d,u):o.isOSX()?a(e,d,u):c&&c()};if(l&&(i=l),o.isEdge()||o.isIE())((e,t,o)=>{navigator.msLaunchUri(e,o,t)})(e,t,s);else if(document.hasFocus())h();else{let e=n(window,"focus",()=>{e.remove(),h()})}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";o.r(t),o.d(t,"ZeroAccount",(function(){return k}));var i=o(1),n=o.n(i),r=new function(){this.QrCode=function(n,r,a,s){if(n<t||n>o)throw"Version value out of range";if(s<-1||s>7)throw"Mask value out of range";if(!(r instanceof i))throw"QrCode.Ecc expected";for(var c=4*n+17,d=[],u=0;u<c;u++)d.push(!1);var h=[],p=[];for(u=0;u<c;u++)h.push(d.slice()),p.push(d.slice());if(function(){for(var e=0;e<c;e++)S(6,e,e%2==0),S(e,6,e%2==0);g(3,3),g(c-4,3),g(3,c-4);var t=function(){if(1==n)return[];for(var e=Math.floor(n/7)+2,t=32==n?26:2*Math.ceil((c-13)/(2*e-2)),o=[6],i=c-7;o.length<e;i-=t)o.splice(1,0,i);return o}(),o=t.length;for(e=0;e<o;e++)for(var i=0;i<o;i++)0==e&&0==i||0==e&&i==o-1||e==o-1&&0==i||v(t[e],t[i]);b(0),function(){if(n<7)return;for(var e=n,t=0;t<12;t++)e=e<<1^7973*(e>>>11);var o=n<<12|e;if(o>>>18!=0)throw"Assertion error";for(t=0;t<18;t++){var i=y(o,t),r=c-11+t%3,a=Math.floor(t/3);S(r,a,i),S(a,r,i)}}()}(),function(t){if(t.length!=Math.floor(e.getNumRawDataModules(n)/8))throw"Invalid argument";for(var o=0,i=c-1;i>=1;i-=2){6==i&&(i=5);for(var r=0;r<c;r++)for(var a=0;a<2;a++){var s=i-a,l=0==(i+1&2)?c-1-r:r;!p[l][s]&&o<8*t.length&&(h[l][s]=y(t[o>>>3],7-(7&o)),o++)}}if(o!=8*t.length)throw"Assertion error"}(function(t){if(t.length!=e.getNumDataCodewords(n,r))throw"Invalid argument";for(var o=e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],i=e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(e.getNumRawDataModules(n)/8),s=o-a%o,c=Math.floor(a/o),d=[],u=new l(i),h=0,p=0;h<o;h++){var m=t.slice(p,p+c-i+(h<s?0:1));p+=m.length;var f=u.getRemainder(m);h<s&&m.push(0),d.push(m.concat(f))}var b=[];for(h=0;h<d[0].length;h++)for(var g=0;g<d.length;g++)(h!=c-i||g>=s)&&b.push(d[g][h]);if(b.length!=a)throw"Assertion error";return b}(a)),-1==s){var m=1/0;for(u=0;u<8;u++){b(u),w(u);var f=x();f<m&&(s=u,m=f),w(u)}}if(s<0||s>7)throw"Assertion error";function b(e){for(var t=r.formatBits<<3|e,o=t,i=0;i<10;i++)o=o<<1^1335*(o>>>9);var n=21522^(t<<10|o);if(n>>>15!=0)throw"Assertion error";for(i=0;i<=5;i++)S(8,i,y(n,i));S(8,7,y(n,6)),S(8,8,y(n,7)),S(7,8,y(n,8));for(i=9;i<15;i++)S(14-i,8,y(n,i));for(i=0;i<8;i++)S(c-1-i,8,y(n,i));for(i=8;i<15;i++)S(8,c-15+i,y(n,i));S(8,c-8,!0)}function g(e,t){for(var o=-4;o<=4;o++)for(var i=-4;i<=4;i++){var n=Math.max(Math.abs(i),Math.abs(o)),r=e+i,a=t+o;0<=r&&r<c&&0<=a&&a<c&&S(r,a,2!=n&&4!=n)}}function v(e,t){for(var o=-2;o<=2;o++)for(var i=-2;i<=2;i++)S(e+i,t+o,1!=Math.max(Math.abs(i),Math.abs(o)))}function S(e,t,o){h[t][e]=o,p[t][e]=!0}function w(e){if(e<0||e>7)throw"Mask value out of range";for(var t=0;t<c;t++)for(var o=0;o<c;o++){var i;switch(e){case 0:i=(o+t)%2==0;break;case 1:i=t%2==0;break;case 2:i=o%3==0;break;case 3:i=(o+t)%3==0;break;case 4:i=(Math.floor(o/3)+Math.floor(t/2))%2==0;break;case 5:i=o*t%2+o*t%3==0;break;case 6:i=(o*t%2+o*t%3)%2==0;break;case 7:i=((o+t)%2+o*t%3)%2==0;break;default:throw"Assertion error"}!p[t][o]&&i&&(h[t][o]=!h[t][o])}}function x(){for(var t=0,o=0;o<c;o++)for(var i,n,r=0;r<c;r++)0==r||h[o][r]!=n?(n=h[o][r],i=1):5==++i?t+=e.PENALTY_N1:i>5&&t++;for(r=0;r<c;r++){var a,s;for(o=0;o<c;o++)0==o||h[o][r]!=s?(s=h[o][r],a=1):5==++a?t+=e.PENALTY_N1:a>5&&t++}for(o=0;o<c-1;o++)for(r=0;r<c-1;r++){var l=h[o][r];l==h[o][r+1]&&l==h[o+1][r]&&l==h[o+1][r+1]&&(t+=e.PENALTY_N2)}for(o=0;o<c;o++){r=0;for(var d=0;r<c;r++)d=d<<1&2047|(h[o][r]?1:0),r>=10&&(93==d||1488==d)&&(t+=e.PENALTY_N3)}for(r=0;r<c;r++)for(o=0,d=0;o<c;o++)d=d<<1&2047|(h[o][r]?1:0),o>=10&&(93==d||1488==d)&&(t+=e.PENALTY_N3);var u=0;h.forEach((function(e){e.forEach((function(e){e&&u++}))}));var p=c*c;return t+=(Math.ceil(Math.abs(20*u-10*p)/p)-1)*e.PENALTY_N4}function y(e,t){return 0!=(e>>>t&1)}b(s),w(s),p=null,Object.defineProperty(this,"version",{value:n}),Object.defineProperty(this,"size",{value:c}),Object.defineProperty(this,"errorCorrectionLevel",{value:r}),Object.defineProperty(this,"mask",{value:s}),this.getModule=function(e,t){return 0<=e&&e<c&&0<=t&&t<c&&h[t][e]},this.circlePath=function(e,t,o){return"M "+e+" "+t+" m -"+o+", 0 a "+o+","+o+" 0 1,0 "+2*o+",0 a "+o+","+o+" 0 1,0 -"+2*o+",0"},this.svgObject=function(e){for(var t=[],o=0;o<c;o++)for(var i=0;i<c;i++)this.getModule(i,o)&&(e?t.push(this.circlePath(i+.5,o+.5,.5)):t.push("M"+i+","+o+"h1v1h-1z"));return{path:t.join(" "),size:c}}},this.QrCode.encodeText=function(e,t){var o=r.QrSegment.makeSegments(e);return this.encodeSegments(o,t)},this.QrCode.encodeBinary=function(e,t){var o=r.QrSegment.makeBytes(e);return this.encodeSegments([o],t)},this.QrCode.encodeSegments=function(i,n,a,s,l,d){if(null==a&&(a=t),null==s&&(s=o),null==l&&(l=-1),null==d&&(d=!0),!(t<=a&&a<=s&&s<=o)||l<-1||l>7)throw"Invalid value";var u,h;for(u=a;;u++){var p=8*e.getNumDataCodewords(u,n);if((h=r.QrSegment.getTotalBits(i,u))<=p)break;if(u>=s)throw"Data too long"}[this.Ecc.MEDIUM,this.Ecc.QUARTILE,this.Ecc.HIGH].forEach((function(t){d&&h<=8*e.getNumDataCodewords(u,t)&&(n=t)}));var m=new c;if(i.forEach((function(e){m.appendBits(e.mode.modeBits,4),m.appendBits(e.numChars,e.mode.numCharCountBits(u)),e.getData().forEach((function(e){m.push(e)}))})),m.length!=h)throw"Assertion error";p=8*e.getNumDataCodewords(u,n);if(m.length>p)throw"Assertion error";if(m.appendBits(0,Math.min(4,p-m.length)),m.appendBits(0,(8-m.length%8)%8),m.length%8!=0)throw"Assertion error";for(var f=236;m.length<p;f^=253)m.appendBits(f,8);for(var b=[];8*b.length<m.length;)b.push(0);return m.forEach((function(e,t){b[t>>>3]|=e<<7-(7&t)})),new this(u,n,b,l)};var e={getNumRawDataModules:function(e){if(e<t||e>o)throw"Version number out of range";var i=(16*e+128)*e+64;if(e>=2){var n=Math.floor(e/7)+2;i-=(25*n-10)*n-55,e>=7&&(i-=36)}return i},getNumDataCodewords:function(t,o){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[o.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][t]}},t=1,o=40;function i(e,t){Object.defineProperty(this,"ordinal",{value:e}),Object.defineProperty(this,"formatBits",{value:t})}Object.defineProperty(this.QrCode,"MIN_VERSION",{value:t}),Object.defineProperty(this.QrCode,"MAX_VERSION",{value:o}),e.PENALTY_N1=3,e.PENALTY_N2=3,e.PENALTY_N3=40,e.PENALTY_N4=10,e.ECC_CODEWORDS_PER_BLOCK=[[null,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[null,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[null,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[null,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],e.NUM_ERROR_CORRECTION_BLOCKS=[[null,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[null,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[null,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[null,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],this.QrCode.Ecc={LOW:new i(0,1),MEDIUM:new i(1,0),QUARTILE:new i(2,3),HIGH:new i(3,2)},this.QrSegment=function(e,t,o){if(t<0||!(e instanceof a))throw"Invalid argument";o=o.slice(),Object.defineProperty(this,"mode",{value:e}),Object.defineProperty(this,"numChars",{value:t}),this.getData=function(){return o.slice()}},this.QrSegment.makeBytes=function(e){var t=new c;return e.forEach((function(e){t.appendBits(e,8)})),new this(this.Mode.BYTE,e.length,t)},this.QrSegment.makeNumeric=function(e){if(!this.NUMERIC_REGEX.test(e))throw"String contains non-numeric characters";for(var t=new c,o=0;o<e.length;){var i=Math.min(e.length-o,3);t.appendBits(parseInt(e.substr(o,i),10),3*i+1),o+=i}return new this(this.Mode.NUMERIC,e.length,t)},this.QrSegment.makeAlphanumeric=function(e){if(!this.ALPHANUMERIC_REGEX.test(e))throw"String contains unencodable characters in alphanumeric mode";var t,o=new c;for(t=0;t+2<=e.length;t+=2){var i=45*n.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=n.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),o.appendBits(i,11)}return t<e.length&&o.appendBits(n.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6),new this(this.Mode.ALPHANUMERIC,e.length,o)},this.QrSegment.makeSegments=function(e){return""==e?[]:this.NUMERIC_REGEX.test(e)?[this.makeNumeric(e)]:this.ALPHANUMERIC_REGEX.test(e)?[this.makeAlphanumeric(e)]:[this.makeBytes(s(e))]},this.QrSegment.makeEci=function(e){var t=new c;if(e<0)throw"ECI assignment value out of range";if(e<128)t.appendBits(e,8);else if(e<16384)t.appendBits(2,2),t.appendBits(e,14);else{if(!(e<1e6))throw"ECI assignment value out of range";t.appendBits(6,3),t.appendBits(e,21)}return new this(this.Mode.ECI,0,t)},this.QrSegment.getTotalBits=function(e,t){for(var o=0,i=0;i<e.length;i++){var n=e[i],r=n.mode.numCharCountBits(t);if(n.numChars>=1<<r)return 1/0;o+=4+r+n.getData().length}return o};var n={};function a(e,t){Object.defineProperty(this,"modeBits",{value:e}),this.numCharCountBits=function(e){return t[Math.floor((e+7)/17)]}}function s(e){e=encodeURI(e);for(var t=[],o=0;o<e.length;o++)"%"!=e.charAt(o)?t.push(e.charCodeAt(o)):(t.push(parseInt(e.substr(o+1,2),16)),o+=2);return t}function l(e){if(e<1||e>255)throw"Degree out of range";for(var t=[],o=0;o<e-1;o++)t.push(0);t.push(1);var i=1;for(o=0;o<e;o++){for(var n=0;n<t.length;n++)t[n]=l.multiply(t[n],i),n+1<t.length&&(t[n]^=t[n+1]);i=l.multiply(i,2)}this.getRemainder=function(e){var o=t.map((function(){return 0}));return e.forEach((function(e){var i=e^o.shift();o.push(0);for(var n=0;n<o.length;n++)o[n]^=l.multiply(t[n],i)})),o}}function c(){Array.call(this),this.appendBits=function(e,t){if(t<0||t>31||e>>>t!=0)throw"Value out of range";for(var o=t-1;o>=0;o--)this.push(e>>>o&1)}}this.QrSegment.NUMERIC_REGEX=/^[0-9]*$/,this.QrSegment.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,n.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",this.QrSegment.Mode={NUMERIC:new a(1,[10,12,14]),ALPHANUMERIC:new a(2,[9,11,13]),BYTE:new a(4,[8,16,16]),KANJI:new a(8,[8,10,12]),ECI:new a(7,[0,0,0])},l.multiply=function(e,t){if(e>>>8!=0||t>>>8!=0)throw"Byte out of range";for(var o=0,i=7;i>=0;i--)o=o<<1^285*(o>>>7),o^=(t>>>i&1)*e;if(o>>>8!=0)throw"Assertion error";return o},c.prototype=Object.create(Array.prototype),c.prototype.constructor=c},a=r;const s=[{test:[/googlebot/i],name:"Googlebot"},{test:[/opera/i],name:"Opera"},{test:[/opr\/|opios/i],name:"Opera"},{test:[/SamsungBrowser/i],name:"Samsung Internet for Android"},{test:[/Whale/i],name:"NAVER Whale Browser"},{test:[/MZBrowser/i],name:"MZ Browser"},{test:[/focus/i],name:"Focus"},{test:[/swing/i],name:"Swing"},{test:[/coast/i],name:"Opera Coast"},{test:[/yabrowser/i],name:"Yandex Browser"},{test:[/ucbrowser/i],name:"UC Browser"},{test:[/Maxthon|mxios/i],name:"Maxthon"},{test:[/epiphany/i],name:"Epiphany"},{test:[/puffin/i],name:"Puffin"},{test:[/sleipnir/i],name:"Sleipnir"},{test:[/k-meleon/i],name:"K-Meleon"},{test:[/micromessenger/i],name:"WeChat"},{test:[/msie|trident/i],name:"Internet Explorer"},{test:[/\sedg\//i],name:"Microsoft Edge"},{test:[/edg([ea]|ios)/i],name:"Microsoft Edge"},{test:[/vivaldi/i],name:"Vivaldi"},{test:[/seamonkey/i],name:"SeaMonkey"},{test:[/sailfish/i],name:"Sailfish"},{test:[/silk/i],name:"Amazon Silk"},{test:[/phantom/i],name:"PhantomJS"},{test:[/slimerjs/i],name:"SlimerJS"},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],name:"BlackBerry"},{test:[/(web|hpw)[o0]s/i],name:"WebOS Browser"},{test:[/bada/i],name:"Bada"},{test:[/tizen/i],name:"Tizen"},{test:[/qupzilla/i],name:"QupZilla"},{test:[/firefox|iceweasel|fxios/i],name:"Firefox"},{test:[/chromium/i],name:"Chromium"},{test:[/chrome|crios|crmo/i],name:"Chrome"},{test(e){const t=!/like android/i.test(e),o=/android/i.test(e);return t&&o},name:"Android Browser"},{test:[/playstation 4/i],name:"PlayStation 4"},{test:[/safari|applewebkit/i],name:"Safari"}];var l=function(e){for(let t=0;t<s.length;t++){let o=s[t];if("function"==typeof o.test&&o.test(e))return o.name;if(o.test instanceof Array)for(let t=0;t<o.test.length;t++){if(o.test[t].test(e))return o.name}}return""};function c(e,t){if("object"!=typeof t)return!1;let o,i,n=(e=e.replace(/(&)\1+/g,"&")).substr(1).split("&");(n.length<1||1===n.length&&""===n[0])&&(n=[]);for(let e in t){if(!t.hasOwnProperty(e))continue;let r=encodeURIComponent(e),a=encodeURIComponent(t[e]);o=[],i=!1;for(let e=n.length-1;e>=0;--e)if(o=n[e].split("="),o[0]===r){n[e]=r+"="+a,i=!0;break}i||n.push(r+"="+a)}return n.join("&")}var d={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let u;const h=new Uint8Array(16);function p(){if(!u&&(u="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(h)}const m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function f(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+"-"+m[e[t+4]]+m[e[t+5]]+"-"+m[e[t+6]]+m[e[t+7]]+"-"+m[e[t+8]]+m[e[t+9]]+"-"+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}var b=function(e,t,o){if(d.randomUUID&&!t&&!e)return d.randomUUID();const i=(e=e||{}).random||(e.rng||p)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){o=o||0;for(let e=0;e<16;++e)t[o+e]=i[e];return t}return f(i)};let g=a.QrCode;const v="http://www.w3.org/2000/svg",S=function(e){if(S.prototype._cachedResult)return S.prototype._cachedResult;const t=l(e);return S.prototype._cachedResult="Opera"===t||"Opera Coast"===t?"opera-https":"Firefox"===t?"firefox":"Safari"===t?"https":"Chrome"===t||"Chromium"===t?"googlechromes":"https"};class w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",{color:t="#3C444F",level:o="M",domain:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"string"!=typeof e)throw new Error("appId is required and must ba a string");this.appId=e,this.color=t,this.level=o,this.domain=i,this.base="0account"}Data(){return this.svgData}IconCross(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color;return{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.base+"-icon-cross",viewBox:"0 0 14 14",width:14,height:14,paths:[{fill:e,path:"M12.293.293a1 1 0 0 1 1.414 1.414l-12 12a1 1 0 1 1-1.414-1.414l12-12z"},{fill:e,path:"M.293 1.707A1 1 0 0 1 1.707.293l12 12a1 1 0 0 1-1.414 1.414l-12-12z"}]}}LoadingLogo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color;return{className:arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.base+"-logo "+this.base+"-loading-logo",viewBox:"0 0 319 400",width:319,height:400,paths:[{type:"mask",id:"zero-account-grayscale-mask",fill:"#FFF",path:"m -509.9,160.405 0,67.59962 c 70.8,0 106.9,14.70038 141.7,29.00038 34.9,14.3 71,29 142.10001,29 71,0 107.2,-14.8 142.100004,-29 34.8,-14.2 70.9,-29 141.700016,-29 70.8,0 106.9,14.7 141.7,29 34.9,14.3 71,29 142.1,29 71.09999,0 107.19999,-14.8 142.09999,-29 34.8,-14.2 70.9,-29 141.7,-29 70.8,0 106.9,14.7 141.7,29 34.9,14.3 71,29 142.1,29 l 0,-632.20001 -1419.00002,0 z"},{type:"mask",id:"zero-account-color-mask",fill:"#FFF",path:"m 909.1,353.4 0,-67.6 c -70.8,0 -106.9,-14.7 -141.7,-29 -34.9,-14.3 -71,-29 -142.1,-29 -71,0 -107.2,14.8 -142.1,29 -34.8,14.2 -70.9,29 -141.7,29 -70.8,0 -106.9,-14.7 -141.7,-29 -34.9,-14.3 -71,-29 -142.1,-29 -71.1,0 -107.2,14.8 -142.1,29 -34.8,14.2 -70.9,29 -141.7,29 -70.8,0 -106.9,-14.7 -141.7,-29 -34.9,-14.3 -71,-29 -142.1,-29 l 0,632.2 1419,0 z"},{mask:"url(#zero-account-grayscale-mask)",fill:e,path:"M164.64 399.97c79.99-14.52 186.94-280.85 145.72-360.83C291.02 1.61 220.96-6.8 152.52 6.27 87.98 18.59 24.87 50.03 7.04 94.19c-36.12 89.42 85.93 318.79 157.6 305.78z"},{mask:"url(#zero-account-color-mask)",fill:"#FA4900",path:"M164.64 399.97c79.99-14.52 186.94-280.85 145.72-360.83C291.02 1.61 220.96-6.8 152.52 6.27 87.98 18.59 24.87 50.03 7.04 94.19c-36.12 89.42 85.93 318.79 157.6 305.78z"},{fill:"#FFF",path:"M157.14 297.77c-40.69-7.35-95.08-142.33-74.12-182.86 19.12-36.96 135.59-18.22 154.28 27.9 18.37 45.3-43.7 161.55-80.16 154.96zm-40.34-102.2c0 24.33 18.17 44.06 40.6 44.06 22.42 0 40.6-19.73 40.6-44.06 0-24.34-18.18-44.07-40.6-44.07-22.43 0-40.6 19.73-40.6 44.07z"}]}}Spinner(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rgb(255, 0, 0, 0.2)","rgb(100, 10, 255, 0.2)","rgb(0, 255, 0, 0.2)","rgb(0, 0, 255, 0.2)"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.base+"-spinner",o=[{type:"circle",stroke:"#3C444F",strokeWidth:"0.7",fill:"#fff",cx:40,cy:40,r:39}];for(let t=0;t<e.length;t++){let i=e[t];o.push({transform:"rotate("+90*t+")",fill:i,path:"M69.73 39.815C67.505 52.238 26.64 68.85 14.37 62.448 3.182 56.61 8.854 21.044 22.815 15.337c13.72-5.61 48.911 13.346 46.916 24.478h-.001zm-30.94 12.32c7.367 0 13.34-5.551 13.34-12.398 0-6.847-5.973-12.398-13.34-12.398-7.368 0-13.34 5.55-13.34 12.398 0 6.847 5.972 12.397 13.34 12.397v.001z"})}return{className:t,viewBox:"0 0 80 80",width:80,height:80,paths:o}}IsMobile(){return e=navigator.userAgent||navigator.vendor||window.opera,!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substring(0,4)));var e}QRCode(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:18e4;e=e>3599e3?3599e3:e,e=e<1e4?1e4:e;this.uuid=b(),this.expires=(new Date).getTime()+e;const t={appId:this.appId,uuid:this.uuid,expires:this.expires},o="https://launch.0account.com/auth?"+c("",{...t,browser:S(navigator.userAgent)});this.url=o,this.IsMobile()||(this.url="zero-account://auth?"+c("",t)),this.svgData=t,this.domain&&(this.svgData.domain=this.domain);const i=(e=>"L"===(e=e.toUpperCase())?g.Ecc.LOW:"M"===e?g.Ecc.MEDIUM:"Q"===e?g.Ecc.QUARTILE:g.Ecc.HIGH)(this.level),n=g.encodeText(o,i);return this.qrcode=n.svgObject(),{className:this.base+"-qrcode",viewBox:`0 0 ${this.qrcode.size} ${this.qrcode.size}`,width:this.qrcode.size,height:this.qrcode.size,paths:[{fill:this.color,path:this.qrcode.path}]}}ToSVG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.className||(e.className="");let o=document.createElementNS(v,"svg");return o.setAttributeNS(null,"class",`${e.className} ${t}`),o.setAttributeNS(null,"viewBox",e.viewBox),e.paths.map((e,t)=>{if("circle"===e.type){let t=document.createElementNS(v,"circle");t.setAttributeNS(null,"stroke",""+e.stroke),t.setAttributeNS(null,"stroke-width",""+e.strokeWidth),t.setAttributeNS(null,"fill",""+e.fill),t.setAttributeNS(null,"cx",""+e.cx),t.setAttributeNS(null,"cy",""+e.cy),t.setAttributeNS(null,"r",""+e.r),o.appendChild(t)}else if("mask"===e.type){let t=document.createElementNS(v,"mask");t.setAttributeNS(null,"id",""+e.id);let i=document.createElementNS(v,"g");i.setAttributeNS(null,"fill","white"),i.setAttributeNS(null,"class","zero-account-mask-group");let n=document.createElementNS(v,"path");n.setAttributeNS(null,"fill",""+e.fill),n.setAttributeNS(null,"d",""+e.path),t.appendChild(i),i.appendChild(n),o.appendChild(t)}else{let t=document.createElementNS(v,"path");t.setAttributeNS(null,"fill",""+e.fill),t.setAttributeNS(null,"d",""+e.path),e.mask&&t.setAttributeNS(null,"mask",""+e.mask),o.appendChild(t)}}),o}}var x=o(0),y=o.n(x);const E="0account",C=()=>{};function O(e){var t=this;let o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];clearTimeout(o),o=setTimeout(()=>{e.apply(t,r)},i)}}class k{init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isOpen=!1;const o=window.zeroAccount.toggle.bind(window.zeroAccount),i=window.zeroAccount.openModal.bind(window.zeroAccount),n=window.zeroAccount.hide.bind(window.zeroAccount);let r=!1;document.querySelectorAll(".zero-button,.zero-qrcode").forEach(e=>{e.addEventListener("click",e=>{const t=e.target;if(t&&!r)switch(r=!0,setTimeout(()=>r=!1,300),!0){case t.classList.contains("zero-qrcode"):i();break;default:o()}})}),document.addEventListener("keydown",e=>{"Escape"!==e.key&&"Esc"!==e.key||n()});const a=(e,t)=>void 0!==e?e:t;this.opts={environment:a(t.environment,"production"),domain:a(t.domain,!1),target:a(t.target,null),modal:a(t.modal,!0),instructions:a(t.instructions,!0),level:a(t.level,"L"),color:a(t.color,"#3C444F"),updateInterval:a(t.updateInterval,18e4),callbackURL:a(t.callbackURL,window.location.origin+"/zero-auth"),enableWithCredentials:a(t.enableWithCredentials,!1)},this.appId=e,this.zero=new w(e,this.opts),this.onAuthRequest=new XMLHttpRequest,this.opts.enableWithCredentials&&(this.onAuthRequest.withCredentials=!0),this.resetTryCount(),this.wsInitialized=!1,this.initWS(),this.setup()}log(){"staging"===this.opts.environment&&console.log(...arguments)}resetTryCount(){this.onAuthRequestTryCount=5}setupIframe(){this.iframe=document.createElement("iframe"),this.iframe.id="zero-account",this.iframe.style.zIndex="2147483647",this.iframe.width="100%",this.iframe.height="100%",this.iframe.style.position="relative",this.iframe.style.display="block",this.iframe.style.border="none",this.iframe.style.top="0",this.iframe.style.left="0",this.iframe.style.right="0",this.iframe.style.bottom="0",this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.frameBorder=0,this.opts.modal&&(this.iframe.style.position="fixed",this.iframe.style.display="none")}setup(){if(this.setupIframe(),this.opts.modal)document.body.appendChild(this.iframe);else{if(!this.opts.target)throw new Error("target or modal should be set");this.opts.target.appendChild(this.iframe)}if(this.iframeDoc=this.iframe.contentDocument||this.iframe.contentWindow.document,this.iframeDoc.open(),this.iframeDoc.write('<html lang="en"><body></body></html>'),this.iframeDoc.close(),this.iframeBody=this.iframeDoc.body,this.main=this.iframeDoc.createElement("div"),this.main.className="zero-account",this.logo=this.zero.ToSVG(this.zero.LoadingLogo()),this.spinner=this.zero.ToSVG(this.zero.Spinner()),this.qrcode=this.zero.ToSVG(this.zero.QRCode(this.opts.updateInterval)),this.zeroContainer=this.iframeDoc.createElement("div"),this.zeroContainer.className="zero-account-container",this.zeroContainer.appendChild(this.logo),this.zeroContainer.appendChild(this.spinner),this.zeroContainer.appendChild(this.qrcode),this.main.appendChild(this.zeroContainer),this.opts.instructions){const e=this.iframeDoc.createElement("div");e.className="zero-account-title-main";const t=this.iframeDoc.createElement("a");t.textContent="boolean"==typeof this.opts.instructions?"Get the mobile app":this.opts.instructions,t.href="/downloads",t.target="_blank",t.rel="noreferrer noopener",t.className="zero-account-title",e.appendChild(t),this.main.appendChild(e)}this.opts.modal?(this.modal=this.iframeDoc.createElement("div"),this.modal.className="zero-account-modal zero-account-modal-closed",this.modal.addEventListener("click",e=>{if(e.target!==this.modal&&e.target!==this.modalCloseButton&&e.target!==this.modalCloseButton.firstChild&&e.target!==this.modalCloseButton.lastChild)return e.stopPropagation();this.hide()}),this.modalCloseButton=this.zero.ToSVG(this.zero.IconCross()),this.modalCloseButton.setAttribute("class","zero-account-modal-close"),this.modalContent=this.iframeDoc.createElement("div"),this.modalContent.className="zero-account-modal-content",this.modalContent.appendChild(this.main),this.modalContent.appendChild(this.modalCloseButton),this.modal.appendChild(this.modalContent),this.iframeBody.appendChild(this.modal)):(this.main.classList.add("stop-animation"),this.iframeBody.appendChild(this.main),this.start()),this.insertStyles()}start(){this.stop(),this.refreshQRCode(),this.updateQRCodeInterval=setTimeout(()=>{this.updateQRCode()},this.opts.updateInterval-3e3)}stop(){this.spinner.classList.remove("show-spinner"),clearTimeout(this.updateQRCodeInterval),clearTimeout(this.refreshQRCodeInterval),clearInterval(this.hideTimeout),clearInterval(this.showTimeout)}updateQRCode(){this.spinner.classList.add("show-spinner"),this.refreshQRCodeInterval=setTimeout(()=>{this.spinner.classList.remove("show-spinner"),this.start()},3e3)}refreshQRCode(){this.qrcode=this.zero.ToSVG(this.zero.QRCode(this.opts.updateInterval)),this.zeroContainer.replaceChild(this.logo,this.zeroContainer.firstChild),this.zeroContainer.replaceChild(this.qrcode,this.zeroContainer.lastChild),this.wsSend("from-widget-uuid-updated",{appId:this.zero.appId,browser:y.a.name,os:y.a.os.family})}wsSend(e,t){if(!this.socket||!this.socket.readyState||this.socket.readyState!==WebSocket.OPEN)return setTimeout(()=>this.wsSend(e,t),100);const o={action:e,id:localStorage.getItem(E+"_session-id"),timeout:this.opts.updateInterval+"ms",uuid:this.zero.uuid,appId:""+this.appId,message:{}},i=localStorage.getItem(E+"_session-token");i&&(o.token=i),t&&(o.message=t),this.socket.send(JSON.stringify(o))}insertStyles(){const e=this.iframeDoc.createElement("style");e.innerHTML=`.zero-account-container{position:relative;width:100%;padding-bottom:100%}.zero-account-qrcode{position:absolute;left:0;top:0;width:100%;height:100%}.zero-account-logo{z-index:1}.zero-account-spinner{z-index:2}.zero-account-title-main{letter-spacing:.02rem;font-size:1.2rem;font-family:sans-serif;margin-top:3%;cursor:pointer;border:rgba(60,68,79,.5) 1.8px solid;width:100%;background:#3c444f}.zero-account-title{color:#fff;display:inline-block;width:100%;padding-top:3%;padding-bottom:3%;text-transform:uppercase;text-decoration:none;-webkit-user-select:none;user-select:none}.zero-account-modal{opacity:0;position:fixed;z-index:1;top:0;left:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.4);transition:all 200ms ease;padding:20px;text-align:center}.zero-account-modal::after{content:"";display:inline-block;height:100%;width:0;vertical-align:middle}.zero-account-modal-open{opacity:1}.zero-account-modal-content{background-color:#fefefe;width:440px;padding:10px;border-radius:5px;margin:auto;position:relative;transition:all 200ms ease;transform:scale(0.7);display:inline-block;vertical-align:middle}.zero-account-modal-content-open{transform:scale(1)}.zero-account-modal-close{border-radius:6px;background:#fff;position:absolute;right:-30px;top:-30px;width:14px;height:14px;box-sizing:content-box;padding:7px}.zero-account-modal-close:hover,.zero-account-modal-close:focus{fill:#000;cursor:pointer}@media(max-width: 575.9px){.zero-account-modal-content{width:320px}.zero-account-icon-android,.zero-account-icon-ios{width:100px;height:100px}.zero-account-title{font-size:1.25rem}}@media(max-width: 359.9px){.zero-account-modal-content{width:300px}.zero-account-modal{padding:20px 10px}.zero-account-icon-android,.zero-account-icon-ios{width:90px;height:90px}}zero-account *,zero-account *:before,zero-account *:after{box-sizing:border-box}.zero-account-container{position:relative;font-size:0}.zero-account-logo{position:absolute;left:50%;top:50%;width:24%;height:24%;transform:translate(-50%, -50%)}.zero-account-spinner:not(.show-spinner){display:none}.zero-account-spinner{left:0;top:0;position:absolute}.zero-account-spinner>path{transform-origin:center}.zero-account-spinner>path:nth-child(2){animation:zero-accountRotate1 1.9s cubic-bezier(0.5, -0.75, 0.7, 2) infinite;animation-delay:20ms}@keyframes zero-accountRotate1{0%{transform:rotate(90deg)}100%{transform:rotate(450deg)}}.zero-account-spinner>path:nth-child(3){animation:zero-accountRotate2 1.9s cubic-bezier(0.5, -0.75, 0.7, 2) infinite;animation-delay:40ms}@keyframes zero-accountRotate2{0%{transform:rotate(180deg)}100%{transform:rotate(540deg)}}.zero-account-spinner>path:nth-child(4){animation:zero-accountRotate3 1.9s cubic-bezier(0.5, -0.75, 0.7, 2) infinite;animation-delay:60ms}@keyframes zero-accountRotate3{0%{transform:rotate(270deg)}100%{transform:rotate(630deg)}}.zero-account-spinner>path:nth-child(5){animation:zero-accountRotate4 1.9s cubic-bezier(0.5, -0.75, 0.7, 2) infinite;animation-delay:80ms}@keyframes zero-accountRotate4{0%{transform:rotate(360deg)}100%{transform:rotate(720deg)}}@keyframes scale{0%{transform:translate(-50%, -50%) scale(0)}100%{transform:translate(-50%, -50%) scale(1)}}.zero-account-mask-group{animation:raise 60s infinite ease-in-out;animation-direction:alternate}.zero-account-loading-logo>mask>g>path{animation:waves 1.5s infinite linear}@keyframes waves{from{transform:translateX(17rem)}to{transform:translateX(-17rem)}}@keyframes raise{from{transform:translateY(-15rem)}to{transform:translateY(8rem)}}.zero-account-mask-group {\n -webkit-animation: raise ${this.opts.updateInterval-3e3}ms infinite ease-in-out !important;\n animation: raise ${this.opts.updateInterval-3e3}ms infinite ease-in-out !important;\n }`;const t=this.iframeDoc.head||this.iframeDoc.getElementsByTagName("head")[0];e.type="text/css",t.appendChild(e)}toggle(){this.isOpen?this.hide():this.show()}show(){this.opts.modal&&(this.socket&&this.socket.readyState&&this.socket.readyState===WebSocket.CONNECTING&&this.socket.readyState===WebSocket.OPEN||this.initWS(),this.start(),n()(this.zero.url,()=>{window.location.href="/downloads"},C,300,()=>{window.location.href="/downloads"}),this.stop())}openModal(){this.start(),this.isOpen=!0,this.iframe.style.display="block",this.showTimeout=setTimeout(()=>{this.modal.classList.add("zero-account-modal-open"),this.modalContent.classList.add("zero-account-modal-content-open")},10),this.wsInitialized||(this.spinner.classList.add("show-spinner"),setTimeout(()=>this.start(),200))}hide(){this.opts.modal&&(this.isOpen=!1,this.modal.classList.remove("zero-account-modal-open"),this.modalContent.classList.remove("zero-account-modal-content-open"),this.hideTimeout=setTimeout(()=>{this.iframe.style.display="none",this.stop()},200))}onZeroAuth(e,t,o){const i=this;if(i.onAuthRequest.abort(),this.onAuthRequestTryCount<=0)return i.onAuthRequest.ontimeout=C,i.onAuthRequest.onerror=C,i.resetTryCount(),this.dispatchEventAndWsSend("0account-authentication-failed"),void i.refreshQRCode();i.onAuthRequest.onreadystatechange=()=>{if(4!==i.onAuthRequest.readyState)return;if(200!==i.onAuthRequest.status)return n();let e=i.onAuthRequest.responseText;try{e=JSON.parse(e)}catch(e){return void this.log(e)}i.resetTryCount(),i.dispatchEventAndWsSend("0account-authenticated",e),this.hide()};const n=O(()=>{i.onAuthRequestTryCount--,i.onAuthRequestTryCount>=0&&i.onZeroAuth(e,t,o)},200);i.onAuthRequest.ontimeout=n,i.onAuthRequest.onerror=n,i.onAuthRequest.open("POST",e,!0),i.onAuthRequest.setRequestHeader("Authorization","Bearer "+t),i.onAuthRequest.setRequestHeader("x-0account-uuid",o),i.onAuthRequest.send()}dispatchEventAndWsSend(e,t){this.dispatchEvent(e,t),this.wsSend("from-widget-"+e,t)}dispatchEvent(e,t){let o=new CustomEvent(e);t&&(o=new CustomEvent(e,{detail:t})),document.dispatchEvent(o)}initWS(){const e=e=>{this.wsInitialized=!0,this.spinner.classList.remove("show-spinner"),this.wsSend("from-widget-ensure-session",{app:this.zero.appId,browser:y.a.name,os:y.a.os.family})},t=e=>{try{const t=JSON.parse(e.data);this.handleWSMessage(t)}catch(e){this.log(e)}},o=e=>{this.socket.close()},i=n=>{this.wsInitialized=!1,this.socket&&(this.socket.removeEventListener("open",e),this.socket.removeEventListener("message",t),this.socket.removeEventListener("error",o),this.socket.removeEventListener("close",i),delete this.socket);O(this.initWS.bind(this),1e3)()};let n="wss://ws.0account.com";"staging"===this.opts.environment&&(n="wss://staging.ws.0account.com"),this.socket&&(this.socket.removeEventListener("open",e),this.socket.removeEventListener("message",t),this.socket.removeEventListener("error",o),this.socket.removeEventListener("close",i)),this.socket=new WebSocket(n),this.socket.addEventListener("open",e),this.socket.addEventListener("message",t),this.socket.addEventListener("error",o),this.socket.addEventListener("close",i)}handleWSMessage(e){switch(e.action){case"to-widget-approved":const t=this.zero.Data().uuid;this.onZeroAuth(this.opts.callbackURL,e.message.value,t,5),localStorage.setItem(E+"_session-id",e.id),localStorage.setItem(E+"_session-token",JSON.stringify(e.message));break;case"to-widget-logout":localStorage.removeItem(E+"_session-id"),localStorage.removeItem(E+"_session-token"),this.dispatchEvent("0account-logout");break;case"to-any-error":this.log("ws error",e);break;default:this.log("incorrect action",e.action,e)}}}!function(){try{window.zeroAccount=new k,document.dispatchEvent(new CustomEvent("0account-loaded"))}catch(e){console.log("could not initialize/load 0account",e)}}()}])}));
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oila/0account",
|
|
3
|
+
"version": "3.3.4",
|
|
4
|
+
"description": "0account main library",
|
|
5
|
+
"main": "dist/0account.js",
|
|
6
|
+
"types": "0account.d.ts",
|
|
7
|
+
"module": "dist/0account.js",
|
|
8
|
+
"browser": "dist/0account.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"/dist",
|
|
11
|
+
"0account.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"custom-protocol-check": "^1.4.0",
|
|
15
|
+
"uuid": "^9.0.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@babel/cli": "^7.10.4",
|
|
19
|
+
"@babel/core": "^7.10.4",
|
|
20
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
21
|
+
"@babel/preset-env": "^7.10.4",
|
|
22
|
+
"@babel/register": "^7.10.4",
|
|
23
|
+
"autoprefixer": "^9.8.5",
|
|
24
|
+
"babel-loader": "^8.1.0",
|
|
25
|
+
"browser-sync": "^2.26.7",
|
|
26
|
+
"cross-env": "^6.0.3",
|
|
27
|
+
"css-loader": "^2.0.2",
|
|
28
|
+
"file-loader": "^4.3.0",
|
|
29
|
+
"mini-css-extract-plugin": "^0.5.0",
|
|
30
|
+
"optimize-css-assets-webpack-plugin": "^5.0.1",
|
|
31
|
+
"postcss-loader": "^3.0.0",
|
|
32
|
+
"raw-loader": "^3.1.0",
|
|
33
|
+
"sass": "^1.32.2",
|
|
34
|
+
"sass-loader": "^10.1.0",
|
|
35
|
+
"uglifyjs-webpack-plugin": "^2.1.1",
|
|
36
|
+
"webpack": "^4.43.0",
|
|
37
|
+
"webpack-cli": "^3.3.12"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"prod": "cross-env NODE_ENV=PRODUCTION webpack --mode production",
|
|
41
|
+
"bw": "cross-env NODE_ENV=PRODUCTION webpack --progress --colors --watch",
|
|
42
|
+
"prepublishOnly": "npm run prod",
|
|
43
|
+
"demo": "./node_modules/.bin/browser-sync start --server --files ./dist"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/oilastudio/0account.git"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"0account",
|
|
51
|
+
"security",
|
|
52
|
+
"privacy",
|
|
53
|
+
"account"
|
|
54
|
+
],
|
|
55
|
+
"author": "Oila GmbH",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/oilastudio/0account/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/oilastudio/0account#readme",
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public",
|
|
63
|
+
"registry": "https://registry.npmjs.org/"
|
|
64
|
+
}
|
|
65
|
+
}
|