(this["webpackJsonpprofile-picture-generator"]=this["webpackJsonpprofile-picture-generator"]||[]).push([[0],{37:function(e,t,n){},41:function(e,t,n){var a={"./ProfileFrame Blue Bars.png":[49,12],"./ProfileFrame Green Bars.png":[50,13],"./ProfileFrame Mixed Bars.png":[51,14],"./ProfileFrame Purple.png":[52,15],"./ProfileFrame Red Bars.png":[53,16],"./ProfileFrame White Bars.png":[54,17],"./ProfileFrame Yellow Bars.png":[55,18]};function c(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],c=t[0];return n.e(t[1]).then((function(){return n(c)}))}c.keys=function(){return Object.keys(a)},c.id=41,e.exports=c},42:function(e,t,n){var a={"./DeineWahl.png":[56,19],"./EUReform.png":[57,20],"./Europa.png":[58,21],"./EuropeCares.png":[59,22],"./European.png":[60,23],"./FutureMadeInEurope.png":[61,24],"./JetztBistDuDran.png":[62,25],"./JoinTheChange.png":[63,26],"./RejoinEU.png":[64,27],"./ValuesOverPower.png":[65,28],"./Volt.png":[66,29],"./Volt21.png":[67,30],"./VoltEuropa.png":[68,31],"./VoltRLP.png":[69,32],"./VoteVolt.png":[70,33],"./ZukunftMadeInEurope.png":[71,34],"./democracy.png":[72,35],"./paneurop\xe4isch.png":[73,36],"./pragmatisch.png":[74,37],"./progressiv.png":[75,38]};function c(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],c=t[0];return n.e(t[1]).then((function(){return n(c)}))}c.keys=function(){return Object.keys(a)},c.id=42,e.exports=c},47:function(e,t,n){var a={"./de.ftl":[76,3],"./en.ftl":[77,4],"./es.ftl":[78,5],"./fr.ftl":[79,6],"./it.ftl":[80,7],"./nl.ftl":[81,8],"./pl.ftl":[82,9],"./ru.ftl":[83,10]};function c(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],c=t[0];return n.e(t[1]).then((function(){return n(c)}))}c.keys=function(){return Object.keys(a)},c.id=47,e.exports=c},48:function(e,t,n){"use strict";n.r(t);var a=n(1),c=n(0),r=n.n(c),o=n(25),s=n.n(o),i=n(7),u=n(17),O=n(2),h=(n(37),n(30)),l=n(27),d=n(4),j=n.n(d),f=n(9);var b=function(e){var t=e.onChange,r=Object(c.useState)([]),o=Object(O.a)(r,2),s=o[0],i=o[1],u=Object(c.useState)(null),h=Object(O.a)(u,2),l=h[0],d=h[1];Object(c.useEffect)((function(){function e(){return(e=Object(f.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all(["ProfileFrame Purple","ProfileFrame Mixed Bars","ProfileFrame Yellow Bars","ProfileFrame Red Bars","ProfileFrame Blue Bars","ProfileFrame Green Bars","ProfileFrame White Bars"].map(function(){var e=Object(f.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,n(41)("./".concat(t,".png"));case 3:return e.t1=e.sent,e.abrupt("return",{name:e.t0,src:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){i(e),d(e[0].src.default)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var b=Object(c.useCallback)((function(e){d(e.target.dataset.src)}),[d]);return Object(c.useEffect)((function(){t(l)}),[t,l]),Object(a.jsx)("div",{className:"FrameChooser",children:s.map((function(e){var t=e.src.default,n=l===t;return Object(a.jsx)("div",{"data-src":t,className:n?"frame choosen":"frame",onClick:b,children:Object(a.jsx)("img",{alt:e.name,src:t})},t)}))})},p=n(16),g=n(10),w=function(e){return Object(a.jsx)(p.b,Object(i.a)(Object(i.a)({},e),{},{elems:Object(i.a)({br:Object(a.jsx)("br",{})},e.elems),children:Object(a.jsx)(r.a.Fragment,{children:e.children})}),e.id)};function v(e){return function(t){var n=r.a.useContext(g.a);return r.a.createElement(e,Object(i.a)({getString:function(e,t,a){return n.getString(e,t,a||" ")}},t))}}var x=v((function(e){var t=e.onChange,r=e.getString,o=Object(c.useState)([]),s=Object(O.a)(o,2),i=s[0],u=s[1],h=Object(c.useState)(null),l=Object(O.a)(h,2),d=l[0],b=l[1];Object(c.useEffect)((function(){function e(){return(e=Object(f.a)(j.a.mark((function e(){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Promise.all(["","VoteVolt","JoinTheChange","RejoinEU","DeineWahl","JetztBistDuDran","VoltEuropa","VoltRLP","Volt21","Volt","paneurop\xe4isch","pragmatisch","progressiv","Europa","democracy","EUReform","European","EuropeCares","FutureMadeInEurope","ValuesOverPower","ZukunftMadeInEurope"].map(function(){var e=Object(f.a)(j.a.mark((function e(t){return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t,""!==t){e.next=5;break}e.t1="",e.next=8;break;case 5:return e.next=7,n(42)("./".concat(t,".png"));case 7:e.t1=e.sent;case 8:return e.t2=e.t1,e.abrupt("return",{name:e.t0,src:e.t2});case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())).then((function(e){u(e),b(e[0].src.default)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]);var p=Object(c.useCallback)((function(e){b(e.target.dataset.src)}),[b]);return Object(c.useEffect)((function(){t(d)}),[t,d]),Object(a.jsx)("div",{className:"HashtagChooser",children:i.map((function(e){var t=e.src.default,n=d===t;return Object(a.jsx)("button",{"data-src":t,className:n?"isInRow choosen":"isInRow",onClick:p,children:""===e.name?r("button_no_hashtag"):"#"+e.name},e.name)}))})})),D=n(28),A=n.n(D),m=n(29),C=n.n(m);function Q(e,t,n){return Math.min(Math.max(t,e),n)}var H=function(e){var t=e.onChange,n=e.backgroundURL,r=e.backgroundRatio,o=e.frameURL,s=e.hashtagURL,i=Object(c.useRef)(null),u=Object(c.useRef)(null),h=Object(c.useState)(!1),l=Object(O.a)(h,2),d=l[0],j=l[1],f=Object(c.useState)(null),b=Object(O.a)(f,2),p=b[0],g=b[1],w=Object(c.useState)(null),v=Object(O.a)(w,2),x=v[0],D=v[1],m=Object(c.useState)(0),H=Object(O.a)(m,2),T=H[0],U=H[1],F=Object(c.useState)(0),N=Object(O.a)(F,2),E=N[0],k=N[1],K=Object(c.useState)(0),B=Object(O.a)(K,2),y=B[0],S=B[1],P=Object(c.useState)(0),R=Object(O.a)(P,2),_=R[0],I=R[1],M=Object(c.useState)(1),L=Object(O.a)(M,2),V=L[0],J=L[1],Y=Object(c.useState)(300),z=Object(O.a)(Y,2),X=z[0],G=z[1],W=Object(c.useState)(300),Z=Object(O.a)(W,2),q=Z[0],$=Z[1],ee=Object(c.useState)(300),te=Object(O.a)(ee,2),ne=te[0],ae=te[1],ce=Object(c.useState)(300),re=Object(O.a)(ce,2),oe=re[0],se=re[1],ie=Object(c.useState)(0),ue=Object(O.a)(ie,2),Oe=ue[0],he=ue[1],le=Object(c.useState)(0),de=Object(O.a)(le,2),je=de[0],fe=de[1],be=Object(c.useState)(0),pe=Object(O.a)(be,2),ge=pe[0],we=pe[1],ve=Object(c.useState)(0),xe=Object(O.a)(ve,2),De=xe[0],Ae=xe[1];Object(c.useEffect)((function(){t&&t({x:T,y:E,scale:V})}),[t,T,E,V]),Object(c.useEffect)((function(){if(i&&i.current){var e=i.current.offsetWidth,t=i.current.offsetHeight;se(t),ae(e);var n=1,a=1;r<1?n=1/r:r>1&&(a=1*r),G(n),$(a)}}),[r]),Object(c.useEffect)((function(){var e=function(e,t,n,a,c){var r=Math.max(0,e*n-a)/2,o=Math.max(0,t*n-c)/2;return{rangeMaxX:r,rangeMinX:0-r,rangeMaxY:o,rangeMinY:0-o}}(X*ne,q*oe,V,ne,oe),t=e.rangeMinX,n=e.rangeMinY,a=e.rangeMaxX,c=e.rangeMaxY;he(t),fe(n),we(a),Ae(c)}),[X,q,ne,oe,V]),Object(c.useEffect)((function(){U(0),k(0),S(0),I(0),J(1)}),[n]);var me=Object(c.useCallback)((function(e){var t=1*e.target.dataset.x,n=1*e.target.dataset.y,a=Q(t+e.deltaX,Oe,ge),c=Q(n+e.deltaY,je,De);e.isFinal?(U(a||0),k(c||0),S(0),I(0)):(S(a-t||0),I(c-n||0))}),[Oe,je,ge,De]),Ce=Object(c.useCallback)((function(e,t,n,a){e.preventDefault();var c=Q(1*e.target.dataset.scale+t/200,1,8);J(c||1);var r=1*e.target.dataset.x,o=1*e.target.dataset.y;U(Q(r,Oe,ge)||0),k(Q(o,je,De)||0)}),[Oe,je,ge,De]);return Object(c.useEffect)((function(){if(!d&&i&&i.current){var e=i.current;e.addEventListener("mousedown",(function(e){e.preventDefault()}),!1),e.addEventListener("touchstart",(function(e){e.preventDefault()}),!1),e.addEventListener("touchend",(function(e){e.preventDefault()}),!1),e.addEventListener("touchmove",(function(e){e.preventDefault()}),!1),g(new A.a(e,{direction:"DIRECTION_ALL"})),D(C()(e)),j(!0)}}),[i,d]),Object(c.useEffect)((function(){if(p&&x&&d&&i&&i.current)return p.on("pan",me),x.wheel(Ce),function(){p.off("pan",me),x.unwheel()}}),[i,me,Ce,d,p,x]),Object(a.jsxs)("div",{className:"Editor",ref:i,"data-x":T,"data-y":E,"data-scale":V,children:[Object(a.jsx)("img",{src:n,ref:u,alt:"",className:"background",style:{width:100*X+"%",height:100*q+"%",transform:"translate3d(calc(-50% + ".concat(T+y,"px), calc(-50% + ").concat(E+_,"px), 0) scale(").concat(V,",").concat(V,")")}}),Object(a.jsx)("img",{src:o,alt:"",className:"foreground"}),Object(a.jsx)("img",{src:s,alt:"",className:"hashtag"})]})},T=n.p+"static/media/VoltLogoPurple.125355f6.svg",U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAQ4AgMAAACRfoQcAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJUExURVIud1Iud1Eudgy0J+8AAAADd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nTo0KFDhw4dOnSgQ4cOHTp06NChQ4cOHTp06NChQ4cOHTx06NChQ4cOdOjQoUOHDh06dOjQoUOHDh06dOjQoQMdOnTo0KFDhw4dOnTo0KFDhw4dOnToQIcOHTp06NChQ4cOHTp06NChQ4cOHTrQoUOHDh06dOjQoUOHDh06dOjQoUOHDnTo0KFDhw4dOnTo0KFDhw4dOnTo0KEDHTp06NChQ4cOHTp06NChQ4cOHTp0oEOHDh06dOjQoUOHDh06dOjQoUOHDh3o0KFDhw4dOnTo0KFDhw4dOnTo0KFDBzp06NChQ4cOHTp06NChQ4cOHTp06NCBDh06dOjQoUOHDh06dOjQoUOHDh06dKBDhw4dOnTo0KFDhw4dOnTo0KFDhw4d6NChQ4cOHTp06NChQ4cOHTp06NChQ4cCHTp06NChQ4cOHTp06NChQ4cOHTp0oEOHDh06dOjQoUOHDh06dOjQoUOHDh3o0KFDhw4dOnTo0KFDhw4dOnTo0KFDBzp06NChQ4cOHTp06NChQ4cOHTp06NCBDh06dOjQoUOHDh06dOjQoUOHDh06dKBDhw4dOnTo0KFDhw4dOnTo0KFDhw4dxeoB30xd38yzCvgAAAAASUVORK5CYII=",F="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAALSURBVHgBY2BgAAAAAwABjPg5OgAAAABJRU5ErkJggg==",N=(n(43),n(5)),E=n(21),k=n(20),K=n(31),B={de:"Deutsch",en:"English",es:"Espa\xf1ol",fr:"Fran\xe7ais",it:"Italiano",nl:"Dutch",pl:"Polska",ru:"P\u0443\u0441\u0441\u043a\u0438\u0439"},y=Object.keys(B);function S(e){return P.apply(this,arguments)}function P(){return(P=Object(f.a)(j.a.mark((function e(t){var a,c,r;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(47)("./"+t+".ftl");case 2:return a=e.sent,e.next=5,fetch(a.default);case 5:return c=e.sent,e.next=8,c.text();case 8:return r=e.sent,e.abrupt("return",Object(E.a)({},t,new k.b(r)));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){return _.apply(this,arguments)}function _(){return(_=Object(f.a)(j.a.mark((function e(t){var n,a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map(S));case 2:return n=e.sent,a=n.reduce((function(e,t){return Object.assign(e,t)})),e.abrupt("return",j.a.mark((function e(){var n,c,r,o;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(N.a)(t),e.prev=1,n.s();case 3:if((c=n.n()).done){e.next=11;break}return r=c.value,(o=new k.a(r)).addResource(a[r]),e.next=9,o;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),n.e(e.t0);case 16:return e.prev=16,n.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[1,13,16,19]])})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){var t=e.userLocales,n=e.children,r=e.onLocaleChange,o=Object(c.useState)(function(){var e=new k.a("");return e.addResource(new k.b("")),new p.c([e])}()),s=Object(O.a)(o,2),i=s[0],u=s[1];return Object(c.useEffect)((function(){function e(){return(e=Object(f.a)(j.a.mark((function e(){var n,a;return j.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(K.a)(t,y,{defaultLocale:"en"}),r&&r(n),e.next=4,R(n);case 4:a=e.sent,u(new p.c(a()));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[t,r]),i?Object(a.jsx)(p.a,{l10n:i,children:n}):Object(a.jsx)("div",{children:"Loading texts\u2026"})}var M=1080;var L=v((function(e){var t=e.getString,n=Object(c.useState)(null),r=Object(O.a)(n,2),o=r[0],s=r[1],d=Object(c.useState)(null),j=Object(O.a)(d,2),f=j[0],p=j[1],g=Object(c.useState)(null),v=Object(O.a)(g,2),D=v[0],A=v[1],m=Object(c.useState)(1),C=Object(O.a)(m,2),Q=C[0],N=C[1],E=Object(c.useState)(null),k=Object(O.a)(E,2),K=k[0],B=k[1],y=Object(c.useState)(0),S=Object(O.a)(y,2),P=S[0],R=S[1],_=Object(c.useState)(0),I=Object(O.a)(_,2),L=I[0],V=I[1],J=Object(c.useState)({x:0,y:0,scale:1}),Y=Object(O.a)(J,2),z=Y[0],X=Y[1],G=Object(c.useCallback)((function(e){s(e)}),[s]),W=Object(c.useCallback)((function(e){p(e)}),[p]),Z=Object(c.useCallback)((function(e){var t=e.x,n=e.y,a=e.scale;X({x:t,y:n,scale:a})}),[]),q=Object(c.useCallback)((function(e){if(e){var t=new FileReader;t.onload=function(t){var n=new Image;n.onload=function(){var a,c;n.width0?e[0]:"")}),[u]);return Object(a.jsx)(I,{userLocales:n,onLocaleChange:l,children:Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(L,{}),Object(a.jsx)("div",{className:"locale_chooser",children:Object.entries(B).map((function(e){var t=Object(O.a)(e,2),n=t[0],c=t[1];return Object(a.jsx)("button",{className:n===i?"isInRow choosen":"isInRow","data-locale":n,onClick:h,children:c},n)}))})]})},"AppLocalizationProvider")})),J=function(e){e&&e instanceof Function&&n.e(11).then(n.bind(null,84)).then((function(t){var n=t.getCLS,a=t.getFID,c=t.getFCP,r=t.getLCP,o=t.getTTFB;n(e),a(e),c(e),r(e),o(e)}))};s.a.render(Object(a.jsx)(r.a.StrictMode,{children:Object(a.jsx)(V,{})}),document.getElementById("root")),J()}},[[48,1,2]]]); //# sourceMappingURL=main.8871a541.chunk.js.map