!function(){"use strict";function t(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var e={exports:{}},r={exports:{}};!function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(r),function(t){var e=r.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:k(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var d={};function y(){}function v(){}function w(){}var g={};f(g,s,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(O([])));b&&b!==o&&i.call(b,s)&&(g=b);var x=w.prototype=y.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,r){function n(o,a,c,s){var u=p(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):r.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,s)}))}s(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function k(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=_(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=p(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:T}}function T(){return{value:void 0,done:!0}}return v.prototype=w,a(x,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:v,configurable:!0}),v.displayName=f(w,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},L(j.prototype),f(j.prototype,u,(function(){return this})),r.AsyncIterator=j,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new j(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(x),f(x,l,"Generator"),f(x,s,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=O,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(e);var n=e.exports(),o=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}function i(t,e,r){var n="";if(t&&2===(t=t.split(" ")).length){var o=t[0].split("-");if(3===o.length){switch(n=(+o[2]).toString(),+o[1]){case 1:n+=" января";break;case 2:n+=" февраля";break;case 3:n+=" марта";break;case 4:n+=" апреля";break;case 5:n+=" мая";break;case 6:n+=" июня";break;case 7:n+=" июля";break;case 8:n+=" августа";break;case 9:n+=" сентября";break;case 10:n+=" октября";break;case 11:n+=" ноября";break;case 12:n+=" декабря"}if(r&&(n+=" "+o[0]),e){var i=t[1].split(":");3===i.length&&(n+=" "+i[0]+":"+i[1])}}}return n}function a(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var s;function u(t){if(t&&t.length){var e,r=jQuery(".news-scroller"),n=a(t);try{for(n.s();!(e=n.n()).done;){var o=e.value,c='\n                <a href="/news/'.concat(o.alias,'" class="news-block">\n                    <div class="news-title"><h3>').concat(o.title,'</h3></div>\n                    <div class="news-text">').concat(o.introtext,'</div>\n                    <div class="news-footer">\n                        <div class="news-date">\n                            <div class="news-date-value">').concat(i(o.created,!1,!0),"</div>\n                        </div>\n                    </div>\n                </a>\n            ");r.append(jQuery.parseHTML(c))}}catch(t){n.e(t)}finally{n.f()}r.append(jQuery.parseHTML('<div style="min-width: 200px; height: 1px;"></div>')),function(){var t=jQuery(".news-wrapper .news-arrow-wrapper.left > button.news-btn-arrow"),e=jQuery(".news-wrapper .news-arrow-wrapper.right > button.news-btn-arrow"),r=(a=2,c=3,s=jQuery(".news-wrapper .news-scroller"),u=jQuery(".news-wrapper .news-scroller .news-block").length,f=function(t){void 0===t&&(n=t=0),o=window.innerWidth<1251?a:c,i=parseInt(u/o);var e=t*o+1;s.animate({scrollLeft:jQuery(".news-wrapper .news-scroller .news-block:nth-child(".concat(e,")")).get(0).offsetLeft-10},600)},h=function(){return n>0&&f(n-=1),{isFirstPage:n<1,isLastPage:n>i-2}},p=function(){return n<i-1&&f(n+=1),{isFirstPage:n<1,isLastPage:n>i-2}},f(),{scrollToLeft:h,scrollToRight:p});var n,o,i,a,c,s,u,f,h,p;l(t,!0);var d=function(){var n=r.scrollToLeft(),o=n.isFirstPage,i=n.isLastPage;l(t,o),l(e,i)},y=function(){var n=r.scrollToRight(),o=n.isFirstPage,i=n.isLastPage;l(e,i),l(t,o)},v=window.innerWidth;jQuery(window).resize((function(){(v>1250&&window.innerWidth<1251||v<1251&&window.innerWidth>1250)&&(v=window.innerWidth,d())})),t.on("click",d),e.on("click",y)}()}else jQuery(".news-wrapper").hide()}function l(t,e){t&&(e?t.addClass("disabled"):t.removeClass("disabled"))}jQuery((s=o.mark((function t(){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!jQuery(".news-wrapper")[0]){t.next=10;break}if(window.C_catNom||window.C_orgNom||window.C_search||window.C_type){t.next=9;break}return t.next=5,new Promise((function(t,e){jQuery.ajax({type:"POST",url:"?option=com_uslugi&view=news&task=getLastArticles",data:{count:12},success:function(e){try{if(e=JSON.parse(e),console.info("news",e),!e||!e.length)throw new Error("empty data");t(e)}catch(e){console.error("getLastArticles error",e.message),t()}}})}));case 5:u(t.sent),t.next=10;break;case 9:jQuery(".news-wrapper").hide();case 10:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=s.apply(e,r);function a(e){t(i,n,o,a,c,"next",e)}function c(e){t(i,n,o,a,c,"throw",e)}a(void 0)}))}))}();
