{"version":3,"file":"product_tour/product_tour.js","sources":["webpack://fusion-360/./source/product_tour/product_tour.scss","webpack://fusion-360/./source/product_tour/product_tour.js","webpack://fusion-360/webpack/bootstrap","webpack://fusion-360/webpack/runtime/make namespace object","webpack://fusion-360/webpack/startup"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","var data = {\n containers: document.querySelectorAll(\".wp-f360-product-tour\"),\n prefix_string: \"wp-f360-multi-tab-\",\n selected_string: \"wp-f360-multi-tab-selected\",\n hide_string: \"hide\",\n show_pane_on_init: 0,\n tabs_string: \"wp-f360-multi-tab li\",\n tab_panes_string: \"wp-f360-multi-tab-pane\",\n tab_panes_children_string: \"wp-f360-multi-tab-pane-child\",\n animate_which_pane: 'a',\n animate_string: \"wp-f360-multi-tab-animate-down\",\n controls_string: \"wp-f360-multi-tab-controls span\",\n suffix_strings: [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\",\n \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"]\n}\n\nvar wp_multi_tabs = {\n init: function (data) {\n var children, container_tabs, container_tabs_panes;\n\n data.containers.forEach(function(container, index) {\n if (index <= data.containers.length) {\n container.classList.add(`${data.prefix_string}${data.suffix_strings[index]}`);\n }\n container_tabs = container.querySelectorAll(`.${data.tabs_string}`);\n container_tabs.forEach(function (tab, index) {\n if (index <= container_tabs.length) {\n tab.classList.add(`${data.prefix_string}${data.suffix_strings[index]}`);\n }\n });\n container_tabs_panes = container.querySelectorAll(`.${data.tab_panes_string}`);\n container_tabs_panes.forEach(function (pane, index) {\n pane.classList.add(`${data.prefix_string}${data.suffix_strings[index]}`);\n children = pane.querySelectorAll(`.${data.tab_panes_children_string}`);\n children.forEach(function (child, index) {\n child.classList.add(`${data.prefix_string}${data.suffix_strings[index]}`);\n child.classList.add(`${data.hide_string}`);\n });\n document.querySelectorAll(`.${data.prefix_string}${data.suffix_strings[data.show_pane_on_init]}`).forEach(function (pane) {\n pane.classList.remove(`${data.hide_string}`);\n });\n });\n });\n },\n events: function (data) {\n var selected_tab, tab_pane, grab_all, children, container_tabs, container_tabs_panes, container_tabs_controls;\n\n var video_panes = document.querySelectorAll('.wp-f360-multi-tab-pane.wp-f360-multi-tab-controls.wp-f360-multi-tab-b');\n video_panes.forEach(function(video_pane) {\n var wistia_id = video_pane.firstElementChild.querySelector('.wistia_embed a').getAttribute('wistia-embed-id');\n video_pane.firstElementChild.querySelector('.wistia_embed').classList.add(`wistia_async_${wistia_id}`);\n\n var video_pane_children_hrefs = video_pane.querySelectorAll('.wp-f360-multi-tab-pane-child a');\n video_pane_children_hrefs.forEach(function(video_pane_child_href) {\n video_pane_child_href.addEventListener('click', function(event){\n event.preventDefault();\n });\n });\n });\n\n data.containers.forEach(function(container) {\n container_tabs = container.querySelectorAll(`.${data.tabs_string}`);\n container_tabs.forEach(function (tab) {\n tab.addEventListener(\"click\", function (event) {\n if (!event.target.parentElement.classList.contains(`${data.selected_string}`)) {\n tab.classList.forEach(function (c) {\n if (c.indexOf(`${data.prefix_string}`) !== -1) {\n selected_tab = c;\n }\n });\n container_tabs_panes = container.querySelectorAll(`.${data.tab_panes_string}`);\n container_tabs_panes.forEach(function (pane) {\n children = pane.querySelectorAll(`.${data.tab_panes_children_string}`);\n children.forEach(function (child) {\n child.classList.forEach(function (c) {\n if (c.indexOf(`${selected_tab}`) !== -1) {\n tab_pane = c;\n }\n });\n });\n });\n grab_all = container.querySelectorAll(`[class*='${data.prefix_string}']`);\n grab_all.forEach(function (elem) {\n\n elem.classList.remove(`${data.selected_string}`);\n elem.classList.remove(`${data.animate_string}`);\n });\n container.querySelectorAll(`.${selected_tab}`).forEach(function (elem) {\n elem.classList.add(`${data.selected_string}`)\n });\n if (window.innerWidth <= 1024) {\n\n // container.querySelector(`.${data.tabs_string}.${data.selected_string}`).scrollIntoView({\n // behavior: 'smooth',\n // inline: 'center',\n // block: 'start'\n // });\n }\n container_tabs_panes.forEach(function (pane) {\n children = pane.querySelectorAll(`.${data.tab_panes_children_string}`);\n children.forEach(function (child) {\n if (!child.classList.contains(`${data.hide_string}`)) {\n child.classList.add(`${data.hide_string}`);\n }\n });\n });\n container_tabs_panes.forEach(function (pane) {\n pane.querySelectorAll(`.${data.tab_panes_children_string}`).forEach(function (child) {\n if (child.classList.contains(tab_pane)) {\n child.classList.remove(`${data.hide_string}`);\n child.classList.add(`${data.selected_string}`);\n }\n });\n });\n container_tabs_panes.forEach(function (pane) {\n if (pane.classList.contains(`${data.prefix_string}${data.animate_which_pane}`)) {\n pane.querySelectorAll(`.${data.tab_panes_children_string}`).forEach(function (child) {\n if (child.classList.contains(tab_pane)) {\n child.classList.add(`${data.animate_string}`);\n }\n });\n }\n });\n container_tabs_panes.forEach(function(pane) {\n pane.querySelectorAll(`.${data.tab_panes_children_string}`).forEach(function(child) {\n if (child.classList.contains(tab_pane)) {\n if (child.querySelector('div a') !== null) {\n if (child.querySelector('div a').getAttribute('wistia-embed-id') !== null) {\n var wistia_id = child.querySelector('div a').getAttribute('wistia-embed-id');\n child.querySelector('div a').parentElement.classList.add(`wistia_async_${wistia_id}`);\n }\n }\n // if (child.parentElement.classList.contains('wp-f360-multi-tab-b'))\n // var wistia_id = child.querySelector('div a').getAttribute('wistia-embed-id');\n // child.querySelector('div a').parentElement.classList.add(`wistia_async_${wistia_id}`);\n }\n });\n });\n }\n });\n });\n\n var clickEvent = new Event('click');\n var sib;\n var sib_dist_left, sib_dist_right;\n\n container_tabs_controls = container.querySelectorAll(`.${data.controls_string}`);\n container_tabs_controls.forEach(function(control) {\n control.addEventListener(\"click\", function (event) {\n if (event.target.classList.contains(\"wp-f360-multi-tab-control-next\")) {\n container.querySelectorAll('.wp-f360-multi-tab li').forEach(function(elem){\n if (!elem.getAttribute('data-scrollLeft')) {\n elem.setAttribute('data-scrollLeft', elem.getBoundingClientRect().left);\n }\n if (elem.classList.contains(`${data.selected_string}`)) {\n if (elem.nextElementSibling) sib = elem.nextElementSibling;\n }\n });\n if (!sib.classList.contains(`${data.selected_string}`)) sib.dispatchEvent(clickEvent);\n sib_dist_left = parseInt(sib.getAttribute('data-scrollLeft'));\n\n container.querySelector(`.wp-f360-multi-tab`).scrollLeft = sib_dist_left - 16;\n }\n if (event.target.classList.contains(\"wp-f360-multi-tab-control-previous\")) {\n container.querySelectorAll('.wp-f360-multi-tab li').forEach(function(elem){\n if (elem.classList.contains(`${data.selected_string}`)) {\n if (elem.previousElementSibling) {\n sib = elem.previousElementSibling;\n }\n }\n });\n if (!sib.classList.contains(`${data.selected_string}`)) sib.dispatchEvent(clickEvent);\n sib_dist_left = parseInt(sib.getAttribute('data-scrollLeft'));\n\n container.querySelector('.wp-f360-multi-tab').scrollLeft = sib_dist_left - 16;\n }\n });\n });\n });\n }\n};\n\nwp_multi_tabs.init(data);\nwp_multi_tabs.events(data);\n\nvar posters = document.querySelectorAll('.wp-f360-multi-tab-pane .wistia_embed img');\nposters.forEach(function(elem){\n var parent = elem.parentElement;\n parent.parentElement.style.backgroundImage = `url('${elem.src}')`;\n parent.parentElement.classList.add('wp-f360-reflection');\n});\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module\n__webpack_require__(\"./source/product_tour/product_tour.js\");\n__webpack_require__(\"./source/product_tour/product_tour.scss\");\n// This entry module used 'exports' so it can't be inlined\n"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;A;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;AChMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACNA;AACA;AACA;AACA;AACA;;A","sourceRoot":""}