protected function registerClientScripts()
    {
        $view = $this->getView();
        NoUiSliderAsset::register($view);

        $id = $this->sliderOptions['id'];
        $varName = $this->getUniqueId('slider_');

        if ($this->clientOptions !== false) {
            $options = empty($this->clientOptions) ? '{}' : Json::htmlEncode($this->clientOptions);
            $view->registerJs(<<<JS
var $varName = document.getElementById('$id');
noUiSlider.create($varName, {$options});
JS
            );
        }

        $this->registerClientEvents($varName);
    }