text: (window.webpackJsonp=window.webpackJsonp||[]).push([[12],{"5mFU":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("1OyB"),a=n("vuIU"),i=n("rePB"),o=function(){function t(e,n){Object(r.a)(this,t),Object(i.a)(this,"_topic",void 0),Object(i.a)(this,"_page",void 0),Object(i.a)(this,"_title",void 0),this._topic=e,this._page=n?n.replace(/[0-9]+-/,"").replace(/\.md$/,""):"Introduction",this._title=t.createTitle(this._topic,this._page)}return Object(a.a)(t,[{key:"getTopic",value:function(){return this._topic}},{key:"getPage",value:function(){return this._page}},{key:"getTitle",value:function(){return this._title}},{key:"getLink",value:function(){return encodeURI(encodeURI("/content/".concat(this._topic,"/").concat(this._page)))}}],[{key:"createTitle",value:function(t,e){var n=t.charAt(0).toUpperCase()+t.slice(1),r=e.replace(/[0-9]+-/,"").replace(/\.md$/,"");return"".concat(n," - ").concat(r)}}]),t}()},"8dkK":function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search",function(){return n("easm")}])},easm:function(t,e,n){"use strict";n.r(e),n.d(e,"__N_SSG",(function(){return j})),n.d(e,"default",(function(){return z}));var r=n("q1tI"),a=n.n(r),i=n("8Kt/"),o=n.n(i),c=n("5M6V"),u=n("Tred"),s=n.n(u),l=n("nOHt"),h=n("1OyB"),f=n("vuIU"),v=n("rePB");function d(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}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,o=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){c=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(c)throw i}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _=function(){function t(e,n){Object(h.a)(this,t),Object(v.a)(this,"_a",void 0),Object(v.a)(this,"_b",void 0),Object(v.a)(this,"_aSize",void 0),Object(v.a)(this,"_bSize",void 0),Object(v.a)(this,"_d",void 0),this._a=e,this._b=n,this._aSize=e.length,this._bSize=n.length,this._d=new Array(e.length+1).fill(0).map((function(){return new Array(n.length+1).fill(0)}))}return Object(f.a)(t,[{key:"min",value:function(t,e){return Math.min(t,e)}},{key:"max",value:function(t,e){return Math.max(t,e)}},{key:"lev",value:function(t,e){for(var n=1;n<=t;n++)this._d[n][0]=n;for(var r=1;r<=e;r++)this._d[0][r]=r;for(var a=1;a<=e;a++)for(var i=1;i<=t;i++){var o=0;o=this._a[i]===this._b[a]?0:1,this._d[i][a]=Math.min(this._d[i-1][a]+1,this._d[i][a-1]+1,this._d[i-1][a-1]+o)}return this._d[t][e]}},{key:"run",value:function(){var t=this.lev(this._aSize,this._bSize),e=this._aSize-this._bSize===0?1:this._aSize-this._bSize;return t/Math.abs(e)}}]),t}();var b=n("2hU1"),y=n.n(b),g=n("YFqc"),m=n.n(g),w=a.a.createElement;function O(t){var e=t.page;t.color;return w(m.a,{href:"".concat("/cs-essentials","/content/[topic]/[page]"),as:"".concat("/cs-essentials").concat(e.getLink())},w("a",null,w("div",{className:" ".concat(y.a.searchCard)},w("div",{className:y.a.searchCardTitle},w("span",{className:y.a.searchCardTopic},e.getTopic()),w("span",{className:y.a.searchCardPage},e.getPage())))))}var S=n("5mFU"),k=n("A8zT"),T=a.a.createElement,j=!0;function z(t){var e=t.pages,n=Object(l.useRouter)(),r=0,a=[],i=e.map((function(t){return new S.a(t.topic,t.page)}));return void 0!==n.query.query&&(a=function(t,e){var n,r=[],a=d(e);try{for(a.s();!(n=a.n()).done;){var i=n.value,o=i.getTitle(),c=new _(t,o).run();c<1.09&&r.push({page:i,ratio:c})}}catch(u){a.e(u)}finally{a.f()}return r.sort((function(t,e){return t.ratio<e.ratio?-1:t.ratio>e.ratio?1:0}))}(n.query.query,i)),T(c.a,null,T(o.a,null,T("title",null,"Search - "+k.a.COMPLETE_TITLE)),T("div",{className:s.a.contentContainer},T("div",{className:s.a.searchResults},T("div",{className:s.a.searchResultsTitle},"Search Results"),a.map((function(t){return T(O,{page:t.page,key:t.page.getTitle(),color:"backColor".concat(r=r%7+1)})})))))}},vuIU:function(t,e,n){"use strict";function r(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,r.key,r)}}function a(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return a}))}},[["8dkK",0,2,1,3]]]);