iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://teeitse.com/_nuxt/70f14db.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{414:function(e,t,s){"use strict";var a=s(0),o=(s(34),s(81),s(18),s(268));t.a={data:function(){return{id:null,type:null,layout:null,isComponentOverviewPage:!1,isTestingOverviewPage:!1}},fetch:function(){var e=this;return Object(a.a)(regeneratorRuntime.mark((function t(){var s,a,o,r,i,n,u,l,d,c,h,g,v,p,m,f,y;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.$route.path,e.isComponentOverviewPage="/component-overview"===i,e.isCypressTestingPage="/cypress-testing"===i,null===(s=e.$store)||void 0===s||null===(a=s.state)||void 0===a||!a.firstRender||null===(o=e.$store)||void 0===o||null===(r=o.state)||void 0===r||!r.pageData){t.next=11;break}return e.id=e.$store.state.pageData.id,e.type=e.$store.state.pageData.type,e.layout=e.$store.state.pageData.layout,t.next=9,e.$store.dispatch("setFirstRender",!1);case 9:t.next=26;break;case 11:return n=e.$route.fullPath,t.next=14,e.$api.resolveRoute(n);case 14:if(!(u=t.sent)){t.next=26;break}return n.startsWith("/search?")||"redirect"!==u.meta.type||e.$nuxt.context.redirect(u.meta.status,u.meta.location),p=null===(l=u.data)||void 0===l?void 0:l.id,m=null===(d=u.meta)||void 0===d?void 0:d.type,f=null==u||null===(c=u.data)||void 0===c||null===(h=c.category)||void 0===h||null===(g=h.data)||void 0===g?void 0:g.name,y=(null==u||null===(v=u.data)||void 0===v?void 0:v.template)||"default",t.next=23,e.$store.dispatch("setPageData",{id:p,type:m,categoryName:f,layout:y});case 23:e.id=e.$store.state.pageData.id,e.type=e.$store.state.pageData.type,e.layout=e.$store.state.pageData.layout;case 26:case"end":return t.stop()}}),t)})))()},computed:{template:function(){if(this.isComponentOverviewPage)return"ComponentOverview";if(this.isCypressTestingPage)return"CypressOverview";switch(this.type){case"category":case"subcategory":return"Category";case"tag":return"Tag";case"composite":return"Composite";case"author":return"Author";case"page":return"video-page"===this.layout?"VideoPage":"Page";default:return"NotFound"}}},methods:{saveToDomStorage:function(e,t){localStorage.setItem(e,t),sessionStorage.setItem(e,t)}},mounted:function(){if("composite"!==this.type&&this.$store.dispatch("setPageData",{id:this.id,type:this.type,layout:this.layout}),this.$store.dispatch("setWindowWidth",window.innerWidth),this.$store.dispatch("incPageView"),window.localStorage){var e,t,s,a,r,i,n,u,l,d,c,h,g=this.$route.fullPath;g.startsWith("/users/")||g.startsWith("/login")||g.startsWith(this.$config.AUTH_LOGIN_PATH)||g.startsWith(this.$config.AUTH_REGISTER_PATH)||localStorage.setItem("previousUrlBeforeLogin",g);var v=null!==(e=null!==(t=null===(s=this.$store.state.user)||void 0===s||null===(a=s.signInUserSession)||void 0===a||null===(r=a.refreshToken)||void 0===r?void 0:r.token)&&void 0!==t?t:localStorage.getItem("refreshToken"))&&void 0!==e?e:"",p=null!==(i=null!==(n=null===(u=this.$store.state.user)||void 0===u||null===(l=u.attributes)||void 0===l?void 0:l.email)&&void 0!==n?n:localStorage.getItem("username"))&&void 0!==i?i:"";!this.$store.state.user||sessionStorage.getItem("refreshToken")||sessionStorage.getItem("username")||(this.saveToDomStorage("refreshToken",v),this.saveToDomStorage("username",p)),this.$store.state.user||null!==(d=this.$store.state.user)&&void 0!==d&&null!==(c=d.signInUserSession)&&void 0!==c&&null!==(h=c.refreshToken)&&void 0!==h&&h.token||!localStorage.getItem("refreshToken")||(this.saveToDomStorage("refreshToken",v),this.saveToDomStorage("username",p),Object(o.default)({store:this.$store,query:{username:p,refresh_token:v},$config:this.$config}))}}}},537:function(e,t,s){"use strict";(function(e){var a=s(414);t.a={mixins:[a.a],middleware:["refreshTokenAuthenticated"],head:{bodyAttrs:{class:"js"}}}}).call(this,s(183))},893:function(e,t,s){"use strict";s.r(t);var a=s(537).a,o=s(3),r=Object(o.a)(a,(function(){var e=this,t=e._self._c;return e.$fetchState.pending?e._e():t("div",[t(e.template,{tag:"component",attrs:{id:e.id,type:e.type}})],1)}),[],!1,null,null,null);t.default=r.exports}}]);