text: (window.webpackJsonp=window.webpackJsonp||[]).push([[0],{209:function(n,e,t){"use strict";t.r(e);var r=t(2),a=t(0),i=t.n(a),o=t(5),c=t.n(o),l=t(4),u={fintech:{stripe:["Lydia","Test","cksjn","cshcgvsj","dywtsns"]}},s=i.a.createContext(),f=function(n){var e=n.children,t=Object(a.useState)(u),r=Object(l.a)(t,1)[0];return i.a.createElement(s.Provider,{value:{startups:r,getAlternatives:function(n,e){return r[n][e]},getSections:function(){return Object.keys(r)},getStartupsBySection:function(n){return Object.keys(r[n])}}},e)},d=t(3),m=t(73),p=t.n(m),b=t(74),x=t.n(b),h=t(82),g=t(35),v=function(n){n.style;return i.a.createElement("svg",{width:"39px",height:"39px",viewBox:"0 0 39 39",version:"1.1",xmlnsXlink:"http://www.w3.org/1999/xlink"},i.a.createElement("g",{transform:"translate(-324.000000, -328.000000) translate(12.000000, 163.000000) translate(1.000000, 107.000000) translate(311.000000, 58.000000)",fillRule:"nonzero",stroke:"none",strokeWidth:1,fill:"none"},i.a.createElement("circle",{fill:"#4153B8",cx:"19.5",cy:"19.5",r:"19.5"}),i.a.createElement("rect",{fill:"#FFF",x:"18.5714286",y:"6.68571429",width:"1.48571429",height:"5.94285714"}),i.a.createElement("circle",{fill:"#FFF",cx:"19.5",cy:"6.12857143",r:"1.67142857"}),i.a.createElement("g",{transform:"translate(7.000000, 10.000000)"},i.a.createElement("rect",{fill:"#FFF",x:0,y:0,width:25,height:20,rx:10}),i.a.createElement("rect",{fill:"#CCF0FF",x:"2.94117647",y:"4.81481481",width:"19.1176471",height:"10.3703704",rx:"5.18518519"}),i.a.createElement("g",{transform:"translate(6.617647, 8.518519)",fill:"#0465C0"},i.a.createElement("ellipse",{cx:"1.47058824",cy:"1.48148148",rx:"1.47058824",ry:"1.48148148"}),i.a.createElement("ellipse",{cx:"10.6617647",cy:"1.48148148",rx:"1.47058824",ry:"1.48148148"})))))},w=t(34);function y(){var n=Object(r.a)(["\n  border-radius: 5px;\n  @media only screen and (max-width: 600px) {\n    width: 80vw;\n  }\n"]);return y=function(){return n},n}function E(){var n=Object(r.a)(["\n  padding: 10px 14px;\n  color: white;\n  background: rgba(65, 83, 184, 1);\n  border: none;\n  margin: 0;\n  font-size: 18px;\n  font-weight: bold;\n"]);return E=function(){return n},n}function j(){var n=Object(r.a)(["\n  padding: 10px;\n  width: 80%;\n  margin: 20px 0;\n  display: block;\n  box-shadow: 0px 0px 0px 2px rgba(65, 83, 184, 0.7);\n  border: none;\n  transition: all 200ms ease;\n\n  &:focus {\n    outline: none;\n    box-shadow: 0px 0px 1px 2px rgba(65, 83, 184, 0.7);\n  }\n\n  ::-webkit-input-placeholder {\n    color: rgba(136, 144, 151, 0.7);\n    font-style: italic;\n  }\n  ::-moz-placeholder {\n    color: rgba(136, 144, 151, 0.7);\n    font-style: italic;\n  }\n  :-ms-input-placeholder {\n    color: rgba(136, 144, 151, 0.7);\n    font-style: italic;\n  }\n"]);return j=function(){return n},n}function O(){var n=Object(r.a)(["\n  color: #889097;\n  line-height: 1.5;\n  margin: 0;\n  border: none;\n  appearance: none;\n  padding: 0;\n  text-decoration: underline;\n  cursor: pointer;\n\n  &:hover,\n  &:focus {\n    color: #222;\n    outline: none;\n  }\n"]);return O=function(){return n},n}function k(){var n=Object(r.a)(["\n  z-index: 99;\n  display: flex;\n  align-items: center;\n  background: rgba(0, 0, 0, 0.4);\n"]);return k=function(){return n},n}function S(){var n=Object(r.a)(["\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n"]);return S=function(){return n},n}function F(){var n=Object(r.a)(["\n  position: relative;\n  margin-left: 50px;\n  z-index: 1;\n\n  @media only screen and (max-width: 900px) {\n    margin-left: 0;\n  }\n"]);return F=function(){return n},n}function C(){var n=Object(r.a)(["\n  display: flex;\n  flex-flow: wrap;\n"]);return C=function(){return n},n}function z(){var n=Object(r.a)(["\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 150%;\n  z-index: 0;\n  transform: translateX(-25%);\n\n  @media only screen and (max-width: 900px) {\n    left: 50%;\n    width: auto;\n    max-height: 500px;\n    transform: translateX(-50%);\n  }\n\n  @media only screen and (max-width: 600px) {\n    left: 0;\n    transform: translateX(-10%);\n    width: 120%;\n  }\n"]);return z=function(){return n},n}function A(){var n=Object(r.a)(["\n  min-width: 320px;\n  max-width: 375px;\n  height: 500px;\n  overflow: auto;\n  -webkit-overflow-scrolling: touch;\n  padding: 50px 20px 20px;\n  background: #fff;\n  border-radius: 50px;\n  z-index: 3;\n  position: relative;\n  box-shadow: 0 32px 44px 0 rgba(64, 68, 90, 0.2);\n\n  @media only screen and (max-width: 900px) {\n    padding-top: 30px;\n    margin: auto;\n  }\n"]);return A=function(){return n},n}function T(){var n=Object(r.a)(["\n  max-width: 300px;\n  margin-top: 60px;\n  display: flex;\n  justify-content: space-between;\n  flex-direction: column;\n\n  @media only screen and (max-width: 900px) {\n    order: 2;\n    text-align: center;\n    max-width: 100%;\n    margin-top: 20px;\n  }\n"]);return T=function(){return n},n}function B(){var n=Object(r.a)(["\n  display: flex;\n  flex-direction: row;\n  padding: 40px;\n  max-width: 1000px;\n  width: 100%;\n  margin: 0 auto;\n  background: #fbfbfd;\n  box-shadow: 0 32px 44px 0 rgba(64, 68, 90, 0.2);\n  border-radius: 30px;\n  justify-content: space-between;\n\n  @media only screen and (max-width: 900px) {\n    flex-direction: column;\n    padding: 20px;\n    margin: 20px;\n  }\n\n  @media only screen and (max-width: 600px) {\n    flex-direction: column;\n    padding: 10px;\n    margin: 10px;\n  }\n"]);return B=function(){return n},n}var D=d.b.div(B()),R=d.b.div(T()),N=d.b.div(A()),W=d.b.img(z()),L=(d.b.div(C()),d.b.div(F())),U=d.b.div(S()),X=Object(d.b)(w.b)(k()),_=d.b.button(O()),q=d.b.input(j()),H=d.b.button(E()),J=Object(d.b)(w.a)(y());function P(){var n=Object(r.a)(["\n  padding-left: 0;\n  margin: 0;\n"]);return P=function(){return n},n}function V(){var n=Object(r.a)(["\n  font-size: 14px;\n  color: #aeb8c0;\n  margin-bottom: 16px;\n  padding: 0 4px;\n  text-align: ",";\n"]);return V=function(){return n},n}function G(){var n=Object(r.a)([""]);return G=function(){return n},n}function M(){var n=Object(r.a)(["\n  display: flex;\n  margin-right: 7px;\n"]);return M=function(){return n},n}function I(){var n=Object(r.a)(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: ",";\n  width: 100%;\n"]);return I=function(){return n},n}function $(){var n=Object(r.a)(["\n  display: flex;\n  flex-grow: 1;\n  justify-content: flex-end;\n"]);return $=function(){return n},n}function K(){var n=Object(r.a)(["\n  min-height: 20px;\n  max-width: 200px;\n  padding: 1em;\n  margin-bottom: 8px;\n  align-self: ",";\n  background: ",";\n  color: ",";\n  border-radius: 20px;\n  box-shadow: 0 2px 4px 0 rgba(210, 210, 210, 0.5);\n"]);return K=function(){return n},n}function Q(){var n=Object(r.a)(["\n  display: flex;\n  flex-direction: column;\n"]);return Q=function(){return n},n}var Y=d.b.div(Q()),Z=d.b.div(K(),function(n){return n.primary?"flex-end":"flex-start"},function(n){return n.primary?"#4153B8":"white"},function(n){return n.primary?"white":"#54556C"}),nn=d.b.div($()),en=d.b.li(I(),function(n){return n.justifyEnd?"flex-start":"flex-end"}),tn=d.b.div(M()),rn=d.b.div(G()),an=d.b.div(V(),function(n){return n.textRight?"right":"left"}),on=d.b.ul(P()),cn=function(n){var e=n.children,t=n.messages;return i.a.createElement(Y,null,i.a.createElement(on,{"aria-label":"Conversation messages"},t.map(function(n,e){var r=n.user,o=n.bot,c=n.time;return i.a.createElement(a.Fragment,{key:e},i.a.createElement(en,null,i.a.createElement(rn,null,i.a.createElement(Z,null,r),i.a.createElement(an,{textRight:!0},i.a.createElement(U,null,"Sent at")," ",c))),i.a.createElement(en,Object.assign({},function(n){return n===t.length-1?{"aria-live":"polite"}:{}}(e),{justifyEnd:!0}),i.a.createElement(tn,null,i.a.createElement(v,null)),i.a.createElement(rn,null,i.a.createElement(Z,{primary:!0},o),i.a.createElement(an,null,i.a.createElement(U,null,"Sent at")," ",c))))})),i.a.createElement(nn,null,e))};function ln(){var n=Object(r.a)(["\n  border: none;\n  min-height: 20px;\n  min-width: 60px;\n  padding: 16px;\n  margin: 0 1em 1em 0;\n  justify-self: flex-end;\n  background: white;\n  color: #54556c;\n  border-radius: 20px;\n  box-shadow: 0 2px 4px 0 rgba(210, 210, 210, 0.5);\n  cursor: pointer;\n  transition: transform 250ms, box-shadow 250ms;\n\n  &:hover,\n  &:focus {\n    outline: none;\n    transform: translate3d(0, -2px, 0);\n    box-shadow: 0 2px 6px 0 rgba(110, 110, 110, 0.5);\n  }\n"]);return ln=function(){return n},n}var un=d.b.button(ln()),sn=t(17),fn=t.n(sn);function dn(){var n=Object(r.a)(["\n  margin: 30px auto 0;\n  width: 100%;\n  text-align: center;\n\n  div {\n    width: 8px;\n    height: 8px;\n    margin-right: 8px;\n\n    border-radius: 50%;\n    display: inline-block;\n    animation: "," 2s infinite ease-in-out both;\n  }\n\n  .bounce1 {\n    animation-delay: -0.32s;\n  }\n\n  .bounce2 {\n    animation-delay: -0.16s;\n  }\n"]);return dn=function(){return n},n}function mn(){var n=Object(r.a)(["\n  0%, 80%, 100% {\n    background: #0b9af5;\n    transform: scale(0);\n  } 40% {\n    background: #EAF6FF;\n    transform: scale(1.0);\n  }\n"]);return mn=function(){return n},n}var pn=Object(d.c)(mn()),bn=d.b.div(dn(),pn),xn=function(n){var e=n.style;return i.a.createElement(bn,{style:e},i.a.createElement("div",{className:"bounce1"}),i.a.createElement("div",{className:"bounce2"}),i.a.createElement("div",{className:"bounce3"}))},hn=t(33),gn=t.n(hn),vn=t(78),wn=t(81),yn=function(n){var e=n.open,t=n.close,r=Object(a.useRef)(null),o=Object(a.useState)(""),c=Object(l.a)(o,2),u=c[0],s=c[1],f=Object(a.useState)(!1),d=Object(l.a)(f,2),m=d[0],p=d[1],b=Object(a.useState)(!1),x=Object(l.a)(b,2),h=x[0],g=x[1],v=(w=Object(vn.a)(gn.a.mark(function n(e){var t;return gn.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e.preventDefault(),g(!0),n.next=4,fetch("".concat("","/.netlify/functions/airtable?pepite=").concat(u));case 4:return t=n.sent,n.next=7,t.json();case 7:p(!0),s(""),g(!1),r.current.rewardMe();case 11:case"end":return n.stop()}},n)})),function(n){return w.apply(this,arguments)});var w;return i.a.createElement(wn.a,{items:e,from:{opacity:0,y:200},enter:{opacity:1,y:0},leave:{opacity:0,y:-200}},function(n){return function(e){return n&&i.a.createElement(X,{style:{opacity:e.opacity},onDismiss:function(){p(!1),t()}},i.a.createElement(J,{style:{transform:"translate3d(0px, ".concat(e.y,"px, 0px)")}},i.a.createElement("h1",null,"Ajouter une p\xe9pite"),m&&i.a.createElement("h2",null,"T'es le/la meilleur(e)"),i.a.createElement("form",{onSubmit:v},i.a.createElement(q,{placeholder:"Doctolib",required:!0,value:u,onChange:function(n){return s(n.target.value)}}),i.a.createElement(fn.a,{type:"confetti",ref:r},i.a.createElement(H,{type:"submit "},h?i.a.createElement(xn,{style:{margin:0}}):"Soumettre \ud83d\ude80")))))}})},En=function(){var n=Object(a.useState)(!1),e=Object(l.a)(n,2),t=e[0],r=e[1];return i.a.createElement(R,null,i.a.createElement("div",null,i.a.createElement("h1",null,"Bonjour mon ami(e) !"),i.a.createElement("h2",null,"Bienvenue sur FTT"),i.a.createElement("p",null,"Notre bot connais de belles startups de la FrenchTech, pouvant servir d'alternatives aux g\xe9ants US.")),i.a.createElement("div",null,i.a.createElement("p",null,"Cr\xe9\xe9 par"," ",i.a.createElement("a",{href:"https://twitter.com/florian_adonis",target:"_blank",rel:"noopener noreferrer"},"Florian Adonis")," "),i.a.createElement("p",null,"Le code sur"," ",i.a.createElement("a",{href:"https://github.com/tanohzana/frenchtech.today",target:"_blank",rel:"noopener noreferrer"},"Github")),i.a.createElement("p",null,"Forked from"," ",i.a.createElement("a",{href:"https://github.com/wabisabi-js/boredaf.app",target:"_blank",rel:"noopener noreferrer"},"boredaf.app")),i.a.createElement("p",null,i.a.createElement(_,{onClick:function(){return r(!0)}},"Ajouter une entreprise"))),i.a.createElement(yn,{open:t,close:function(){return r(!1)}}))},jn=t(79),On=t.n(jn),kn=t(80),Sn=function(){var n,e=Object(a.useRef)(null),t=Object(a.useState)(!1),r=Object(l.a)(t,2),o=r[0],c=r[1],u=Object(a.useState)(!1),f=Object(l.a)(u,2),d=f[0],m=f[1],p=Object(a.useContext)(s),b=p.getAlternatives,x=p.getSections,v=p.getStartupsBySection,w=function(){return{time:Object(kn.format)(new Date,"HH:mm")}},y=[Object(g.a)({user:"Je cherche une alternative dans la FrenchTech.",bot:"Dans quel secteur cherchez vous ?"},w())],E=x(),j=Object(a.useState)(y),O=Object(l.a)(j,2),k=O[0],S=O[1],F=Object(a.useState)("sections"),C=Object(l.a)(F,2),z=C[0],A=C[1],T=Object(a.useState)(E),B=Object(l.a)(T,2),R=B[0],X=B[1],_=Object(a.useState)(),q=Object(l.a)(_,2),H=q[0],J=q[1],P=Object(a.useState)(),V=Object(l.a)(P,2),G=V[0],M=V[1],I=function(){switch(z){case"sections":return"Vous cherchez une alternative \xe0 ... \ud83e\uddd0";case"startups":return"Voil\xe0 ce que j'ai trouv\xe9 \ud83d\ude01";case"alternatives":return"Voil\xe0 toutes les infos \ud83d\udd75\ufe0f\u200d\u2640\ufe0f";default:return""}},$=function(n){m(!0),J(n),S([].concat(Object(h.a)(k),[Object(g.a)({user:n,bot:I()},w())])),"sections"===z?A("startups"):"startups"===z?A("alternatives"):"alternatives"===z&&(A("end"),c(!0)),setTimeout(function(){m(!1)},500),setTimeout(function(){e.current.scrollTop=e.current.scrollHeight},0)};return Object(a.useEffect)(function(){!function(){if("sections"===z){var n=x();X(n)}else if("startups"===z){var e=v(H);M(H),X(e)}else if("alternatives"===z){var t=b(G,H);X(t)}}()},[z,H]),i.a.createElement(a.Fragment,null,i.a.createElement(D,null,i.a.createElement(En,null),i.a.createElement(L,null,i.a.createElement(U,{as:"h2"},"Chat"),i.a.createElement(W,{alt:"background",src:On.a}),i.a.createElement(N,{ref:e},i.a.createElement(cn,{messages:k},o?i.a.createElement(i.a.Fragment,null,i.a.createElement(fn.a,{type:"confetti",ref:function(e){n=e}},i.a.createElement(un,{onClick:function(){return n.rewardMe()}},"G\xe9nial")),i.a.createElement(un,{onClick:function(){return S(y),A("sections"),X(E),J(""),M(""),void c(!1)}},"Recommencer")):i.a.createElement(i.a.Fragment,null,!d&&R.map(function(n){return i.a.createElement(un,{key:n,onClick:function(){return $(n)}},i.a.createElement("span",{role:"img","aria-label":n},n))})),d&&!o?i.a.createElement(xn,null):null)))))},Fn=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Cn(n,e){navigator.serviceWorker.register(n).then(function(n){n.onupdatefound=function(){var t=n.installing;null!=t&&(t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See http://bit.ly/CRA-PWA."),e&&e.onUpdate&&e.onUpdate(n)):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(n)))})}}).catch(function(n){console.error("Error during service worker registration:",n)})}function zn(){var n=Object(r.a)(["\n  ","\n  ","\n  @import url('https://fonts.googleapis.com/css?family=Nunito+Sans');\n  body {\n    font-family: 'Nunito Sans', sans-serif;\n    background: #DADDF2;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n\n    h1 {\n      color: #E45471;\n      font-size: 30px;\n      margin: 0;\n      line-height: 1.5;\n    }\n\n    h2 {\n      color: #41495D;\n      line-height: 1.5;\n      font-size:28px;\n      margin: 0;\n\n    }\n    p, a {\n      color: #889097;\n      line-height: 1.5;\n      margin: 0;\n    }\n\n    a:hover, a:focus {\n      color: #222;\n      outline: none;\n    }\n  }\n\n  #root {\n    height: 100%;\n    display: flex;\n    align-items: flex-end;\n\n    @media only screen and (min-width: 901px) {\n      margin: 40px;\n    }\n  }\n"]);return zn=function(){return n},n}var An=Object(d.a)(zn(),p.a,x.a);var Tn=document.getElementById("root");c.a.render(i.a.createElement(function(){return i.a.createElement(f,null,i.a.createElement(Sn,null),i.a.createElement(An,null))},null),Tn),function(n){if("serviceWorker"in navigator){if(new URL("",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",function(){var e="".concat("","/service-worker.js");Fn?(function(n,e){fetch(n).then(function(t){var r=t.headers.get("content-type");404===t.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(function(n){n.unregister().then(function(){window.location.reload()})}):Cn(n,e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}(e,n),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit http://bit.ly/CRA-PWA")})):Cn(e,n)})}}()},79:function(n,e,t){n.exports=t.p+"static/media/mobile-bg.9c572c13.svg"},83:function(n,e,t){n.exports=t(209)}},[[83,2,1]]]);
  //# sourceMappingURL=main.509915e8.chunk.js.map