PageSourceSearch

https://www.wackywarehouse.co.uk/dist/gk-jss-app/js/PubFormPopup.0dc0b60b.js

js wackywarehouse.co.uk collected 2026-10-04 21:48:24 UTC 4,930 bytes, 2 lines download raw bytes

1"use strict";(globalThis["webpackChunkgk_jss_app"]=globalThis["webpackChunkgk_jss_app"]||[]).push([[8684],{8768:(e,o,a)=>{a.d(o,{b:()=>r});var n=a(50953),t=a(20641),p=a(47),l=a(25114);const r=({popupID:e,modalRef:o})=>{const a=(0,l.C)(),r=(0,n.KR)(!1),i=(0,t.EW)((()=>"DIALOG"===o.value?.nodeName)),{activate:c,deactivate:s}=(0,p.t)(o,{allowOutsideClick:!0,escapeDeactivates:!1}),u=()=>{s(),(0,t.dY)((()=>{i.value&&o.value.close(),a.unblockScrolling(),r.value=!1}))},d=()=>{r.value=!0,a.blockScrolling(),(0,t.dY)((()=>{i.value&&o.value.showModal(),c()}))},m=o=>{const a=o.target.closest(`a[href="#${e}"]`);a&&(o.preventDefault(),d())};return(0,t.wB)((()=>r.value),(()=>{i.value||(0,t.dY)((()=>{a.setBackdrop("PopupModal",{enable:r.value,global:!0})}))})),(0,t.sV)((()=>{e&&document.addEventListener("click",m)})),(0,t.xo)((()=>{e&&document.removeEventListener("click",m),i.value||a.setBackdrop("PopupModal",{enable:!1})})),{isModalOpen:r,closeModal:u,openModal:d}}},23720:(e,o,a)=>{a.r(o),a.d(o,{default:()=>P});var n=a(50953),t=a(20641),p=a(90033),l=a(53751),r=a(50258),i=a(94626),c=a(62004),s=a(8768),u=a(17570),d=a(5418),m=a(20739);const _={class:"confirmation-prompt__wrapper"},v={class:"confirmation-prompt__title font-s"},f={class:"confirmation-prompt__description"},b={class:"confirmation-prompt__btns"},k={__name:"ConfirmationPrompt",emits:["accept","cancel"],setup(e,{expose:o,emit:a}){const r=a,i=(0,n.KR)(null),{openModal:c,closeModal:u,isModalOpen:d}=(0,s.b)({modalRef:i}),m=e=>{u(),(0,t.dY)((()=>{r(e)}))};return o({openModal:c,isModalOpen:d}),(e,o)=>(0,n.R1)(d)?((0,t.uX)(),(0,t.CE)("dialog",{key:0,ref_key:"modal",ref:i,class:"confirmation-prompt show-on-load","aria-modal":"true",onKeydown:o[2]||(o[2]=(0,l.jR)((0,l.D$)((e=>m("cancel")),["stop","prevent"]),["esc"]))},[(0,t.Lk)("div",_,[(0,t.Lk)("div",null,[(0,t.Lk)("span",v,(0,p.v_)(e.$t("popup-confirmation-prompt-title")),1),(0,t.Lk)("span",f,(0,p.v_)(e.$t("popup-confirmation-prompt-message")),1)]),(0,t.Lk)("div",b,[(0,t.Lk)("button",{class:"btn btn--secondary",onClick:o[0]||(o[0]=e=>m("accept"))},(0,p.v_)(e.$t("popup-confirmation-prompt-confirm")),1),(0,t.Lk)("button",{class:"btn",onClick:o[1]||(o[1]=e=>m("cancel"))},(0,p.v_)(e.$t("popup-confirmation-prompt-cancel")),1)])])],544)):(0,t.Q3)("",!0)}},g=k,y=g;var h=a(34958),w=a(99475),M=a(30843);const L=["aria-label","onKeydown"],R={class:"pub-form-popup__wrapper"},C={class:"pub-form-popup__header"},I=["aria-label"],O={class:"pub-form-popup__content"},F={__name:"PubFormPopup",props:{fields:{type:Object,default:()=>({})},rendering:{type:Object},params:{type:Object,default:()=>({})}},emits:["click"],setup(e){const o={componentName:"pub_form_popup"},{trackButtonState:a}=(0,h.k)(o),{trackFormStart:_}=(0,w.F)(o),v=(0,M.B)(),{t:f}=(0,r.s9)(),b=(0,u.g)(m.ym),k=(0,d.S)(),g=e,F=(0,n.KR)(null),N=(0,n.KR)(null),P=()=>{N.value&&N.value.openModal()},$=()=>{E()},{closeModal:E,isModalOpen:j}=(0,s.b)({popupID:g.fields.formPopupId?.value,modalRef:F});return(0,t.wB)(j,(e=>{g.fields.formPopupId?.value?.includes("apply")&&(e&&(_("apply_now"),a("apply now"),k({event:"add_to_cart",ecommerce:{items:[{item_name:v.venueName,item_id:v.venueId,item_brand:v.brandName,item_category:"book_a_space",item_category2:"pub",_item_category3:v.pubAddress,item_list_name:"pub_direct",_item_variant:v.venueName,index:1,location_id:v.venueId,affliation:v.venueName,quantity:1,house_id:v.venueId,_house:v.venueName,brand:v.brandName,division:v.segment,pub_name:v.venueName,pub_segment:v.segment,venueId:v.venueId,intent:"venue_search"}]}})),e||b({event:"basic_event",event_name:"form_close",form_type:"apply now",component:"pub_form_popup"}))})),(o,a)=>o.$isPageEditing||(0,n.R1)(j)?((0,t.uX)(),(0,t.CE)("div",{key:0,ref_key:"modal",ref:F,role:"dialog",class:(0,p.C4)(["pub-form-popup","show-on-load",N.value?.isModalOpen&&"pub-form-popup--prompt",o.$isPageEditing&&"pub-form-popup--editor"]),"aria-label":e.fields.title?.value+" - dialog","aria-modal":"true",onKeydown:(0,l.jR)((0,l.D$)(P,["prevent"]),["esc"])},[(0,t.Lk)("div",R,[(0,t.Lk)("div",C,[(0,t.Lk)("button",{class:"pub-form-popup__close","aria-label":(0,n.R1)(f)("close"),onClick:P},[...a[0]||(a[0]=[(0,t.Lk)("i",{class:"icon icon-Close","aria-hidden":"true"},null,-1)])],8,I),(0,t.bF)((0,n.R1)(i.E),{field:e.fields.title,tag:"h2",class:"font-m pub-form-popup__heading"},null,8,["field"])]),(0,t.Lk)("div",O,[(0,t.bF)((0,n.R1)(c.O),{name:"pub-form-popup-placeholder",rendering:e.rendering},null,8,["rendering"])]),(0,t.bF)(y,{ref_key:"confirmationModal",ref:N,onAccept:$},null,512)])],42,L)):(0,t.Q3)("",!0)}},N=F,P=N},99475:(e,o,a)=>{a.d(o,{F:()=>t});var n=a(89967);function t(e={}){const{componentName:o}=e,{registerInteraction:a}=(0,n.qP)(),t=(e,n={})=>(t,p={})=>{a({event:e,component:o||"Form",form_type:t,...n,...p})},p=t("form_start"),l=t("form_completion");return{trackFormStart:p,trackFormCompletion:l}}}}]);
2//# sourceMappingURL=PubFormPopup.0dc0b60b.js.map

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.