diff options
Diffstat (limited to 'web-build/static/js/app.e060ef15.chunk.js')
-rw-r--r-- | web-build/static/js/app.e060ef15.chunk.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/web-build/static/js/app.e060ef15.chunk.js b/web-build/static/js/app.e060ef15.chunk.js deleted file mode 100644 index 98e1e18..0000000 --- a/web-build/static/js/app.e060ef15.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this.webpackJsonp=this.webpackJsonp||[]).push([[0],{240:function(e){e.exports=JSON.parse('{"common":{"ok":"OK!","cancel":"Cancel","back":"Back"},"errors":{"invalidEmail":"Invalid email address."},"welcomeScreen":{"poweredBy":"POWERED BY IGNITE","readyForLaunch":"Ready for launch.","continue":"CONTINUE"},"demoScreen":{"howTo":"HOW TO","title":"What\u2019s In This Stack?","tagLine":"Congratulations, you\u2019ve got a very advanced React Native app template here. Take advantage of this boilerplate!","reactotron":"Demo Reactotron","demoList":"Demo List","androidReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running, run adb reverse tcp:9090 tcp:9090 from your terminal, and reload the app.","iosReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","macosReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","webReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","windowsReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app."},"demoListScreen":{"title":"Demo List"},"storybook":{"placeholder":"Placeholder","field":"Field"}}')},241:function(e){e.exports=JSON.parse('{"common":{"ok":"OK \ud83c\uddef\ud83c\uddf5","cancel":"Cancel \ud83c\uddef\ud83c\uddf5","back":"Back \ud83c\uddef\ud83c\uddf5"}}')},311:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"loadString",(function(){return v})),n.d(r,"saveString",(function(){return k})),n.d(r,"load",(function(){return O})),n.d(r,"save",(function(){return E})),n.d(r,"remove",(function(){return x})),n.d(r,"clear",(function(){return C}));var a=n(11),o=n.n(a),i=n(10),c=n.n(i),l=n(314),s=n(111),u=n.n(s),d=n(240),f=n(241);function p(e,t){return e?u.a.t(e,t):null}u.a.fallbacks=!0,u.a.translations={en:d,ja:f},u.a.locale=l.a||"en",n(191).a.ignoreLogs(["Require cycle:"]);var m=n(0),g=n.n(m),h=n(313),b=n(555),y=n(74);function v(e){return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.awrap(y.a.getItem(e));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",null);case 9:case"end":return t.stop()}}),null,null,[[0,6]],Promise)}function k(e,t){return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.setItem(e,t));case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),n.abrupt("return",!1);case 9:case"end":return n.stop()}}),null,null,[[0,6]],Promise)}function O(e){var t;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.getItem(e));case 3:return t=n.sent,n.abrupt("return",JSON.parse(t));case 7:return n.prev=7,n.t0=n.catch(0),n.abrupt("return",null);case 10:case"end":return n.stop()}}),null,null,[[0,7]],Promise)}function E(e,t){return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.setItem(e,JSON.stringify(t)));case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),n.abrupt("return",!1);case 9:case"end":return n.stop()}}),null,null,[[0,6]],Promise)}function x(e){return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.awrap(y.a.removeItem(e));case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),null,null,[[0,5]],Promise)}function C(){return c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.a.awrap(y.a.clear());case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),null,null,[[0,5]],Promise)}var w=n(556),S=n(7),j=n.n(S),A=n(2),T=n(99),P=n(35),D=n(46),B=n(3),R=n.n(B),I=n(24),F=n.n(I),L=n(27),V={black:"#1d1d1d",white:"#ffffff",offWhite:"#e6e6e6",orange:"#FBA928",orangeDarker:"#EB9918",lightGrey:"#939AA4",lighterGrey:"#CDD4DA",angry:"#dd3333",deepPurple:"#5D2555"},z={palette:V,transparent:"rgba(0, 0, 0, 0)",background:V.white,primary:V.orange,primaryDarker:V.orangeDarker,line:V.offWhite,text:V.white,dim:V.lightGrey,error:V.angry,storybookDarkBg:V.black,storybookTextColor:V.black},N=[0,4,8,12,16,24,32,48,64],W=n(6),H={primary:W.a.select({ios:"Helvetica",android:"normal"}),secondary:W.a.select({ios:"Arial",android:"sans-serif"}),code:W.a.select({ios:"Courier",android:"monospace"})};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G={fontFamily:H.primary,color:z.text,fontSize:15},K={default:G,bold:U(U({},G),{},{fontWeight:"bold"}),header:U(U({},G),{},{fontSize:24,fontWeight:"bold"}),fieldLabel:U(U({},G),{},{fontSize:13,color:z.dim}),secondary:U(U({},G),{},{fontSize:9,color:z.dim})},Q=["preset","tx","txOptions","text","children","style"];function Y(e){var t=e.preset,n=void 0===t?"default":t,r=e.tx,a=e.txOptions,o=e.text,i=e.children,c=e.style,l=F()(e,Q),s=r&&p(r,a)||o||i,u=[K[n]||K.default,c];return m.createElement(L.a,R()({},l,{style:u}),s)}var J=n(29);function X(e){var t=Object(m.useState)({width:0,height:0}),n=o()(t,2),r=n[0],a=n[1];return Object(m.useLayoutEffect)((function(){var t;if(null!=(t=e.source)&&t.uri)J.a.getSize(e.source.uri,(function(e,t){a({width:e,height:t})}));else if("web"===W.a.OS)J.a.getSize(e.source,(function(e,t){a({width:e,height:t})}));else{var n=J.a.resolveAssetSource(e.source),r=n.width,o=n.height;a({width:r,height:o})}}),[]),g.a.createElement(J.a,R()({},e,{style:[r,e.style]}))}var _={back:n(357),bullet:n(358)},Z={resizeMode:"contain"};function q(e){var t=e.style,n=e.icon,r=e.containerStyle;return m.createElement(A.a,{style:r},m.createElement(X,{style:[Z,t],source:_[n]}))}var $={flexDirection:"row",marginTop:N[4],paddingBottom:N[4],borderBottomWidth:1,borderBottomColor:"#3A3048"},ee={marginRight:N[4]-1,marginTop:N[2]},te={width:8,height:8},ne={flex:1,fontFamily:H.primary,color:"#BAB6C8",fontSize:15,lineHeight:22};function re(e){return m.createElement(A.a,{style:$},m.createElement(q,{icon:"bullet",containerStyle:ee,style:te}),m.createElement(Y,{style:ne,text:e.text}))}var ae=n(25);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce={paddingVertical:N[2],paddingHorizontal:N[2],borderRadius:4,justifyContent:"center",alignItems:"center"},le={paddingHorizontal:N[3]},se={primary:ie(ie({},ce),{},{backgroundColor:z.palette.orange}),link:ie(ie({},ce),{},{paddingHorizontal:0,paddingVertical:0,alignItems:"flex-start"})},ue={primary:ie(ie({},le),{},{fontSize:9,color:z.palette.white}),link:ie(ie({},le),{},{color:z.text,paddingHorizontal:0,paddingVertical:0})},de=["preset","tx","text","style","textStyle","children"];function fe(e){var t=e.preset,n=void 0===t?"primary":t,r=e.tx,a=e.text,o=e.style,i=e.textStyle,c=e.children,l=F()(e,de),s=[se[n]||se.primary,o],u=[ue[n]||ue.primary,i],d=c||m.createElement(Y,{tx:r,text:a,style:u});return m.createElement(ae.a,R()({style:s},l),d)}function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ge={width:16,height:16};me(me({},ge),{},{marginTop:2,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:z.primaryDarker,borderRadius:1});function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ye={borderWidth:1,borderColor:z.line,padding:N[2]};be(be({},ye),{},{borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:0}),be(be({},ye),{},{borderBottomWidth:0}),be(be({},ye),{},{borderBottomLeftRadius:8,borderBottomRightRadius:8}),be(be({},ye),{},{borderRadius:8}),be({},ye),be(be({},ye),{},{borderColor:z.transparent});var ve={flexDirection:"row",paddingHorizontal:N[4],alignItems:"center",paddingTop:N[5],paddingBottom:N[5],justifyContent:"flex-start"},ke={textAlign:"center"},Oe={flex:1,justifyContent:"center"},Ee={width:32},xe={width:32};function Ce(e){var t=e.onLeftPress,n=e.onRightPress,r=e.rightIcon,a=e.leftIcon,o=e.headerText,i=e.headerTx,c=e.style,l=e.titleStyle,s=o||i&&p(i)||"";return g.a.createElement(A.a,{style:[ve,c]},a?g.a.createElement(fe,{preset:"link",onPress:t},g.a.createElement(q,{icon:a})):g.a.createElement(A.a,{style:Ee}),g.a.createElement(A.a,{style:Oe},g.a.createElement(Y,{style:[ke,l],text:s})),r?g.a.createElement(fe,{preset:"link",onPress:n},g.a.createElement(q,{icon:r})):g.a.createElement(A.a,{style:xe}))}var we=n(116),Se=n(48),je=n(69),Ae={none:0},Te={fixed:{outer:{backgroundColor:z.background,flex:1,height:"100%"},inner:{justifyContent:"flex-start",alignItems:"stretch",height:"100%",width:"100%"}},scroll:{outer:{backgroundColor:z.background,flex:1,height:"100%"},inner:{justifyContent:"flex-start",alignItems:"stretch"}}};var Pe="ios"===W.a.OS;function De(e){var t=Object(h.c)(),n=Te.fixed,r=e.style||{},a=e.backgroundColor?{backgroundColor:e.backgroundColor}:{},o={paddingTop:e.unsafe?0:t.top};return m.createElement(we.a,{style:[n.outer,a],behavior:Pe?"padding":void 0,keyboardVerticalOffset:Ae[e.keyboardOffset||"none"]},m.createElement(je.a,{barStyle:e.statusBar||"light-content"}),m.createElement(A.a,{style:[n.inner,r,o]},e.children))}function Be(e){var t=Object(h.c)(),n=Te.scroll,r=e.style||{},a=e.backgroundColor?{backgroundColor:e.backgroundColor}:{},o={paddingTop:e.unsafe?0:t.top};return m.createElement(we.a,{style:[n.outer,a],behavior:Pe?"padding":void 0,keyboardVerticalOffset:Ae[e.keyboardOffset||"none"]},m.createElement(je.a,{barStyle:e.statusBar||"light-content"}),m.createElement(A.a,{style:[n.outer,a,o]},m.createElement(Se.a,{style:[n.outer,a],contentContainerStyle:[n.inner,r],keyboardShouldPersistTaps:e.keyboardShouldPersistTaps||"handled"},e.children)))}function Re(e){return(t=e.preset)&&Te[t]&&"fixed"!==t?m.createElement(Be,e):m.createElement(De,e);var t}n(9),n(16),n(70),z.palette.offWhite;n(55),z.palette.white;function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Le={stretch:Fe(Fe({},{position:"absolute",top:0,left:0,bottom:0,right:0}),{},{resizeMode:"stretch",width:null,height:null})},Ve=n(363);function ze(e){var t=e.preset,n=void 0===t?"stretch":t,r=e.style,a=e.backgroundImage,o=[Le[n]||Le.stretch,r],i=a||Ve;return g.a.createElement(X,{source:i,style:o})}var Ne=n(23),We=n.n(Ne),He=n(106),Me=n(181),Ue=n(550),Ge=n(551),Ke=n(552),Qe=n(553),Ye=n(269),Je={justifyContent:"center"},Xe=Object(D.a)((function(e){var t=e.style,n=e.physics,r=(e.setPhysics,e.gData),a=e.threeDim,i=(e.setThreeDim,e.local),c=e.setLocal,l=(Object(He.a)([Je,t]),Object(m.useRef)());Object(m.useEffect)((function(){var e=l.current;n.gravityOn?(e.d3Force("x",Ue.a().strength(n.gravity)),e.d3Force("y",Ge.a().strength(n.gravity)),a?n.galaxy?(e.d3Force("x",Ue.a().strength(n.gravity/5)),e.d3Force("z",Ke.a().strength(n.gravity/5))):(e.d3Force("x",Ue.a().strength(n.gravity)),e.d3Force("z",Ke.a().strength(n.gravity))):e.d3Force("z",null)):(e.d3Force("x",null),e.d3Force("y",null),a&&e.d3Force("z",null)),e.d3Force("link").strength(n.linkStrength),e.d3Force("link").iterations(n.linkIts),n.collision?e.d3Force("collide",Qe.a().radius(20)):e.d3Force("collide",null),e.d3Force("charge").strength(n.charge)}));Object(m.useCallback)((function(e){e.collapsed=!e.collapsed,setPrunedTree(getPrunedTree())}),[]);var s=Object(m.useState)(new Set),u=o()(s,2),d=u[0],f=u[1],p=Object(m.useState)(new Set),g=o()(p,2),h=g[0],b=g[1],y=Object(m.useState)(null),v=o()(y,2),k=(v[0],v[1]),O=function(){f(d),b(h)},E=function(e){d.clear(),h.clear(),j(null),O()},x=function(e){console.log("hover"),S||(d.clear(),h.clear(),e&&(d.add(e),e.neighbors.forEach((function(e){return d.add(e)})),e.links.forEach((function(e){return h.add(e)}))),k(e||null),O())};Object(m.useEffect)((function(){l.current.d3ReheatSimulation()}),[n]);var C=Object(m.useState)({}),w=o()(C,2),S=w[0],j=w[1],T=Object(m.useState)(0),P=o()(T,2),D=P[0],B=P[1],R=Object(m.useState)({nodes:[],links:[]}),I=o()(R,2),F=I[0],L=I[1];Object(m.useEffect)((function(){F.nodes.length&&!i&&c(!0)}),[F]);var V=function(e){console.log(F),F.nodes.length&&L({nodes:[],links:[]});var t=F;console.log(t.nodes),e.local||(t={nodes:[],links:[]},console.log("length is 0"),e.local=!0,t.nodes.push(e)),e.links.length&&e.links.forEach((function(n){if(!n.local){console.log("0"),n.local=!0,t.links.push(n),console.log(n);var a=r.nodes[n.targetIndex],o=r.nodes[n.sourceIndex];a.id!==o.id&&(a.id===e.id?(console.log("1. I am the target, the source is "),console.log(o),o.local?console.log("2.5 The source is already local"):(console.log("2. The source is not local"),o.local=!0,t.nodes.push(o))):(console.log("3. I am the source"),a.local?console.log("The target is already local"):(console.log("4. The target is not local."),a.local=!0,t.nodes.push(a))))}})),L(t)},z=function(e,t){window.open("org-protocol://roam-node?node="+e.id,"_self"),d.clear(),h.clear(),console.log(F),t.timeStamp-D<400&&V(e),e&&(d.add(e),e.neighbors.forEach((function(e){return d.add(e)})),e.links.forEach((function(e){return h.add(e)}))),j(e||null),O(),B(t.timeStamp)};return Object(m.useEffect)((function(){i&&S&&V(S)}),[i]),m.createElement(A.a,{style:t},a?m.createElement(Me.b,{ref:l,graphData:i?F:r,nodeColor:n.colorful?function(e){return 1===e.neighbors.length||2===e.neighbors.length?["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][e.neighbors[0].index%11]:["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][e.index%11]}:function(e){return 0===d.size?"rgb(100, 100, 100, 1)":d.has(e)?"purple":"rgb(50, 50, 50, 0.5)"},linkColor:n.colorful?function(e){return["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][r.nodes[e.sourceIndex].index%11]}:function(e){return 0===h.size?"rgb(50, 50, 50, 0.8)":h.has(e)?"purple":"rgb(50, 50, 50, 0.2)"},linkDirectionalParticles:n.particles,nodeLabel:function(e){return e.title},linkWidth:function(e){return h.has(e)?3*n.linkWidth:n.linkWidth},linkOpacity:n.linkOpacity,nodeRelSize:n.nodeRel,nodeVal:function(e){return d.has(e)?3*e.neighbors.length:2*e.neighbors.length},linkDirectionalParticleWidth:n.particleWidth,onNodeHover:n.hover?x:null,d3AlphaDecay:n.alphaDecay,d3AlphaMin:n.alphaTarget,d3VelocityDecay:n.velocityDecay,nodeThreeObject:n.labels?function(e){if(d.has(e)){console.log(e.title);var t=new Ye.a(e.title.substring(0,30));return console.log("didnt crash here 2"),t.color="#ffffff",t.textHeight=8,t}}:void 0,nodeThreeObjectExtend:!0,onNodeClick:z,onBackgroundClick:E,backgroundColor:"#242730"}):m.createElement(Me.a,{ref:l,graphData:i?F:r,nodeColor:n.colorful?function(e){return 1===e.neighbors.length||2===e.neighbors.length?["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][e.neighbors[0].index%11]:["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][e.index%11]}:function(e){return 0===d.size?"rgb(100, 100, 100, 1)":d.has(e)?"#a991f1":"rgb(50, 50, 50, 0.5)"},linkColor:n.colorful?function(e){return["#ff665c","#e69055","#7bc275","#4db5bd","#FCCE7B","#51afef","#1f5582","#C57BDB","#a991f1","#5cEfFF","#6A8FBF"][r.nodes[e.sourceIndex].index%11]}:function(e){return 0===h.size?"rgb(50, 50, 50, 0.8)":h.has(e)?"#a991f1":"rgb(50, 50, 50, 0.2)"},linkDirectionalParticles:n.particles,onNodeClick:z,nodeLabel:function(e){return e.title},linkWidth:function(e){return h.has(e)?3*n.linkWidth:n.linkWidth},linkOpacity:n.linkOpacity,nodeRelSize:n.nodeRel,nodeVal:function(e){return d.has(e)?e.neighbors.length+5:e.neighbors.length+3},linkDirectionalParticleWidth:n.particleWidth,nodeCanvasObject:function(e,t,r){if(n.labels&&(r>n.labelScale||d.has(e))){var a=e.title.substring(0,Math.min(e.title.length,30)),o=12/r;t.font=o+"px Sans-Serif";var i=[1.1*t.measureText(a).width,o].map((function(e){return e+.5*o})),c=Math.min(3*(r-n.labelScale)/n.labelScale,1);t.fillStyle="rgba(20, 20, 20, "+(0===d.size?.5*c:d.has(e)?.5:.15*c)+")",t.fillRect.apply(t,[e.x-i[0]/2,e.y-i[1]/2].concat(We()(i))),t.textAlign="center",t.textBaseline="middle",t.fillStyle="rgb(255, 255, 255, "+(0===d.size?c:d.has(e)?1:.3*c)+")",t.fillText(a,e.x,e.y),e.__bckgDimensions=i}},nodeCanvasObjectMode:function(){return"after"},onNodeHover:n.hover?x:null,d3AlphaDecay:n.alphaDecay,d3AlphaMin:n.alphaTarget,d3VelocityDecay:n.velocityDecay,onBackgroundClick:E,backgroundColor:"#242730"}))})),_e=n(1),Ze=n(57),qe=n.n(Ze),$e=n(316),et=n(182),tt=n(110),nt=n(79);function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ot=Object(D.a)((function(e){e.style;var t=e.physics,n=e.setPhysics,r=[{title:"Physics",content:m.createElement(A.a,null,m.createElement(Y,{preset:"fieldLabel",text:"Gravity"}),m.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:it.switch,value:t.gravityOn,onValueChange:function(){n(at(at({},t),{},{gravityOn:!t.gravityOn}))}}),m.createElement(Y,{preset:"fieldLabel",text:"Gravity: "+t.gravity}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:0,maximumValue:1,onValueChange:function(e){n(at(at({},t),{},{gravity:e}))},value:t.gravity,step:.01}),m.createElement(Y,{preset:"fieldLabel",text:"Repulsive force: "+t.charge}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:-400,maximumValue:100,onValueChange:function(e){n(at(at({},t),{},{charge:e}))},value:t.charge,step:1}),m.createElement(Y,{preset:"fieldLabel",text:"Link Force: "+t.linkStrength}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:0,maximumValue:2,onValueChange:function(e){n(at(at({},t),{},{linkStrength:e}))},value:t.linkStrength,step:.01}),m.createElement(Y,{preset:"fieldLabel",text:"'Link Iterations': "+t.linkIts}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:1,maximumValue:10,onValueChange:function(e){n(at(at({},t),{},{linkIts:e}))},value:t.linkIts,step:1}),m.createElement(Y,{preset:"fieldLabel",text:"Collision"}),m.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:it.switch,value:t.collision,onValueChange:function(){n(at(at({},t),{},{collision:!t.collision}))}}),m.createElement(Y,{preset:"fieldLabel",text:"Alpha Decay: "+t.alphaDecay}),m.createElement(qe.a,{style:it.slider,minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",minimumValue:0,maximumValue:1,onValueChange:function(e){n(at(at({},t),{},{alphaDecay:e}))},value:t.alphaDecay,step:.01}),m.createElement(Y,{preset:"fieldLabel",text:"Alhpa Target: "+t.alphaTarget}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:0,maximumValue:1,onValueChange:function(e){n(at(at({},t),{},{alphaTarget:e}))},value:t.alphaTarget,step:.1}),m.createElement(Y,{preset:"fieldLabel",text:"Viscosity: "+t.velocityDecay}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:0,maximumValue:1,onValueChange:function(e){n(at(at({},t),{},{velocityDecay:e}))},value:t.velocityDecay,step:.01}),m.createElement(Y,{preset:"fieldLabel",text:"Galaxy Mode (3D-only)"}),m.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:it.switch,value:t.galaxy,onValueChange:function(){n(at(at({},t),{},{galaxy:!t.galaxy}))}}))},{title:"Visual",content:m.createElement(A.a,null,m.createElement(Y,{preset:"fieldLabel",text:"Colorful"}),m.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:it.switch,value:t.colorful,onValueChange:function(){n(at(at({},t),{},{colorful:!t.colorful}))}}),m.createElement(Y,{preset:"fieldLabel",text:"Hover highlight"}),m.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:it.switch,value:t.hover,onValueChange:function(){n(at(at({},t),{},{hover:!t.hover}))}}),m.createElement(Y,{preset:"fieldLabel",text:"Line Opacity: "+t.linkOpacity}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:0,maximumValue:1,onValueChange:function(e){n(at(at({},t),{},{linkOpacity:e}))},value:t.linkOpacity,step:.01}),m.createElement(Y,{preset:"fieldLabel",text:"Line width: "+t.linkWidth}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:.1,maximumValue:10,onValueChange:function(e){n(at(at({},t),{},{linkWidth:e}))},value:t.linkWidth,step:.1}),m.createElement(Y,{preset:"fieldLabel",text:"Node size: "+t.nodeRel}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:1,maximumValue:10,onValueChange:function(e){n(at(at({},t),{},{nodeRel:e}))},value:t.nodeRel,step:.01}),m.createElement(Y,{preset:"fieldLabel",text:"Particles: "+t.particles}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:0,maximumValue:10,onValueChange:function(e){n(at(at({},t),{},{particles:e}))},value:t.particles,step:1}),m.createElement(Y,{preset:"fieldLabel",text:"Particle Size: "+t.particleWidth}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:1,maximumValue:10,onValueChange:function(e){n(at(at({},t),{},{particleWidth:e}))},value:t.particleWidth,step:.1}),m.createElement(Y,{preset:"fieldLabel",text:"Labels"}),m.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:it.switch,value:t.labels,onValueChange:function(){n(at(at({},t),{},{labels:!t.labels}))}}),m.createElement(Y,{preset:"fieldLabel",text:"Scale when labels become visible: "+t.labelScale}),m.createElement(qe.a,{minimumTrackTintColor:"#a991f1",maximumTrackTintColor:"#242730",thumbTintColor:"#a991f1",style:it.slider,minimumValue:.1,maximumValue:5,onValueChange:function(e){n(at(at({},t),{},{labelScale:e}))},value:t.labelScale,step:.1}))},{title:"Modes",content:m.createElement(A.a,null)}],a=Object(m.useState)([]),i=o()(a,2),c=i[0],l=i[1],s=Object(m.useState)(!0),u=o()(s,2),d=u[0],f=u[1];return d?m.createElement(A.a,{style:it.container},m.createElement(A.a,{style:{height:30,width:"100%",backgroundColor:"#2a2e38"}},m.createElement(ae.a,{style:{width:30,color:"#a991f1",textAlign:"center",marginLeft:"auto",padding:5},onPress:function(){f(!1)}},m.createElement(tt.default,{name:"close-circle",color:"#ffffff",size:20}))),m.createElement(Se.a,null,m.createElement($e.a,{activeSections:c,sections:r,touchAbleComponent:ae.a,expandMultiple:!0,renderHeader:function(e,t,n){return m.createElement(et.a,{duration:400,style:[it.header,n?it.active:it.inactive],transition:"backgroundColor"},m.createElement(Y,{style:it.headerText},e.title))},renderContent:function(e,t,n){return m.createElement(et.a,{duration:400,style:[it.content,n?it.active:it.inactive],transition:"backgroundColor"},e.content)},duration:200,onChange:function(e){l(e.includes(void 0)?[]:e)},renderAsFlatList:!1}))):m.createElement(ae.a,{onPress:function(){f(!0)},style:{position:"absolute",top:50,left:50,width:30,color:"#ffffff",zIndex:100}},m.createElement(tt.default,{name:"cog",color:"#ffffff",size:30}))})),it=_e.a.create({container:{display:"flex",backgroundColor:"#2a2e38",position:"absolute",zIndex:5,marginLeft:"2%",marginTop:"2%",maxWidth:275,borderRadius:10,borderStyle:"solid",borderWidth:10,borderColor:"#2a2e38",maxHeight:"80%",paddingBottom:20},title:{textAlign:"left",fontSize:22,fontWeight:"300",marginBottom:20,paddingLeft:10},header:{backgroundColor:"#2a2e38",padding:10,paddingBottom:20,textAlign:"left"},headerText:{textAlign:"left",paddingLeft:30,fontSize:16,fontWeight:"500"},content:{padding:20,paddingLeft:60,backgroundColor:"#000000"},active:{backgroundColor:"#2a2e38"},inactive:{backgroundColor:"#2a2e38"},selectors:{marginBottom:10,flexDirection:"row",justifyContent:"center"},selector:{backgroundColor:"#2a2e38",padding:10},activeSelector:{fontWeight:"bold"},selectTitle:{fontSize:14,fontWeight:"500",padding:10},multipleToggle:{flexDirection:"row",justifyContent:"center",marginVertical:30,alignItems:"center"},multipleToggle__title:{fontSize:16,marginRight:8},slider:{minimumTrackTintColor:"#a991f1",thumbTintColor:"#a991f1",height:40,width:"90%"},switch:{width:"5",height:20,marginVertical:10}}),ct={justifyContent:"center"},lt=Object(D.a)((function(e){var t=e.style,n=e.local,r=e.setLocal;Object(He.a)([ct,t]);return m.createElement(A.a,{style:[t,{height:50,width:150}]},m.createElement(tt.default.Button,{name:n?"graph":"graph-outline",backgroundColor:"#a991f1",onPress:function(){r(!n)},size:30,style:{textAlign:"center"}},n?"Local Graph":"Global Graph"))})),st={justifyContent:"center"};Object(D.a)((function(e){var t=e.style,n=e.physics,r=e.setPhysics;Object(He.a)([st,t]);return m.createElement(A.a,{style:{height:"100%",width:"100%",borderStyle:"solid",borderWidth:5,position:"relative"}},m.createElement(ot,{physics:n,setPhysics:r}),m.createElement(lt,{physics:n,setPhysics:r}))}));function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ft=n(452),pt={flex:1},mt={backgroundColor:z.transparent,paddingHorizontal:N[4]},gt={color:z.palette.white,fontFamily:H.primary},ht={fontWeight:"bold"},bt={paddingTop:N[3],paddingBottom:N[4]+N[1],paddingHorizontal:0},yt=dt(dt(dt({},gt),ht),{},{fontSize:12,lineHeight:15,textAlign:"center",letterSpacing:1.5}),vt=dt(dt({},gt),{},{textAlign:"center"}),kt=dt(dt(dt({},gt),ht),{},{fontSize:28,lineHeight:38,textAlign:"center"}),Ot=dt(dt(dt({},gt),ht),{},{fontSize:26,fontStyle:"italic"}),Et={alignSelf:"center",marginVertical:N[5],maxWidth:"100%",width:343,height:230},xt=dt(dt({},gt),{},{color:"#BAB6C8",fontSize:15,lineHeight:22,marginBottom:N[5]}),Ct={paddingVertical:N[4],paddingHorizontal:N[4],backgroundColor:z.palette.deepPurple},wt=dt(dt(dt({},gt),ht),{},{fontSize:13,letterSpacing:2}),St={backgroundColor:"#20162D"},jt={paddingVertical:N[4],paddingHorizontal:N[4]},At=(Object(D.a)((function(){var e=Object(P.useNavigation)();return g.a.createElement(A.a,{testID:"WelcomeScreen",style:pt},g.a.createElement(ze,null),g.a.createElement(Re,{style:mt,preset:"scroll",backgroundColor:z.transparent},g.a.createElement(Ce,{headerTx:"welcomeScreen.poweredBy",style:bt,titleStyle:yt}),g.a.createElement(Y,{style:vt},g.a.createElement(Y,{style:kt,text:"Your new app, "}),g.a.createElement(Y,{style:Ot,text:"almost"}),g.a.createElement(Y,{style:kt,text:"!"})),g.a.createElement(Y,{style:kt,preset:"header",tx:"welcomeScreen.readyForLaunch"}),g.a.createElement(X,{source:ft,style:Et}),g.a.createElement(Y,{style:xt},"This probably isn't what your app is going to look like. Unless your designer handed you this screen and, in that case, congrats! You're ready to ship."),g.a.createElement(Y,{style:xt},"For everyone else, this is where you'll see a live preview of your fully functioning app using Ignite.")),g.a.createElement(T.a,{style:St},g.a.createElement(A.a,{style:jt},g.a.createElement(fe,{testID:"next-screen-button",style:Ct,textStyle:wt,tx:"welcomeScreen.continue",onPress:function(){return e.navigate("demo")}}))))})),n(15)),Tt=n.n(At),Pt=n(17),Dt=n.n(Pt),Bt=n(309);function Rt(e){switch(e.problem){case"CONNECTION_ERROR":case"NETWORK_ERROR":return{kind:"cannot-connect",temporary:!0};case"TIMEOUT_ERROR":return{kind:"timeout",temporary:!0};case"SERVER_ERROR":return{kind:"server"};case"UNKNOWN_ERROR":return{kind:"unknown",temporary:!0};case"CLIENT_ERROR":switch(e.status){case 401:return{kind:"unauthorized"};case 403:return{kind:"forbidden"};case 404:return{kind:"not-found"};default:return{kind:"rejected"}}case"CANCEL_ERROR":return null}return null}var It={url:"http://example.com",timeout:1e4},Ft=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It;Tt()(this,e),this.config=t}return Dt()(e,[{key:"setup",value:function(){this.apisauce=Object(Bt.create)({baseURL:this.config.url,timeout:this.config.timeout,headers:{Accept:"application/json"}})}},{key:"getUsers",value:function(){var e,t,n,r,a;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,c.a.awrap(this.apisauce.get("/users"));case 2:if((e=o.sent).ok){o.next=7;break}if(!(t=Rt(e))){o.next=7;break}return o.abrupt("return",t);case 7:return n=function(e){return{id:e.id,name:e.name}},o.prev=8,r=e.data,a=r.map(n),o.abrupt("return",{kind:"ok",users:a});case 14:return o.prev=14,o.t0=o.catch(8),o.abrupt("return",{kind:"bad-data"});case 17:case"end":return o.stop()}}),null,this,[[8,14]],Promise)}},{key:"getUser",value:function(e){var t,n,r;return c.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,c.a.awrap(this.apisauce.get("/users/"+e));case 2:if((t=a.sent).ok){a.next=7;break}if(!(n=Rt(t))){a.next=7;break}return a.abrupt("return",n);case 7:return a.prev=7,r={id:t.data.id,name:t.data.name},a.abrupt("return",{kind:"ok",user:r});case 12:return a.prev=12,a.t0=a.catch(7),a.abrupt("return",{kind:"bad-data"});case 15:case"end":return a.stop()}}),null,this,[[7,12]],Promise)}}]),e}();function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){j()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zt=n(517),Nt=n(518),Wt={flex:1},Ht={backgroundColor:z.transparent,paddingHorizontal:N[4]},Mt={paddingVertical:N[4],paddingHorizontal:N[4],backgroundColor:z.palette.deepPurple},Ut={fontWeight:"bold"},Gt=Vt(Vt({},Ut),{},{fontSize:13,letterSpacing:2}),Kt={paddingTop:N[3],paddingBottom:N[5]-1,paddingHorizontal:0},Qt=Vt(Vt({},Ut),{},{fontSize:12,lineHeight:15,textAlign:"center",letterSpacing:1.5}),Yt=Vt(Vt({},Ut),{},{fontSize:28,lineHeight:38,textAlign:"center",marginBottom:N[5]}),Jt={color:"#BAB6C8",fontSize:15,lineHeight:22,marginBottom:N[4]+N[1]},Xt={marginVertical:N[6],alignSelf:"center",width:180,height:100},_t={flexDirection:"row",alignItems:"center",alignSelf:"center"},Zt={color:"#BAB6C8",fontSize:15,lineHeight:22},qt={marginHorizontal:N[2],width:10,height:10,resizeMode:"contain"},$t={color:"#BAB6C8",fontSize:12,lineHeight:15,marginVertical:N[2]},en=W.a.select({ios:"Cmd + D",android:"Cmd/Ctrl + M"}),tn=(Object(D.a)((function(){var e=Object(P.useNavigation)(),t=g.a.useMemo((function(){return function(){var e;return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return console.tron.log("Your Friendly tron log message"),console.tron.logImportant("I am important"),console.tron.display({name:"DISPLAY",value:{numbers:1,strings:"strings",booleans:!0,arrays:[1,2,3],objects:{deeper:{deeper:{yay:"\ud83d\udc7e"}}},functionNames:function(){}},preview:"More control with display()",important:!0,image:{uri:"https://avatars2.githubusercontent.com/u/3902527?s=200&u=a0d16b13ed719f35d95ca0f4440f5d07c32c349a&v=4"}}),(e=new Ft).setup(),e.getUser("1"),t.next=8,c.a.awrap(E("Cool Name","Boaty McBoatface"));case 8:case"end":return t.stop()}}),null,null,null,Promise)}}),[]);return g.a.createElement(A.a,{testID:"DemoScreen",style:Wt},g.a.createElement(ze,null),g.a.createElement(Re,{style:Ht,preset:"scroll",backgroundColor:z.transparent},g.a.createElement(Ce,{headerTx:"demoScreen.howTo",leftIcon:"back",onLeftPress:function(){return e.goBack()},style:Kt,titleStyle:Qt}),g.a.createElement(Y,{style:Yt,preset:"header",tx:"demoScreen.title"}),g.a.createElement(Y,{style:Jt,tx:"demoScreen.tagLine"}),g.a.createElement(re,{text:"Integrated here, Navigation with State, TypeScript, Storybook, Solidarity, and i18n."}),g.a.createElement(re,{text:"To run Storybook, press "+en+' or shake the device to show the developer menu, then select "Toggle Storybook"'}),g.a.createElement(re,{text:"Load up Reactotron! You can inspect your app, view the events, interact, and so much more!"}),g.a.createElement(A.a,null,g.a.createElement(fe,{style:Mt,textStyle:Gt,tx:"demoScreen.reactotron",onPress:t}),g.a.createElement(Y,{style:$t,tx:"demoScreen."+W.a.OS+"ReactotronHint"})),g.a.createElement(fe,{style:Mt,textStyle:Gt,tx:"demoScreen.demoList",onPress:function(){return e.navigate("demoList")}}),g.a.createElement(X,{source:zt,style:Xt}),g.a.createElement(A.a,{style:_t},g.a.createElement(Y,{style:Zt,text:"Made with"}),g.a.createElement(X,{source:Nt,style:qt}),g.a.createElement(Y,{style:Zt,text:"by Infinite Red"}))))})),n(82)),nn=n(37),rn=nn.d.model("Character").props({id:nn.d.identifierNumber,name:nn.d.maybe(nn.d.string),status:nn.d.maybe(nn.d.string),image:nn.d.maybe(nn.d.string)}),an=function(){function e(t){Tt()(this,e),this.api=t}return Dt()(e,[{key:"getCharacters",value:function(){var e,t,n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(this.api.apisauce.get("https://raw.githubusercontent.com/infinitered/ignite/master/data/rick-and-morty.json",{amount:50}));case 3:if((e=r.sent).ok){r.next=8;break}if(!(t=Rt(e))){r.next=8;break}return r.abrupt("return",t);case 8:return n=e.data.results,r.abrupt("return",{kind:"ok",characters:n});case 12:return r.prev=12,r.t0=r.catch(0),r.abrupt("return",{kind:"bad-data"});case 16:case"end":return r.stop()}}),null,this,[[0,12]],Promise)}}]),e}(),on=nn.d.model("CharacterStore").props({characters:nn.d.optional(nn.d.array(rn),[])}).extend((function(e){return{views:{get environment(){return Object(nn.a)(e)}}}})).actions((function(e){return{saveCharacters:function(t){e.characters.replace(t)}}})).actions((function(e){return{getCharacters:function(){var t,n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return t=new an(e.environment.api),r.next=3,c.a.awrap(t.getCharacters());case 3:"ok"===(n=r.sent).kind&&e.saveCharacters(n.characters);case 5:case"end":return r.stop()}}),null,null,null,Promise)}}})),cn=nn.d.model("RootStore").props({characterStore:nn.d.optional(on,{})}),ln=Object(m.createContext)({}),sn=ln.Provider,un=function(){function e(){Tt()(this,e),this.api=new Ft}return Dt()(e,[{key:"setup",value:function(){return c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=3;break;case 3:return e.next=5,c.a.awrap(this.api.setup());case 5:case"end":return e.stop()}}),null,this,null,Promise)}}]),e}();function dn(){var e;return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new un,t.next=3,c.a.awrap(e.setup());case 3:return t.abrupt("return",e);case 4:case"end":return t.stop()}}),null,null,null,Promise)}function fn(){var e,t,n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,c.a.awrap(dn());case 2:return n=r.sent,r.prev=3,r.next=6,c.a.awrap(O("root"));case 6:if(r.t0=r.sent,r.t0){r.next=9;break}r.t0={};case 9:t=r.t0,e=cn.create(t,n),r.next=17;break;case 13:r.prev=13,r.t1=r.catch(3),e=cn.create({},n);case 17:return Object(nn.c)(e,(function(e){return E("root",e)})),r.abrupt("return",e);case 20:case"end":return r.stop()}}),null,null,[[3,13]],Promise)}var pn={flex:1},mn={backgroundColor:z.transparent},gn={paddingBottom:N[5]-1,paddingHorizontal:N[4],paddingTop:N[3]},hn={fontSize:12,fontWeight:"bold",letterSpacing:1.5,lineHeight:15,textAlign:"center"},bn={alignItems:"center",flexDirection:"row",padding:10},yn={borderRadius:35,height:65,width:65},vn={marginLeft:10},kn={paddingHorizontal:N[4]},On=(Object(D.a)((function(){var e=Object(P.useNavigation)(),t=Object(m.useContext)(ln).characterStore,n=t.characters;return Object(m.useEffect)((function(){c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.a.awrap(t.getCharacters());case 2:case"end":return e.stop()}}),null,null,null,Promise)}),[]),g.a.createElement(A.a,{testID:"DemoListScreen",style:pn},g.a.createElement(ze,null),g.a.createElement(Re,{style:mn,preset:"fixed",backgroundColor:z.transparent},g.a.createElement(Ce,{headerTx:"demoListScreen.title",leftIcon:"back",onLeftPress:function(){return e.goBack()},style:gn,titleStyle:hn}),g.a.createElement(tn.a,{contentContainerStyle:kn,data:We()(n),keyExtractor:function(e){return String(e.id)},renderItem:function(e){var t=e.item;return g.a.createElement(A.a,{style:bn},g.a.createElement(X,{source:{uri:t.image},style:yn}),g.a.createElement(Y,{style:vn},t.name," (",t.status,")"))}})))})),n(173)),En=n.n(On),xn={backgroundColor:z.palette.black,flex:1},Cn=Object(D.a)((function(){var e=Object(m.useState)({}),t=o()(e,2),n=t[0],r=t[1],a=Object(m.useState)(),i=o()(a,2),l=i[0],s=i[1],u=Object(m.useState)([]),d=o()(u,2),f=d[0],p=d[1],h={charge:-350,collision:!0,linkStrength:.1,linkIts:1,particles:2,linkOpacity:.4,linkWidth:1,particleWidth:4,nodeRel:4,labels:!0,labelScale:1.5,alphaDecay:.16,alphaTarget:0,velocityDecay:.25,gravity:.5,gravityOn:!0,hover:!0,colorful:!0,galaxy:!0,rootId:0};Object(m.useEffect)((function(){e&&clearTimeout(e);var e=setTimeout((function(){!function(e){var t;c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t=JSON.stringify(e),console.log(t+" "+e),n.next=5,c.a.awrap(y.a.setItem("@physics",t));case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),console.log(n.t0);case 10:case"end":return n.stop()}}),null,null,[[0,7]],Promise)}(n)}),1e3);return function(){return clearTimeout(e)}}),[n]);Object(m.useEffect)((function(){(function(){var e,t;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(y.a.getItem("@physics"));case 3:if(null===(e=n.sent)){n.next=14;break}if(t=JSON.parse(e),Object.keys(t).length!==Object.keys(h).length){n.next=11;break}return t.local=!1,n.abrupt("return",t);case 11:return n.abrupt("return",h);case 12:n.next=15;break;case 14:return n.abrupt("return",h);case 15:n.next=20;break;case 17:n.prev=17,n.t0=n.catch(0),console.log(n.t0);case 20:case"end":return n.stop()}}),null,null,[[0,17]],Promise)})().then((function(e){return r(e)})),En.a.get("http://localhost:35901/graph").then((function(e){var t=function(e){var t=[];return e.nodes.forEach((function(e,n){t.push(e.id),e.index=n})),p(t),t}(e.data);p(t),console.log(f);var n=function(e){var t=[];return e.links.forEach((function(n,r){for(var a,o,i=0;i<e.nodes.length;i++){var c=e.nodes[i];!c.neighbors&&(c.neighbors=[]),!c.links&&(c.links=[]),!r&&(c.local=!1),n.target===e.nodes[i].id?(c.links.push(n),a=[c,i],n.target!==n.source&&t.push(n)):n.source===e.nodes[i].id&&(c.links.push(n),o=[c,i])}a&&o&&(e.nodes[a[1]].neighbors.push(o[0]),e.nodes[o[1]].neighbors.push(a[0]),n.sourceIndex=o[1],n.targetIndex=a[1],n.index=[r],n.local=!1)})),e.links=t,e}(e.data);console.log(n),s(n)})).catch((function(e){console.log(e),console.log("Couldn't get data.")}))}),[]);var b=Object(m.useState)(!1),v=o()(b,2),k=v[0],O=v[1],E=Object(m.useState)(!1),x=o()(E,2),C=x[0],w=x[1];return l?g.a.createElement(Re,{style:xn,preset:"fixed"},g.a.createElement(A.a,{style:{display:"flex",flexDirection:"row",height:"100%",width:"100%",position:"absolute",zIndex:150}},g.a.createElement(ot,{physics:n,setPhysics:r}),g.a.createElement(A.a,{style:{marginLeft:"auto",marginRight:"2%",marginTop:"2%",zIndex:5,position:"relative",height:"15%"}},g.a.createElement(lt,{local:C,setLocal:w}),g.a.createElement(A.a,{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",paddingTop:"2%"}},g.a.createElement(Y,{preset:"header",text:"3D",style:{marginLeft:10}}),g.a.createElement(nt.a,{color:"#a991f1",trackColor:{false:"#62686E",true:"#a991f1"},style:{height:25,marginVertical:10,marginLeft:20},value:k,onValueChange:function(){O(!k)}}))),g.a.createElement(Xe,{style:{position:"absolute"},setPhysics:r,physics:n,gData:l,nodeIds:f,threeDim:k,setThreeDim:O,local:C,setLocal:w}))):null})),wn=Object(w.a)();function Sn(){return g.a.createElement(wn.Navigator,{screenOptions:{cardStyle:{backgroundColor:"transparent"},headerShown:!1}},g.a.createElement(wn.Screen,{name:"graph",component:Cn}))}var jn=["welcome"],An=function(e){return jn.includes(e)},Tn=n(238),Pn=Object(w.a)(),Dn=function(){return g.a.createElement(Pn.Navigator,{screenOptions:{cardStyle:{backgroundColor:z.palette.deepPurple},headerShown:!1}},g.a.createElement(Pn.Screen,{name:"mainStack",component:Sn,options:{headerShown:!1}}))},Bn=g.a.forwardRef((function(e,t){return g.a.createElement(Tn.a,R()({},e,{ref:t}),g.a.createElement(Dn,null))}));Bn.displayName="RootNavigator";var Rn=n(90),In={navigate:function(e){},goBack:function(){},resetRoot:function(e){},getRootState:function(){return{}}};function Fn(e){var t=e.routes[e.index];return t.state?Fn(t.state):t.name}n(524);var Ln=function(e){var t=Object(m.useState)(null),n=o()(t,2),r=n[0],a=(n[1],Object(m.useState)({})),i=o()(a,2),c=i[0];i[1];return Object(m.useEffect)((function(){0}),[]),Object(m.useEffect)((function(){0}),[window.location.search]),null!=c&&c.storybook?r?g.a.createElement(r,null):null:e.children},Vn=n(174);Object(Vn.enableScreens)();var zn=function(){var e=Object(m.useRef)(null),t=Object(m.useState)(void 0),n=o()(t,2),a=n[0],i=n[1];!function(e){var t=function(t){In[t]=function(){var n;if(e.current)return(n=e.current)[t].apply(n,arguments)}};for(var n in In)t(n)}(e),function(e,t){var n=Object(m.useRef)(t);Object(m.useEffect)((function(){n.current=t}),[t]),Object(m.useEffect)((function(){var t=function(){var t=e.current;if(null==t)return!1;var r=Fn(t.getRootState());return!n.current(r)&&(!!t.canGoBack()&&(t.goBack(),!0))};return Rn.a.addEventListener("hardwareBackPress",t),function(){return Rn.a.removeEventListener("hardwareBackPress",t)}}),[e])}(e,An);var l=function(e,t){var n=Object(m.useState)(),r=o()(n,2),a=r[0],i=r[1],l=Object(m.useState)(!0),s=o()(l,2),u=s[0],d=s[1],f=Object(m.useRef)(),p=function(){var n;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(e.load(t));case 3:(n=r.sent)&&i(n);case 5:return r.prev=5,d(!1),r.finish(5);case 8:case"end":return r.stop()}}),null,null,[[0,,5,8]],Promise)};return Object(m.useEffect)((function(){u&&p()}),[u]),{onNavigationStateChange:function(n){f.current;var r=Fn(n);f.current=r,e.save(t,n)},restoreState:p,initialNavigationState:a}}(r,"NAVIGATION_STATE"),s=l.initialNavigationState,u=l.onNavigationStateChange;return Object(m.useEffect)((function(){c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.a.awrap(c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),null,null,null,Promise));case 2:fn().then(i);case 3:case"end":return e.stop()}}),null,null,null,Promise)}),[]),a?g.a.createElement(Ln,null,g.a.createElement(sn,{value:a},g.a.createElement(h.b,{initialMetrics:b.a},g.a.createElement(Bn,{ref:e,initialState:s,onStateChange:u})))):null},Nn=n(312);Object(Nn.a)(zn);t.a=zn},337:function(e,t,n){n(338),n(339),e.exports=n(340)},338:function(e,t){"serviceWorker"in navigator&&window.addEventListener("load",(function(){navigator.serviceWorker.register("/expo-service-worker.js",{scope:"/"}).then((function(e){})).catch((function(e){console.info("Failed to register service-worker",e)}))}))},357:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII="},358:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC"},363:function(e,t,n){e.exports=n.p+"static/media/bg.27c56310.png"},452:function(e,t,n){e.exports=n.p+"static/media/bowser.4ba9aedf.png"},517:function(e,t,n){e.exports=n.p+"static/media/logo-ignite.5c0bc1b0.png"},518:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC"}},[[337,1,2]]]); -//# sourceMappingURL=app.e060ef15.chunk.js.map
\ No newline at end of file |