PageSourceSearch

https://www.rangerover.com/etc.clientlibs/jlr/clientlibs/clientlib…-dx-range-slider-js.8f6a4e4358fc00657eb1.js

js rangerover.com collected 2026-10-01 11:26:54 UTC 9,744 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["components-dx-range-slider-dx-range-slider-js"],{85570:function(t,e,n){n.r(e),n.d(e,{default:function(){return d}});var r=n(74692),i=n.n(r),a=n(54119);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){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}var d=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=e,this.slider=null,this.customConnectNamespace="DxRangeSlider-custom-connects",this.dataNameSpace="data-dxrangeslider-",this.dataConnectIndex="".concat(this.dataNameSpace,"index"),this.dataIsInitialised="".concat(this.dataNameSpace,"init");var r=n.start.length>1,i=r?14:25;this.options=Object.assign({},t.defaults,{customConnectSpacing:i,smallHandles:r},n),this.createSlider()}return e=t,n=[{key:"updateOptions",value:function(t){this.options=Object.assign(this.options,t)}},{key:"createStartArray",value:function(){var t=this.options.start;return Array.isArray(t)?t:[t]}},{key:"createSlider",value:function(){this.isInitialised()||(this.options.start=this.createStartArray(),this.createCustomConnects(),this.addCustomClasses(),this.initSlider(),this.createCustomControls(),this.addCustomConnectEvents())}},{key:"addCustomClasses",value:function(){var e=t.classes,n=e.modifierClass,r=e.smallHandleClass;this.element.classList.add("".concat(n).concat(this.options.direction)),this.element.classList.add("".concat(n).concat(this.options.theme)),this.element.classList.add("".concat(n).concat(this.options.sliderType)),this.options.smallHandles&&this.element.classList.add("".concat(n).concat(r))}},{key:"initSlider",value:function(){this.slider=noUiSlider.create(this.element,this.options),s(this.element.querySelectorAll(".noUi-touch-area")).forEach(function(t){t.addEventListener("mousedown",function(){i()&&i().fn.FocusSwitcher&&i()("body").FocusSwitcher("removeFocusClass")})}),this.setInitStatus("true")}},{key:"destroySlider",value:function(){var e=t.classes,n=e.modifierClass,r=e.smallHandleClass,i=e.customConnectClass,a=e.handleControlClass;this.element.classList.remove(r),this.element.classList.remove("".concat(n).concat(this.options.direction)),this.element.classList.remove("".concat(n).concat(this.options.theme)),this.element.classList.remove("".concat(n).concat(this.options.sliderType)),this.slider.off(".".concat(this.customConnectNamespace)),this.element.querySelectorAll(".".concat(i)).forEach(function(t){return t.parentNode.removeChild(t)}),this.element.querySelectorAll(".".concat(a)).forEach(function(t){return t.parentNode.removeChild(t)}),this.slider.destroy(),this.setInitStatus(null)}},{key:"isInitialised",value:function(){return this.element.getAttribute(this.dataIsInitialised)}},{key:"setInitStatus",value:function(t){this.element.setAttribute(this.dataIsInitialised,!!t||"")}},{key:"createCustomConnects",value:function(){var e=this,n=t.classes.customConnectClass,r=function(t){var r=document.createElement("div");return r.classList.add(n),0===t&&r.classList.add("".concat(n,"--first")),t===e.options.start.length&&r.classList.add("".concat(n,"--last")),r.setAttribute(e.dataConnectIndex,t),r};this.element.appendChild(r(0)),this.options.start.forEach(function(t,n){return e.element.appendChild(r(n+1))})}},{key:"addCustomConnectEvents",value:function(){var t=this,e="ltr"===this.options.direction?"left":"right",n=s(this.element.querySelectorAll("[".concat(this.dataConnectIndex,"]")));this.slider.on("update.".concat(this.customConnectNamespace),function(){var r=arguments.length<=4?void 0:arguments[4];
1n.forEach(function(i,a){var o=i,s=0===a,c=!n[a+1];if(s)return o.style.width="calc(".concat(r[0],"% - ").concat(t.options.customConnectSpacing,"px)"),void(o.style[e]="0px");if(c)return o.style.width="calc(100% - ".concat(r[a-1],"% - ").concat(t.options.customConnectSpacing,"px)"),void(o.style[e]="calc(".concat(r[a-1],"% + ").concat(t.options.customConnectSpacing,"px)"));var l=2*t.options.customConnectSpacing;o.style.width="calc(".concat(r[a],"% - ").concat(r[a-1],"% - ").concat(l,"px)"),o.style[e]="calc(".concat(r[a-1],"% + ").concat(t.options.customConnectSpacing,"px)")})})}},{key:"createCustomControls",value:function(){var e=this,n=function(e,n){var r=t.classes.handleControlClass,i=document.createElement("button");return i.classList.add(r),i.classList.add("".concat(r).concat(n)),i.innerHTML=e,i},r=this.getHandlesWrapper(),i=document.createElement("div");i.setAttribute("aria-live","polite"),i.classList.add("visuallyHidden"),(0,a.WH)(r,i),this.getHandles().forEach(function(t,o){var s=e.options.labels,c=n(s.decrement[o],"--decrement".concat(o)),l=n(s.increment[o],"--increment".concat(o)),u={decrementElement:c,incrementElement:l};(0,a.nc)(r,c),(0,a.WH)(r,l),e.setInitialButtonStateA11Y(u),c.addEventListener("click",function(n){n.preventDefault(),e.handleDecrement(o,u),i.innerHTML=t.getAttribute("aria-valuetext")}),l.addEventListener("click",function(n){n.preventDefault(),e.handleIncrement(o,u),i.innerHTML=t.getAttribute("aria-valuetext")})})}},{key:"setInitialButtonStateA11Y",value:function(t){(this.options.start[0]===this.options.range.min||this.options.start[0]===this.options.range.max)&&this.constructor.toggleDisabledStateA11y(t.decrementElement)}},{key:"handleIncrement",value:function(t,e){var n=this.slider.steps(),r=n&&n[t][1];if(r){var i=this.getHandleValue(t);this.slider.setHandle(t,i+r),this.constructor.toggleDisabledStateA11y(e.decrementElement,!0)}else this.constructor.toggleDisabledStateA11y(e.incrementElement)}},{key:"handleDecrement",value:function(t,e){var n=this.slider.steps(),r=n&&n[t][0];if(r){var i=this.getHandleValue(t);this.slider.setHandle(t,i-r),this.constructor.toggleDisabledStateA11y(e.incrementElement,!0)}else this.constructor.toggleDisabledStateA11y(e.decrementElement)}},{key:"getHandleValue",value:function(t){var e=this.slider.get();return Array.isArray(e)?Number(e[t]):Number(e)}},{key:"getHandlesWrapper",value:function(){return this.element.querySelector(".noUi-base")}},{key:"getHandles",value:function(){return s(this.element.querySelectorAll(".noUi-handle"))}},{key:"getSlider",value:function(){return this.slider}},{key:"connectHorizontalDragDealer",value:function(t){var e=this;["update","start","end"].forEach(function(n){return function(n){return e.slider.on(n,function(e){return t.setValue(e[0]/100,0,!1)})}(n)})}}],r=[{key:"toggleDisabledStateA11y",value:function(t){!0===(arguments.length>1&&void 0!==arguments[1]&&arguments[1])?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}}],n&&l(e.prototype,n),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}();d.defaults={theme:"light",direction:"ltr",sliderType:"range",labels:{decrement:["Decrease slider 1","Decrease slider 2"],increment:["Increase slider 1","Increase slider 2"]}},d.classes={modifierClass:"DxRangeSlider--",customConnectClass:"DxRangeSlider__custom-connect",handleControlClass:"DxRangeSlider__handle-control",smallHandleClass:"small-handles"}},54119:function(t,e,n){function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{CG:function(){return s},LV:function(){return a},WH:function(){return c},nc:function(){return l},oA:function(){return o}});var a=function(t,e){t.parentNode.insertBefore(e,t),e.appendChild(t)},o=function(t){for(var e=t.parentNode;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)},s=function(t,e){var n,i=(n=t)instanceof NodeList?r(n):[n];
1i.length&&(i[0].parentNode.insertBefore(e,i[0]),i.forEach(function(t){return e.appendChild(t)}))},c=function(t,e){return t.parentNode.insertBefore(e,t.nextSibling)},l=function(t,e){return t.parentNode.insertBefore(e,t)}}}]);

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.