PageSourceSearch

https://apps.herni-svet.cz/

js herni-svet.cz collected 2026-10-05 21:34:08 UTC 62,012 bytes, 1 lines download raw bytes

1let dp_eventsToCheck=["add_to_cart","view_item","login","sign_up","view_cart","begin_checkout","remove_from_cart","view_item_list","select_item","add_to_wishlist","view_promotion","select_promotion","add_payment_info","add_shipping_info","refund"],dp_eventsForUpgates={"cart.add":"add_to_cart","cart.remove":"remove_from_cart","checkout.initiate":"begin_checkout","checkout.payment.select":"add_payment_info","checkout.shipment.select":"add_shipping_info"};var dp_xdataSent=!1;let dp_lastTrackedUrl=window.location.href;window.index_conversion=window.index_conversion||{},window.index_conversion.automatic_event=window.index_conversion.automatic_event||[];var dp_shopType,dp_dataProcessed=!1,urlForErrors="https://n8n.advisio.cz/webhook/cc0a1f34-d512-46b6-b8ad-f60750a019ea",dp_cbLastTransactionId=null;function dp_isCbPurchaseEventName(e){const t=String(e||"").trim();return/^EEpurchase(?:[A-Za-z]{2})?$/.test(t)}function dp_buildCbPurchaseEvent(e){if(!e||"object"!=typeof e)return null;if(!dp_isCbPurchaseEventName(e.event))return null;const t=e.ecommerce&&"object"==typeof e.ecommerce?e.ecommerce:null;if(!t)return null;const r=t.purchase&&"object"==typeof t.purchase?t.purchase:{},n=r.actionField&&"object"==typeof r.actionField?r.actionField:{},i=null!=n.id?String(n.id):"";if(!i)return null;const o={name:"purchase",currency:pickCurrency(t.currencyCode,n.currency),transaction_id:i,version:"custom_cb",value:null!=n.revenue&&""!==String(n.revenue)?String(n.revenue):"0",items:(Array.isArray(t.products)?t.products:[]).map(function(e){const t=e||{};if(!t||"object"!=typeof t)return null;const r={};null!=t.id&&String(t.id)&&(r.id=String(t.id)),"string"==typeof t.name&&t.name&&(r.nm=trimString(t.name)),null!=t.price&&""!==String(t.price)&&(r.pr=String(t.price)),null!=t.quantity&&""!==String(t.quantity)&&(r.qt=String(t.quantity)),null!=t.brand&&String(t.brand)&&(r.br=String(t.brand)),null!=t.variant&&String(t.variant)&&(r.va=String(t.variant));let n=null;if("string"==typeof t.category?n=t.category.split("|"):Array.isArray(t.category)&&(n=t.category),Array.isArray(n))for(let e=0;e<n.length;e++){const t=n[e]?String(n[e]).trim():"";t&&(r[0===e?"ca":"c"+(e+1)]=trimString(t))}return Object.keys(r).length>0?r:null}).filter(Boolean)};return null!=n.affiliation&&""!==String(n.affiliation)&&(o.affiliation=String(n.affiliation)),null!=n.shipping&&""!==String(n.shipping)&&(o.shipping=String(n.shipping)),null!=n.coupon&&""!==String(n.coupon)&&(o.coupon=String(n.coupon)),o}function dp_processCbPurchase(e){try{dp_shopType="custom_cb";const t=dp_buildCbPurchaseEvent(e);if(!t)return!1;if(dp_cbLastTransactionId&&dp_cbLastTransactionId===t.transaction_id)return!0;window.index_conversion=window.index_conversion||{},window.index_conversion.automatic_event=window.index_conversion.automatic_event||[],dp_xdataSent=!1,window.index_conversion.automatic_event=[],index_conversion.automatic_event=[],index_conversion.automatic_event.push(t),window.index_conversion.__dp_forceBody=!0,dp_sendData();try{delete window.index_conversion.__dp_forceBody}catch(e){}return dp_cbLastTransactionId=t.transaction_id,!0}catch(e){return dp_safeReportError(e,{where:"dp_processCbPurchase",shopType:"custom_cb",location:window.location.href}),!1}}function dp_safeNav(e,t){try{if("undefined"==typeof navigator)return t;const r=navigator[e];return null!=r?r:t}catch(e){return t}}const dp_publishDiagnosticApi=function(e,t){try{const r=Object.getOwnPropertyDescriptor(window,e);return!!(!r||"value"in r&&r.writable)&&(Object.defineProperty(window,e,{value:t,writable:!0,enumerable:!!r&&!!r.enumerable,configurable:!r||!!r.configurable}),!0)}catch(e){return!1}};var dp_reportExternalScriptURL=function(){try{if("undefined"==typeof document||!document.currentScript)return"";const e=document.currentScript.src;return"string"==typeof e?e.trim():""}catch(e){return""}}(),DP_REPORT_QUEUE_MAX=4,DP_REPORT_PENDING_TTL_MS=3e4,DP_REPORT_QUOTAS={critical:2,error:1},DP_REPORT_ATTEMPT_LIMITS={critical:4,error:2},DP_REPORT_STORAGE_KEY="dp_reportDeliveryStateV3",dp_reportQueueV3=[],dp_reportScheduledV3=!1,dp_reportRunningV3=!1,dp_reportPendingV3=[],dp_reportAttemptsV3={critical:[],error:[]},dp_reportMemoryV3={critical:[],error:[]},dp_reportPromiseResolveV3=function(){try{return Promise.resolve.bind(Prom
1ise)}catch(e){return null}}();function dp_safePageHref(){try{return String(window.location.href||"")}catch(e){return""}}function dp_isHttpPage(){try{return/^https?:$/.test(window.location.protocol)}catch(e){return!1}}function dp_redactUrl(e){try{const t=String(e||"").slice(0,2048).replace(/\\\//g,"/");if(!t)return"";if(/^webpack(?:-internal)?:/i.test(t))return"webpack://[redacted]";const r=new URL(t,dp_isHttpPage()?window.location.href:"https://invalid.local/");return/^https?:$/.test(r.protocol)?r.origin+(/^\/index_gv3\/?$/i.test(r.pathname)?"/index_gv3/":""):r.protocol+"//[redacted]"}catch(e){return"[redacted url]"}}function dp_redactOrigin(e){try{const t=new URL(String(e||"").slice(0,2048),dp_isHttpPage()?window.location.href:"https://invalid.local/");return/^https?:$/.test(t.protocol)?t.origin:t.protocol+"//[redacted]"}catch(e){return"[redacted]"}}function dp_redactText(e,t){try{let r=String(e||"").slice(0,12e3);return r=r.replace(/\\(["'\/:=])/g,"$1"),r=r.replace(/(?:https?|file|blob|data|webpack(?:-internal)?|chrome-extension|moz-extension):(?:\/\/)?[^\s`"'<>]+/gi,function(e){return dp_redactUrl(e)}),r=r.replace(/((?:(?:api|client)[_-]?secret|access[_-]?token|refresh[_-]?token|id[_-]?token|token|authorization|proxy[_-]?authorization|password|passwd|cookie|set-cookie|x-api-key|api-key|user[_-]?data|email|phone|_ga|_gid|_fbp|_fbc|_gcl(?:_aw)?)[ \t"']*(?::|=|%3a|%3d|%253a|%253d)[ \t]*)(?:"[^"\r\n]*"|'[^'\r\n]*')/gi,"$1[redacted]"),r=r.replace(/((?:authorization|proxy[_-]?authorization)[ \t"']*(?::|=|%3a|%3d|%253a|%253d)[ \t"']*)(?:Basic|Bearer)[ \t]+[A-Za-z0-9._~+/=-]+/gi,"$1[redacted]"),r=r.replace(/((?:authorization|proxy[_-]?authorization)[ \t"']*(?::|=|%3a|%3d|%253a|%253d)[ \t"']*)Digest[ \t]+[^;\r\n]+/gi,"$1[redacted]"),r=r.replace(/((?:cookie|set-cookie)[ \t"']*(?::|=|%3a|%3d|%253a|%253d)[ \t"']*)[^\r\n}]*/gi,"$1[redacted]"),r=r.replace(/((?:(?:api|client)[_-]?secret|access[_-]?token|refresh[_-]?token|id[_-]?token|token|authorization|proxy[_-]?authorization|password|passwd|cookie|set-cookie|x-api-key|api-key|user[_-]?data|email|phone|_ga|_gid|_fbp|_fbc|_gcl(?:_aw)?)[ \t"']*(?::|=|%3a|%3d|%253a|%253d)[ \t"']*)(?![ \t"']*\[redacted\])[^,;&}\]\r\n<>]+/gi,"$1[redacted]"),r=r.replace(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,"[redacted email]"),r=r.replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,"[redacted id]"),r=r.replace(/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]{8,})?\b/g,"[redacted token]"),r=r.replace(/[A-Za-z0-9_-]{24,}/g,function(e){return/[A-Za-z]/.test(e)&&/\d/.test(e)?"[redacted token]":e}),r=r.replace(/\bBearer\s+[A-Za-z0-9._~+/=-]+/gi,"Bearer [redacted]"),r=r.replace(/\+?\d[\d\s().-]{7,}\d/g,function(e){return e.replace(/\D/g,"").length>=9?"[redacted number]":e}),r=r.replace(/\b[0-9a-f]{24,}\b/gi,"[redacted id]"),r=r.replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029\u202a-\u202e\u2066-\u2069]/g," "),r=r.replace(/[\\`*_~<>@]/g," "),r=r.replace(/\s+/g," ").trim(),r.slice(0,t||1e3)}catch(e){return"[unavailable]"}}function dp_sanitizeReportValue(e,t,r){const n=String(t||"").toLowerCase(),i=r||0;if(null==e)return e;if("payload_bytes"!==n&&/api[_-]?secret|client[_-]?secret|secret|authorization|password|token|cookie|user[_-]?data|^(?:payload|body)$|email|phone|_ga|_gid|_fbp|_fbc|_gcl/.test(n))return"[redacted]";if("number"==typeof e||"boolean"==typeof e)return e;if("string"==typeof e)return/currenturl|referrer|location|page/.test(n)?dp_redactOrigin(e):/url|endpoint/.test(n)?dp_redactUrl(e):dp_redactText(e,1e3);if(i>=4)return"[truncated]";if(Array.isArray(e))return e.slice(0,10).map(function(e){return dp_sanitizeReportValue(e,"item",i+1)});if("object"==typeof e){const t={};return Object.keys(e).slice(0,20).forEach(function(r){try{t[r]=dp_sanitizeReportValue(e[r],r,i+1)}catch(e){t[r]="[unavailable]"}}),t}return dp_redactText(e,1e3)}function dp_safeReportGet(e,t,r){try{return null!=e?e[t]:r}catch(e){return r}}function dp_reportErrorParts(e){const t=e&&"object"==typeof e,r=t?dp_safeReportGet(e,"name","Error"):"Error",n=t?dp_safeReportGet(e,"message",""):e,i=t?dp_safeReportGet(e,"stack",""):"";return{name:dp_redactText(r||"Error",80)||"Error",message:dp_redactText(n||"Unknown error",240)||"Unknown error",stack:"string"==typeof i?i.slice(0,8e3):""}}function dp_reportTopFrame(e){try{const t=String(e||"").split(/\r?\n/).slice(0,12);for(let e=0;e<t.length;e++){const r=t[e];if(/dp_(?:report|redact|sanitize)/i.test(r))continue;const n=r.match(/:(\d+):(\d+)\)?$/);if(!n)continue;const i=r.match(/^\s*at\s+([^\s(]+)\s+\(/)||r.match(/^\s*([^@]+)@/);return((i?String(i[1]).replace(/[^A-Za-z0-9_$.-]/g,"").slice(0,60):"anonymous")||"anonymous")+":"+n[1]+":"+n[2]}}catch(e){}return"unknown"}function dp_reportFailureSummary(e){try{const t=dp_safeReportGet(e,"failures",null);return Array.isArray(t)?t.slice(0,4).map(function(e){const t=String(dp_safeReportGet(e,"step","unknown")).slice(0,30).toLowerCase(),r=dp_safeReportGet(e,"extra",null),n=String(dp_safeReportGet(r,"kind","unknown")).slice(0,30).toLowerCase(),i=Number(dp_safeReportGet(r,"status",0)),o={step:["fetch","xhr","beacon"].includes(t)?t:"unknown",kind:["http","redirect","client","network","timeout","abort","unavailable"].includes(n)?n:"unknown"};return Number.isFinite(i)&&i>=100&&i<=599&&(o.status=i),o}):[]}catch(e){return[]}}function dp_normalizeReportFingerprintText(e){return dp_redactText(e,300).toLowerCase().replace(/["'][^"']*["']/g,"?").replace(/\b(?:order|transaction|request|trace|session|cart|customer|user|invoice)[-_:# ]*[a-z0-9_-]*\d[a-z0-9_-]*\b/gi,"[id]").replace(/\b\d+\b/g,"#").replace(/\[(?:redacted|unavailable)[^\]]*\]/g,"[x
1]").replace(/\s+/g," ").trim()}function dp_hashReportFingerprint(e){let t=2166136261,r=2246822507;const n=String(e||"");for(let e=0;e<n.length;e++){const i=n.charCodeAt(e);t=Math.imul(t^i,16777619),r=Math.imul(r^i,3266489909)}return"dpe_"+("00000000"+(t>>>0).toString(16)).slice(-8)+("00000000"+(r>>>0).toString(16)).slice(-8)}function dp_reportFingerprint(e,t,r){try{const n=dp_reportErrorParts(e),i=dp_reportFailureSummary(t),o=String(dp_safeReportGet(t,"where","unknown")),a=String(dp_safeReportGet(t,"kind","runtime")||"runtime"),c=String(dp_safeReportGet(t,"code","")),d=dp_redactUrl(dp_safeReportGet(t,"endpoint",dp_safeReportGet(t,"url",""))),s=i.filter(function(e){return["http","redirect"].includes(e.kind)&&Number.isFinite(e.status)||"client"===e.kind}).map(function(e){return["http","redirect"].includes(e.kind)?e.kind+":"+e.status:"client:"+e.step}).filter(function(e,t,r){return r.indexOf(e)===t}).sort().join(",");return dp_hashReportFingerprint(["v3",r||"unknown",o,a,c,n.name,"transport"===a&&i.some(function(e){return"http"===e.kind&&Number.isFinite(e.status)})?"transport-http":dp_normalizeReportFingerprintText(n.message),dp_reportTopFrame(n.stack),d,s].join("|"))}catch(e){return"dpe_unknown"}}function dp_shouldReportErrorContext(e){if(!e||"object"!=typeof e||!e.where)return!1;if(null==e.kind||"runtime"===e.kind||"config"===e.kind)return!0;if("transport"!==e.kind)return!1;return(Array.isArray(e.failures)?e.failures:[]).some(function(e){const t=e&&e.extra,r=t&&Number(t.status);return!!t&&(["client","redirect"].includes(t.kind)||"http"===t.kind&&Number.isFinite(r)&&r>=400&&r<=599&&403!==r&&429!==r&&444!==r)})}function dp_browserFamilyMajor(e){const t=String(e||"").slice(0,1e3),r=[["Edge",/Edg(?:A|iOS)?\/(\d+)/i],["Opera",/OPR\/(\d+)/i],["Samsung Internet",/SamsungBrowser\/(\d+)/i],["Chrome",/(?:CriOS|Chrome)\/(\d+)/i],["Firefox",/(?:FxiOS|Firefox)\/(\d+)/i],["Safari",/Version\/(\d+).+Safari\//i]];for(let e=0;e<r.length;e++){const n=t.match(r[e][1]);if(n)return r[e][0]+" "+n[1]}return"Unknown"}function dp_isLocalReportHostname(e){const t=String(e||"").toLowerCase().replace(/^\[|\]$/g,"");return"localhost"===t||t.endsWith(".localhost")||"0.0.0.0"===t||"::1"===t||/^127(?:\.\d{1,3}){3}$/.test(t)}function dp_isReportBotUA(e){return/googlebot|adsbot|mediapartners-google|bingbot|duckduckbot|slurp|baiduspider|yandexbot|facebot|ia_archiver|semrush|ahrefsbot|mj12bot|screaming frog|lighthouse|pagespeed|inspectiontool|googleother|google-read-aloud|googleweblight|gtmetrix|uptimerobot|headlesschrome|puppeteer|playwright|phantomjs|gptbot|oai-searchbot|chatgpt-user|claudebot|claude-web|anthropic-ai|perplexitybot|bytespider|amazonbot|applebot|petalbot|dataforseo|dotbot|crawler|spider|(?:^|[\/ _-])bot(?:[\/ _-]|$)/i.test(String(e||"").slice(0,1e3))}function dp_reportEnvironment(){try{if(!dp_isHttpPage()||!dp_reportExternalScriptURL)return null;const e=new URL(window.location.href),t=new URL(dp_reportExternalScriptURL);if(!/^https?:$/.test(e.protocol)||!/^https?:$/.test(t.protocol)||dp_isLocalReportHostname(e.hostname)||dp_isLocalReportHostname(t.hostname))return null;try{if("string"==typeof dp_scriptURL&&dp_scriptURL){const t=new URL(dp_scriptURL,e.href);if(!/^https?:$/.test(t.protocol)||dp_isLocalReportHostname(t.hostname))return null}}catch(e){return null}if("undefined"==typeof navigator)return null;const r=navigator.userAgent,n=navigator.webdriver;if("string"!=typeof r||void 0!==n&&"boolean"!=typeof n)return null;const i=r.slice(0,1e3);return!i.trim()||!0===n||dp_isReportBotUA(i)?null:{pageOrigin:e.origin,scriptOrigin:t.origin,browser:dp_browserFamilyMajor(i)}}catch(e){return null}}function dp_isAllowedReportWhere(e,t){const r={bsshop:["dp_sendData","dp_sendData.wrapper","dp_checkAndSendAiOverview","sendUsingImage","sendUsingXHR","sendUsingFetch","dp_sendCustomEvent"],base:["dp_sendData","dp_sendData.wrapper","dp_resolveUserType","sendUsingImage","sendUsingXHR","sendUsingFetch","dp_checkAndSendAiOverview","history.wrapper","event_listeners.wrapper","transformItemsObject","processShoptetEvents","processGA4DataLayerEvent","processGtagEvent","setupGtagWrapper","upgates.event_handler","dp_processTransaction","dp_sendCustomEvent","dp_processCbPurchase"],config:["dp_sendData","dp_sendData.wrapper","dp_resolveUserType","sendUsingImage","sendUsingXHR","sendUsingFetch","dp_checkAndSendAiOverview","history.wrapper","event_listeners.wrapper","transformItemsObject","processShoptetEvents","processGA4DataLayerEvent","processGtagEvent","setupGtagWrapper","upgates.event_handler","dp_processTransaction","dp_sendCustomEvent","dp_processCbPurchase","dp_config"]};return!!r[t]&&r[t].includes(e)}function dp_reportContextSnapshot(e,t){try{const r=String(dp_safeReportGet(e,"where","")).slice(0,100),n=String(dp_safeReportGet(e,"kind","runtime")||"runtime").toLowerCase();if(!dp_isAllowedReportWhere(r,t))return null;if(!["runtime","config","transport"].includes(n))return null;const i=dp_reportFailureSummary(e);if("transport"===n){if(!i.some(function(e){return["client","redirect"].includes(e.kind)||"http"===e.kind&&Number.isFinite(e.status)&&e.status>=400&&e.status<=599&&![403,429,444].includes(e.status)}))return null}const o=String(dp_safeReportGet(e,"code","")).slice(0,100),a=dp_safeReportGet(e,"endpoint",dp_safeReportGet(e,"url",""));let c=0;
1return i.forEach(function(e){e.status>=500&&e.status<=599?c=e.status:401!==e.status||c>=500&&c<=599?!c&&e.status&&(c=e.status):c=401}),{where:r,kind:n,code:/^[A-Za-z0-9_.-]{1,64}$/.test(o)?o:"",endpoint:a?dp_redactUrl(a):"",failures:i,status:c||null,severity:"config"===n||"transport"===n&&(401===c||c>=500&&c<=599)?"critical":"error"}}catch(e){return null}}function dp_reportStoredState(){const e={critical:[],error:[]};try{["critical","error"].forEach(function(t){(Array.isArray(dp_reportMemoryV3[t])?dp_reportMemoryV3[t]:[]).forEach(function(r){/^dpe_[0-9a-f]{16}$/.test(r)&&!e[t].includes(r)&&e[t].push(r)})});const t=sessionStorage.getItem(DP_REPORT_STORAGE_KEY);let r=null;(null==t||"string"==typeof t&&t.length<=4096)&&(r=JSON.parse(t||"null")),r&&"object"==typeof r&&["critical","error"].forEach(function(t){(Array.isArray(r[t])?r[t]:[]).forEach(function(r){/^dpe_[0-9a-f]{16}$/.test(r)&&!e[t].includes(r)&&e[t].push(r)})})}catch(e){}return dp_reportMemoryV3={critical:e.critical.slice(-DP_REPORT_QUOTAS.critical),error:e.error.slice(-DP_REPORT_QUOTAS.error)}}function dp_persistReportState(){try{sessionStorage.setItem(DP_REPORT_STORAGE_KEY,JSON.stringify(dp_reportMemoryV3))}catch(e){}}function dp_reserveReport(e,t){try{if(!/^dpe_[0-9a-f]{16}$/.test(e)||!DP_REPORT_QUOTAS[t]||!DP_REPORT_ATTEMPT_LIMITS[t])return null;const r=Date.now();dp_reportPendingV3=dp_reportPendingV3.filter(function(e){return e&&Number(e.at)>r-DP_REPORT_PENDING_TTL_MS});const n=dp_reportStoredState();if(n.critical.includes(e)||n.error.includes(e))return null;const i=Array.isArray(dp_reportAttemptsV3[t])?dp_reportAttemptsV3[t]:[];if(i.includes(e)||i.length>=DP_REPORT_ATTEMPT_LIMITS[t])return null;if(dp_reportPendingV3.some(function(t){return t.fingerprint===e}))return null;const o=dp_reportPendingV3.filter(function(e){return e.severity===t}).length;if(n[t].length+o>=DP_REPORT_QUOTAS[t])return null;const a={fingerprint:e,severity:t,at:r};return i.push(e),dp_reportAttemptsV3[t]=i.slice(-DP_REPORT_ATTEMPT_LIMITS[t]),dp_reportPendingV3.push(a),a}catch(e){return null}}function dp_removePendingReport(e){try{dp_reportPendingV3=dp_reportPendingV3.filter(function(t){return t!==e})}catch(e){dp_reportPendingV3=[]}}function dp_commitReport(e){try{dp_removePendingReport(e);const t=dp_reportStoredState()[e.severity];t.includes(e.fingerprint)||t.push(e.fingerprint),dp_reportMemoryV3[e.severity]=t.slice(-DP_REPORT_QUOTAS[e.severity]),dp_persistReportState()}catch(e){}}function dp_releaseReport(e){try{dp_removePendingReport(e)}catch(e){}}function dp_getReportEndpoint(){try{let e="";try{"string"==typeof urlForErrors&&urlForErrors&&(e=urlForErrors)}catch(e){}if(!e)try{"string"==typeof REPORT_URL&&REPORT_URL&&(e=REPORT_URL)}catch(e){}if(!e||e.length>2048)return null;const t=new URL(e,window.location.href);return/^https?:$/.test(t.protocol)&&!dp_isLocalReportHostname(t.hostname)?t.href:null}catch(e){return null}}function dp_getReportFetch(){try{const e=window.fetch;return"function"==typeof e?e:null}catch(e){return null}}function dp_buildReportEnvelope(e,t,r){try{const n=dp_reportEnvironment();if(!n)return null;const i=dp_reportContextSnapshot(t,r);
1if(!i)return null;const o=dp_reportErrorParts(e),a=dp_reportTopFrame(o.stack),c=dp_reportFingerprint(e,t,r);if(!/^dpe_[0-9a-f]{16}$/.test(c))return null;const d={schema:"dp.error.v3",fingerprint:c,severity:i.severity,source:r,kind:i.kind,where:i.where,error:{name:o.name,message:"transport"===i.kind&&i.status?"Transport failed with HTTP "+i.status:o.message,frame:a},page_origin:n.pageOrigin,script_origin:n.scriptOrigin,browser:n.browser};i.code&&(d.code=i.code),i.endpoint&&(d.endpoint=i.endpoint),i.status&&(d.http_status=i.status),i.failures.length&&(d.failures=i.failures);const s=["DataPlus "+i.severity.toUpperCase(),d.error.name+": "+d.error.message,"where="+d.where+" kind="+d.kind+(d.http_status?" http="+d.http_status:""),"frame="+d.error.frame+" fp="+d.fingerprint,"source="+d.source+" page="+d.page_origin].join("\n");return{fingerprint:c,severity:i.severity,body:JSON.stringify({text:s.slice(0,1200),report:d})}}catch(e){return null}}function dp_settleReportRequest(e,t){try{if(dp_reportRunningV3)return dp_scheduleReportTask(function(){dp_settleReportRequest(e,t)})||dp_releaseReport(e),!1;dp_reportRunningV3=!0;try{const r=Number(t&&t.status);Number.isFinite(r)&&r>=200&&r<=299?dp_commitReport(e):dp_releaseReport(e)}catch(t){dp_releaseReport(e)}finally{dp_reportRunningV3=!1}}catch(t){try{dp_reportRunningV3=!1,dp_releaseReport(e)}catch(e){}}return!1}function dp_dispatchErrorReport(e,t,r){let n=null;try{const i=dp_buildReportEnvelope(e,t,r);if(!i||i.body.length>8e3)return!1;const o=dp_getReportEndpoint(),a=dp_getReportFetch();if(!o||!a)return!1;if(n=dp_reserveReport(i.fingerprint,i.severity),!n)return!1;let c=null;try{c=a.call(window,o,{method:"POST",headers:{"Content-Type":"application/json"},body:i.body,mode:"cors",redirect:"error",keepalive:!1,credentials:"omit",referrerPolicy:"no-referrer"})}catch(e){return dp_releaseReport(n),!1}try{const e=dp_reportPromiseResolveV3?dp_reportPromiseResolveV3(c):c;if(!e||"function"!=typeof e.then)return dp_releaseReport(n),!1;e.then(function(e){dp_settleReportRequest(n,e)},function(){dp_settleReportRequest(n,null)})}catch(e){dp_releaseReport(n)}}catch(e){n&&dp_releaseReport(n)}return!1}function dp_scheduleReportTask(e){try{if(dp_reportPromiseResolveV3){const t=dp_reportPromiseResolveV3();if(t&&"function"==typeof t.then)return t.then(e,function(){}),!0}}catch(e){}try{if("function"==typeof queueMicrotask)return queueMicrotask(e),!0}catch(e){}try{if("function"==typeof setTimeout)return setTimeout(e,0),!0}catch(e){}return!1}function dp_drainErrorReports(){try{if(dp_reportRunningV3)return dp_reportScheduledV3=!1,dp_reportQueueV3.length=0,!1;dp_reportRunningV3=!0,dp_reportScheduledV3=!1;dp_reportQueueV3.splice(0,DP_REPORT_QUEUE_MAX).forEach(function(e){try{dp_dispatchErrorReport(e.error,e.context,e.variant)}catch(e){}})}catch(e){dp_reportQueueV3.length=0}finally{dp_reportRunningV3=!1}return dp_reportQueueV3.length&&!dp_reportScheduledV3&&(dp_reportScheduledV3=!0,dp_scheduleReportTask(dp_drainErrorReports)||(dp_reportScheduledV3=!1,dp_reportQueueV3.length=0)),!1}function dp_enqueueErrorReport(e,t,r){try{if(dp_reportRunningV3)return!1;dp_reportRunningV3=!0;try{if(dp_reportQueueV3.length>=DP_REPORT_QUEUE_MAX)return!1;dp_reportQueueV3.push({error:e,context:t,variant:r}),dp_reportScheduledV3||(dp_reportScheduledV3=!0,dp_scheduleReportTask(dp_drainErrorReports)||(dp_reportScheduledV3=!1,dp_reportQueueV3.length=0))}catch(e){dp_reportScheduledV3=!1,dp_reportQueueV3.length=0}finally{dp_reportRunningV3=!1}}catch(e){try{dp_reportRunningV3=!1,dp_reportScheduledV3=!1,dp_reportQueueV3.length=0}catch(e){}}return!1}const dp_safeReportError=function(e,t){try{dp_enqueueErrorReport(e,t,"base")}catch(e){}return!1},dp_publicReportError=function(e,t){try{dp_safeReportError(e,t)}catch(e){}return!1};dp_publishDiagnosticApi("dp_reportError",dp_publicReportError);var _cs=document.currentScript&&document.currentScript.src||"",dp_scriptURL=_cs?-1!==_cs.indexOf("myshoptet.com")?window.location.href:_cs:window.location.href;function sendData(){dp_xdataSent=!1,dp_sendData()}function dp_resolveUserType(){try{if(!window.dataLayer||!Array.isArray(window.dataLayer))return;for(var e=null,t=null,r=0;r<window.dataLayer.length;r++){var n=window.dataLayer[r];if(n&&"object"==typeof n){var i=null;n.user_data&&"object"==typeof n.user_data&&null!=n.user_data.user_type&&""!==n.user_data.user_type?i=n.user_data.user_type:null!=n.user_type&&""!==n.user_type&&(i=n.user_type),null!=i&&(n.event&&"string"==typeof n.event?e=i:t=i)}}var o=null!=e?e:t;if(null==o)return;window.index_conversion=window.index_conversion||{},window.index_conversion.user_data=window.index_conversion.user_data||{},null!=window.index_conversion.user_data.user_type&&""!==window.index_conversion.user_data.user_type||(window.index_conversion.user_data.user_type=o)}catch(e){dp_safeReportError(e,{where:"dp_resolveUserType"})}}function dp_sendData(){if(!dp_xdataSent)try{var e=new URL(dp_scriptURL).origin;window.index_conversion=window.index_conversion||{},window.index_conversion.user_data=window.index_conversion.user_data||{},dp_resolveUserType();var t="undefined"!=typeof window&&window.screen&&window.screen.width&&window.screen.height?window.screen.width+"x"+window.screen.height:"unknown";if(index_conversion.currentURL=window.location.href||"",window.location.href.includes("cfpm_ref"))try{const e=new URLSearchParams(window.location.search).get("cfpm_ref");index_conversion.referrerURL=e?decodeURIComponent(e):document.referrer||""}catch(r){index_conversion.referrerURL=document.referrer||""}else index_conversion.referrerURL=document.referrer||"";index_conversion.titleURL=document.title||"",index_conversion.screen_resolution=t||"",index_conversion.language=("undefined"!=typeof navigator&&"string"==typeof navigator?.language?navigator.language:"cs-cz").toLowerCase(),index_conversion.mobile="undefined"!=typeof navigator&&(navigator.userAgentData?.mobile??/Mobi|Android/i.test(navigator?.userAgent||"")),index_conversion.version="4",index_conversion.cookie=getSpecificCookies();var r=e,n=0;if(window.index_conversion.automatic_event&&window.index_conversion.automatic_event.length>0)for(var i=0;i<index_conversion.automatic_event.length;i++)index_conversion.automatic_event[i].items&&(n+=index_conversion.automatic_event[i].items.length);var o=window.index_conversion&&!0===window.index_conversion.__dp_forceBody;if(o)try{delete window.index_conversion.__dp_forceBody}catch(e){}var a=JSON.stringify(index_conversion),c=`z=${(new Date).getTime()}`,d=o||n>2;if(!d)for(var s in index_conversion)if(index_conversion.hasOwnProperty(s)){var p=index_conversion[s];"object"==typeof p&&null!==p&&(p=JSON.stringify(p)),c+="&"+encodeURIComponent(s)+"="+encodeURIComponent(p)}var u=r+"/index_gv3/?"+c+"&img=true";window.dpTransport&&window.dpTransport.begin&&window.dpTransport.begin({where:"dp_sendData",url:u});var _=function(){var e=new XMLHttpRequest;e.open(d?"POST":"GET",u,!0),e.setRequestHeader("Content-Type","text/plain"),e.timeout=8e3,e.onreadystatechange=function(){e.readyState===XMLHttpRequest.DONE&&(e.status>=200&&e.status<300||444===e.status||401===e.status||403===e.status||429===e.status?window.dpTransport&&window.dpTransport.succeed("xhr"):(window.dpTransport&&window.dpTransport.fail("xhr",new Error(`XHR state DONE error: ${e.status} ${e.statusText}`),{method:d?"POST":"GET",url:u,status:e.status,statusText:e.statusText}),l()))},e.onerror=function(){window.dpTransport&&window.dpTransport.fail("xhr",new Error(`XHR failed: ${e.status} ${e.statusText}`),{method:d?"POST":"GET",url:u,status:e.status,statusText:e.statusText}),l()},e.ontimeout=function(){window.dpTransport&&window.dpTransport.fail("xhr",new Error("XHR timeout"),{method:d?"POST":"GET",url:u}),l()},e.onabort=function(){window.dpTransport&&window.dpTransport.fail("xhr",new Error("XHR aborted"),{method:d?"POST":"GET",url:u}),l()},e.send(d?a:null)},l=function(){try{var e=new Image,t=!1,r=setTimeout(function(){t||(t=!0,window.dpTransport&&window.dpTransport.fail("img",new Error("IMG timeout (~2s)"),{url:u}),window.dpTransport&&window.dpTransport.finalize())},2e3);e.onload=function(){t||(t=!0,clearTimeout(r),window.dpTransport&&window.dpTransport.succeed("img"))},e.onerror=function(){t||(t=!0,clearTimeout(r),window.dpTransport&&window.dpTransport.fail("img",new Error("IMG onerror"),{url:u}),window.dpTransport&&window.dpTransport.finalize())},e.src=u}catch(e){window.dpTransport&&window.dpTransport.fail("img",e,{url:u}),window.dpTransport&&window.dpTransport.finalize()}};(function(){if(!window.fetch)return _();try{fetch(u,{method:d?"POST":"GET",mode:"no-cors",headers:{"Content-Type":"text/plain"},body:d?a:null,cache:"no-store",keepalive:!0}).then(function(){window.dpTransport&&window.dpTransport.succeed("fetch")}).catch(function(e){window.dpTransport&&window.dpTransport.fail("fetch",e,{method:d?"POST":"GET",url:u}),_()})}catch(e){window.dpTransport&&window.dpTransport.fail("fetch",e,{method:d?"POST":"GET",url:u}),_()}})(),dp_xdataSent=!0,window.index_conversion&&Array.isArray(window.index_conversion.automatic_event)&&(window.index_conversion.automatic_event=[])}catch(e){window.dpTransport&&window.dpTransport.fail("setup",e,{where:"dp_sendData.wrapper"}),window.dpTransport&&window.dpTransport.finalize(),console.error("Error in try block:",e),dp_s
1afeReportError(e,{where:"dp_sendData.wrapper"})}}function dp_sendCustomEvent(e){try{if(!e||"object"!=typeof e)return;if(!e.event||"string"!=typeof e.event)return;window.index_conversion=window.index_conversion||{},window.index_conversion.automatic_event=window.index_conversion.automatic_event||[],dp_xdataSent=!1,window.index_conversion.automatic_event=[];const t={name:e.event,version:"custom"};e.user_data&&"object"==typeof e.user_data&&(window.index_conversion.user_data=window.index_conversion.user_data||{},Object.keys(e.user_data).forEach(t=>{const r=e.user_data[t];null!=r&&(window.index_conversion.user_data[t]="number"==typeof r?r:String(r))}));const r={};Object.keys(e).forEach(t=>{if("event"===t||"user_data"===t)return;const n=e[t];null!=n&&(r[t]="number"==typeof n?n:String(n))}),Object.keys(r).length>0&&(t.event_data=r),window.index_conversion.automatic_event.push(t),dp_sendData()}catch(t){dp_safeReportError(t,{where:"dp_sendCustomEvent",payload:e})}}function tldToCurrency(){var e=window.location.hostname.split("."),t="",r="",n="CZK";return 2===e.length?(t=e[0],r=e[1]):3===e.length?(t=e[1],r=e[2]):e.length>3&&(t=e[e.length-2],r=e[e.length-1]),"nedeto"===(t=t.toLowerCase())||"maluna"===t||"trenirkaren"===t?n="CZK":"sk"===r?n="EUR":"pl"===r?n="PLN":"hu"===r&&(n="HUF"),n}function dp_collectGtagPurchases(e){var t=[];if(!e)return t;for(var r in e){var n=e[r];if(n&&"object"==typeof n)for(var i in n)"purchase"===n[i]&&n[+i+1]&&n[+i+1].transaction_id&&t.push(n[+i+1])}return t}function dp_pickBestPurchase(e){if(!Array.isArray(e)||0===e.length)return null;for(var t=null,r=-1,n=0;n<e.length;n++){var i=e[n];if(i&&"object"==typeof i){var o=Array.isArray(i.items)?i.items:[],a=0;o.some(function(e){return e&&(e.item_name||e.name)})&&(a+=100);var c=i.send_to;"string"==typeof c&&0===c.indexOf("AW-")||Array.isArray(c)&&c.some(function(e){return 0===String(e).indexOf("AW-")})||(a+=10),o.length>0&&(a+=5),["tax","shipping","currency","coupon","affiliation"].forEach(function(e){void 0!==i[e]&&null!==i[e]&&""!==i[e]&&(a+=1)}),a>r&&(r=a,t=i)}}return t}function pickCurrency(...e){for(let t=0;t<e.length;t++){const r=e[t];if(null!=r&&""!==String(r).trim())return String(r).trim()}return tldToCurrency()}function trimString(e){return e.replace(/[\n\t]/g,"").trim()}function getSpecificCookies(){var e=["_ga","_fbp","_fbc","d5b8v3a2d7v3","_gcl_aw"],t=[],r=[];try{r=document?.cookie?.split(";")||[]}catch(e){r=[]}for(var n=0;n<r.length;n++){var i=r[n].trim().split("="),o=i[0],a=i[1]||"";e.includes(o)&&("_gcl_aw"===o&&3===a.split(".").length?t.push(o+"="+a.split(".")[2]):t.push(o+"="+a))}return t.join("; ")}!function(){var e=null;function t(t){return e={startedAt:Date.now(),url:t&&t.url||"",where:t&&t.where||"dp_sendData",failures:[],success:null},!0}window.dpTransport={begin:t,fail:function(r,n,i){e||t({}),e.failures.push({step:r,at:Date.now(),message:n&&n.message?String(n.message):String(n||""),name:n&&n.name?String(n.name):"",extra:i||null})},succeed:function(t){e&&(e.success={step:t,at:Date.now()},e=null)},finalize:function(){if(e){if(!e.success){var t={where:e.where,outcome:"failed",url:e.url,failures:e.failures};dp_safeReportError("All transports failed: "+(e.failures.map(function(e){return e.step}).join(", ")||"none"),t)}e=null}}}}(),window.dp_sendCustomEvent=window.dp_sendCustomEvent||dp_sendCustomEvent,function e(){try{if(!document.referrer?.includes(".google."))return;const e="undefined"!=typeof performance&&"function"==typeof performance.getEntries&&performance.getEntries().length>0&&performance.getEntries()[0]||null,t=(e&&e.name||window.location.href).match(/#:~:text=([^&]*)/);if(t?.[1]){const e=decodeURIComponent(t[1]).normalize("NFD").replace(/[\u0300-\u036f\u2013]/g,"");window.index_conversion=window.index_conversion||{},window.index_conversion.automatic_event=window.index_conversion.automatic_event||[],window.index_conversion.automatic_event.push({name:"ai_overview",ai_overview_text:e}),dp_xdataSent=!1,dp_sendData()}}catch(e){dp_safeReportError(e,{where:"dp_checkAndSendAiOverview"})}window.dp_checkAndSendAiOverview=e}();try{!function(e){const t=e.pushState,r=e.replaceState,n=e=>{if(!e)return;const t=new URL(e,window.location.href).href;t!==dp_lastTrackedUrl&&(dp_lastTrackedUrl=t,dp_xdataSent=!1,dp_sendData(),setTimeout(()=>dp_processTransaction(),500))};e.pushState=function(){return n(arguments[2]),t.apply(e,arguments)},e.replaceState=function(){return n(arguments[2]),r.apply(e,arguments)},window.addEventListener("popstate",function(){n(window.location.href)})}(window.history)}catch(e){dp_safeReportError(e,{where:"history.wrapper"})}try{dp_sendData(),document.addEventListener("DOMContentLoaded",dp_sendData),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&(window.addEventListener("load",dp_sendData),window.addEventListener("beforeunload",dp_sendData))}
1catch(e){console.error("Error in try block:",e),dp_safeReportError(e,{where:"event_listeners.wrapper"})}!function(){function e(e){try{/(?:^|;\s*)_ga=/.test(document.cookie||"")||console.warn("Cookie '_ga' not found via document.cookie"+(e?" – "+e:""))}catch(e){console.warn("document.cookie access failed:",e)}}try{const t="undefined"!=typeof window&&window.cookieStore||null;if(!t||"function"!=typeof t.get)return void e("cookieStore not available");const r=e=>{try{const n=e&&e.changed||[];for(let i=0;i<n.length;i++){const o=n[i];if(o&&"_ga"===o.name){dp_xdataSent=!1,dp_sendData();try{t.removeEventListener("change",r)}catch(e){}break}}}catch(e){console.warn("cookieStore change handler error:",e)}};let n;try{n=t.get("_ga")}catch(t){return console.warn("cookieStore.get threw synchronously:",t),void e("cookieStore.get sync error")}n.then(e=>{try{if(!e||!e.value)try{t.addEventListener("change",r)}catch(e){console.warn("cookieStore.addEventListener failed:",e)}}catch(e){console.warn("cookieStore then-block failed:",e)}}).catch(t=>{console.warn("cookieStore.get rejected:",t),e("cookieStore.get rejected")})}catch(t){console.warn("cookieStore block failed:",t),e("cookieStore block exception")}}();const transformItemsObject=e=>{try{if(Array.isArray(e)){let t=[];return e.forEach(e=>{if(!e||"object"!=typeof e)return;let r={};(e.item_brand||e.brand)&&(r.br=e.item_brand||e.brand),e.item_id?r.id=e.item_id.toString():e.option?.id?r.id=String(e.option.id):e.id&&(r.id=String(e.id)),(e.item_name||e.title)&&(r.nm=e.item_name||e.title),e.quantity&&(r.qt=e.quantity.toString()),e.price&&("object"==typeof e.price?r.pr=upgates&&upgates.settings&&upgates.settings.conversionPricesWithVat&&e.price&&e.price.withVat?e.price.withVat.toString():e.price&&e.price.withoutVat?e.price.withoutVat.toString():"0":r.pr=e.price.toString());let n=1;Object.keys(e).forEach(t=>{t.includes("item_category")&&(1===n?r.ca=e[t]:r[`c${n}`]=e[t],n++)}),t.push(r)}),t}}catch(e){dp_safeReportError(e,{where:"transformItemsObject"})}},dp_enrichmentTtlMs=5e3,dp_enrichmentCache=new Map;function dp_enrichmentNow(){return Date.now()}function dp_enrichmentPrune(){const e=dp_enrichmentNow();for(const[t,r]of dp_enrichmentCache.entries())(!r||!r.t||e-r.t>5e3)&&dp_enrichmentCache.delete(t)}function dp_enrichmentSet(e,t){e&&dp_enrichmentCache.set(e,{t:dp_enrichmentNow(),data:t||{}})}function dp_enrichmentGet(e){if(!e)return null;const t=dp_enrichmentCache.get(e);return t?dp_enrichmentNow()-t.t>5e3?(dp_enrichmentCache.delete(e),null):t.data||null:null}function dp_setIfMissing(e,t,r){e&&(void 0!==e[t]&&null!==e[t]&&""!==e[t]||null!=r&&""!==r&&(e[t]=r))}function dp_extractEnrichmentFromParams(e){const t=e||{},r={};t.payment_type&&(r.payment_type=String(t.payment_type)),t.shipping_tier&&(r.shipping_tier=String(t.shipping_tier)),t.coupon&&(r.coupon=String(t.coupon)),t.item_list_id&&(r.item_list_id=String(t.item_list_id)),t.item_list_name&&(r.item_list_name=String(t.item_list_name)),t.promotion_id&&(r.promotion_id=String(t.promotion_id)),t.promotion_name&&(r.promotion_name=String(t.promotion_name)),t.creative_name&&(r.creative_name=String(t.creative_name)),t.creative_slot&&(r.creative_slot=String(t.creative_slot)),t.transaction_id&&(r.transaction_id=String(t.transaction_id)),t.affiliation&&(r.affiliation=String(t.affiliation)),void 0===t.tax||null===t.tax||""===t.tax||isNaN(Number(t.tax))||(r.tax=Number(t.tax)),void 0===t.shipping||null===t.shipping||""===t.shipping||isNaN(Number(t.shipping))||(r.shipping=Number(t.shipping)),null!=t.currency&&""!==String(t.currency).trim()&&(r.currency=String(t.currency).trim()),void 0!==t.value&&null!==t.value&&""!==t.value&&(r.value=String(t.value));const n=transformItemsObject(t.items);return Array.isArray(n)&&n.length>0&&(r.items=n),r}function dp_applyEnrichment(e,t,r){try{const n=dp_enrichmentGet(r),i=dp_enrichmentGet(t+"|"),o=n||i;if(!o)return;const a=["payment_type","shipping_tier","coupon","item_list_id","item_list_name","promotion_id","promotion_name","creative_name","creative_slot","transaction_id","affiliation","tax","shipping","currency","value"];for(let t=0;t<a.length;t++){const r=a[t];void 0!==o[r]&&null!==o[r]&&""!==o[r]&&dp_setIfMissing(e,r,o[r])}(!e.items||!Array.isArray(e.items)||0===e.items.length)&&Array.isArray(o.items)&&o.items.length>0&&(e.items=o.items)}catch(e){dp_safeReportError(e,{where:"processShoptetEvents"})}}const processShoptetEvents=(e,t,r)=>{try{if(!(window.dataLayer&&Array.isArray(window.dataLayer)&&window.dataLayer.length>0&&window.dataLayer[0]&&window.dataLayer[0].shoptet))return!1;if(!t||!dp_eventsToCheck.includes(t))return!1;const n=["add_to_cart","view_item","view_cart","remove_from_cart","view_item_list","select_item","add_to_wishlist","view_promotion","select_promotion","refund"],i=transformItemsObject(e?.[2]?.items),o="string"==typeof r&&r?r:t+"|",a=dp_enrichmentGet(o)||dp_enrichmentGet(t+"|"),c=Array.isArray(i)&&i.length>0?i:a&&Array.isArray(a.items)?a.items:i;if(n.includes(t)&&!(Array.isArray(c)&&c.length>0&&c.some(e=>e&&"string"==typeof e.id&&e.id)))return!1;dp_xdataSent=!1,index_conversion.automatic_event=[],window.index_conversion=window.index_conversion||{},window.index_conversion.user_data=window.index_conversion.user_data||{},window.index_conversion.user_data.user_type=window.dataLayer[0]&&window.dataLayer[0].shoptet&&window.dataLayer[0].shoptet.customer&&window.dataLayer[0].shoptet.customer.groupId?window.dataLayer[0].shoptet.customer.groupId:0;const d=e?.[2]||{}
1,s={name:t,currency:pickCurrency(d?.currency),value:d?.value?.toString()||null,version:"shoptet",items:Array.isArray(c)?c:null},p=dp_extractEnrichmentFromParams(d);return Object.keys(p).forEach(e=>{"items"!==e&&void 0!==p[e]&&null!==p[e]&&""!==p[e]&&(s[e]=p[e])}),dp_applyEnrichment(s,t,o),index_conversion.automatic_event.push(s),window.index_conversion.automatic_event.forEach(e=>{for(const[t,r]of Object.entries(e))null===r&&delete e[t]}),dp_sendData(),!0}catch(e){return dp_safeReportError(e,{where:"processShoptetEvents"}),!1}};function processGA4DataLayerEvent(e){try{const t=e?.event;if(!t||!dp_eventsToCheck.includes(t))return;if("purchase"===t)return;const r=e?.ecommerce||{};if(!e?.ecommerce||!e.ecommerce.items)return;if(["add_to_cart","view_item","view_cart","remove_from_cart","view_item_list","select_item","add_to_wishlist","view_promotion","select_promotion","refund"].includes(t)&&(!r.items||!Array.isArray(r.items)||0===r.items.length))return;dp_xdataSent=!1,index_conversion.automatic_event=[];const n=(Array.isArray(r?.items)?r.items:[]).map(function(e){const t={},r=[];for(const t in e)-1!==t?.indexOf("item_category")&&r.push({key:t,value:e?.[t]});for(let e=0;e<r.length;e++)t[0===e?"ca":"c"+(e+1)]=r[e]?.value;
1return(e?.id||e?.item_id)&&(t.id=String(e?.id||e?.item_id)),(e?.name||e?.item_name)&&(t.nm=trimString(e?.name||e?.item_name)),void 0===e?.price&&void 0===e?.item_price||(t.pr=String(e?.price??e?.item_price)),(e?.quantity||e?.item_quantity)&&(t.qt=String(e?.quantity||e?.item_quantity)),(e?.brand||e?.item_brand)&&(t.br=String(e?.brand||e?.item_brand)),(e?.variant||e?.item_variant)&&(t.va=String(e?.variant||e?.item_variant)),e?.item_list_id&&(t.li=String(e.item_list_id)),e?.item_list_name&&(t.ln=String(e.item_list_name)),void 0===e?.index||isNaN(Number(e.index))||(t.lp=Number(e.index)),t}),i={name:t,version:"dataLayer_GA4",currency:pickCurrency(r?.currency)};switch(void 0!==r?.value&&(i.value=String(r?.value)),t){case"view_item_list":case"select_item":r?.item_list_id&&(i.item_list_id=String(r?.item_list_id)),r?.item_list_name&&(i.item_list_name=String(r?.item_list_name));break;case"view_promotion":case"select_promotion":r?.promotion_id&&(i.promotion_id=String(r?.promotion_id)),r?.promotion_name&&(i.promotion_name=String(r?.promotion_name)),r?.creative_name&&(i.creative_name=String(r?.creative_name)),r?.creative_slot&&(i.creative_slot=String(r?.creative_slot));break;case"add_payment_info":r?.payment_type&&(i.payment_type=String(r?.payment_type)),r?.coupon&&(i.coupon=String(r?.coupon));break;case"add_shipping_info":r?.shipping_tier&&(i.shipping_tier=String(r?.shipping_tier)),r?.coupon&&(i.coupon=String(r?.coupon));break;case"begin_checkout":r?.coupon&&(i.coupon=String(r?.coupon));break;case"refund":r?.transaction_id&&(i.transaction_id=String(r.transaction_id)),r?.affiliation&&(i.affiliation=String(r.affiliation)),void 0===r?.tax||""===r.tax||isNaN(Number(r.tax))||(i.tax=Number(r.tax)),void 0===r?.shipping||""===r.shipping||isNaN(Number(r.shipping))||(i.shipping=Number(r.shipping)),void 0===r?.value||""===r.value||isNaN(Number(r.value))||(i.value=Number(r.value)),null!=r?.currency&&""!==String(r.currency).trim()&&(i.currency=String(r.currency).trim())}n.length>0&&(i.items=n),index_conversion.automatic_event.push(i),window.index_conversion.automatic_event.forEach(e=>{Object.entries(e).forEach(([t,r])=>{null==r&&delete e[t]})}),dp_sendData()}catch(t){dp_safeReportError(t,{where:"processGA4DataLayerEvent",eventName:e?.event})}}const dp_translateUpgatesEvents=(e,t)=>e[t]||null;if(window.upgates&&"object"==typeof window.upgates){if(upgates&&"product"===upgates.pageType&&upgates.product){dp_xdataSent=!1,index_conversion.automatic_event=[];const e=upgates.settings&&upgates.settings.conversionPricesWithVat&&upgates.product.price&&upgates.product.price.withVat?upgates.product.price.withVat:upgates.product.price&&upgates.product.price.withoutVat?upgates.product.price.withoutVat:0,t=upgates.settings&&upgates.settings.conversionPricesWithVat&&upgates.product.price&&upgates.product.price.withVat?String(upgates.product.price.withVat):upgates.product.price&&upgates.product.price.withoutVat?String(upgates.product.price.withoutVat):"0";index_conversion.automatic_event.push({name:"view_item",currency:pickCurrency(upgates?.currency),value:e,version:"upgates",items:[{id:String(upgates.product.id),nm:trimString(upgates.product.title),pr:t,qt:"1",ca:upgates.product.category&&upgates.product.category.path&&upgates.product.category.path[0]?upgates.product.category.path[0]:null,c2:upgates.product.category&&upgates.product.category.path&&upgates.product.category.path[1]?upgates.product.category.path[1]:null,c3:upgates.product.category&&upgates.product.category.path&&upgates.product.category.path[2]?upgates.product.category.path[2]:null,br:upgates.product.manufacturer||null}]}),dp_sendData(),index_conversion.automatic_event=[]}Object.keys(dp_eventsForUpgates).forEach(e=>{upgates.on(e,t=>{try{dp_xdataSent=!1,index_conversion.automatic_event=[];const r=dp_translateUpgatesEvents(dp_eventsForUpgates,e);if(!r)return;const n="cart.add"===e||"cart.remove"===e?(upgates&&upgates.settings&&upgates.settings.conversionPricesWithVat&&t&&t.price&&t.price.withVat?t.price.withVat:t&&t.price&&t.price.withoutVat?t.price.withoutVat:0)*(t&&t.quantity?t.quantity:1):upgates&&upgates.cart&&Array.isArray(upgates.cart.products)?upgates.cart.products.map(function(e){return upgates.settings.conversionPricesWithVat?e.price.withVat:e.price.withoutVat}).reduce(function(e,t){return e+t},0):0;index_conversion.automatic_event.push({name:r,currency:pickCurrency(upgates?.currency),value:Number(n).toFixed(2),version:"upgates",items:("cart.add"===e||"cart.remove"===e?transformItemsObject([t]):upgates&&upgates.cart&&upgates.cart.products?transformItemsObject(upgates.cart.products):[])||[]}
1),window.index_conversion.automatic_event.forEach(e=>{Object.entries(e).forEach(([t,r])=>{null===r&&delete e[t]})}),dp_sendData(),index_conversion.automatic_event=[]}catch(e){dp_safeReportError(e,{where:"upgates.event_handler"})}})})}let dp_gtagCommandQueue=[],dp_gtagOriginal=null;function processGtagEvent(e,...t){try{if("event"!==e)return;const r=t[0],n=t[1]||{};if(!dp_eventsToCheck.includes(r)||"purchase"===r)return;const i=["add_to_cart","view_item","view_cart","remove_from_cart","view_item_list","select_item","add_to_wishlist","view_promotion","select_promotion","refund"],o=n.items&&Array.isArray(n.items)&&n.items.length>0,a=n.item_id||n.id||n.item_name||n.name;if(i.includes(r)&&!o&&!a)return;dp_xdataSent=!1,index_conversion.automatic_event=[];let c=[];if(o)c=n.items.map(function(e){const t={},r=[];for(const t in e)-1!==t?.indexOf("item_category")&&r.push({key:t,value:e?.[t]});for(let e=0;e<r.length;e++)t[0===e?"ca":"c"+(e+1)]=r[e]?.value;return(e?.item_id||e?.id)&&(t.id=String(e.item_id||e.id)),(e?.item_name||e?.name)&&(t.nm=trimString(e.item_name||e.name)),void 0!==e?.price&&(t.pr=String(e.price)),e?.quantity&&(t.qt=String(e.quantity)),(e?.item_brand||e?.brand)&&(t.br=String(e.item_brand||e.brand)),(e?.item_variant||e?.variant)&&(t.va=String(e.item_variant||e.variant)),e?.item_list_id&&(t.li=String(e.item_list_id)),e?.item_list_name&&(t.ln=String(e.item_list_name)),void 0===e?.index||isNaN(Number(e.index))||(t.lp=Number(e.index)),t});else if(a){const e={},t=[];for(const e in n)-1!==e?.indexOf("item_category")&&t.push({key:e,value:n[e]});for(let r=0;r<t.length;r++)e[0===r?"ca":"c"+(r+1)]=t[r]?.value;(n?.item_id||n?.id)&&(e.id=String(n.item_id||n.id)),(n?.item_name||n?.name)&&(e.nm=trimString(n.item_name||n.name)),void 0!==n?.price&&(e.pr=String(n.price)),n?.quantity&&(e.qt=String(n.quantity)),(n?.item_brand||n?.brand)&&(e.br=String(n.item_brand||n.brand)),(n?.item_variant||n?.variant)&&(e.va=String(n.item_variant||n.variant)),c=[e]}const d={name:r,version:"gtag",currency:pickCurrency(n?.currency)};switch(void 0!==n?.value&&(d.value=String(n.value)),r){case"view_item_list":case"select_item":n?.item_list_id&&(d.item_list_id=String(n.item_list_id)),n?.item_list_name&&(d.item_list_name=String(n.item_list_name));break;case"view_promotion":case"select_promotion":n?.promotion_id&&(d.promotion_id=String(n.promotion_id)),n?.promotion_name&&(d.promotion_name=String(n.promotion_name)),n?.creative_name&&(d.creative_name=String(n.creative_name)),n?.creative_slot&&(d.creative_slot=String(n.creative_slot));break;case"add_payment_info":n?.payment_type&&(d.payment_type=String(n.payment_type)),n?.coupon&&(d.coupon=String(n.coupon));break;case"add_shipping_info":n?.shipping_tier&&(d.shipping_tier=String(n.shipping_tier)),n?.coupon&&(d.coupon=String(n.coupon));break;case"begin_checkout":n?.coupon&&(d.coupon=String(n.coupon));break;case"refund":n?.transaction_id&&(d.transaction_id=String(n.transaction_id)),n?.affiliation&&(d.affiliation=String(n.affiliation)),void 0===n?.tax||isNaN(Number(n.tax))||(d.tax=Number(n.tax)),void 0===n?.shipping||isNaN(Number(n.shipping))||(d.shipping=Number(n.shipping))}c.length>0&&(d.items=c),index_conversion.automatic_event.push(d),window.index_conversion.automatic_event.forEach(e=>{Object.entries(e).forEach(([t,r])=>{null==r&&delete e[t]})}),dp_sendData()}catch(e){dp_safeReportError(e,{where:"processGtagEvent",eventName:t[0]})}}function dp_processTransaction(){try{if(window.index_conversion.automatic_event&&window.index_conversion.automatic_event.length>0&&!window.index_conversion.automatic_event.some(e=>"form_submit"===e.name))return;if(dp_dataProcessed)return;if(!(window.index_conversion.transaction_id&&window.index_conversion.value&&window.index_conversion.currency))if("undefined"!=typeof shoptet){if(window.dataLayer&&Array.isArray(window.dataLayer)&&window.dataLayer.length>0&&window.dataLayer[0]&&window.dataLayer[0].shoptet&&"thankYou"===window.dataLayer[0].shoptet.pageType&&(dp_shopType="shoptet",window.dataLayer[0].shoptet&&window.dataLayer[0].shoptet.order)){var e=window.dataLayer[0].shoptet.order.content.map(function(e){for(var t=e.category.split("|"),r={id:String(e.sku),nm:trimString(e.name),pr:String(e.price),qt:String(e.quantity)},n=0;n<t.length;n++){var i=t[n].trim();i&&(r[0===n?"ca":"c"+(n+1)]=trimString(i))}return r});window.index_conversion=window.index_conversion||{},window.index_conversion.user_data=window.index_conversion.user_data||{},window.index_conversion.user_data.user_type=window.dataLayer[0]&&window.dataLayer[0].shoptet&&window.dataLayer[0].shoptet.customer&&window.dataLayer[0].shoptet.customer.groupId?window.dataLayer[0].shoptet.customer.groupId:0,index_conversion.automatic_event.push({name:"purchase",currency:pickCurrency(window.dataLayer[0].shoptet&&window.dataLayer[0].shoptet.currency),value:String(window.dataLayer[0].shoptet.order.netto),transaction_id:String(window.dataLayer[0].shoptet.order.orderNo),version:"shoptet",items:e})}}else if("undefined"!=typeof upgates){if(upgates&&"order.recieved"===upgates.pageType&&upgates.order){dp_shopType="upgates";var t=upgates.settings&&upgates.settings.conversionPricesWithVat;index_conversion.automatic_event.push({name:"purchase",currency:pickCurrency(upgates.currency),transaction_id:String(upgates.order.number),version:"upgates",value:String(t?upgates.order.prices&&upgates.order.prices.total&&upgates.order.prices.total.withVat?upgates.order.prices.total.withVat:"0":upgates.order.prices&&upgates.order.prices.total&&upgates.order.prices.total.withoutVat?upgates.order.prices.total.withoutVat:"0"),items:upgates.order.products&&Array.isArray(upgates.order.products)?upgates.order.products.map(function(e){var r=e.category?.path||[],n={id:e.option?String(e.option.id):String(e.id),nm:trimString(e.title),qt:String(e.quantity)};n.pr=String(t?e.price.withVat:e.price.withoutVat);for(var i=0;i<r.length;i++){var o=r[i].trim();o&&(n[0===i?"ca":"c"+(i+1)]=trimString(o))}return n}):[]})}}else if("undefined"==typeof shoptet&&"undefined"==typeof upgates&&window.dataLayer&&Array.isArray(window.dataLayer)){dp_shopType="dataLayer_UA";var r=!1,n=!1;for(var i in window.dataLayer)if(!window.dataLayer[i]||!dp_isCbPurchaseEventName(window.dataLayer[i].event))if(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.purchase){r=!0;let t=window.dataLayer[i].ecommerce.purchase.products;Array.isArray(t)&&(e=t.map(function(e){var t,r,n={};function i(){for(var e=0;e<t.length;e++)(r=t[e]?t[e].trim():"")&&(n[0===e?"ca":"c"+(e+1)]=trimString(r))}return"string"==typeof e.category?(t=e.category.split("|"),i()):Array.isArray(e.category)&&(t=e.category,i()),(e.id||e.item_id)&&(n.id=String(e.id||e.item_id)),(e.name||e.
1item_name)&&(n.nm=trimString(e.name||e.item_name)),(e.price||e.item_price)&&(n.pr=String(e.price||e.item_price)),(e.quantity||e.item_quantity)&&(n.qt=String(e.quantity||e.item_quantity)),e.brand&&(n.br=e.brand),n}));let n={name:"purchase",currency:pickCurrency(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.purchase&&window.dataLayer[i].ecommerce.purchase.actionField&&window.dataLayer[i].ecommerce.purchase.actionField.currency,window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.currencyCode),transaction_id:String(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.purchase&&window.dataLayer[i].ecommerce.purchase.actionField&&window.dataLayer[i].ecommerce.purchase.actionField.id?window.dataLayer[i].ecommerce.purchase.actionField.id:""),version:"dataLayer_UA",value:String(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.purchase&&window.dataLayer[i].ecommerce.purchase.actionField&&window.dataLayer[i].ecommerce.purchase.actionField.revenue?window.dataLayer[i].ecommerce.purchase.actionField.revenue:"0"),items:e||[]};window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.purchase&&window.dataLayer[i].ecommerce.purchase.actionField&&window.dataLayer[i].ecommerce.purchase.actionField.profit&&(n.order_profit=String(Number(window.dataLayer[i].ecommerce.purchase.actionField.profit).toFixed(2))),index_conversion.automatic_event.push(n)}else if(window.dataLayer&&window.dataLayer[i]&&window.dataLayer[i].transactionId){dp_shopType="dataLayer_CH",n=!0,e=window.dataLayer[i].transactionProducts&&Array.isArray(window.dataLayer[i].transactionProducts)?window.dataLayer[i].transactionProducts.map(function(e){var t={};if(e.sku?t.id=String(e.sku):(e.id||e.item_id)&&(t.id=String(e.id||e.item_id)),(e.name||e.item_name)&&(t.nm=trimString(e.name||e.item_name)),(e.price||e.item_price)&&(t.pr=String(e.price||e.item_price)),0!=e.price&&0!=e.item_price||(t.pr="0"),(e.quantity||e.item_quantity)&&(t.qt=String(e.quantity||e.item_quantity)),e.category){var r;r=-1!==e.category.indexOf("->")?e.category.split("->"):-1!==e.category.indexOf("|")?e.category.split("|"):-1!==e.category.indexOf(">")?e.category.split(">"):[e.category];for(var n=0;n<r.length;n++){var i=r[n].trim();i&&(t[0===n?"ca":"c"+(n+1)]=trimString(i))}}return(e.brand||e.item_brand)&&(t.br=String(e.brand||e.item_brand)),t}):[];let t={name:"purchase",currency:pickCurrency(window.dataLayer[i]&&window.dataLayer[i].transactionCurrency),version:"dataLayer_CH",value:String(window.dataLayer[i]&&window.dataLayer[i].transactionTotal?window.dataLayer[i].transactionTotal:"0"),transaction_id:String(window.dataLayer[i]&&window.dataLayer[i].transactionId?window.dataLayer[i].transactionId:""),items:e};window.dataLayer[i]&&window.dataLayer[i].transactionFee&&(t.order_profit=String(Number(window.dataLayer[i].transactionFee).toFixed(2))),index_conversion.automatic_event.push(t)}else if(window.dataLayer&&window.dataLayer[i]&&(window.dataLayer[i].ecommerce||window.dataLayer[i].items)&&("purchase"===window.dataLayer[i].event||"purchase_stape"===window.dataLayer[i].event)&&!n){dp_shopType="dataLayer_GA4",r=!0,window.dataLayer[i].ecommerce||(window.dataLayer[i].ecommerce={},window.dataLayer[i].ecommerce.transaction_id=window.dataLayer[i].transaction_id,window.dataLayer[i].ecommerce.value=window.dataLayer[i].value,window.dataLayer[i].ecommerce.items=window.dataLayer[i].items,window.dataLayer[i].ecommerce.currency=window.dataLayer[i].currency),e=window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.items&&Array.isArray(window.dataLayer[i].ecommerce.items)?window.dataLayer[i].ecommerce.items.map(function(e){var t={},r=[];for(var n in e)-1!==n.indexOf("item_category")&&r.push({key:n,value:e[n]});for(var i=0;i<r.length;i++)t[n=0===i?"ca":"c"+(i+1)]=r[i].value;
1return(e?.id||e?.item_id)&&(t.id=String(e.id||e.item_id)),(e?.name||e?.item_name)&&(t.nm=trimString(e.name||e.item_name)),(e?.price||e?.item_price)&&(t.pr=String(e.price||e.item_price)),(e?.quantity||e?.item_quantity)&&(t.qt=String(e.quantity||e.item_quantity)),(e?.brand||e?.item_brand)&&(t.br=String(e.brand||e.item_brand)),(e?.variant||e?.item_variant)&&(t.va=String(e.variant||e.item_variant)),void 0!==e?.discount&&""!==String(e.discount)&&(t.di=String(e.discount)),e?.coupon&&(t.cp=String(e.coupon)),e?.item_profit&&(t.ip=String(Number(e.item_profit).toFixed(2))),t}):[];let t={name:"purchase",currency:pickCurrency(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.currency),transaction_id:String(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.transaction_id?window.dataLayer[i].ecommerce.transaction_id:""),version:"dataLayer_GA4",value:String(window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.value?window.dataLayer[i].ecommerce.value:"
10"),items:e};window.dataLayer[i]&&window.dataLayer[i].ecommerce&&void 0!==window.dataLayer[i].ecommerce.tax&&""!==String(window.dataLayer[i].ecommerce.tax)&&!isNaN(Number(window.dataLayer[i].ecommerce.tax))&&(t.tax=String(Number(window.dataLayer[i].ecommerce.tax).toFixed(2))),window.dataLayer[i]&&window.dataLayer[i].ecommerce&&void 0!==window.dataLayer[i].ecommerce.shipping&&""!==String(window.dataLayer[i].ecommerce.shipping)&&!isNaN(Number(window.dataLayer[i].ecommerce.shipping))&&(t.shipping=String(Number(window.dataLayer[i].ecommerce.shipping).toFixed(2))),window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.coupon&&(t.coupon=String(window.dataLayer[i].ecommerce.coupon)),window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.affiliation&&(t.affiliation=String(window.dataLayer[i].ecommerce.affiliation)),window.dataLayer[i]&&window.dataLayer[i].ecommerce&&window.dataLayer[i].ecommerce.profit&&(t.order_profit=String(Number(window.dataLayer[i].ecommerce.profit).toFixed(2))),index_conversion.automatic_event.push(t)}if(window.dataLayer&&!r&&!n){dp_shopType="gtag";var o=dp_pickBestPurchase(dp_collectGtagPurchases(window.dataLayer));if(o){e=o.items&&Array.isArray(o.items)?o.items.map(function(e){var t={},r=[],n=e.category||e.item_category;if(n&&-1!==n.indexOf("|"))for(var i=n.split("|"),o=0;o<i.length;o++){var a=i[o].trim();a&&(t[c=0===o?"ca":"c"+(o+1)]=a)}else if(n)for(var c in e)if(0===c.indexOf("item_category")||0===c.indexOf("category")){r.push(e[c]);for(var d=0;d<r.length;d++)t[c=0===d?"ca":"c"+(d+1)]=trimString(r[d])}return(e.id||e.item_id)&&(t.id=String(e.id||e.item_id)),(e.name||e.item_name)&&(t.nm=trimString(e.name||e.item_name)),e.price&&(t.pr=String(e.price)),e.quantity&&(t.qt=String(e.quantity)),(e.item_brand||e.brand)&&(t.br=String(e.item_brand||e.brand)),(e.item_variant||e.variant)&&(t.va=String(e.item_variant||e.variant)),void 0!==e.discount&&""!==String(e.discount)&&(t.di=String(e.discount)),e.coupon&&(t.cp=String(e.coupon)),t}):[];var a={name:"purchase",currency:pickCurrency(o.currency),version:"gtag",value:String(Number(o.value||0).toFixed(2)),tax:String(Number(o.tax||0).toFixed(2)),shipping:String(o.shipping||"0"),transaction_id:String(o.transaction_id||""),items:e};o.coupon&&(a.coupon=String(o.coupon)),o.affiliation&&(a.affiliation=String(o.affiliation)),index_conversion.automatic_event.push(a)}}}window.index_conversion.automatic_event&&window.index_conversion.automatic_event.length>0&&(dp_xdataSent=!1,dp_sendData(),dp_dataProcessed=!0)}catch(e){dp_safeReportError(e,{where:"dp_processTransaction",shopType:dp_shopType,location:window.location.href})}}dp_processTransaction(),document.addEventListener("DOMContentLoaded",function(){setTimeout(function(){dp_processTransaction()},100)}),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.addEventListener("load",dp_processTransaction),document.addEventListener("DOMContentLoaded",function(){for(var e=document.querySelectorAll("form"),t=0;t<e.length;t++)e[t].addEventListener("submit",function(e){!1===window.index_conversion.automatic_event.some(e=>"purchase"===e?.name)&&(window.index_conversion.automatic_event=[]),window.index_conversion.automatic_event.push({name:"form_submit"}),dp_xdataSent=!1,dp_sendData()})}),function(e){window.dataLayer=window.dataLayer||[];const t=new Map,r=new Map,n=()=>Date.now(),i=()=>{const e=n();for(const[r,n]of t.entries())e-n>2e3&&t.delete(r)},o=e=>{if(!Array.isArray(e)||0===e.length)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r]||{},i=n.item_id??n.id??(n.option&&n.option.id)??null;if(null!=i){const e=String(i);e&&t.push(e)}}return t},a=e=>{const t=e?.[1]||"",r=e?.[2]||{},n=o(r.items);if(n.length>0)return t+"|"+n.join(",");const i=r.item_id??r.id??(r.option&&r.option.id)??null;return t+"|"+(null!=i?String(i):"")},c=e=>{const t=e?.event||"",r=o(e?.ecommerce?.items);return r.length>0?t+"|"+r.join(","):t+"|"},d=(e,t)=>{if(!e)return;if(r.has(e)){try{clearTimeout(r.get(e))}catch(e){}r.delete(e)}const n=setTimeout(()=>{r.delete(e),i(),dp_enrichmentPrune(),t()},200);r.set(e,n)},s=o=>{i(),(t=>{try{dp_enrichmentPrune();for(let r=0;r<t.length;r++){const n=t[r],i=n?.[2]?.send_to,o="string"==typeof i&&i.startsWith("AW-");if("event"===n?.[0]&&n?.[1]&&e.includes(n[1])&&"purchase"!==n[1]&&n[2]&&!o){const e=a(n),t=n[1],r=dp_extractEnrichmentFromParams(n[2]);dp_enrichmentSet(e,r),dp_enrichmentSet(t+"|",r)}else if(n?.event&&e.includes(n.event)&&"purchase"!==n.event){const e=c(n),t=n.event,r=n.ecommerce||{},i=dp_extractEnrichmentFromParams({currency:n.currency||r.currency,value:n.value||r.value,items:r.items||n.items,payment_type:r.payment_type,shipping_tier:r.shipping_tier,coupon:r.coupon,item_list_id:r.item_list_id,item_list_name:r.item_list_name,promotion_id:r.promotion_id,promotion_name:r.promotion_name,creative_name:r.creative_name,creative_slot:r.creative_slot,transaction_id:r.transaction_id,affiliation:r.affiliation,tax:r.tax,shipping:r.shipping});dp_enrichmentSet(e,i),dp_enrichmentSet(t+"|",i)}}}catch(e){dp_safeReportError(e,{where:"event_listeners.wrapper"})}})(o);const s=!!(window.dataLayer&&window.dataLayer[0]&&window.dataLayer[0].shoptet);s&&o.forEach(i=>
1{const o=i?.[1];if("event"===i?.[0]&&o&&e.includes(o)&&(c=i?.[2]?.send_to,c&&("string"==typeof c?"ga4"===c.toLowerCase():Array.isArray(c)&&c.some(e=>"ga4"===String(e).toLowerCase())))){const e=a(i);processShoptetEvents(i,o,e)&&(t.set(e,n()),t.set(o+"|",n()),((e,t)=>{if(t&&r.has(t)){try{clearTimeout(r.get(t))}catch(e){}r.delete(t)}if(e)for(const[t,n]of r.entries())if(t===e+"|"||t.startsWith(e+"|")){try{clearTimeout(n)}catch(e){}r.delete(t)}})(o,e))}var c}),o.forEach(r=>{if(r?.event&&dp_isCbPurchaseEventName(r.event))return void dp_processCbPurchase(r);if("purchase"===r?.event)return void dp_processTransaction();const n=r?.[2]?.send_to,i="string"==typeof n&&n.startsWith("AW-");if("event"===r?.[0]&&r?.[1]&&e.includes(r[1])&&"purchase"!==r[1]&&r[2]&&!i){if(s){const e=a(r);if(t.has(e)||t.has(r[1]+"|"))return;return void d(e,()=>{t.has(e)||t.has(r[1]+"|")||processGtagEvent("event",r[1],r[2])})}processGtagEvent("event",r[1],r[2])}else if(r?.event&&e.includes(r?.event)){if(s){const e=c(r);if(t.has(e)||t.has(r.event+"|"))return;return void d(e,()=>{t.has(e)||t.has(r.event+"|")||processGA4DataLayerEvent(r)})}processGA4DataLayerEvent(r)}})},p=window.dataLayer;s(p);const u=window.dataLayer.push;window.dataLayer.push=function(...e){return s(e),u.apply(this,e)}}(dp_eventsToCheck);

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.