1(function(){window.addEventListener('DOMContentLoaded',()=>{const elementExists=document.querySelector('.lunnar-mobile-plan-calculator');if(!elementExists){return} 2new Vue({el:'.lunnar-mobile-plan-calculator',data:{loading:!0,priceMatrix:[[295,372,449,493,581],[372,449,526,570,658],[445,522,592,636,724],[518,595,658,702,790],[591,668,724,768,856],],roamingPrice:125,totalPrice:0,members:3,membersSliderOptions:{min:2,max:6,},dataPackage:'32GB',dataPackageMarks:['2GB','12GB','32GB','52GB','102GB'],packages:[],roaming:!1,types:null,activeTab:null,hasOffer:!1,},components:{vueSlider:window['vue-slider-component'],},mounted(){if(mobilePlanTypes){this.types=JSON.parse(mobilePlanTypes)} 3if(packagesJSON){this.packages=JSON.parse(packagesJSON);this.hasOffer=this.packages.some((element)=>element.offer_ends!=null&&element.offer_ends!=='')} 4this.activeTab='single';if(this.types.includes('family')){this.calculatePrice()} 5if(this.types.length===1&&this.types.includes('family')){this.activeTab='family'} 6this.loading=!1},watch:{activeTab:function(val){setTimeout(()=>{if(val==='single'){this.initSwiper()}},250)},},methods:{calculatePrice(){let total=0;console.log('members',this.members);console.log('data',this.dataPackage);let members=this.members-1;const dataPackageIndex=this.dataPackageMarks.indexOf(this.dataPackage);
6total+=this.priceMatrix[members-1][dataPackageIndex];if(this.roaming){total+=this.roamingPrice} 7this.totalPrice=total},calculatePricePerMember(){return this.totalPrice/this.members},calculateMinPrice(){const today=new Date();const currentYear=today.getFullYear();const currentMonth=today.getMonth();const totalDaysInMonth=new Date(currentYear,currentMonth+1,0).getDate();const remainingDays=totalDaysInMonth-today.getDate()+1;const proratedPrice=(this.totalPrice/totalDaysInMonth)*remainingDays;return proratedPrice},formatPrice(number){return number.toLocaleString('da-DK',{minimumFractionDigits:0,maximumFractionDigits:2,})},changeMembers(){this.calculatePrice()},changeData(){this.calculatePrice()},changeTab(tab){this.activeTab=tab;this.resetSVG()},formatMonth(date){if(!date){return} 8let months=['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'];let day=parseInt(date.split('/')[0]);let month=months[parseInt(date.split('/')[1]-1)];let year=date.split('/')[2];return `${day}. ${month}. ${year}`},openFAQ(index){let item=document.querySelector('.plan-faq-no-'+index);if(item.classList.contains('is-active')){item.classList.remove('is-active')}else{item.classList.add('is-active')}},initSwiper(){if(this.swiperInstance){this.swiperInstance.destroy(!0,!0);this.swiperInstance=null} 9this.swiperInstance=new Swiper(".single-plan-swiper",{direction:"horizontal",spaceBetween:16,slidesPerView:"auto",autoHeight:!0,observer:!0,observeParents:!0,pagination:{el:".swiper-pagination",},freeMode:{enabled:!0,},simulateTouch:!0,mousewheel:{invert:!1,forceToAxis:!0,releaseOnEdges:!0,},})},resetSVG(){setTimeout(()=>{SVGInject(document.querySelectorAll('img.injectable'))},100)},},})})})()
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.