{"version":3,"sources":["webpack:///./app/packs/entrypoints/booking/new_order_capture.js","webpack:///./app/packs/entrypoints/home_page.js"],"names":["newBookingModalVueInstance","Vue","Vuetify","axios","library","faCircleCheck","faCircleXmark","faCircle","faMinusSquare","faPlusSquare","addEventListener","instantQuoteBtn","document","getElementsByClassName","bookingModalEl","getElementById","bookingModalCloseBtn","token","localStorage","getItem","window","location","origin","then","response","setItem","data","jwt","history","pushState","path","getElementsByTagName","style","overflow","__x","$data","isBookingDialogOpen","$destroy","$el","remove","appendChild","Object","assign","createElement","id","i","length","headers","Authorization","artist","href","fontAwesomeComponent","FontAwesomeIcon","newGigModalElementContainer","querySelector","getAttribute","Accept","el","vuetify","theme","themes","light","primary","secondary","render","h","NewBooking","components","new_booking","includes","role","click","removeItem","require","SwiperCore","Navigation","swiperConfig","allowTouchMove","slidesPerView","spaceBetween","observer","observeParents","rebuildOnUpdate","breakpoints","swiperConfig1","navigation","nextEl","prevEl","swiperConfig2","swiperConfig3","swiper1","Swiper","swiper2","swiper3","avatarSize","width","querySelectorAll","forEach","avatarDiv","height","update","on","page","type","swiper","currentArtistPage","parseInt","params","artists","appendSlide","loadMoreArtistsPage","typeWords","value","split","Typed","strings","smartBackspace","typeSpeed","loop","attr","fadeOut","fadeOutClass","newBookingBtns","res","catch","error","header","this","parentElement","classList","toggle"],"mappings":"mMAkBA,IAAIA,EAJJC,cAAQC,KACRD,2BAAuBE,IACvBC,SAAYC,MAAeC,MAAeC,MAAUC,MAAeC,OAInEC,iBAAiB,oBAAoB,KACnC,MAAMC,EAAkBC,SAASC,uBAAuB,qBAClDC,EAAiBF,SAASG,eAAe,uBACzCC,EAAuBJ,SAASG,eAAe,2BAC/CE,EAAQC,aAAaC,QAAQ,QAAS,IAC9B,OAAVF,GAA4B,KAAVA,GACpBd,QAAU,GAAGiB,OAAOC,SAASC,8BAC1BC,MAAKC,IACJN,aAAaO,QAAQ,QAASD,EAASE,KAAKC,IAAI,IAGtDX,EAAqBN,iBAAiB,SAA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F,GAA4B,KAAVA,GACtBd,QAAU,GAAGiB,OAAOC,SAASC,8BAC1BC,MAAKC,IACJN,aAAaO,QAAQ,QAASD,EAASE,KAAKC,IAAI,IAGpD,IAAK,IAAIkB,EAAI,EAAGA,EAAI6E,EAAe5E,OAAQD,IACzC6E,EAAe7E,GAAGnC,iBAAiB,SAAS,WAC1C,IAAIqC,EAAU,CACZA,QAAS,CACPC,cAAe9B,aAAaC,QAAQ,QAAS,MAGjDhB,SAAW,GAAGiB,OAAOC,SAASC,sCAAuCyB,GAClExB,MAAKoG,IACJzG,aAAaO,QAAQ,eAAgB,sBACrCL,OAAOC,SAAS6B,KAAO,qBAAqB,IAC3C0E,OAAMC,IACP3G,aAAaO,QAAQ,eAAgB,sBACrCL,OAAOC,SAAS6B,KAAO,qBAAqB,GAElD,IAGFtC,SAASoF,iBAAiB,kBAAkBC,SAAQ6B,IAClDA,EAAOpH,iBAAiB,SAAS,WACfqH,KAAKC,cACbC,UAAUC,OAAO,YAC3B,GAAE,GACF,G","file":"js/home_page-1b0096e8df4de0bcec66.js","sourcesContent":["// New order capture flow\nimport Vue from 'vue'\n\nimport axios from \"axios\";\n\nimport Vuetify from \"vuetify\";\nimport './../../stylesheets/vuetify.scss'\n\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'\nimport { library } from '@fortawesome/fontawesome-svg-core'\nimport { faCircle, faCircleCheck, faCircleXmark, faMinusSquare, faPlusSquare } from '@fortawesome/free-solid-svg-icons'\n\nimport NewBooking from \"./../../vue/booking/NewBooking.vue\";\n\nVue.use(Vuetify)\nVue.prototype.$axios = axios\nlibrary.add(faCircleCheck, faCircleXmark, faCircle, faMinusSquare, faPlusSquare)\n\nlet newBookingModalVueInstance\n\naddEventListener('DOMContentLoaded', () => {\n const instantQuoteBtn = document.getElementsByClassName(\"get-instant-quote\")\n const bookingModalEl = document.getElementById(\"instant-quote-modal\")\n const bookingModalCloseBtn = document.getElementById(\"instant-quote-close-btn\")\n const token = localStorage.getItem('token', '')\n if (token === null || token === '') {\n axios.get(`${window.location.origin}/api_tokens/new.json`)\n .then(response => {\n localStorage.setItem('token', response.data.jwt)\n })\n }\n bookingModalCloseBtn.addEventListener('click', () => {\n window.history.pushState({ path: window.location.origin }, '', window.location.origin)\n let body = document.getElementsByTagName(\"body\")[0]\n body.style.overflow = \"unset\"\n if (bookingModalEl) {\n bookingModalEl.__x.$data.isBookingDialogOpen = false\n }\n newBookingModalVueInstance.$destroy()\n newBookingModalVueInstance.$el.remove()\n\n document.getElementById('instant-quote-modal-body').appendChild(\n Object.assign(\n document.createElement('div'),\n { id : 'vue-new-booking' }\n )\n )\n })\n \n for (var i = 0; i < instantQuoteBtn.length; i++) {\n instantQuoteBtn[i].addEventListener('click', () => {\n axios.get(`${window.location.origin}/v3/users/profile`, { headers: {\n Authorization: localStorage.getItem('token', ''),\n }\n })\n .then((response) => {\n if (!response.data.artist) {\n const fontAwesomeComponent = Vue.component('font-awesome-icon', FontAwesomeIcon)\n const newGigModalElementContainer = document.getElementById('vue-new-booking')\n if (newGigModalElementContainer != null) {\n const guestToken = localStorage.getItem(\"guest_token\", \"\");\n if (guestToken) {\n Vue.prototype.$axios.defaults.baseURL = ''\n\n Vue.prototype.$axios.defaults.headers.common = {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content'),\n Accept: 'application/json',\n 'Content-Type': 'application/json; charset=utf-8'\n }\n let body = document.getElementsByTagName(\"body\")[0]\n body.style.overflow = \"hidden\"\n newBookingModalVueInstance = new Vue({\n el: newGigModalElementContainer,\n vuetify: new Vuetify({\n theme: {\n themes: {\n light: {\n primary: '#ff8141',\n secondary: '#FFF3EC'\n },\n }\n }\n }),\n render: h => h(NewBooking, {}),\n components: {\n NewBooking,\n fontAwesomeComponent\n }\n })\n }\n else {\n axios.post(`${window.location.origin}/v3/event_bookings/clear.json`, { headers: {\n Authorization: localStorage.getItem('token', ''),\n }\n })\n .then(() => {\n Vue.prototype.$axios.defaults.baseURL = ''\n\n Vue.prototype.$axios.defaults.headers.common = {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content'),\n Accept: 'application/json',\n 'Content-Type': 'application/json; charset=utf-8'\n }\n let body = document.getElementsByTagName(\"body\")[0]\n body.style.overflow = \"hidden\"\n newBookingModalVueInstance = new Vue({\n el: newGigModalElementContainer,\n vuetify: new Vuetify({\n theme: {\n themes: {\n light: {\n primary: '#ff8141',\n secondary: '#FFF3EC'\n },\n }\n }\n }),\n render: h => h(NewBooking, {}),\n components: {\n NewBooking,\n fontAwesomeComponent\n }\n })\n })\n }\n \n if (bookingModalEl) {\n bookingModalEl.__x.$data.isBookingDialogOpen = true\n }\n }\n } else {\n window.location.href = '/dashboard'\n }\n })\n })\n axios.get(`${window.location.origin}/v3/users/profile`, { headers: {\n Authorization: localStorage.getItem('token', ''),\n }\n })\n .then((response) => {\n let new_booking = window.location.href.includes(\"instant_quote\")\n const guestToken = localStorage.getItem(\"guest_token\", \"\");\n if((guestToken && response.data.role === 'regular') || new_booking) {\n instantQuoteBtn[0].click();\n }\n else {\n localStorage.removeItem(\"guest_token\");\n }\n })\n }\n})\n// End","import axios from 'axios'\n\nimport '../stylesheets/bootstrap5_grid.scss'\n\nimport Swiper from 'swiper'\nimport SwiperCore, { Navigation } from 'swiper/core'\nimport 'swiper/swiper.scss'\nimport Typed from 'typed.js'\n\nrequire('./../entrypoints/booking/new_order_capture')\nrequire('sharer.js')\n\ndocument.addEventListener('DOMContentLoaded', () => {\n SwiperCore.use([Navigation])\n var swiperConfig = {\n allowTouchMove: true,\n slidesPerView: 2,\n spaceBetween: 10,\n observer: true,\n observeParents: true,\n rebuildOnUpdate: true,\n // Responsive breakpoints\n breakpoints: {\n // when window width is >= 320px\n 320: {\n slidesPerView: 2,\n spaceBetween: 15\n },\n // when window width is >= 480px\n 480: {\n slidesPerView: 3,\n spaceBetween: 15\n },\n // when window width is >= 640px\n 640: {\n slidesPerView: 4,\n spaceBetween: 15\n },\n // when window width is >= 640px\n 780: {\n slidesPerView: 5,\n spaceBetween: 15\n },\n // when window width is >= 640px\n 960: {\n slidesPerView: 6,\n spaceBetween: 15\n }\n }\n }\n var swiperConfig1 = {\n ...swiperConfig,\n navigation: {\n nextEl: \".top-next1\",\n prevEl: \".top-prev1\",\n }\n }\n var swiperConfig2 = {\n ...swiperConfig,\n navigation: {\n nextEl: \".top-next2\",\n prevEl: \".top-prev2\",\n }\n }\n var swiperConfig3 = {\n ...swiperConfig,\n navigation: {\n nextEl: \".top-next3\",\n prevEl: \".top-prev3\",\n }\n }\n const swiper1 = new Swiper(\".swiper1\", swiperConfig1)\n const swiper2 = new Swiper(\".swiper2\", swiperConfig2)\n const swiper3 = new Swiper(\".swiper3\", swiperConfig3)\n\n if (document.querySelector(\".sm-gallery__avatar-item\")) {\n let avatarSize = document.querySelector(\".sm-gallery__avatar-item\").width\n document.querySelectorAll(\".sm-gallery__avatar-item\").forEach((avatarDiv) => {\n avatarDiv.style.height = avatarSize + 'px'\n })\n }\n\n swiper3.update()\n swiper2.update()\n swiper1.update()\n\n swiper1.on('realIndexChange', function () {\n loadMoreArtistsPage('currentFeaturedArtistsPage', 'featured_artists', swiper1);\n });\n})\n\nfunction loadMoreArtistsPage(page, type, swiper) {\n const currentArtistPage = localStorage.getItem(page);\n if (currentArtistPage !== '0') {\n localStorage.setItem(page, parseInt(currentArtistPage) + 1);\n axios.get(`${window.location.origin}/load_more_artists`, {\n params: {\n type: type,\n page: localStorage.getItem(page)\n }\n })\n .then(response => {\n const artists = response.data.artists;\n if (artists === '') {\n localStorage.setItem(page, 0);\n } else {\n swiper.appendSlide(response.data.artists)\n }\n });\n }\n}\n\naddEventListener('DOMContentLoaded', () => {\n var typeWords = document.querySelector(\"#type_words\").value.split(\",\")\n var typed = new Typed('.hero-search__input', {\n strings: typeWords,\n smartBackspace: true, // Default value\n typeSpeed: 200,\n loop: true,\n attr: 'placeholder',\n fadeOut: true,\n fadeOutClass: 'home-typed-fade-out',\n });\n})\n\naddEventListener('DOMContentLoaded', () => {\n localStorage.setItem('currentFeaturedArtistsPage', 1);\n // let country = localStorage.getItem('location_country')\n // window.addEventListener(\"storage\", function (event) {\n // if (localStorage.getItem('location_country') !== country) {\n // location.reload();\n // }\n // })\n})\n\naddEventListener('DOMContentLoaded', () => {\n let newBookingBtns = document.getElementsByClassName(\"get-new-quote\")\n let token = localStorage.getItem('token', '')\n if (token === null || token === '') {\n axios.get(`${window.location.origin}/api_tokens/new.json`)\n .then(response => {\n localStorage.setItem('token', response.data.jwt)\n })\n }\n for (var i = 0; i < newBookingBtns.length; i++) {\n newBookingBtns[i].addEventListener('click', function () {\n let headers = {\n headers: {\n Authorization: localStorage.getItem('token', ''),\n }\n }\n axios.post(`${window.location.origin}/v3/event_bookings/clear.json`, headers)\n .then(res => {\n localStorage.setItem('booking_step', 'select_artist_type')\n window.location.href = '/event_bookings/new'\n }).catch(error => {\n localStorage.setItem('booking_step', 'select_artist_type')\n window.location.href = '/event_bookings/new'\n })\n })\n }\n // For Faqs collapsible feature\n document.querySelectorAll('.faqs-question').forEach(header => {\n header.addEventListener('click', function() {\n const faqItem = this.parentElement;\n faqItem.classList.toggle('collapsed');\n });\n });\n})\n"],"sourceRoot":""}