PageSourceSearch

https://legendasochi.ru/bitrix/components/slam/easyform/script.min.js?17564738816496

js legendasochi.ru collected 2026-10-10 02:27:54 UTC 6,496 bytes, 1 lines download raw bytes

1if(void 0!==JCEasyForm&&$.isFunction(JCEasyForm))console.log("reconnection attempt JCEasyForm");else{var JCEasyForm=function(a){if("object"==typeof a){if(!window.jQuery)return console.log("Form error: Connect jQuery"),!1;this.form=$("#"+a.FORM_ID),this.modalForm=$("#frm-modal-"+a.FORM_ID),this.modalFormOld=$("#modal"+a.FORM_ID),this.params=a,this.isModal=!1,JCEasyForm.prototype.init(this)}};JCEasyForm.prototype.init=function(_this){if(!_this.form.length)return console.log("Form error: ID form no search. Specify the form ID in the easyform."),!1;if(!window.jQuery)return console.log("Form error: Connect jQuery"),!1;if(_this.params.SEND_AJAX&&!window.jQuery.ajax)return console.log("Form error: Connect jQuery ajax"),!1;if(_this.modalForm.length&&($.fn.modal?_this.isModal=!0:console.log("Form error: the bootstrap library is not connected. You can connect the bootstrap library in the easyform configuration.")),_this.params.FORM_SUBMIT&&_this.modalFormOld.length&&$.fn.modal&&_this.modalFormOld.modal("show"),_this.form.find(".alert-success").hasClass("hidden")||setTimeout(function(){_this.form.find(".alert-success").addClass("hidden")},4e3),_this.switchSelect(),_this.params.USE_CAPTCHA&&_this.captcha(),"Y"==_this.params.USE_FORMVALIDATION_JS){if("Y"==_this.params.USE_FORM_MASK_JS)try{Inputmask({oncomplete:function(){$(this).attr("required")&&_this.form.data("bootstrapValidator").updateStatus($(this).attr("name"),"VALID",null)},onincomplete:function(){$(this).attr("required")&&_this.form.data("bootstrapValidator").updateStatus($(this).attr("name"),"INVALID",null)},onKeyValidation:function(a,t){t&&$(this).attr("required")&&_this.form.data("bootstrapValidator").updateStatus($(this).attr("name"),"NOT_VALIDATED",null)}}).mask(document.querySelectorAll("input[type=tel]"))}catch(a){console.log("error inputmask")}}else if("Y"==_this.params.USE_FORM_MASK_JS)try{Inputmask({clearIncomplete:!0}).mask(document.querySelectorAll("input[type=tel]"))}catch(a){console.log("error inputmask")}_this.params.SEND_AJAX?"Y"==_this.params.USE_FORMVALIDATION_JS?_this.form.bootstrapValidator().on("success.form.bv",function(e){if(e.preventDefault(),"Y"==_this.params.USE_FORMVALIDATION_JS&&!_this.form.data("bootstrapValidator").isValid())return!1;try{var dataParams=_this.form.serializeArray(),oldParams=_this.params.OLD_PARAMS;for(var i in oldParams)dataParams.push({name:"arParams["+i+"]",value:oldParams[i]});_this.form.find(".submit-button").addClass("spinner"),$.ajax({type:"POST",url:_this.params.TEMPLATE_FOLDER,data:dataParams,success:function(data){if(data=JSON.parse(data),"ok"===data.result){try{var funcName=_this.params._CALLBACKS;funcName?eval(funcName)(data):_this._showMessage(!0,data.message)}catch(a){_this._showMessage(!0,data.message)}setTimeout(function(){_this.form.find(".alert").addClass("hidden")},4e3),_this._resetForm()}else _this._showMessage(!1,data.message);_this.form.find(".submit-button").removeClass("spinner"),_this.form.find('[disabled="disabled"]').removeAttr("disabled")},error:function(){_this._showMessage(!1)}})}catch(e){console.log("error ajax")}return!1}):_this.form.on("submit",function(e){if(e.preventDefault(),"Y"==_this.params.USE_FORMVALIDATION_JS&&!_this.form.data("bootstrapValidator").isValid())return!1;try{_this.form.find(".submit-button").addClass("spinner");var dataParams=_this.form.serializeArray(),oldParams=_this.params.OLD_PARAMS;for(var i in oldParams)dataParams.push({name:"arParams["+i+"]",value:oldParams[i]});$.ajax({type:"POST",url:_this.params.TEMPLATE_FOLDER,data:dataParams,success:function(data){if(data=JSON.parse(data),"ok"===data.result){try{var funcName=_this.params._CALLBACKS;funcName?eval(funcName)(data):_this._showMessage(!0,data.message)}catch(a){_this._showMessage(!0,data.message)}_this._resetForm()}else _this._showMessage(!1,data.message);_this.form.find(".submit-button").removeClass("spinner"),_this.form.find('[disabled="disabled"]').removeAttr("disabled")},error:function(){_this._showMessage(!1)}})}catch(e){console.log("error ajax")}return!1}):"Y"==_this.params.USE_FORMVALIDATION_JS&&_this.form.bootstrapValidator().on("success.form.bv",function(a){if
1("Y"==_this.params.USE_FORMVALIDATION_JS&&!_this.form.data("bootstrapValidator").isValid())return!1})},JCEasyForm.prototype.captcha=function(){function a(a){"Y"==t.params.USE_FORMVALIDATION_JS&&(void 0!==a?$('input[name="captchaValidator"]').val(1):$('input[name="captchaValidator"]').val(""),t.form.bootstrapValidator("updateStatus","captchaValidator","NOT_VALIDATED").bootstrapValidator("validateField","captchaValidator"))}var t=this;try{setTimeout(function(){grecaptcha.render(t.params.FORM_ID+"-captchaContainer",{sitekey:t.params.CAPTCHA_KEY,callback:a,"expired-callback":a})},500)}catch(a){}},JCEasyForm.prototype._showMessage=function(a,t){var e,s,r,o;if(e=this.form.find(".alert"),void 0===a||!e.length)return!1;s=e.filter(".alert-success"),r=e.filter(".alert-danger"),!0===a?(e.addClass("hidden"),this.isModal?($(".modal").modal("hide"),this.modalForm.find(".ok-text").html(t),this.modalForm.modal("show")):(o=t||s.data("message"),s.html(o),s.removeClass("hidden"))):!1===a?(e.addClass("hidden"),o=t||r.data("message"),r.html(o),r.removeClass("hidden")):e.addClass("hidden")},JCEasyForm.prototype._resetForm=function(){var t=this;setTimeout(function(){if("Y"==t.params.USE_FORMVALIDATION_JS&&t.form.data("bootstrapValidator").resetForm(!0),t.form[0].reset(),t.form.find(".switch-select").find("select").trigger("refresh"),t.params.USE_CAPTCHA)try{grecaptcha.reset()}catch(a){}var a=t.form.find(".file-extended");a.length&&(a.find(".file-placeholder-tbody").html(""),t.form.find(".file-selectdialog-switcher").attr("style",""),a.parent().find('input[type="hidden"]').remove())},1e3)},JCEasyForm.prototype.switchSelect=function(){var a=this.form.find(".switch-select");if(a.length){var o=this;a.each(function(){var a=$(this),t=a.find(".switch-parent"),e=a.find(".switch-child"),s=a.find(".btn-switch-back"),r=a.find("select");r.length&&s.length&&e.length&&t.length&&(r.on("change",function(){void 0!==r.find("option:selected").data("switch")&&(t.addClass("hidden"),e.removeClass("hidden"))}),s.on("click",function(a){a.preventDefault(),t.removeClass("hidden"),e.addClass("hidden"),r.find("option").eq(0).prop("selected",!0),setTimeout(function(){r.trigger("refresh")},1)}),o.form.on("reset",function(){t.removeClass("hidden"),e.addClass("hidden"),r.find("option").eq(0).prop("selected",!0),setTimeout(function(){r.trigger("refresh")},1)}))})}}}

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.