import{S as W,i as X,s as j,k as M,y as T,a as R,e as N,l as B,m as P,z,c as H,h,n as S,b as y,A as G,E as D,g as v,v as C,d as w,f as q,B as A,I as fe,C as ue,F as pe,G as me,H as ce,K as De,U as Ee,t as ye,w as J,q as K,r as U,u as Se,Z as Y,_ as x,a0 as Me}from"./index.81089de3.js";import{V as Be,M as Pe,f as te,P as Re,a as He,b as Te,c as ze,B as Ge}from"./BulkGenerate.9026cb03.js";import{R as de,L as Ae}from"./RoundedButton.0082c1ae.js";import{d as Fe}from"./environment.07c54b58.js";import{p as se,e as Le,M as Ne,l as Ce}from"./index.88abc694.js";import{H as qe,B as Ke,b as Ue,M as Ze,c as je}from"./folder-open.2bbc8054.js";import{a as Je,F as Oe}from"./Dropzone.0894402f.js";function le(l){let e,t;return e=new He({props:{photopea:l[2],modelViewer:l[3]}}),e.$on("open",l[19]),e.$on("src",l[20]),e.$on("close",l[21]),{c(){T(e.$$.fragment)},l(n){z(e.$$.fragment,n)},m(n,s){G(e,n,s),t=!0},p(n,s){const o={};s[0]&4&&(o.photopea=n[2]),s[0]&8&&(o.modelViewer=n[3]),e.$set(o)},i(n){t||(v(e.$$.fragment,n),t=!0)},o(n){w(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Qe(l){let e,t,n,s,o,p;return t=new Ae({props:{class:"fill-current animate-spin"}}),{c(){e=M("div"),T(t.$$.fragment),n=R(),s=M("div"),o=K(l[6]),this.h()},l(i){e=B(i,"DIV",{class:!0});var m=P(e);z(t.$$.fragment,m),n=H(m),s=B(m,"DIV",{class:!0});var r=P(s);o=U(r,l[6]),r.forEach(h),m.forEach(h),this.h()},h(){S(s,"class","font-semibold"),S(e,"class","flex flex-col items-center bg-slate-500 bg-opacity-20 p-5 gap-2 rounded-lg")},m(i,m){y(i,e,m),G(t,e,null),D(e,n),D(e,s),D(s,o),p=!0},p(i,m){(!p||m[0]&64)&&Se(o,i[6])},i(i){p||(v(t.$$.fragment,i),p=!0)},o(i){w(t.$$.fragment,i),p=!1},d(i){i&&h(e),A(t)}}}function We(l){let e,t,n,s;function o(i){l[22](i)}let p={brand:"single",hideThumbs:!0,showActions:!1,showPendingPsds:!1,psds:[l[0]],mockupInputIndex:0};return l[8]!==void 0&&(p.mockupInput=l[8]),t=new ze({props:p}),J.push(()=>Y(t,"mockupInput",o)),t.$on("change",l[23]),t.$on("visual",l[24]),{c(){e=M("div"),T(t.$$.fragment),this.h()},l(i){e=B(i,"DIV",{class:!0});var m=P(e);z(t.$$.fragment,m),m.forEach(h),this.h()},h(){S(e,"class","flex flex-col gap-4")},m(i,m){y(i,e,m),G(t,e,null),s=!0},p(i,m){const r={};m[0]&1&&(r.psds=[i[0]]),!n&&m[0]&256&&(n=!0,r.mockupInput=i[8],x(()=>n=!1)),t.$set(r)},i(i){s||(v(t.$$.fragment,i),s=!0)},o(i){w(t.$$.fragment,i),s=!1},d(i){i&&h(e),A(t)}}}function Xe(l){let e,t,n,s,o,p,i=l[15]&&le(l);const m=l[18].default,r=ue(m,l,l[30],null),c=[We,Qe],f=[];function V(u,d){return u[0]?0:1}return s=V(l),o=f[s]=c[s](l),{c(){i&&i.c(),e=R(),t=M("div"),r&&r.c(),n=R(),o.c(),this.h()},l(u){i&&i.l(u),e=H(u),t=B(u,"DIV",{class:!0});var d=P(t);r&&r.l(d),n=H(d),o.l(d),d.forEach(h),this.h()},h(){S(t,"class","flex-auto w-full sm:max-w-sm")},m(u,d){i&&i.m(u,d),y(u,e,d),y(u,t,d),r&&r.m(t,null),D(t,n),f[s].m(t,null),p=!0},p(u,d){u[15]?i?(i.p(u,d),d[0]&32768&&v(i,1)):(i=le(u),i.c(),v(i,1),i.m(e.parentNode,e)):i&&(C(),w(i,1,1,()=>{i=null}),q()),r&&r.p&&(!p||d[0]&1073741824)&&pe(r,m,u,u[30],p?ce(m,u[30],d,null):me(u[30]),null);let $=s;s=V(u),s===$?f[s].p(u,d):(C(),w(f[$],1,1,()=>{f[$]=null}),q(),o=f[s],o?o.p(u,d):(o=f[s]=c[s](u),o.c()),v(o,1),o.m(t,null))},i(u){p||(v(i),v(r,u),v(o),p=!0)},o(u){w(i),w(r,u),w(o),p=!1},d(u){i&&i.d(u),u&&h(e),u&&h(t),r&&r.d(u),f[s].d()}}}function ne(l){let e,t;return e=new de({props:{icon:Te,textSize:"text-sm",class:(l[13]?"pointer-events-none":"")+" leading-none absolute top-4 right-4",$$slots:{default:[Ye]},$$scope:{ctx:l}}}),e.$on("click",l[25]),{c(){T(e.$$.fragment)},l(n){z(e.$$.fragment,n)},m(n,s){G(e,n,s),t=!0},p(n,s){const o={};s[0]&8192&&(o.class=(n[13]?"pointer-events-none":"")+" leading-none absolute top-4 right-4"),s[0]&1073741824&&(o.$$scope={dirty:s,ctx:n}),e.$set(o)},i(n){t||(v(e.$$.fragment,n),t=!0)},o(n){w(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Ye(l){let e;return{c(){e=K("Download")},l(t){e=U(t,"Download")},m(t,n){y(t,e,n)},d(t){t&&h(e)}}}function xe(l){let e,t,n=l[10]!==void 0&&ne(l);return{c(){n&&n.c(),e=N()},l(s){n&&n.l(s),e=N()},m(s,o){n&&n.m(s,o),y(s,e,o),t=!0},p(s,o){s[10]!==void 0?n?(n.p(s,o),o[0]&1024&&v(n,1)):(n=ne(s),n.c(),v(n,1),n.m(e.parentNode,e)):n&&(C(),w(n,1,1,()=>{n=null}),q())},i(s){t||(v(n),t=!0)},o(s){w(n),t=!1},d(s){n&&n.d(s),s&&h(e)}}}function oe(l){let e=l[14],t,n,s=ae(l);return{c(){s.c(),t=N()},l(o){s.l(o),t=N()},m(o,p){s.m(o,p),y(o,t,p),n=!0},p(o,p){p[0]&16384&&j(e,e=o[14])?(C(),w(s,1,1,De),q(),s=ae(o),s.c(),v(s,1),s.m(t.parentNode,t)):s.p(o,p)},i(o){n||(v(s),n=!0)},o(o){w(s),n=!1},d(o){o&&h(t),s.d(o)}}}function ae(l){let e,t,n={photopea:l[16],visualSlot:l[11],visualMockupInput:l[8],visualDesign:l[12]};return e=new Re({props:n}),l[26](e),e.$on("src",l[27]),e.$on("isBusy",l[28]),e.$on("done",l[29]),{c(){T(e.$$.fragment)},l(s){z(e.$$.fragment,s)},m(s,o){G(e,s,o),t=!0},p(s,o){const p={};o[0]&65536&&(p.photopea=s[16]),o[0]&2048&&(p.visualSlot=s[11]),o[0]&256&&(p.visualMockupInput=s[8]),o[0]&4096&&(p.visualDesign=s[12]),e.$set(p)},i(s){t||(v(e.$$.fragment,s),t=!0)},o(s){w(e.$$.fragment,s),t=!1},d(s){l[26](null),A(e,s)}}}function et(l){let e,t,n,s,o,p,i,m;t=new Be({props:{$$slots:{default:[Xe]},$$scope:{ctx:l}}}),o=new Pe({props:{aspectRatio:l[7],isBusy:l[13],maxHeight:"max-h-[36rem]",class:"relative mx-auto",title:l[4],src:l[1],type:l[5],psd:l[0],$$slots:{default:[xe]},$$scope:{ctx:l}}});let r=l[11]&&oe(l);return{c(){e=M("div"),T(t.$$.fragment),n=R(),s=M("div"),T(o.$$.fragment),p=R(),r&&r.c(),i=N(),this.h()},l(c){e=B(c,"DIV",{class:!0});var f=P(e);z(t.$$.fragment,f),n=H(f),s=B(f,"DIV",{class:!0});var V=P(s);z(o.$$.fragment,V),V.forEach(h),f.forEach(h),p=H(c),r&&r.l(c),i=N(),this.h()},h(){S(s,"class","flex-1 w-full bg-gray-500 bg-opacity-20 rounded lg:sticky top-5"),S(e,"class","flex flex-col-reverse lg:flex-row items-start gap-5")},m(c,f){y(c,e,f),G(t,e,null),D(e,n),D(e,s),G(o,s,null),y(c,p,f),r&&r.m(c,f),y(c,i,f),m=!0},p(c,f){const V={};f[0]&1073777999&&(V.$$scope={dirty:f,ctx:c}),t.$set(V);const u={};f[0]&128&&(u.aspectRatio=c[7]),f[0]&8192&&(u.isBusy=c[13]),f[0]&16&&(u.title=c[4]),f[0]&2&&(u.src=c[1]),f[0]&32&&(u.type=c[5]),f[0]&1&&(u.psd=c[0]),f[0]&1073751040&&(u.$$scope={dirty:f,ctx:c}),o.$set(u),c[11]?r?(r.p(c,f),f[0]&2048&&v(r,1)):(r=oe(c),r.c(),v(r,1),r.m(i.parentNode,i)):r&&(C(),w(r,1,1,()=>{r=null}),q())},i(c){m||(v(t.$$.fragment,c),v(o.$$.fragment,c),v(r),m=!0)},o(c){w(t.$$.fragment,c),w(o.$$.fragment,c),w(r),m=!1},d(c){c&&h(e),A(t),A(o),c&&h(p),r&&r.d(c),c&&h(i)}}}function tt(l,e,t){let n,s;fe(l,te,g=>t(31,s=g));let{$$slots:o={},$$scope:p}=e,{photopea:i}=e,{modelViewer:m}=e,{psd:r}=e,{title:c}=e,{type:f}=e,{src:V}=e,{loadingText:u}=e,{aspectRatio:d}=e,$,I,b,k,a=!1,_=0,E={id:`${Date.now()+Math.random()}`,imgs:[]},L=!1;const F=async(g,Q=!1)=>{if(g===void 0)return;const ee=r.slots[g];ee&&(g!==I&&t(14,_++,_),t(10,I=g),t(13,a=!0),t(11,b=ee),t(12,k=E.imgs[I]),Ee(te,s=!Q,s),await ye(),$&&$.applyParams(b,s,String(_)))};r&&(()=>{F(r.slots.length-1),t(14,_++,_)})();const Z=()=>{t(11,b=void 0)},_e=g=>{t(1,V=g.detail)},ge=async()=>{t(15,L=!1),F(I)};function he(g){E=g,t(8,E)}const ve=g=>{F(Math.min(g.detail,r.slots.length-1))},ke=()=>t(15,L=!0),be=()=>F(I,!0);function we(g){J[g?"unshift":"push"](()=>{$=g,t(9,$)})}const $e=g=>{t(1,V=g.detail)},Ve=g=>{t(13,a=g.detail)},Ie=g=>{g.detail===String(_)&&(t(11,b=void 0),t(13,a=!1))};return l.$$set=g=>{"photopea"in g&&t(2,i=g.photopea),"modelViewer"in g&&t(3,m=g.modelViewer),"psd"in g&&t(0,r=g.psd),"title"in g&&t(4,c=g.title),"type"in g&&t(5,f=g.type),"src"in g&&t(1,V=g.src),"loadingText"in g&&t(6,u=g.loadingText),"aspectRatio"in g&&t(7,d=g.aspectRatio),"$$scope"in g&&t(30,p=g.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&44&&t(16,n=f==="psd"?i:m),l.$$.dirty[0]&257&&E.imgs.length&&r.slots.forEach((g,Q)=>{t(0,r.slots[Q].highlight=!1,r)})},[r,V,i,m,c,f,u,d,E,$,I,b,k,a,_,L,n,F,o,Z,_e,ge,he,ve,ke,be,we,$e,Ve,Ie,p]}class _t extends W{constructor(e){super(),X(this,e,tt,et,j,{photopea:2,modelViewer:3,psd:0,title:4,type:5,src:1,loadingText:6,aspectRatio:7},null,[-1,-1])}}function st(l){let e;return{c(){e=K("Get started")},l(t){e=U(t,"Get started")},m(t,n){y(t,e,n)},d(t){t&&h(e)}}}function lt(l){let e,t,n,s,o,p,i,m,r,c,f,V,u,d,$,I,b,k;return r=new de({props:{textSize:"text-2xl md:text-4xl",class:"!py-4 !px-10 ",$$slots:{default:[st]},$$scope:{ctx:l}}}),f=new qe({props:{src:Ke,autoplay:!0,class:"relative rounded-2xl overflow-hidden -mx-7 -mb-5"}}),d=new Je({props:{class:"float"}}),b=new Oe({props:{class:"float ![animation-delay:-3s]"}}),{c(){e=M("div"),t=M("div"),n=R(),s=M("div"),o=M("h3"),p=K("Bulk generate with your own mockup PSDs right in your browser!"),i=R(),m=M("a"),T(r.$$.fragment),c=R(),T(f.$$.fragment),V=R(),u=M("div"),T(d.$$.fragment),$=R(),I=M("div"),T(b.$$.fragment),this.h()},l(a){e=B(a,"DIV",{class:!0});var _=P(e);t=B(_,"DIV",{class:!0}),P(t).forEach(h),n=H(_),s=B(_,"DIV",{class:!0});var E=P(s);o=B(E,"H3",{class:!0});var L=P(o);p=U(L,"Bulk generate with your own mockup PSDs right in your browser!"),L.forEach(h),i=H(E),m=B(E,"A",{href:!0,target:!0,class:!0});var F=P(m);z(r.$$.fragment,F),F.forEach(h),c=H(E),z(f.$$.fragment,E),E.forEach(h),V=H(_),u=B(_,"DIV",{class:!0});var O=P(u);z(d.$$.fragment,O),O.forEach(h),$=H(_),I=B(_,"DIV",{class:!0});var Z=P(I);z(b.$$.fragment,Z),Z.forEach(h),_.forEach(h),this.h()},h(){S(t,"class","absolute w-full h-full synthwave-gradient opacity-20 scale-125 blur-3xl pointer-events-none"),S(o,"class","text-3xl md:text-5xl font-bold relative z-50 text-white"),S(m,"href","/"),S(m,"target","_blank"),S(m,"class","self-start"),S(s,"class","relative flex flex-col gap-6 synthwave-gradient rounded-3xl px-10 py-8 mt-24 lg:mt-32 z-10"),S(u,"class","hidden xl:block absolute bottom-0 left-0 transform -translate-x-[70%]"),S(I,"class","hidden xl:block absolute bottom-0 right-0 transform translate-x-[70%] z-20"),S(e,"class","relative max-w-5xl mx-auto")},m(a,_){y(a,e,_),D(e,t),D(e,n),D(e,s),D(s,o),D(o,p),D(s,i),D(s,m),G(r,m,null),D(s,c),G(f,s,null),D(e,V),D(e,u),G(d,u,null),D(e,$),D(e,I),G(b,I,null),k=!0},p(a,[_]){const E={};_&1&&(E.$$scope={dirty:_,ctx:a}),r.$set(E)},i(a){k||(v(r.$$.fragment,a),v(f.$$.fragment,a),v(d.$$.fragment,a),v(b.$$.fragment,a),k=!0)},o(a){w(r.$$.fragment,a),w(f.$$.fragment,a),w(d.$$.fragment,a),w(b.$$.fragment,a),k=!1},d(a){a&&h(e),A(r),A(f),A(d),A(b)}}}class nt extends W{constructor(e){super(),X(this,e,null,lt,j,{})}}const ot=l=>({photopea:l&2}),re=l=>({photopea:l[1],modelViewer:l[3]});function ie(l){let e,t,n,s,o,p,i,m,r,c,f;function V(d){l[7](d)}let u={photopea:l[1],modelViewer:l[3]};return l[0]!==void 0&&(u.psds=l[0]),r=new Ge({props:u}),J.push(()=>Y(r,"psds",V)),{c(){e=M("div"),t=M("h3"),n=K("Bulk generate mockups"),s=R(),o=M("div"),p=K("Instead of creating mockups one-by-one you can use the bulk mockup generator below."),i=R(),m=M("div"),T(r.$$.fragment),this.h()},l(d){e=B(d,"DIV",{class:!0});var $=P(e);t=B($,"H3",{class:!0});var I=P(t);n=U(I,"Bulk generate mockups"),I.forEach(h),s=H($),o=B($,"DIV",{class:!0});var b=P(o);p=U(b,"Instead of creating mockups one-by-one you can use the bulk mockup generator below."),b.forEach(h),$.forEach(h),i=H(d),m=B(d,"DIV",{class:!0});var k=P(m);z(r.$$.fragment,k),k.forEach(h),this.h()},h(){S(t,"class","text-3xl font-bold mb-2"),S(o,"class","text-slate-300 text-opacity-90"),S(e,"class","mt-16 max-w-7xl mx-auto"),S(m,"class","w-full max-w-[100rem] mx-auto mt-6")},m(d,$){y(d,e,$),D(e,t),D(t,n),D(e,s),D(e,o),D(o,p),y(d,i,$),y(d,m,$),G(r,m,null),f=!0},p(d,$){const I={};$&2&&(I.photopea=d[1]),!c&&$&1&&(c=!0,I.psds=d[0],x(()=>c=!1)),r.$set(I)},i(d){f||(v(r.$$.fragment,d),f=!0)},o(d){w(r.$$.fragment,d),f=!1},d(d){d&&h(e),d&&h(i),d&&h(m),A(r)}}}function at(l){let e,t,n,s,o,p,i,m,r,c,f,V,u;function d(a){l[6](a)}let $={psds:l[0]};l[1]!==void 0&&($.photopea=l[1]),e=new Ue({props:$}),J.push(()=>Y(e,"photopea",d)),s=new Ze({});const I=l[5].default,b=ue(I,l,l[4],re);let k=(l[0].length||l[2].length)&&ie(l);return c=new je({}),V=new nt({}),{c(){T(e.$$.fragment),n=R(),T(s.$$.fragment),o=R(),p=M("div"),b&&b.c(),i=R(),k&&k.c(),m=R(),r=M("div"),T(c.$$.fragment),f=R(),T(V.$$.fragment),this.h()},l(a){z(e.$$.fragment,a),n=H(a),z(s.$$.fragment,a),o=H(a),p=B(a,"DIV",{class:!0});var _=P(p);b&&b.l(_),_.forEach(h),i=H(a),k&&k.l(a),m=H(a),r=B(a,"DIV",{class:!0});var E=P(r);z(c.$$.fragment,E),E.forEach(h),f=H(a),z(V.$$.fragment,a),this.h()},h(){S(p,"class","flex flex-col gap-y-4 w-full max-w-7xl mx-auto"),S(r,"class","w-full max-w-7xl mx-auto mt-12 lg:mt-20")},m(a,_){G(e,a,_),y(a,n,_),G(s,a,_),y(a,o,_),y(a,p,_),b&&b.m(p,null),y(a,i,_),k&&k.m(a,_),y(a,m,_),y(a,r,_),G(c,r,null),y(a,f,_),G(V,a,_),u=!0},p(a,[_]){const E={};_&1&&(E.psds=a[0]),!t&&_&2&&(t=!0,E.photopea=a[1],x(()=>t=!1)),e.$set(E),b&&b.p&&(!u||_&18)&&pe(b,I,a,a[4],u?ce(I,a[4],_,ot):me(a[4]),re),a[0].length||a[2].length?k?(k.p(a,_),_&5&&v(k,1)):(k=ie(a),k.c(),v(k,1),k.m(m.parentNode,m)):k&&(C(),w(k,1,1,()=>{k=null}),q())},i(a){u||(v(e.$$.fragment,a),v(s.$$.fragment,a),v(b,a),v(k),v(c.$$.fragment,a),v(V.$$.fragment,a),u=!0)},o(a){w(e.$$.fragment,a),w(s.$$.fragment,a),w(b,a),w(k),w(c.$$.fragment,a),w(V.$$.fragment,a),u=!1},d(a){A(e,a),a&&h(n),A(s,a),a&&h(o),a&&h(p),b&&b.d(a),a&&h(i),k&&k.d(a),a&&h(m),a&&h(r),A(c),a&&h(f),A(V,a)}}}function rt(l,e,t){let n;fe(l,se,f=>t(2,n=f));let{$$slots:s={},$$scope:o}=e,{psds:p}=e,i=new Le(Fe);const m=new Ne;Me(()=>{m.destroy(),i.destroy(),se.set([]),Ce.set(new Set)});function r(f){i=f,t(1,i)}function c(f){p=f,t(0,p)}return l.$$set=f=>{"psds"in f&&t(0,p=f.psds),"$$scope"in f&&t(4,o=f.$$scope)},[p,i,n,m,o,s,r,c]}class gt extends W{constructor(e){super(),X(this,e,rt,at,j,{psds:0})}}export{nt as H,_t as S,gt as a};
