jQuery(window).on('elementor:init', function () {

    'use strict';

    var e = elementor.modules.controls.BaseData, n = e.extend({

        ui: function t() {

            var t = e.prototype.ui.apply(this, arguments);

            t.inputs = '[type="radio"]';

            return t

        }, events: function () {

            return _.extend(e.prototype.events.apply(this, arguments), {

                'mousedown label': 'onMouseDownLabel',

                'mouseover label': 'onMouseOverLabel',

                'click @ui.inputs': 'onClickInput',

                'change @ui.inputs': 'onBaseInputChange'

            })

        }, onMouseOverLabel: function (e) {

            var t = this.$(e.currentTarget), r = jQuery(window).height(), n = t.offset(), a = r / 2, o = t.find('.imagelarge'), i = {

                left: n.left + t.width(),

                top: 0

            };

            if (n.top <= a) {

                o.removeClass('preview-top');

                i.top = n.top + t.height() + 17

            }





            else {

                o.addClass('preview-top');

                i.top = n.top - 7

            }

            ;

            o.css(i)

        }, onMouseDownLabel: function (e) {

            var n = this.$(e.currentTarget), t = this.$('#' + n.attr('for'));

            t.data('checked', t.prop('checked'));

            this.ui.inputs.removeClass('checked');

            t.data('checked', t.addClass('checked'))

        }, onClickInput: function (e) {

            if (!this.model.get('toggle')) {

                return

            }

            var t = this.jQuery(e.currentTarget);

            if (t.data('checked')) {

                t.prop('checked', !1).trigger('change')

            }

        }, onRender: function () {

            e.prototype.onRender.apply(this, arguments);

            var t = this.getControlValue();

            if (t) {

                this.ui.inputs.filter('[value="' + t + '"]').prop('checked', !0);

                this.ui.inputs.filter('[value="' + t + '"]').addClass('checked')

            }

        }

    }, {

        onPasteStyle: function (e, t) {

            return '' === t || undefined !== e.options[t]

        }

    });

    elementor.addControlView('imagechoose', n)

});