/home/blackyak/www/wordpress/wp-content/plugins/wp-travel-engine/dist/blocks/index.js
(()=>{var e,t,r={6826:()=>{(()=>{const e=(e,t)=>{e.forEach((e=>e.classList.remove("active"))),t.classList.add("active")},t=e=>e.getBoundingClientRect().top+window.scrollY,r=document.querySelectorAll(".wpte-block_tab-button");r&&r.forEach(((t,o)=>{const n=t.closest(".wpte-block_tab-container").querySelectorAll(".wp-block-wptravelenginetripblocks-tab-content");0===o&&(t.classList.add("active"),n[0].removeAttribute("style")),t.addEventListener("click",(t=>{const o=t.target;n.forEach((e=>e.style.display="none"));const i=document.getElementById(o.dataset.id);i.style.display="block",e(r,o),window.innerWidth>767&&i.scrollIntoView({behavior:"smooth"})}))}));const o=document.querySelectorAll(".tab-direction-top.tab-is-sticky");window.onscroll=()=>{const r=window.scrollY;o&&window.innerWidth>767&&o.forEach((o=>{const n=o.querySelectorAll(".wp-block-wptravelenginetripblocks-tab-content"),i=Math.round(t(o)),a=o.querySelector(".wpte-block_tabs");r>=i?a.classList.add("fixed-top"):a.classList.remove("fixed-top"),n.forEach((o=>{const n=Math.round(t(o));if(r>=n){const t=document.querySelector(`[data-id="${o.getAttribute("id")}"]`),r=t.closest("ul").querySelectorAll(".wpte-block_tab-button");e(r,t)}}))}))};const n=document.querySelectorAll(".wpte-block_tab-content");n&&n.forEach((e=>{e.querySelectorAll(".wp-block-wptravelenginetripblocks-tab-content").forEach(((e,t)=>{e.style.order=t+1}))}))})()}},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.m=r,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>635===e?"chunks/635.js":185===e?"chunks/185.js":void 0,n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="wp-travel-engine:",n.l=(r,o,i,a)=>{if(e[r])e[r].push(o);else{var l,c;if(void 0!==i)for(var s=document.getElementsByTagName("script"),d=0;d<s.length;d++){var u=s[d];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+i){l=u;break}}l||(c=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",t+i),l.src=r),e[r]=[o];var b=(t,o)=>{l.onerror=l.onload=null,clearTimeout(p);var n=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),t)return t(o)},p=setTimeout(b.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=b.bind(null,l.onerror),l.onload=b.bind(null,l.onload),c&&document.head.appendChild(l)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e+"../"})(),(()=>{var e={831:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=i);var a=n.p+n.u(t),l=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",l.name="ChunkLoadError",l.type=i,l.request=a,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,[a,l,c]=r,s=0;if(a.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);c&&c(n)}for(t&&t(r);s<a.length;s++)i=a[s],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=globalThis.webpackChunkwp_travel_engine=globalThis.webpackChunkwp_travel_engine||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";function e(e){return document.querySelectorAll(".wp-block-"+e).length>0}n(6826),new MutationObserver((function(){e("wptravelenginetripblocks-itinerary-altitude-chart")&&n.e(635).then(n.bind(n,635)).then((({initAltitudeChart:e})=>{e(chartData)})).catch((e=>{console.error("Error importing altitudeChart: ",e)})),e("wptravelenginetripblocks-faqs")&&n.e(185).then(n.bind(n,5185)).then((({initFaqToggle:e})=>{e()})).catch((e=>{console.error("Error importing faqToggle: ",e)}))})).observe(document.body,{childList:!0,subtree:!0});var t=document.querySelector(".wpte-bf-btn.wte-book-now"),r=document.querySelector(".load-more"),o=r?parseInt(r.getAttribute("data-trip-id")):NaN;o=isNaN(o)?1:o;var i=document.querySelectorAll(".book-btn");i&&i.forEach((function(e){e.setAttribute("disabled","disabled"),e.classList.add("btn-loading")})),document.addEventListener("bookingCalendarReady",(()=>{i.forEach((function(e){e.removeAttribute("disabled"),e.classList.remove("btn-loading")})),t||jQuery.fn.fancybox&&jQuery(".wte-fsd-list-booknow-btn").fancybox({type:"inline",src:"#wte__booking",baseClass:"wte-fb-popup",touch:!1})}))})()})();