(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["97750b6e"],{"147f":function(t,n,e){"use strict";var r=e("cfe2"),o=e.n(r);o.a},"37ca":function(t,n,e){"use strict";e.r(n);var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("q-page",{attrs:{"data-test":t.CypressTarget("PromotionInformation")}},[t.loading.promotions?e("event-information-page-skeleton",{attrs:{square:!0,flat:!0}}):e("div",{staticClass:"event-data"},[e("div",{staticClass:"col-xs-12 col-sm-12 col-md-6"},[e("card-promotion-detail",{class:{"no-margin":t.$q.platform.is.mobile},attrs:{square:!0,flat:!0,color:t.SET_COLOR.primary,"promotion-code":t.promotionInformation.code,"promotion-slug":t.promotionInformation.slug,"promotion-description":t.promotionInformation.description,"promotion-rule-description":t.promotionInformation.rule_description,"promotion-type":t.promotionInformation.type,"promotion-name":t.promotionInformation.name,"promotion-image":t.promotionInformation.image,"promotion-date":t.promotionInformation.sales_start_date,"promotion-end-date":t.promotionInformation.sales_end_date,"show-count-down":1===t.promotionInformation.show_countdown,"promotion-tickets":t.promotionInformation.tickets,"promotion-rules":t.promotionInformation.rules,inline:""}})],1)])],1)},o=[];r._withStripped=!0;var a=e("f1f2"),i=e.n(a),s=e("ad54"),c=e.n(s),u=(e("7f7f"),e("96cf"),e("c973")),m=e.n(u),p=e("3156"),f=e.n(p),d=e("2f62"),h=e("c5ce"),l=e("b9ef"),g=e("11ca"),v=e("ad3e"),w={name:"PromotionInformationTicket",components:{CardPromotionDetail:function(){return Promise.all([e.e("luxon"),e.e("2d226d26"),e.e("2d0a44aa"),e.e("2d0bd616"),e.e("074fd2a8")]).then(e.bind(null,"13c4"))},EventInformationPageSkeleton:function(){return Promise.all([e.e("2d212b98"),e.e("5815b64e")]).then(e.bind(null,"17d6"))}},mixins:[h["a"]],data:function(){return{page:1}},computed:f()({},Object(d["c"])("promotions",["promotionInformation","loading"]),Object(d["c"])("ticketShoppingCart",["sessionCart","sessionCartLoaded","isCartValid"]),{cardDisplay:function(){return!1},promotionCode:function(){return this.SET_PROMOTION_CODE?this.SET_PROMOTION_CODE:this.$route.params.code}}),watch:{"promotionInformation.name":{handler:function(t){document.title="".concat(this.SET_PAGE_NAME," | ").concat(t)}},page:function(){var t=m()(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.fetchData();case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},beforeMount:function(){var t=m()(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetchData();case 3:if(!this.isCartValid()&&!this.sessionCart){t.next=8;break}return t.next=6,this.syncCart();case 6:t.next=10;break;case 8:return t.next=10,this.synchronizeCart(!0);case 10:return t.next=12,this.syncItemsData();case 12:this.$tracker.pageView({page:this.$route.path,title:this.promotionInformation.name}),t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](0),this.toastError(t.t0),t.t0.isAxiosError&&((null===t.t0||void 0===t.t0?void 0:null===(n=t.t0.response)||void 0===n?void 0:n.status)>=400||t.t0.status>=400)&&this.$router.push({name:l["a"]});case 19:case"end":return t.stop()}},t,this,[[0,15]])}));return function(){return t.apply(this,arguments)}}(),mounted:function(){var t=this;this.$root.$on(v["a"],m()(regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.fetchData();case 2:return n.next=4,t.syncItemsData();case 4:case"end":return n.stop()}},n)})))},methods:f()({},Object(d["b"])("ticketShoppingCart",["synchronizeCart","addItemToCart","populateCart"]),Object(d["b"])("promotions",["getPromotionnformation"]),{syncCart:function(){var t=this;return this.synchronizeCart().catch(function(n){if(n.status>=400)return t.resetCartAndGoToHome();var e=Object(g["c"])(n,"data.status_code")||Object(g["c"])(n,"data.message");return!!e&&t.toastError(e)})},syncItemsData:function(){var t=m()(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.addItemToCart(JSON.parse(c()(this.promotionInformation)));case 2:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),fetchData:function(){var t=m()(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",this.getPromotionnformation({promotionCode:this.promotionCode}));case 4:return t.prev=4,t.t0=t["catch"](0),this.toastError(t.t0),t.abrupt("return",i.a.reject(t.t0));case 8:case"end":return t.stop()}},t,this,[[0,4]])}));return function(){return t.apply(this,arguments)}}(),setPageState:function(){var t=m()(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:this.page=n;case 1:case"end":return t.stop()}},t,this)}));return function(n){return t.apply(this,arguments)}}()})},C=w,I=(e("147f"),e("2877")),b=Object(I["a"])(C,r,o,!1,null,"da11e42a",null);b.options.__file="promotion.vue";n["default"]=b.exports},cfe2:function(t,n,e){}}]);
//# sourceMappingURL=97750b6e.954e3e0e.2024-10-22T18:36:13.257Z.js.map