igiveup 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +1 -1
- package/dist/__next.__PAGE__.txt +4 -4
- package/dist/__next._full.txt +14 -14
- package/dist/__next._head.txt +5 -5
- package/dist/__next._index.txt +6 -6
- package/dist/__next._tree.txt +2 -2
- package/dist/_next/static/chunks/23efa3561aec501d.js +1 -0
- package/dist/_next/static/chunks/{22fc8eaca9ee64bc.js → 89bc7afe2c734bd3.js} +1 -1
- package/dist/_next/static/chunks/93b143cd05ebc206.css +1 -0
- package/dist/_next/static/chunks/a2c322632f15e919.js +1 -0
- package/dist/_next/static/chunks/a8d93294ae937c94.js +4 -0
- package/dist/_next/static/chunks/{929661c509b626ae.js → afe4b73b6f0c57df.js} +2 -2
- package/dist/_next/static/chunks/cbae1c7b6102ce1d.js +106 -0
- package/dist/_next/static/chunks/{60ed5b2efa700aaa.js → dc366463edc1a494.js} +1 -1
- package/dist/_next/static/chunks/e6de3f22e16f3aa6.js +1 -0
- package/dist/_next/static/chunks/eaeb8f7ae70159be.js +1 -0
- package/dist/_next/static/chunks/{698a880cc295fffe.js → ff0c2750fd49f4ea.js} +1 -1
- package/dist/_next/static/chunks/{turbopack-f65fc62433f994bd.js → turbopack-51dd591fe12787c1.js} +1 -1
- package/dist/_not-found/__next._full.txt +16 -16
- package/dist/_not-found/__next._head.txt +5 -5
- package/dist/_not-found/__next._index.txt +6 -6
- package/dist/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/_not-found/__next._not-found.txt +3 -3
- package/dist/_not-found/__next._tree.txt +2 -2
- package/dist/_not-found.html +1 -1
- package/dist/_not-found.txt +16 -16
- package/dist/index.html +1 -1
- package/dist/index.txt +14 -14
- package/dist/manifest.webmanifest +1 -1
- package/dist/sitemap.xml +1 -1
- package/package.json +4 -4
- package/dist/_next/static/chunks/66fab0b378efd2a4.js +0 -1
- package/dist/_next/static/chunks/6b74c6dc32328023.js +0 -4
- package/dist/_next/static/chunks/6eab5ca50b95bebb.js +0 -1
- package/dist/_next/static/chunks/75a7d00aac306ce4.js +0 -13
- package/dist/_next/static/chunks/8b1c561b940ebca7.css +0 -1
- package/dist/_next/static/chunks/8c8ada6023ad7145.js +0 -1
- package/dist/_next/static/chunks/e511442ff98acb18.js +0 -1
- /package/dist/_next/static/{QFKeVo403ziE8a9q3csjK → EbIMJK1UjWNFicJg3k1Qi}/_buildManifest.js +0 -0
- /package/dist/_next/static/{QFKeVo403ziE8a9q3csjK → EbIMJK1UjWNFicJg3k1Qi}/_clientMiddlewareManifest.json +0 -0
- /package/dist/_next/static/{QFKeVo403ziE8a9q3csjK → EbIMJK1UjWNFicJg3k1Qi}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3541,(e,t,r)=>{},50290,(e,t,r)=>{var s=e.i(97803);e.r(3541);var a=e.r(27946),i=a&&"object"==typeof a&&"default"in a?a:{default:a},l=void 0!==s.default&&s.default.env&&!0,n=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,r=t.name,s=void 0===r?"stylesheet":r,a=t.optimizeForSpeed,i=void 0===a?l:a;d(n(s),"`name` must be a string"),this._name=s,this._deletedRulePlaceholder="#"+s+"-deleted-rule____{}",d("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(d(n(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return l||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var s=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,s))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var r="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(s){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var s=this._tags[e];d(s,"old rule at index `"+e+"` not found"),s.textContent=t}return e},r.deleteRule=function(e){if("undefined"==typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];d(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&d(n(t),"makeStyleTag accepts only strings as second parameter");var s=document.createElement("style");this._nonce&&s.setAttribute("nonce",this._nonce),s.type="text/css",s.setAttribute("data-"+e,""),t&&s.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return r?a.insertBefore(s,r):a.appendChild(s),s},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(e.prototype,t),e}();function d(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),s=e+r;return u[s]||(u[s]="jsx-"+c(e+"-"+r)),u[s]}function h(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,s=void 0===r?null:r,a=t.optimizeForSpeed,i=void 0!==a&&a;this._sheet=s||new o({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),s&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),s=r.styleId,a=r.rules;if(s in this._instancesCounts){this._instancesCounts[s]+=1;return}var i=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[s]=i,this._instancesCounts[s]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var s=this._fromServer&&this._fromServer[r];s?(s.parentNode.removeChild(s),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],s=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:s}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,s=e.id;if(r){var a=m(s,r);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return h(a,e)}):[h(a,t)]}}return{styleId:m(s),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),x=a.createContext(null);function g(){return new p}function f(){return a.useContext(x)}x.displayName="StyleSheetContext";var b=i.default.useInsertionEffect||i.default.useLayoutEffect,y="undefined"!=typeof window?g():void 0;function v(e){var t=y||f();return t&&("undefined"==typeof window?t.add(e):b(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return m(e[0],e[1])}).join(" ")},r.StyleRegistry=function(e){var t=e.registry,r=e.children,s=a.useContext(x),l=a.useState(function(){return s||t||g()})[0];return i.default.createElement(x.Provider,{value:l},r)},r.createStyleRegistry=g,r.style=v,r.useStyleRegistry=f},83968,(e,t,r)=>{t.exports=e.r(50290).style},94506,(e,t,r)=>{"use strict";function s(e){let{widthInt:t,heightInt:r,blurWidth:s,blurHeight:a,blurDataURL:i,objectFit:l}=e,n=s?40*s:t,o=a?40*a:r,d=n&&o?`viewBox='0 0 ${n} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${d}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${d?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},11811,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return l}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},46883,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return o}}),e.r(69780);let s=e.r(94506),a=e.r(11811),i=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function n(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function o(e,t){var r;let o,d,c,{src:u,sizes:m,unoptimized:h=!1,priority:p=!1,preload:x=!1,loading:g,className:f,quality:b,width:y,height:v,fill:w=!1,style:j,overrideSrc:N,onLoad:S,onLoadingComplete:_,placeholder:k="empty",blurDataURL:E,fetchPriority:C,decoding:T="async",layout:P,objectFit:R,objectPosition:L,lazyBoundary:I,lazyRoot:z,...A}=e,{imgConf:O,showAltText:M,blurComplete:$,defaultLoader:D}=t,F=O||a.imageConfigDefault;if("allSizes"in F)o=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);o={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let U=A.loader||D;delete A.loader,delete A.srcSet;let B="__next_img_default"in U;if(B){if("custom"===o.loader)throw Object.defineProperty(Error(`Image with src "${u}" is missing "loader" prop.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=U;U=t=>{let{config:r,...s}=t;return e(s)}}if(P){"fill"===P&&(w=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[P];e&&(j={...j,...e});let t={responsive:"100vw",fill:"100vw"}[P];t&&!m&&(m=t)}let W="",K=n(y),G=n(v);if((r=u)&&"object"==typeof r&&(l(r)||void 0!==r.src)){let e=l(u)?u.default:u;if(!e.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!e.height||!e.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(d=e.blurWidth,c=e.blurHeight,E=E||e.blurDataURL,W=e.src,!w)if(K||G){if(K&&!G){let t=K/e.width;G=Math.round(e.height*t)}else if(!K&&G){let t=G/e.height;K=Math.round(e.width*t)}}else K=e.width,G=e.height}let H=!p&&!x&&("lazy"===g||void 0===g);(!(u="string"==typeof u?u:W)||u.startsWith("data:")||u.startsWith("blob:"))&&(h=!0,H=!1),o.unoptimized&&(h=!0),B&&!o.dangerouslyAllowSVG&&u.split("?",1)[0].endsWith(".svg")&&(h=!0);let Y=n(b),q=Object.assign(w?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:R,objectPosition:L}:{},M?{}:{color:"transparent"},j),V=$||"empty"===k?null:"blur"===k?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:K,heightInt:G,blurWidth:d,blurHeight:c,blurDataURL:E||"",objectFit:q.objectFit})}")`:`url("${k}")`,Z=i.includes(q.objectFit)?"fill"===q.objectFit?"100% 100%":"cover":q.objectFit,X=V?{backgroundSize:Z,backgroundPosition:q.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},J=function(e){let{config:t,src:r,unoptimized:s,width:a,quality:i,sizes:l,loader:n}=e;if(s)return{src:r,srcSet:void 0,sizes:void 0};let{widths:o,kind:d}=function(e,t,r){let{deviceSizes:s,allSizes:a}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let s;s=e.exec(r);)t.push(parseInt(s[2]));if(t.length){let e=.01*Math.min(...t);return{widths:a.filter(t=>t>=s[0]*e),kind:"w"}}return{widths:a,kind:"w"}}return"number"!=typeof t?{widths:s,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>a.find(t=>t>=e)||a[a.length-1]))],kind:"x"}}(t,a,l),c=o.length-1;return{sizes:l||"w"!==d?l:"100vw",srcSet:o.map((e,s)=>`${n({config:t,src:r,quality:i,width:e})} ${"w"===d?e:s+1}${d}`).join(", "),src:n({config:t,src:r,quality:i,width:o[c]})}}({config:o,src:u,unoptimized:h,width:K,quality:Y,sizes:m,loader:U}),Q=H?"lazy":g;return{props:{...A,loading:Q,fetchPriority:C,width:K,height:G,decoding:T,className:f,style:{...q,...X},sizes:J.sizes,srcSet:J.srcSet,src:N||J.src},meta:{unoptimized:h,preload:x||p,placeholder:k,fill:w}}}},61204,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let s=e.r(27946),a="undefined"==typeof window,i=a?()=>{}:s.useLayoutEffect,l=a?()=>{}:s.useEffect;function n(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let e=s.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),n()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},30547,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return x},defaultHead:function(){return u}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(81258),l=e.r(44066),n=e.r(59031),o=l._(e.r(27946)),d=i._(e.r(61204)),c=e.r(28833);function u(){return[(0,n.jsx)("meta",{charSet:"utf-8"},"charset"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(69780);let h=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,s,a;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let i=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=h.length;t<r;t++){let r=h[t];if(e.props.hasOwnProperty(r))if("charSet"===r)s.has(r)?i=!1:s.add(r);else{let t=e.props[r],s=a[r]||new Set;("name"!==r||!l)&&s.has(t)?i=!1:(s.add(t),a[r]=s)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let x=function(e){let{children:t}=e,r=(0,o.useContext)(c.HeadManagerContext);return(0,n.jsx)(d.default,{reduceComponentsToState:p,headManager:r,children:t})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},82075,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let s=e.r(81258)._(e.r(27946)),a=e.r(11811),i=s.default.createContext(a.imageConfigDefault)},45766,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return s}});let s=e.r(81258)._(e.r(27946)).default.createContext(null)},82751,(e,t,r)=>{"use strict";function s(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return s}})},32416,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return i}});let s=e.r(82751);function a(e){let{config:t,src:r,width:a,quality:i}=e;if(r.startsWith("/")&&r.includes("?")&&t.localPatterns?.length===1&&"**"===t.localPatterns[0].pathname&&""===t.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${r}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,s.findClosestQuality)(i,t);return`${t.path}?url=${encodeURIComponent(r)}&w=${a}&q=${l}${r.startsWith("/_next/static/media/"),""}`}a.__next_img_default=!0;let i=a},96444,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let s=e.r(27946);function a(e,t){let r=(0,s.useRef)(null),a=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,s)),t&&(a.current=i(t,s))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},82279,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let s=e.r(81258),a=e.r(44066),i=e.r(59031),l=a._(e.r(27946)),n=s._(e.r(85885)),o=s._(e.r(30547)),d=e.r(46883),c=e.r(11811),u=e.r(82075);e.r(69780);let m=e.r(45766),h=s._(e.r(32416)),p=e.r(96444),x={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function g(e,t,r,s,a,i,l){let n=e?.src;e&&e["data-loaded-src"]!==n&&(e["data-loaded-src"]=n,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}s?.current&&s.current(e)}}))}function f(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,l.forwardRef)((e,t)=>{let{src:r,srcSet:s,sizes:a,height:n,width:o,decoding:d,className:c,style:u,fetchPriority:m,placeholder:h,loading:x,unoptimized:b,fill:y,onLoadRef:v,onLoadingCompleteRef:w,setBlurComplete:j,setShowAltText:N,sizesInput:S,onLoad:_,onError:k,...E}=e,C=(0,l.useCallback)(e=>{e&&(k&&(e.src=e.src),e.complete&&g(e,h,v,w,j,b,S))},[r,h,v,w,j,k,b,S]),T=(0,p.useMergedRef)(t,C);return(0,i.jsx)("img",{...E,...f(m),loading:x,width:o,height:n,decoding:d,"data-nimg":y?"fill":"1",className:c,style:u,sizes:a,srcSet:s,src:r,ref:T,onLoad:e=>{g(e.currentTarget,h,v,w,j,b,S)},onError:e=>{N(!0),"empty"!==h&&j(!0),k&&k(e)}})});function y(e){let{isAppRouter:t,imgAttributes:r}=e,s={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...f(r.fetchPriority)};return t&&n.default.preload?(n.default.preload(r.src,s),null):(0,i.jsx)(o.default,{children:(0,i.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...s},"__nimg-"+r.src+r.srcSet+r.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(m.RouterContext),s=(0,l.useContext)(u.ImageConfigContext),a=(0,l.useMemo)(()=>{let e=x||s||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:a,localPatterns:"undefined"==typeof window?s?.localPatterns:e.localPatterns}},[s]),{onLoad:n,onLoadingComplete:o}=e,p=(0,l.useRef)(n);(0,l.useEffect)(()=>{p.current=n},[n]);let g=(0,l.useRef)(o);(0,l.useEffect)(()=>{g.current=o},[o]);let[f,v]=(0,l.useState)(!1),[w,j]=(0,l.useState)(!1),{props:N,meta:S}=(0,d.getImgProps)(e,{defaultLoader:h.default,imgConf:a,blurComplete:f,showAltText:w});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{...N,unoptimized:S.unoptimized,placeholder:S.placeholder,fill:S.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:j,sizesInput:e.sizes,ref:t}),S.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:N}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},82826,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return c},getImageProps:function(){return d}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(81258),l=e.r(46883),n=e.r(82279),o=i._(e.r(32416));function d(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=n.Image},81437,(e,t,r)=>{t.exports=e.r(82826)},31713,e=>{"use strict";var t,r=e.i(59031),s=e.i(27946);e.i(97803);let a=["image/png","image/jpeg","image/webp","image/gif","image/heic","image/heif"];async function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/webp",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.92;return new Promise((s,a)=>{let i=new Image;i.onload=()=>{try{let e=document.createElement("canvas");e.width=i.naturalWidth,e.height=i.naturalHeight;let l=e.getContext("2d");if(!l)return void a(Error("Failed to get canvas context"));l.drawImage(i,0,0);let n=e.toDataURL(t,r);s(n)}catch(e){a(e)}},i.onerror=()=>{a(Error("Failed to load image for conversion"))},i.src=e})}async function l(e){var t;let r=n(e);if(!r)throw Error("Invalid image format");return(t=r.mimeType,a.includes(t.toLowerCase()))?e:(console.log(`Converting unsupported format ${r.mimeType} to WebP`),i(e,"image/webp",.92))}function n(e){if(!e)return null;let t=e.match(/^data:(image\/[a-zA-Z+]+);base64,(.+)$/);return t?{mimeType:t[1],data:t[2]}:null}function o(e,t){let r=window.open("","_blank");r?(r.document.open(),r.document.write(`
|
|
4
|
+
<!DOCTYPE html>
|
|
5
|
+
<html>
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="UTF-8">
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
9
|
+
<title>${t||"圖片預覽"}</title>
|
|
10
|
+
<style>
|
|
11
|
+
* {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
body {
|
|
17
|
+
background: #000;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
min-height: 100vh;
|
|
22
|
+
padding: 20px;
|
|
23
|
+
}
|
|
24
|
+
img {
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
max-height: 100vh;
|
|
27
|
+
object-fit: contain;
|
|
28
|
+
box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
|
|
29
|
+
}
|
|
30
|
+
</style>
|
|
31
|
+
</head>
|
|
32
|
+
<body>
|
|
33
|
+
<img src="${e}" alt="${t||"預覽圖片"}" />
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
36
|
+
`),r.document.close()):console.error("無法打開新窗口,可能被瀏覽器阻擋")}let d=async e=>new Promise((t,r)=>{let s=new FileReader;s.onloadend=async()=>{try{let e=s.result,r=await l(e);t(r)}catch(e){r(e)}},s.onerror=r,s.readAsDataURL(e)}),c=null;async function u(){c||(c=await e.A(28292))}let m=async()=>!1,h=async(e,t,r,s,a,i)=>{let l=n(await d(e));if(!l)throw Error("無法讀取圖片");if(await u(),!a)throw Error("靜態版本需要提供 API 金鑰");return c.analyzeProductImageClient({imageBase64:l.data,imageMimeType:l.mimeType,productName:t,productInfo:r,productUrl:s,apiKey:a,locale:i})},p=async(e,t,r,s,a,i)=>{if(await u(),!a)throw Error("靜態版本需要提供 API 金鑰");return c.generateContentPlanClient({route:e,analysis:t,referenceCopy:r,selectedSizes:s,apiKey:a,locale:i})},x=async function(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1:1",a=arguments.length>4?arguments[4]:void 0;if(await u(),!t)throw Error("靜態版本需要提供 API 金鑰");return c.generateMarketingImageClient({prompt:e,referenceImageBase64:r,aspectRatio:s,secondaryImageBase64:a,apiKey:t})},g=async(e,t,r,s,a,i)=>{if(await u(),!a)throw Error("靜態版本需要提供 API 金鑰");return c.regenerateVisualPromptClient({titleZh:e,copyZh:t,ratio:r,sizeLabel:s,visualSummaryZh:i,apiKey:a})},f=async function(e,t,r,s){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"1:1",i=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,o=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,m=arguments.length>10?arguments[10]:void 0,h=arguments.length>11?arguments[11]:void 0;if(await u(),!s)throw Error("靜態版本需要提供 API 金鑰");return c.generateImageFromReferenceClient({productImageBase64:e,referenceImageBase64:t,similarity:r,aspectRatio:a,brandLogoBase64:i,titleText:l,copyText:n,showText:o,titleWeight:d,copyWeight:m,secondaryProductBase64:h,apiKey:s})};var b=((t={})[t.IDLE=0]="IDLE",t[t.ANALYZING=1]="ANALYZING",t[t.RESULTS=2]="RESULTS",t[t.SIZE_SELECTION=3]="SIZE_SELECTION",t[t.PLANNING=4]="PLANNING",t[t.SUITE_READY=5]="SUITE_READY",t[t.ERROR=6]="ERROR",t),y=e.i(29712);let v=e=>{let{analysis:t,imageSrc:s}=e,{t:a}=(0,y.useLocale)();return(0,r.jsxs)("div",{className:"bg-[#1e1e24] border border-white/10 rounded-xl p-6 mb-8 flex flex-col md:flex-row gap-6 shadow-2xl shadow-black/50",children:[(0,r.jsx)("div",{className:"w-full md:w-1/3 shrink-0",children:(0,r.jsxs)("div",{className:"aspect-square rounded-lg overflow-hidden bg-black/20 relative group",children:[(0,r.jsx)("img",{src:s,alt:t.name,className:"w-full h-full object-contain"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-linear-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end p-4",children:(0,r.jsx)("span",{className:"text-xs text-white/80",children:a("productCard.originalImage")})})]})}),(0,r.jsxs)("div",{className:"flex flex-col justify-center w-full",children:[(0,r.jsx)("div",{className:"uppercase tracking-widest text-xs text-blue-400 font-bold mb-2",children:a("productCard.analysisReport")}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white serif mb-1",children:t.name}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mb-4 italic",children:t.visual_description}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-white/80 uppercase tracking-wider border-b border-blue-500/30 pb-1 inline-block",children:a("productCard.keyFeatures")}),(0,r.jsx)("p",{className:"text-gray-300 leading-relaxed",children:t.key_features})]})]})]})},w=e=>{let{isOpen:t,onClose:s}=e,{t:a,locale:i}=(0,y.useLocale)();if(!t)return null;let l="zh"===i?{step1:{title:"上傳與資訊輸入|一次填完所有資訊",desc:"上傳產品圖後,可以選填以下資訊(填越多,AI 越懂你):",items:[{label:"產品名稱",desc:"讓 AI 認得你的產品"},{label:"產品資訊",desc:"品牌故事、核心價值、產品特色"},{label:"產品網址",desc:"AI 會自動抓取官網內容進行分析"},{label:"參考文案 / 競品參考",desc:"貼上同類商品的熱銷文案,AI 會拆解其說服邏輯"}],tip:"💡 小提示:所有資訊一次填完,就不用在流程中重複輸入了"},step2:{title:"Phase 1:策略選擇|秒速決定視覺方向",desc:"AI 會分析產品後,立即提供",descHighlight:"三條截然不同的視覺策略",descSuffix:",每條路線包含:",items:["主打標語與副標題","視覺風格描述(色調、氛圍、設計元素)","目標受眾定位"],tip:"👉 點選一個你喜歡的路線,系統會自動進入 Phase 2 開始規劃完整內容"},step3:{title:"選擇圖片尺寸|多平台支援",desc:"選擇策略路線後,系統會自動進入尺寸選擇畫面,勾選你需要的尺寸:",items:[{label:"1:1 方形圖",desc:"適合 FB 貼文、IG 輪播、電商主圖"},{label:"9:16 直式長圖",desc:"適合限時動態、Instagram Stories、Reels"},{label:"4:5 直式圖",desc:"適合 IG Feed 主頁、優化手機瀏覽"},{label:"16:9 橫式長圖",desc:"適合封面、廣告圖片、橫幅設計"},{label:"1:1 商業攝影",desc:"專業商品攝影風格(工作室燈光、高端相機質感)"}],tip:"AI 會為每個選定的尺寸生成 3 組不同的內容方案(功能導向、情感導向、數據導向)"},step4:{title:"上傳產品圖與 Logo|產圖前置準備",desc:"在「爆肝產圖設定」區域,上傳以下素材(這些設定會在所有方案間共用):",items:[{label:"📸 產品圖片",desc:"必要,用於圖片生成的主要素材"},{label:"🏷️ 品牌 Logo",desc:"選填,會自動放置在圖片角落"}]},step5:{title:"腳本審閱模式|內容來嘴看看",desc:"切換至「內容來嘴看看」模式,可以:",items:["查看所有方案的標題、文案、視覺摘要","編輯任何不滿意的文案","調整 AI Prompt(進階功能)","為每個方案重新生成 Prompt"]},step6:{title:"圖片製作模式|爆肝產圖",desc:"切換至「爆肝產圖」模式,針對每個方案可以:",sections:[{title:"✅ 文字與字體控制",items:["勾選「顯示內容(標題 + 文案)」決定是否在圖片上疊加文字","直接在產圖模式修改標題和文案","選擇字體粗細(Regular、Medium、Bold、Black)","所有文字使用開源字體思源黑體(Noto Sans TC),無版權問題"]},{title:"🎨 雙模式生成",items:["提詞版(預設):使用 AI 自動生成的視覺 Prompt 創作","參考版:上傳參考圖片,選擇相似度(低 / 中 / 高)"]},{title:"📥 生成與下載",items:["點擊播放按鈕開始生成(約 10-20 秒)","滑鼠移至圖片上方可下載或重繪"]}]}}:{step1:{title:"Upload & Input | Fill in all info at once",desc:"After uploading product image, you can fill in the following (the more you fill, the better AI understands):",items:[{label:"Product Name",desc:"Help AI recognize your product"},{label:"Product Info",desc:"Brand story, core values, product features"},{label:"Product URL",desc:"AI will automatically fetch and analyze the website content"},{label:"Reference Copy / Competitor Reference",desc:"Paste successful ad copy from similar products, AI will analyze its persuasion logic"}],tip:"💡 Tip: Fill in all info at once, so you don't need to repeat it later"},step2:{title:"Phase 1: Strategy Selection | Instant visual direction",desc:"After analyzing your product, AI provides",descHighlight:"three different visual strategies",descSuffix:", each including:",items:["Headline and subheadline","Visual style description (colors, mood, design elements)","Target audience positioning"],tip:"👉 Select a route you like, system will automatically enter Phase 2 to plan complete content"},step3:{title:"Select Image Sizes | Multi-platform support",desc:"After selecting a strategy, system will enter size selection screen. Check the sizes you need:",items:[{label:"1:1 Square",desc:"For FB posts, IG carousel, e-commerce main image"},{label:"9:16 Vertical",desc:"For Stories, Instagram Reels, full-screen mobile"},{label:"4:5 Portrait",desc:"For IG Feed, optimized for mobile"},{label:"16:9 Landscape",desc:"For covers, ad banners"},{label:"1:1 Commercial",desc:"Professional product photography style (studio lighting, premium camera quality)"}],tip:"AI will generate 3 different content sets for each selected size (functional, emotional, data-driven)"},step4:{title:"Upload Product & Logo | Pre-generation setup",desc:"In the 'Image Generation Settings' area, upload the following assets (shared across all plans):",items:[{label:"📸 Product Image",desc:"Required, main asset for image generation"},{label:"🏷️ Brand Logo",desc:"Optional, will be placed in corner automatically"}]},step5:{title:"Review Mode | Check the content",desc:"Switch to 'Review Content' mode to:",items:["View all plans' titles, copy, visual summary","Edit any unsatisfactory copy","Adjust AI Prompt (advanced)","Regenerate Prompt for each plan"]},step6:{title:"Production Mode | Generate images",desc:"Switch to 'Generate Images' mode, for each plan you can:",sections:[{title:"✅ Text & Font Control",items:["Toggle 'Show content (Title + Copy)' to decide whether to overlay text","Edit title and copy directly in production mode","Choose font weight (Regular, Medium, Bold, Black)","All text uses open source Noto Sans TC font, no copyright issues"]},{title:"🎨 Dual Generation Modes",items:["Prompt Mode (default): Use AI-generated visual prompt","Reference Mode: Upload reference image, select similarity (Low / Medium / High)"]},{title:"📥 Generate & Download",items:["Click play button to generate (about 10-20 seconds)","Hover over image to download or regenerate"]}]}};return(0,r.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm transition-opacity",onClick:s}),(0,r.jsxs)("div",{className:"relative bg-[#1a1a1f] border border-white/10 rounded-2xl max-w-3xl w-full max-h-[90vh] overflow-y-auto shadow-2xl shadow-purple-900/20 animate-in fade-in zoom-in duration-300",children:[(0,r.jsx)("button",{onClick:s,className:"absolute top-4 right-4 text-gray-400 hover:text-white transition-colors p-2",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"p-8",children:[(0,r.jsx)("h2",{className:"text-3xl font-bold serif text-white mb-8",children:a("guideModal.title")}),(0,r.jsx)("div",{className:"mb-8 p-4 bg-blue-900/20 border border-blue-500/30 rounded-xl",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"text-blue-400 text-xl",children:"🔑"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-blue-300 font-semibold mb-1",children:a("guideModal.apiKeyNotice")}),(0,r.jsxs)("p",{className:"text-gray-400 text-sm leading-relaxed",children:[a("guideModal.apiKeyDesc")," ",(0,r.jsx)("a",{href:"https://aistudio.google.com/app/apikey",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300 underline",children:a("guideModal.apiKeyLink")})," ",a("guideModal.apiKeyDesc2")]})]})]})}),(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-purple-600/20 text-purple-400 flex items-center justify-center font-bold text-lg border border-purple-600/30",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:l.step1.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:l.step1.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:l.step1.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),"zh"===i?":":": ",e.desc]},t))}),(0,r.jsx)("p",{className:"text-gray-500 text-xs mt-3",children:l.step1.tip})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-blue-600/20 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-600/30",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:l.step2.title}),(0,r.jsxs)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:[l.step2.desc," ",(0,r.jsx)("strong",{className:"text-white",children:l.step2.descHighlight}),l.step2.descSuffix]}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1 mb-3",children:l.step2.items.map((e,t)=>(0,r.jsx)("li",{children:e},t))}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed",children:l.step2.tip})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-pink-600/20 text-pink-400 flex items-center justify-center font-bold text-lg border border-pink-600/30",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:l.step3.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:l.step3.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1 mb-3",children:l.step3.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),"zh"===i?":":": ",e.desc]},t))}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed",children:l.step3.tip})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-green-600/20 text-green-400 flex items-center justify-center font-bold text-lg border border-green-600/30",children:"4"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:l.step4.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:l.step4.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:l.step4.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),"zh"===i?":":": ",e.desc]},t))})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-yellow-600/20 text-yellow-400 flex items-center justify-center font-bold text-lg border border-yellow-600/30",children:"5"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:l.step5.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:l.step5.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:l.step5.items.map((e,t)=>(0,r.jsx)("li",{children:e},t))})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-orange-600/20 text-orange-400 flex items-center justify-center font-bold text-lg border border-orange-600/30",children:"6"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:l.step6.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:l.step6.desc}),(0,r.jsx)("div",{className:"space-y-3",children:l.step6.sections.map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-white text-sm font-semibold mb-1.5",children:e.title}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1",children:e.items.map((e,t)=>(0,r.jsx)("li",{children:e},t))})]},t))})]})]})]})]})]})]})},j=(e,t)=>{if("en"===t){let t="Clean solid color background #f6f6f6, professional product photography composition, emphasize product details, no clutter";switch(e){case"single":return`${t}, single product centered, product as absolute focal point`;case"fan":return`${t}, multiple products in fan-shaped spread, showcase product series`;case"grid":return`${t}, products arranged in neat rows, display rhythmic aesthetics`;case"stack":return`${t}, products naturally stacked, showcase richness`;case"custom":return"Describe your desired composition, background color, arrangement...";default:return t}}let r="乾淨的純色背景,色號#f6f6f6,專業商品攝影構圖,強調產品細節,無雜亂元素";switch(e){case"single":return`${r},單一產品置中展示,讓產品成為絕對焦點`;case"fan":return`${r},多片產品呈扇形展開排列,展現產品系列感`;case"grid":return`${r},產品整齊並排展示,呈現規律美感`;case"stack":return`${r},產品自然層疊堆放,展現豐富感`;case"custom":return"請自由描述您想要的構圖方式、背景色、排列方式等...";default:return r}},N=e=>{switch(e){case"1:1":return"bg-blue-500";case"9:16":return"bg-purple-500";case"4:5":return"bg-pink-500";case"16:9":return"bg-green-500";case"1:1-commercial":return"bg-amber-500";default:return"bg-orange-500"}},S=s.default.memo(e=>{let{className:t=""}=e;return(0,r.jsxs)("svg",{className:`animate-spin ${t}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})});S.displayName="Spinner";let _=e=>{switch(e){case"1:1":return"bg-blue-500/20 text-blue-300 border-blue-500/30";case"1:1-commercial":return"bg-amber-500/20 text-amber-300 border-amber-500/30";case"9:16":return"bg-purple-500/20 text-purple-300 border-purple-500/30";case"4:5":return"bg-pink-500/20 text-pink-300 border-pink-500/30";case"16:9":return"bg-green-500/20 text-green-300 border-green-500/30";default:return"bg-gray-500/20 text-gray-300 border-gray-500/30"}},k=e=>{switch(e){case"1:1":case"1:1-commercial":default:return"aspect-square";case"9:16":return"aspect-[9/16]";case"4:5":return"aspect-[4/5]";case"16:9":return"aspect-[16/9]"}},E=s.default.memo(e=>{let{contentSet:t,onChange:s,onRegeneratePrompt:a,isRegenerating:i,t:l,locale:n}=e,o="en"===n?[{value:"single",label:"Single",description:"Single product centered"},{value:"fan",label:"Fan",description:"Fan-shaped arrangement"},{value:"grid",label:"Grid",description:"Organized grid layout"},{value:"stack",label:"Stack",description:"Natural stacking"},{value:"custom",label:"Custom",description:"Use visual summary"}]:[{value:"single",label:"單品特寫",description:"單一產品置中展示"},{value:"fan",label:"扇形展開",description:"多產品呈扇形排列"},{value:"grid",label:"整齊並排",description:"產品整齊排列成行"},{value:"stack",label:"自然堆疊",description:"產品自然層疊擺放"},{value:"custom",label:"自訂",description:"使用構圖摘要描述"}];return(0,r.jsxs)("div",{className:"bg-[#1e1e24] border border-white/5 rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsxs)("span",{className:`text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded ${_(t.ratio)}`,children:[l("contentSuite.plan")," ",t.set_number]})}),(0,r.jsx)("button",{onClick:()=>a(t.id),disabled:i,className:"text-xs px-2 py-1 bg-linear-to-r from-green-600 to-emerald-600 hover:opacity-90 text-white font-bold rounded-full transition-opacity disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",title:l("contentSuite.regeneratePrompt"),children:i?(0,r.jsx)(S,{className:"w-3 h-3"}):(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.titleLabel")}),(0,r.jsx)("textarea",{value:t.title,onChange:e=>s(t.id,"title",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 focus:outline-none resize-none h-12"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.copyLabel")}),(0,r.jsx)("textarea",{value:t.copy,onChange:e=>s(t.id,"copy",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 focus:outline-none resize-none h-16"})]}),"1:1-commercial"===t.ratio&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-amber-400 mb-1",children:l("contentSuite.arrangement")}),(0,r.jsx)("div",{className:"grid grid-cols-5 gap-1",children:o.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>s(t.id,"arrangement_style",e.value),className:`px-1 py-1 text-[9px] rounded transition-all ${(t.arrangement_style||"single")===e.value?"bg-amber-500 text-black font-bold":"bg-black/30 text-gray-400 hover:bg-amber-500/20 hover:text-amber-300 border border-white/10"}`,title:e.description,children:e.label},e.value))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.visualSummary")}),(0,r.jsx)("textarea",{value:t.visual_summary,onChange:e=>s(t.id,"visual_summary",e.target.value),placeholder:"1:1-commercial"===t.ratio?j(t.arrangement_style||"single",n):l("contentSuite.visualSummaryPlaceholder"),className:`w-full bg-black/30 border rounded px-2 py-1.5 text-xs focus:outline-none resize-none h-16 ${"1:1-commercial"===t.ratio?"border-amber-500/30 text-amber-200 focus:border-amber-500 placeholder:text-amber-500/50":"border-white/10 text-gray-300 focus:border-blue-500 placeholder:text-gray-600"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.visualPrompt")}),(0,r.jsx)("textarea",{value:t.visual_prompt_en,onChange:e=>s(t.id,"visual_prompt_en",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded px-2 py-1.5 text-[10px] text-gray-300 focus:border-blue-500 focus:outline-none font-mono resize-none h-32"})]})]})]})});E.displayName="ScriptEditorRow";let C=e=>{let{isOpen:t,onClose:a,sourceImage:i,sourceRatio:l,productImage:n,brandLogo:d,secondaryProduct:c,marketingRoute:u,contentTitle:m,contentCopy:h,apiKey:p,t:x}=e,g=[{ratio:"1:1",label:x("extend.sizeLabels.fb"),description:x("extend.sizeDescriptions.square")},{ratio:"9:16",label:x("extend.sizeLabels.story"),description:x("extend.sizeDescriptions.vertical")},{ratio:"4:5",label:x("extend.sizeLabels.ig"),description:x("extend.sizeDescriptions.portrait")},{ratio:"16:9",label:x("extend.sizeLabels.landscape"),description:x("extend.sizeDescriptions.horizontal")},{ratio:"1:1-commercial",label:x("extend.sizeLabels.commercial"),description:x("extend.sizeDescriptions.commercial")}],b=g.filter(e=>e.ratio!==l),[y,v]=(0,s.useState)([]),[w,j]=(0,s.useState)([]),[N,_]=(0,s.useState)([]),[E,C]=(0,s.useState)(!1),[T,P]=(0,s.useState)("select"),R=async()=>{if(0===y.length)return;C(!0),P("generating");let e=y.map(e=>{let t=g.find(t=>t.ratio===e);return{ratio:e,label:t.label,image:null,loading:!0,error:null}});j(e);let t=[...e];for(let e=0;e<y.length;e++){let r=y[e];try{let s=await f(n,i,85,p,r,d,m,h,!1,"bold","regular",c);t[e]={...t[e],image:s,loading:!1}}catch(r){t[e]={...t[e],loading:!1,error:r instanceof Error?r.message:x("extend.generationFailed")}}j([...t])}_(L(u,m,h)),C(!1),P("results")},L=(e,t,r)=>{let s=e.route_name.replace(/\s/g,""),a=[`#${s}`,x("extend.hashtags.newProduct"),x("extend.hashtags.recommended"),x("extend.hashtags.mustBuy"),x("extend.hashtags.quality")];return[{platform:x("extend.socialTemplates.instagram"),title:e.headline,content:`${e.headline}
|
|
37
|
+
|
|
38
|
+
${r}
|
|
39
|
+
|
|
40
|
+
───
|
|
41
|
+
|
|
42
|
+
${e.subhead}
|
|
43
|
+
|
|
44
|
+
${e.style_brief?`風格:${e.style_brief}
|
|
45
|
+
`:""}${e.target_audience?`適合:${e.target_audience}
|
|
46
|
+
`:""}
|
|
47
|
+
點擊連結了解更多
|
|
48
|
+
私訊小編享專屬優惠
|
|
49
|
+
|
|
50
|
+
${a.join(" ")}`,hashtags:a},{platform:x("extend.socialTemplates.facebook"),title:e.headline,content:`【${t}】
|
|
51
|
+
${e.headline}
|
|
52
|
+
|
|
53
|
+
${r}
|
|
54
|
+
|
|
55
|
+
━━━━━━━━━━
|
|
56
|
+
|
|
57
|
+
${e.subhead}
|
|
58
|
+
|
|
59
|
+
${e.style_brief?`▸ 風格特色:${e.style_brief}
|
|
60
|
+
`:""}${e.target_audience?`▸ 適合對象:${e.target_audience}
|
|
61
|
+
`:""}
|
|
62
|
+
▸ 限時優惠進行中
|
|
63
|
+
▸ 全館滿額免運
|
|
64
|
+
|
|
65
|
+
留言 +1 小編私訊您
|
|
66
|
+
立即了解更多:[連結]
|
|
67
|
+
|
|
68
|
+
${a.slice(0,4).join(" ")}`,hashtags:a.slice(0,4)},{platform:x("extend.socialTemplates.story"),title:t,content:`${e.headline}
|
|
69
|
+
|
|
70
|
+
上滑了解更多
|
|
71
|
+
|
|
72
|
+
${e.subhead}`,hashtags:a.slice(0,2)}]},I=()=>{v([]),j([]),_([]),P("select"),a()};return t?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:"select"===T?I:void 0}),(0,r.jsxs)("div",{className:"relative w-full max-w-4xl max-h-[90vh] overflow-y-auto bg-[#0a0a0f] border border-white/10 rounded-2xl shadow-2xl m-4",children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between p-4 border-b border-white/10 bg-[#0a0a0f]",children:[(0,r.jsx)("h2",{className:"text-lg font-bold text-white",children:x("extend.title")}),"generating"!==T&&(0,r.jsx)("button",{onClick:I,className:"p-2 text-gray-400 hover:text-white transition-colors",title:x("common.close"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"p-6",children:["select"===T&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-start gap-4",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-lg overflow-hidden border border-white/20 shrink-0",children:(0,r.jsx)("img",{src:i,alt:"Source",className:"w-full h-full object-cover"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-1",children:x("extend.sourceImage")}),(0,r.jsx)("p",{className:"text-white font-medium",children:m}),(0,r.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[g.find(e=>e.ratio===l)?.label," (",l,")"]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-3",children:x("extend.selectRatios")}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:b.map(e=>(0,r.jsxs)("button",{onClick:()=>{var t;return t=e.ratio,void v(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:`p-3 rounded-lg border text-left transition-all ${y.includes(e.ratio)?"border-white bg-white/10 text-white":"border-white/10 bg-white/5 text-gray-400 hover:border-white/30"}`,children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:e.label}),(0,r.jsx)("p",{className:"text-xs opacity-70",children:e.description})]},e.ratio))})]}),(0,r.jsxs)("button",{onClick:R,disabled:0===y.length||!n,className:"w-full py-3 bg-white text-black font-bold rounded-lg hover:bg-gray-200 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",children:[x("extend.startExtend")," (",y.length,")"]})]}),"generating"===T&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)(S,{className:"w-12 h-12 text-white mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-white font-medium",children:x("extend.generating")}),(0,r.jsxs)("p",{className:"text-sm text-gray-400 mt-1",children:[w.filter(e=>!e.loading).length," / ",w.length]})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:w.map((e,t)=>(0,r.jsxs)("div",{className:"p-3 rounded-lg border border-white/10 bg-white/5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[e.loading?(0,r.jsx)(S,{className:"w-4 h-4 text-white"}):e.error?(0,r.jsx)("span",{className:"text-red-400",children:"✕"}):(0,r.jsx)("span",{className:"text-green-400",children:"✓"}),(0,r.jsx)("span",{className:"text-sm text-white",children:e.label})]}),e.image&&(0,r.jsx)("div",{className:"w-full aspect-square rounded overflow-hidden",children:(0,r.jsx)("img",{src:e.image,alt:e.label,className:"w-full h-full object-cover"})})]},e.ratio))})]}),"results"===T&&(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),x("extend.generatedImages")]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:w.map((e,t)=>(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:`relative rounded-lg overflow-hidden border border-white/10 bg-[#15151a] ${k(e.ratio)}`,children:e.loading?(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,r.jsx)(S,{className:"w-8 h-8 text-white"})}):e.error?(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4",children:[(0,r.jsx)("p",{className:"text-xs text-red-400 text-center mb-2",children:e.error}),(0,r.jsx)("button",{onClick:()=>{let e;return e=w[t].ratio,void(j(e=>{let r=[...e];return r[t]={...r[t],loading:!0,error:null},r}),f(n,i,85,p,e,d,m,h,!1,"bold","regular",c).then(e=>{j(r=>{let s=[...r];return s[t]={...s[t],image:e,loading:!1},s})}).catch(e=>{j(r=>{let s=[...r];return s[t]={...s[t],loading:!1,error:e instanceof Error?e.message:x("extend.generationFailed")},s})}))},className:"text-xs text-white underline",children:x("extend.retry")})]}):e.image?(0,r.jsxs)("div",{className:"relative w-full h-full group/card",children:[(0,r.jsx)("img",{src:e.image,alt:e.label,className:"w-full h-full object-cover cursor-pointer",onClick:()=>o(e.image,e.label)}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 opacity-100 md:opacity-0 md:group-hover/card:opacity-100 transition-opacity flex items-center justify-center pointer-events-none",children:(0,r.jsx)("a",{href:e.image,download:`${e.ratio.replace(":","x")}.png`,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white pointer-events-auto",title:x("production.download"),onClick:e=>e.stopPropagation(),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})})]}):null}),(0,r.jsxs)("p",{className:"text-xs text-center text-gray-400",children:[e.label," (",e.ratio,")"]})]},e.ratio))})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),x("extend.socialCopy")]}),(0,r.jsxs)("div",{className:"mb-4 p-4 bg-white/5 rounded-lg border border-white/10",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:x("extend.headline")}),(0,r.jsx)("p",{className:"text-white font-bold text-lg mb-3",children:u.headline}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:x("extend.subhead")}),(0,r.jsx)("p",{className:"text-gray-300",children:u.subhead})]}),(0,r.jsx)("div",{className:"space-y-3",children:N.map((e,t)=>(0,r.jsxs)("div",{className:"p-4 bg-white/5 rounded-lg border border-white/10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("span",{className:"text-sm font-bold text-white",children:e.platform}),(0,r.jsx)("button",{onClick:()=>navigator.clipboard.writeText(`${e.title}
|
|
73
|
+
|
|
74
|
+
${e.content}`),className:"text-xs text-gray-400 hover:text-white transition-colors",children:x("extend.copy")})]}),(0,r.jsx)("p",{className:"text-sm text-white font-medium mb-1",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:e.content})]},t))})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("button",{onClick:()=>{P("select"),v([])},className:"flex-1 py-3 bg-white/10 text-white font-bold rounded-lg hover:bg-white/20 transition-colors",children:x("extend.addMore")}),(0,r.jsx)("button",{onClick:I,className:"flex-1 py-3 bg-white text-black font-bold rounded-lg hover:bg-gray-200 transition-colors",children:x("extend.done")})]})]})]})]})]}):null},T=e=>{let{contentSet:t,apiKey:a,productImage:i,secondaryProduct:l,brandLogo:n,onContentChange:c,t:u,globalSettings:m,marketingRoute:h}=e,[p,g]=(0,s.useState)(null),[b,y]=(0,s.useState)(!1),[v,w]=(0,s.useState)(null),[j,N]=(0,s.useState)(!1),[E,T]=(0,s.useState)(!1),[P,R]=(0,s.useState)("prompt"),[L,I]=(0,s.useState)(null),{showText:z,titleWeight:A,copyWeight:O,similarityLevel:M}=m,$=async()=>{if(!i)return void w(u("production.uploadProductFirst"));if("reference"===P&&!L)return void w(u("production.uploadReferenceFirst"));y(!0),w(null);try{let e;if("reference"===P&&L)e=await f(i,L,"low"===M?20:"medium"===M?55:85,a,t.ratio,n,t.title,t.copy,z,A,O,l);else{let r=t.visual_prompt_en;if(n&&(r+="\n\nIMPORTANT: Place the uploaded brand logo in one of the four corners (top-left, top-right, bottom-left, or bottom-right) in a subtle, non-intrusive way. The logo should be clearly visible but not dominate the composition."),z){let e={regular:"Regular (400)",medium:"Medium (500)",bold:"Bold (700)",black:"Black (900)"};r+=`
|
|
75
|
+
|
|
76
|
+
IMPORTANT: Overlay the following text on the image using Noto Sans TC (Noto Sans Traditional Chinese) font:
|
|
77
|
+
Title: "${t.title}" (Font: Noto Sans TC ${e[A]})
|
|
78
|
+
Copy: "${t.copy}" (Font: Noto Sans TC ${e[O]})
|
|
79
|
+
Use appropriate positioning, size, and styling that complements the visual design. Make sure the font is Noto Sans TC (思源黑體).`}e=await x(r,a,i,t.ratio,l)}g(e)}catch(e){w(e instanceof Error?e.message:u("production.generateFailed"))}finally{y(!1)}};return(0,r.jsxs)("div",{className:"flex flex-col gap-2 group relative",children:[(0,r.jsxs)("div",{className:`relative rounded-xl overflow-hidden bg-[#15151a] border border-white/10 shadow-lg w-full ${k(t.ratio)}`,children:[b?(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4 bg-linear-to-br from-white/5 to-white/10",children:[(0,r.jsx)(S,{className:"w-10 h-10 text-white mb-3"}),(0,r.jsx)("p",{className:"text-sm text-white font-medium",children:u("production.generating")}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:u("production.pleaseWait")})]}):p?(0,r.jsxs)("div",{className:"relative w-full h-full",children:[(0,r.jsx)("img",{src:p,alt:t.title,className:"w-full h-full object-cover cursor-pointer",onClick:()=>o(p,t.title)}),(0,r.jsxs)("div",{className:"absolute inset-0 bg-black/50 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2 pointer-events-none",children:[(0,r.jsx)("a",{href:p,download:`${t.id}.png`,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm pointer-events-auto",title:u("production.download"),onClick:e=>e.stopPropagation(),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),(0,r.jsx)("button",{onClick:$,disabled:b,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm pointer-events-auto disabled:opacity-50 disabled:cursor-not-allowed",title:u("production.redraw"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,r.jsx)("button",{onClick:()=>T(!0),className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm pointer-events-auto",title:u("extend.extendButton"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})]})]}):(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4 text-center relative",children:[i&&(0,r.jsx)("div",{className:"absolute inset-0 opacity-20",children:(0,r.jsx)("img",{src:i,className:"w-full h-full object-cover blur-sm",alt:"product-bg"})}),(0,r.jsx)("button",{onClick:$,disabled:!i,className:"w-12 h-12 rounded-full bg-white/5 flex items-center justify-center hover:bg-white hover:text-black transition-all text-gray-500 border border-white/10 relative z-10 disabled:opacity-30 disabled:cursor-not-allowed",children:(0,r.jsxs)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]})})]}),(0,r.jsxs)("div",{className:`absolute top-2 left-2 px-2 py-1 rounded text-[10px] font-bold uppercase tracking-wider border backdrop-blur-sm z-20 ${_(t.ratio)}`,children:[u("contentSuite.plan")," ",t.set_number]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("p",{className:"text-xs text-gray-400 truncate flex-1 pr-2",title:t.title,children:t.title}),(0,r.jsxs)("button",{onClick:()=>N(!j),className:"text-[10px] text-gray-500 hover:text-white transition-colors flex items-center gap-1",children:[j?u("production.collapse"):u("production.expand"),(0,r.jsx)("svg",{className:`w-3 h-3 transition-transform ${j?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),j&&(0,r.jsxs)("div",{className:"space-y-3 p-3 bg-white/5 rounded-lg border border-white/10 animate-in fade-in slide-in-from-top-2 duration-200",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1.5 block",children:u("production.generationMode")}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("button",{onClick:()=>R("prompt"),className:`flex-1 py-1.5 px-2 rounded text-xs font-bold transition-all ${"prompt"===P?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:u("production.promptMode")}),(0,r.jsx)("button",{onClick:()=>R("reference"),className:`flex-1 py-1.5 px-2 rounded text-xs font-bold transition-all ${"reference"===P?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:u("production.referenceMode")})]})]}),"reference"===P&&(0,r.jsxs)("div",{className:"pt-2 border-t border-white/10",children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1.5 block",children:u("production.uploadReference")}),(0,r.jsxs)("label",{className:"flex items-center justify-center w-full h-20 border border-dashed border-white/30 rounded-lg cursor-pointer hover:border-white hover:bg-white/5 transition-all relative overflow-hidden",children:[L?(0,r.jsxs)("div",{className:"w-full h-full relative group",children:[(0,r.jsx)("img",{src:L,alt:"Reference",className:"w-full h-full object-contain"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity",children:(0,r.jsx)("span",{className:"text-white text-[10px]",children:u("production.changeReference")})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5 mb-1 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,r.jsx)("p",{className:"text-[10px] text-gray-400",children:u("contentSuite.clickToUpload")})]}),(0,r.jsx)("input",{type:"file",className:"hidden",accept:"image/*",onChange:async e=>{e.target.files&&e.target.files[0]&&I(await d(e.target.files[0]))}})]})]}),"prompt"===P&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"pt-2 border-t border-white/10",children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1 block",children:u("production.titleInput")}),(0,r.jsx)("input",{type:"text",value:t.title,onChange:e=>c(t.id,"title",e.target.value),className:"w-full px-2 py-1.5 text-sm font-bold text-white bg-black/30 border border-white/10 rounded focus:border-white focus:outline-none",placeholder:u("production.titlePlaceholder")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1 block",children:u("production.copyInput")}),(0,r.jsx)("textarea",{value:t.copy,onChange:e=>c(t.id,"copy",e.target.value),className:"w-full px-2 py-1.5 text-xs text-gray-300 bg-black/30 border border-white/10 rounded focus:border-white focus:outline-none resize-none",rows:2,placeholder:u("production.copyPlaceholder")})]})]}),v&&(0,r.jsx)("p",{className:"text-[10px] text-red-400",children:v})]}),!j&&v&&(0,r.jsx)("p",{className:"text-[10px] text-red-400",children:v}),p&&(0,r.jsx)(C,{isOpen:E,onClose:()=>T(!1),sourceImage:p,sourceRatio:t.ratio,productImage:i,brandLogo:n,secondaryProduct:l,marketingRoute:h,contentTitle:t.title,contentCopy:t.copy,apiKey:a,t:u})]})},P=s.default.memo(e=>{let{file:t,previewUrl:s,onFileChange:a,label:i,emptyText:l,changeText:n,hint:o,borderColor:d,iconColor:c}=e;return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{className:`block text-sm font-bold mb-2 ${"white"===c?"text-white/80":"text-indigo-200"}`,children:i}),(0,r.jsxs)("label",{className:`flex flex-col items-center justify-center w-full h-40 border-2 border-dashed rounded-xl cursor-pointer transition-all relative overflow-hidden bg-black/20 ${"white"===d?"border-white/20 hover:border-white/40 hover:bg-white/5":"indigo"===d?"border-indigo-500/30 hover:border-indigo-400 hover:bg-indigo-500/5":"border-pink-500/30 hover:border-pink-400 hover:bg-pink-500/5"}`,children:[t&&s?(0,r.jsxs)("div",{className:"w-full h-full relative group",children:[(0,r.jsx)("img",{src:s,alt:i,className:"w-full h-full object-contain p-2"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity",children:(0,r.jsx)("span",{className:"text-white text-sm",children:n})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-4",children:[(0,r.jsx)("svg",{className:`w-8 h-8 mb-2 ${"white"===c?"text-white/60":"indigo"===c?"text-indigo-400":"text-pink-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,r.jsx)("p",{className:`text-xs ${"white"===c?"text-white/70":"indigo"===c?"text-indigo-300":"text-pink-300"}`,children:l}),o&&(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mt-1",children:o})]}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:e=>{e.target.files&&e.target.files[0]&&a(e.target.files[0])},accept:"image/*"})]}),t&&(0,r.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),a(null)},className:"absolute top-8 right-2 w-6 h-6 bg-red-500/80 hover:bg-red-500 rounded-full flex items-center justify-center transition-colors z-10",children:(0,r.jsx)("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});function R(e){let[t,r]=(0,s.useState)(null),[a,i]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let t=!0,s=null;return e?(i(s=URL.createObjectURL(e)),d(e).then(e=>{t&&r(e)})):(r(null),i(null)),()=>{t=!1,s&&URL.revokeObjectURL(s)}},[e]),{base64:t,previewUrl:a}}P.displayName="ImageUploader";let L=e=>{let{plan:t,onContentUpdate:a,apiKey:i,productImage:l,secondaryProduct:n,brandLogo:o,onProductImageChange:d,onSecondaryProductChange:c,onBrandLogoChange:u,marketingRoute:m}=e,{t:h,locale:p}=(0,y.useLocale)(),[x,f]=(0,s.useState)("review"),[b,v]=(0,s.useState)(t.content_sets),[w,S]=(0,s.useState)(null),[_,k]=(0,s.useState)({showText:!1,titleWeight:"bold",copyWeight:"regular",similarityLevel:"medium"}),C=R(l),L=R(n),I=R(o);(0,s.useEffect)(()=>{v(t.content_sets),f("review")},[t]);let z=(e,t,r)=>{let s=b.map(s=>s.id===e?{...s,[t]:r}:s);v(s),a(s)},A=async e=>{S(e);let t=b.find(t=>t.id===e);if(t)try{let r=t.visual_summary;if("1:1-commercial"===t.ratio){let e=t.arrangement_style||"single",s=(e=>{switch(e){case"single":return"single product centered, hero shot composition";case"fan":return"multiple products arranged in elegant fan spread pattern, radiating outward";case"grid":return"products neatly arranged in organized grid or row, symmetrical layout";case"stack":return"products naturally stacked or layered, casual elegant arrangement";case"custom":return"";default:return"single product centered"}})(e);if(r?.trim()||(r=j(e,p)),s){let e="en"===p?"【Product Arrangement - Highest Priority】":"【產品排列方式 - 最高優先級】";r=`${e}${s}。
|
|
80
|
+
|
|
81
|
+
${r}`}}let s=await g(t.title,t.copy,t.ratio,t.size_label,i,r);z(e,"visual_prompt_en",s)}catch(t){let e=t instanceof Error?t.message:h("common.unknownError");alert(`${h("contentSuite.regeneratePromptFailed")}${e}`)}finally{S(null)}},O=(e,t)=>{k(r=>({...r,[e]:t}))},M=t.selected_sizes.map(e=>({ratio:e,label:b.find(t=>t.ratio===e)?.size_label||e,sets:b.filter(t=>t.ratio===e)}));return(0,r.jsxs)("div",{className:"w-full animate-in fade-in slide-in-from-bottom-8 duration-700",children:[(0,r.jsxs)("div",{className:"mb-8 p-6 bg-white/5 border border-white/10 rounded-xl",children:[(0,r.jsx)("div",{className:"flex items-center gap-3 mb-4",children:(0,r.jsx)("span",{className:"text-xs font-mono text-white bg-white/10 px-2 py-1 rounded-md border border-white/20",children:"STEP 04"})}),(0,r.jsxs)("h4",{className:"text-lg font-bold text-white mb-2 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),h("contentSuite.settingsTitle")]}),(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-6",children:h("contentSuite.settingsDescription")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[(0,r.jsx)(P,{file:l,previewUrl:C.previewUrl,onFileChange:d,label:h("contentSuite.mainProduct"),emptyText:h("contentSuite.clickToUploadMain"),changeText:h("contentSuite.changeImage"),borderColor:"white",iconColor:"white"}),(0,r.jsx)(P,{file:n,previewUrl:L.previewUrl,onFileChange:c,label:h("contentSuite.secondaryProduct"),emptyText:h("contentSuite.clickToUploadSecondary"),changeText:h("contentSuite.changeImage"),hint:h("contentSuite.secondaryProductHint"),borderColor:"white",iconColor:"white"}),(0,r.jsx)(P,{file:o,previewUrl:I.previewUrl,onFileChange:u,label:h("contentSuite.brandLogo"),emptyText:h("contentSuite.clickToUploadLogo"),changeText:h("contentSuite.changeLogo"),borderColor:"white",iconColor:"white"})]})]}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between mb-8 gap-4 border-b border-white/10 pb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl font-bold text-white serif mb-1",children:t.plan_name}),(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:t.selected_sizes.map(e=>{let t=b.filter(t=>t.ratio===e).length,r=b.find(t=>t.ratio===e)?.size_label||e;return`${r} ${t}${h("contentSuite.sets")}`}).join(" | ")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>f("review"),className:`px-4 py-2 rounded-md text-sm font-bold transition-all ${"review"===x?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:text-white hover:bg-white/10"}`,children:h("contentSuite.reviewMode")}),(0,r.jsx)("button",{onClick:()=>f("production"),className:`px-4 py-2 rounded-md text-sm font-bold transition-all ${"production"===x?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:text-white hover:bg-white/10"}`,children:h("contentSuite.productionMode")})]})]}),"review"===x&&(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{className:"bg-blue-900/20 border border-blue-500/30 p-4 rounded-lg mb-6 flex items-start gap-3",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-blue-400 shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-blue-200 text-sm font-bold mb-1",children:h("contentSuite.reviewInfoTitle")}),(0,r.jsx)("p",{className:"text-blue-300/70 text-xs",children:h("contentSuite.reviewInfoDescription")})]})]}),M.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:`w-2 h-6 rounded-full ${N(e.ratio)}`}),e.label," (",e.ratio,") - ",e.sets.length," ",h("contentSuite.sets")]}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:e.sets.map(e=>(0,r.jsx)(E,{contentSet:e,onChange:z,onRegeneratePrompt:A,isRegenerating:w===e.id,t:h,locale:p},e.id))})]},e.ratio))]}),"production"===x&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-8 p-4 bg-white/5 border border-white/10 rounded-xl",children:[(0,r.jsxs)("h4",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),h("production.globalSettings")]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,r.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:_.showText,onChange:e=>O("showText",e.target.checked),className:"w-4 h-4 rounded border-gray-500 bg-black/50 text-white focus:ring-white focus:ring-offset-0"}),(0,r.jsx)("span",{className:"text-xs text-gray-300",children:h("production.showContent")})]}),_.showText&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-gray-400",children:h("production.titleWeight")}),(0,r.jsxs)("select",{value:_.titleWeight,onChange:e=>O("titleWeight",e.target.value),className:"px-2 py-1 text-xs bg-white/5 border border-white/10 rounded text-white focus:border-white focus:outline-none",children:[(0,r.jsx)("option",{value:"regular",children:"Regular"}),(0,r.jsx)("option",{value:"medium",children:"Medium"}),(0,r.jsx)("option",{value:"bold",children:"Bold"}),(0,r.jsx)("option",{value:"black",children:"Black"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-gray-400",children:h("production.copyWeight")}),(0,r.jsxs)("select",{value:_.copyWeight,onChange:e=>O("copyWeight",e.target.value),className:"px-2 py-1 text-xs bg-white/5 border border-white/10 rounded text-white focus:border-white focus:outline-none",children:[(0,r.jsx)("option",{value:"regular",children:"Regular"}),(0,r.jsx)("option",{value:"medium",children:"Medium"}),(0,r.jsx)("option",{value:"bold",children:"Bold"}),(0,r.jsx)("option",{value:"black",children:"Black"})]})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-gray-400 mb-2 block",children:h("production.referenceSimilarity")}),(0,r.jsx)("div",{className:"flex gap-2",children:["low","medium","high"].map(e=>(0,r.jsxs)("button",{onClick:()=>O("similarityLevel",e),className:`flex-1 max-w-[140px] py-2 px-3 text-xs rounded-md transition-colors ${_.similarityLevel===e?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:[(0,r.jsx)("div",{className:"font-bold",children:h(`production.similarity${e.charAt(0).toUpperCase()+e.slice(1)}`)}),(0,r.jsx)("div",{className:"text-[10px] opacity-70 mt-0.5",children:h(`production.similarity${e.charAt(0).toUpperCase()+e.slice(1)}Desc`)})]},e))})]})]}),(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mt-3",children:h("production.perCardModeHint")})]}),M.map((e,t)=>(0,r.jsxs)("div",{className:t>0?"mt-12":"",children:[(0,r.jsxs)("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:`w-2 h-6 rounded-full ${N(e.ratio)}`}),e.label," (",e.ratio,")"]}),(0,r.jsx)("div",{className:`grid gap-6 ${(e.ratio,"grid-cols-1 lg:grid-cols-3")}`,children:e.sets.map(e=>(0,r.jsx)(T,{contentSet:e,apiKey:i,productImage:C.base64,secondaryProduct:L.base64,brandLogo:I.base64,onContentChange:z,t:h,globalSettings:_,marketingRoute:m},e.id))})]},e.ratio))]})]})},I="gemini_api_key";function z(){return localStorage.getItem(I)}let A=e=>{let{isOpen:t,onClose:a,onSave:i,serverHasKey:l=!1}=e,{t:n}=(0,y.useLocale)(),[o,d]=(0,s.useState)("");return((0,s.useEffect)(()=>{let e=z();e&&d(e)},[t]),t)?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm animate-in fade-in duration-200",children:(0,r.jsxs)("div",{className:"bg-[#1e1e24] border border-white/10 rounded-2xl p-8 max-w-md w-full shadow-2xl transform transition-all scale-100",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-white mb-4 serif",children:n("apiKeyModal.title")}),l&&(0,r.jsxs)("div",{className:"mb-6 p-4 bg-green-900/20 border border-green-500/30 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("span",{className:"text-green-300 font-bold text-sm",children:n("apiKeyModal.freeMode")})]}),(0,r.jsxs)("p",{className:"text-green-300/70 text-xs",children:[n("apiKeyModal.freeModeDesc"),(0,r.jsx)("br",{}),n("apiKeyModal.freeModeDesc2")]})]}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:l?(0,r.jsxs)(r.Fragment,{children:[n("apiKeyModal.enterKeyOptional"),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:n("apiKeyModal.enterKeyOptionalDesc")})]}):(0,r.jsxs)(r.Fragment,{children:[n("apiKeyModal.enterKeyRequired"),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:n("apiKeyModal.enterKeyRequiredDesc")})]})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:[n("apiKeyModal.labelOptional")," ",l&&(0,r.jsxs)("span",{className:"text-gray-600 normal-case",children:["(",n("common.optional"),")"]})]}),(0,r.jsx)("input",{type:"password",value:o,onChange:e=>d(e.target.value),placeholder:"AIzaSy...",className:"w-full bg-black/30 border border-white/10 rounded-lg px-4 py-3 text-white placeholder-gray-600 focus:border-blue-500 focus:outline-none transition-colors font-mono text-sm"})]}),(0,r.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,r.jsx)("button",{onClick:a,className:"flex-1 px-4 py-2 rounded-lg border border-white/10 text-gray-400 hover:bg-white/5 hover:text-white transition-colors text-sm font-medium",children:n(l?"common.close":"common.cancel")}),o.trim()&&(0,r.jsx)("button",{onClick:()=>{if(o.trim()){var e;e=o.trim(),localStorage.setItem(I,e),i(o.trim()),a()}},className:"flex-1 px-4 py-2 rounded-lg bg-blue-600 text-white font-bold hover:bg-blue-500 transition-colors text-sm",children:n("apiKeyModal.saveButton")}),z()&&(0,r.jsx)("button",{onClick:()=>{localStorage.removeItem(I),d(""),i(""),a()},className:"flex-1 px-4 py-2 rounded-lg bg-red-600 text-white font-bold hover:bg-red-500 transition-colors text-sm",children:n("apiKeyModal.clearKey")})]}),(0,r.jsx)("div",{className:"text-center pt-2",children:(0,r.jsx)("a",{href:"https://aistudio.google.com/app/apikey",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:text-blue-300 underline",children:n("apiKeyModal.getApiKey")})})]})]})}):null},O=()=>{let{locale:e,toggleLocale:t,t:s}=(0,y.useLocale)();return(0,r.jsx)("button",{onClick:t,className:"text-gray-400 hover:text-white text-xs sm:text-sm font-bold transition-colors",title:s("zh"===e?"language.switchToEnglish":"language.switchToChinese"),children:s(`language.${e}`)})};function M(e){let{imagePreview:t,productName:s,productInfo:a,productUrl:i,refCopy:l,showAnalyzeButton:n,onFileChange:o,onClearImage:d,onProductNameChange:c,onProductInfoChange:u,onProductUrlChange:m,onRefCopyChange:h,onAnalyze:p}=e,{t:x}=(0,y.useLocale)(),g=!!t;return(0,r.jsx)("div",{className:`
|
|
82
|
+
w-full max-w-4xl mx-auto mt-6 sm:mt-8 animate-fade-in-up
|
|
83
|
+
p-4 sm:p-6 rounded-2xl sm:rounded-3xl border-2 transition-all duration-500
|
|
84
|
+
${g?"border-white/40 bg-white/5":"border-gray-600/50 bg-black/20"}
|
|
85
|
+
`,children:(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6",children:[(0,r.jsx)("div",{className:"order-2 md:order-1",children:(0,r.jsxs)("label",{className:`flex flex-col items-center justify-center w-full h-full min-h-[280px] sm:min-h-[320px] border-2 border-dashed rounded-xl sm:rounded-2xl cursor-pointer transition-all duration-500 relative overflow-hidden group ${g?"border-white/30 bg-black/30":"border-gray-600/50 hover:border-gray-500/70 bg-black/20"}`,children:[t?(0,r.jsxs)("div",{className:"w-full h-full relative",children:[(0,r.jsx)("img",{src:t,alt:"Preview",className:"w-full h-full object-contain p-4 transition-transform duration-500 group-hover:scale-105"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent flex items-center justify-center opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-all duration-300 backdrop-blur-[2px]",children:(0,r.jsx)("span",{className:"text-white font-bold text-sm px-4 py-2 rounded-full bg-white/10 border border-white/20 backdrop-blur-md",children:x("input.changeImage")})}),(0,r.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},className:"absolute top-2 right-2 p-2 bg-black/60 hover:bg-red-500/80 rounded-full text-white transition-colors z-10",title:x("input.clearImage"),children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 sm:w-20 sm:h-20 rounded-2xl bg-gray-700/30 border border-gray-600/50 flex items-center justify-center mb-4 group-hover:scale-110 group-hover:border-gray-500/70 transition-all duration-300",children:(0,r.jsxs)("svg",{className:"w-8 h-8 sm:w-10 sm:h-10 text-gray-500 group-hover:text-gray-400 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,r.jsx)("p",{className:"mb-2 text-sm sm:text-base font-medium text-gray-400 group-hover:text-gray-300 transition-colors",children:x("input.uploadOrTakePhoto")}),(0,r.jsx)("p",{className:"text-xs text-gray-600",children:x("input.supportedFormats")})]}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:o,accept:"image/*"})]})}),(0,r.jsxs)("div",{className:"order-1 md:order-2 flex flex-col gap-3 sm:gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-white":"text-gray-500"}`,children:x("input.productName")}),(0,r.jsx)("input",{type:"text",value:s,onChange:e=>c(e.target.value),placeholder:x("input.productNamePlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 text-sm sm:text-base ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-gray-400":"text-gray-600"}`,children:x("input.productInfo")}),(0,r.jsx)("textarea",{value:a,onChange:e=>u(e.target.value),placeholder:x("input.productInfoPlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 h-20 sm:h-24 resize-none text-xs sm:text-sm leading-relaxed ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-gray-400":"text-gray-600"}`,children:x("input.productUrl")}),(0,r.jsx)("input",{type:"url",value:i,onChange:e=>m(e.target.value),placeholder:x("input.productUrlPlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 text-sm sm:text-base ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-gray-400":"text-gray-600"}`,children:x("input.refCopy")}),(0,r.jsx)("textarea",{value:l,onChange:e=>h(e.target.value),placeholder:x("input.refCopyPlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 h-20 sm:h-24 resize-none text-xs sm:text-sm leading-relaxed ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),n&&(0,r.jsxs)("button",{onClick:p,className:`btn-primary mt-2 sm:mt-auto w-full py-3 sm:py-4 font-bold text-xs sm:text-sm uppercase tracking-widest rounded-lg sm:rounded-xl transition-all duration-300 flex items-center justify-center gap-2 ${g?"bg-white text-black hover:bg-gray-200 hover:scale-[1.02]":"bg-gray-700 text-gray-400 cursor-not-allowed"}`,disabled:!g,children:[(0,r.jsx)("span",{children:x("input.startButton")}),(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]})]})]})})}function $(e){let{routes:t,activeRouteIndex:s,routeSupplements:a,onSelectRoute:i,onUpdateRoute:l,onUpdateSupplement:n}=e,{t:o}=(0,y.useLocale)(),d=["from-white/10 to-white/5","from-white/10 to-white/5","from-white/10 to-white/5"],c=["border-white/30","border-white/30","border-white/30"],u=["text-white","text-white","text-white"];return(0,r.jsxs)("div",{className:"mb-8 sm:mb-10 animate-fade-in-up",children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between mb-4 sm:mb-6 border-b border-white/5 pb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex items-center gap-3 mb-2",children:(0,r.jsx)("span",{className:"text-xs font-mono text-white bg-white/10 px-2 py-1 rounded-md border border-white/20",children:"STEP 01"})}),(0,r.jsx)("h3",{className:"text-xl sm:text-2xl font-bold text-white",children:o("phase1.title")})]}),(0,r.jsx)("span",{className:"text-xs text-gray-500 mt-2 sm:mt-0",children:o("phase1.selectHint")})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:t.map((e,t)=>{let m=s===t;return(0,r.jsxs)("div",{onClick:()=>i(t),className:"card-hover glass-panel p-4 sm:p-6 rounded-xl sm:rounded-2xl transition-all duration-500 cursor-pointer flex flex-col group relative",style:{border:m?"1px solid rgba(255, 255, 255, 0.3)":"1px solid rgba(255, 255, 255, 0.05)"},children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3 sm:mb-4",children:[m?(0,r.jsxs)("span",{className:"text-xs font-mono text-white px-2 py-1 rounded-md",style:{backgroundColor:"rgba(255, 255, 255, 0.1)",border:"1px solid rgba(255, 255, 255, 0.4)"},children:[o("phase1.routeLabel")," ",String.fromCharCode(65+t)]}):(0,r.jsxs)("span",{className:"text-xs font-mono text-gray-500 px-2 py-1",children:[o("phase1.routeLabel")," ",String.fromCharCode(65+t)]}),(0,r.jsx)("div",{className:`
|
|
86
|
+
w-6 h-6 sm:w-7 sm:h-7 rounded-full flex items-center justify-center transition-all duration-300
|
|
87
|
+
${m?"bg-white/10 text-white shadow-lg scale-100":"bg-white/5 border border-white/10 scale-90 opacity-0 group-hover:opacity-50"}
|
|
88
|
+
`,children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})]}),(0,r.jsxs)("div",{className:"space-y-3 sm:space-y-4 flex-grow",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.routeName")}),(0,r.jsx)("input",{type:"text",value:e.route_name,onChange:r=>{r.stopPropagation(),l(t,{...e,route_name:r.target.value})},onClick:e=>e.stopPropagation(),className:`w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 sm:py-2.5 text-base sm:text-lg font-bold text-white focus:border-[var(--brand-accent)]/50 focus:outline-none transition-colors ${m?u[t%3]:""}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.headline")}),(0,r.jsx)("textarea",{value:e.headline,onChange:r=>{r.stopPropagation(),l(t,{...e,headline:r.target.value})},onClick:e=>e.stopPropagation(),className:`w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 sm:py-2.5 text-sm sm:text-base focus:border-[var(--brand-accent)]/50 focus:outline-none font-medium resize-none h-14 sm:h-16 ${m?"text-white":"text-gray-300"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.subhead")}),(0,r.jsx)("textarea",{value:e.subhead,onChange:r=>{r.stopPropagation(),l(t,{...e,subhead:r.target.value})},onClick:e=>e.stopPropagation(),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 sm:py-2.5 text-sm text-gray-300 focus:border-[var(--brand-accent)]/50 focus:outline-none resize-none h-14 sm:h-16"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.styleDescription")}),(0,r.jsx)("textarea",{value:e.style_brief,onChange:r=>{r.stopPropagation(),l(t,{...e,style_brief:r.target.value})},onClick:e=>e.stopPropagation(),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 sm:py-2.5 text-sm text-gray-300 focus:border-[var(--brand-accent)]/50 focus:outline-none resize-none h-20 sm:h-24"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.targetAudience")}),(0,r.jsx)("textarea",{value:e.target_audience,onChange:r=>{r.stopPropagation(),l(t,{...e,target_audience:r.target.value})},onClick:e=>e.stopPropagation(),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 sm:py-2.5 text-sm text-gray-300 focus:border-[var(--brand-accent)]/50 focus:outline-none resize-none h-16 sm:h-20"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`text-[10px] font-bold uppercase tracking-wider mb-1 block ${u[t%3]}`,children:o("phase1.supplement")}),(0,r.jsx)("textarea",{value:a[t],onChange:e=>{e.stopPropagation(),n(t,e.target.value)},onClick:e=>e.stopPropagation(),placeholder:o("phase1.supplementPlaceholder"),className:`w-full bg-gradient-to-br ${d[t%3]} border ${c[t%3]} rounded-lg px-2 sm:px-3 py-1.5 sm:py-2 text-xs text-gray-300 placeholder-gray-600 focus:outline-none resize-none h-14 sm:h-16`})]})]}),(0,r.jsx)("div",{className:`absolute inset-0 rounded-xl sm:rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none bg-gradient-to-br ${d[t%3]} blur-xl -z-10`})]},t)})})]})}let D={blue:{border:"border-white/30",bg:"bg-white/10",glow:"",checkbox:"bg-white",text:"text-white"},purple:{border:"border-white/30",bg:"bg-white/10",glow:"",checkbox:"bg-white",text:"text-white"},pink:{border:"border-white/30",bg:"bg-white/10",glow:"",checkbox:"bg-white",text:"text-white"},green:{border:"border-white/30",bg:"bg-white/10",glow:"",checkbox:"bg-white",text:"text-white"},amber:{border:"border-white/30",bg:"bg-white/10",glow:"",checkbox:"bg-white",text:"text-white"}},F=s.default.memo(e=>{let{checked:t,onChange:s,name:a,ratioLabel:i,description:l,color:n}=e,o=D[n];return(0,r.jsxs)("label",{className:`
|
|
89
|
+
relative cursor-pointer p-3 sm:p-4 rounded-xl sm:rounded-2xl border transition-all duration-300 flex flex-col items-center justify-center gap-2 sm:gap-3 group h-24 sm:h-32
|
|
90
|
+
${t?`${o.bg} ${o.border} ${o.glow}`:"bg-black/20 border-white/5 hover:border-white/20 hover:bg-white/5"}
|
|
91
|
+
`,children:[(0,r.jsx)("input",{type:"checkbox",checked:t,onChange:e=>s(e.target.checked),className:"sr-only"}),t&&(0,r.jsx)("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3",children:(0,r.jsx)("div",{className:`w-2 h-2 rounded-full ${o.checkbox} shadow-lg animate-pulse`})}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:`font-bold text-sm sm:text-base transition-colors ${t?o.text:"text-gray-300"}`,children:a}),(0,r.jsx)("div",{className:"text-[10px] sm:text-xs opacity-60 font-mono mt-0.5",children:i})]})]})});function U(e){let{sizeSelection:t,errorMsg:s,onSizeChange:a,onConfirm:i}=e,{t:l}=(0,y.useLocale)();return(0,r.jsxs)("div",{className:"animate-fade-in-up",children:[(0,r.jsxs)("div",{className:"glass-panel p-4 sm:p-6 lg:p-8 rounded-xl sm:rounded-2xl lg:rounded-3xl border border-white/5",children:[(0,r.jsx)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center mb-4 sm:mb-6 gap-3 sm:gap-4",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex items-center gap-3 mb-2",children:(0,r.jsx)("span",{className:"text-xs font-mono px-2 py-1 rounded-md border text-white bg-white/10 border-white/20",children:"STEP 02"})}),(0,r.jsx)("h3",{className:"text-xl sm:text-2xl font-bold mb-1 sm:mb-2 text-white",children:l("phase2.title")}),(0,r.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:l("phase2.description")})]})}),s&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-[var(--brand-pink)]/10 border border-[var(--brand-pink)]/30 rounded-lg text-[var(--brand-pink)] text-sm",children:s}),(0,r.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 sm:gap-4",children:[(0,r.jsx)(F,{ratio:"1:1",checked:t["1:1"],onChange:e=>a("1:1",e),name:l("sizes.1:1.name"),ratioLabel:l("sizes.1:1.ratio"),description:l("sizes.1:1.description"),color:"blue"}),(0,r.jsx)(F,{ratio:"9:16",checked:t["9:16"],onChange:e=>a("9:16",e),name:l("sizes.9:16.name"),ratioLabel:l("sizes.9:16.ratio"),description:l("sizes.9:16.description"),color:"purple"}),(0,r.jsx)(F,{ratio:"4:5",checked:t["4:5"],onChange:e=>a("4:5",e),name:l("sizes.4:5.name"),ratioLabel:l("sizes.4:5.ratio"),description:l("sizes.4:5.description"),color:"pink"}),(0,r.jsx)(F,{ratio:"16:9",checked:t["16:9"],onChange:e=>a("16:9",e),name:l("sizes.16:9.name"),ratioLabel:l("sizes.16:9.ratio"),description:l("sizes.16:9.description"),color:"green"}),(0,r.jsx)(F,{ratio:"1:1-commercial",checked:t["1:1-commercial"],onChange:e=>a("1:1-commercial",e),name:l("sizes.1:1-commercial.name"),ratioLabel:l("sizes.1:1-commercial.ratio"),description:l("sizes.1:1-commercial.description"),color:"amber"})]})]}),(0,r.jsx)("div",{className:"flex justify-center mt-6 sm:mt-8",children:(0,r.jsx)("button",{onClick:i,className:"btn-primary px-10 sm:px-12 py-3.5 sm:py-4 rounded-xl font-bold text-sm sm:text-base transition-all duration-300 bg-white text-black hover:bg-gray-200 hover:scale-[1.02]",children:l("phase2.confirmButton")})})]})}F.displayName="SizeCheckbox";var B=e.i(83968),W=e.i(81437);function K(){let{t:e}=(0,y.useLocale)();return(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 flex-1 flex flex-col items-center justify-center space-y-8 text-center animate-in fade-in zoom-in duration-500",children:[(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 relative w-64 h-16 overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-fadb241e6f0632f6 absolute inset-0 flex items-center justify-between px-2",children:[...Array(8)].map((e,t)=>(0,r.jsx)("div",{style:{animationDelay:`${.1*t}s`},className:"jsx-fadb241e6f0632f6 w-3 h-3 bg-blue-400/60 rounded-full animate-pulse"},t))}),(0,r.jsx)("div",{style:{animation:"pacman-move 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 w-12 h-12",children:(0,r.jsx)(W.default,{src:"/images/logo.svg",alt:"Loading",width:48,height:48,className:"w-full h-full object-contain drop-shadow-[0_0_8px_rgba(59,130,246,0.5)]",style:{animation:"pacman-chomp 0.3s ease-in-out infinite"}})}),(0,r.jsx)("div",{style:{animation:"pacman-trail 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 h-1 bg-gradient-to-r from-blue-500/50 to-transparent rounded-full"})]}),(0,r.jsx)(B.default,{id:"fadb241e6f0632f6",children:"@keyframes pacman-move{0%{left:-48px}to{left:calc(100% + 48px)}}@keyframes pacman-chomp{0%,to{transform:scale(1)}50%{transform:scale(.9)scaleX(1.1)}}@keyframes pacman-trail{0%{opacity:0;width:0;left:0}10%{opacity:.5}to{opacity:0;width:100%;left:0}}"}),(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6",children:[(0,r.jsx)("h2",{className:"jsx-fadb241e6f0632f6 text-2xl font-bold text-white mb-2",children:e("analyzing.title")}),(0,r.jsx)("p",{className:"jsx-fadb241e6f0632f6 text-gray-400",children:e("analyzing.description")})]})]})}function G(e){let{routeName:t}=e,{t:s}=(0,y.useLocale)();return(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 flex-1 flex flex-col items-center justify-center py-16 space-y-8 text-center animate-in fade-in zoom-in duration-500",children:[(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 relative w-64 h-16 overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-fadb241e6f0632f6 absolute inset-0 flex items-center justify-between px-2",children:[...Array(8)].map((e,t)=>(0,r.jsx)("div",{style:{animationDelay:`${.1*t}s`},className:"jsx-fadb241e6f0632f6 w-3 h-3 bg-blue-400/60 rounded-full animate-pulse"},t))}),(0,r.jsx)("div",{style:{animation:"pacman-move 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 w-12 h-12",children:(0,r.jsx)(W.default,{src:"/images/logo.svg",alt:"Loading",width:48,height:48,className:"w-full h-full object-contain drop-shadow-[0_0_8px_rgba(59,130,246,0.5)]",style:{animation:"pacman-chomp 0.3s ease-in-out infinite"}})}),(0,r.jsx)("div",{style:{animation:"pacman-trail 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 h-1 bg-gradient-to-r from-blue-500/50 to-transparent rounded-full"})]}),(0,r.jsx)(B.default,{id:"fadb241e6f0632f6",children:"@keyframes pacman-move{0%{left:-48px}to{left:calc(100% + 48px)}}@keyframes pacman-chomp{0%,to{transform:scale(1)}50%{transform:scale(.9)scaleX(1.1)}}@keyframes pacman-trail{0%{opacity:0;width:0;left:0}10%{opacity:.5}to{opacity:0;width:100%;left:0}}"}),(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6",children:[(0,r.jsx)("h2",{className:"jsx-fadb241e6f0632f6 text-2xl font-bold text-white mb-2",children:s("analyzing.title")}),(0,r.jsxs)("p",{className:"jsx-fadb241e6f0632f6 text-gray-400",children:[s("phase2.planningDescription"),(0,r.jsxs)("strong",{className:"jsx-fadb241e6f0632f6",children:['"',t,'"']})," ",s("phase2.planningDescription2")]})]})]})}let H={"1:1":!1,"9:16":!1,"4:5":!1,"16:9":!1,"1:1-commercial":!1},Y={appState:b.IDLE,errorMsg:"",selectedFile:null,imagePreview:null,productName:"",productInfo:"",productUrl:"",refCopy:"",analysisResult:null,activeRouteIndex:0,editedRoutes:[],routeSupplements:["","",""],sizeSelection:H,contentPlan:null,editedContentSets:[],productImage:null,secondaryProduct:null,brandLogo:null,apiKey:"",serverHasKey:!1,isGuideOpen:!1,isApiKeyModalOpen:!1};function q(e,t){switch(t.type){case"SET_APP_STATE":return{...e,appState:t.payload};case"SET_ERROR":return{...e,errorMsg:t.payload};case"CLEAR_ERROR":return{...e,errorMsg:""};case"SET_SELECTED_FILE":return{...e,selectedFile:t.payload.file,imagePreview:t.payload.preview,analysisResult:null,contentPlan:null,editedContentSets:[],sizeSelection:H,appState:b.IDLE};case"SET_INPUT":return{...e,[t.payload.field]:t.payload.value};case"SET_ANALYSIS_RESULT":return{...e,analysisResult:t.payload,editedRoutes:t.payload.marketing_routes,appState:b.SIZE_SELECTION};case"SET_ACTIVE_ROUTE":return{...e,activeRouteIndex:t.payload,contentPlan:null,editedContentSets:[],sizeSelection:H,appState:e.appState===b.SUITE_READY||e.appState===b.PLANNING?b.SIZE_SELECTION:e.appState};case"UPDATE_EDITED_ROUTE":let r=[...e.editedRoutes];return r[t.payload.index]=t.payload.route,{...e,editedRoutes:r};case"UPDATE_ROUTE_SUPPLEMENT":let s=[...e.routeSupplements];return s[t.payload.index]=t.payload.value,{...e,routeSupplements:s};case"SET_SIZE_SELECTION":return{...e,sizeSelection:{...e.sizeSelection,[t.payload.ratio]:t.payload.checked}};case"RESET_SIZE_SELECTION":return{...e,sizeSelection:H};case"SET_CONTENT_PLAN":return{...e,contentPlan:t.payload,editedContentSets:t.payload.content_sets,appState:b.SUITE_READY,productImage:e.productImage||e.selectedFile};case"SET_EDITED_CONTENT_SETS":return{...e,editedContentSets:t.payload};case"SET_PRODUCT_IMAGE":return{...e,productImage:t.payload};case"SET_SECONDARY_PRODUCT":return{...e,secondaryProduct:t.payload};case"SET_BRAND_LOGO":return{...e,brandLogo:t.payload};case"SET_API_KEY":return{...e,apiKey:t.payload,errorMsg:""};case"SET_SERVER_HAS_KEY":return{...e,serverHasKey:t.payload};case"SET_GUIDE_OPEN":return{...e,isGuideOpen:t.payload};case"SET_API_KEY_MODAL_OPEN":return{...e,isApiKeyModalOpen:t.payload};case"RESET_RESULTS":return{...e,analysisResult:null,contentPlan:null,editedContentSets:[],sizeSelection:H,appState:b.IDLE};case"RESET_PHASE2":return{...e,contentPlan:null,editedContentSets:[],sizeSelection:H,appState:b.SIZE_SELECTION};default:return e}}function V(){let{t:e,locale:t}=(0,y.useLocale)(),[a,i]=(0,s.useReducer)(q,Y),{appState:l,errorMsg:n,selectedFile:o,imagePreview:d,productName:c,productInfo:u,productUrl:x,refCopy:g,analysisResult:f,activeRouteIndex:j,editedRoutes:N,routeSupplements:S,sizeSelection:_,contentPlan:k,productImage:E,secondaryProduct:C,brandLogo:T,apiKey:P,serverHasKey:R,isGuideOpen:I,isApiKeyModalOpen:D}=a;s.default.useEffect(()=>{let e=z();e&&i({type:"SET_API_KEY",payload:e}),m().then(e=>{i({type:"SET_SERVER_HAS_KEY",payload:e})})},[]);let F=(0,s.useCallback)(e=>{i({type:"SET_API_KEY",payload:e})},[]),B=(0,s.useCallback)(e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0],r=new FileReader;r.onload=e=>{i({type:"SET_SELECTED_FILE",payload:{file:t,preview:e.target?.result}})},r.readAsDataURL(t)}},[]),H=(0,s.useCallback)(()=>{i({type:"SET_SELECTED_FILE",payload:{file:null,preview:null}})},[]),V=(0,s.useCallback)(async()=>{if(o){if(!P&&!R)return void i({type:"SET_API_KEY_MODAL_OPEN",payload:!0});i({type:"CLEAR_ERROR"}),i({type:"SET_APP_STATE",payload:b.ANALYZING});try{let e=await h(o,c,u,x,P||void 0,t);i({type:"SET_ANALYSIS_RESULT",payload:e})}catch(t){console.error(t),i({type:"SET_ERROR",payload:t instanceof Error?t.message:e("errors.unexpectedError")}),i({type:"SET_APP_STATE",payload:b.ERROR})}}},[o,P,R,c,u,x,t,e]);(0,s.useCallback)(()=>{if(f){if(!P&&!R)return void i({type:"SET_API_KEY_MODAL_OPEN",payload:!0});i({type:"CLEAR_ERROR"}),i({type:"SET_APP_STATE",payload:b.SIZE_SELECTION}),setTimeout(()=>{document.getElementById("phase2-section")?.scrollIntoView({behavior:"smooth",block:"start"})},300)}},[f,P,R]);let Z=(0,s.useCallback)(async()=>{if(!f)return;let r=Object.entries(_).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t});if(0===r.length)return void i({type:"SET_ERROR",payload:e("phase2.selectAtLeastOne")});let s=N[j],a=f.product_analysis,l=S[j],n=l?`${g}
|
|
92
|
+
|
|
93
|
+
${e("prompt.strategySupplement")}
|
|
94
|
+
${l}`:g;i({type:"CLEAR_ERROR"}),i({type:"SET_APP_STATE",payload:b.PLANNING});try{let e=await p(s,a,n,r,P||void 0,t);i({type:"SET_CONTENT_PLAN",payload:e}),setTimeout(()=>{document.getElementById("content-section")?.scrollIntoView({behavior:"smooth",block:"start"})},300)}catch(t){i({type:"SET_ERROR",payload:t instanceof Error?t.message:e("errors.contentPlanFailed")}),i({type:"SET_APP_STATE",payload:b.SIZE_SELECTION})}},[f,_,N,j,S,g,P,t,e]),X=[{label:e("steps.analyze"),shortLabel:"01"},{label:e("steps.strategyFormat"),shortLabel:"02"},{label:e("steps.adjustGenerate"),shortLabel:"03"}],J=(()=>{switch(l){case b.IDLE:case b.ANALYZING:return 0;case b.RESULTS:case b.SIZE_SELECTION:return 1;case b.PLANNING:case b.SUITE_READY:return 2;default:return 0}})();return(0,r.jsxs)("div",{className:"min-h-screen text-slate-200 selection:bg-blue-500 selection:text-white font-sans flex flex-col",children:[(0,r.jsx)(w,{isOpen:I,onClose:()=>i({type:"SET_GUIDE_OPEN",payload:!1})}),(0,r.jsx)(A,{isOpen:D,onClose:()=>i({type:"SET_API_KEY_MODAL_OPEN",payload:!1}),onSave:F,serverHasKey:R}),(0,r.jsx)("header",{className:"w-full py-4 sm:py-6 border-b border-white/5 glass-panel sticky top-0 z-50",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 cursor-pointer group",onClick:()=>i({type:"SET_APP_STATE",payload:b.IDLE}),children:[(0,r.jsx)("div",{className:"w-8 h-8 flex items-center justify-center",children:(0,r.jsx)(W.default,{src:"/images/logo.svg",alt:"Logo",width:32,height:32,className:"w-full h-full object-contain animate-float"})}),(0,r.jsx)("h1",{className:"text-base sm:text-lg font-bold text-white hidden sm:block group-hover:text-gray-300 transition-colors",children:e("common.appName")})]}),(0,r.jsx)("div",{className:"flex items-center gap-2 sm:gap-3",children:(0,r.jsx)("button",{onClick:()=>i({type:"SET_API_KEY_MODAL_OPEN",payload:!0}),className:"text-white hover:text-gray-300 text-xs sm:text-sm font-bold transition-colors",children:R?P?e("header.apiSettingsCustom"):e("header.apiSettingsFree"):P?e("header.apiSettingsConnected"):e("header.apiSettings")})})]})}),l===b.IDLE?null:(0,r.jsx)("div",{className:"w-full glass-panel border-b border-white/5 py-4 sticky top-[73px] z-40",children:(0,r.jsxs)("div",{className:"container mx-auto px-6",children:[(0,r.jsx)("div",{className:"hidden md:flex items-center justify-center gap-2",children:X.map((e,t)=>{let a=t<J,i=t===J;return(0,r.jsxs)(s.default.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:`
|
|
95
|
+
w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all duration-500
|
|
96
|
+
${a||i?"bg-white text-black":"bg-white/5 text-gray-500 border border-white/10"}
|
|
97
|
+
`,children:a?(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):e.shortLabel}),(0,r.jsx)("span",{className:`
|
|
98
|
+
text-sm font-medium transition-colors duration-300
|
|
99
|
+
${i||a?"text-white":"text-gray-500"}
|
|
100
|
+
`,children:e.label})]}),t<X.length-1&&(0,r.jsx)("div",{className:"w-12 h-0.5 mx-2 relative overflow-hidden rounded-full bg-white/10",children:(0,r.jsx)("div",{className:`
|
|
101
|
+
absolute inset-y-0 left-0 bg-white transition-all duration-700 ease-out rounded-full
|
|
102
|
+
${t<J?"w-full":"w-0"}
|
|
103
|
+
`})})]},t)})}),(0,r.jsxs)("div",{className:"flex md:hidden items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-full bg-white flex items-center justify-center text-black font-bold text-sm",children:J+1}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-white font-bold text-sm",children:X[J]?.label}),(0,r.jsxs)("div",{className:"text-gray-500 text-xs",children:["Step ",J+1," of ",X.length]})]})]}),(0,r.jsx)("div",{className:"flex gap-1.5",children:X.map((e,t)=>(0,r.jsx)("div",{className:`
|
|
104
|
+
w-2 h-2 rounded-full transition-all duration-300
|
|
105
|
+
${t===J?"bg-white":t<J?"bg-white/50":"bg-white/20"}
|
|
106
|
+
`},t))})]})]})}),(0,r.jsxs)("main",{className:"container mx-auto px-4 py-8 pb-16 flex-1 flex flex-col",children:[n&&(0,r.jsxs)("div",{className:"w-full max-w-2xl mx-auto mb-8 p-4 bg-red-900/20 border border-red-500/50 rounded-lg text-red-200 text-center flex items-center justify-between",children:[(0,r.jsx)("span",{children:n}),(0,r.jsx)("button",{onClick:()=>i({type:"RESET_RESULTS"}),className:"text-sm underline hover:text-white",children:e("common.reset")})]}),l===b.ANALYZING&&(0,r.jsx)(K,{}),l===b.IDLE&&(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-center mt-8 text-center",children:[(0,r.jsxs)("h2",{className:"text-4xl md:text-6xl font-bold text-white serif mb-4 leading-tight",children:[e("home.heroTitle"),(0,r.jsx)("br",{}),e("home.heroTitle2")]}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl mx-auto mb-8 text-base mt-2",children:e("home.heroDescription")}),(0,r.jsx)(M,{imagePreview:d,productName:c,productInfo:u,productUrl:x,refCopy:g,showAnalyzeButton:!!o&&l===b.IDLE,onFileChange:B,onClearImage:H,onProductNameChange:e=>i({type:"SET_INPUT",payload:{field:"productName",value:e}}),onProductInfoChange:e=>i({type:"SET_INPUT",payload:{field:"productInfo",value:e}}),onProductUrlChange:e=>i({type:"SET_INPUT",payload:{field:"productUrl",value:e}}),onRefCopyChange:e=>i({type:"SET_INPUT",payload:{field:"refCopy",value:e}}),onAnalyze:V})]}),(l===b.RESULTS||l===b.SIZE_SELECTION||l===b.PLANNING||l===b.SUITE_READY)&&(()=>{if(!f||!d)return null;let e=f.marketing_routes[j],t=l===b.RESULTS||l===b.SIZE_SELECTION;return(0,r.jsxs)("div",{className:"w-full max-w-6xl mx-auto px-4 pb-20",children:[t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v,{analysis:f.product_analysis,imageSrc:d}),(0,r.jsx)($,{routes:N,activeRouteIndex:j,routeSupplements:S,onSelectRoute:e=>i({type:"SET_ACTIVE_ROUTE",payload:e}),onUpdateRoute:(e,t)=>i({type:"UPDATE_EDITED_ROUTE",payload:{index:e,route:t}}),onUpdateSupplement:(e,t)=>i({type:"UPDATE_ROUTE_SUPPLEMENT",payload:{index:e,value:t}})}),(0,r.jsx)("div",{className:"border-t border-white/10 pt-12",id:"phase2-section",children:(0,r.jsx)(U,{sizeSelection:_,errorMsg:n,onSizeChange:(e,t)=>i({type:"SET_SIZE_SELECTION",payload:{ratio:e,checked:t}}),onConfirm:Z})})]}),l===b.PLANNING&&(0,r.jsx)(G,{routeName:e.route_name}),l===b.SUITE_READY&&k&&(0,r.jsx)("div",{className:"relative",id:"content-section",children:(0,r.jsx)(L,{plan:k,onContentUpdate:e=>i({type:"SET_EDITED_CONTENT_SETS",payload:e}),apiKey:P,productImage:E,secondaryProduct:C,brandLogo:T,onProductImageChange:e=>i({type:"SET_PRODUCT_IMAGE",payload:e}),onSecondaryProductChange:e=>i({type:"SET_SECONDARY_PRODUCT",payload:e}),onBrandLogoChange:e=>i({type:"SET_BRAND_LOGO",payload:e}),marketingRoute:N[j]})})]})})()]}),(0,r.jsx)("footer",{className:"border-t border-white/10 py-4 mt-auto",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 flex items-center justify-end gap-4",children:[(0,r.jsx)("button",{onClick:()=>i({type:"SET_GUIDE_OPEN",payload:!0}),className:"text-gray-400 hover:text-white text-xs sm:text-sm font-bold transition-colors",children:e("header.guide")}),(0,r.jsx)("span",{className:"text-gray-600",children:"|"}),(0,r.jsx)(O,{})]})})]})}e.s(["default",()=>V],31713)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,46658,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var c=[],f=!1,a=-1;function l(){f&&n&&(f=!1,n.length?c=n.concat(c):a=-1,c.length&&p())}function p(){if(!f){var e=s(l);f=!0;for(var t=c.length;t;){for(n=c,c=[];++a<t;)n&&n[a].run();a=-1,t=c.length}n=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||f||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},u=!0;try{n[e](r,r.exports,i),u=!1}finally{u&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.0.4_@babel+core@7.28.5_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/next/dist/compiled/process/",t.exports=i(229)},74483,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(46658)},27760,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},32843,(e,t,r)=>{"use strict";t.exports=e.r(27760)},27507,(e,t,r)=>{"use strict";var n=e.i(74483),o=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),v=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,b={};function S(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}function O(){}function E(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},O.prototype=S.prototype;var T=E.prototype=new O;T.constructor=E,m(T,S.prototype),T.isPureReactComponent=!0;var j=Array.isArray;function w(){}var x={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function C(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function H(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var A=/\/+/g;function P(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function k(e,t,r){if(null==e)return e;var n=[],u=0;return!function e(t,r,n,u,s){var c,f,a,l=typeof t;("undefined"===l||"boolean"===l)&&(t=null);var p=!1;if(null===t)p=!0;else switch(l){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case o:case i:p=!0;break;case d:return e((p=t._init)(t._payload),r,n,u,s)}}if(p)return s=s(t),p=""===u?"."+P(t,0):u,j(s)?(n="",null!=p&&(n=p.replace(A,"$&/")+"/"),e(s,r,n,"",function(e){return e})):null!=s&&(H(s)&&(c=s,f=n+(null==s.key||t&&t.key===s.key?"":(""+s.key).replace(A,"$&/")+"/")+p,s=C(c.type,f,c.props)),r.push(s)),1;p=0;var y=""===u?".":u+":";if(j(t))for(var h=0;h<t.length;h++)l=y+P(u=t[h],h),p+=e(u,r,n,l,s);else if("function"==typeof(h=null===(a=t)||"object"!=typeof a?null:"function"==typeof(a=v&&a[v]||a["@@iterator"])?a:null))for(t=h.call(t),h=0;!(u=t.next()).done;)l=y+P(u=u.value,h++),p+=e(u,r,n,l,s);else if("object"===l){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,u,s);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,n,"","",function(e){return t.call(r,e,u++)}),n}function M(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function $(e){var t=x.T,r={};r.types=null!==t?t.types:null,x.T=r;try{var n=e(),o=x.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(w,L)}catch(e){L(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),x.T=t}}function D(e){var t=x.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else $(D.bind(null,e))}r.Activity=h,r.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!H(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=S,r.Fragment=u,r.Profiler=c,r.PureComponent=E,r.StrictMode=s,r.Suspense=p,r.ViewTransition=_,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},r.addTransitionType=D,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)R.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+2];n.children=u}return C(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:f,_context:e},e},r.createElement=function(e,t,r){var n,o={},i=null;if(null!=t)for(n in void 0!==t.key&&(i=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return C(e,i,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:l,render:e}},r.isValidElement=H,r.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},r.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},r.startTransition=$,r.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},r.use=function(e){return x.H.use(e)},r.useActionState=function(e,t,r){return x.H.useActionState(e,t,r)},r.useCallback=function(e,t){return x.H.useCallback(e,t)},r.useContext=function(e){return x.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return x.H.useEffect(e,t)},r.useEffectEvent=function(e){return x.H.useEffectEvent(e)},r.useId=function(){return x.H.useId()},r.useImperativeHandle=function(e,t,r){return x.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return x.H.useMemo(e,t)},r.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return x.H.useReducer(e,t,r)},r.useRef=function(e){return x.H.useRef(e)},r.useState=function(e){return x.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return x.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return x.H.useTransition()},r.version="19.3.0-canary-52684925-20251110"},46211,(e,t,r)=>{"use strict";t.exports=e.r(27507)},81258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},43409,(e,t,r)=>{"use strict";var n=e.r(46211);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=c.T,r=u.p;try{if(c.T=null,u.p=2,e)return e()}finally{c.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=f(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=f(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=f(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=f(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return c.H.useFormState(e,t,r)},r.useFormStatus=function(){return c.H.useHostTransitionStatus()},r.version="19.3.0-canary-52684925-20251110"},63399,(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(43409)},44066,(e,t,r)=>{"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}r._=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(o,u,s):o[u]=e[u]}return o.default=e,r&&r.set(e,o),o}},70521,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(81258)._(e.r(46211)).default.createContext({})},42628,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(32843),o=e.r(70997),i={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},u={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},s=function(e){let{error:t}=e,r=t?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:t}),(0,n.jsx)("div",{style:i,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:u,children:["Application error: a ",r?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",r?"server logs":"browser console"," for more information)."]}),r?(0,n.jsx)("p",{style:u,children:`Digest: ${r}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35145,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var c=[],f=!1,a=-1;function l(){f&&n&&(f=!1,n.length?c=n.concat(c):a=-1,c.length&&p())}function p(){if(!f){var e=s(l);f=!0;for(var t=c.length;t;){for(n=c,c=[];++a<t;)n&&n[a].run();a=-1,t=c.length}n=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||f||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},u=!0;try{n[e](r,r.exports,i),u=!1}finally{u&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.0.7_@babel+core@7.28.5_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/process/",t.exports=i(229)},97803,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(35145)},93951,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},59031,(e,t,r)=>{"use strict";t.exports=e.r(93951)},31318,(e,t,r)=>{"use strict";var n=e.i(97803),o=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),v=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,b={};function S(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}function O(){}function E(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},O.prototype=S.prototype;var T=E.prototype=new O;T.constructor=E,m(T,S.prototype),T.isPureReactComponent=!0;var j=Array.isArray;function w(){}var x={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function C(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function H(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var A=/\/+/g;function P(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function k(e,t,r){if(null==e)return e;var n=[],u=0;return!function e(t,r,n,u,s){var c,f,a,l=typeof t;("undefined"===l||"boolean"===l)&&(t=null);var p=!1;if(null===t)p=!0;else switch(l){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case o:case i:p=!0;break;case d:return e((p=t._init)(t._payload),r,n,u,s)}}if(p)return s=s(t),p=""===u?"."+P(t,0):u,j(s)?(n="",null!=p&&(n=p.replace(A,"$&/")+"/"),e(s,r,n,"",function(e){return e})):null!=s&&(H(s)&&(c=s,f=n+(null==s.key||t&&t.key===s.key?"":(""+s.key).replace(A,"$&/")+"/")+p,s=C(c.type,f,c.props)),r.push(s)),1;p=0;var y=""===u?".":u+":";if(j(t))for(var h=0;h<t.length;h++)l=y+P(u=t[h],h),p+=e(u,r,n,l,s);else if("function"==typeof(h=null===(a=t)||"object"!=typeof a?null:"function"==typeof(a=v&&a[v]||a["@@iterator"])?a:null))for(t=h.call(t),h=0;!(u=t.next()).done;)l=y+P(u=u.value,h++),p+=e(u,r,n,l,s);else if("object"===l){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,u,s);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,n,"","",function(e){return t.call(r,e,u++)}),n}function M(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function $(e){var t=x.T,r={};r.types=null!==t?t.types:null,x.T=r;try{var n=e(),o=x.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(w,L)}catch(e){L(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),x.T=t}}function D(e){var t=x.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else $(D.bind(null,e))}r.Activity=h,r.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!H(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=S,r.Fragment=u,r.Profiler=c,r.PureComponent=E,r.StrictMode=s,r.Suspense=p,r.ViewTransition=_,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},r.addTransitionType=D,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)R.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+2];n.children=u}return C(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:f,_context:e},e},r.createElement=function(e,t,r){var n,o={},i=null;if(null!=t)for(n in void 0!==t.key&&(i=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return C(e,i,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:l,render:e}},r.isValidElement=H,r.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},r.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},r.startTransition=$,r.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},r.use=function(e){return x.H.use(e)},r.useActionState=function(e,t,r){return x.H.useActionState(e,t,r)},r.useCallback=function(e,t){return x.H.useCallback(e,t)},r.useContext=function(e){return x.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return x.H.useEffect(e,t)},r.useEffectEvent=function(e){return x.H.useEffectEvent(e)},r.useId=function(){return x.H.useId()},r.useImperativeHandle=function(e,t,r){return x.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return x.H.useMemo(e,t)},r.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return x.H.useReducer(e,t,r)},r.useRef=function(e){return x.H.useRef(e)},r.useState=function(e){return x.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return x.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return x.H.useTransition()},r.version="19.3.0-canary-52684925-20251110"},27946,(e,t,r)=>{"use strict";t.exports=e.r(31318)},81258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},67708,(e,t,r)=>{"use strict";var n=e.r(27946);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=c.T,r=u.p;try{if(c.T=null,u.p=2,e)return e()}finally{c.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=f(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=f(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=f(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=f(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return c.H.useFormState(e,t,r)},r.useFormStatus=function(){return c.H.useHostTransitionStatus()},r.version="19.3.0-canary-52684925-20251110"},85885,(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(67708)},44066,(e,t,r)=>{"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}r._=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(o,u,s):o[u]=e[u]}return o.default=e,r&&r.set(e,o),o}},28833,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(81258)._(e.r(27946)).default.createContext({})},26623,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(59031),o=e.r(58119),i={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},u={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},s=function(e){let{error:t}=e,r=t?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:t}),(0,n.jsx)("div",{style:i,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:u,children:["Application error: a ",r?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",r?"server logs":"browser console"," for more information)."]}),r?(0,n.jsx)("p",{style:u,children:`Digest: ${r}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
|