vendor: 4,505 bytes, lines 1-2
1/*! For license information please see 2447.515250d355e90ae4c193.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[2447],{92447:(t,e,n)=>{n.d(e,{Z:()=>_});var r=n(19755),o=n.n(r),i=n(98860),s=n(72193),a=n(35140),u=n(80637),c=n(68309);function l(t){return l="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},l(t)}function h(){h=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,o){var i=e&&e.prototype instanceof p?e:p,s=Object.create(i.prototype),a=new D(o||[]);return r(s,"_invoke",{value:_(t,n,a)}),s}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var d={};function p(){}function y(){}function g(){}var v={};u(v,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==e&&n.call(w,i)&&(v=w);var m=g.prototype=p.prototype=Object.create(v);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function o(r,i,s,a){var u=f(t[r],t,i);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==l(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,s,a)}),(function(t){o("throw",t,s,a)})):e.resolve(h).then((function(t){c.value=t,s(c)}),(function(t){return o("throw",t,s,a)}))}a(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function _(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=x(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=f(r,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 j(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(t){if(t||""===t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}throw new TypeError(l(t)+" is not iterable")}return y.prototype=g,r(m,"constructor",{value:g,configurable:!0}),r(g,"constructor",{value:y,configurable:!0}),y.displayName=u(g,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},k(O.prototype),u(O.prototype,s,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
2ise);var s=new O(c(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},k(m),u(m,a,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=P,D.prototype={constructor:D,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(L),!t)for(var e in this)"t"===e.charAt(0)&&n.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(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(s)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function f(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){f(i,r,o,s,a,"next",t)}function a(t){f(i,r,o,s,a,"throw",t)}s(void 0)}))}}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,O(r.key),r)}}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function b(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},w.apply(this,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function k(t,e,n){return(e=O(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}const _=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(P,t);var e,r,f,p,O,_,x,j,L,D=(j=P,L=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=m(j);if(L){var n=m(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return b(t)}(this,t)});function P(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,P),k(b(e=D.call(this,y(y({},t),{},{el:t.el||".js-control-search-bar"}))),"state",{tabIndex:0,value:"",results:[],isOpened:!1,isCloseButtonVisible:!1,isLoading:!1}),k(b(e),"fetchDebouncedSuggestions",i.default.debounce((function(t){return e.fetchSuggestions(t)}),500)),e.options=t,e.options.shouldGetLastValue&&e.getLastQueryValue(),e}return e=P,r=[{key:"_classes",value:function(){return y(y({},w(m(P.prototype),"_classes",this).call(this)),{},{label:"js-input-label",searchBar:"js-search-bar-input",suggestions:"js-search-bar-suggestions",suggestion:"js-search-bar-suggestion",dropDown:"js-search-bar-dropdown",closeButton:"js-search-close-suggestions",loadingMessage:"js-suggestions-loading"})}},{key:"events",value:function(){var t;return y(y({},w(m(P.prototype),"events",this).call(this)),{},(k(t={},"blur ".concat(this._selector("label")),i.default.bind(this.handleLabelBlur,this)),k(t,"blur ".concat(this._selector("dropDown")),i.default.bind(this.handleSuggestionsBlur,this)),k(t,"keydown ".concat(this._selector("searchBar")),i.default.bind(this.handleInputKeyPress,this)),k(t,"keydown ".concat(this._selector("dropDown")),i.default.bind(this.handleSuggestionsKeyPress,this)),k(t,"input ".concat(this._selector("searchBar")),i.default.bind(this.handleInputChange,this)),k(t,"click ".concat(this._selector("searchBar")),i.default.bind(this.handleInputClick,this)),k(t,"click ".concat(this._selector("closeButton")),i.default.bind(this.handleCloseButtonClick,this)),k(t,"mousedown ".concat(this._selector("dropDown")),i.default.bind(this.handleInsideClick,this)),k(t,"mousedown ".concat(this._selector("closeButton")),i.default.bind(this.handleInsideClick,this)),k(t,"click ".concat(this._selector("suggestions")),i.default.bind(this.handleSuggestionClick,this)),t))}},{key:"handleInputChange",value:(x=d(h().mark((function t(e){var n,r,o,s,a;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.state.value=e.currentTarget.value,!(n=this.getLengthWithoutSpaces())){t.next=10;break}if(this.changeCloseButtonVisibility(!0),r=this.options,o=r.searchQueryName,s=r.data,a=void 0===s?this._elem("suggestions").data():s,!(n>1)){t.next=8;break}return t.next=8,this.fetchDebouncedSuggestions({data:y(k({},o,this.state.value),a),onRequestEnd:i.default.bind(this.handleRequestSuggestionsEnd,this)});case 8:t.next=13;break;case 10:this.changeCloseButtonVisibility(!1),this.hideDropDown(),this.state.results=[];case 13:case"end":return t.stop()}}),t,this)}))),function(t){return x.apply(this,arguments)})},{key:"handleInputKeyPress",value:function(t){var e=this.state.tabIndex,n=this.getLengthWithoutSpaces();if(0===e&&n&&"Enter"===t.key){var r=this.options.searchQueryName,o=this.state.value;return location.href=this.buildHref({params:k({},r,o)}),void this.hideDropDown()}this.switchBetweenSuggestions(t)}},{key:"handleSuggestionsKeyPress",value:function(t){this.switchBetweenSuggestions(t)}},{key:"handleInputClick",value:function(t){a.Z.isMobile()&&(0,c.Z)(this._selector("searchBar"),this.$el,24),this.state.results.length&&t.currentTarget.value&&this.showDropDown()}},{key:"handleLabelBlur",value:function(t){var e=(null==t?void 0:t.relatedTarget)&&o()(t.relatedTarget),n=i.default.values(this._classes());i.default.some(n,(function(t){return!!e&&e.hasClass(t)}))||this.hideDropDown()}},{key:"handleSuggestionsBlur",value:function(t){null!=t&&t.relatedTarget||this.hideDropDown()}},{key:"handleCloseButtonClick",value:function(){this._elem("searchBar").val(""),this.hideDropDown(),this.changeCloseButtonVisibility(!1),this._elem("searchBar").trigger("focus"),this.state.results=[]}},{key:"handleInsideClick",value:function(){return!1}},{key:"handleSuggestionClick",value:function(t){var e=this.options.onSuggestionClick;(void 0===e?i.default.noop:e)(t)}},{key:"switchBetweenSuggestions",value:function(t){var e,n=this.state,r=n.isOpened,o=n.tabIndex;r&&("Escape"===t.key&&this.hideDropDown(),"ArrowDown"===t.key?(e=this.$el.find(".js-tab-".concat(o+1)))&&e[0]&&(this.state.tabIndex+=1,e.trigger("focus")):"ArrowUp"===t.key&&(e=this.$el.find(".js-tab-".concat(o-1)))&&e[0]&&(this.state.tabIndex-=1,e.trigger("focus")))}},{key:"fetchSuggestions",value:(_=d(h().mark((function t(e){var n,r,o,a,u,c;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.data,r=e.onRequestEnd,o=void 0===r?i.default.noop:r,a=this.options.requestUrl,u=this.state.results,t.prev=3,u.length||this.setIsLoading(!0),t.next=7,s.Z.deprecatedRequest({url:a,data:y(y({},n),{},{lang:APP.promoLang})});case 7:c=t.sent,this.state.results=c,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),this.state.results=[];case 14:return t.prev=14,this.setIsLoading(!1),o(),t.finish(14);case 18:case"end":return t.stop()}}),t,this,[[3,11,14,18]])}))),function(t){return _.apply(this,arguments)})},{key:"handleRequestSuggestionsEnd",value:(O=d(h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.state.results.length){t.next=7;break}return t.next=4,this.renderSuggestions();case 4:this.showDropDown(),t.next=9;break;case 7:this._elem("suggestions").empty(),this.hideDropDown();case 9:case"end":return t.stop()}}),t,this)}))),function(){return O.apply(this,arguments)})},{key:"renderSuggestions",value:(p=d(h().mark((function t(){var e,r,o,s,a,u,c,l,f,d,p,y=this;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([n.e(5786),n.e(2
210)]).then(n.t.bind(n,30210,23));case 2:return e=t.sent,r=e.default,o=this.options,s=o.searchButtonText,a=o.searchQueryName,u=o.baseUri,c=this.state,l=c.results,f=c.value,d=i.default.map(l,(function(t){var e="".concat(u).concat(t.section?t.section+"/":"").concat(t.slug,"/");return{href:y.buildHref({uri:e}),title:t.title}})),t.next=9,r({suggestions:d,searchButtonText:s,baseUri:u,href:this.buildHref({params:k({},a,f)})});case 9:p=t.sent,this._elem("suggestions").html(p);case 11:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"showDropDown",value:function(){this.state.isOpened||(this.state.tabIndex=0,o()(window).on("keydown",(function(t){"ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.preventDefault()})),this._elem("label").addClass("search-bar--dropdown-opened"),this._elem("dropDown").removeClass("hidden"),this.state.isOpened=!0)}},{key:"hideDropDown",value:function(){this.state.isOpened&&(this._elem("label").removeClass("search-bar--dropdown-opened"),this._elem("dropDown").addClass("hidden"),o()(window).off("keydown"),this.state.isOpened=!1)}},{key:"changeCloseButtonVisibility",value:function(t){var e=this.state.isCloseButtonVisible;e&&!t?(this._elem("closeButton").addClass("hidden"),this.state.isCloseButtonVisible=!1):!e&&t&&(this._elem("closeButton").removeClass("hidden"),this.state.isCloseButtonVisible=!0)}},{key:"getLastQueryValue",value:(f=d(h().mark((function t(){var e,n;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.options.searchQueryName,(n=(0,u.Z)(e))&&(this._elem("searchBar").val(n),this.changeCloseButtonVisibility(!0));case 3:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"setIsLoading",value:function(t){t&&!this.state.isLoading?(this._elem("suggestions").addClass("hidden"),this._elem("loadingMessage").removeClass("hidden"),this.showDropDown(),this.state.isLoading=!0):!t&&this.state.isLoading&&(this._elem("loadingMessage").addClass("hidden"),this._elem("suggestions").removeClass("hidden"),this.hideDropDown(),this.state.isLoading=!1)}},{key:"buildHref",value:function(t){var e=t.params,n=t.uri,r=new URL("".concat(location.origin).concat(n||this.options.uri));return e&&i.default.each(e,(function(t,e){r.searchParams.append(e,t)})),r.href}},{key:"getLengthWithoutSpaces",value:function(){return this.state.value.trim().length}}],r&&g(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),P}(n(25977).Z)}}]);
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.