1(function(v){typeof define=="function"&&define.amd?define(v):v()})((function(){"use strict";var Ar=Object.defineProperty,Pr=Object.defineProperties;var Rr=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var xr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable;var tt=Math.pow,Ye=(v,y,w)=>y in v?Ar(v,y,{enumerable:!0,configurable:!0,writable:!0,value:w}):v[y]=w,G=(v,y)=>{for(var w in y||(y={}))xr.call(y,w)&&Ye(v,w,y[w]);if(et)for(var w of et(y))Ur.call(y,w)&&Ye(v,w,y[w]);return v},N=(v,y)=>Pr(v,Rr(y));var f=(v,y,w)=>Ye(v,typeof y!="symbol"?y+"":y,w);var L=(v,y,w)=>new Promise((M,Q)=>{var he=S=>{try{Y(w.next(S))}catch(j){Q(j)}},R=S=>{try{Y(w.throw(S))}catch(j){Q(j)}},Y=S=>S.done?M(S.value):Promise.resolve(S.value).then(he,R);Y((w=w.apply(v,y)).next())});function v(r){try{const e=new URL(r),t=e.hostname.toLowerCase(),n=e.pathname.toLowerCase(),i=e.protocol;if(t==="localhost"||y(t)||i==="file:"||i==="content:")return!0;const s=n.split("/").filter(o=>o);return!!(s.includes("wp-admin")||s.includes("wp-login")||n.includes("/wp-login.php")||e.searchParams.has("preview")||t.includes("getyourguide")||t.includes("gygdev.gygtest")||t==="translate.google.com"||t==="translate.googleusercontent.com")}catch(e){return!0}}function y(r){const e=r.split(".");return e.length!==4?!1:e.every(t=>{const n=parseInt(t,10);return!isNaN(n)&&n>=0&&n<=255&&t===String(n)})}function w(r){return!v(r)}function M(r,e,t){const n=new RegExp("([?&])"+r+"=.*?(&|$)","i"),i=t.indexOf("?")!==-1?"&":"?";return t.match(n)?t.replace(n,"$1"+r+"="+e+"$2"):t+i+r+"="+e}function Q(r){const e="deeplink_id=[\\w-]+";return r.replace(new RegExp(`${e}&|&${e}|${e}`),"")}function he(r,e){const t=document.getElementsByTagName("head")[0],n=document.createElement("script");n.async=!0,n.src=r,t.appendChild(n)}const R={VIATOR:"viator",MUSEMENT:"musement",KLOOK:"klook",CIVITATIS:"civitatis",TICKETBAR:"ticketbar",TIQETS:"tiqets",MEDIAVINE:"mediavine"},Y="https://collector.getyourguide.com",S="https://widget.getyourguide.com",j="gyg_visitor_id";class V{}const rt=(r,e,...t)=>{r&&console.info(`%c[PA][${e}]`,"color: orange; font-weight: bold;",...t)};class x extends V{constructor(t,n,i){super();f(this,"name");f(this,"debug");f(this,"querySelector");this.name=t,this.debug=i,this.querySelector=n}scrape(t){return Array.from(t.querySelectorAll(this.querySelector)).filter(i=>!i.getAttribute("data-gyg-scraped"))}markElements(t){t.forEach(n=>{n.setAttribute("data-gyg-scraped",Date.now().toString())})}highlightElements(t){this.debug&&t.forEach(n=>{n.style.border="10px solid #39ff14"})}start(i){return L(this,arguments,function*({document:t,payload:n}){const s=this.scrape(t);return this.markElements(s),this.highlightElements(s),this.processElements(s,n),rt(this.debug,this.name,this.querySelector,`items found: ${s.length}`,s),n})}}const nt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function st(r){return typeof r=="string"&&nt.test(r)}function je(r){if(!st(r))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(r.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(r.slice(9,13),16))>>>8,e&255,(e=parseInt(r.slice(14,18),16))>>>8,e&255,(e=parseInt(r.slice(19,23),16))>>>8,e&255,(e=parseInt(r.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}const I=[];for(let r=0;r<256;++r)I.push((r+256).toString(16).slice(1));function Ve(r,e=0){return(I[r[e+0]]+I[r[e+1]]+I[r[e+2]]+I[r[e+3]]+"-"+I[r[e+4]]+I[r[e+5]]+"-"+I[r[e+6]]+I[r[e+7]]+"-"+I[r[e+8]]+I[r[e+9]]+"-"+I[r[e+10]]+I[r[e+11]]+I[r[e+12]]+I[r[e+13]]+I[r[e+14]]+I[r[e+15]]).toLowerCase()}const it=new Uint8Array(16);function ot(){return crypto.getRandomValues(it)}function at(r){r=unescape(encodeURIComponent(r));const e=new Uint8Array(r.length);for(let t=0;t<r.length;++t)e[t]=r.charCodeAt(t);return e}const ct="6ba7b810-9dad-11d1-80b4-00c04fd430c8",dt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function ut(r,e,t,n,i,s){const o=typeof t=="string"?at(t):t,c=typeof n=="string"?je(n):n;if(typeof n=="string"&&(n=je(n)),(n==null?void 0:n.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+o.length);if(u.set(c),u.set(o,c.length),u=e(u),u[6]=u[6]&15|r,u[8]=u[8]&63|128,i){if(s!=null||(s=0),s<0||s+16>i.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let a=0;a<16;++a)i[s+a]=u[a];return i}return Ve(u)}function fe(r,e,t){return crypto.randomUUID?crypto.randomUUID():lt(r)}function lt(r,e,t){var i,s,o;r=r||{};const n=(o=(s=r.random)!=null?s:(i=r.rng)==null?void 0:i.call(r))!=null?o:ot();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ve(n)}function ht(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function pe(r,e){return r<<e|r>>>32-e}function ft(r){const e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(r.length+1);n.set(r),n[r.length]=128,r=n;const i=r.length/4+2,s=Math.ceil(i/16),o=new Array(s);for(let c=0;c<s;++c){const u=new Uint32Array(16);for(let a=0;a<16;++a)u[a]=r[c*64+a*4]<<24|r[c*64+a*4+1]<<16|r[c*64+a*4+2]<<8|r[c*64+a*4+3];o[c]=u}o[s-1][14]=(r.length-1)*8/tt(2,32),o[s-1][14]=Math.floor(o[s-1][14]),o[s-1][15]=(r.length-1)*8&4294967295;for(let c=0;c<s;++c){const u=new Uint32Array(80);for(let g=0;g<16;++g)u[g]=o[c][g];for(let g=16;g<80;++g)u[g]=pe(u[g-3]^u[g-8]^u[g-14]^u[g-16],1);let a=t[0],d=t[1],_=t[2],m=t[3],B=t[4];for(let g=0;g<80;++g){const O=Math.floor(g/20),H=pe(a,5)+ht(O,d,_,m)+B+e[O]+u[g]>>>0;B=m,m=_,_=pe(d,30)>>>0,d=a,a=H}t[0]=t[0]+a>>>0,t[1]=t[1]+d>>>0,t[2]=t[2]+_>>>0,t[3]=t[3]+m>>>0,t[4]=t[4]+B>>>0}return Uint8Array.of(t[0]>>24,t[0]>>16,t[0]>>8,t[0],t[1]>>24,t[1]>>16,t[1]>>8,t[1],t[2]>>24,t[2]>>16,t[2]>>8,t[2],t[3]>>24,t[3]>>16,t[3]>>8,t[3],t[4]>>24,t[4]>>16,t[4]>>8,t[4])}function F(r,e,t,n){return ut(80,ft,r,e,t,n)}F.DNS=ct,F.URL=dt;function z(r,e){try{e&&localStorage.setItem(r,e),window._GYG.localStorage=N(G({},window._GYG.localStorage),{[r]:e})}catch(t){window._GYG.localStorage=N(G({},window._GYG.localStorage),{[r]:e})}}function Fe(r){try{if(localStorage.getItem(r))return localStorage.getItem(r)}catch(e){if(window._GYG.localStorage)return window._GYG.localStorage[r]}return null}function pt(r){try{localStorage.removeItem(r)}catch(e){window._GYG.localStorage&&delete window._GYG.localStorage[r]}}const gt="6ba7b811-9dad-11d1-80b4-00c04fd430c8",ge=r=>{try{const e=new URL(r),t=(e.hostname+e.pathname).replace(/^www\./,"").replace(/\/$/,"");return F(t,gt)}catch(e){return}},q=class q extends x{constructor(){super("GYG-Deeplinks",q.GYG_LINK_QUERY,window._GYG.debug)}getBoundingClientRect(e){const{width:t,height:n,x:i,y:s}=e.getBoundingClientRect();return{x:i!==void 0?Math.round(i):void 0,y:s!==void 0?Math.round(s):void 0,width:t!==void 0?Math.round(t):void 0,height:n!==void 0?Math.round(n):void 0}}cleanUrl(e){var n;const t=e;if(t&&t.searchParams.has("cmp")){const i=(n=t.searchParams.get("cmp"))==null?void 0:n.split("_amcid")[0];i&&t.searchParams.set("cmp",i)}return t&&t.searchParams.has("recommended_activities")&&t.searchParams.delete("recommended_activities"),t.toString()}isDirectGYGLink(e){const t=e.getAttribute("href")||"";return/^https?:\/\/(www\.)?getyourguide/.test(t)}processElements(e,t){e.filter(this.isDirectGYGLink).filter(n=>n.closest("[data-gyg-widget]")===null).forEach(n=>{var g;const i=this.getBoundingClientRect(n),s=n.getAttribute("href")||"",o=new URL(s),c=o.searchParams.get("partner_id");let u,a;c?z("partner_id",c):t.header.partner_hash_code&&(o.searchParams.set("partner_id",t.header.partner_hash_code),u=t.header.partner_hash_code,t.header.partner_cmp&&!o.searchParams.has("cmp")&&(o.searchParams.set("cmp",t.header.partner_cmp),a=t.header.partner_cmp));const d=this.cleanUrl(o),_=F(d,q.NAMESPACE),m=ge(t.header.url),B=N(G({},i),{url:d,text:(g=n.textContent)==null?void 0:g.trim(),deeplink_id:_,page_id:m});this.attachIds(n,_,m,u,a),t.deeplinks=t.deeplinks||[],t.deeplinks.push(B)})}attachIds(e,t,n,i,s){let o=e.getAttribute("href")||"";o&&(this.isFixTrackDefined()||(o=M("deeplink_id",t,o),n&&(o=M("page_id",n,o)),i&&(o=M("partner_id",i,o)),s&&(o=M("cmp",s,o))),e.setAttribute("href",o.toString()))}isFixTrackDefined(){return window.hasOwnProperty("FIX")&&window.FIX.hasOwnProperty("track")}};f(q,"GYG_LINK_QUERY",'a[href*="getyourguide."]'),f(q,"NAMESPACE","6ba7b811-9dad-11d1-80b4-00c04fd430c8");let me=q;const X=class X extends x{constructor(){super("VIATOR-Deeplinks",X.VIATOR_LINK_QUERY,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s,o,c;const i={name:R.VIATOR,url:(s=n.getAttribute("href"))!=null?s:"",text:(c=(o=n.textContent)==null?void 0:o.trim())!=null?c:""};t.competitor_deeplinks=t.competitor_deeplinks||[],t.competitor_deeplinks.push(i)}),t}};f(X,"VIATOR_LINK_QUERY",'a[href*="www.partner.viator.com"]');let _e=X;const J=class J extends x{constructor(){super("TICKETBAR-Deeplinks",J.TICKETBAR_LINK_QUERY,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s,o,c;const i={name:R.TICKETBAR,url:(s=n.getAttribute("href"))!=null?s:"",text:(c=(o=n.textContent)==null?void 0:o.trim())!=null?c:""};t.competitor_deeplinks=t.competitor_deeplinks||[],t.competitor_deeplinks.push(i)}),t}};f(J,"TICKETBAR_LINK_QUERY",'a[href*="ticketbar.eu"]');let ye=J;const Z=class Z extends x{constructor(){super("MUSEMENT-Deeplinks",Z.MUSEMENT_LINK_QUERY,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s,o,c;const i={name:R.MUSEMENT,url:(s=n.getAttribute("href"))!=null?s:"",text:(c=(o=n.textContent)==null?void 0:o.trim())!=null?c:""};t.competitor_deeplinks=t.competitor_deeplinks||[],t.competitor_deeplinks.push(i)}),t}};f(Z,"MUSEMENT_LINK_QUERY",'a[href*="www.musement.com"]');let we=Z;const ee=class ee extends x{constructor(){super("CIVITATIS-Deeplinks",ee.CIVITATIS_LINK_QUERY,window._GYG.debug)}processElements(e,t){e.forEach(n=>{var s,o,c;const i={name:R.CIVITATIS,url:(s=n.getAttribute("href"))!=null?s:"",text:(c=(o=n.textContent)==null?void 0:o.trim())!=null?c:""};t.competitor_deeplinks=t.competitor_deeplinks||[],t.competitor_deeplinks.push(i)})}};f(ee,"CIVITATIS_LINK_QUERY",'a[href*="www.civitatis.com"]');let Ee=ee;const te=class te extends x{constructor(){super("TIQETS-Deeplinks",te.TIQETS_LINK_QUERY,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s,o,c;const i={name:R.TIQETS,url:(s=n.getAttribute("href"))!=null?s:"",text:(c=(o=n.textContent)==null?void 0:o.trim())!=null?c:""};t.competitor_deeplinks=t.competitor_deeplinks||[],t.competitor_deeplinks.push(i)}),t}};f(te,"TIQETS_LINK_QUERY",'a[href*="www.tiqets.com"]');let ve=te;const re=class re extends x{constructor(){super("KLOOK-Deeplinks",re.KLOOK_LINK_QUERY,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s,o,c;const i={name:R.KLOOK,url:(s=n.getAttribute("href"))!=null?s:"",text:(c=(o=n.textContent)==null?void 0:o.trim())!=null?c:""};t.competitor_deeplinks=t.competitor_deeplinks||[],t.competitor_deeplinks.push(i)}),t}};f(re,"KLOOK_LINK_QUERY",'a[href*="www.klook.com"]');let be=re;const mt=[me,_e,ye,we,Ee,ve,be],_t="0e7c8e4a-453a-4a3f-aa76-186f61d75001",yt=r=>{const e=new URL(r),t=e.pathname.replace(/\/$/,"").split("/").pop().split(".");let n=t[0];n==="activites"&&(n="activities"),n!=="activities"&&n!=="city"&&n!=="availability"&&n!=="activities-auto"&&n!=="map"&&(n="custom");let i=t[1];i==="jpg"&&(i="jpeg");const s={p:e.searchParams.has("partner_id")?e.searchParams.get("partner_id"):e.pathname.split("/")[1],w:n,f:i,m:e.searchParams.has("cmp")?e.searchParams.get("cmp"):void 0,q:e.searchParams.has("q")?e.searchParams.get("q"):void 0,i:e.searchParams.has("iata")?e.searchParams.get("iata"):void 0,d:e.searchParams.has("location_id")?e.searchParams.get("location_id"):void 0,c:e.searchParams.has("currency")?e.
1searchParams.get("currency"):void 0,l:e.searchParams.has("locale_code")?e.searchParams.get("locale_code"):void 0,n:e.searchParams.has("number_of_items")?Number(e.searchParams.get("number_of_items")):void 0,t:e.searchParams.has("tour_ids")?e.searchParams.get("tour_ids"):void 0,u:e.searchParams.has("tour_id")?e.searchParams.get("tour_id"):void 0,h:e.searchParams.has("theme")?e.searchParams.get("theme"):void 0,v:e.searchParams.has("variant")?e.searchParams.get("variant"):void 0,e:e.searchParams.has("excluded_tour_ids")?e.searchParams.get("excluded_tour_ids"):void 0,a:e.searchParams.has("lat")?e.searchParams.get("lat"):void 0,o:e.searchParams.has("lon")?e.searchParams.get("lon"):void 0};return F(JSON.stringify(s),_t)},wt="data-gyg-widget-created",Et="data-gyg-widget-rendered",vt="data-gyg-widget-ttfb",bt="data-gyg-widget-fcp",Ke="data-gyg-widget-lcp",ne=class ne extends x{constructor(){super("GYG-Widget",ne.GYG_WIDGET_QUERY,window._GYG.debug)}extractIds(e){return e?e.split(",").map(n=>parseInt(n)).filter(n=>!Number.isNaN(n)):null}parseNumber(e){return e?parseInt(e):null}parseFloat(e){return e?parseFloat(e):null}getBoundingClientRect(e){const{width:t,height:n,x:i,y:s}=e.getBoundingClientRect();return{x:i!==void 0?Math.round(i):0,y:s!==void 0?Math.round(s):0,width:t!==void 0?Math.round(t):0,height:n!==void 0?Math.round(n):0}}getWidgetType(e){let t=e.pathname.split("/")[2].split(".")[0];return t==="activites"&&(t="activities"),t!=="activities"&&t!=="city"&&t!=="availability"&&t!=="activities-auto"&&t!=="map"&&(t="custom"),t}getWidgetFormat(e){const t=e.pathname.split("/")[2].split(".");let n="frame";return t.length>1&&(n=t[1],n==="jpg"&&(n="jpeg")),n}getWidgetRenderingTime(e){const t=e.parentElement;if(!t)return;const n=e.getAttribute(Et),i=t.getAttribute(wt);if(!(!n||!i))return parseInt(n,10)-parseInt(i,10)}getWidgetFcp(e){const t=e.getAttribute(bt);return t?this.parseFloat(t):null}getWidgetTtfb(e){const t=e.getAttribute(vt);return t?this.parseFloat(t):null}getWidgetLcp(e){const t=e.getAttribute(Ke);return t?this.parseFloat(t):null}processElements(e,t){return e.forEach(n=>{const i=this.getBoundingClientRect(n),s=n.getAttribute("src");if(!s)return;const o=new URL(s),c=o.searchParams.get("partner_id"),u=this.parseFloat(o.searchParams.get("lat")),a=this.parseFloat(o.searchParams.get("lon")),d=N(G({},i),{type:this.getWidgetType(o),rendering_time:this.getWidgetRenderingTime(n),fcp:this.getWidgetFcp(n),ttfb:this.getWidgetTtfb(n),lcp:this.getWidgetLcp(n),widget_parameters:{campaign:o.searchParams.get("cmp"),currency:o.searchParams.get("currency"),excluded_tour_ids:this.extractIds(o.searchParams.get("excluded_tour_ids")),iata:o.searchParams.get("iata"),locale_code:o.searchParams.get("locale_code"),number_of_items:this.parseNumber(o.searchParams.get("number_of_items")),partner_hash_code:c,query:o.searchParams.get("q"),tour_ids:this.getTourIdsFromSearchParams(o.searchParams),widget_id:yt(s),geo_location:typeof u=="number"&&typeof a=="number"?{latitude:u,longitude:a}:null,format:this.getWidgetFormat(o)}});c&&z("partner_id",c),t.widgets=t.widgets||[],t.widgets.push(d)}),t}getTourIdsFromSearchParams(e){const t=this.extractIds(e.get("tour_ids"));if(!t){const n=this.parseNumber(e.get("tour_id"));return n?[n]:null}return t}};f(ne,"GYG_WIDGET_QUERY",`iframe[src^="https://widget.getyourguide.com"][${Ke}]`);let Ie=ne;const se=class se extends x{constructor(){super("CIVITATIS-CompetitorWidgets",se.CIVITATIS_LINK_QUERY,window._GYG.debug)}processElements(e,t){e.forEach(n=>{var s;const i={name:R.CIVITATIS,url:(s=n.getAttribute("src"))!=null?s:""};t.competitor_widgets=t.competitor_widgets||[],t.competitor_widgets.push(i)})}};f(se,"CIVITATIS_LINK_QUERY",'iframe[src*="www.civitatis.com"]');let Te=se;const ie=class ie extends x{constructor(){super("KLOOK-CompetitorWidgets",ie.KLOOK_LINK_QUERY,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s;const i={name:R.KLOOK,url:(s=n.getAttribute("src"))!=null?s:""};t.competitor_widgets=t.competitor_widgets||[],t.competitor_widgets.push(i)}),t}};f(ie,"KLOOK_LINK_QUERY",'iframe[src*="affiliate.klook.com"]');let Ae=ie;const oe=class oe extends x{constructor(){super("Ticketbar-Compet
1itorWidgets",oe.TICKETBAR_WIDGET,window._GYG.debug)}processElements(e,t){return e.forEach(()=>{const n={name:R.TICKETBAR,url:""};t.competitor_widgets=t.competitor_widgets||[],t.competitor_widgets.push(n)}),t}};f(oe,"TICKETBAR_WIDGET",'div[class*="Ticketbar-Widget"]');let Pe=oe;const ae=class ae extends x{constructor(){super("Tiqets-CompetitorWidgets",ae.TIQETS_WIDGET,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s;const i={name:R.TIQETS,url:(s=n.getAttribute("src"))!=null?s:""};t.competitor_widgets=t.competitor_widgets||[],t.competitor_widgets.push(i)}),t}};f(ae,"TIQETS_WIDGET",'iframe[src*="www.tiqets.com/widgets"]');let Re=ae;const ce=class ce extends x{constructor(){super("Viator-CompetitorWidgets",ce.VIATOR_WIDGET,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{var s;const i={name:R.VIATOR,url:(s=n.getAttribute("src"))!=null?s:""};t.competitor_widgets=t.competitor_widgets||[],t.competitor_widgets.push(i)}),t}};f(ce,"VIATOR_WIDGET",'iframe[src*="www.viator.com/orion/widget"]');let xe=ce;const de=class de extends x{constructor(){super("Mediavine-CompetitorWidgets",de.MEDIAVINE_WIDGET,window._GYG.debug)}processElements(e,t){return e.forEach(n=>{const i=n.getAttribute("data-slotid"),s=`${document.baseURI}#slot=${i}`,o={name:R.MEDIAVINE,url:s};t.competitor_widgets=t.competitor_widgets||[],t.competitor_widgets.push(o)}),t}};f(de,"MEDIAVINE_WIDGET",'div[class*="mv-ad-box"]');let Ue=de;const It=[Ie,Te,Ae,Pe,Re,xe,Ue],Tt=[...mt,...It];class At extends V{start(t){return L(this,arguments,function*({payload:e}){const{offsetWidth:n,scrollHeight:i}=document.body,{fontFamily:s,fontSize:o,lineHeight:c}=window.getComputedStyle(document.body),{navigationStart:u,unloadEventStart:a,unloadEventEnd:d,redirectStart:_,redirectEnd:m,fetchStart:B,domainLookupStart:g,domainLookupEnd:O,connectStart:H,connectEnd:l,secureConnectionStart:h,requestStart:p,responseStart:U,responseEnd:b,domLoading:Me,domInteractive:wr,domContentLoadedEventStart:Er,domContentLoadedEventEnd:vr,domComplete:br,loadEventStart:Ir,loadEventEnd:Tr}=performance.timing;return e.page={width:n,height:i,page_title:document.title,page_font_family:s,page_font_size:o,page_line_height:c,performance:{navigation_start:u,unload_event_start:a,unload_event_end:d,redirect_start:_,redirect_end:m,fetch_start:B,domain_lookup_start:g,domain_lookup_end:O,connect_start:H,connect_end:l,secure_connection_start:h!=null?h:0,request_start:p,response_start:U,response_end:b,dom_loading:Me,dom_interactive:wr,dom_content_loaded_event_start:Er,dom_content_loaded_event_end:vr,dom_complete:br,load_event_start:Ir,load_event_end:Tr}},e})}}class Pt extends V{getOS(){let e="Unknown OS";return navigator.appVersion.indexOf("Win")!==-1&&(e="Windows"),navigator.appVersion.indexOf("Mac")!==-1&&(e="MacOS"),navigator.appVersion.indexOf("X11")!==-1&&(e="UNIX"),navigator.appVersion.indexOf("Linux")!==-1&&(e="Linux"),e}getPartnerHashCode(){let e=null;const t=document.querySelector('script[src*="getyourguide.com/dist/pa."]');return t&&(e=t.getAttribute("data-gyg-partner-id"),e&&z("partner_id",e)),e||(e=Fe("partner_id")),e==null?void 0:e.toUpperCase()}getPartnerCmp(){var t;const e=document.querySelector('script[src*="getyourguide.com/dist/pa."]');return(t=e==null?void 0:e.getAttribute("data-gyg-partner-cmp"))!=null?t:null}isMobileDevice(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}getPlatform(){return this.isMobileDevice()?"mweb":"desktop"}start(t){return L(this,arguments,function*({payload:e}){const{userAgent:n=null,language:i=null}=navigator,{referrer:s=null}=document,{href:o=null,origin:c=null}=window.location;return e.header={platform:this.getPlatform(),domain:c,url:o,user_agent:n,referrer_domain:s,os:this.getOS(),partner_hash_code:this.getPartnerHashCode(),partner_cmp:this.getPartnerCmp(),accept_language:[i]},e})}}function K(r,e){if(!e)return"";let t="; "+r;return e===!0?t:t+"="+e}function Rt(r){if(typeof r.expires=="number"){const e=Math.min(Date.now()+r.expires*864e5,864e13);r.expires=new Date(e)}return K("Expires",r.expires?r.expires.toUTCString():"")+K("Domain",r.domain)+K("Path",r.path)+K("Secure",r.secure)+K("Partitioned",r.partitioned)+K("SameSite",r.sameSite)}function xt(r,e,t){return encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decode
1URIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)+Rt(t)}function Ut(r){let e={};const t=r?r.split("; "):[];for(let n of t){const i=n.split("=");let s=i.slice(1).join("=");s[0]==='"'&&(s=s.slice(1,-1));try{const o=decodeURIComponent(i[0]);e[o]=s.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}catch(o){}}return e}function St(){return Ut(document.cookie)}function Ot(r){return St()[r]}function Gt(r,e,t){document.cookie=xt(r,e,G({path:"/"},t))}var T=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof global!="undefined"&&global||{},P={searchParams:"URLSearchParams"in T,iterable:"Symbol"in T&&"iterator"in Symbol,blob:"FileReader"in T&&"Blob"in T&&(function(){try{return new Blob,!0}catch(r){return!1}})(),formData:"FormData"in T,arrayBuffer:"ArrayBuffer"in T};function Ct(r){return r&&DataView.prototype.isPrototypeOf(r)}if(P.arrayBuffer)var Lt=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Bt=ArrayBuffer.isView||function(r){return r&&Lt.indexOf(Object.prototype.toString.call(r))>-1};function W(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function Se(r){return typeof r!="string"&&(r=String(r)),r}function Oe(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return P.iterable&&(e[Symbol.iterator]=function(){return e}),e}function E(r){this.map={},r instanceof E?r.forEach(function(e,t){this.append(t,e)},this):Array.isArray(r)?r.forEach(function(e){if(e.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(e){this.append(e,r[e])},this)}E.prototype.append=function(r,e){r=W(r),e=Se(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},E.prototype.delete=function(r){delete this.map[W(r)]},E.prototype.get=function(r){return r=W(r),this.has(r)?this.map[r]:null},E.prototype.has=function(r){return this.map.hasOwnProperty(W(r))},E.prototype.set=function(r,e){this.map[W(r)]=Se(e)},E.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},E.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),Oe(r)},E.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),Oe(r)},E.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),Oe(r)},P.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function Ge(r){if(!r._noBody){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}}function We(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function Dt(r){var e=new FileReader,t=We(e);return e.readAsArrayBuffer(r),t}function kt(r){var e=new FileReader,t=We(e),n=/charset=([A-Za-z0-9_-]+)/.exec(r.type),i=n?n[1]:"utf-8";return e.readAsText(r,i),t}function Nt(r){for(var e=new Uint8Array(r),t=new Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return t.join("")}function $e(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function qe(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:P.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:P.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:P.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():P.arrayBuffer&&P.blob&&Ct(r)?(this._bodyArrayBuffer=$e(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):P.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||Bt(r))?this._bodyArrayBuffer=$e(r):this._bodyText=r=Object.prototype.toString.call(r):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof r=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):P.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},P.blob&&(this.blob=function(){var r=Ge(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=Ge(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(P.blob)return this.blob().then(Dt);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var r=Ge(this);if(r)return r;if(this._bodyBlob)return kt(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Nt(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},P.formData&&(this.formData=function(){return this.text().then(jt)}),this.json=function(){return this.text().then(JSON.parse)},this}var Mt=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function Yt(r){var e=r.toUpperCase();return Mt.indexOf(e)>-1?e:r}function D(r,e){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object c
1onstructor cannot be called as a function.');e=e||{};var t=e.body;if(r instanceof D){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new E(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!t&&r._bodyInit!=null&&(t=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new E(e.headers)),this.method=Yt(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||(function(){if("AbortController"in T){var s=new AbortController;return s.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}D.prototype.clone=function(){return new D(this,{body:this._bodyInit})};function jt(r){var e=new FormData;return r.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),s=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(s))}}),e}function Vt(r){var e=new E,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(` 2`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),s=i.shift().trim();if(s){var o=i.join(":").trim();try{e.append(s,o)}catch(c){console.warn("Response "+c.message)}}}),e}qe.call(D.prototype);function C(r,e){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new E(e.headers),this.url=e.url||"",this._initBody(r)}qe.call(C.prototype),C.prototype.clone=function(){return new C(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},C.error=function(){var r=new C(null,{status:200,statusText:""});return r.ok=!1,r.status=0,r.type="error",r};var Ft=[301,302,303,307,308];C.redirect=function(r,e){if(Ft.indexOf(e)===-1)throw new RangeError("Invalid status code");return new C(null,{status:e,headers:{location:r}})};var k=T.DOMException;try{new k}catch(r){k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},k.prototype=Object.create(Error.prototype),k.prototype.constructor=k}function He(r,e){return new Promise(function(t,n){var i=new D(r,e);if(i.signal&&i.signal.aborted)return n(new k("Aborted","AbortError"));var s=new XMLHttpRequest;function o(){s.abort()}s.onload=function(){var a={statusText:s.statusText,headers:Vt(s.getAllResponseHeaders()||"")};i.url.indexOf("file://")===0&&(s.status<200||s.status>599)?a.status=200:a.status=s.status,a.url="responseURL"in s?s.responseURL:a.headers.get("X-Request-URL");var d="response"in s?s.response:s.responseText;setTimeout(function(){t(new C(d,a))},0)},s.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},s.onabort=function(){setTimeout(function(){n(new k("Aborted","AbortError"))},0)};function c(a){try{return a===""&&T.location.href?T.location.href:a}catch(d){return a}}if(s.open(i.method,c(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(P.blob?s.responseType="blob":P.arrayBuffer&&(s.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof E||T.Headers&&e.headers instanceof T.Headers)){var u=[];
2Object.getOwnPropertyNames(e.headers).forEach(function(a){u.push(W(a)),s.setRequestHeader(a,Se(e.headers[a]))}),i.headers.forEach(function(a,d){u.indexOf(d)===-1&&s.setRequestHeader(d,a)})}else i.headers.forEach(function(a,d){s.setRequestHeader(d,a)});i.signal&&(i.signal.addEventListener("abort",o),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",o)}),s.send(typeof i._bodyInit=="undefined"?null:i._bodyInit)})}He.polyfill=!0,T.fetch||(T.fetch=He,T.Headers=E,T.Request=D,T.Response=C);const Kt=r=>(Object.prototype.hasOwnProperty.call(r,"GYG")||(r.GYG=r.GYG||{}),r.GYG.visitorIdPromise||(r.GYG.visitorIdPromise=fetch(`${S}/gnikcart`,{credentials:"include"}).then(e=>e.json()).catch(()=>{const e=fe().replace(/-/g,"").toUpperCase().substring(0,32);r.GYG.visitorIdPromise=Promise.resolve({visitor_id:e})})),r.GYG.visitorIdPromise);class Wt extends V{getVisitorId(){return L(this,null,function*(){let e=sessionStorage.getItem(j)||"";if(!e){const{visitor_id:t}=yield Kt(window);t&&sessionStorage.setItem(j,t),e=t}return e})}getSessionId(e){return e=e||Ot("session_id"),e||(e=fe(),Gt("session_id",e)),e}start(n){return L(this,arguments,function*({sessionId:e,payload:t}){const{language:i=null}=navigator;return t.user={visitor_id:yield this.getVisitorId(),session_id:this.getSessionId(e),locale_code:i},t})}}const ue=class ue extends V{start(t){return L(this,arguments,function*({payload:e}){return e.event_properties={uuid:fe(),sent_by:ue.SENT_BY},e})}};f(ue,"SENT_BY","PartnerAnalyzer");let Ce=ue;class $t extends V{isScriptLoadedViaWidget(e){return e.dataset.gygScriptOrigin==="widget"}getScriptOriginType(e){const t=e.some(this.isScriptLoadedViaWidget),n=!e.every(this.isScriptLoadedViaWidget);return t&&n?"BOTH":t?"WIDGET":"DIRECT"}getScripts(){const e=window._GYG.env==="production"?`${S}/dist/pa.umd.production.min.js`:"dist/pa.umd.development.js";return Array.from(document.querySelectorAll(`script[src*="${e}"]`))}start(t){return L(this,arguments,function*({payload:e}){const n=this.getScriptOriginType(this.getScripts());return e.script_origin=n,e})}}const qt=[...[Ce,Wt,Pt,At,$t],...Tt];function Qe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Le={exports:{}},ze;function Ht(){return ze||(ze=1,(function(r){(function(){function e(a,d,_){var m;document.createEvent?(m=document.createEvent("HTMLEvents"),m.initEvent(d,!0,!0)):document.createEventObject&&(m=document.createEventObject(),m.eventType=d),m.state=_,m.eventName=d,a.dispatchEvent?a.dispatchEvent(m):a.fireEvent&&htmlEvents["on"+d]?a.fireEvent("on"+m.eventType,m):a[d]?a[d]():a["on"+d]&&a["on"+d]()}function t(a,d,_){a.addEventListener?a.addEventListener(d,_,!1):a.attachEvent&&htmlEvents["on"+d]?a.attachEvent("on"+d,_):a["on"+d]=_}function n(a,d,_){a.removeventListener?a.removeEventListener(d,_,!1):a.detachEvent&&htmlEvents["on"+d]?a.detachEvent("on"+d,_):a["on"+d]=null}function i(){return typeof window!="undefined"&&window.history&&"pushState"in window.history}if(i()){var s=window.history,o=s.pushState;s.pushState=function(a){var d=o.apply(s,arguments);return e(window,"pushstate",a),e(window,"changestate",a),d};var c=s.replaceState;s.replaceState=function(a){var d=c.apply(s,arguments);return e(window,"replacestate",a),e(window,"changestate",a),d},t(window,"popstate",function(a){e(window,"changestate",a.state)})}var u={isHistorySupported:i,addEventListener:t,removeEventListener:n,triggerEvent:e};i()&&(window.HistoryEvents=u),r.exports=u})()}
2)(Le)),Le.exports}var Qt=Ht();const zt=Qe(Qt),A=[];for(let r=0;r<256;++r)A.push((r+256).toString(16).slice(1));function Xt(r,e=0){return(A[r[e+0]]+A[r[e+1]]+A[r[e+2]]+A[r[e+3]]+"-"+A[r[e+4]]+A[r[e+5]]+"-"+A[r[e+6]]+A[r[e+7]]+"-"+A[r[e+8]]+A[r[e+9]]+"-"+A[r[e+10]]+A[r[e+11]]+A[r[e+12]]+A[r[e+13]]+A[r[e+14]]+A[r[e+15]]).toLowerCase()}const Jt=new Uint8Array(16);function Zt(){return crypto.getRandomValues(Jt)}function er(r,e,t){return crypto.randomUUID?crypto.randomUUID():tr(r)}function tr(r,e,t){var i,s,o;r=r||{};const n=(o=(s=r.random)!=null?s:(i=r.rng)==null?void 0:i.call(r))!=null?o:Zt();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xt(n)}var $=()=>typeof window<"u",Xe="text/plain",rr="?version=2",nr=2e3,sr=(r,e,t)=>L(null,null,function*(){let n=r.concat(rr);if($()&&navigator.sendBeacon){let c={type:Xe,"x-events-version":"v2"},u=new Blob([JSON.stringify(e)],c);return navigator.sendBeacon(n,u)}let i=typeof AbortController<"u"?new AbortController:void 0,s=setTimeout(()=>i==null?void 0:i.abort(),nr),o=yield fetch(n,{method:"POST",mode:"cors",cache:"no-cache",headers:G({"Content-Type":Xe},t?{"x-request-id":t}:void 0),keepalive:!0,body:JSON.stringify(e),signal:i==null?void 0:i.signal});return clearTimeout(s),o}),ir=class{constructor(r){f(this,"_config");this._config=r}log(r,e){var t,n,i;return!e||!this._config?Promise.resolve():(e.producer_properties={common:this.autoPopulateCommonProperties((t=e.producer_properties)==null?void 0:t.common),web_frontend:this.autoPopulateWebFrontendProperties((n=e.producer_properties)==null?void 0:n.web_frontend),context:(i=e.producer_properties)==null?void 0:i.context},this._config.isDebug&&console.log(`Would send this event to ${this.getEventUrl(r)}:`,e),sr(this.getEventUrl(r),e,this._config.xRequestId))}autoPopulateCommonProperties(r){var e,t;return N(G({},r!=null?r:{}),{sent_by:(e=this._config.sentBy)!=null?e:"",timestamp:new Date().toISOString(),producer_id:er(),tracking_method:"collector",application_version:(t=this._config.applicationVersion)!=null?t:""})}autoPopulateWebFrontendProperties(r){var e,t,n,i,s,o,c,u,a,d;return N(G({},r!=null?r:{}),{platform:(e=this._config.platform)!=null?e:"",user_agent:$()?navigator.userAgent:(t=this._config.userAgent)!=null?t:"",view_id:(i=(n=this._config)==null?void 0:n.viewId)!=null?i:"",container_name:(c=(o=r==null?void 0:r.container_name)!=null?o:(s=this._config)==null?void 0:s.containerName)!=null?c:"",visitor_id:this._config.visitorId,domain:$()?window.location.host:(u=this._config.domain)!=null?u:"",url:$()?window.location.href:(a=this._config.url)!=null?a:"",referrer_url:$()?document.referrer:(d=this._config.referrerUrl)!=null?d:"",screen_width:$()?Math.floor(window.innerWidth):0})}getEventUrl(r){return`${this._config.collectorUrl}/track/${r}`}};const or=(r,e,t)=>{try{const n={isDebug:!1,collectorUrl:r.collector_url,sentBy:r.sent_by,applicationVersion:r.version,platform:r.platform,viewId:r.view_id,containerName:r.container_name,userAgent:r.userAgent,domain:r.domain,url:r.url,referrerUrl:r.referrer_url,visitorId:r.visitor_id};new ir(n).log(t,e)}catch(n){console.error("AEL ERROR",n)}};class Je{constructor(e,t,n=Y){f(this,"document");f(this,"dataRepository");f(this,"baseUrl");this.dataRepository=e,this.document=t,this.baseUrl=n}sendEvent(e){window.fetch(this.collectorUrl,{method:"POST",headers:{"Content-type":"text/plain"},body:JSON.stringify(e),keepalive:!0})}sendEventV2(e,t){var i,s,o,c,u;const n={collector_url:this.baseUrl,version:this.dataRepository.version,platform:(i=this.dataRepository.header)==null?void 0:i.platform,view_id:"",container_name:this.dataRepository.container_name,userAgent:(s=this.dataRepository.header)==null?void 0:s.user_agent,domain:this.document.domain,url:this.document.URL,referrer_url:(o=this.dataRepository.header)==null?void 0:o.referrer_url,visitor_id:(c=this.dataRepository.user)==null?void 0:c.visitor_id,sent_by:(u=this.dataRepository.event_properties)==null?void 0:u.sent_by};or(n,e,t)}}const ar="PartnerAnalyzerPageRequest";class cr extends Je{constructor(){super(...arguments);f(this,"_visitorId","");f(this,"_sessionId","")}get visitorId(){return this._visitorId}set visitorId(t){this._visitorId=t}get sessionId(){return this._sessionId}set sessionId(t){this._sessionId=t}get collectorUrl(){return this.baseUrl+"/track/PartnerAnalyzerPageRequest?format=json&strict=true"}cleanupDataRepository(){delete this.dataRepository.competitor_deeplinks,delete this.dataRepository.competitor_widgets,delete this.dataRepository.deeplinks,delete this.dataRepository.widgets}collectData(t){return L(this,null,function*(){yield Promise.all(qt.map(n=>new n().start({document:t,payload:this.dataRepository,visitorId:this.visitorId,sessionId:this.sessionId})))})}onNewPageEvent(){if(!this.dataRepository.user||!this.dataRepository.header){console.log("PA: Data hasn't been collected yet, skipping event");return}const t=this.getEventV2Payload();try{this.sendEventV2(t,ar),this.cleanupDataRepository()}catch(n){console.error("PA ERROR",n)}}addEventListeners(){const t=i=>{window.addEventListener(i,this.onNewPageEvent.bind(this),{capture:!0})},n="onpagehide"in window?"pagehide":"unload";t(n),zt.isHistorySupported()&&t("changestate")}addPostMessageListener(){window.addEventListener("message",t=>{const{sessionId:n=null}=t.data;this.sessionId=n},{once:!0,passive:!0,capture:!0})}start(){this.addEventListeners(),this.addPostMessageListener(),setInterval(()=>{if(this.document.readyState==="complete")try{this.collectData(document)}catch(t){}},1e3)}getEventV2Payload(){const t=this.getWidgetsV2(),n=ge(this.dataRepository.header.url);return{customer_id:this.dataRepository.user.customer_id,partner_hash_code:this.dataRepository.header.partner_hash_code,partner_id:this.dataRepository.header.partner_id,page_id:n,page:this.dataRepository.page,widgets:t,deeplinks:this.dataRepository.deeplinks,competitor_widgets:this.dataRepository.competitor_widgets,c
2ompetitor_deeplinks:this.dataRepository.competitor_deeplinks,version:this.dataRepository.version,script_origin:this.dataRepository.script_origin?this.dataRepository.script_origin.toString():""}}getWidgetV2Parameters(t){const n=t.widget_parameters&&this.getGeoLocationIfPresent(t.widget_parameters.geo_location),i=t.widget_parameters&&{widget_id:t.widget_parameters.widget_id,campaign:this.getParameterIfPresent(t.widget_parameters.campaign),currency:this.getParameterIfPresent(t.widget_parameters.currency),excluded_tour_ids:this.getParameterIfPresent(t.widget_parameters.excluded_tour_ids),iata:this.getParameterIfPresent(t.widget_parameters.iata),location_id:this.getParameterIfPresent(t.widget_parameters.location_id),locale_code:this.getParameterIfPresent(t.widget_parameters.locale_code),number_of_items:this.getParameterIfPresent(t.widget_parameters.number_of_items),partner_hash_code:this.getParameterIfPresent(t.widget_parameters.partner_hash_code),query:this.getParameterIfPresent(t.widget_parameters.query),version:this.getParameterIfPresent(t.widget_parameters.version),release_version:this.getParameterIfPresent(t.widget_parameters.release_version),format:this.getParameterIfPresent(t.widget_parameters.format),tour_ids:this.getParameterIfPresent(t.widget_parameters.tour_ids)};return n&&(i.geo_location=n),i}getGeoLocationIfPresent(t){if(t&&t.latitude&&t.longitude)return{latitude:t.latitude,longitude:t.longitude}}getParameterIfPresent(t){return t||void 0}getWidgetsV2(){const t=new Array;return this.dataRepository.widgets&&this.dataRepository.widgets.forEach(n=>{const s={widget_parameters:this.getWidgetV2Parameters(n),x:n.x,y:n.y,width:n.width,height:n.height,type:n.type,rendering_time:n.rendering_time,fcp:n.fcp,ttfb:n.ttfb,lcp:n.lcp};t.push(s)}),t}}const dr="PartnerDeeplinkClick",le=class le extends Je{get collectorUrl(){return this.baseUrl+"/track/PartnerDeeplinkClick?format=json&strict=true"}getAllGYGDeeplinks(){return this.document.querySelectorAll('a[href*="getyourguide."]')}handleOnClick(e){const t=this.getEventV2Payload(e);try{this.sendEventV2(t,dr)}catch(n){console.error("PDCE ERROR",n)}}getEventV2Payload(e){const t=this.getHREFFromEvent(e),n=ge(this.dataRepository.header.url);return{customer_id:this.dataRepository.user.customer_id,partner_hash_code:this.dataRepository.header.partner_hash_code,partner_id:this.dataRepository.header.partner_id,page_id:n,page:this.dataRepository.page,deeplink_url:t,deeplink_id:F(t,le.NAMESPACE)}}getHREFFromEvent(e){const t=e.target;return Q(t.href)}trackDeeplink(e,t){e.target="_blank",e.addEventListener("click",t)}start(){this.getAllGYGDeeplinks().forEach(e=>this.trackDeeplink(e,this.handleOnClick.bind(this)))}};f(le,"NAMESPACE","6ba7b811-9dad-11d1-80b4-00c04fd430c8");let Be=le;var De,Ze;function ur(){if(Ze)return De;Ze=1;var r=function(h){return e(h)&&!t(h)};function e(l){return!!l&&typeof l=="object"}function t(l){var h=Object.prototype.toString.call(l);return h==="[object RegExp]"||h==="[object Date]"||s(l)}var n=typeof Symbol=="function"&&Symbol.for,i=n?Symbol.for("react.element"):60103;function s(l){return l.$$typeof===i}function o(l){return Array.isArray(l)?[]:{}}function c(l,h){return h.clone!==!1&&h.isMergeableObject(l)?O(o(l),l,h):l}function u(l,h,p){return l.concat(h).map(function(U){return c(U,p)})}function a(l,h){if(!h.customMerge)return O;var p=h.customMerge(l);return typeof p=="function"?p:O}function d(l){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(l).filter(function(h){return Object.propertyIsEnumerable.call(l,h)}):[]}function _(l){return Object.keys(l).concat(d(l))}function m(l,h){try{return h in l}catch(p){return!1}}function B(l,h){return m(l,h)&&!(Object.hasOwnProperty.call(l,h)&&Object.propertyIsEnumerable.call(l,h))}function g(l,h,p){var U={};return p.isMergeableObject(l)&&_(l).forEach(function(b){U[b]=c(l[b],p)}),_(h).forEach(function(b){B(l,b)||(m(l,b)&&p.isMergeableObject(h[b])?U[b]=a(b,p)(l[b],h[b],p):U[b]=c(h[b],p))}),U}function O(l,h,p){p=p||{},p.arrayMerge=p.arrayMerge||u,p.isMergeableObject=p.isMergeableObject||r,p.cloneUnlessOtherwiseSpecified=c;var U=Array.isArray(h),b=Array.isArray(l),Me=U===b;return Me?U?p.arrayMerge(l,h,p):g(l,h,p):c(h,p)}O.all=function(h,p){if(!Array.isArray(h))throw new Error("first argument should be an array");return h.reduce(function(U,b){return O(U,b,p)},{})};var H=O;return De=H,De}var lr=ur();const hr=Qe(lr);class ke{constructor(e,t,n=Y){f(this,"document");f(this,"dataRepository");f(this,"baseUrl");this.dataRepository=e,this.document=t,this.baseUrl=n}sendEvent(e,t){const n=hr(this.getUIEventBase(),t);n&&n.event_properties&&(n.event_properties.event_name=e),n&&n.metadata&&(n.metadata=JSON.stringify(n.metadata)),window.fetch(this.collectorUrl,{method:"POST",headers:{"Content-type":"text/plain"},body:JSON.stringify(n),keepalive:!0})}getUIEventBase(){return{event_properties:G({},this.dataRepository.event_properties),container_name:this.dataRepository.container_name,user:this.dataRepository.user,header:G({},this.dataRepository.header)}}}function Ne(r,e){window.addEventListener("message",t=>{const n=t==null?void 0:t.data;try{if(n&&n.messageType==="event_logger"){const{eventType:i}=n;if(!i||i.toLowerCase()!==r.toLowerCase())return;e(n)}}catch(i){console.error(`Failed to send ${r} with Partner Analyzer`)}})}class fr extends ke{constructor(){super(...arguments);f(this,"eventType","UIClick")}get collectorUrl(){return this.baseUrl+`/track/${this.eventType}?format=json&strict=true`}sendEventCallback(t){this.sendEvent(t.eventType,t.eventData)}start(){Ne(this.eventType,this.sendEventCallback.bind(this))}}class pr extends ke{constructor(){super(...arguments);f(this,"eventType","UIShow")}get collectorUrl(){return this.baseUrl+`/track/${this.eventType}?format=json&strict=true`}sendEventCallback(t){this.sendEvent(t.eventType,t.eventData)}start(){Ne(this.eventType,this.sendEventCallback.bind(this))}}class gr extends ke{constructor(){super(...arguments);f(this,"eventType","UIEnteredDisplayPort")}get collectorUrl(){return this.baseUrl+`/track/${this.eventType}?format=json&strict=true`}sendEventCallback(t){this.sendEvent(t.eventType,t.eventData)}start(){Ne(this.eventType,this.sendEventCallback.bind(this))}}const mr=[cr,Be,fr,pr,gr];class _r{constructor(){f(this,"dataRepository",{container_name:"partner-analyzer",version:"2c83ca9eecdce169bc5228be37b652d63670dbf7"});window._GYG=window._GYG||{};const e="pa_debug",n=new URL(window.location.href).searchParams.get(e);n==="1"?z(e,n):n==="0"&&pt(e),window._GYG.debug=Fe(e)==="1",mr.forEach(i=>
2{new i(this.dataRepository,document).start()})}}function yr(){new _r}(function(){if(!window.gygPAStatus){if(window.gygPAStatus="loading",window._GYG=window._GYG||{},window._GYG.env="production",window._GYG.loadOnlyPA!==!0){window._GYG.env==="test"&&console.log("Loading widget script");const r=`${S}/pw/latest/client-loader/widget.js`;document.querySelector(`script[src="${r}"]`)||he(r)}w(document.URL)&&(window.gygPAStatus="ok",yr())}})()}))
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.