/* created at 2025-10-28 09:29:27 by rumvision.com; served v4 instead */!(function(){var webVitals=function(t){"use strict";var e,n,r=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart(e||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;t=r.parentNode}}catch(t){}return n},c=-1,s=function(){return c},u=function(t){addEventListener("pageshow",(function(e){e.persisted&&(c=e.timeStamp,t(e))}),!0)},f=function(){var t=r();return t&&t.activationStart||0},d=function(t,e){var n=r(),i="navigate";s()>=0?i="back_forward_cache":n&&(document.prerendering||f()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-")));return{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},l=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},m=function(t,e,n,r){var i,a;return function(o){e.value>=0&&(o||r)&&((a=e.value-(i||0))||void 0===i)&&(i=e.value,e.delta=a,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,n),t(e))}},v=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},p=function(t){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&t()}))},h=function(t){var e=!1;return function(){e||(t(),e=!0)}},g=-1,T=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(t){"hidden"===document.visibilityState&&g>-1&&(g="visibilitychange"===t.type?t.timeStamp:0,S())},E=function(){addEventListener("visibilitychange",y,!0),addEventListener("prerenderingchange",y,!0)},S=function(){removeEventListener("visibilitychange",y,!0),removeEventListener("prerenderingchange",y,!0)},b=function(){return g<0&&(g=T(),E(),u((function(){setTimeout((function(){g=T(),E()}),0)}))),{get firstHiddenTime(){return g}}},C=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},L=[1800,3e3],M=function(t,e){e=e||{},C((function(){var n,r=b(),i=d("FCP"),a=l("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(a.disconnect(),t.startTimee.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};B.set(r.id,r),A.push(r)}A.sort((function(t,e){return e.latency-t.latency})),A.length>10&&A.splice(10).forEach((function(t){return B.delete(t.id)}))}}},N=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=h(t),"hidden"===document.visibilityState?t():(n=e(t),p(t)),n},H=[200,500],V=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},C((function(){var n;k();var r,i=d("INP"),a=function(t){N((function(){t.forEach(q);var e=R();e&&e.latency!==i.value&&(i.value=e.latency,i.entries=e.entries,r())}))},o=l("event",a,{durationThreshold:null!==(n=e.durationThreshold)&&void 0!==n?n:40});r=m(t,i,H,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),p((function(){a(o.takeRecords()),r(!0)})),u((function(){O=x(),A.length=0,B.clear(),i=d("INP"),r=m(t,i,H,e.reportAllChanges)})))})))},W=[],z=[],U=0,_=new WeakMap,G=new Map,J=-1,K=function(t){W=W.concat(t),Q()},Q=function(){J<0&&(J=N(X))},X=function(){G.size>10&&G.forEach((function(t,e){B.has(e)||G.delete(e)}));var t=A.map((function(t){return _.get(t.entries[0])})),e=z.length-50;z=z.filter((function(n,r){return r>=e||t.includes(n)}));for(var n=new Set,r=0;rU&&e>a||n.has(t)})),J=-1};j.push((function(t){t.interactionId&&t.target&&!G.has(t.interactionId)&&G.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;U=Math.max(U,t.processingEnd);for(var r=z.length-1;r>=0;r--){var i=z[r];if(Math.abs(n-i.renderTime)<=8){(e=i).startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd),e.entries.push(t);break}}e||(e={startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd,renderTime:n,entries:[t]},z.push(e)),(t.interactionId||"first-input"===t.entryType)&&_.set(t,e),Q()}));var Y,Z,$,tt,et=function(t,e){for(var n,r=[],i=0;n=W[i];i++)if(!(n.startTime+n.duratione)break;r.push(n)}return r},nt=[2500,4e3],rt={},it=[800,1800],at=function t(e){document.prerendering?C((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)},ot=function(t,e){e=e||{};var n=d("TTFB"),i=m(t,n,it,e.reportAllChanges);at((function(){var a=r();a&&(n.value=Math.max(a.responseStart-f(),0),n.entries=[a],i(!0),u((function(){n=d("TTFB",0),(i=m(t,n,it,e.reportAllChanges))(!0)})))}))},ct={passive:!0,capture:!0},st=new Date,ut=function(t,e){Y||(Y=e,Z=t,$=new Date,lt(removeEventListener),ft())},ft=function(){if(Z>=0&&Z<$-st){var t={entryType:"first-input",name:Y.type,target:Y.target,cancelable:Y.cancelable,startTime:Y.timeStamp,processingStart:Y.timeStamp+Z};tt.forEach((function(e){e(t)})),tt=[]}},dt=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){ut(t,e),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ct),removeEventListener("pointercancel",r,ct)};addEventListener("pointerup",n,ct),addEventListener("pointercancel",r,ct)}(e,t):ut(e,t)}},lt=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,dt,ct)}))},mt=[100,300],vt=function(t,e){e=e||{},C((function(){var n,r=b(),i=d("FID"),a=function(t){t.startTimer.value&&(r.value=i,r.entries=a,n())},c=l("layout-shift",o);c&&(n=m(t,r,D,e.reportAllChanges),p((function(){o(c.takeRecords()),n(!0)})),u((function(){i=0,r=d("CLS",0),n=m(t,r,D,e.reportAllChanges),v((function(){return n()}))})),setTimeout(n,0))})))}((function(e){var n=function(t){var e,n={};if(t.entries.length){var r=t.entries.reduce((function(t,e){return t&&t.value>e.value?t:e}));if(r&&r.sources&&r.sources.length){var a=(e=r.sources).find((function(t){return t.node&&1===t.node.nodeType}))||e[0];a&&(n={largestShiftTarget:o(a.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:a,largestShiftEntry:r,loadState:i(r.startTime)})}}return Object.assign(t,{attribution:n})}(e);t(n)}),e)},t.onFCP=function(t,e){M((function(e){var n=function(t){var e={timeToFirstByte:0,firstByteToFCP:t.value,loadState:i(s())};if(t.entries.length){var n=r(),a=t.entries[t.entries.length-1];if(n){var o=n.activationStart||0,c=Math.max(0,n.responseStart-o);e={timeToFirstByte:c,firstByteToFCP:t.value-c,loadState:i(t.entries[0].startTime),navigationEntry:n,fcpEntry:a}}}return Object.assign(t,{attribution:e})}(e);t(n)}),e)},t.onFID=function(t,e){vt((function(e){var n=function(t){var e=t.entries[0],n={eventTarget:o(e.target),eventType:e.name,eventTime:e.startTime,eventEntry:e,loadState:i(e.startTime)};return Object.assign(t,{attribution:n})}(e);t(n)}),e)},t.onINP=function(t,e){n||(n=l("long-animation-frame",K)),V((function(e){var n=function(t){var e=t.entries[0],n=_.get(e),r=e.processingStart,a=n.processingEnd,c=n.entries.sort((function(t,e){return t.processingStart-e.processingStart})),s=et(e.startTime,a),u=t.entries.find((function(t){return t.target})),f=u&&u.target||G.get(e.interactionId),d=[e.startTime+e.duration,a].concat(s.map((function(t){return t.startTime+t.duration}))),l=Math.max.apply(Math,d),m={interactionTarget:o(f),interactionTargetElement:f,interactionType:e.name.startsWith("key")?"keyboard":"pointer",interactionTime:e.startTime,nextPaintTime:l,processedEventEntries:c,longAnimationFrameEntries:s,inputDelay:r-e.startTime,processingDuration:a-r,presentationDelay:Math.max(l-a,0),loadState:i(e.startTime)};return Object.assign(t,{attribution:m})}(e);t(n)}),e)},t.onLCP=function(t,e){!function(t,e){e=e||{},C((function(){var n,r=b(),i=d("LCP"),a=function(t){e.reportAllChanges||(t=t.slice(-1)),t.forEach((function(t){t.startTime{for(const entry of entryList.getEntries()){_config.loafs.push(entry);}}).observe({type:'long-animation-frame',buffered:true});}const getSanitizedInvoker=({invoker,sourceURL})=>{if(invoker!==sourceURL){return invoker;}else{const url=new URL(invoker);url.search='';return url.toString();}};function setLoafDetails(loaf,prefix){if(!('sourceURL'in(loaf?.scripts?.[0]||{}))){return;}const task=getLoafMainTask(loaf);for(const key in task){set(prefix+'loaftask'+key,task[key]);}let highest={duration:0};for(let i=0;ihighest.duration){highest=loaf.scripts[i];}}const source=highest.sourceURL?.length?new URL(highest.sourceURL):{hostname:'unset',pathname:'self'};if((source.pathname||'').indexOf('cdn/shopifycloud/')>0){source.hostname='cdn.shopify.com';}if(source?.pathname==window.location.pathname){source.pathname='self';}if(source.protocol&&source.protocol?.indexOf('http')!==0){source.pathname=source.hostname+source.pathname;source.hostname=source.protocol.replace(/:$/,'');}for(const key of['hostname','pathname']){if(source[key]){set(prefix+'loafscript'+key,source[key]);}}set(prefix+'loafinvoker',getSanitizedInvoker(highest));set(prefix+'loafinvokertype',highest.invokerType);if(highest.sourceFunctionName?.length){set(prefix+'loafscriptfunction',highest.sourceFunctionName||'unset');}if(highest.windowAttribution){set(prefix+'loafscriptwindow',highest.windowAttribution);}const scriptTiming=getLoafScriptTiming(highest);for(const key in scriptTiming){set(prefix+'loafscript'+key,Math.round(scriptTiming[key]));}}function getLoafMainTask(loaf){let mainTask={duration:0};for(const key in loaf.timing){if(loaf.timing[key]>mainTask.duration){mainTask={duration:Math.round(loaf.timing[key]),name:key,};}}if(!mainTask.duration){return{};}mainTask.total=Math.round(loaf.duration);return mainTask;}function getLoafScriptTiming(script){if(!script.startTime){return{};}return{compile:Math.max(0,script.executionStart-script.startTime),execute:script.startTime+script.duration-script.executionStart,};}function getInpLoaf(inp,v4LoafEntries){let highest={duration:0};const loafs=v4LoafEntries||getInpLoafs(inp);for(let i=0;ihighest.duration){highest=loafs[i];}}if(!highest.duration){return{};}const entry=highest;const endTime=entry.startTime+entry.duration;const timing={deferred_duration:entry.firstUIEventTimestamp?Math.max(0,entry.firstUIEventTimestamp-entry.startTime):0,delay:entry.firstUIEventTimestamp?Math.max(0,entry.startTime-entry.firstUIEventTimestamp):0,render_duration:entry.styleAndLayoutStart-entry.renderStart,work_duration:entry.renderStart?entry.renderStart-entry.startTime:entry.duration,total_forced_style_layout_duration:entry.scripts.reduce(function(sum,script){return sum+script.forcedStyleAndLayoutDuration;},0),};timing.style_layout_duration=entry.styleAndLayoutStart?endTime-entry.styleAndLayoutStart:0;return Object.assign({},highest.toJSON(),{timing:timing});}function getInpLoafs(entry){function loafIntersect(e1,e2){return(e1.startTimeend||loaf.endTime{const renderDuration=item.durations.render;return renderDuration>max.durations.render?item:max;},intersects[0]);}const attr=copy(metric.attribution||{},{loafCount:0,workDuration:0,renderDuration:0,endTime:highestRender?.endTime||end,startTime:highestRender?.endTime?intersects[0].startTime:start,});for(let i=0;i=highestRender.startTime){break;}}attr.timeToFirstByte=attr.timeToFirstByte||_config.metrics.FCP?.queue?.[0]?.attribution?.timeToFirstByte||0;attr.idleDuration=attr.endTime-attr.startTime-attr.workDuration-attr.renderDuration-(attr.timeToFirstByte||0);if(metric){const prefix=(metric.name+'_metric_').toLowerCase();const subParts={loaftotalcount:attr.loafCount,idleduration:attr.idleDuration,workduration:attr.workDuration,renderduration:attr.renderDuration,resourcettfb:attr.timeToFirstByte,};for(const k in subParts){set(prefix+k,Math.max(Math.round(subParts[k]),0));}}return{name:metric||'FCP',value:attr.endTime-start,attribution:attr,};}function getKeysWithClause(obj,clauseFn,keysToReturn){const result=[];keysToReturn=keysToReturn||{'id':'#%s','src':'[src=%s]','name':'[name=%s]','reasons':',',};function extractKeys(obj,level){if(clauseFn(obj)){const selectedKeys={};for(const key in keysToReturn){let value=obj[key];if(value&&value.length){value=Array.isArray(value)?value.map(function(item){return item.reason||item;}):value;selectedKeys[key]=Array.isArray(value)?value.join(keysToReturn[key]):keysToReturn[key].replace('%s',value);}}const values=Object.values(selectedKeys);if(values.length>0){result.push((level>1?'iframe'+('reasons'in keysToReturn?':':''):'')+values.join(''));}}if(obj.children&&obj.children.length>0){obj.children.forEach(function(child){extractKeys(child,1+level);});}}if(obj.children&&obj.children.length>0){obj.children.forEach(function(child){extractKeys(child,1);});}return result;}function bfCacheNotRestored(nav){if(nav.type.replace('-','_')!='back_forward'||!nav.notRestoredReasons){return;}function isBlocked(obj){return obj?.reasons?.length;}const notRestored={elements:getKeysWithClause({children:[nav.notRestoredReasons]},isBlocked,{'id':'#%s','name':'[name=%s]'}),reasons:getKeysWithClause({children:[nav.notRestoredReasons]},isBlocked,{'reasons':', '}),};for(const k in notRestored){if(notRestored[k].length){set(_am+'notrestored'+k,notRestored[k].join(';'));}}}function shouldTrack(type,urlString,navId){if(_config.data.dnt){return false;}if(!_storage.urls){return;}if(!_config.data.webvitals){return type=='webvitals'?0:0;}_config.page={};if(1&&_storage.urls&&urlString&&!_config.page?.track){_config.page=urlRegexp(_storage.urls,urlString,true);_storage.regex=urlRegexp.toString();}set('webvitals',_config.page.track||0,'config');return type=='webvitals'?_config.data.webvitals:0||_config.data.webvitals;}function linkHint(url,relType='preconnect'){if(!1){return;}const lnk=document.createElement('link');lnk.rel=relType;lnk.href=new URL(url).origin;if(relType=='preconnect'&&1){lnk.crossOrigin='';}document.head.appendChild(lnk);}function hasExceededHours(previousTime,maxHours){if(!previousTime){return false;}const hoursPassed=(_config.now-parseInt(previousTime))/(1000*60*60);return hoursPassed>maxHours;}async function startSession(){_dnt=typeof _dnt=='undefined'?-1:_dnt&&!['no','unspecified'].includes(_dnt)?1:0;_config.data.dnt=!0&&_dnt===1;_storage=window[_ns]?.storage||{};_config.page??={};_config.now=Date.now()-Math.round(performance.now());if(hasExceededHours(_storage.lastSeen,12)||hasExceededHours(localStorage.getItem(_ns),48)){_storage.urls=_storage.session_id=null;_storage.pageviews=1;setLocalStoreTime();}_storage.lastSeen=_config.now;if(!_storage.urls){linkHint(_config.endpoint);_storage.urls={"absolute":{"\/":{"type":"index"}},"match":{"meta[name=\"robots\"][content*=\"noindex\"]":{"samplingrate":-1},"^\/[a-z-]{5}$":{"regexp":1,"type":"index"},"\/(collections|products|pages|blogs)\/":{"regexp":1,"type":"auto"}}};}if(_storage.session_id){_beacon.session_id=_storage.session_id;return 1;}_beacon.session_id=uuidv1();_data.session={type:'session',data:{id:_beacon.session_id,platformid:10,sequence_no:9,js_version:'v4',}};const logMsg='';const random=Math.floor(Math.random()*100)+1;let prefers={};if(_config.data.consent||(_config.data.consent_device||false)){let dpr=window.devicePixelRatio||0;prefers['browser_darkmode']=window.matchMedia('(prefers-color-scheme: dark)').matches;prefers['browser_reducedmotion']=window.matchMedia('(prefers-reduced-motion)').matches;prefers['browser_savedata']=navigator.connection?(navigator.connection.saveData?1:0):-1;set('device_dpr',dpr?Math.round(dpr/0.5)*0.5:null,'session');set('device_memory',navigator.deviceMemory?navigator.deviceMemory*1024:null,'session');set(_am+'touchpoints',navigator.maxTouchPoints,'session');}for(k in prefers){set(k,prefers[k]!==-1?(prefers[k]?'enabled':'disabled'):'unsupported','session');}let device_type='desktop';let browser={brand:''};if(navigator.userAgentData){let ua=navigator.userAgentData;if(ua.brands.length){for(let i=0;ibrowser.brand.length){browser=ua.brands[i];}}set('browser_brand',browser.brand,'session');set('browser_version',parseInt(browser.version),'session');}let props=['model','platform','platformVersion',];await ua.getHighEntropyValues(props).then((ua)=>{device_type=ua.mobile?'mobile':'desktop';for(let i=0;i{timingAdd(entry,entry.entryType);});}).observe({type:type,buffered:true});}if(!_nav.transferSize&&_nav.duration<30){return;}observers['server']={callback:sTimingAdd,map:'server',prefix:'ttfb'};for(const k in(_nav.serverTiming||{})){timingAdd(_nav.serverTiming[k],'server');}}timing_map.server=timing_map.server||{};timing_map.server.cfCacheStatus={id:'cachestatus'};function sTimingAdd(entry){if(entry.duration>=0){set(entry.prefix,Math.round(entry.duration));}if(entry.description&&typeof entry.description==='string'){set(entry.prefix.replace('ttfb_metric_','metric_server'),entry.description);}}function uTimingAdd(entry){set(entry.prefix,Math.round(entry.startTime));if(entry?.duration){set(entry.prefix.replace('metric_','metric_duration'),Math.round(entry.multipliedDuration||entry.duration));}}function cb(func,arg){return func&&((typeof func==='function'&&func(arg))||(typeof func==='string'&&window[func]&&window[func](arg)));}function get(key,callback){if(key in _config.bf&&_config.bf[key].val){return _config.bf[key];}return key?null:_config.bf;}function set(key,value,table,force){if(value===null){return;}if(key=='navigationtype'){value=value.replaceAll('-','_');}if((key in _required&&!_required[key].includes(value))||(key in _denied&&_denied[key].includes(value))){_storage.urls={};_config.data.webvitals=0;}table=['session','config','metric'].includes(table)?table:'request';_config.bf[key]={val:value,table:table};if(['metric','request'].includes(table)&&_config.navIds.last){const navId=_config.navIds.cur;if(_config.navIds.list[navId].counter<0||!(table in _config.navIds.list[navId].beacon.inserts)){return;}if(!(key in _config.navIds.list[navId].beacon.inserts[table].data)||force){return(_config.navIds.list[navId].beacon.inserts[table].data[key]=value);}return;}if(table=='config'){return(_config.data[key]=value);}if(!_data[table]?.data){return;}if(!(key in _data[table].data)||force){return(_data[table].data[key]=value);}return;}function getPvt(navType){if(['reload','back_forward','back_forward_cache'].includes[navType]){return'successive';}let cs=0;if(_config.data.consent||_config.data.consent_storage||false){cs=1;if(sessionStorage.getItem(_ns)!==null){return'successive';}let ls=localStorage.getItem(_ns);if(ls!==null){return'returning';}}if(!cs&&_js.src){const cur=performance.getEntriesByName(_js.src)[0];if(cur.transferSize==0){return _nav.domainLookupEnd==_nav.domainLookupStart?'successive':'returning';}}return'unique';}function pagehit(navId,urlString,navType,startTime,visibilityState){if(Object.keys(_config.navIds.list).length&&_storage.pageviews){_storage.pageviews++;}_config.navIds.last=_config.navIds.cur;_config.navIds.cur=navId;const url=new URL(urlString||window.location.href,window.location.origin);_config.navIds.list[navId]={counter:_config.navIds.counter++,startTime:startTime||0,bfcache:{},beacon:{url_string:url.pathname,url_uuid:uuidv1(),request_id:navId,inserts:{request:{type:'request',data:{},session_id:_beacon.session_id,},metric:{type:'metric',data:{}},},},};_config.data.qs=url.search||'';_config.page.track=0;if(!shouldTrack('webvitals',url.pathname,navId)&&!shouldTrack()){_config.navIds.list[navId].counter=-1;_config.navIds.list[navId].beacon.inserts={};toStorage();return false;}bfCacheNotRestored(_nav);if(_config.navIds.counter==1){loopQueue();timings();}const navCon=navigator.connection||{};let tmpData={sent_via:'fetch',hostname:window.location.hostname,request_method:_config.data.qs.length>1?'query string':'get',get_params:'none',visibilitystate:visibilityState||document.visibilityState||'unknown',system_entropy:_nav.systemEntropy||'unknown',pageviewtype:getPvt(navType),downlink_kbps:parseInt(navCon.downlink||-1),effective_type:navCon.effectiveType||'unknown',template_type:_config.page.type||'unknown',pageview_count:_storage.pageviews||0,navigationtype:navType||'navigate',viewport:(window.visualViewport?[~~visualViewport.width,~~visualViewport.height]:[~~document.documentElement.clientWidth,~~document.documentElement.clientHeight]).join('x'),};Object.assign(tmpData,getTemplateType(tmpData.template_type));if(_useFetchLater){tmpData.time_on_page=0;}if(_config.page.sub){tmpData.template_sub=_config.page.sub;}for(const k in tmpData){set(k,tmpData[k]);}let params=null;if(_config.data.qs.length>1){params=new URLSearchParams(_config.data.qs);const anonymizeQsValues={".*@.*..*":"email"};function anonymizeQsValue(val){for(const regexStr in anonymizeQsValues){if(new RegExp(regexStr,"g").test(val)){return anonymizeQsValues[regexStr];}}return val;}let get=[];for(const key of params.keys()){get.push(key);}get.sort();set('get_params',get.join('&'),null,1);}}function loopQueue(){for(const d in _js.dataset){_config.data[d.replace(/[\W_]+/g,'-')]=_js.dataset[d];}if(typeof handle=='function'){let queue=window[_ns].q||[];for(let q=0;q{if(!startSessionResult||navigator.webdriver){return;}const cb='';if(cb.length&&window[cb]){_config.data.callback=cb;}if(1){let reportAllChanges=[];if(_useFetchLater){reportAllChanges.push('INP','CLS');}Object.keys(webVitals).forEach(function(funcName){if(!funcName.startsWith('on')||typeof webVitals[funcName]!=='function'){return;}const m=_config.metrics?.[funcName.replace('on','')]||{};if(m.ignore){return;}const opts={reportAllChanges:reportAllChanges.includes(funcName.replace('on',''))};const handleMetric=!('force'in m)?(metric)=>setTimeout(()=>queueMetric(metric),1):queueMetric;webVitals[funcName](handleMetric,opts);});}if(!_config.data.auto){return;}if(_storage.session_id){return setReady(false);}let cc=0;if(!cc){setReady();}});}function setReady(asynced){_config.ready=1;if(asynced!==false){throttleFlush();}}startRum();function snakeCase(str){return str.replace(/([a-z])([A-Z])/g,'$1_$2').toLowerCase();}function copy(obj,append){return Object.assign({},obj,append);}function setLocalStoreTime(){if(!_config.data.consent&&!_config.data.consent_storage){return;}localStorage.setItem(_ns,_config.now);}function toStorage(){if(!_config.data.consent&&!_config.data.consent_storage){return;}if(_config.data.dnt){_storage.urls={};}_storage.browser_brand=_storage.browser_brand||_data?.session?.data?.browser_brand;let clone=copy(_storage);sessionStorage.setItem(_ns,JSON.stringify(clone));if(localStorage.getItem(_ns)===null){setLocalStoreTime();}}function getBrowser(ua){if(_config.data.consent==0||_config.data.consent_useragent==0){return[];}let wv=ua.toLowerCase().indexOf('; wv')>0||(/iphone|ipod|ipad/i.test(ua)&&!/safari/i.test(ua)&&!navigator.standalone)?'yes':'no',pf='unknown';const platforms={'like Mac':'iOS','Android':'Android','Linux':'Linux','Mac':'macOS','Win':'Windows',};for(const find in platforms){if(platforms.hasOwnProperty(find)&&ua.indexOf(find)!=-1){pf=platforms[find];break;}}let tem,M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(M[1])){tem=/\brv[ :]+(\d+)/g.exec(ua)||[];return[wv,'IE',tem[1]||'',pf];}if(M[1]==='Chrome'){tem=ua.match(/\bEdg\/(\d+)/);if(tem!=null){return[wv,'Microsoft Edge',tem[1],pf];}tem=ua.match(/\bOPR\/(\d+)/);if(tem!=null){return[wv,'Opera',tem[1],pf];}M[1]='Google '+M[1];}M=M[2]?[M[1],M[2]]:[navigator.appName,navigator.appVersion,'-?'];if((tem=ua.match(/version\/(\d+)/i))!=null){M.splice(1,1,tem[1]);}return[wv,M[0],M[1],pf];}function bfcache(via,urlString,spaTime){_config.loafs=[];if(0){_config.data.webvitals=1;}_fetchLater={};_config.bfRestored=performance.now();_storage=JSON.parse(sessionStorage.getItem('rumv'));_storage.pageviews??=0;pagehit(uuidv1(),urlString,via);set('start',spaTime||performance.now(),'config');set('navigationtype',via,'request',1);}window.addEventListener('pageshow',(event)=>{_config.back_forward_cache=event.persisted;if(event.persisted){bfcache('back_forward_cache');return;}});function queueMetric(metric,forceNavId){if(_config.test.console){console.log('queueMetric',forceNavId,metric?.name,metric);}_config.data.callback&&cb(_config.data.callback,metric);let metricName=(metric?.name||'').toLowerCase();let navId=metric?.navigationId?.length=='36'?metric.navigationId:_config.navIds.cur;if(!(navId in _config.navIds.list)){let navType=metric.navigationType;if(!/^back[-_]forward[-_]cache$/.test(navType)){navType=_config.deliveryType||navType;}pagehit(navId,null,navType);}if(_config.navIds.list[navId].counter<0&&_config.test.console){console.log(metricName+' for '+navId+' ignored');return;}if(!forceNavId){_config.metrics[metric.name]??={};_config.metrics[metric.name].queue??=[];_config.metrics[metric.name].queue.push(copy(metric));}let round=true;let inserts;if(metricName.startsWith('cls')){metricName+='float';round=false;}if(_config.metrics[metric.name]?.force){inserts=_config.navIds.list[navId]?.beacon?.inserts;}set(metricName,round?Math.round(metric.value):metric.value,'metric',true);let instantFlush=['lcp','inp','cls'].includes(metricName);let elm,elmType,node,entry,prefix=metricName+'_metric_',attr=metric.attribution||{},props={loadState:'loadstate',eventType:'eventtype',eventTime:'eventtiming',largestShiftTime:'eventtiming',interactionTime:'eventtiming',interactionType:'eventtype',};switch(metric.name){case'FCP':if((metric.navigationType||'').indexOf('soft')!==0&&'PerformanceLongAnimationFrameTiming'in window){setLoafBetween(0,metric.value,metric);}if(attr.firstByteToFCP){set(prefix+'ttfbdelta',Math.max(Math.round(attr.firstByteToFCP),0));}break;case'CLS':elm=attr.largestShiftTarget;node=attr.largestShiftSource?.node;break;case'FID':case'INP':elm=attr.eventTarget??attr.interactionTarget;entry=attr.eventEntry||metric?.entries?.[0];node=entry?.target;let subParts={};if('inputDelay'in attr){subParts={inputdelay:attr.inputDelay,processingtime:attr.processingDuration,presentationdelay:attr.presentationDelay,};}else if(entry?.processingEnd){const adjustedPresentationTime=Math.max(entry.processingEnd+4,entry.startTime+entry.duration);subParts={inputdelay:entry.processingStart-entry.startTime,processingtime:entry.processingEnd-entry.processingStart,presentationdelay:adjustedPresentationTime-entry.processingEnd,};}for(const k in subParts){set(prefix+k,Math.max(Math.round(subParts[k]),0));}if(metric.name=='INP'&&'PerformanceLongAnimationFrameTiming'in window){const loaf=entry?getInpLoaf(entry,attr.longAnimationFrameEntries):{};setLoafDetails(loaf,prefix);}break;case'LCP':elm=attr.element;entry=attr.lcpEntry;node=entry?.element;if(entry?.size){set(prefix+'elmsize',entry.size);}elmType=node?(node.tagName||'').toLowerCase().replace('img','image'):'unknown';if(attr.url){if(elmType!='image'){elmType+='+image';}set(prefix+'priority',node?(node.getAttribute('fetchpriority')||'none'):'none');const lnk=document.querySelector('link[href*="'+new URL(attr.url).pathname.substr(1)+'"]');if(!lnk){set(prefix+'resourcehint','none');}else{const lnkAttrs={rel:1,as:1,fetchpriority:1,type:0,crossorigin:0};for(const k in lnkAttrs){lnkAttrs[k]=!lnkAttrs[k]?(lnk.hasAttribute(k)?k:''):(lnk.getAttribute(k)?k+'='+lnk.getAttribute(k):'');}set(prefix+'resourcehint','link['+Object.values(lnkAttrs).filter(item=>item!=='').join('][')+']');}set(prefix+'lazy',node?.outerHTML?.match(/\w*(-)?(lazy)(-)?\w*/ig)?.[0]||'none');const lcpResource=attr.lcpResourceEntry;set(prefix+'filetype',attr.lcpEntry.url.startsWith('data:')?'inlined':(lcpResource?.contentType||(new URL(entry.url).pathname).match(/\.(\w{3,4})$/)?.[1]||'unknown'));if(lcpResource){let cachedStatus='blocked';if(lcpResource.transferSize){cachedStatus='no';}else if(lcpResource.requestStart){cachedStatus=lcpResource.duration?'disk cache':'memory cache';}set(prefix+'cached',cachedStatus);if(lcpResource.transferSize||attr.url.includes(location.hostname)){set(prefix+'filesize',Math.round(lcpResource.transferSize/1024));}}}if('timeToFirstByte'in attr){const subParts={resourcettfb:attr.timeToFirstByte,loaddelay:attr.resourceLoadDelay,loadtime:attr.resourceLoadTime??attr.resourceLoadDuration,renderdelay:attr.elementRenderDelay,};for(const k in subParts){set(prefix+k,Math.max(Math.round(subParts[k]),0));}}break;case'TTFB':const ttfb={waitingtime:attr.waitingTime??attr.waitingDuration,...(Object.hasOwn(attr,'cacheDuration')&&{cacheduration:attr.cacheDuration,}),dnstime:attr.dnsTime??attr.dnsDuration,connectiontime:attr.connectionTime??attr.connectionDuration,requesttime:attr.requestTime??attr.requestDuration,};if(navigator.connection){ttfb.rtt=navigator.connection.rtt;}if(_nav.secureConnectionStart>0){ttfb.tlstime=_nav.connectEnd-_nav.secureConnectionStart;if(ttfb.tlstime>attr.connectionTime){ttfb.tlstime=attr.connectionTime;}}for(const k in ttfb){set(prefix+k,Math.max(Math.round(ttfb[k]),0));}break;}if(0&&['CLS','INP'].includes(metric.name)&&attr.eventTime&&attr.eventTime>_config.data.start){attr.eventTime-=_config.data.start;}if(elm){set(prefix+'elm',elm);}if(node){elmType=(elmType||node.tagName||'').toLowerCase().replace('img','image');if(elmType.length){set(prefix+'elmtype',elmType);}try{let elmText;let elmTimingValue;if(typeof node=='string'){elmText=node;}else{elmTimingValue=node.closest('[elementtiming]')?.getAttribute('elementtiming');elmText=elmTimingValue||node.innerText||node.getAttribute('title')||node.getAttribute('alt')||null;}if(elmText){set(prefix+'elmtext',(elmTimingValue?'':elmType+': ')+elmText.substring(0,100).replace(/\n|\r/g," ").replace(/[^a-zA-Z0-9\-\_\s]/g,''));}}catch{}}for(const k in props){if(k in attr){let isTime=props[k].indexOf('timing')>=0;set(prefix+props[k],isTime?Math.round(attr[k]):attr[k]);}}throttleFlush(instantFlush);}function sendWith(obj){if(1&&(_storage.apiBlock||_config.apiBlock)){return;}const body=JSON.stringify(obj);return sendWithFetch(body);}function sendWithFetch(body){const headers={"Content-Type":"application/json"};const params={method:"POST",mode:"no-cors",body:body,keepalive:true,headers:headers,};if(1){headers["x-api-key"]='ROTHYS.COM1434AFD331';delete params.mode;}fetch(_config.endpoint,params).then(res=>{if(!res.ok&&!params.mode){_config.apiBlock=1;if(_data.session.type){_storage.apiBlock=1;toStorage();}}return res;}).catch((err)=>{});return false;}function flush(){let maxCounter=0;for(const navId in _config.navIds.list){if(_config.navIds.list[navId].counter0){_data.session.data.id=_storage.session_id;}toStorage();const beacon=copy(_config.navIds.list[navId].beacon,_beacon);beacon.inserts.request.data.id=navId;beacon.inserts=Object.values(beacon.inserts);const keepAlive=sendWith(beacon);if(!keepAlive){for(const table in inserts){inserts[table].data={};}}}}function throttleFlush(instant){if(!_config.ready){return false;}if(!_config.timer.ms||instant){return flush();}_config.timer.obj&&clearTimeout(_config.timer.obj);_config.timer.obj=setTimeout(function(){flush();},_config.timer.ms);}function deleteEmpty(object){let result={};for(let key in object){if(!object.hasOwnProperty(key)||object[key]===null){continue;}result[key]=object[key];}return result;}})();