PageSourceSearch

https://an-telecom.ru/cache/js/face8f2e19f94e6311a29ea72dc3025a.js

js an-telecom.ru collected 2026-10-07 23:16:18 UTC 12,481 bytes, 34 lines download raw bytes

1$(document).on('submit','form.ajax',function(){return diafan_ajax.init(this)});function error_position(k,form){var input=$("input[name="+k+"], textarea[name="+k+"], select[name="+k+"]",form),error=$(".error_"+k,form);if(error.css("position")!=="absolute")
2return;var off=input.offset();off.top+=input.outerHeight();off.left+=5;error.offset(off)}
3var diafan_ajax={before:{},success:{},tag:!1,init:function(form){this.tag=$("input[name=module]",form).val()+"_"+$("input[name=action]",form).val();if(this.before[this.tag]&&this.before[this.tag](form)===!1){return!1}
4$('input:submit, button',form).attr('disabled','disabled');$('.errors').hide();$('.error_input').removeClass('error_input');if(!$('input[name=ajax]',form).length){$(form).append('<input type="hidden" name="ajax" value="1">')}
5$(form).ajaxSubmit({success:function(result,statusText,xhr,form){diafan_ajax.result(form,result)}});$(".form :text, .form :password, .form input[type=email], .form input[type=tel], .form textarea, .form select, .form :radio, .form :checkbox",form).change(function(){$(".error_"+$(this).attr('name'),form).hide();$(this).removeClass('error_input')});return!1},result:function(form,result){$('input:submit, button',form).removeAttr('disabled');try{var response=$.parseJSON(result)}catch(err){$('body').append(result);$('.diafan_div_error').css('left',$(window).width()/2-$('.diafan_div_error').width()/2);$('.diafan_div_error').css('top',$(window).height()/2-$('.diafan_div_error').height()/2+$(document).scrollTop());$('.diafan_div_error_overlay').css('height',$('body').height());return!1}
6if(this.success[this.tag]&&this.success[this.tag](form,response)===!1){return!1}
7var captcha_update=$(form).find("input[name='captcha_update']").val();if(response.captcha){if(response.captcha=="recaptcha"){var c=$('.js_captcha',form).find('div').first();grecaptcha.reset(recaptcha[c.attr("id")])}else{$(".captcha",form).html(prepare(response.captcha)).show()}}
8if(!captcha_update&&response.errors){$.each(response.errors,function(k,val){if(k==0){if(!$(".error",form).length){$("#successmessage .succcess-text").html(prepare(val));if(form.data('event')){ing_events({category:'forms',action:'submit',label:form.data('event'),ya_label:form.data('event')})}}else{$(".error",form).addClass("error_message").html(prepare(val)).show()}}else{var input=$("input[name="+k+"], textarea[name="+k+"], select[name="+k+"]",form);$(".error_"+k,form).addClass("error_message").html(prepare(val)).show();if(input.length){input.addClass('error_input').addClass('focus_input');error_position(k,form)}}});$('.focus_input:first',form).focus();$('.focus_input').removeClass('focus_input')}
9if(response.result&&response.result=='success'){$(form).find('.inpattachment input:file').each(function(){if($(this).parents('.inpattachment').is(":hidden")){var clone=$(this).parents('.inpattachment');clone.before(clone.clone(!0));clone.prev('.inpattachment').show();var name=str_replace('hide_','',clone.prev('.inpattachment').find('input').val('').attr("name"),0);clone.prev('.inpattachment').find('input').val('').attr("name",name)}else{$(this).parents('.inpattachment').remove()}});$('input:file',form).removeClass('last');$('input:file',form).val('');if($('.inpimages',form).length){$('.images').text('')}}
10if(response.add){$('.'+$(form).attr("id")).append(prepare(response.add)).show()}
11if(response.redirect){if(form.data('event')){ing_events({category:'forms',action:'submit',label:form.data('event'),ya_label:form.data('event')})}
12window.location=response.redirect}
13if(response.data){$.each(response.data,function(k,val){if(k=="form"){k=form}
14if(val){$(k).html(prepare(val)).show();inputSelectStyler();loadItemsInCart()}else{$(".hoverform").hide();$("#shadow, #successmessage").show();$(form).children("input:not([name='norobo']), textarea").not(':button, :submit, :reset, :hidden, :checkbox, :radio').val('')}})}
15if(response.attachments){$.each(response.attachments,function(k,val){$(form).find(".attachment[name='"+k+"']").remove();$(form).find(".inpattachment input[name='"+k+"']").parents('.inpattachment').remove();$(form).find(".inpattachment input[name='hide_"+k+"']").parents('.inpattachment').before(prepare(val));$(form).find(".attachment[name='"+k+"']").show();if($(form).find(".inpattachment input[name='hide_"+k+"']").attr("max")>$(form).find(".attachment[name='"+k+"']").length){var clone=$(form).find("input[name='hide_"+k+"']").parents('.inpattachment');clone.before(clone.clone(!0));clone.prev('.inpattachment').show();clone.prev('.inpattachment').find('input').val('').attr("name",k)}})}
16if(response.images){$.each(response.images,function(k,val){$(form).find("input[name='"+k+"']").val('');$(form).find("input[name='"+k+"']").parents('div').first().find('.image').remove();if(val==!1){val=''}
17$(form).find("input[name='"+k+"']").before(prepare(val))})}
18if(response.hash){$('input[name=check_hash_user]').val(response.hash)}
19if(response.js){$('body').append(prepare(response.js))}
20return!1},}
21$(document).on('click','.error_message',function(){$(this).hide()});$(document).on('change',".inpfiles",function(){var inpattachment=$(this).parents('.inpattachment');if(!$(this).attr("max")||$(this).parents('form').find('input[name="'+$(this).attr("name")+'"], .attachment[name="'+$(this).attr("name")+'"]').length<$(this).attr("max")){var clone=$(this).parents('form').find('input[name="hide_'+$(this).attr("name")+'"]').parents('.inpattachment');clone.before(clone.clone(!0));clone.prev('.inpattachment').show().find('input').val('').attr("name",$(this).attr("name"))}
22if(!inpattachment.find(".inpattachment_delete").length){inpattachment.append(' <a href="javascript:void(0)" class="inpattachment_delete">x</a>')}});$(document).on('click',".inpattachment_delete",function(){var inpattachment=$(this).parents('.inpattachment');var input=inpattachment.find('.inpfiles');var last_input=input.parents('form').find('input[name="'+input.attr("name")+'"]').last();if(last_input.val()){var clone=$(this).parents('form').find('input[name="hide_'+input.attr("name")+'"]').parents('.inpattachment');clone.before(clone.clone(!0));clone.prev('.inpattachment').show().find('input').val('').attr("name",input.attr("name"))}
23inpattachment.remove();return!1});$(document).on('click',".attachment_delete",function(){var attachment=$(this).parents('.attachment');attachment.find("input[name='hide_attachment_delete[]']").attr("name","attachment_delete[]");attachment.hide().removeClass('attachment');var last_input=attachment.parents('form').find('input[name="'+attachment.attr("name")+'"]').last();if(!last_input.length||last_input.val()){var clone=$(this).parents('form').find("input[name='hide_"+attachment.attr("name")+"']").parents('.inpattachment');clone.before(clone.clone(!0));clone.prev('.inpattachment').show();clone.prev('.inpattachment').find('input').val('').attr("name",attachment.attr("name"))}
24return!1});$(document).on('change',".inpimages",function(){var form=$(this).parents('form');var self=$(this);form.ajaxSubmit({dataType:'json',data:{ajax:1,images_param_id:self.attr('param_id'),images_prefix:self.attr('prefix'),action:'upload_image'},beforeSubmit:function(a,form,o){$('.errors').hide()},success:function(response){if(response.hash){$('input[name=check_hash_user]').val(response.hash)}
25if(response.data){self.prev('.images').html(prepare(response.data));self.val('')}
26if(response.errors){$.each(response.errors,function(k,val){form.find(".error"+(k!=0?"_"+k:'')).html(prepare(val)).show()})}}})});$(document).ready(function(){if($(window).width()<768){$('.tablescrollable').doubleScroll()}
27$('.gift .js-phone').mask('+7 (999) 999-99-99');if(location.href=="https://an-telecom.ru/nomera-8-800/dlya-yuridicheskih-lic"||location.href=="https://an-telecom.ru/nomera-8-800/dlya-fizicheskih-lic"){$(".seo-text.inner-bkg.no-margin-left-right").after('<a id="how_buy_8800"></a>');$("#how_buy_8800").after('<form method="POST" enctype="multipart/form-data" action="" class="ajax js_bs_form bs_form"><input type="hidden" name="module" value="bs"><input type="hidden" name="action" value="click"><input type="hidden" name="banner_id" value="0"></form><section class="how_to_buy_8800_outer container"></section>');setTimeout(function(){$(".how_to_buy_8800_outer.container").load("/nomera-8-800 .how_to_buy_8800_outer.container");$(".section-block2.numbers-8-800-shopping.city-numbers-shopping").load("/nomera-8-800 .section-block2.numbers-8-800-shopping.city-numbers-shopping",function(response,status,xhr){var swiper1=new Swiper(".serias-slider",{slidesPerView:13,paginationClickable:!1,spaceBetween:10,mousewheelControl:!0,autoplay:0,nextButton:".slider-next",prevButton:".slider-prev",loop:!1,slidesOffsetBefore:25,slidesOffsetAfter:25,breakpoints:{1000:{slidesPerView:10,},600:{slidesPerView:8,},400:{slidesPerView:5,}}});$(".tabs .vkladka-content").mCustomScrollbar({scrollButtons:{enable:!1},});$(".numbers-cart .list .inner").mCustomScrollbar({scrollButtons:{enable:!1}});$('input:not([class*="comagic-"]), select:not([class*="comagic-"])').styler({fileBrowse:'Обзор'});$.getScript("/custom/an_telecom/modules/cart/js/cart.show_block.js",function(){console.log("Script cart.show_block.js loaded but not necessarily executed.")})})},3000)}});$(document).on('click',".image_delete",function(){var image=$(this).parents('.image');var form=$(this).parents('form');$.ajax({url:window.location.href,type:'POST',dataType:'json',data:{module:form.find('input[name=module]').val(),action:'delete_image',ajax:!0,element_id:form.find('input[name=id]').val(),tmpcode:form.find('input[name=tmpcode]').val(),id:image.find('img').attr('image_id'),check_hash_user:$('input[name=check_hash_user]').val()},success:(function(response){if(response.hash){$('input[name=check_hash_user]').val(response.hash)}})});image.remove();return!1});$(".timecalendar").each(function(){var st=$(this).attr('showtime');if(st&&st.match(/true/i)){$(this).datetimepicker({dateFormat:'dd.mm.yy',timeFormat:'hh:mm'}).mask('@@.@@.@@@@ @@:@@')}else{$(this).datepicker({dateFormat:'dd.mm.yy'}).mask('@@.@@.@@@@')}});$(document).on('keydown','input[type=number], input.number',function(evt){evt=(evt)?evt:((window.event)?event:null);if(evt){var elem=(evt.target)?evt.target:(evt.srcElement?evt.srcElement:null);
27if(elem){var charCode=evt.charCode?evt.charCode:(evt.which?evt.which:evt.keyCode);if((charCode<32)||(charCode>44&&charCode<47)||(charCode>95&&charCode<106)||(charCode>47&&charCode<58)||charCode==188||charCode==191||charCode==190||charCode==110){return!0}else{return!1}}}});$('.js_mask').each(function(){$(this).mask($(this).attr('mask'))});$(".error:empty").hide();$(document).on('click','.spoiler .spoiler_btn',function(){$(this).parent().addClass('open');return!1});$(document).on('click','a[rel=large_image]',function(){var self=$(this);window.open(self.attr("href"),'','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+(self.attr("width")*1+40)+',height='+(self.attr("height")*1+40));return!1});function prepare(string){string=str_replace('&lt;','<',string);string=str_replace('&gt;','>',string);string=str_replace('&amp;','&',string);return string}
28function str_replace(search,replace,subject,count){f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0}
29for(i=0,sl=s.length;i<sl;i++){if(s[i]===''){continue}
30for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=(temp).split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length}}}
31return sa?s:s[0]}
32function get_selected(element,parent){var option=(typeof element=='string')?$(element+" option:first-child",parent):$("option:first-child",element);$(element,parent).find("option").each(function(){if($(this).attr("selected")==="selected"){option=$(this);return!1}});return option}
33$(document).ready(function(){$("a.scroll-to").on("click",function(e){e.preventDefault();var anchor=$(this).attr('href');$('html, body').stop().animate({scrollTop:$(anchor).offset().top-60},800)});if(window.location.pathname=='/kupit-virtualnyiy-nomer/pryamye-gorodskie-nomera/omsk'){setTimeout(function(){changeSelectVal(51,34,'73812');recountTypes(51,1);$('a[rel="tab51"]').trigger('click')},1500)}
34if(window.location.pathname=='/kupit-virtualnyiy-nomer/pryamye-gorodskie-nomera/spb'){setTimeout(function(){changeSelectVal(59,34,'7812');recountTypes(59,1);$('a[rel="tab59"]').trigger('click')},1500)}})

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.