!function(){function e(e,r,t,n,s,a,o){try{var u=e[a](o),c=u.value}catch(i){return void t(i)}u.done?r(c):Promise.resolve(c).then(n,s)}System.register(["./vendor-legacy.046e8265.js","./index-legacy.b746a8e2.js","./PreviewSearch-legacy.58d47faf.js","./utils-legacy.656ed80b.js"],(function(r){"use strict";var t,n,s,a,o,u,c,i,l;return{setters:[function(e){t=e.k,n=e.j},function(e){s=e.b,a=e.u,o=e.a,u=e.t,c=e.E},function(e){i=e.P},function(e){l=e.a}],execute:function(){var f=s.serverPreference.pagination.searchProblemsPreview;r("P",t((function(r){var t,d,p=a("components.problem_search");return n(i,{className:r.className,placeholder:r.placeholder||p(".placeholder"),noResultsMessage:p(".no_result"),onGetResultKey:function(e){return e.meta.id},onSearch:(t=regeneratorRuntime.mark((function e(t){var n,a,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.startsWith("*")&&(t=t.substr(1)),t){e.next=4;break}return e.abrupt("return",[]);case 4:return e.next=6,o.problem.queryProblemSet(Object.assign({locale:s.locale},r.queryParameters,{keyword:t,keywordMatchesId:!0,titleOnly:!0,skipCount:0,takeCount:f}));case 6:if(n=e.sent,a=n.requestError,c=n.response,!a){e.next=13;break}u.error(a(p)),e.next=14;break;case 13:return e.abrupt("return",c.result);case 14:return e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e)})),d=function(){var r=this,n=arguments;return new Promise((function(s,a){var o=t.apply(r,n);function u(r){e(o,s,a,u,c,"next",r)}function c(r){e(o,s,a,u,c,"throw",r)}u(void 0)}))},function(e){return d.apply(this,arguments)}),onRenderResult:function(e){return n(c,{children:n("div",{className:"title",children:l(e.meta,e.title,p)})})},onResultSelect:r.onResultSelect,onEnterPress:r.onEnterPress})})))}}}))}();
