var gtm4wp_form_move_config = {"filledOnly":false}; (()=>{if(!window.gtm4wp_form_move_inited){window.gtm4wp_form_move_inited=!0;const i=window.gtm4wp_form_move_config||{filledOnly:!1},m="input,select,textarea,button,meter,progress",a=["checkbox","radio","button","submit","reset","image"],s=new WeakMap;function t(t){const e=t.tagName?t.tagName.toLowerCase():"";if("textarea"===e||"select"===e)return!0;if("input"!==e)return!1;const n=String(t.type||"text").toLowerCase();return-1===a.indexOf(n)}function e(t){const e=t.value;return""===("string"==typeof e?e:"").trim()}function n(t,e){var n;window[gtm4wp_datalayer_name].push({event:e,inputID:t.getAttribute("id")||"(no input ID)",inputName:t.getAttribute("name")||"(no input name)",inputClass:t.getAttribute("class")||"(no input class)",formID:t.form&&t.form.getAttribute("id")||"(no form ID)",formName:t.form&&t.form.getAttribute("name")||"(no form name)",formClass:t.form&&t.form.getAttribute("class")||"(no form class)",...(n=t.form,n?{"gtm.elementId":n.getAttribute("id")||"","gtm.elementClasses":n.getAttribute("class")||"","gtm.elementUrl":r(n),"gtm.elementTarget":n.getAttribute("target")||""}:{})})}function r(t){try{return new URL(t.getAttribute("action")||"",document.baseURI).href}catch(t){return""}}function o(t){return t&&t.target&&t.target.closest&&t.target.closest(m)}document.addEventListener("focusin",function(r){const m=o(r);m&&(i.filledOnly&&t(m)&&s.set(m,e(m)),n(m,"gtm4wp.formElementEnter"))},!1),document.addEventListener("focusout",function(r){const m=o(r);if(m){if(i.filledOnly&&t(m)){const t=s.get(m);if(s.delete(m),!0!==t||e(m))return}n(m,"gtm4wp.formElementLeave")}},!1)}})(); var gtm4wp_form_move_config = {"filledOnly":false}; (()=>{"use strict";function e(e){let t=e;return"string"==typeof t?(t=parseFloat(t),isNaN(t)&&(t=0)):"number"!=typeof t&&(t=0),t=parseFloat(t.toFixed(2)),t}function t(t,n=["productlink","internal_id"]){try{const o=JSON.parse(t);if(o){if(o.price&&(o.price=e(o.price)),n&&n.length>0){const e=n.length;for(let t=0;tr[e]&&parseInt(r[e].t,10)||0,c=Object.keys(r).sort((e,t)=>s(e)-s(t));for(;c.length>=20;)delete r[c.shift()];const m=Object.keys(r).reduce((e,t)=>Math.max(e,s(t)),0)+1;r[e]={item_list_name:t,t:m},i&&(r[e].item_list_id=i);const _=e=>21+e.length<=3900;let a=encodeURIComponent(JSON.stringify(r));for(;!_(a)&&c.length;)delete r[c.shift()],a=encodeURIComponent(JSON.stringify(r));_(a)&&function(e,t,n,o=!1){const i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),document.cookie=e+"="+t+";expires="+i.toUTCString()+";path=/"+(o?";SameSite=Lax":"")}(n,a,3,!0)},window.gtm4wp_apply_stored_item_list=i,window.gtm4wp_apply_stored_item_list_to_event=function(e,t){try{const n=e&&e.ecommerce&&Array.isArray(e.ecommerce.items)?e.ecommerce.items[0]:null;n&&i(n,t)}catch(e){}return e}})();