PageSourceSearch

https://www.redken.eu/themes/redken/async-chunks/product-variant-selector-2278010f17667949d596-chunk.js

js redken.eu collected 2026-10-09 18:30:15 UTC 5,446 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwf_core_setup=self.webpackChunkwf_core_setup||[]).push([[3774],{3684:(t,e,n)=>{n.r(e),n.d(e,{default:()=>d});var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"variant-selector"},[t.variantsData.SectionTitle?e("h3",{staticClass:"variant-heading",attrs:{id:"variant-heading"}},[t._v("\n    "+t._s(t.variantsData.SectionTitle)+"\n  ")]):t._e(),t._v(" "),e("div",{staticClass:"variant-list",attrs:{role:"radiogroup","aria-labelledby":"variant-heading"}},[e("div",{staticClass:"sr-only",attrs:{"aria-live":"assertive","aria-atomic":"true"}},[t._v("\n      "+t._s(t.liveMessage)+"\n    ")]),t._v(" "),t._l(t.normalizedVariants,function(n,r){return e("a",{key:r,ref:"variant-".concat(r),refInFor:!0,staticClass:"variant-btn",attrs:{role:"radio","aria-checked":t.selectedIndex===r?"true":"false",href:n.url},on:{click:function(e){return e.preventDefault(),t.selectVariant(n,r)},keydown:function(e){return t.handleKeyDownFn(e,n,r)}}},[e("div",{staticClass:"variant-content"},[e("span",{staticClass:"variant-text variant-text--title"},[t._v(t._s(n.title))]),t._v(" "),e("span",{staticClass:"variant-text variant-text--size"},[t._v(t._s(n.size))])])])})],2)])};r._withStripped=!0;var a=n(5353),i=n(8790);function o(t){return o="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},o(t)}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function l(t,e,n){return(e=function(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const u={name:"product-variant-selector",props:{srtext:{type:String,default:"Showing details for"},variantsData:{type:Object,required:!0,default:function(){return{}}}},data:function(){return{liveMessage:"",selectedIndex:null}},computed:c(c({},(0,a.L8)("productShade",["getShades"])),{},{normalizedVariants:function(){return this.variantsData.VariantData||[]}}),mounted:function(){window.addEventListener("pageshow",this.handlePageShowFn),this.setSelectedFromUrlFn()},beforeDestroy:function(){window.removeEventListener("pageshow",this.handlePageShowFn)},methods:{handlePageShowFn:function(){this.setSelectedFromUrlFn()},selectVariant:function(t,e){this.liveMessage="",this.selectedIndex=e,this.liveMessage="".concat(this.srtext," ").concat(t.productName," ").concat(t.title," ").concat(t.size),this.pushVariantSelectEventFn(t),setTimeout(function(){window.location.href=t.url},1e3)},setSelectedFromUrlFn:function(){var t=this,e=window.location.origin+window.location.pathname,n=this.normalizedVariants.findIndex(function(n){return t.normalize(n.url)===t.normalize(e)});this.selectedIndex=-1!==n?n:null;var r=this.normalizedVariants[this.selectedIndex];this.liveMessage="",this.liveMessage="".concat(this.srtext," ").concat(r.productName," ").concat(r.title," ").concat(r.size)},handleKeyDownFn:function(t,e,n){var r=this.normalizedVariants.length-1,a=null;switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),a=0===n?r:n-1;break;case"ArrowDown":case"ArrowRight":t.preventDefault(),a=n===r?0:n+1;break;case"Enter":case" ":return t.preventDefault(),void this.selectVariant(e,n)}if(null!==a){var i=this.$refs["variant-".concat(a)],o=Array.isArray(i)?i[0]:i;null==o||o.focus()}},normalize:function(t){return t.replace(/\/$/,"").toLowerCase()},pushVariantSelectEventFn:function(t){var e,n=function(t){return t&&""!==t.toString().trim()?t.toString().trim().toLowerCase():"none"},r="none",a=new URLSearchParams(window.location.search).get("prescripted");["hairdiag","teleconsultation"].includes(a)&&(r=a);var o={event:"uaevent",event_name:"view_item",eventCategory:"Ecommerce",eventAction:"Product Detail|Variant selection",eventLabel:"".concat(n(t.productName),"::").concat(n(t.productId),"::").concat((0,i.IX)(this.getShades,n(t.size))),product_info:"".concat(n(t.productName),"::").concat(n(t.productId),"::").concat((0,i.IX)(this.getShades,n(t.size))),event_detail:"variant selection",ecommerce:{detail
1:{actionField:{},products:[{name:n(t.productName),id:n(t.productId),price:"none",brand:(null===(e=window.wsf)||void 0===e||null===(e=e.pageDetails)||void 0===e?void 0:e.brand)||"RED",category:n(t.productCategory),variant:(0,i.IX)(this.getShades,n(t.size)),dimension35:n(t.size),dimension36:n(this.getShades),dimension38:t.overallRating,dimension48:n(t.productId),dimension49:"not present",dimension59:t.totalRatings,dimension91:r}]}}};try{window.dataLayer&&window.dataLayer.push(o)}catch(t){console.warn("failed to push tag to dataLayer")}}}},d=(0,n(4486).A)(u,r,[],!1,null,null,null).exports}}]);

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.