text: webpackJsonp([1],{"/KFX":function(t,e,a){"use strict";var n=a("AHJT"),s=a("2a5Q"),r=a("VU/8"),o=r(n.a,s.a,!1,null,null,null);e.a=o.exports},"2a5Q":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("form",{attrs:{method:"POST"},on:{submit:function(e){e.preventDefault(),t.hitAPI(e)}}},[a("div",{staticClass:"field"},[a("label",{staticClass:"label",attrs:{for:"search_companies"}},[t._v("Search for Companies")]),t._v(" "),a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.query.company,expression:"query.company"}],staticClass:"input",attrs:{name:"search_companies",type:"text",placeholder:"Search Company"},domProps:{value:t.query.company},on:{input:function(e){e.target.composing||t.$set(t.query,"company",e.target.value)}}})]),t._v(" "),t.query.company?t._e():a("p",{staticClass:"help"},[t._v("Use the search above to search for organisations based out of India")])]),t._v(" "),t._m(0)]),t._v(" "),a("br"),t._v(" "),t.results?a("div",t._l(t.results,function(e,n){return a("div",{key:e.id,staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title"},[t._v("\n          "+t._s(n+1)+" "+t._s(e.split(" ").map(function(t){return t[0].toUpperCase()+t.substr(1).toLowerCase()}).join(" "))+"\n        ")])])])})):t._e(),t._v(" "),t.noresults?a("div",[t._v("\n    No results found.\n  ")]):t._e()])},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"field"},[a("button",{staticClass:"button is-primary",attrs:{type:"submit"}},[t._v("Search")])])}],r={render:n,staticRenderFns:s};e.a=r},AHJT:function(t,e,a){"use strict";e.a={name:"search",data:function(){return{query:this.defaultQueryParams(),results:null,noresults:!1,errors:{}}},methods:{hitAPI:function(){var t=this;t.$http.get("https://emis.snapmint.com/get_company.json?q="+t.query.company,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(e){t.results=e.data,t.noresults=0===e.data.length||!1}).catch(function(e){t.errors=e})},defaultQueryParams:function(){return{company:null,time:Date.now(),type:"COMPANY"}}}}},M93x:function(t,e,a){"use strict";function n(t){a("dbNj")}var s=a("xJD8"),r=a("l2oJ"),o=a("VU/8"),i=n,u=o(s.a,r.a,!1,i,null,null);e.a=u.exports},NHnr:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("7+uW"),s=a("mtWM"),r=a.n(s),o=a("M93x"),i=a("YaEn");n.a.prototype.$http=r.a,n.a.config.productionTip=!1,new n.a({el:"#app",router:i.a,template:"<App/>",components:{App:o.a}})},YaEn:function(t,e,a){"use strict";var n=a("7+uW"),s=a("/ocq"),r=a("/KFX");n.a.use(s.a);var o=[{path:"/companies",name:"Search",component:r.a}];e.a=new s.a({mode:"history",routes:o})},dbNj:function(t,e){},l2oJ:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container",attrs:{id:"app"}},[a("main",[a("router-view")],1)])},s=[],r={render:n,staticRenderFns:s};e.a=r},xJD8:function(t,e,a){"use strict";e.a={name:"app"}}},["NHnr"]);
  //# sourceMappingURL=app.c194976438b9e5a58782.js.map