1 line
4.9 KiB
JavaScript
1 line
4.9 KiB
JavaScript
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=89)}({1:function(t,e,n){"use strict";n.d(e,"i",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"b",(function(){return u})),n.d(e,"f",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"k",(function(){return f})),n.d(e,"h",(function(){return d})),n.d(e,"j",(function(){return g})),n.d(e,"l",(function(){return h})),n.d(e,"g",(function(){return w}));var r=n(9),i="webpush-client-v1-parent",o="webpush-client-v1-child",a="webpush-client-v1-grant-status",u="webpush-client-v1-child2",s=36e5,c=24*s,f="webpush-client-v1-tokenStatus",d="webpush-client-v1-mtopResult",p=location.href.substring(0,location.href.indexOf("#")<0?location.href.length:location.href.indexOf("#")),l=p.substr(p.indexOf("?")),g={};l&&l.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(t,e,n,r){return g[e]=decodeURIComponent(r),""}));var h="webpush-record-data",w=g.lang;e.d=r.a},14:function(t,e,n){"use strict";var r="postMessage"in window;function i(t,e,n){var r="";if(arguments.length<2?r="target error - target and name are both required":"object"!=typeof t?r="target error - target itself must be window object":"string"!=typeof e&&(r="target error - target name must be string type"),r)throw new Error(r);this.target=t,this.name=e,this.prefix=n}function o(t,e){this.targets={},this.name=t,this.listenFunc=[],this.prefix=e||"[PROJECT_NAME]",this.initListen()}i.prototype.send=r?function(t){this.target.postMessage(this.prefix+"|"+this.name+"__Messenger__"+t,"*")}:function(t){var e=window.navigator[this.prefix+this.name];if("function"!=typeof e)throw new Error("target callback function is not defined");e(this.prefix+t,window)},o.prototype.addTarget=function(t,e){var n=new i(t,e,this.prefix);this.targets[e]=n},o.prototype.initListen=function(){var t=this,e=function(e){if("object"==typeof e&&e.data&&e.data.indexOf&&e.data.indexOf("__Messenger__")>=0)for(var n=(e=e.data).split("__Messenger__"),r=(e=n[1],n[0].split("|")),i=r[0],o=r[1],a=0;a<t.listenFunc.length;a++)i+o===t.prefix+t.name&&t.listenFunc[a](e)};r?"addEventListener"in document?window.addEventListener("message",e,!1):"attachEvent"in document&&window.attachEvent("onmessage",e):window.navigator[this.prefix+this.name]=e},o.prototype.listen=function(t){for(var e=0,n=this.listenFunc.length,r=!1;e<n;e++)if(this.listenFunc[e]==t){r=!0;break}r||this.listenFunc.push(t)},o.prototype.clear=function(){this.listenFunc=[]},o.prototype.send=function(t){var e,n=this.targets;for(e in n)n.hasOwnProperty(e)&&n[e].send(t)},e.a=o},7:function(t,e,n){"use strict";var r={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)||navigator.userAgent.match(/WPDesktop/i)},any:function(){return!!(r.Android()||r.BlackBerry()||r.iOS()||r.Opera()||r.Windows())}};e.a=r},89:function(t,e,n){"use strict";n.r(e),n.d(e,"trigger",(function(){return a}));var r=n(14),i=n(1),o=new r.a(i.a);o.addTarget(window.top,i.i);var a=function(t,e){o.send(JSON.stringify({type:t,payload:e}))},u={store:function(t){null===window||void 0===window||window.localStorage.setItem(i.l,JSON.stringify(t))},getStore:function(){a("receiveGrantData",[null===window||void 0===window?void 0:window.localStorage.getItem(i.l)])}};o.listen((function(t){var e=JSON.parse(t);u[e.type]&&u[e.type](null==e?void 0:e.payload)})),a("inited")},9:function(t,e,n){"use strict";var r=n(7),i={firebase:{apiKey:"AIzaSyCR01Cfi-I1RN_-RPCewHuvMvgqcRbcnms",authDomain:"ae-webpush.firebaseapp.com",databaseURL:"https://ae-webpush.firebaseio.com",projectId:"ae-webpush",storageBucket:"ae-webpush.appspot.com",messagingSenderId:"146596228970",appId:"1:146596228970:web:7fb25cf8c099892672bf13",measurementId:"G-7K1NDK3YJC"},publicKey:"BIGeWzIKODFi_GHGhLIeDL0fJbn5Zafo7g-i5ZBBTKKm0mqhi2Trsm2jYdgC16oWZTteMpliALI9J1kXtWL9KFQ",swref:"/sw.js",pathnames:["","/"],isPc:Number(!r.a.any())};e.a=i}}); |