<commit_before>/*
 * @license Angular-DateRangePicker-Plus v0.1.16
 */
(function () {
    var picker;

    picker = angular.module('daterangepicker', []);

    picker.value('dateRangePickerConfig', {
        separator: ' - ',
        format: 'YYYY-MM-DD'
    });

    picker.directive('dateRangePicker', ['$compile', '$timeout', '$parse', 'dateRangePickerConfig', function ($compile, $timeout, $parse, dateRangePickerConfig) {
        return {
            require: 'ngModel',
            restrict: 'A',
            scope: {
                dateMin: '=min',
                dateMax: '=max',
                model: '=ngModel',
                opts: '=options'
            },
            link: function ($scope, element, attrs, modelCtrl) {
                var el, opts, _formatted, _init, _picker, _validateMax, _validateMin;
                el = $(element);
                opts = angular.extend({}, dateRangePickerConfig, $scope.opts);
                _picker = null;

                var setStartDate = function (newValue) {
                    $timeout(function () {
                        var m = moment(newValue);
                        if (_picker.endDate < m)
                            _picker.setEndDate(m);
                        _picker.setStartDate(m);
                    });
                };

                var setEndDate = function (newValue) {
                    $timeout(function () {
                        var m = moment(newValue);
                        if (_picker.startDate > m)
                            _picker.setStartDate(m);
                        _picker.setEndDate(m);
                    });
                };

                $scope.$watch('model.startDate', function (newValue) {
                    setStartDate(newValue);
                });

                $scope.$watch('model.endDate', function (newValue) {
                    setEndDate(newValue);
                });
                
                _formatted = function (viewVal) {
                    var f;
                    f = function (date) {
                        if (!moment.isMoment(date)) {
                            return moment(date).format(opts.format);
                        }
                        return date.format(opts.format);
                    };
                    if (opts.singleDatePicker) {
                        return f(viewVal.startDate);
                    } else {
                        return [f(viewVal.startDate), f(viewVal.endDate)].join(opts.separator);
                    }
                };

                _validateMin = function (min, start) {
                    var valid;
                    min = moment(min);
                    start = moment(start);
                    valid = min.isBefore(start) || min.isSame(start, 'day');<commit_msg>start blank<commit_after>/*
 * @license Angular-DateRangePicker-Plus v0.1.16
 */
(function () {
    var picker;

    picker = angular.module('daterangepicker', []);

    picker.value('dateRangePickerConfig', {
        separator: ' - ',
        format: 'YYYY-MM-DD'
    });

    picker.directive('dateRangePicker', ['$compile', '$timeout', '$parse', 'dateRangePickerConfig', function ($compile, $timeout, $parse, dateRangePickerConfig) {
        return {
            require: 'ngModel',
            restrict: 'A',
            scope: {
                dateMin: '=min',
                dateMax: '=max',
                model: '=ngModel',
                opts: '=options'
            },
            link: function ($scope, element, attrs, modelCtrl) {
                var el, opts, _formatted, _init, _picker, _validateMax, _validateMin;
                el = $(element);
                opts = angular.extend({}, dateRangePickerConfig, $scope.opts);
                _picker = null;

                var setStartDate = function (newValue) {
                    $timeout(function () {
                        var m = moment(newValue);
                        if (_picker.endDate < m)
                            _picker.setEndDate(m);
			if(newValue)
			    _picker.setStartDate(m);
                    });
                };

                var setEndDate = function (newValue) {
                    $timeout(function () {
                        var m = moment(newValue);
                        if (_picker.startDate > m)
                            _picker.setStartDate(m);
			if(newValue)
                            _picker.setEndDate(m);
                    });
                };

                $scope.$watch('model.startDate', function (newValue) {
                    setStartDate(newValue);
                });

                $scope.$watch('model.endDate', function (newValue) {
                    setEndDate(newValue);
                });
                
                _formatted = function (viewVal) {
                    var f;
                    f = function (date) {
                        if (!moment.isMoment(date)) {
                            return moment(date).format(opts.format);
                        }
                        return date.format(opts.format);
                    };
                    if (opts.singleDatePicker) {
                        return f(viewVal.startDate);
                    } else {
                        return [f(viewVal.startDate), f(viewVal.endDate)].join(opts.separator);
                    }
                };

                _validateMin = function (min, start) {
                    var valid;
                    min = moment(min);
                    start = moment(start);
                    valid = min.isBefore(start) || min.isSame(start, 'day');
{'fraction_non_alphanumeric': 0.11451870235773799, 'fraction_numerical': 0.0014181882644921113, 'mean_word_length': 1.1314695882130714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1063173', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1332, 'n_words': 260}