!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b7428458-4dff-4a5c-9ff3-e3186b61afd3",t._sentryDebugIdIdentifier="sentry-dbid-b7428458-4dff-4a5c-9ff3-e3186b61afd3")}catch(t){}}(),(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5f2ce9f6"],{"0763":function(t,e,a){var i=a("5c94");t.exports=i([].slice)},"0f1c":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("tr",{staticClass:"info white--text"},[e("th",[e("span",{staticClass:"text-body-2 font-weight-bold"},[t._v(t._s(t.$t("main.total")))])]),t._l(t.totalHeaders,(function(a){return e("th",{key:a.value,staticClass:"text-body-2 font-weight-bold"},[t._v(" "+t._s(t.fixedTotals(a))+" ")])}))],2)},s=[],n=a("2909"),r=(a("fb6a"),a("99af"),{name:"TotalStatistics",props:{headers:{type:Array,default:function(){return[]}},items:{type:Object,default:function(){}},hasCheckboxes:{type:Boolean,default:!1}},computed:{totalHeaders:function(){var t=this.headers.slice(1);return this.hasCheckboxes?[{}].concat(Object(n["a"])(t)):t}},methods:{fixedTotals:function(t){var e;return null!==(e=this.items[t.value])&&void 0!==e?e:""}}}),o=r,c=a("2877"),l=Object(c["a"])(o,i,s,!1,null,null,null);e["a"]=l.exports},"140e":function(t,e,a){"use strict";a("8845")},"169a":function(t,e,a){"use strict";a("368e");var i=a("480e"),s=a("4ad4"),n=a("b848"),r=a("75eb"),o=a("e707"),c=a("e4d3"),l=a("21be"),u=a("a293"),d=a("58df"),p=a("d9bd"),h=a("80d2");const m=Object(d["a"])(n["a"],r["a"],o["a"],c["a"],l["a"],s["a"]);e["a"]=m.extend({name:"v-dialog",directives:{ClickOutside:u["a"]},props:{dark:Boolean,disabled:Boolean,fullscreen:Boolean,light:Boolean,maxWidth:[String,Number],noClickAnimation:Boolean,origin:{type:String,default:"center center"},persistent:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,transition:{type:[String,Boolean],default:"dialog-transition"},width:[String,Number]},data(){return{activatedBy:null,animate:!1,animateTimeout:-1,stackMinZIndex:200,previousActiveElement:null}},computed:{classes(){return{[("v-dialog "+this.contentClass).trim()]:!0,"v-dialog--active":this.isActive,"v-dialog--persistent":this.persistent,"v-dialog--fullscreen":this.fullscreen,"v-dialog--scrollable":this.scrollable,"v-dialog--animated":this.animate}},contentClasses(){return{"v-dialog__content":!0,"v-dialog__content--active":this.isActive}},hasActivator(){return Boolean(!!this.$slots.activator||!!this.$scopedSlots.activator)}},watch:{isActive(t){var e;t?(this.show(),this.hideScroll()):(this.removeOverlay(),this.unbind(),null===(e=this.previousActiveElement)||void 0===e||e.focus())},fullscreen(t){this.isActive&&(t?(this.hideScroll(),this.removeOverlay(!1)):(this.showScroll(),this.genOverlay()))}},created(){this.$attrs.hasOwnProperty("full-width")&&Object(p["e"])("full-width",this)},beforeMount(){this.$nextTick(()=>{this.isBooted=this.isActive,this.isActive&&this.show()})},beforeDestroy(){"undefined"!==typeof window&&this.unbind()},methods:{animateClick(){this.animate=!1,this.$nextTick(()=>{this.animate=!0,window.clearTimeout(this.animateTimeout),this.animateTimeout=window.setTimeout(()=>this.animate=!1,150)})},closeConditional(t){const e=t.target;return!(this._isDestroyed||!this.isActive||this.$refs.content.contains(e)||this.overlay&&e&&!this.overlay.$el.contains(e))&&this.activeZIndex>=this.getMaxZIndex()},hideScroll(){this.fullscreen?document.documentElement.classList.add("overflow-y-hidden"):o["a"].options.methods.hideScroll.call(this)},show(){!this.fullscreen&&!this.hideOverlay&&this.genOverlay(),this.$nextTick(()=>{this.$nextTick(()=>{var t,e;(null===(t=this.$refs.dialog)||void 0===t?void 0:t.contains(document.activeElement))||(this.previousActiveElement=document.activeElement,null===(e=this.$refs.dialog)||void 0===e||e.focus()),this.bind()})})},bind(){window.addEventListener("focusin",this.onFocusin)},unbind(){window.removeEventListener("focusin",this.onFocusin)},onClickOutside(t){this.$emit("click:outside",t),this.persistent?this.noClickAnimation||this.animateClick():this.isActive=!1},onKeydown(t){if(t.keyCode===h["x"].esc&&!this.getOpenDependents().length)if(this.persistent)this.noClickAnimation||this.animateClick();else{this.isActive=!1;const t=this.getActivator();this.$nextTick(()=>t&&t.focus())}this.$emit("keydown",t)},onFocusin(t){if(!t||!this.retainFocus)return;const e=t.target;if(e&&this.$refs.dialog&&![document,this.$refs.dialog].includes(e)&&!this.$refs.dialog.contains(e)&&this.activeZIndex>=this.getMaxZIndex()&&!this.getOpenDependentElements().some(t=>t.contains(e))){const t=this.$refs.dialog.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])'),e=[...t].find(t=>!t.hasAttribute("disabled")&&!t.matches('[tabindex="-1"]'));e&&e.focus()}},genContent(){return this.showLazyContent(()=>[this.$createElement(i["a"],{props:{root:!0,light:this.light,dark:this.dark}},[this.$createElement("div",{class:this.contentClasses,attrs:{role:"dialog","aria-modal":this.hideOverlay?void 0:"true",...this.getScopeIdAttrs()},on:{keydown:this.onKeydown},style:{zIndex:this.activeZIndex},ref:"content"},[this.genTransition()])])])},genTransition(){const t=this.genInnerContent();return this.transition?this.$createElement("transition",{props:{name:this.transition,origin:this.origin,appear:!0}},[t]):t},genInnerContent(){const t={class:this.classes,attrs:{tabindex:this.isActive?0:void 0},ref:"dialog",directives:[{name:"click-outside",value:{handler:this.onClickOutside,closeConditional:this.closeConditional,include:this.getOpenDependentElements}},{name:"show",value:this.isActive}],style:{transformOrigin:this.origin}};return this.fullscreen||(t.style={...t.style,maxWidth:Object(h["h"])(this.maxWidth),width:Object(h["h"])(this.width)}),this.$createElement("div",t,this.getContentSlot())}},render(t){return t("div",{staticClass:"v-dialog__container",class:{"v-dialog__container--attached":""===this.attach||!0===this.attach||"attach"===this.attach}},[this.genActivator(),this.genContent()])}})},"17b3":function(t,e,a){},"1b75":function(t,e,a){},"269a":function(t,e){t.exports=function(t,e){var a="function"===typeof t.exports?t.exports.extendOptions:t.options;for(var i in"function"===typeof t.exports&&(a.directives=t.exports.options.directives),a.directives=a.directives||{},e)a.directives[i]=a.directives[i]||e[i]}},"368e":function(t,e,a){},"3fdc":function(t,e,a){},"498a":function(t,e,a){"use strict";var i=a("23e7"),s=a("58a8").trim,n=a("c8d2");i({target:"String",proto:!0,forced:n("trim")},{trim:function(){return s(this)}})},"4c05":function(t,e,a){},5708:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"d-flex align-center pa-5 pt-3 flex-wrap justify-end",attrs:{elevation:"0",color:"secondary"}},[null!==t.totalItems?e("div",{staticClass:"mr-3 mt-2 body-2 font-weight-bold"},[t._v(" Total: "+t._s(t.totalItems)+" ")]):t._e(),e("div",{staticClass:"mr-3 mt-2 body-2"},[t._v(" "+t._s(t.$t("rows_per_page"))+" ")]),e("c-select",{staticClass:"select-max-width mt-2",attrs:{value:t.itemsPerPage,items:t.itemsPerPageValues,"item-text":"name","item-value":"value",height:"30px","background-color":t.$vuetify.theme.dark?"secondary":"white","hide-details":""},on:{change:function(e){return t.changeItemsPerPage(e)}}}),e("v-pagination",{staticClass:"mt-2 justify-end",attrs:{value:t.currentPage,length:t.pageCount,"total-visible":7},on:{input:function(e){return t.changeCurrentPage(e)}}})],1)},s=[],n=(a("2841"),a("ae7b")),r={name:"DataTableFooter",components:{CSelect:n["a"]},props:{itemsPerPage:{type:Number,default:15},pageCount:{type:Number,default:0},currentPage:{type:Number,default:1},totalItems:{type:Number,default:null}},computed:{itemsPerPageValues:function(){return[{name:"15",value:15},{name:"25",value:25},{name:"50",value:50},{name:this.$t("page_all"),value:-1}]}},methods:{changeCurrentPage:function(t){this.$emit("change-current-page",t)},changeItemsPerPage:function(t){this.$emit("change-items-per-page",t)}}},o=r,c=(a("a21b"),a("2877")),l=a("d15f"),u=a("6544"),d=a.n(u),p=a("b0af"),h=a("891e"),m=Object(c["a"])(o,i,s,!1,null,"5fa46e14",null);"function"===typeof l["default"]&&Object(l["default"])(m);e["a"]=m.exports;d()(m,{VCard:p["a"],VPagination:h["a"]})},"59e2":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("apexcharts",{staticClass:"custom-chart__z-index",attrs:{type:t.type,height:t.height,options:t.computedOptions,series:t.series,width:t.width}})},s=[],n=a("5530"),r=(a("d3b7"),a("3ca3"),a("ddb0"),a("a9e3"),{name:"CustomChart",components:{apexcharts:function(){return a.e("chunk-5ef6270d").then(a.t.bind(null,"1321",7))}},props:{type:{type:String,default:"line"},height:{type:[Number,String],default:"100%"},width:{type:[Number,String],default:"100%"},options:{type:Object,default:function(){return{}}},series:{type:Array,default:function(){return[]}}},data:function(){return{defaultOptions:{colors:[this.$vuetify.theme.themes.light.info,this.$vuetify.theme.themes.light.primary,this.$vuetify.theme.themes.light.warning]}}},computed:{computedOptions:function(){return Object(n["a"])(Object(n["a"])({},this.defaultOptions),this.options)}}}),o=r,c=(a("8b42"),a("2877")),l=Object(c["a"])(o,i,s,!1,null,null,null);e["a"]=l.exports},"6a31":function(t,e,a){},"84b2":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",[t.isTableOrMobile?e("div",[t.urlTypeIsVideo?e("a",{staticClass:"d-flex justify-center preview-container",attrs:{target:"_blank",href:t.src}},[e("v-icon",{attrs:{size:"50"}},[t._v(" mdi-file-video-outline ")])],1):e("v-img",{attrs:{src:t.src,width:"100%","max-width":"100","max-height":"100"},on:{click:function(e){t.isShown=!0}}}),e("hover-image-dialog",{attrs:{src:t.src,"dialog-is-shown":t.isShown},on:{close:function(e){t.isShown=!1}}})],1):e("div",[e("v-tooltip",{attrs:{right:""},scopedSlots:t._u([{key:"activator",fn:function(a){var i=a.on;return[t.urlTypeIsVideo?t._e():e("v-img",t._g({attrs:{src:t.src,width:"100%","max-width":"100","max-height":"100"}},i))]}}])},[e("v-img",{staticClass:"pa-2",attrs:{src:t.src,width:"100%","max-width":"400","max-height":"400"}})],1),t.urlTypeIsVideo?e("a",{staticClass:"d-flex justify-center preview-container hover-preview",attrs:{target:"_blank",href:t.src}},[e("v-icon",{attrs:{size:"50"}},[t._v(" mdi-file-video-outline ")])],1):t._e()],1)])},s=[],n=(a("fb6a"),function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{"content-class":"ma-2"},model:{value:t.isShown,callback:function(e){t.isShown=e},expression:"isShown"}},[e("v-card",{staticClass:"fill-height"},[e("v-card-text",{staticClass:"d-flex flex-column align-end"},[e("c-btn",{staticClass:"mt-2",attrs:{icon:"","icon-props":{icon:"$close",size:"20"}},on:{click:function(e){return t.closeDialog()}}}),e("v-img",{attrs:{src:t.src,width:"100%","max-height":"400",contain:""},on:{click:function(e){return t.closeDialog()}}})],1)],1)],1)}),r=[],o=a("3c32"),c={name:"HoverImageDialog",components:{CBtn:o["a"]},props:{dialogIsShown:{type:Boolean,required:!0},src:{type:String,required:!0}},computed:{isShown:{get:function(){return this.dialogIsShown},set:function(){this.$emit("close")}}},methods:{closeDialog:function(){this.isShown=!1,this.$emit("close")}}},l=c,u=a("2877"),d=a("6544"),p=a.n(d),h=a("b0af"),m=a("99d9"),f=a("169a"),g=a("adda"),v=Object(u["a"])(l,n,r,!1,null,null,null),b=v.exports;p()(v,{VCard:h["a"],VCardText:m["c"],VDialog:f["a"],VImg:g["a"]});var _={name:"HoverImage",components:{HoverImageDialog:b},inject:["settings"],props:{src:{type:String,default:""}},data:function(){return{isShown:!1}},computed:{urlTypeIsVideo:function(){var t=this.src.slice(-3);return"mp4"===t},isTableOrMobile:function(){return this.$vuetify.breakpoint.smAndDown}}},y=_,x=(a("140e"),a("132d")),C=a("3a2f"),w=Object(u["a"])(y,i,s,!1,null,"5c06d014",null);e["a"]=w.exports;p()(w,{VIcon:x["a"],VImg:g["a"],VTooltip:C["a"]})},8845:function(t,e,a){},"88f1":function(t,e,a){var i=a("4b02"),s=a("2fcc"),n=a("e353").f,r=i("unscopables"),o=Array.prototype;void 0==o[r]&&n(o,r,{configurable:!0,value:s(null)}),t.exports=function(t){o[r][t]=!0}},"891e":function(t,e,a){"use strict";a("17b3");var i=a("9d26"),s=a("dc22"),n=a("a9ad"),r=a("de2c"),o=a("7560"),c=a("58df");e["a"]=Object(c["a"])(n["a"],Object(r["a"])({onVisible:["init"]}),o["a"]).extend({name:"v-pagination",directives:{Resize:s["a"]},props:{circle:Boolean,disabled:Boolean,length:{type:Number,default:0,validator:t=>t%1===0},nextIcon:{type:String,default:"$next"},prevIcon:{type:String,default:"$prev"},totalVisible:[Number,String],value:{type:Number,default:0},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},wrapperAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.wrapper"}},data(){return{maxButtons:0,selected:null}},computed:{classes(){return{"v-pagination":!0,"v-pagination--circle":this.circle,"v-pagination--disabled":this.disabled,...this.themeClasses}},items(){const t=parseInt(this.totalVisible,10);if(0===t||isNaN(this.length)||this.length>Number.MAX_SAFE_INTEGER)return[];const e=Math.min(Math.max(0,t)||this.length,Math.max(0,this.maxButtons)||this.length,this.length);if(this.length<=e)return this.range(1,this.length);const a=e%2===0?1:0,i=Math.floor(e/2),s=this.length-i+1+a;if(this.value>i&&this.value<s){const t=1,e=this.length,s=this.value-i+2,n=this.value+i-2-a,r=s-1===t+1?2:"...",o=n+1===e-1?n+1:"...";return[1,r,...this.range(s,n),o,this.length]}if(this.value===i){const t=this.value+i-1-a;return[...this.range(1,t),"...",this.length]}if(this.value===s){const t=this.value-i+1;return[1,"...",...this.range(t,this.length)]}return[...this.range(1,i),"...",...this.range(s,this.length)]}},watch:{value(){this.init()}},beforeMount(){this.init()},methods:{init(){this.selected=null,this.onResize(),this.$nextTick(this.onResize),setTimeout(()=>this.selected=this.value,100)},onResize(){const t=this.$el&&this.$el.parentElement?this.$el.parentElement.clientWidth:window.innerWidth;this.maxButtons=Math.floor((t-96)/42)},next(t){t.preventDefault(),this.$emit("input",this.value+1),this.$emit("next")},previous(t){t.preventDefault(),this.$emit("input",this.value-1),this.$emit("previous")},range(t,e){const a=[];t=t>0?t:1;for(let i=t;i<=e;i++)a.push(i);return a},genIcon(t,e,a,s,n){return t("li",[t("button",{staticClass:"v-pagination__navigation",class:{"v-pagination__navigation--disabled":a},attrs:{disabled:a,type:"button","aria-label":n},on:a?{}:{click:s}},[t(i["a"],[e])])])},genItem(t,e){const a=e===this.value&&(this.color||"primary"),i=e===this.value,s=i?this.currentPageAriaLabel:this.pageAriaLabel;return t("button",this.setBackgroundColor(a,{staticClass:"v-pagination__item",class:{"v-pagination__item--active":e===this.value},attrs:{type:"button","aria-current":i,"aria-label":this.$vuetify.lang.t(s,e)},on:{click:()=>this.$emit("input",e)}}),[e.toString()])},genItems(t){return this.items.map((e,a)=>t("li",{key:a},[isNaN(Number(e))?t("span",{class:"v-pagination__more"},[e.toString()]):this.genItem(t,e)]))},genList(t,e){return t("ul",{directives:[{modifiers:{quiet:!0},name:"resize",value:this.onResize}],class:this.classes},e)}},render(t){const e=[this.genIcon(t,this.$vuetify.rtl?this.nextIcon:this.prevIcon,this.value<=1,this.previous,this.$vuetify.lang.t(this.previousAriaLabel)),this.genItems(t),this.genIcon(t,this.$vuetify.rtl?this.prevIcon:this.nextIcon,this.value>=this.length,this.next,this.$vuetify.lang.t(this.nextAriaLabel))];return t("nav",{attrs:{role:"navigation","aria-label":this.$vuetify.lang.t(this.wrapperAriaLabel)}},[this.genList(t,e)])}})},"8b42":function(t,e,a){"use strict";a("4c05")},"8f5a":function(t,e,a){},"944e":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"white pb-4 global-relative overflow-hidden"},[e("settings",{staticClass:"mb-11 mb-sm-7 mb-lg-5",attrs:{"campaign-ids":t.campaignIds}}),t.isLoading||t.campaignsTotal?t._e():e("v-overlay",{staticClass:"d-flex align-start mt-16 mx-3 pt-11",attrs:{absolute:"",opacity:"0.95",color:"white"}},[e("v-card",{staticClass:"text-center d-flex flex-column align-center mt-16 pt-16",attrs:{color:"white",elevation:"0","max-width":"270"}},[e("v-icon",{staticClass:"mx-auto",attrs:{size:"32",color:"primary"}},[t._v(" $information ")]),e("div",{staticClass:"text-center font-weight-medium text-subtitle-1 black--text mt-2"},[t._v(" "+t._s(t.$t("campaign_statistics.empty_campaign.empty_campaign_title"))+" ")]),e("c-btn",{staticClass:"text-subtitle-1 font-weight-medium mt-9",attrs:{color:"primary",height:"46","x-large":"",label:t.$t("campaign_statistics.empty_campaign.create_new_campaign")},on:{click:function(e){return t.redirectToCreateCampaign()}}}),e("div",{staticClass:"secondary-darken--text text-center text-subtitle-1 mt-3"},[t._v(" "+t._s(t.$t("campaign_statistics.empty_campaign.create_campaign_now"))+" ")])],1)],1),e("div",{staticClass:"border-secondary rounded mx-4"},[e("v-card",{staticClass:"mb-16",attrs:{elevation:"0"}},[e("v-card-title",{staticClass:"text-body-1 secondary-lighten font-weight-medium black-text py-3 pl-5 mb-6"},[t._v(" "+t._s(t.$t("campaign_statistics.available_parameters"))+" ")]),e("v-card-text",{staticClass:"pa-0 px-3 px-sm-5 px-md-0"},[e("group-by",{staticClass:"mb-9 mb-md-10"}),e("chart")],1)],1),e("statistics-table",{staticClass:"pt-8"})],1)],1)},s=[],n=a("c7eb"),r=a("1da1"),o=a("5530"),c=(a("14d9"),a("d81d"),a("a9e3"),a("2f62")),l=a("3c32"),u=a("4a2e"),d=function(){var t=this,e=t._self._c;return e("group-by-select",{attrs:{value:t.groupBy,items:t.filterTypes},on:{"change-group":function(e){return t.changeGroupBy(e)}}})},p=[],h=a("3835"),m=(a("13d5"),a("d3b7"),a("4fad"),a("4de4"),a("caad"),a("2532"),function(){var t=this,e=t._self._c;return e("div",[t.isMobileOrTablet?e("div",{staticClass:"d-flex overflow-auto"},t._l(t.items,(function(a,i){return e("c-btn",{key:a.value,class:["ml-1 mb-4",{"ml-4":a.startGroup&&0!==i},{"primary white--text":a.value===t.currentGroup}],attrs:{height:"32",depressed:""},on:{click:function(e){t.currentGroup=a.value}}},[a.icon?e("v-icon",{class:["primary--text mr-2",{"white--text":a.value===t.currentGroup}],attrs:{size:"24"}},[t._v(" $"+t._s(a.icon)+" ")]):t._e(),t._v(" "+t._s(a.label)+" ")],1)})),1):e("v-tabs",{attrs:{"show-arrows":"","prev-icon":"$arrow-left","next-icon":"$arrow-right",grow:"",height:"32"},model:{value:t.currentGroup,callback:function(e){t.currentGroup=e},expression:"currentGroup"}},t._l(t.items,(function(a,i){return e("c-btn",{key:a.value,class:["ml-1 black--text font-weight-regular",{"ml-4":a.startGroup&&0!==i},{"primary white--text":a.value===t.currentGroup}],attrs:{height:"32",depressed:""},on:{click:function(e){t.currentGroup=a.value}}},[a.icon?e("v-icon",{class:["primary--text mr-2",{"white--text":a.value===t.currentGroup}],attrs:{size:"24"}},[t._v(" $"+t._s(a.icon)+" ")]):t._e(),t._v(" "+t._s(a.label)+" ")],1)})),1)],1)}),f=[],g={name:"GroupBySelect",components:{CBtn:l["a"]},props:{items:{type:Array,required:!0},value:{type:String,required:!0}},computed:{isMobileOrTablet:function(){return this.$vuetify.breakpoint.smAndDown},currentGroup:{get:function(){return this.value},set:function(t){this.$emit("change-group",t)}}}},v=g,b=a("2877"),_=a("6544"),y=a.n(_),x=a("132d"),C=a("fe57"),w=Object(b["a"])(v,m,f,!1,null,null,null),S=w.exports;y()(w,{VIcon:x["a"],VTabs:C["a"]});var O={name:"GroupBy",components:{GroupBySelect:S},computed:Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaignsStatistics",["groupByOptions","groupBy"])),Object(c["c"])("settings",["getAdFormatTypesByAdNetwork"])),Object(c["c"])("personal",["userHasProviderSubscription"])),{},{types:function(){var t=this;return Object.entries(this.groupByOptions).reduce((function(e,a){var i=Object(h["a"])(a,2),s=i[0],n=i[1];return e.push(Object(o["a"])(Object(o["a"])({value:s,label:t.$t("campaign_statistics.tab_labels.".concat(n.label)),type:n.type},n.startGroup&&{startGroup:n.startGroup}),n.icon&&{icon:n.icon})),e}),[])},filterTypes:function(){var t=this,e=this.types.filter((function(e){var a=e.type;return t.getAdFormatTypesByAdNetwork.includes(a)||!a}));return this.userHasProviderSubscription?e:this.trafficProviderFilter(e)}}),created:function(){var t=this;return Object(r["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.fetchUserProfile();case 2:case"end":return e.stop()}}),e)})))()},methods:Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["fetchStatistics","setGroupBy","reset","resetStatisticsItems"])),Object(c["b"])("personal",["fetchUserProfile"])),{},{changeGroupBy:function(t){this.setGroupBy(t),this.resetStatisticsItems(),this.fetchStatistics()},trafficProviderFilter:function(t){return t.filter((function(t){return"trafficProvider"!==t.value}))}})},k=O,T=Object(b["a"])(k,d,p,!1,null,null,null),I=T.exports,A=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"resize",rawName:"v-resize",value:t.onResize,expression:"onResize"}],ref:"el"},[e("statistics-chart-columns",{attrs:{axis:t.axis},on:{"change-axis":function(e){return t.changeAxis(e)}}}),e("v-row",[e("v-col",{staticClass:"pr-md-6",attrs:{cols:"12"}},[e("custom-chart",{attrs:{series:t.series,options:t.options,type:"line",height:"500",width:"100%"}}),e("v-col",[e("v-row",{staticClass:"align-center flex-column flex-sm-row"},[e("v-col",{staticClass:"d-none d-md-flex",attrs:{cols:"0",md:"4"}}),e("v-col",{staticClass:"text-center",attrs:{cols:"12",md:"4"}},[e("json-excel",{attrs:{data:t.excelStatisticsItems,fields:t.excelColumnHeaders,name:t.fileName}},[e("a",{staticClass:"text-decoration-underline"},[t._v(" "+t._s(t.$t("campaign_statistics.download_statistics"))+" ")])])],1),e("v-col",{staticClass:"pa-0",attrs:{cols:"12",md:"4"}},[t.pagesCount>1?[e("v-pagination",{attrs:{length:t.pagesCount},model:{value:t.chartPage,callback:function(e){t.chartPage=e},expression:"chartPage"}})]:t._e()],2)],1)],1)],1)],1)],1)},j=[],$=a("2909"),E=(a("b0c0"),a("07ac"),a("99af"),a("fb6a"),a("f2d9")),B=a("e85c"),L=a("c1df"),R=a.n(L),P=a("59e2"),G=function(){var t=this,e=t._self._c;return e("v-row",{attrs:{align:"center",justify:"center"}},[e("v-col",{attrs:{cols:"12",lg:"2",md:"3","offset-md":"1","offset-lg":"2"}},[e("c-select",{attrs:{value:t.axis.first,"item-text":"text","hide-details":"","item-value":"value",items:t.filters},on:{change:function(e){return t.$emit("change-axis",{name:"first",value:e})}},scopedSlots:t._u([{key:"prepend-inner",fn:function(){return[e("v-icon",{attrs:{color:"info"}},[t._v(" $chart-bar ")])]},proxy:!0}])})],1),e("v-col",{attrs:{cols:"12",lg:"2",md:"3"}},[e("c-select",{attrs:{value:t.axis.second,"item-text":"text","hide-details":"","item-value":"value",items:t.filters},on:{change:function(e){return t.$emit("change-axis",{name:"second",value:e})}},scopedSlots:t._u([{key:"prepend-inner",fn:function(){return[e("v-icon",{attrs:{color:"primary"}},[t._v(" $chart-line ")])]},proxy:!0}])})],1),e("v-col",{attrs:{cols:"12",lg:"2",md:"1"}},[e("v-progress-circular",{directives:[{name:"show",rawName:"v-show",value:t.campaignsStatisticsIsLoading,expression:"campaignsStatisticsIsLoading"}],attrs:{indeterminate:"",color:"primary",width:"2"}})],1)],1)},N=[],F=a("ae7b"),D={name:"StatisticsChartColumns",components:{CSelect:F["a"]},props:{axis:{type:Object,required:!0}},computed:Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaignsStatistics",["campaignsStatisticsIsLoading"])),Object(c["c"])("campaignsStatistics",["selectedGroupByOption"])),{},{filters:function(){var t=this;return this.selectedGroupByOption.filters.map((function(e){var a=e.value;return{value:a,text:t.$t("campaign_statistics.headers.".concat(a))}}))}}),watch:{selectedGroupByOption:function(t){this.$emit("change-axis",{name:"first",value:t.filters[0].value}),t.filters[1]?this.$emit("change-axis",{name:"second",value:t.filters[1].value}):this.$emit("change-axis",{name:"second",value:t.filters[0].value})}}},V=D,M=a("62ad"),U=a("490a"),z=a("0fd9"),q=Object(b["a"])(V,G,N,!1,null,null,null),H=q.exports;y()(q,{VCol:M["a"],VIcon:x["a"],VProgressCircular:U["a"],VRow:z["a"]});var W={name:"Chart",components:{StatisticsChartColumns:H,JsonExcel:E["a"],CustomChart:P["a"]},data:function(){return{width:0,defaultOptions:{stroke:{width:[0,4],curve:"smooth"}},axis:{first:"cost",second:"impressions"},chartPage:1,totalsHeader:["date","campaign_id","hour","id","src","browser","carrier","country","operatingSystem","site"]}},computed:Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["d"])("settings",["adNetwork"])),Object(c["d"])("campaignsStatistics",["groupBy","statisticsItems"])),Object(c["c"])("campaignsStatistics",["selectedGroupByOption","totalStatistics"])),{},{fileName:function(){return"".concat(this.adNetwork.name,"-statistic.xls")},excelColumnHeaders:function(){var t=this;return this.selectedGroupByOption.headers.reduce((function(e,a){var i=t.adNetwork.showSiteDomains||"site"!==a?a:"site_id";return e[t.$t("campaign_statistics.headers.".concat(i))]=i,e}),{})},excelStatisticsItems:function(){var t=this,e=Object.values(this.excelColumnHeaders),a=e.reduce((function(e,a){return e[a]=t.totalStatistics[a],t.totalsHeader.includes(a)&&(e[a]=t.$t("main.total")),e}),{});return[].concat(Object($["a"])(this.statisticsItems),[a])},yaxis:function(){return[{title:{text:this.$t("campaign_statistics.headers.".concat(this.axis.first))}},{opposite:!0,title:{text:this.$t("campaign_statistics.headers.".concat(this.axis.second))}}]},xaxis:function(){return"date"===this.groupBy||"hour"===this.groupBy?{type:"datetime",categories:this.categories}:{type:"category",categories:[]}},tooltip:function(){return{x:{format:"hour"===this.groupBy?"dd MMM HH:mm":"dd MMM"}}},itemsCountPerPage:function(){var t=25;return Math.ceil(this.width/t)},limitedItems:function(){var t=(this.chartPage-1)*this.itemsCountPerPage,e=t+this.itemsCountPerPage;return this.statisticsItems.slice(t,e)},pagesCount:function(){return Math.ceil(this.statisticsItems.length/this.itemsCountPerPage)},categories:function(){var t=this,e="hour";return this.limitedItems.map((function(a){var i=a.hour,s=a.date;return t.groupBy===e?R()(i).utcOffset(0,!0).format():s}))},firstSeries:function(){var t=this,e=this.limitedItems.map((function(e){return Object(B["a"])(parseFloat(e[t.axis.first]))}));return{name:this.$t("campaign_statistics.headers.".concat(this.axis.first)),type:"column",data:e}},secondSeries:function(){var t=this,e=this.limitedItems.map((function(e){return Object(B["a"])(parseFloat(e[t.axis.second]))}));return{name:this.$t("campaign_statistics.headers.".concat(this.axis.second)),type:"line",data:e}},labels:function(){if(this.limitedItems[0]&&(this.groupBy in this.limitedItems[0]||"spot"===this.groupBy)&&"date"!==this.groupBy&&"hour"!==this.groupBy){var t=this.groupBy;return"site"!==this.groupBy||this.adNetwork.showSiteDomains||(t="site_id"),"spot"===this.groupBy&&(t="spot_id"),this.limitedItems.map((function(e){return e[t]||""}))}return[]},series:function(){return[this.firstSeries,this.secondSeries]},options:function(){return Object(o["a"])(Object(o["a"])({},this.defaultOptions),{},{labels:this.labels,yaxis:this.yaxis,xaxis:this.xaxis,tooltip:this.tooltip})}}),watch:{pagesCount:function(){this.chartPage=1}},mounted:function(){this.width=this.$refs.el.offsetWidth},methods:{onResize:function(){this.width=this.$refs.el.clientWidth},changeAxis:function(t){var e=t.name,a=t.value;this.axis[e]=a}}},Y=W,K=a("891e"),X=a("269a"),Z=a.n(X),J=a("dc22"),Q=Object(b["a"])(Y,A,j,!1,null,null,null),tt=Q.exports;y()(Q,{VCol:M["a"],VPagination:K["a"],VRow:z["a"]}),Z()(Q,{Resize:J["a"]});var et=function(){var t=this,e=t._self._c;return e("v-card",{staticClass:"pa-0",attrs:{elevation:"0"}},[e("v-card-title",{staticClass:"text-h6 black font-weight-medium white--text py-2 pl-6 mb-4"},[t._v(" "+t._s(t.$t("campaign_statistics.statistics"))+" "),e("v-spacer")],1),e("v-card-text",{staticClass:"py-0 px-5"},[e("v-container",{staticClass:"px-0",attrs:{fluid:""}},[e("v-row",[e("v-col",{staticClass:"py-2",attrs:{cols:"12",sm:"6",md:"3"}},[e("date-picker-select",{attrs:{"with-presets":"",buttons:"",value:t.dates},on:{input:function(e){t.setDates(e),t.fetchStatistics()},"selected-preset":function(e){return t.pushGTMPreset(e)}}})],1),e("v-col",{staticClass:"py-2",attrs:{cols:"12",sm:"6",md:"3"}},[e("ad-format",{on:{update:function(e){return t.fetchStatistics()}}})],1),e("v-col",{staticClass:"py-2",attrs:{cols:"12",sm:"6",md:"3"}},[e("campaigns-select",{attrs:{"campaign-ids":t.campaignIds},on:{update:function(e){return t.fetchStatistics()}}})],1),e("v-col",{staticClass:"py-2",attrs:{cols:"12",sm:"6",md:"3"}},[e("campaign-statuses",{on:{update:function(e){return t.fetchStatistics()}}})],1),e("v-col",{staticClass:"pt-4 pb-0 px-3 pt-sm-1 d-flex justify-center justify-sm-end"},[e("a",{staticClass:"text-decoration-underline text-body-1 text-sm-body-2",on:{click:function(e){return t.resetFilters()}}},[t._v(" "+t._s(t.$t("campaign_statistics.reset_filters"))+" ")])])],1)],1)],1)],1)},at=[],it=a("93b2"),st=a("3039"),nt=(a("ac1f"),a("841c"),function(){var t=this,e=t._self._c;return e("c-autocomplete",{attrs:{value:t.adFormatsIds,items:t.getAdFormatsByAdNetwork,"item-text":"name","item-value":"id",label:t.$t("main.ad_format"),placeholder:t.$t("campaign_statistics.select_ad_format"),clearable:"",multiple:"","hide-details":"","search-input":t.search},on:{"update:search-input":function(e){return t.setSearch(e)},change:function(e){return t.changeAdFormatsIds(e)}}})}),rt=[],ot=a("eba4"),ct={name:"AdFormat",components:{CAutocomplete:ot["a"]},data:function(){return{search:""}},computed:Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaignsStatistics",["adFormatsIds"])),Object(c["c"])("settings",["getAdFormatsByAdNetwork"])),methods:Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["setAdFormatsIds"])),{},{changeAdFormatsIds:function(t){this.setAdFormatsIds(t),this.setSearch(""),this.$emit("update")},setSearch:function(t){this.search=t}})},lt=ct,ut=Object(b["a"])(lt,nt,rt,!1,null,null,null),dt=ut.exports,pt=function(){var t=this,e=t._self._c;return e("c-autocomplete",{attrs:{value:t.campaignStatuses,items:t.mappedStatusesByLocale,"item-text":"label","item-value":"value",label:t.$t("campaign_statistics.campaign_statuses"),placeholder:t.$t("campaign_statistics.select_statuses"),clearable:"",multiple:"","hide-details":"","search-input":t.search},on:{"update:search-input":function(e){return t.setSearch(e)},change:function(e){return t.changeCampaignStatuses(e)}}})},ht=[],mt={name:"CampaignStatuses",components:{CAutocomplete:ot["a"]},data:function(){return{search:""}},computed:Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaigns",["statuses"])),Object(c["d"])("campaignsStatistics",["campaignStatuses"])),{},{mappedStatusesByLocale:function(){var t=this;return this.statuses.map((function(e){return Object(o["a"])(Object(o["a"])({},e),{},{label:t.$t("main.statuses.".concat(e.value))})}))}}),methods:Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["setCampaignStatuses"])),{},{changeCampaignStatuses:function(t){this.setCampaignStatuses(t),this.setSearch(""),this.$emit("update")},setSearch:function(t){this.search=t}})},ft=mt,gt=Object(b["a"])(ft,pt,ht,!1,null,null,null),vt=gt.exports,bt=function(){var t=this,e=t._self._c;return e("c-autocomplete",{attrs:{value:t.selectedCampaigns,label:t.$t("campaign_statistics.campaign_name"),placeholder:t.$t("campaign_statistics.select_campaign_name"),"item-text":"text","item-value":"id","all-selected-is-active":!1,"return-object":"",loading:t.campaignIsLoading,items:t.mappedCampaigns,"hide-details":"",clearable:"","search-input":t.search},on:{change:function(e){return t.selectCampaign(e)},blur:function(e){return t.closeList()},"update:search-input":function(e){return t.searchCampaigns(e)}},scopedSlots:t._u([{key:"append-item",fn:function(){return[t.search?t._e():e("div",{directives:[{name:"intersect",rawName:"v-intersect",value:t.endIntersect,expression:"endIntersect"}],staticClass:"text-center"},[t.campaignIsLoading?e("v-progress-circular",{attrs:{size:20,color:"primary",indeterminate:""}}):t._e()],1)]},proxy:!0}])})},_t=[],yt=(a("498a"),a("b012")),xt=a.n(yt),Ct=a("b395"),wt=a("6239"),St=a("b713"),Ot={name:"CampaignsSelect",components:{CAutocomplete:ot["a"]},props:{campaignIds:{type:Array,required:!0}},data:function(){return{campaignsList:[],campaignIsLoading:!1,options:{sortBy:["id"],sortDesc:[!0],page:0,itemsPerPage:15},search:null,pageCount:1,debounceFetchTable:null}},computed:Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaignsStatistics",["selectedCampaigns","adFormatsIds","campaignStatuses"])),{},{mappedCampaigns:function(){return this.campaignsList.map((function(t){return Object(o["a"])(Object(o["a"])({},t),{},{text:"".concat(t.name," (").concat(t.id,")")})}))}}),watch:{adFormatsIds:function(){this.campaignsList=Object($["a"])(this.selectedCampaigns),this.options.page=0,this.pageCount=1},campaignStatuses:function(){this.campaignsList=Object($["a"])(this.selectedCampaigns),this.options.page=0,this.pageCount=1}},created:function(){var t=this;return Object(r["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.debounceFetchTable=xt()(t.fetchCampaignsList,400),!t.campaignIds.length){e.next=10;break}return t.options.page=1,t.options.itemsPerPage=-1,e.next=6,t.fetchCampaignsList(t.campaignIds);case 6:t.selectCampaign(t.campaignsList),t.options.page=0,t.options.itemsPerPage=15,t.pageCount=1;case 10:case"end":return e.stop()}}),e)})))()},methods:Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["setSelectedCampaigns"])),{},{fetchCampaignsList:function(t){var e=this;return Object(r["a"])(Object(n["a"])().mark((function a(){var i,s;return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return i={headers:[{value:"id",searchable:!0},{value:"name",searchable:!0},{value:"ad_format_id",searchable:!1},{value:"status",searchable:!1}],options:e.options,search:Object(o["a"])(Object(o["a"])({ad_format_id:e.adFormatsIds,status:e.campaignStatuses},e.search&&{commonSearch:e.search.trim()}),t&&{id:t})},e.campaignIsLoading=!0,a.prev=2,a.next=5,Ct["f"].campaignsTable(i);case 5:s=a.sent,e.campaignsList=e.campaignsList.concat(s.items.map((function(t){return new wt["a"](t)}))),e.pageCount=Math.ceil(s.totalItemsCount/e.options.itemsPerPage),e.campaignIsLoading=!1,a.next=14;break;case 11:a.prev=11,a.t0=a["catch"](2),Object(St["a"])(a.t0);case 14:case"end":return a.stop()}}),a,null,[[2,11]])})))()},selectCampaign:function(t){this.setSelectedCampaigns(t),this.$emit("update")},searchCampaigns:function(t){t?(this.search=t,this.options.page=1,this.campaignsList=Object($["a"])(this.selectedCampaigns),this.debounceFetchTable()):this.closeList()},closeList:function(){this.search&&(this.search=null,this.campaignsList=Object($["a"])(this.selectedCampaigns),this.options.page=0,this.pageCount=1)},endIntersect:function(t,e,a){a&&!this.campaignIsLoading&&this.options.page<this.pageCount&&(this.campaignIsLoading=!0,this.options=Object(o["a"])(Object(o["a"])({},this.options),{},{page:this.options.page+1}),this.debounceFetchTable())}})},kt=Ot,Tt=a("90a2"),It=Object(b["a"])(kt,bt,_t,!1,null,null,null),At=It.exports;y()(It,{VProgressCircular:U["a"]}),Z()(It,{Intersect:Tt["a"]});var jt={name:"Settings",components:{CampaignsSelect:At,AdFormat:dt,CampaignStatuses:vt,DatePickerSelect:it["a"]},props:{campaignIds:{type:Array,required:!0}},computed:Object(o["a"])({},Object(c["d"])("campaignsStatistics",["dates","campaignsStatisticsIsLoading","groupBy"])),methods:Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["fetchStatistics","setDates","setGroupBy","reset"])),{},{resetFilters:function(){var t=this.groupBy;this.reset(),this.setGroupBy(t),this.fetchStatistics()},pushGTMPreset:function(t){var e={last_7_days:u["a"].L_7DAYS,last_30_days:u["a"].L_30DAYS,last_week:u["a"].L_WEEK,last_month:u["a"].L_MONTH,current_week:u["a"].C_WEEK,current_month:u["a"].C_MONTH};e[t]&&Object(st["a"])({event:e[t],event_category:u["b"].CALENDAR})}})},$t=jt,Et=a("b0af"),Bt=a("99d9"),Lt=a("a523"),Rt=a("2fa4"),Pt=Object(b["a"])($t,et,at,!1,null,null,null),Gt=Pt.exports;y()(Pt,{VCard:Et["a"],VCardText:Bt["c"],VCardTitle:Bt["d"],VCol:M["a"],VContainer:Lt["a"],VRow:z["a"],VSpacer:Rt["a"]});var Nt=function(){var t=this,e=t._self._c;return e("v-card",{attrs:{elevation:"0"}},[t.groupBySite||t.groupBySpot?e("statistics-search",{attrs:{placeholder:t.$t("campaign_statistics.search")},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}):t._e(),e("v-data-table",{attrs:{loading:t.campaignsStatisticsIsLoading,headers:t.headers,items:t.mappedStatisticsItems,options:t.options,"show-select":t.blacklisitngIsEnabled,search:t.search,"item-key":t.siteKey,"hide-default-footer":"","mobile-breakpoint":"0"},on:{"update:options":function(e){t.options=e},"page-count":function(e){return t.getPageCount(e)}},scopedSlots:t._u([t.groupBySite||t.groupBySpot?{key:"item.data-table-select",fn:function(a){var i=a.isSelected,s=a.select,n=a.item;return[n.isSelectable?e("v-checkbox",{attrs:{"input-value":i},on:{change:s}}):t._e()]}}:null,{key:"item.src",fn:function(a){var i=a.item;return[i.src?e("div",{staticClass:"py-3"},[e("hover-image",{attrs:{src:i.src}})],1):t._e()]}},{key:"item.campaign",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:"Campaign",params:{id:i.campaign_id}}}},[t._v(" "+t._s(i.campaign)+" ")])]}},{key:"item.banner",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.banner)+" ")])]}},{key:"item.webPush",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.webPush)+" ")])]}},{key:"item.inStreamAd",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.inStreamAd)+" ")])]}},{key:"item.nativeAd",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.nativeAd)+" ")])]}},{key:"item.directLink",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.directLink)+" ")])]}},{key:"item.iosCalendar",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.iosCalendar)+" ")])]}},{key:"item.site",fn:function(e){var a=e.item;return[t._v(" "+t._s(t.site(a))+" ")]}},{key:"item.ad_type_name",fn:function(a){var i=a.item;return[e("router-link",{attrs:{to:{name:t.routeNames.AD,params:{id:i.ad_id}}}},[t._v(" "+t._s(i.ad_type_name)+" ")])]}},t.statisticsItems.length?{key:"body.append",fn:function(){return[e("total-statistics",{attrs:{headers:t.headers,items:t.totalStatistics,"has-checkboxes":t.blacklisitngIsEnabled}})]},proxy:!0}:null,{key:"header.reserved_balance",fn:function(){return[t._v(" "+t._s(t.$t("campaign_statistics.reserved"))+" "),e("v-tooltip",{attrs:{top:""},scopedSlots:t._u([{key:"activator",fn:function(a){var i=a.on,s=a.attrs;return[e("c-btn",t._g(t._b({attrs:{icon:"",small:"",href:t.helpUrls.balance_reserved,target:"_blank","icon-props":{icon:"mdi-help-circle",color:"primary",small:"small"}}},"c-btn",s,!1),i))]}}])},[e("span",[t._v(" "+t._s(t.$t("campaign_statistics.why_there_is_a_reservation")))])])]},proxy:!0}],null,!0),model:{value:t.selectedItems,callback:function(e){t.selectedItems=e},expression:"selectedItems"}}),t.blacklisitngIsEnabled?e("black-listing",{attrs:{"selected-items":t.selectedItems,"black-listing-is-site":t.groupBySite}}):t._e(),e("data-table-footer",{attrs:{"items-per-page":t.options.itemsPerPage,"current-page":t.options.page,"page-count":t.pageCount},on:{"change-items-per-page":function(e){return t.changeItemsPerPage(e)},"change-current-page":function(e){return t.changeCurrentPage(e)}}})],1)},Ft=[],Dt=a("5708"),Vt=a("84b2"),Mt=a("0f1c"),Ut=function(){var t=this,e=t._self._c;return e("div",{staticClass:"my-3 d-flex flex-column flex-sm-row justify-center align-center py-3 border-primary rounded"},[e("v-icon",{staticClass:"mr-3 mt-n1",attrs:{color:"error",size:"16"}},[t._v(" $blocked ")]),e("div",{staticClass:"mr-sm-6 mb-2 mb-sm-0 text-center"},[t._v(" "+t._s(t.selectedItemsTitle)+" ")]),e("c-btn",{attrs:{disabled:!t.selectedItems.length,label:t.$t("campaign_statistics.blacklisting.add_to_blacklist"),color:"primary",depressed:""},on:{click:function(e){t.blackListDialogIsShown=!0}}}),e("black-list-dialog",{attrs:{"is-shown":t.blackListDialogIsShown,"black-listing-is-site":t.blackListingIsSite,"black-list-items":t.selectedItems},on:{"close-dialog":function(e){t.blackListDialogIsShown=!1}}})],1)},zt=[],qt=function(){var t=this,e=t._self._c;return e("v-dialog",{attrs:{value:t.isShown,"max-width":"660"},on:{input:function(e){return t.closeDialog()}}},[e("v-card",{staticClass:"d-flex flex-column pa-3"},[e("v-icon",{staticClass:"align-self-end",attrs:{size:"18"},on:{click:function(e){return t.closeDialog()}}},[t._v(" $close-outlined ")]),e("div",{staticClass:"align-self-center font-weight-medium text-body-1 mb-20"},[t._v(" "+t._s(t.$t("campaign_statistics.blacklisting.add_sources"))+" ")]),e("section",{staticClass:"mb-5"},[e("div",{staticClass:"border-secondary rounded pa-4"},[e("div",{staticClass:"font-weight-medium text-body-2"},[t._v(" "+t._s(t.blackListingTitle)+" ")]),e("div",{staticClass:"height-160 overflow-y-auto"},[e("v-chip-group",{staticClass:"text-caption",attrs:{column:""}},t._l(t.blackListItems,(function(a,i){return e("v-chip",{key:i,staticClass:"mr-1 mb-1 secondary-lighten",attrs:{small:"",label:""}},[e("span",[t._v(" "+t._s(a[t.blackListingKey])+" ")])])})),1)],1)])]),e("section",{staticClass:"mb-12"},[t.selectedCampaigns.length?e("div",{staticClass:"border-secondary rounded pa-4"},[e("div",{staticClass:"font-weight-medium text-body-2"},[t._v(" "+t._s(t.$t("campaign_statistics.blacklisting.campaign_name"))+" ")]),e("div",{staticClass:"height-124 overflow-y-auto"},[e("v-chip-group",{staticClass:"text-caption",attrs:{column:""}},t._l(t.allCampaigns.validCampaigns,(function(a,i){return e("v-chip",{key:i,staticClass:"mr-1 mb-1 secondary-lighten",attrs:{small:"",label:""}},[e("span",[t._v(" "+t._s(a.name)+" ")])])})),1)],1)]):t._e()]),t.allCampaigns.inValidCampaigns.length?e("section",{staticClass:"mb-3"},[e("div",{staticClass:"text-body-2 font-weight-medium text-center mb-5"},[t._v(" "+t._s(t.invalidCampaignsTitle)+" ")]),e("div",{staticClass:"border-secondary rounded pa-4"},[e("div",{staticClass:"font-weight-medium text-body-2"},[t._v(" "+t._s(t.$t("campaign_statistics.blacklisting.campaign_name"))+" ")]),e("div",{staticClass:"height-124 overflow-y-auto"},[e("v-chip-group",{staticClass:"text-caption",attrs:{column:""}},t._l(t.allCampaigns.inValidCampaigns,(function(a,i){return e("v-chip",{key:i,staticClass:"mr-1 mb-1 secondary-lighten",attrs:{small:"",label:""}},[e("span",[t._v(" "+t._s(a.name)+" ")])])})),1)],1)])]):t._e(),e("div",[e("c-btn",{attrs:{block:"",color:"primary",depressed:"",disabled:!t.allCampaigns.validCampaigns.length,loading:t.isLoading,label:t.$t("campaign_statistics.blacklisting.confirm")},on:{click:function(e){return t.addToBlackList()}}}),t.errors.length?e("errors",{attrs:{"error-messages":t.errors,"display-all":""}}):t._e()],1)],1)],1)},Ht=[],Wt=a("fa85"),Yt=a("badd"),Kt={name:"BlackListDialog",components:{CBtn:l["a"],Errors:Yt["a"]},props:{isShown:{type:Boolean,required:!0},blackListItems:{type:Array,required:!0},blackListingIsSite:{type:Boolean,required:!0}},data:function(){return{errors:[],isLoading:!1}},computed:Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaignsStatistics",["selectedCampaigns"])),Object(c["d"])("settings",["adNetwork"])),Object(c["c"])("settings",["getAdFormatsByAdNetwork"])),{},{spotTargetFormatsIds:function(){return this.getAdFormatsByAdNetwork.reduce((function(t,e){var a=e.targetTypes.some((function(t){return t.type===Wt["a"].SPOT_TARGET}));return a&&t.push(e.id),t}),[])},allCampaigns:function(){var t=this;return this.blackListingIsSite?{validCampaigns:this.selectedCampaigns.filter((function(t){return!t.targets.siteTarget.accept&&!t.isFlatDeal}))||[],inValidCampaigns:this.selectedCampaigns.filter((function(t){return t.targets.siteTarget.accept||t.isFlatDeal}))||[]}:{validCampaigns:this.selectedCampaigns.filter((function(e){return!e.isFlatDeal&&t.spotTargetFormatsIds.includes(e.adFormat.id)&&!e.targets.spotTarget.accept})),inValidCampaigns:this.selectedCampaigns.filter((function(e){return e.isFlatDeal||!t.spotTargetFormatsIds.includes(e.adFormat.id)||e.targets.spotTarget.accept}))}},blackListingTitle:function(){return this.blackListingIsSite?this.$t("campaign_statistics.blacklisting.sites"):this.$t("campaign_statistics.blacklisting.spots")},invalidCampaignsTitle:function(){return this.blackListingIsSite?this.$t("campaign_statistics.blacklisting.sites_cant_added"):this.$t("campaign_statistics.blacklisting.spots_cant_added")},blackListingKey:function(){var t=this.blackListingIsSite?"site":"tds_id";return this.blackListingIsSite&&!this.adNetwork.showSiteDomains&&(t="site_id"),t}}),methods:{closeDialog:function(){this.errors={},this.$emit("close-dialog")},addToBlackList:function(){var t=this;return Object(r["a"])(Object(n["a"])().mark((function e(){var a,i,s,r,c;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.blackListingIsSite?(i=Ct["f"].addBlackListSites,s=t.$t("campaign_statistics.blacklisting.sites_added"),r=t.blackListItems.filter((function(t){return!t.site_id})).map((function(t){return t.site})),a=Object(o["a"])({campaign_ids:t.allCampaigns.validCampaigns.map((function(t){return t.id})),site_ids:t.blackListItems.filter((function(t){return t.site_id})).map((function(t){return t.site_id}))},r.length&&{domains:r})):(i=Ct["f"].addBlackListSpots,s=t.$t("campaign_statistics.blacklisting.spots_added"),a={campaign_ids:t.allCampaigns.validCampaigns.map((function(t){return t.id})),spot_ids:t.blackListItems.filter((function(t){return t.spot_id})).map((function(t){return t.spot_id}))}),t.isLoading=!0,e.prev=2,e.next=5,i(a);case 5:t.$showSuccessNotification(s),t.$emit("close-dialog"),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](2),c=Object.values(Object(St["a"])(e.t0)),t.errors=c.map((function(t){return Array.isArray(t)?t[0]:t}));case 13:t.isLoading=!1;case 14:case"end":return e.stop()}}),e,null,[[2,9]])})))()}}},Xt=Kt,Zt=(a("9f36"),a("cc20")),Jt=a("ef9a"),Qt=a("169a"),te=Object(b["a"])(Xt,qt,Ht,!1,null,"77ab2467",null),ee=te.exports;y()(te,{VCard:Et["a"],VChip:Zt["a"],VChipGroup:Jt["a"],VDialog:Qt["a"],VIcon:x["a"]});var ae={name:"BlackListing",components:{BlackListDialog:ee,CBtn:l["a"]},props:{selectedItems:{type:Array,default:function(){return[]}},blackListingIsSite:{type:Boolean,required:!0}},data:function(){return{blackListDialogIsShown:!1}},computed:{selectedItemsTitle:function(){return this.blackListingIsSite?this.$t("campaign_statistics.blacklisting.add_selected_sources"):this.$t("campaign_statistics.blacklisting.add_selected_spots")}}},ie=ae,se=Object(b["a"])(ie,Ut,zt,!1,null,null,null),ne=se.exports;y()(se,{VIcon:x["a"]});var re=function(){var t=this,e=t._self._c;return e("div",{staticClass:"secondary-lighten py-3 px-3"},[e("c-text-field",{class:{"width-400":t.isDesktopOrHigher},attrs:{placeholder:t.placeholder,"single-line":"","hide-details":"",flat:"",clearable:"","background-color":"white","border-color":"secondary"},scopedSlots:t._u([{key:"prepend-inner",fn:function(){return[e("v-icon",{staticClass:"mt-1",attrs:{color:"primary",size:"20"}},[t._v(" $magnifier ")])]},proxy:!0}]),model:{value:t.inputStatistics,callback:function(e){t.inputStatistics=e},expression:"inputStatistics"}})],1)},oe=[],ce=a("2dd6"),le={name:"StatisticsSearch",components:{CTextField:ce["a"]},props:{value:{type:String,default:""},placeholder:{type:String,default:""}},computed:{isDesktopOrHigher:function(){return this.$vuetify.breakpoint.mdAndUp},inputStatistics:{get:function(){return this.value},set:function(t){this.$emit("input",t)}}}},ue=le,de=(a("e9b8"),Object(b["a"])(ue,re,oe,!1,null,"7ffd8393",null)),pe=de.exports;y()(de,{VIcon:x["a"]});var he=a("d11b"),me={name:"StatisticsTable",components:{StatisticsSearch:pe,BlackListing:ne,TotalStatistics:Mt["a"],CBtn:l["a"],HoverImage:Vt["a"],DataTableFooter:Dt["a"]},data:function(){return{selectedItems:[],options:{itemsPerPage:15,page:1},search:"",pageCount:1,routeNames:he["a"]}},computed:Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])(Object(o["a"])({},Object(c["d"])("campaignsStatistics",["campaignsStatisticsIsLoading","statisticsItems","tableOptions","tablePerPagePagination","groupBy","selectedCampaigns"])),Object(c["d"])("settings",["adNetwork","undefinedSiteId","undefinedSpotId"])),Object(c["c"])("campaignsStatistics",["selectedGroupByOption","totalStatistics"])),Object(c["c"])("settings",["helpUrls"])),{},{mappedStatisticsItems:function(){var t=this;return this.groupBySite?this.statisticsItems.map((function(e){return Object(o["a"])(Object(o["a"])({},e),{},{isSelectable:e.site_id!==t.undefinedSiteId})})):this.groupBySpot?this.statisticsItems.map((function(e){return Object(o["a"])(Object(o["a"])({},e),{},{isSelectable:e.spot_id!==t.undefinedSpotId})})):this.statisticsItems},tableOptionsMutable:{get:function(){return this.tableOptions},set:function(t){this.setTableOptions(t)}},siteKey:function(){return this.groupBySite?this.adNetwork.showSiteDomains?"site":"site_id":"tds_id"},groupBySite:function(){return"site"===this.groupBy},groupBySpot:function(){return"spot"===this.groupBy},blacklisitngIsEnabled:function(){return(this.groupBySite||"spot"===this.groupBy)&&!!this.selectedCampaigns.length},headers:function(){var t=this;return this.selectedGroupByOption.headers.map((function(e){return{value:"site"===e?t.siteKey:e,text:t.$t("campaign_statistics.headers.".concat(e)),width:"120px",class:"black--text",filterable:["tds_id","site"].includes(e)}}))}}),watch:{selectedCampaigns:function(){this.selectedItems=[]},groupBySite:function(){this.search=""},groupBySpot:function(){this.search=""},groupBy:function(){this.selectedItems=[]}},methods:Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["setTableOptions","fetchStatistics"])),{},{site:function(t){return this.adNetwork.showSiteDomains?t.site:t.site_id},changeCurrentPage:function(t){this.options.page=t},changeItemsPerPage:function(t){this.options.itemsPerPage=t},getPageCount:function(t){this.pageCount=t}})},fe=me,ge=a("ac7c"),ve=a("8fea"),be=a("3a2f"),_e=Object(b["a"])(fe,Nt,Ft,!1,null,null,null),ye=_e.exports;y()(_e,{VCard:Et["a"],VCheckbox:ge["a"],VDataTable:ve["a"],VTooltip:be["a"]});var xe={name:"CampaignsStatistics",components:{CBtn:l["a"],GroupBy:I,Chart:tt,Settings:Gt,StatisticsTable:ye},data:function(){return{campaignIds:[],campaignsTotal:null,isLoading:!1}},created:function(){this.reset(),this.fetchDashboard(),this.$route.query.campaigns&&(this.campaignIds=this.parseIds(this.$route.query.campaigns)),this.$route.query.adFormatIds&&this.setAdFormatsIds(this.parseIds(this.$route.query.adFormatIds)),this.$route.query.groupBy&&this.setGroupBy(this.$route.query.groupBy),this.fetchStatistics()},methods:Object(o["a"])(Object(o["a"])({},Object(c["b"])("campaignsStatistics",["fetchStatistics","reset","setAdFormatsIds","setGroupBy"])),{},{redirectToCreateCampaign:function(){Object(st["a"])({event:u["a"].NO_CAMPAIGN_BUTTON_STATISTICS}),this.$router.push({name:he["a"].CREATE_CAMPAIGN})},parseIds:function(t){var e,a;return null!==(e=null===(a=JSON.parse(t))||void 0===a?void 0:a.map((function(t){return Number(t)})))&&void 0!==e?e:[]},fetchDashboard:function(){var t=this;return Object(r["a"])(Object(n["a"])().mark((function e(){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.prev=1,e.next=4,Ct["k"].fetchDashboard();case 4:a=e.sent,t.campaignsTotal=a.campaigns_total,e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),Object(St["a"])(e.t0);case 11:t.isLoading=!1;case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))()}})},Ce=xe,we=a("a797"),Se=Object(b["a"])(Ce,i,s,!1,null,null,null);e["default"]=Se.exports;y()(Se,{VCard:Et["a"],VCardText:Bt["c"],VCardTitle:Bt["d"],VIcon:x["a"],VOverlay:we["a"]})},"9f36":function(t,e,a){"use strict";a("3fdc")},a21b:function(t,e,a){"use strict";a("6a31")},badd:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",t._l(t.errors,(function(a,i){return e("div",{key:i,staticClass:"text-caption error--text"},[t._v(" "+t._s(a)+" ")])})),0)},s=[],n=(a("befc"),a("7257"),a("2841"),a("f200"),{name:"Errors",props:{errorMessages:{type:[String,Array],required:!0,validator:function(t){return Array.isArray(t)?!t.find((function(t){return"string"!==typeof t})):"string"===typeof t}},displayAll:{type:Boolean,default:!1},errorCount:{type:[String,Number],default:1}},computed:{errors:function(){return this.errorMessages?(t="string"===typeof this.errorMessages?[this.errorMessages]:this.displayAll?this.errorMessages:this.errorMessages.slice(0,+this.errorCount),t):[];var t}}}),r=n,o=a("2877"),c=Object(o["a"])(r,i,s,!1,null,null,null);e["a"]=c.exports},befc:function(t,e,a){"use strict";var i=a("b4a6"),s=a("2a08").find,n=a("88f1"),r="find",o=!0;r in[]&&Array(1)[r]((function(){o=!1})),i({target:"Array",proto:!0,forced:o},{find:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)},c8d2:function(t,e,a){var i=a("5e77").PROPER,s=a("d039"),n=a("5899"),r="​᠎";t.exports=function(t){return s((function(){return!!n[t]()||r[t]()!==r||i&&n[t].name!==t}))}},d15f:function(t,e,a){"use strict";var i=a("fd8c"),s=a.n(i);e["default"]=s.a},e9b8:function(t,e,a){"use strict";a("1b75")},ef9a:function(t,e,a){"use strict";a("8f5a");var i=a("7efd"),s=a("a9ad"),n=a("58df");e["a"]=Object(n["a"])(i["a"],s["a"]).extend({name:"v-chip-group",provide(){return{chipGroup:this}},props:{column:Boolean},computed:{classes(){return{...i["a"].options.computed.classes.call(this),"v-chip-group":!0,"v-chip-group--column":this.column}}},watch:{column(t){t&&(this.scrollOffset=0),this.$nextTick(this.onResize)}},methods:{genData(){return this.setTextColor(this.color,{...i["a"].options.methods.genData.call(this)})}}})},f200:function(t,e,a){"use strict";var i=a("b4a6"),s=a("47e2"),n=a("c43e"),r=a("02ae"),o=a("28d2"),c=a("eeb1"),l=a("1813"),u=a("f0ce"),d=a("4b02"),p=a("e4d2"),h=a("0763"),m=p("slice"),f=d("species"),g=Array,v=Math.max;i({target:"Array",proto:!0,forced:!m},{slice:function(t,e){var a,i,d,p=l(this),m=c(p),b=o(t,m),_=o(void 0===e?m:e,m);if(s(p)&&(a=p.constructor,n(a)&&(a===g||s(a.prototype))?a=void 0:r(a)&&(a=a[f],null===a&&(a=void 0)),a===g||void 0===a))return h(p,b,_);for(i=new(void 0===a?g:a)(v(_-b,0)),d=0;b<_;b++,d++)b in p&&u(i,d,p[b]);return i.length=d,i}})},f2d9:function(t,e,a){"use strict";(function(t){"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t||"undefined"!==typeof self&&self;function a(t,e){return e={exports:{}},t(e,e.exports),e.exports}var i=a((function(t,e){(function(e,a){t.exports=a()})(0,(function(){return function t(e,a,i){var s,n,r=window,o="application/octet-stream",c=i||o,l=e,u=!a&&!i&&l,d=document.createElement("a"),p=function(t){return String(t)},h=r.Blob||r.MozBlob||r.WebKitBlob||p,m=a||"download";if(h=h.call?h.bind(r):Blob,"true"===String(this)&&(l=[l,c],c=l[0],l=l[1]),u&&u.length<2048&&(m=u.split("/").pop().split("?")[0],d.href=u,-1!==d.href.indexOf(u))){var f=new XMLHttpRequest;return f.open("GET",u,!0),f.responseType="blob",f.onload=function(e){t(e.target.response,m,o)},setTimeout((function(){f.send()}),0),f}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(l)){if(!(l.length>2096103.424&&h!==p))return navigator.msSaveBlob?navigator.msSaveBlob(_(l),m):y(l);l=_(l),c=l.type||o}else if(/([\x80-\xff])/.test(l)){var g=0,v=new Uint8Array(l.length),b=v.length;for(g;g<b;++g)v[g]=l.charCodeAt(g);l=new h([v],{type:c})}function _(t){var e=t.split(/[:;,]/),a=e[1],i="base64"==e[2]?atob:decodeURIComponent,s=i(e.pop()),n=s.length,r=0,o=new Uint8Array(n);for(r;r<n;++r)o[r]=s.charCodeAt(r);return new h([o],{type:a})}function y(t,e){if("download"in d)return d.href=t,d.setAttribute("download",m),d.className="download-js-link",d.innerHTML="downloading...",d.style.display="none",document.body.appendChild(d),setTimeout((function(){d.click(),document.body.removeChild(d),!0===e&&setTimeout((function(){r.URL.revokeObjectURL(d.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,o)),window.open(t)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=t),!0;var a=document.createElement("iframe");document.body.appendChild(a),!e&&/^data:/.test(t)&&(t="data:"+t.replace(/^data:([\w\/\-\+]+)/,o)),a.src=t,setTimeout((function(){document.body.removeChild(a)}),333)}if(s=l instanceof h?l:new h([l],{type:c}),navigator.msSaveBlob)return navigator.msSaveBlob(s,m);if(r.URL)y(r.URL.createObjectURL(s),!0);else{if("string"===typeof s||s.constructor===p)try{return y("data:"+c+";base64,"+r.btoa(s))}catch(x){return y("data:"+c+","+encodeURIComponent(s))}n=new FileReader,n.onload=function(t){y(this.result)},n.readAsDataURL(s)}return!0}}))})),s={props:{type:{type:String,default:"xls"},data:{type:Array,required:!1,default:null},fields:{type:Object,default:()=>null},exportFields:{type:Object,default:()=>null},defaultValue:{type:String,required:!1,default:""},header:{default:null},footer:{default:null},name:{type:String,default:"data.xls"},fetch:{type:Function},meta:{type:Array,default:()=>[]},worksheet:{type:String,default:"Sheet1"},beforeGenerate:{type:Function},beforeFinish:{type:Function},escapeCsv:{type:Boolean,default:!0},stringifyLongNum:{type:Boolean,default:!1}},computed:{idName(){var t=(new Date).getTime();return"export_"+t},downloadFields(){return this.fields?this.fields:this.exportFields?this.exportFields:void 0}},methods:{async generate(){"function"===typeof this.beforeGenerate&&await this.beforeGenerate();let t=this.data;if("function"!==typeof this.fetch&&t||(t=await this.fetch()),!t||!t.length)return;let e=this.getProcessedJson(t,this.downloadFields);return"html"===this.type?this.export(this.jsonToXLS(e),this.name.replace(".xls",".html"),"text/html"):"csv"===this.type?this.export(this.jsonToCSV(e),this.name.replace(".xls",".csv"),"application/csv"):this.export(this.jsonToXLS(e),this.name,"application/vnd.ms-excel")},export:async function(t,e,a){let s=this.base64ToBlob(t,a);"function"===typeof this.beforeFinish&&await this.beforeFinish(),i(s,e,a)},jsonToXLS(t){let e='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>${worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e<style>br {mso-data-placement: same-cell;}</style></head><body><table>${table}</table></body></html>',a="<thead>";const i=Object.keys(t[0]).length;let s=this;const n=this.header||this.$attrs.title;n&&(a+=this.parseExtraData(n,'<tr><th colspan="'+i+'">${data}</th></tr>')),a+="<tr>";for(let r in t[0])a+="<th>"+r+"</th>";return a+="</tr>",a+="</thead>",a+="<tbody>",t.map((function(t,e){a+="<tr>";for(let i in t)a+="<td>"+s.preprocessLongNum(s.valueReformattedForMultilines(t[i]))+"</td>";a+="</tr>"})),a+="</tbody>",null!=this.footer&&(a+="<tfoot>",a+=this.parseExtraData(this.footer,'<tr><td colspan="'+i+'">${data}</td></tr>'),a+="</tfoot>"),e.replace("${table}",a).replace("${worksheet}",this.worksheet)},jsonToCSV(t){let e=this;var a=[];const i=this.header||this.$attrs.title;i&&a.push(this.parseExtraData(i,"${data}\r\n"));for(let s in t[0])a.push(s),a.push(",");return a.pop(),a.push("\r\n"),t.map((function(t){for(let i in t){let s=t[i]+"";e.escapeCsv&&(s='="'+s+'"',s.match(/[,"\n]/)&&(s='"'+s.replace(/\"/g,'""')+'"')),a.push(s),a.push(",")}a.pop(),a.push("\r\n")})),null!=this.footer&&a.push(this.parseExtraData(this.footer,"${data}\r\n")),a.join("")},getProcessedJson(t,e){let a=this.getKeys(t,e),i=[],s=this;return t.map((function(t,e){let n={};for(let i in a){let e=a[i];n[i]=s.getValue(e,t)}i.push(n)})),i},getKeys(t,e){if(e)return e;let a={};for(let i in t[0])a[i]=i;return a},parseExtraData(t,e){let a="";if(Array.isArray(t))for(var i=0;i<t.length;i++)t[i]&&(a+=e.replace("${data}",t[i]));else a+=e.replace("${data}",t);return a},getValue(t,e){const a="object"!==typeof t?t:t.field;let i="string"!==typeof a?[]:a.split("."),s=this.defaultValue;return s=a?i.length>1?this.getValueFromNestedItem(e,i):this.parseValue(e[a]):e,t.hasOwnProperty("callback")&&(s=this.getValueFromCallback(s,t.callback)),s},valueReformattedForMultilines(t){return"string"==typeof t?t.replace(/\n/gi,"<br/>"):t},preprocessLongNum(t){if(this.stringifyLongNum){if(String(t).startsWith("0x"))return t;if(!isNaN(t)&&""!=t&&(t>99999999999||t<1e-13))return'="'+t+'"'}return t},getValueFromNestedItem(t,e){let a=t;for(let i of e)a&&(a=a[i]);return this.parseValue(a)},getValueFromCallback(t,e){if("function"!==typeof e)return this.defaultValue;const a=e(t);return this.parseValue(a)},parseValue(t){return t||0===t||"boolean"===typeof t?t:this.defaultValue},base64ToBlob(t,e){let a=window.btoa(window.unescape(encodeURIComponent(t))),i=atob(a),s=i.length,n=new Uint8ClampedArray(s);while(s--)n[s]=i.charCodeAt(s);return new Blob([n],{type:e})}}};function n(t,e,a,i,s,n,r,o,c,l){"boolean"!==typeof r&&(c=o,o=r,r=!1);var u,d="function"===typeof a?a.options:a;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,s&&(d.functional=!0)),i&&(d._scopeId=i),n?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},d._ssrRegister=u):e&&(u=r?function(){e.call(this,l(this.$root.$options.shadowRoot))}:function(t){e.call(this,o(t))}),u)if(d.functional){var p=d.render;d.render=function(t,e){return u.call(e),p(t,e)}}else{var h=d.beforeCreate;d.beforeCreate=h?[].concat(h,u):[u]}return a}var r=n;const o=s;var c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:t.idName},on:{click:t.generate}},[t._t("default",[t._v(" Download "+t._s(t.name)+" ")])],2)},l=[];c._withStripped=!0;const u=void 0,d=void 0,p=void 0,h=!1;var m=r({render:c,staticRenderFns:l},u,o,d,h,p,void 0,void 0);e["a"]=m}).call(this,a("c8ba"))},fa85:function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));const i={BROWSER_TARGET:"browser_target",CARRIER_TARGET:"carrier_target",CATEGORY_GROUP_TARGET:"category_group_target",CATEGORY_TARGET:"category_target",CITY_TARGET:"city_target",COUNTRY_TARGET:"country_target",DEVICE_MODEL_TARGET:"device_model_target",DEVICE_VENDOR_TARGET:"device_vendor_target",EMPTY_REFERER_TARGET:"empty_referer_target",GET_PARAMETER_TARGET:"get_parameter_target",HTTP_HEADER_TARGET:"http_header_target",IN_PAGE_TRAFFIC_TARGET:"in_page_traffic_target",INTEREST_TARGET:"interest_target",IP2_LOCATION_TYPE_TARGET:"ip2_location_type_target",IP_RANGES_TARGET:"ip_ranges_target",IPV6_TARGET:"ipv6_target",LANGUAGE_TARGET:"language_target",MOBILE_APP_TARGET:"mobile_app_target",OPERATING_SYSTEM_TARGET:"operating_system_target",PLACEMENT_TYPE_TARGET:"placement_type_target",PROXY_TARGET:"proxy_target",REGION_TARGET:"region_target",SITE_ALIAS_TARGET:"site_alias_target",SITE_TARGET:"site_target",THROTTLE_TARGET:"throttle_target",TRAFFIC_PROVIDER_TARGET:"traffic_provider_target",TRAFFIC_QUALITY_TARGET:"traffic_quality_target",TRAFFIC_TYPE_TARGET:"traffic_type_target",UNIQUES_TARGET:"uniques_target",WEB_PUSH_SUBSCRIPTION_TIME_TARGET:"web_push_subscription_time_target",WEBVIEW_TARGET:"webview_target",SPOT_TARGET:"spot_target",POPUNDER_TRAFFIC_TARGET:"popunder_traffic_target",CAMPAIGN_TRAFFIC_PLATFORM_TARGET:"campaign_traffic_platform_target"}},fd8c:function(t,e){t.exports=function(t){t.options.__i18n=t.options.__i18n||[],t.options.__i18n.push('{"en":{"rows_per_page":"Rows, per page:","page_all":"All"},"ru":{"rows_per_page":"Строк на странице:","page_all":"Все"},"es":{"rows_per_page":"Filas, por página:","page_all":"Todos"},"de":{"rows_per_page":"Zeilen, pro Seite:","page_all":"Alle"},"jp":{"rows_per_page":"1ページあたりの行数：","page_all":"全て"}}'),delete t.options._Ctor}}}]);
//# sourceMappingURL=chunk-5f2ce9f6.9d5fc168.js.map