1import{F as w,b as d,a as h}from"./formkit.theme-DVbh0M_W.js";import"./vendor-lxhXACKn.js";import"./globalBasic-DCViCoV8.js";class I extends w{constructor(a){super(a),this.id="google-tag-manager",this.group="analytical",this.setup()}setup(){var a,e;window.dataLayer=window.dataLayer||[],!(!this.allowed&&!((a=this.config)!=null&&a.preload))&&(this.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied",functionality_storage:"denied",personalization_storage:"denied"}),function(r,n,c,t,i){r[t]=r[t]||[],r[t].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var s=n.getElementsByTagName(c)[0],o=n.createElement(c),m="";o.async=!0,o.src="https://www.googletagmanager.com/gtm.js?id="+i+m,s.parentNode.insertBefore(o,s)}(window,document,"script","dataLayer",(e=this.config)==null?void 0:e.id),this.allowed&&this.gtag("consent","update",{ad_storage:"granted",ad_user_data:"granted",ad_personalization:"granted",analytics_storage:"granted",functionality_storage:"granted",personalization_storage:"granted"}))}gtag(){window.dataLayer.push(arguments)}conversion(a){var c,t;const e=d(),r=(c=e==null?void 0:e.settings)==null?void 0:c.currency;let n={transaction_id:a.resId,affiliation:"HotelPartner",hotel:(t=e==null?void 0:e.settings)==null?void 0:t.linkHotel,checkin:a.config.arrival,checkout:a.config.departure,value:a.price,currency:r,items:[]};a.rooms.forEach((i,s)=>{var o,m,y,p;n.items.push({item_id:`${i.id}_${i.rateKey}`,item_name:((m=(o=e==null?void 0:e.roomContentByRoomId[i.id])==null?void 0:o.name)==null?void 0:m.en)+" / "+i.name,affiliation:"HotelPartner",currency:r,index:s,item_category:"Room",item_category2:(p=(y=e==null?void 0:e.roomContentByRoomId[i.id])==null?void 0:y.name)==null?void 0:p.en,item_category3:i.name,price:i.price,quantity:i.quantity}),a.extras.forEach((u,f)=>{var g,_;n.items.push({item_id:u.id,item_name:((_=(g=e==null?void 0:e.extrasById["_"+u.id])==null?void 0:g.publicName)==null?void 0:_.en)??"Unknown extra",affiliation:"HotelPartner",currency:r,index:0,item_category:"Extras",price:u.price,quantity:1})})}),window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"purchase",ecommerce:n})}viewItemList(a,e,r){var s;const n=h(),c=d(),t=(s=c==null?void 0:c.settings)==null?void 0:s.currency,i=n.reservation;window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"view_item_list",checkin:i.config.arrival,checkout:i.config.departure,ecommerce:{currency:t||"EUR",item_list_id:e,item_list_name:r,items:a.map(o=>JSON.parse(o.toJson()))}})}viewItem(a,e,r){var t;const n=d(),c=(t=n==null?void 0:n.settings)==null?void 0:t.currency;window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"view_item",ecommerce:{currency:c||"EUR",item_list_id:e,item_list_name:r,items:a.map(i=>JSON.parse(i.toJson()))}})}removeFromCart(a,e,r){var i;const n=d(),c=(i=n==null?void 0:n.settings)==null?void 0:i.currency,t=a.reduce((s,o)=>s+(o.price??0)*o.quantity,0);window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"remove_from_cart",ecommerce:{currency:c||"EUR",item_list_id:e,item_list_name:r,value:t,items:a.map(s=>JSON.parse(s.toJson()))}})}cartUpdate(a){var c;if(a.price<1)return;const e=d(),r=(c=e==null?void 0:e.settings)==null?void 0:c.currency,n=[];a.rooms.forEach(t=>{var i,s,o,m;n.push({item_id:`${t.id}_${t.rateKey}`,item_name:((s=(i=e==null?void 0:e.roomContentByRoomId[t.id])==null?void 0:i.name)==null?void 0:s.en)+" / "+t.name,item_category:"Room",item_category2:(m=(o=e==null?void 0:e.roomContentByRoomId[t.id])==null?void 0:o.name)==null?void 0:m.en,item_category3:t.name,price:t.price,quantity:t.quantity})}),a.extras.forEach(t=>{n.push({item_id:t.id,item_name:t.name,item_category:"Extra",price:t.price,quantity:1})}),window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"add_to_cart",ecommerce:{currency:r||"EUR",value:a.price||0,items:n}})}viewCart(a){var c;if(a.price<1)return;const e=d(),r=(c=e==null?void 0:e.settings)==null?void 0:c.currency,n=[];a.rooms.forEach(t=>{var i,s,o,m;n.push({item_id:`${t.id}_${t.rateKey}`,item_name:((s=(i=e==null?void 0:e.roomContentByRoomId[t.id])==null?void 0:i.name)==null?void 0:s.en)+" / "+t.name,item_category:"Room",item_category2:(m=(o=e==null?void 0:e.roomContentByRoomId[t.id])==null?void 0:o.name)==null?void 0:m.en,item_category3:t.name,price:t.price,quantity:t.quantity})}),a.extras.forEach(t=>{n.push({item_id:t.id,item_name:t.name,item_category:"Extra",price:t.price,quantity:1})}),window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"view_cart",ecommerce:{currency:r||"EUR",value:a.price||0,items:n}})}beginCheckout(a){var c;if(a.price<1)return;const e=d(),r=(c=e==null?void 0:e.settings)==null?void 0:c.currency,n=[];
1a.rooms.forEach(t=>{var i,s,o,m;n.push({item_id:`${t.id}_${t.rateKey}`,item_name:((s=(i=e==null?void 0:e.roomContentByRoomId[t.id])==null?void 0:i.name)==null?void 0:s.en)+" / "+t.name,item_category:"Room",item_category2:(m=(o=e==null?void 0:e.roomContentByRoomId[t.id])==null?void 0:o.name)==null?void 0:m.en,item_category3:t.name,price:t.price,quantity:t.quantity})}),a.extras.forEach(t=>{n.push({item_id:t.id,item_name:t.name,item_category:"Extra",price:t.price,quantity:1})}),window.dataLayer.push({ecommerce:null}),window.dataLayer.push({event:"begin_checkout",ecommerce:{currency:r||"EUR",value:a.price||0,items:n}})}event(a,e,r){var c;const n=d();window.dataLayer.push({action:a,category:r.category??"wbe",nonInteraction:r.nonInteraction??!0,actionLabel:e,wbeHotelID:(c=n==null?void 0:n.settings)==null?void 0:c.linkHotel,event:"wbeEvent"})}pageView(a,e){window.dataLayer.push({event:"virtualPageView",page:{title:e,url:a}})}}export{I as GoogleTagManager};
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.