EC2 Default User
Initial
6f19838
(()=>{"use strict";var e={9215:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var a=r(885),n=r(3787),l=r(3426),o=r(5004),i=r(229),u=r(6792),d=r(9385),s=r(4999),c=r(1054),f=r(2840),p=r(9555),h=r(3408),m=r(3287),g=r(2629);function x(e){var t=e.PlaceholderImage;return(0,g.jsx)(m.default,{source:t,style:y.imageStyle})}var y=u.default.create({imageStyle:{width:320,height:440,borderRadius:18,marginTop:20,marginBottom:20,alignSelf:"center"}}),j=r(5509),b=r.n(j);function v(e){var t=e.passSteps,r=e.passGuidance,n=o.useState(45),l=(0,a.default)(n,2),i=l[0],u=l[1],s=o.useState(50),f=(0,a.default)(s,2),p=f[0],h=f[1];return(0,g.jsxs)(d.default,{style:S.container,children:[(0,g.jsx)(c.default,{style:S.captionText,children:"Sampling Steps"}),(0,g.jsx)(b(),{style:S.slider,minimumValue:3,maximumValue:50,step:1,value:i,minimumTrackTintColor:"#958DA5",maximumTrackTintColor:"#9DA58D",thumbTintColor:"#6750A4",onValueChange:function(e){u(e),t(e)}}),(0,g.jsx)(c.default,{style:S.sliderValue,children:i}),(0,g.jsx)(c.default,{style:S.captionText,children:"Guidance"}),(0,g.jsx)(b(),{style:S.slider,minimumValue:0,maximumValue:100,step:.1,value:p,minimumTrackTintColor:"#958DA5",maximumTrackTintColor:"#9DA58D",thumbTintColor:"#6750A4",onValueChange:function(e){h(e),r(e)}}),(0,g.jsx)(c.default,{style:S.sliderValue,children:p})]})}var S=u.default.create({container:{alignItems:"center",paddingTop:50},slider:{width:400,height:40},sliderValue:{fontSize:18,color:"#FFFFFF",textAlign:"center",fontFamily:"Sigmar",letterSpacing:3,paddingBottom:30},captionText:{color:"#FFFFFF",fontSize:20,textAlign:"center",fontFamily:"Sigmar",letterSpacing:3}}),F=r(4942),T=r(6591);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,F.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function C(e){var t=e.passPrompt,r=o.useState(""),n=(0,a.default)(r,2),l=n[0],i=n[1],u=(0,p.default)().width,d=w(w({},D.input),{},{width:u>500?500:u-80});return(0,g.jsx)(T.default,{style:d,placeholder:"Avocado Armchair",multiline:!0,onChangeText:function(e){i(e),t(e)},value:l,maxLength:200})}var D=u.default.create({input:{backgroundColor:"#FFFFFF",borderColor:"#B58392",borderWidth:4,borderBottomLeftRadius:4,borderBottomRightRadius:4,borderStartWidth:10,borderEndWidth:10,borderRadius:6,height:80,paddingLeft:10,paddingRight:10,fontSize:20,fontFamily:"Sigmar"}}),A=r(2982),P=r(2445);function k(){var e=(0,o.useRef)((0,A.default)(Array(12)).map((function(){return new P.default.Value(0)}))).current,t=(0,p.default)().width;(0,o.useEffect)((function(){e.map((function(e,t){var r=P.default.timing(e,{toValue:1,duration:2e3,useNativeDriver:!1}),a=P.default.timing(e,{toValue:0,duration:2e3,useNativeDriver:!1}),n=300,l=450,o=600,i=[t*n,t*l,(11-t)*n,t*o,(11-t)*l,t*n,(11-t)*o,t*l,(11-t)*n,(11-t)*l,t*o,(11-t)*o].map((function(e,t){return P.default.sequence([P.default.delay(e),r,a])})),u=P.default.sequence(i);return P.default.loop(u)})).forEach((function(e){e.start()}))}),[e]);var r=e.map((function(e){return e.interpolate({inputRange:[0,1],outputRange:t>1e3?[60,90]:[20,30],extrapolate:"clamp"})})).map((function(e){return{fontSize:e}}));return(0,g.jsx)(d.default,{style:I.containerbreathing,children:(0,g.jsxs)(c.default,{style:I.heading,children:[(0,g.jsx)(P.default.Text,{style:[I.char,r[0]],children:"R"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[1]],children:"E"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[2]],children:"A"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[3]],children:"C"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[4]],children:"T"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[5]],children:"-"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[6]],children:"N"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[7]],children:"A"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[8]],children:"T"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[9]],children:"I"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[10]],children:"V"}),(0,g.jsx)(P.default.Text,{style:[I.char,r[11]],children:"E"})]})})}var I=u.default.create({containerbreathing:{flex:1/8,alignItems:"center",justifyContent:"center"},heading:{fontWeight:"bold",fontWeight:"20",color:"#6750A4",fontFamily:"Sigmar",posistion:"absolute",top:0,left:0},char:{marginHorizontal:15}}),R=r(3131),V=[{label:"Open Journey",value:"prompthero/openjourney"},{label:"Photo",value:"dreamlike-art/dreamlike-photoreal-2.0"},{label:"Arcane",value:"nitrosocke/Arcane-Diffusion"},{label:"Van-Gogh",value:"dallinmackay/Van-Gogh-diffusion"},{label:"Robots",value:"nousr/robo-diffusion"}];function E(e){var t=e.passModelID;return(0,g.jsx)(R.Dropdown,{style:z.dropdown,selectedTextStyle:z.selectedTextStyle,placeholderStyle:z.placeholderStyle,data:V,labelField:"label",valueField:"value",placeholder:"Model ID",onChange:function(e){t(e.value)}})}var z=u.default.create({dropdown:{margin:16,height:50,width:300,borderBottomColor:"#9DA58D",borderBottomWidth:3},placeholderStyle:{fontSize:25,color:"#FFFFFF",textAlign:"center",fontFamily:"Sigmar",letterSpacing:3},selectedTextStyle:{fontSize:20,letterSpacing:3,color:"#FFFFFF",textAlign:"center",fontFamily:"Sigmar"}}),M=r(9615),_=r(8075);function B(){(0,M.useFonts)({Sigmar:r(8038)});var e=(0,o.useState)(_),t=(0,a.default)(e,2),n=t[0],u=t[1],m=(0,o.useState)(45),y=(0,a.default)(m,2),j=y[0],b=y[1],S=(0,o.useState)(45),F=(0,a.default)(S,2),T=F[0],O=F[1],w=(0,o.useState)("prompthero/openjourney"),D=(0,a.default)(w,2),A=D[0],P=D[1],I=(0,o.useState)("Avocado Armchair"),R=(0,a.default)(I,2),V=R[0],z=R[1],B=(0,o.useState)(""),G=(0,a.default)(B,2),N=G[0],L=G[1],H=(0,o.useState)(!1),q=(0,a.default)(H,2),J=q[0],Y=q[1],K=(0,o.useState)(!1),Q=(0,a.default)(K,2),U=Q[0],X=Q[1],Z=(0,o.useState)("Avocado Armchair"),$=(0,a.default)(Z,2),ee=$[0],te=$[1],re=(0,p.default)().width,ae=function(e){z(e)},ne=function(e){b(e)},le=function(e){O(e)},oe=function(e){X(!1),P(e)};return(0,o.useEffect)((function(){""!=N&&(Y(!0),h.default.post("/api",{prompt:V,steps:j,guidance:T,modelID:A}).then((function(e){console.log(e),Y(!1),te(V),u("data:image/png;base64,"+e.data.output)})).catch((function(e){Y(!1),X(!0),console.log(e)})))}),[N]),(0,g.jsxs)(d.default,{style:W.titlecontainer,children:[(0,g.jsx)(k,{}),(0,g.jsx)(s.default,{scrollY:!0,style:W.ScrollView,children:re>1e3?(0,g.jsxs)(d.default,{style:W.rowContainer,children:[(0,g.jsxs)(d.default,{style:W.columnContainer,children:[(0,g.jsx)(d.default,{children:(0,g.jsx)(C,{passPrompt:ae})}),(0,g.jsxs)(d.default,{style:W.rowContainer,children:[(0,g.jsx)(E,{passModelID:oe}),(0,g.jsxs)(d.default,{style:W.columnContainer,children:[J?(0,g.jsx)(i.default,{size:"large",color:"#B58392",style:W.activityIndicator}):(0,g.jsx)(f.default,{onPress:function(){L(V+"-"+j+"-"+T+"-"+A)},style:function(e){return[{backgroundColor:e.pressed?"#9DA58D":"#958DA5"},W.button]},children:function(e){var t=e.pressed;return(0,g.jsx)(c.default,{style:W.promptText,children:t?"INFERRED!":"Inference"})}}),U?(0,g.jsx)(c.default,{style:W.promptText,children:"Model Error!"}):(0,g.jsx)(g.Fragment,{})]})]}),(0,g.jsx)(d.default,{children:(0,g.jsx)(v,{passSteps:ne,passGuidance:le})})]}),(0,g.jsx)(d.default,{style:W.columnContainer,children:(0,g.jsxs)(d.default,{style:W.columnContainer,children:[(0,g.jsx)(x,{PlaceholderImage:n}),(0,g.jsx)(c.default,{style:W.promptText,children:ee})]})})]}):(0,g.jsxs)(d.default,{style:W.columnContainer,children:[(0,g.jsx)(C,{passPrompt:ae}),(0,g.jsx)(E,{passModelID:oe}),J?(0,g.jsx)(i.default,{size:"large",color:"#B58392"}):(0,g.jsx)(f.default,{onPress:function(){L(V+"-"+j+"-"+T+"-"+A)},style:function(e){return[{backgroundColor:e.pressed?"#9DA58D":"#958DA5"},W.button]},children:function(e){var t=e.pressed;return(0,g.jsx)(c.default,{style:W.promptText,children:t?"INFERRED!":"Inference"})}}),U?(0,g.jsx)(c.default,{style:W.promptText,children:"Model Error!"}):(0,g.jsx)(g.Fragment,{}),(0,g.jsx)(v,{passSteps:ne,passGuidance:le}),(0,g.jsx)(x,{PlaceholderImage:n}),(0,g.jsx)(c.default,{style:W.promptText,children:ee})]})}),(0,g.jsx)(l.default,{style:"auto"})]})}var W=u.default.create({canvascontainer:{backgroundColor:"#25292e",position:"fixed",top:0,left:0,right:0,bottom:0,padding:50},titlecontainer:{backgroundColor:"#25292e",position:"fixed",top:0,left:0,right:0,bottom:0,padding:50},rowContainer:{flex:1,backgroundColor:"#25292e",flexDirection:"row",alignItems:"center",marginTop:10,overflow:"auto",padding:20},columnContainer:{flex:1,alignItems:"center",flexDirection:"column"},button:{fontFamily:"Sigmar",paddingHorizontal:32,borderRadius:4,elevation:3},activityIndicator:{marginLeft:50},promptText:{color:"#FFFFFF",fontSize:18,fontWeight:"italic",textAlign:"center",wordWrap:"break-word",fontFamily:"Sigmar",letterSpacing:2,lineHeight:30},ScrollView:{backgroundColor:"#25292e",marginTop:50,padding:5}});(0,n.default)(B)},8038:(e,t,r)=>{e.exports=r.p+"static/media/Sigmar-Regular.daeeaca2f7490cb1c50c.ttf"},8075:(e,t,r)=>{e.exports=r.p+"static/media/avocado.667d95040b7743f10475.jpg"}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var l=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(l.exports,l,l.exports,r),l.loaded=!0,l.exports}r.m=e,(()=>{var e=[];r.O=(t,a,n,l)=>{if(!a){var o=1/0;for(s=0;s<e.length;s++){for(var[a,n,l]=e[s],i=!0,u=0;u<a.length;u++)(!1&l||o>=l)&&Object.keys(r.O).every((e=>r.O[e](a[u])))?a.splice(u--,1):(i=!1,l<o&&(o=l));if(i){e.splice(s--,1);var d=n();void 0!==d&&(t=d)}}return t}l=l||0;for(var s=e.length;s>0&&e[s-1][2]>l;s--)e[s]=e[s-1];e[s]=[a,n,l]}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(a,n){if(1&n&&(a=this(a)),8&n)return a;if("object"===typeof a&&a){if(4&n&&a.__esModule)return a;if(16&n&&"function"===typeof a.then)return a}var l=Object.create(null);r.r(l);var o={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&a;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>o[e]=()=>a[e]));return o.default=()=>a,r.d(l,o),l}})(),r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",(()=>{var e={179:0};r.O.j=t=>0===e[t];var t=(t,a)=>{var n,l,[o,i,u]=a,d=0;if(o.some((t=>0!==e[t]))){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(u)var s=u(r)}for(t&&t(a);d<o.length;d++)l=o[d],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(s)},a=self.webpackChunkweb=self.webpackChunkweb||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var a=r.O(void 0,[37],(()=>r(9215)));a=r.O(a)})();
//# sourceMappingURL=main.8ba1c129.js.map