!function n(o,i,a){function s(e,t){if(!i[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(c)return c(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}r=i[e]={exports:{}},o[e][0].call(r.exports,function(t){return s(o[e][1][t]||t)},r,r.exports,n,o,i,a)}return i[e].exports}for(var c="function"==typeof require&&require,t=0;t{t=new CustomEvent(t,{detail:e});window.dispatchEvent(t)},a=(t,e)=>{window.SM||(window.SM={customEvents:{eventListeners:new Map}});var r=t=>{e(t.detail)};return window.addEventListener(t,r),window.SM.customEvents.eventListeners.has(t)||window.SM.customEvents.eventListeners.set(t,new Set),window.SM.customEvents.eventListeners.get(t).add(r),r},i=(t,e="",r="")=>{"err"==r&&console.log("%c [RTR] "+t,`background: #e00404;padding:2px 6px; border-radius:8px; color:#fff;font-family:sans-serif;font-size:14px; ${e};`),"wait"==r&&console.log("%c [RTR] "+t,`background: #f7e865;padding:2px 4px; border-radius:4px; color:#000;font-family:sans-serif;font-size:14px; ${e};`),""==r&&console.log("%c [RTR] "+t,`background: #4e6bcb;padding:4px 8px; border-radius:6px; color:#fff;font-family:sans-serif;font-size:14px; ${e};`)},s={create:()=>{var t=document.createElement("div");return t.id="rtr-gui",t.innerHTML=`

RTR GUI

`,t.innerHTML+=` `,t},setBehavior:n=>{let o=document.querySelector("#rtr-position"),i=document.querySelector("#rtr-move-to"),e=document.querySelector("#rtr-zoom");if(o&&i&&e){var r=n.camera.getPosition(),r=(o.value=`[${r.x.toFixed(3)},${r.y.toFixed(3)},${r.z.toFixed(3)}]`,o.onchange=t=>{var t=t.target;t&&t.value&&(t=t.value.replace(/\[|\]/g,"").split(","),n.camera.setPosition(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2]),!0))},n.camera.getTarget());i.value=`[${r.x.toFixed(3)},${r.y.toFixed(3)},${r.z.toFixed(3)}]`,i.onchange=t=>{var t=t.target;t&&t.value&&(t=t.value.replace(/\[|\]/g,"").split(","),n.camera.moveTo(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2]),!0))},a("RTR_endRotate",()=>{var{x:t,y:e,z:r}=n.camera.getPosition(),{x:t,y:e,z:r}=(o.value=`[${t.toFixed(3)},${e.toFixed(3)},${r.toFixed(3)}]`,console.log(`pos: [${t.toFixed(3)},${e.toFixed(3)},${r.toFixed(3)}]`),n.camera.getTarget());i.value=`[${t.toFixed(3)},${e.toFixed(3)},${r.toFixed(3)}]`,console.log(`moveTo: [${t.toFixed(3)},${e.toFixed(3)},${r.toFixed(3)}]`)}),e.innerHTML="dolly"===n.zoom?"ZOOM ON":"ZOOM OFF",e.dataset.enabled="dolly"===n.zoom?"true":"false",e.onclick=()=>{e.dataset.enabled="false"===e.dataset.enabled?"true":"false",e.innerHTML="false"===e.dataset.enabled?"ZOOM OFF":"ZOOM ON",n.RTRViewr.setGestures({mouse:{left:"rotate",middle:"none",right:"pan",wheel:"false"===e.dataset.enabled?"none":"dolly"},touches:{one:"false"===e.dataset.enabled?"rotate":"pan",two:"dolly-pan",three:"dolly-pan"}})};let t=document.querySelector("#rtr-change-upc");t.value=n.upc||n.token||"";r=null==t?void 0:t.nextElementSibling;t&&r&&(r.onclick=()=>{t.value.includes("TKN")?t.value&&t.value!==n.token&&n.updateToken(t.value):t.value&&t.value!==n.upc&&n.updateUpc(t.value)})}}},c=(t,e)=>{"tealium_data2track"in window?window.tealium_data2track.push({id:"Click",Tracking_Type:"link",data_element_id:e||"RTR_Events",data_description:t,data_analytics_available_call:"1"}):console.log({id:"Click",Tracking_Type:"link",data_element_id:e||"RTR_Events",data_description:t,data_analytics_available_call:"1"})};var P,C,S,O,j,M,A,N,F,D,B,q;class l{constructor({selector:t,version:e,upc:r,token:n,zoom:o,hdr:i,env:a,autoRotateCamera:s,showBackground:c,backgroundPath:l,clearColor:u,showEnvironment:d,boundingAreaTopLeftX:h,boundingAreaTopLeftY:f,boundingAreaBottomRightX:p,boundingAreaBottomRightY:v,metadata:m,minDistance:g,safeAreaEnabled:y,safeAreaWidthLeft:b,safeAreaWidthRight:w,initialPosition:_,hotPositionsEnabled:R,hotPositions:x,devMode:T,eventsAnalyticsId:k,accesibilityMode:E}){return Object.defineProperty(this,"libraryVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"versionToLoad",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"selector",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"upc",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"token",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"zoom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hdr",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"env",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"autoRotateCamera",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showBackground",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"backgroundPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clearColor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showEnvironment",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),P.set(this,void 0),Object.defineProperty(this,"boundingAreaTopLeftX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"boundingAreaTopLeftY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"boundingAreaBottomRightX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"boundingAreaBottomRightY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"minDistance",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"safeAreaEnabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"safeAreaWidthLeft",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"safeAreaWidthRight",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialPosition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hotPositionsEnabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hotPositions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),C.set(this,!1),Object.defineProperty(this,"RTRViewr",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"camera",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isFocus",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),S.set(this,!1),O.set(this,!0),j.set(this,void 0),Object.defineProperty(this,"selectorElem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),M.set(this,void 0),Object.defineProperty(this,"devMode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),A.set(this,!1),Object.defineProperty(this,"eventsAnalyticsId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"accesibilityMode",{enumerable:!0,configurable:!0,writable:!0,value:!1}),N.set(this,!1),F.set(this,""),D.set(this,!1),B.set(this,!1),q.set(this,""),this.RTRViewr=void 0,this.libraryVersion="7.1.3",this.version=e,this.selector=t,this.upc=r,this.token=n,this.zoom=o?"dolly":"none",this.hdr=i,this.env=a,this.autoRotateCamera=s||!1,this.showBackground=c||!1,this.backgroundPath=l||void 0,this.clearColor=u,this.showEnvironment=d||!1,this.boundingAreaTopLeftX=h,this.boundingAreaTopLeftY=f,this.boundingAreaBottomRightX=p,this.boundingAreaBottomRightY=v,this.minDistance=g,this.safeAreaEnabled=y,this.safeAreaWidthLeft=b,this.safeAreaWidthRight=w,this.initialPosition=_,this.hotPositionsEnabled=R,this.hotPositions=x||void 0,L(this,P,null,"f"),this.selectorElem=null,this.isFocus={focus:!1},this.metadata=m||{envs:{asset:"production",catalog:"production",ms:"production"},qa:!1},L(this,M,!1,"f"),this.devMode=T,L(this,A,!1,"f"),this.eventsAnalyticsId=k||void 0,this.accesibilityMode=E,this}load(){if(n(this,C,"f"))i("RTR already loaded","","err");else if(window.rtrViewer)L(this,C,!0,"f");else if(n(this,M,"f"))i("RTR is already loading","","err");else{L(this,M,!0,"f"),this.version&&this.version!==this.libraryVersion?(this.versionToLoad=this.version,i(`The version ${this.version} is different from the library version ${this.libraryVersion}. This may cause unexpected behavior.`,"","wait")):this.versionToLoad=this.libraryVersion;{var e=`https://rtr-viewer.luxottica.com/lib/v/${this.versionToLoad}/main.js`,r=()=>{L(this,C,!0,"f"),L(this,M,!1,"f"),o("RTR_lib_loaded",{id:this.selector})};let t=document.createElement("script");t.src=e,t.defer=!0,document.body.appendChild(t),t.onload=()=>{r&&r()},t.onerror=()=>{document.head.removeChild(t),r&&r(new Error("Failed to load script: "+e))}}}}async init(){this.RTRViewr=await new Promise(t=>{let e=!1,r,n=()=>{e=!0,clearTimeout(r)},o=()=>{e||(window.rtrViewer?(n(),t(window.rtrViewer)):setTimeout(o,300))};r=setTimeout(()=>{n(),i("rtrViewer not found within 5 seconds.","","err"),t(void 0)},1e4),o()}),this.RTRViewr&&(this.selector&&(this.selectorElem=document.querySelector(this.selector)),this.checkData(this))&&(this.selectorElem&&(this.selectorElem.style.position="relative"),i("READY","",""),this.RTRViewr.init({data:{selector:this.selector,id:{type:this.upc?"upc":"token",value:this.upc||this.token},environmentPath:this.hdr,backgroundPath:this.backgroundPath,settings:{showEnvironment:this.showEnvironment,showBackground:this.showBackground,clearColor:this.clearColor,orbitPoint:!1,pixelRatio:Math.min(window.devicePixelRatio,2),autoRotateCamera:this.autoRotateCamera,boundingArea:{topLeft:{x:this.boundingAreaTopLeftX||0,y:this.boundingAreaTopLeftY||0},bottomRight:{x:this.boundingAreaBottomRightX||1,y:this.boundingAreaBottomRightY||1}},gestures:{mouse:{left:"rotate",middle:"none",right:"pan",wheel:this.zoom},touches:{one:"rotate",two:"dolly-pan",three:"dolly-pan"}}}},metadata:this.metadata,callbacks:{onRendered:()=>{var t;!n(this,N,"f")&&!n(this,B,"f")||n(this,O,"f")||(n(this,N,"f")&&n(this,F,"f")!==this.upc&&(this.upc=n(this,F,"f")),n(this,B,"f")&&n(this,q,"f")!==this.token&&(this.token=n(this,q,"f")),n(this,D,"f")?L(this,D,!1,"f"):(L(this,N,!1,"f"),o("RTR_rendered",{id:this.selector}))),n(this,O,"f")&&(L(this,O,!1,"f"),this.customSettings(),c("rendered",this.eventsAnalyticsId),o("RTR_rendered",{id:this.selector})),this.initialPosition&&this.setInitialPosition(),null!=(t=null==(t=this.selectorElem)?void 0:t.querySelector("canvas"))&&t.addEventListener("wheel",()=>{"dolly"===this.zoom&&c("zoom",this.eventsAnalyticsId)},{once:!0}),this.devMode&&!n(this,A,"f")&&this.setDevMode()},onActions:({actions:t})=>{"rotate"in t&&t.rotate?(L(this,S,!0,"f"),o("RTR_startRotate",{id:this.selector,rotate:t.rotate})):n(this,S,"f")&&(L(this,S,!1,"f"),o("RTR_endRotate",{id:this.selector,rotate:!1}),c("rotate",this.eventsAnalyticsId)),o("RTR_actions",{id:this.selector,actions:t})},onFocus:({focus:t})=>{o("RTR_focus",{id:this.selector,focus:t}),this.isFocus=t},onError:({error:t})=>{i(""+t,"","err")}}}),this.enableAccesibilityMode)&&this.enableAccesibilityMode()}checkData(t){if(t)if(t.upc||t.token)if(t.upc&&t.token&&i("found both token and upc, upc will be used","","wait"),t.upc&&"string"!=typeof t.upc)i("upc must be a string","","err");else if(t.upc&&t.upc.includes("TKN"))i(`Token [${t.upc}] provided in UPC`,"","err");else{if(t.hdr&&6<=parseInt(t.versionToLoad.substring(0))&&!t.hdr.includes("jpg")&&i("With version >= 6, hdr image must be .jpg","","err"),!t.safeAreaEnabled||t.safeAreaWidthLeft&&t.safeAreaWidthRight||i("safeAreaWidthLeft and safeAreaWidthRight are required, if safeAreaEnabled","","err"),this.selectorElem)return!0;i("selector not found","","err")}else i("no upc or token provided","","err");else i("no data provided","","err")}customSettings(){this.camera=this.RTRViewr.getCameraControls(),this.safeAreaEnabled&&this.setSafeArea(),this.minDistance&&(this.camera.minDistance=this.minDistance),this.hotPositionsEnabled&&this.hotPositionsHandler()}setSafeArea(){this.selector&&this.selectorElem&&this.selectorElem.classList.add("RTR__safe_area_enabled"),L(this,P,document.querySelector(this.selector+" #rtr-bounding-area"),"f");var t=document.createElement("span"),e=document.createElement("span");t.style.cssText=` position:absolute; top:0; left:0; width:${this.safeAreaWidthLeft}; height:100%; pointer-events:all; cursor:default; `,e.style.cssText=` position:absolute; top:0; right:0; width:${this.safeAreaWidthRight}; height:100%; pointer-events:all; cursor:default; `,n(this,P,"f")&&(n(this,P,"f").appendChild(t),n(this,P,"f").appendChild(e))}hotPositionsHandler(){this.hotPositions&&0!==this.hotPositions.length?(a("RTR_startRotate",()=>{n(this,j,"f")&&clearTimeout(n(this,j,"f"))}),a("RTR_endRotate",()=>{L(this,j,setTimeout(this.setHotPosition.bind(this),1e3),"f")})):i("no hot position set","","err")}setHotPosition(){var t;!this.isFocus&&this.hotPositions&&(t=((r,t)=>{let n,o,i;return t.forEach((t,e)=>{i=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2)+Math.pow(r[2]-t[2],2),(!n||i{fetch(`https://vmcore.luxottica.com/api/rtr/v1/${n}/availability`).then(t=>t.json()).then(t=>{t[n]&&t[n].available?(i(`UPC ${n} is available`,"",""),e(!0)):e(!1)}).catch(t=>{i("Error: "+t,"","err"),r(t)})})}enableAccesibilityMode(){}}P=new WeakMap,C=new WeakMap,S=new WeakMap,O=new WeakMap,j=new WeakMap,M=new WeakMap,A=new WeakMap,N=new WeakMap,F=new WeakMap,D=new WeakMap,B=new WeakMap,q=new WeakMap,e.exports=l},{}],2:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Contents=void 0;var c=t("../../modules/analytics"),l=t("../../modules/utils"),u=n(t("./info_store")),i=n(t("@luxotticacontentteam/rtr")),d=t("../../main");function n(t){return t&&t.__esModule?t:{default:t}}function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(){C=function(){return a};var c,a={},t=Object.prototype,l=t.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o,i,a,s,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),n=new E(n||[]);return u(e,"_invoke",{value:(o=t,i=r,a=n,s=h,function(t,e){if(s===p)throw Error("Generator is already running");if(s===v){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=c,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;n=d(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}(r,a);if(r){if(r===m)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=p;r=d(o,i,a);if("normal"===r.type){if(s=a.done?v:f,r.arg===m)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s=v,a.method="throw",a.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var e={},w=(i(e,n,function(){return this}),Object.getPrototypeOf),w=w&&w(w(L([]))),_=(w&&w!==t&&l.call(w,n)&&(e=w),b.prototype=g.prototype=Object.create(e));function R(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(a,s){var e;u(this,"_invoke",{value:function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i,t=d(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==P(r)&&l.call(r,"__await")?s.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r(t=((t,e)=>{if("object"!=P(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=P(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==P(t)?t:t+""))(n.key),n)}}r.Contents=(()=>{function n(t){var e=t.stateManger,r=t.rtrSettings,t=t.trackingId;if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.RTR=null,this.json=window.ct_RTRBannerHome.json,this.stateManger=e,this.fistRender=!1,this.rtrSettings=r,this.trackingId=t,this.isUpdating=!1,this.initialized=!1}return t=n,(e=[{key:"init",value:function(){this.initialized||(this.buildHtml(),this.setupEventHandler(),this.initialized=!0)}},{key:"load",value:function(){var t=this;(0,l.eventCatcher)("ct_cm_rtr__loadData",function(){t.RTR=new i.default(t.rtrSettings),t.RTR.load()},!0),(0,l.eventCatcher)("RTR_lib_loaded",function(){t.RTR||(console.warn("โš ๏ธ RTR non ancora definito, lo inizializzo ora..."),t.RTR=new i.default(t.rtrSettings)),t.RTR.init(),console.log("โœ… RTR inizializzato correttamente su mobile")},!0)}},{key:"setupEventHandler",value:function(){(0,d.setupEventHandler)(this.RTR,this.container,this.progressBar,this.cursor,this.stateManger)}},{key:"getProductData",value:function(e){var t,r=window.ct_RTR_config&&window.ct_RTR_config.products_data&&window.ct_RTR_config.products_data[e.upc]?window.ct_RTR_config.products_data[e.upc]:e,n=null,n=(n=window.ct_cm__RTRBannerHomeConfig&&window.ct_cm__RTRBannerHomeConfig.products?window.ct_cm__RTRBannerHomeConfig.products.find(function(t){return t.upc===e.upc}):n)&&n.alternativeName&&""!==n.alternativeName.trim()?n.alternativeName:r&&r.name?r.name:"Prodotto Sconosciuto",o=window.ct_RTR_config.store_info.currency,i=(console.log("CURRENCY",o),!0);return r&&r.unavailable&&r.unavailable.stockLevelStatus&&r.unavailable.stockLevelStatus.value&&(i="inStock"!==r.unavailable.stockLevelStatus.value),"production"===this.stateManger.env&&(t=window.ct_RTR_config.products_data,[(t=Object.keys(t))[1],t[2]].filter(Boolean).map(function(t){return"https://vmcore.luxottica.com/".concat(t,"/webGL/").concat(t,"_LOD0/").concat(t,".glb")}).forEach(function(t){var e;document.querySelector('link[rel="prefetch"][href="'.concat(t,'"]'))||((e=document.createElement("link")).rel="prefetch",e.href=t,e.as="fetch",document.head.appendChild(e),console.log("Prefetch added:",t))})),{upc:e.upc,name:n,url:"/"+(window.ct_RTR_config&&window.ct_RTR_config.store_info&&window.ct_RTR_config.store_info.country?window.ct_RTR_config.store_info.country:"")+(r&&r.pdpUrl?r.pdpUrl:"#"),img:e.img,currency:o,price:r&&r.price?r.price.split(" ")[0]:"N/D",listPrice:r&&r.listprice?r.listprice.split(" ")[0]:null,hasOfferPrice:r&&1===r.promotionalFlag,isOutOfStock:i,shopNowText:(0,l.getTrad)(this.json.labels.shopNow,this.stateManger.infoStore)}}},{key:"buildHtml",value:(s=C().mark(function t(){var e,r,n,o,i,a;return C().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.container=document.querySelector(this.stateManger.selector),this.contents=this.container.querySelector(".ct_cm__contents"),this.texts=this.container.querySelector(".ct_cm__text"),this.texts.setAttribute("data-theme-dark",this.json.darkTheme),this.title=this.container.querySelector(".ct_cm_RTR__modelName"),this.body=this.container.querySelector(".ct_cm_RTR__body"),this.buttonsContainer=this.container.querySelector(".ct_cm_RTR__buttons"),this.buttonTemplate=this.container.querySelector(".ct_cm_RTR__product"),this.prodDetailsContainer=this.container.querySelector(".ct_cm_RTR__titles"),this.cta1=this.container.querySelector(".ct_cm_RTR__cta a:nth-child(1)"),this.viewerText=this.container.querySelector(".ct_cm_RTR__viewer_text span"),this.cursor=this.container.querySelector("#ct_cm_RTR__viewer_cursor"),this.progressBar=this.container.querySelector(".rtr_progress_contaienr .progress"),(o=this.container.querySelector(".ct_cm__loader picture"))&&((e=o.querySelector("source"))&&(e.srcset=window.ct_cm__RTRBannerHomeConfig.background.mobile),e=o.querySelector("img"))&&(e.src=window.ct_cm__RTRBannerHomeConfig.background.desktop),(o=document.querySelector(".ct_cm__scrolling_wrapper"))&&(e=(0,l.getTrad)(this.json.labels.rotationalText,this.stateManger.infoStore),a="true"===this.texts.getAttribute("data-theme-dark")?'\n \n \n \n ':'\n \n \n \n ',(0,d.createScrollingText)(o,e,a)),window.ct_RTR_config={brand:"OO",imagePath:"https://media.oakley.com/",env:"production",mocos:[],store:{},products_data:{},productsService:"https://www.oakley.com/oakleywebservices/rest/v1/oakley{{storeId}}/searchproducts/upc/{{listProducts}}"},t.next=20,(0,u.default)();case 20:if(window.ct_RTR_config.store_info=t.sent,"eu"===(r=window.ct_RTR_config.store_info.store)&&(r="roe",console.log("ROE")),0===(n=this.json.products.map(function(t){return t.upc})).length)return console.error("[โŒ ERRORE] Nessun UPC valido trovato nei prodotti!"),t.abrupt("return");t.next=27;break;case 27:return o="https://www.oakley.com/oakleywebservices/rest/v1/oakley".concat(r,"/searchproducts/upc/").concat(n.join(",")),t.prev=28,t.next=31,fetch(o);case 31:if((i=t.sent).ok){t.next=34;break}throw new Error("Errore nella chiamata API: ".concat(i.statusText));case 34:return t.next=36,i.json();case 36:(a=t.sent).products&&0\n ",(r=document.createElement("button")).id="next",r.classList.add("slider-button"),r.innerHTML="\n \n ",(c=document.createElement("div")).classList.add("slider-wrapper"),c.style.overflow="hidden",this.json.products.forEach(function(t,e){var r=l.getProductData(t),n=document.createElement("a"),o=(n.href=r.url,n.classList.add("slide-link"),n.dataset.upc=t.upc,(0,d.toCamelCase)(r.name)),o=(n.setAttribute("data-tracking-id","SlideLink_".concat(o)),n.setAttribute("data-tracking-description","".concat(o)),document.createElement("div")),t=(o.classList.add("slide"),o.dataset.upc=t.upc,document.createElement("div")),i=(t.classList.add("slide-img-wrapper"),document.createElement("img")),i=(i.src=r.img,i.alt=r.name,t.appendChild(i),o.appendChild(t),document.createElement("div")),t=(i.classList.add("slide-price-container"),document.createElement("span")),a=(t.classList.add("shop-now-label"),t.textContent=r.shopNowText,document.createElement("span"));a.classList.add("product-price"),a.innerHTML=r.isOutOfStock?'Out of Stock':r.hasOfferPrice&&r.listPrice?''.concat(r.currency).concat(r.price," ").concat(r.currency).concat(r.listPrice,""):"".concat(r.currency).concat(r.price),i.appendChild(t),i.appendChild(a),o.appendChild(i),n.appendChild(o),c.appendChild(n),0===e&&(s.textContent=r.name,o.classList.add("active"),o.style.opacity="1")}),t.appendChild(e),t.appendChild(c),t.appendChild(r),this.contents&&(this.container.insertBefore(t,this.contents),(0,d.setupSliderEvents)(c,e,r,this.updateProd.bind(this),function(t){(0,d.updateDots)(l.dotsContainer,t)}),this.dotsContainer=(0,d.addDotsNavigation)(this.container,this.json.products,d.updateSlider))):console.error("โŒ Errore: i dati dei prodotti non sono disponibili, impossibile costruire lo slider.")}},{key:"updateDots",value:function(r){this.dotsContainer&&this.dotsContainer.querySelectorAll(".slider-dot").forEach(function(t,e){t.classList.toggle("active",e===r)})}},{key:"buildTexts",value:function(){this.viewerText&&(this.viewerText.innerHTML=(0,l.getTrad)(this.json.labels.rotate,this.stateManger.infoStore)),this.body&&(this.body.innerHTML=(0,l.getTrad)(this.json.labels.body,this.stateManger.infoStore)),this.title&&this.json.labels.title&&(this.title.innerHTML=(0,l.getTrad)(this.json.labels.title,this.stateManger.infoStore)),this.cursor&&(this.cursor.innerHTML=(0,l.getTrad)(this.json.labels.cursor,this.stateManger.infoStore))}},{key:"buildModelSelector",value:function(){var u,d=this;window.ct_RTR_config.products_data?(u=document.createDocumentFragment(),this.json.products.forEach(function(t,e){var r,n,o,i,a,s,c,l;t.upc?((r=document.createElement("div")).classList.add("ct_cm_RTR__button_container"),(n=d.buttonTemplate.cloneNode(!0)).classList.add("ct_cm_RTR__product"),n.dataset.upc=t.upc,r.dataset.upc=t.upc,r.dataset.trackingId=d.trackingId,o=n.querySelector("img"),l=d.getProductData(t),o.src=l.img,o.alt=l.name,r.dataset.trackingDescription=l.name,console.log(l.name),o=l.isOutOfStock?'Out of Stock':l.hasOfferPrice&&l.listPrice?''.concat(l.currency).concat(l.price,'\n ').concat(l.currency).concat(l.listPrice,""):"".concat(l.currency).concat(l.price),(i=document.createElement("div")).classList.add("ct_cm_RTR__product_info"),(a=document.createElement("span")).classList.add("ct_cm_RTR__product_name"),a.textContent=l.name,(s=document.createElement("div")).classList.add("ct_cm_RTR__product_price_cta"),(c=document.createElement("a")).classList.add("ct_cm_RTR__shop_now"),c.href=l.url,c.rel="noopener noreferrer",c.textContent=l.shopNowText,l=l.name.replace(/\s(.)/g,function(t){return t.toUpperCase()}).replace(/\s/g,"").replace(/^(.)/,function(t){return t.toLowerCase()}),c.setAttribute("data-tracking-id","RTRPlacement_Shopnow_".concat(l)),c.setAttribute("data-tracking-description","".concat(l)),(l=document.createElement("span")).classList.add("ct_cm_RTR__product_price"),l.innerHTML=o,s.appendChild(c),s.appendChild(l),i.appendChild(a),i.appendChild(s),r.appendChild(n),r.appendChild(i),r.onclick=function(){d.isUpdating||(d.updateProd(n),d.isUpdating=!1)},0===e&&(n.classList.add("active"),r.classList.add("active")),u.appendChild(r)):console.error("[โŒ ERRORE] Prodotto senza UPC!",t)}),this.buttonsContainer.innerHTML="",this.buttonsContainer.appendChild(u)):console.warn("โš ๏ธ I dati dei prodotti non sono ancora disponibili.")}},{key:"updateProd",value:function(e){this.isUpdating=!0,this.progressBar.classList.add("loading"),this.progressBar.classList.remove("loaded");var t,r,n=e.dataset.upc;n&&"0"!==n?e.classList.contains("active")&&!this.isUpdating||(r=this.buttonsContainer.querySelector(".ct_cm_RTR__product.active"),t=this.buttonsContainer.querySelector(".ct_cm_RTR__button_container.active"),r&&r.classList.remove("active"),t&&t.classList.remove("active"),console.log("Cambiando prodotto a UPC: ".concat(n)),e.classList.add("active"),(r=e.closest(".ct_cm_RTR__button_container"))&&r.classList.add("active"),(t=this.json.products.find(function(t){return t.upc===e.dataset.upc}))?(this.prodDetailsContainer&&(r=this.prodDetailsContainer.querySelector(".ct_cm_RTR__modelName"))&&(r.innerHTML=t.name||"Nome Sconosciuto"),this.cta1&&t.url&&(this.cta1.dataset.trackingDescription=n,this.cta1.href=window.location.pathname+(0,l.getTrad)(t.url,this.stateManger.infoStore)),this.RTR.updateUpc(n),document.querySelector(".ct_cm__loader").classList.remove("ct_cm__loaded"),(r=document.querySelector(".slider-container"))&&(r.style.opacity="1",r.style.display="flex")):console.warn("[โš ๏ธ ERRORE] Nessun prodotto trovato con UPC ".concat(n))):console.error("[RTR] Errore: UPC non valido (".concat(n,") passato a RTR"))}}])&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r,s,o})()},{"../../main":5,"../../modules/analytics":6,"../../modules/utils":9,"./info_store":3,"@luxotticacontentteam/rtr":1}],3:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=function(){return new Promise(function(t,e){var r=location.origin.split("/")[2],n=window.location.href.split("/"),n=n[n.indexOf(r)+1].split("?")[0];t({lang:ct_Data.language,store:ct_Data.country.toLowerCase(),storeId:void 0,catalog:void 0,currency:Oakley.messages.currentCurrencySymbol,country:n,langID:void 0})})};r.default=n},{}],4:[function(t,e,r){var i=n(t("../../modules/stateManager")),a=t("../../modules/utils"),c=n(t("../../modules/lazy")),l=t("./contents"),u=n(t("./info_store"));function n(t){return t&&t.__esModule?t:{default:t}}function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(){C=function(){return a};var c,a={},t=Object.prototype,l=t.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o,i,a,s,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),n=new E(n||[]);return u(e,"_invoke",{value:(o=t,i=r,a=n,s=h,function(t,e){if(s===p)throw Error("Generator is already running");if(s===v){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=c,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;n=d(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}(r,a);if(r){if(r===m)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=p;r=d(o,i,a);if("normal"===r.type){if(s=a.done?v:f,r.arg===m)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s=v,a.method="throw",a.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var e={},w=(i(e,n,function(){return this}),Object.getPrototypeOf),w=w&&w(w(L([]))),_=(w&&w!==t&&l.call(w,n)&&(e=w),b.prototype=g.prototype=Object.create(e));function R(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(a,s){var e;u(this,"_invoke",{value:function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i,t=d(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==P(r)&&l.call(r,"__await")?s.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++r(t=((t,e)=>{if("object"!=P(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=P(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==P(t)?t:t+""))(n.key),n)}}new((()=>{function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.globalId="ct_RTRBannerHome",this.selector="#ct_cm--RTRBannerHome",this.dataObjId="ct_cm__RTRBannerHomeConfig",this.anlyticsTrakingId="RTRPlacement",this.brand="OO",this.stateManger=void 0,this.rtrSettings=void 0,this.json=void 0,(window[this.globalId]=this).init()}return e=t,(r=[{key:"init",value:(s=C().mark(function t(){var e,r=this;return C().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(0,a.customLog)("started"),t.next=3,(0,a.checkData)(this.dataObjId);case 3:return this.json=t.sent,this.stateManger=new i.default({selector:this.selector,brand:this.brand,device:{desk_min:1025,tab_max:1024,tab_min:768,mob_max:767},infoStore:void 0,variant:this.json.variant}),t.next=7,(0,u.default)();case 7:this.stateManger.infoStore=t.sent,e=0".concat(t," ").concat(e).repeat(6),r.appendChild(o)}var i=window.scrollY,a=r.scrollWidth/3,s=-.2*window.scrollY%a;r.style.transform="translateX(".concat(s,"px)"),function t(){var e=window.scrollY;s-=.2*(e-i),Math.abs(s)>=a&&(s+=a),r.style.transform="translateX(".concat(s,"px)"),i=e,requestAnimationFrame(t)}()},r.setupEventHandler=function(e,r,n,o,i){(0,a.eventCatcher)("RTR_rendered",function(t){t.id===e.selector&&(n.classList.remove("loading"),n.classList.add("loaded"),"desk"===i.device&&r.addEventListener("mousemove",function(t){o.style.transform="translate3d(".concat(t.clientX+16,"px, ").concat(t.clientY-r.getBoundingClientRect().top-8,"px, 0)")}),document.querySelector(".ct_cm__loader").classList.add("ct_cm__loaded"))})},r.setupSliderEvents=function(t,e,r,n,o){var i,a,s=0,c=t.querySelectorAll(".slide");"function"==typeof n&&(i=function(){l(t,s,n,o),u(0,e,r,s,c.length)},a=window.innerWidth<1025?"touchstart":"click",e.addEventListener(a,function(t){t.preventDefault(),0(t=((t,e)=>{if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);if("object"!=o(r=r.call(t,e||"default")))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==o(t)?t:t+""))(n.key),n)}}function i(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}r.default=i(function t(e){var r=e.selector,n=e.brand,o=e.imagePath,i=e.device,e=e.variant;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");if(t._instance)return t._instance;(t._instance=this).selector=r,this.brand=n,this.variant=e,this.env="production",this.imagePath=o,this.infoStore=null,this.device=(0,a.getDeviceType)(i)})},{"./utils":9}],9:[function(t,e,r){function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function C(){C=function(){return a};var c,a={},t=Object.prototype,l=t.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},n=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",o=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(c){i=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o,i,a,s,e=e&&e.prototype instanceof g?e:g,e=Object.create(e.prototype),n=new E(n||[]);return u(e,"_invoke",{value:(o=t,i=r,a=n,s=h,function(t,e){if(s===p)throw Error("Generator is already running");if(s===v){if("throw"===t)throw e;return{value:c,done:!0}}for(a.method=t,a.arg=e;;){var r=a.delegate;if(r){r=function t(e,r){var n=r.method,o=e.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=c,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;n=d(o,e.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;o=n.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}(r,a);if(r){if(r===m)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===h)throw s=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=p;r=d(o,i,a);if("normal"===r.type){if(s=a.done?v:f,r.arg===m)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s=v,a.method="throw",a.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=s;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",m={};function g(){}function y(){}function b(){}var e={},w=(i(e,n,function(){return this}),Object.getPrototypeOf),w=w&&w(w(L([]))),_=(w&&w!==t&&l.call(w,n)&&(e=w),b.prototype=g.prototype=Object.create(e));function R(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function x(a,s){var e;u(this,"_invoke",{value:function(r,n){function t(){return new s(function(t,e){!function e(t,r,n,o){var i,t=d(a[t],a,r);if("throw"!==t.type)return(r=(i=t.arg).value)&&"object"==P(r)&&l.call(r,"__await")?s.resolve(r.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):s.resolve(r).then(function(t){i.value=t,n(i)},function(t){return e("throw",t,n,o)});o(t.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var r,t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return r=-1,(t=function t(){for(;++rt.tab_max)return"desk";if(t.mob_maxt.mob_max)},r.loadScript=void 0;r.customLog=function(t,e){var r=2{var n=o(C().mark(function t(r,n,o){return C().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(e,t){"development"===r?n().then(function(t){e(t)}):o().then(function(t){console.log(t),e(t)})}));case 1:case"end":return t.stop()}},t)}));return function(t,e,r){return n.apply(this,arguments)}})(),r.getData=(()=>{var t=o(C().mark(function t(){var e,r;return C().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.next=7;break;case 4:e=t.sent,t.next=10;break;case 7:return t.next=9,fetch("./json/OO/json.json");case 9:e=t.sent;case 10:if(e.ok){t.next=12;break}throw new Error("Failed to fetch data. Status: ".concat(e.status));case 12:return t.next=14,e.json();case 14:return r=t.sent,t.abrupt("return",r);case 18:throw t.prev=18,t.t0=t.catch(0),new Error("Error fetching or parsing JSON: ".concat(t.t0.message));case 21:case"end":return t.stop()}},t,null,[[0,18]])}));return function(){return t.apply(this,arguments)}})();var n=r.checkData=function(r){return new Promise(function(t,e){window[r]?t(window[r]):setTimeout(function(){return n().then(t).catch(e)},300)})};r.clearData=function(t,e){var r=e,n=[];return t.forEach(function(t){(!t.countries&&!t.exceptCountries||!(t.countries&&"ALL"!==t.countries||t.exceptCountries&&0!=t.exceptCountries.length&&t.exceptCountries.includes(r))||t.countries&&t.countries.includes(r))&&n.push(t)}),n},r.loadScript=function(t,e){var r=document.createElement("script");return r.src=t,r.async=!0,document.head.appendChild(r),r.onload=function(){e&&e()},r.onerror=function(){document.head.removeChild(r),e&&e(new Error("Failed to load script: ".concat(t)))},e},r.getClosestPoint=function(r,t){var n,o=null,i=null;return t.forEach(function(t,e){n=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2)+Math.pow(r[2]-t[2],2),(!o||n".concat(t," ").concat(e).repeat(6),n.appendChild(o)}var i=window.scrollY,a=n.scrollWidth/3,c=-.2*window.scrollY%a;n.style.transform="translateX(".concat(c,"px)"),function t(){var e=window.scrollY;c-=.2*(e-i),Math.abs(c)>=a&&(c+=a),n.style.transform="translateX(".concat(c,"px)"),i=e,requestAnimationFrame(t)}()},n.setupEventHandler=function(e,n,r,o,i){(0,a.eventCatcher)("RTR_rendered",function(t){t.id===e.selector&&(r.classList.remove("loading"),r.classList.add("loaded"),"desk"===i.device&&n.addEventListener("mousemove",function(t){o.style.transform="translate3d(".concat(t.clientX+16,"px, ").concat(t.clientY-n.getBoundingClientRect().top-8,"px, 0)")}),document.querySelector(".ct_cm__loader").classList.add("ct_cm__loaded"))})},n.setupSliderEvents=function(t,e,n,r,o){var i,a,c=0,u=t.querySelectorAll(".slide");"function"==typeof r&&(i=function(){s(t,c,r,o),l(0,e,n,c,u.length)},a=window.innerWidth<1025?"touchstart":"click",e.addEventListener(a,function(t){t.preventDefault(),0t.tab_max)return"desk";if(t.mob_maxt.mob_max)},n.loadScript=void 0;n.customLog=function(t,e){var n=2{var r=o(T().mark(function t(n,r,o){return T().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(e,t){"development"===n?r().then(function(t){e(t)}):o().then(function(t){console.log(t),e(t)})}));case 1:case"end":return t.stop()}},t)}));return function(t,e,n){return r.apply(this,arguments)}})(),n.getData=(()=>{var t=o(T().mark(function t(){var e,n;return T().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,t.next=7;break;case 4:e=t.sent,t.next=10;break;case 7:return t.next=9,fetch("./json/OO/json.json");case 9:e=t.sent;case 10:if(e.ok){t.next=12;break}throw new Error("Failed to fetch data. Status: ".concat(e.status));case 12:return t.next=14,e.json();case 14:return n=t.sent,t.abrupt("return",n);case 18:throw t.prev=18,t.t0=t.catch(0),new Error("Error fetching or parsing JSON: ".concat(t.t0.message));case 21:case"end":return t.stop()}},t,null,[[0,18]])}));return function(){return t.apply(this,arguments)}})();var r=n.checkData=function(n){return new Promise(function(t,e){window[n]?t(window[n]):setTimeout(function(){return r().then(t).catch(e)},300)})};n.clearData=function(t,e){var n=e,r=[];return t.forEach(function(t){(!t.countries&&!t.exceptCountries||!(t.countries&&"ALL"!==t.countries||t.exceptCountries&&0!=t.exceptCountries.length&&t.exceptCountries.includes(n))||t.countries&&t.countries.includes(n))&&r.push(t)}),r},n.loadScript=function(t,e){var n=document.createElement("script");return n.src=t,n.async=!0,document.head.appendChild(n),n.onload=function(){e&&e()},n.onerror=function(){document.head.removeChild(n),e&&e(new Error("Failed to load script: ".concat(t)))},e},n.getClosestPoint=function(n,t){var r,o=null,i=null;return t.forEach(function(t,e){r=Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2)+Math.pow(n[2]-t[2],2),(!o||r