igiveup 0.1.6 → 0.2.1
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/README.md +8 -8
- package/dist/404.html +1 -1
- package/dist/__next.__PAGE__.txt +2 -2
- package/dist/__next._full.txt +8 -8
- package/dist/__next._head.txt +1 -1
- package/dist/__next._index.txt +5 -5
- package/dist/__next._tree.txt +4 -4
- package/dist/_next/static/chunks/{6f8487ca24b97dbe.css → 17b3c9208dd99614.css} +1 -1
- package/dist/_next/static/chunks/{e26fcdfd9c1534c4.js → 33374872bd2362ea.js} +1 -1
- package/dist/_next/static/chunks/5cb49a5d8a198079.css +1 -0
- package/dist/_next/static/chunks/612821b5f5bed568.js +116 -0
- package/dist/_next/static/chunks/a1756d47f99fa37a.js +1 -0
- package/dist/_next/static/chunks/bc5a0c5b3d56d025.js +1 -0
- package/dist/_next/static/chunks/ce0de92310997bb7.js +392 -0
- package/dist/_next/static/media/00014e848e9c95b7.f42b37f6.woff2 +0 -0
- package/dist/_next/static/media/004f258d0f697418.cade8ee6.woff2 +0 -0
- package/dist/_next/static/media/0262ded5424bad8d.58a54714.woff2 +0 -0
- package/dist/_next/static/media/0481755b59c0d400.ddac76ef.woff2 +0 -0
- package/dist/_next/static/media/06be43540ab2bc8e.6ca5f696.woff2 +0 -0
- package/dist/_next/static/media/0924b4f9801903fa.041a6901.woff2 +0 -0
- package/dist/_next/static/media/0a907ae9cb0738dc.f95d1495.woff2 +0 -0
- package/dist/_next/static/media/0de0b9b70e0c5c75.b6da8d90.woff2 +0 -0
- package/dist/_next/static/media/0ebbd9c63ec5d991.e247eead.woff2 +0 -0
- package/dist/_next/static/media/10e5706cd96c5c09.d02d6924.woff2 +0 -0
- package/dist/_next/static/media/11e4380658480fc7.f519a7e4.woff2 +0 -0
- package/dist/_next/static/media/132c9044aec49244.17ab6dd1.woff2 +0 -0
- package/dist/_next/static/media/174346f0d0efda44.07dffa66.woff2 +0 -0
- package/dist/_next/static/media/1adbfbcd49a895b3.9ed2b922.woff2 +0 -0
- package/dist/_next/static/media/1ba5f184a07c212d.48a76e19.woff2 +0 -0
- package/dist/_next/static/media/1f2a0338c1b94ec5.109b89b9.woff2 +0 -0
- package/dist/_next/static/media/1f416efc35ef14e1.2a31277a.woff2 +0 -0
- package/dist/_next/static/media/1f5e72047766afb5.b2656231.woff2 +0 -0
- package/dist/_next/static/media/25aca0f82a861946.16102f1d.woff2 +0 -0
- package/dist/_next/static/media/29c1bd25fe068aca.63080cab.woff2 +0 -0
- package/dist/_next/static/media/2a95a63198c96fdb.0e1853c9.woff2 +0 -0
- package/dist/_next/static/media/32cc90dfa31e1e6d.e103a15c.woff2 +0 -0
- package/dist/_next/static/media/3b352ddd20b99253.913b5f47.woff2 +0 -0
- package/dist/_next/static/media/3b46bc029424e5c7.409820a3.woff2 +0 -0
- package/dist/_next/static/media/3e89a536a849f456.b5cf322f.woff2 +0 -0
- package/dist/_next/static/media/425302cee2d83426.1bf2f54e.woff2 +0 -0
- package/dist/_next/static/media/44713c84af92323f.e31a3e62.woff2 +0 -0
- package/dist/_next/static/media/487daf28e0ea8cee.bd1ffab3.woff2 +0 -0
- package/dist/_next/static/media/4a30c6d3c6b046b2.926986ee.woff2 +0 -0
- package/dist/_next/static/media/4c4374b4f4fdec9e.57f344df.woff2 +0 -0
- package/dist/_next/static/media/4d40391e737054ed.e5fc744d.woff2 +0 -0
- package/dist/_next/static/media/58a4dbc789192060.b5c04602.woff2 +0 -0
- package/dist/_next/static/media/597d03b254439578.74d98971.woff2 +0 -0
- package/dist/_next/static/media/5dabd6bccbaafa57.cef4272b.woff2 +0 -0
- package/dist/_next/static/media/5e2f6f0b802cfbdf.a57adbf6.woff2 +0 -0
- package/dist/_next/static/media/63825990b35916a6.751dc5d7.woff2 +0 -0
- package/dist/_next/static/media/667c2a78cf80937f.c6ea1cba.woff2 +0 -0
- package/dist/_next/static/media/67da0c40a8bdba86.5d1c7899.woff2 +0 -0
- package/dist/_next/static/media/68c88a4880acb7f7.40eb4993.woff2 +0 -0
- package/dist/_next/static/media/6902b7f764f8d0a2.85c8a8ed.woff2 +0 -0
- package/dist/_next/static/media/6b84c3d46053599f.affd031d.woff2 +0 -0
- package/dist/_next/static/media/6b867f4692cc1c24.4f3b2d9c.woff2 +0 -0
- package/dist/_next/static/media/6bc37c1816c36115.844d561a.woff2 +0 -0
- package/dist/_next/static/media/6c4747324ffb7ff6.1cb014fb.woff2 +0 -0
- package/dist/_next/static/media/6d925f981f4b97d5.276197e0.woff2 +0 -0
- package/dist/_next/static/media/6e784326faefd94f.088bd8fc.woff2 +0 -0
- package/dist/_next/static/media/6f063d2e3f5ed4b2.a31562b7.woff2 +0 -0
- package/dist/_next/static/media/737d13bbaa7a3560.2fd2028d.woff2 +0 -0
- package/dist/_next/static/media/75e1c015194f1074.e9a28740.woff2 +0 -0
- package/dist/_next/static/media/75e28cd10e93746b.bd6e922e.woff2 +0 -0
- package/dist/_next/static/media/768d2384cfda099c.cd784085.woff2 +0 -0
- package/dist/_next/static/media/77fbd8b27544ded4.0c34a45d.woff2 +0 -0
- package/dist/_next/static/media/7aef9075d757d3c6.6b7c3b6e.woff2 +0 -0
- package/dist/_next/static/media/7b6b92333187c5da.90807ad2.woff2 +0 -0
- package/dist/_next/static/media/7bbd1d6f5b5dbc91.9556dc78.woff2 +0 -0
- package/dist/_next/static/media/7dc2d1927a47186e.19db89c0.woff2 +0 -0
- package/dist/_next/static/media/801542a26b39d54e.0121f7bd.woff2 +0 -0
- package/dist/_next/static/media/835a033bc99a3004.6aacf924.woff2 +0 -0
- package/dist/_next/static/media/87624f4b68a7ae18.e88fbc71.woff2 +0 -0
- package/dist/_next/static/media/89ec3f0752821d2a.ed3b33b7.woff2 +0 -0
- package/dist/_next/static/media/8a8a45bc2be6e75f.833c007d.woff2 +0 -0
- package/dist/_next/static/media/8bb075a1b5cd2fb6.544554be.woff2 +0 -0
- package/dist/_next/static/media/8de34c732618a697.d94f00fd.woff2 +0 -0
- package/dist/_next/static/media/8dee343dfe44bd61.4d41e696.woff2 +0 -0
- package/dist/_next/static/media/946daa5a3a89cfc5.17364242.woff2 +0 -0
- package/dist/_next/static/media/97f69eeaf40202c0.f6869823.woff2 +0 -0
- package/dist/_next/static/media/99c899fe62b2196e.e3ebdffa.woff2 +0 -0
- package/dist/_next/static/media/9c1659cbf1d78c40.0ef05cc1.woff2 +0 -0
- package/dist/_next/static/media/a2d7248a844b869a.39f4f2c6.woff2 +0 -0
- package/dist/_next/static/media/a88ca424fba28a50.874522e0.woff2 +0 -0
- package/dist/_next/static/media/a95445f9f9529239.9f056b19.woff2 +0 -0
- package/dist/_next/static/media/a99d8aa8d1d5d84a.b65e65dc.woff2 +0 -0
- package/dist/_next/static/media/adc4c24d849b7d22.d3953f80.woff2 +0 -0
- package/dist/_next/static/media/b2925ad35584ba70.66eb3c1f.woff2 +0 -0
- package/dist/_next/static/media/b5c5a3aee3d68f14.3ceb7434.woff2 +0 -0
- package/dist/_next/static/media/b5dccbeb735a2e0f.04abea07.woff2 +0 -0
- package/dist/_next/static/media/b775ae14120f0c97.61b47bff.woff2 +0 -0
- package/dist/_next/static/media/b95174f56d442c5d.160bbf8b.woff2 +0 -0
- package/dist/_next/static/media/c0aacfec2f1573c0.deaae336.woff2 +0 -0
- package/dist/_next/static/media/c4b0b4dcf0f22c7a.2b901488.woff2 +0 -0
- package/dist/_next/static/media/c4e4a6761a279a26.93f82d40.woff2 +0 -0
- package/dist/_next/static/media/c8065fd4f164b3a5.2ba77824.woff2 +0 -0
- package/dist/_next/static/media/cd0ac912c441b9b4.dca3ab23.woff2 +0 -0
- package/dist/_next/static/media/d03debd6cf4b3362.df99ad6d.woff2 +0 -0
- package/dist/_next/static/media/d3f4c737e8dc0be9.4dbf5ec9.woff2 +0 -0
- package/dist/_next/static/media/d95fa6e3c5a4cdd3.97253ba7.woff2 +0 -0
- package/dist/_next/static/media/e3a5d23087736f5c.028e1f60.woff2 +0 -0
- package/dist/_next/static/media/e3ef056ddd3a2ac5.9303a83d.woff2 +0 -0
- package/dist/_next/static/media/e7faabac039536c0.b45e62c7.woff2 +0 -0
- package/dist/_next/static/media/e87c8e66644fea0e.77c8264e.woff2 +0 -0
- package/dist/_next/static/media/e9242943403695a8.967504b3.woff2 +0 -0
- package/dist/_next/static/media/f15b8acd20219e15.f07cc357.woff2 +0 -0
- package/dist/_next/static/media/f4214a50e6a13e82.615c85c9.woff2 +0 -0
- package/dist/_next/static/media/f4321b0b4a0dbceb.caed4b71.woff2 +0 -0
- package/dist/_next/static/media/f65cb101f1fc3fec.4144168e.woff2 +0 -0
- package/dist/_next/static/media/f7ef87dd76e798bf.46640ba3.woff2 +0 -0
- package/dist/_next/static/media/f8536e6dafe9eb48.f70b1da7.woff2 +0 -0
- package/dist/_next/static/media/f8a93f6b396da90f.eb4b3ded.woff2 +0 -0
- package/dist/_next/static/media/fa1c512a13c0dddb.8280c9f5.woff2 +0 -0
- package/dist/_next/static/media/fab1392add46a006.4ea484e2.woff2 +0 -0
- package/dist/_next/static/media/fb4edce8a3cbfef3.p.179b8591.woff2 +0 -0
- package/dist/_next/static/media/fc82e7e9b0e3e420.843b3f4c.woff2 +0 -0
- package/dist/_next/static/media/fd4c56e2e3df4865.54ac9199.woff2 +0 -0
- package/dist/_next/static/media/ff968943fd53ca5d.eb4537e5.woff2 +0 -0
- package/dist/_next/static/media/ffec6e4bb7681106.2843d290.woff2 +0 -0
- package/dist/_not-found/__next._full.txt +6 -6
- package/dist/_not-found/__next._head.txt +1 -1
- package/dist/_not-found/__next._index.txt +5 -5
- package/dist/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/_not-found/__next._not-found.txt +1 -1
- package/dist/_not-found/__next._tree.txt +3 -3
- package/dist/_not-found.html +1 -1
- package/dist/_not-found.txt +6 -6
- package/dist/index.html +1 -1
- package/dist/index.txt +8 -8
- package/dist/sitemap.xml +1 -1
- package/package.json +17 -24
- package/dist/_next/static/chunks/04bbf605c3700867.js +0 -1
- package/dist/_next/static/chunks/1cef3016144862be.js +0 -376
- package/dist/_next/static/chunks/1efc01f481163e91.js +0 -119
- package/dist/_next/static/chunks/30354d30990146bb.js +0 -1
- package/dist/_next/static/chunks/469a4c9638da951a.css +0 -1
- package/dist/_next/static/media/00014e848e9c95b7.d3603743.woff2 +0 -0
- package/dist/_next/static/media/004f258d0f697418.f344da23.woff2 +0 -0
- package/dist/_next/static/media/0262ded5424bad8d.3234df93.woff2 +0 -0
- package/dist/_next/static/media/0481755b59c0d400.5359174b.woff2 +0 -0
- package/dist/_next/static/media/06be43540ab2bc8e.afd4e7b5.woff2 +0 -0
- package/dist/_next/static/media/0924b4f9801903fa.e4ec60ec.woff2 +0 -0
- package/dist/_next/static/media/0a907ae9cb0738dc.2ade8a59.woff2 +0 -0
- package/dist/_next/static/media/0de0b9b70e0c5c75.9455e08f.woff2 +0 -0
- package/dist/_next/static/media/0ebbd9c63ec5d991.81c2963d.woff2 +0 -0
- package/dist/_next/static/media/10e5706cd96c5c09.8aca4ca4.woff2 +0 -0
- package/dist/_next/static/media/11e4380658480fc7.5ae240d7.woff2 +0 -0
- package/dist/_next/static/media/132c9044aec49244.0e791b05.woff2 +0 -0
- package/dist/_next/static/media/174346f0d0efda44.35ed1557.woff2 +0 -0
- package/dist/_next/static/media/1adbfbcd49a895b3.479c81e3.woff2 +0 -0
- package/dist/_next/static/media/1ba5f184a07c212d.ae1f3a4e.woff2 +0 -0
- package/dist/_next/static/media/1f2a0338c1b94ec5.24996119.woff2 +0 -0
- package/dist/_next/static/media/1f416efc35ef14e1.47c7917f.woff2 +0 -0
- package/dist/_next/static/media/1f5e72047766afb5.d7e6fac7.woff2 +0 -0
- package/dist/_next/static/media/25aca0f82a861946.9c51b364.woff2 +0 -0
- package/dist/_next/static/media/29c1bd25fe068aca.c00bd2bd.woff2 +0 -0
- package/dist/_next/static/media/2a95a63198c96fdb.9acda241.woff2 +0 -0
- package/dist/_next/static/media/32cc90dfa31e1e6d.a74664c0.woff2 +0 -0
- package/dist/_next/static/media/3b352ddd20b99253.5bff2508.woff2 +0 -0
- package/dist/_next/static/media/3b46bc029424e5c7.bd4d34bf.woff2 +0 -0
- package/dist/_next/static/media/3e89a536a849f456.9e1be6d2.woff2 +0 -0
- package/dist/_next/static/media/425302cee2d83426.d1d73ee4.woff2 +0 -0
- package/dist/_next/static/media/44713c84af92323f.145e6359.woff2 +0 -0
- package/dist/_next/static/media/487daf28e0ea8cee.27080888.woff2 +0 -0
- package/dist/_next/static/media/4a30c6d3c6b046b2.ead271e0.woff2 +0 -0
- package/dist/_next/static/media/4c4374b4f4fdec9e.218a137f.woff2 +0 -0
- package/dist/_next/static/media/4d40391e737054ed.9d94255a.woff2 +0 -0
- package/dist/_next/static/media/58a4dbc789192060.31c8ae1a.woff2 +0 -0
- package/dist/_next/static/media/597d03b254439578.1323d452.woff2 +0 -0
- package/dist/_next/static/media/5dabd6bccbaafa57.5aedae46.woff2 +0 -0
- package/dist/_next/static/media/5e2f6f0b802cfbdf.f4440eb7.woff2 +0 -0
- package/dist/_next/static/media/63825990b35916a6.c2325c77.woff2 +0 -0
- package/dist/_next/static/media/667c2a78cf80937f.7377bb29.woff2 +0 -0
- package/dist/_next/static/media/67da0c40a8bdba86.80df1f2f.woff2 +0 -0
- package/dist/_next/static/media/68c88a4880acb7f7.4a6bbe64.woff2 +0 -0
- package/dist/_next/static/media/6902b7f764f8d0a2.b78a77c2.woff2 +0 -0
- package/dist/_next/static/media/6b84c3d46053599f.fc503e19.woff2 +0 -0
- package/dist/_next/static/media/6b867f4692cc1c24.ec928ed3.woff2 +0 -0
- package/dist/_next/static/media/6bc37c1816c36115.54868a7c.woff2 +0 -0
- package/dist/_next/static/media/6c4747324ffb7ff6.a687e43f.woff2 +0 -0
- package/dist/_next/static/media/6d925f981f4b97d5.ad8174fa.woff2 +0 -0
- package/dist/_next/static/media/6e784326faefd94f.57b35f54.woff2 +0 -0
- package/dist/_next/static/media/6f063d2e3f5ed4b2.77058057.woff2 +0 -0
- package/dist/_next/static/media/737d13bbaa7a3560.b1f2cb20.woff2 +0 -0
- package/dist/_next/static/media/75e1c015194f1074.9a830731.woff2 +0 -0
- package/dist/_next/static/media/75e28cd10e93746b.b8c31981.woff2 +0 -0
- package/dist/_next/static/media/768d2384cfda099c.32e7e5e6.woff2 +0 -0
- package/dist/_next/static/media/77fbd8b27544ded4.ef83a7fe.woff2 +0 -0
- package/dist/_next/static/media/7aef9075d757d3c6.33f9c009.woff2 +0 -0
- package/dist/_next/static/media/7b6b92333187c5da.7c3d2a56.woff2 +0 -0
- package/dist/_next/static/media/7bbd1d6f5b5dbc91.4a8fe726.woff2 +0 -0
- package/dist/_next/static/media/7dc2d1927a47186e.85db3769.woff2 +0 -0
- package/dist/_next/static/media/801542a26b39d54e.6d23e25a.woff2 +0 -0
- package/dist/_next/static/media/835a033bc99a3004.530e1c0e.woff2 +0 -0
- package/dist/_next/static/media/87624f4b68a7ae18.8219b4bf.woff2 +0 -0
- package/dist/_next/static/media/89ec3f0752821d2a.5b472127.woff2 +0 -0
- package/dist/_next/static/media/8a8a45bc2be6e75f.ab5dd8b6.woff2 +0 -0
- package/dist/_next/static/media/8bb075a1b5cd2fb6.fae87df3.woff2 +0 -0
- package/dist/_next/static/media/8de34c732618a697.2c9fb109.woff2 +0 -0
- package/dist/_next/static/media/8dee343dfe44bd61.d7ab8266.woff2 +0 -0
- package/dist/_next/static/media/946daa5a3a89cfc5.93af40d3.woff2 +0 -0
- package/dist/_next/static/media/97f69eeaf40202c0.08e25883.woff2 +0 -0
- package/dist/_next/static/media/99c899fe62b2196e.aa168c88.woff2 +0 -0
- package/dist/_next/static/media/9c1659cbf1d78c40.3c005ee7.woff2 +0 -0
- package/dist/_next/static/media/a2d7248a844b869a.2fe99030.woff2 +0 -0
- package/dist/_next/static/media/a88ca424fba28a50.8f914b75.woff2 +0 -0
- package/dist/_next/static/media/a95445f9f9529239.0241ea71.woff2 +0 -0
- package/dist/_next/static/media/a99d8aa8d1d5d84a.c4f904fe.woff2 +0 -0
- package/dist/_next/static/media/adc4c24d849b7d22.6a6a4da8.woff2 +0 -0
- package/dist/_next/static/media/b2925ad35584ba70.518eab91.woff2 +0 -0
- package/dist/_next/static/media/b5c5a3aee3d68f14.e9880d5c.woff2 +0 -0
- package/dist/_next/static/media/b5dccbeb735a2e0f.14defd14.woff2 +0 -0
- package/dist/_next/static/media/b775ae14120f0c97.4abb72ee.woff2 +0 -0
- package/dist/_next/static/media/b95174f56d442c5d.4812a252.woff2 +0 -0
- package/dist/_next/static/media/c0aacfec2f1573c0.f492f708.woff2 +0 -0
- package/dist/_next/static/media/c4b0b4dcf0f22c7a.0cfafb9c.woff2 +0 -0
- package/dist/_next/static/media/c4e4a6761a279a26.cde1c1b1.woff2 +0 -0
- package/dist/_next/static/media/c8065fd4f164b3a5.bb74a635.woff2 +0 -0
- package/dist/_next/static/media/cd0ac912c441b9b4.959b6030.woff2 +0 -0
- package/dist/_next/static/media/d03debd6cf4b3362.5c0c5927.woff2 +0 -0
- package/dist/_next/static/media/d3f4c737e8dc0be9.12c160ef.woff2 +0 -0
- package/dist/_next/static/media/d95fa6e3c5a4cdd3.7ddf94b3.woff2 +0 -0
- package/dist/_next/static/media/e3a5d23087736f5c.9ad16c03.woff2 +0 -0
- package/dist/_next/static/media/e3ef056ddd3a2ac5.1552ef47.woff2 +0 -0
- package/dist/_next/static/media/e7faabac039536c0.8e35a3a3.woff2 +0 -0
- package/dist/_next/static/media/e87c8e66644fea0e.df5d4a03.woff2 +0 -0
- package/dist/_next/static/media/e9242943403695a8.1b7a452f.woff2 +0 -0
- package/dist/_next/static/media/f15b8acd20219e15.8c281e97.woff2 +0 -0
- package/dist/_next/static/media/f4214a50e6a13e82.a6a48d6d.woff2 +0 -0
- package/dist/_next/static/media/f4321b0b4a0dbceb.6e9655ce.woff2 +0 -0
- package/dist/_next/static/media/f65cb101f1fc3fec.5a396dcb.woff2 +0 -0
- package/dist/_next/static/media/f7ef87dd76e798bf.79cb5561.woff2 +0 -0
- package/dist/_next/static/media/f8536e6dafe9eb48.c050e0ac.woff2 +0 -0
- package/dist/_next/static/media/f8a93f6b396da90f.6a44a4b6.woff2 +0 -0
- package/dist/_next/static/media/fa1c512a13c0dddb.9f3531ba.woff2 +0 -0
- package/dist/_next/static/media/fab1392add46a006.7eb29fd5.woff2 +0 -0
- package/dist/_next/static/media/fb4edce8a3cbfef3.p.fe3c897b.woff2 +0 -0
- package/dist/_next/static/media/fc82e7e9b0e3e420.8c166144.woff2 +0 -0
- package/dist/_next/static/media/fd4c56e2e3df4865.05650364.woff2 +0 -0
- package/dist/_next/static/media/ff968943fd53ca5d.d4c93737.woff2 +0 -0
- package/dist/_next/static/media/ffec6e4bb7681106.a24cdcb3.woff2 +0 -0
- /package/dist/_next/static/{JWenEG9mAVBaGVUjBEBPo → XRfNVsChHKwWfuWKgVt-l}/_buildManifest.js +0 -0
- /package/dist/_next/static/{JWenEG9mAVBaGVUjBEBPo → XRfNVsChHKwWfuWKgVt-l}/_clientMiddlewareManifest.json +0 -0
- /package/dist/_next/static/{JWenEG9mAVBaGVUjBEBPo → XRfNVsChHKwWfuWKgVt-l}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24207,(e,t,r)=>{"use strict";function s(e){let{widthInt:t,heightInt:r,blurWidth:s,blurHeight:a,blurDataURL:l,objectFit:i}=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"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${l}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},2965,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return l},imageConfigDefault:function(){return i}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let l=["default","imgix","cloudinary","akamai","custom"],i={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}},1852,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return d}}),e.r(43946);let s=e.r(40824),a=e.r(24207),l=e.r(2965),i=["-moz-initial","fill","none","scale-down",void 0];function n(e){return void 0!==e.default}function o(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 d(e,t){var r;let d,c,u,{src:x,sizes:m,unoptimized:h=!1,priority:p=!1,preload:g=!1,loading:b,className:f,quality:j,width:v,height:y,fill:w=!1,style:N,overrideSrc:k,onLoad:_,onLoadingComplete:E,placeholder:C="empty",blurDataURL:S,fetchPriority:T,decoding:L="async",layout:P,objectFit:R,objectPosition:I,lazyBoundary:$,lazyRoot:O,...M}=e,{imgConf:A,showAltText:D,blurComplete:z,defaultLoader:U}=t,B=A||l.imageConfigDefault;if("allSizes"in B)d=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),r=B.qualities?.sort((e,t)=>e-t);d={...B,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===U)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 W=M.loader||U;delete M.loader,delete M.srcSet;let F="__next_img_default"in W;if(F){if("custom"===d.loader)throw Object.defineProperty(Error(`Image with src "${x}" 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=W;W=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&&(N={...N,...e});let t={responsive:"100vw",fill:"100vw"}[P];t&&!m&&(m=t)}let K="",G=o(v),H=o(y);if((r=x)&&"object"==typeof r&&(n(r)||void 0!==r.src)){let e=n(x)?x.default:x;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(c=e.blurWidth,u=e.blurHeight,S=S||e.blurDataURL,K=e.src,!w)if(G||H){if(G&&!H){let t=G/e.width;H=Math.round(e.height*t)}else if(!G&&H){let t=H/e.height;G=Math.round(e.width*t)}}else G=e.width,H=e.height}let Y=!p&&!g&&("lazy"===b||void 0===b);(!(x="string"==typeof x?x:K)||x.startsWith("data:")||x.startsWith("blob:"))&&(h=!0,Y=!1),d.unoptimized&&(h=!0),F&&!d.dangerouslyAllowSVG&&x.split("?",1)[0].endsWith(".svg")&&(h=!0);let V=o(j),q=Object.assign(w?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:R,objectPosition:I}:{},D?{}:{color:"transparent"},N),Z=z||"empty"===C?null:"blur"===C?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:G,heightInt:H,blurWidth:c,blurHeight:u,blurDataURL:S||"",objectFit:q.objectFit})}")`:`url("${C}")`,X=i.includes(q.objectFit)?"fill"===q.objectFit?"100% 100%":"cover":q.objectFit,J=Z?{backgroundSize:X,backgroundPosition:q.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Z}:{},Q=function(e){let{config:t,src:r,unoptimized:a,width:l,quality:i,sizes:n,loader:o}=e;if(a){let e=(0,s.getDeploymentId)();if(r.startsWith("/")&&!r.startsWith("//")&&e){let t=r.includes("?")?"&":"?";r=`${r}${t}dpl=${e}`}return{src:r,srcSet:void 0,sizes:void 0}}let{widths:d,kind:c}=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,l,n),u=d.length-1;return{sizes:n||"w"!==c?n:"100vw",srcSet:d.map((e,s)=>`${o({config:t,src:r,quality:i,width:e})} ${"w"===c?e:s+1}${c}`).join(", "),src:o({config:t,src:r,quality:i,width:d[u]})}}({config:d,src:x,unoptimized:h,width:G,quality:V,sizes:m,loader:W}),ee=Y?"lazy":b;return{props:{...M,loading:ee,fetchPriority:T,width:G,height:H,decoding:L,className:f,style:{...q,...J},sizes:Q.sizes,srcSet:Q.srcSet,src:k||Q.src},meta:{unoptimized:h,preload:g||p,placeholder:C,fill:w}}}},31324,(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(778),a="undefined"==typeof window,l=a?()=>{}:s.useLayoutEffect,i=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()),l(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),l(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),i(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},93529,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return p},defaultHead:function(){return u}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let l=e.r(81258),i=e.r(44066),n=e.r(80506),o=i._(e.r(778)),d=l._(e.r(31324)),c=e.r(37e3);function u(){return[(0,n.jsx)("meta",{charSet:"utf-8"},"charset"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function x(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(43946);let m=["name","httpEquiv","charSet","itemProp"];function h(e){let t,r,s,a;return e.reduce(x,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let l=!0,i=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){i=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?l=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?l=!1:r.add(e.type);break;case"meta":for(let t=0,r=m.length;t<r;t++){let r=m[t];if(e.props.hasOwnProperty(r))if("charSet"===r)s.has(r)?l=!1:s.add(r);else{let t=e.props[r],s=a[r]||new Set;("name"!==r||!i)&&s.has(t)?l=!1:(s.add(t),a[r]=s)}}}return l})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let p=function(e){let{children:t}=e,r=(0,o.useContext)(c.HeadManagerContext);return(0,n.jsx)(d.default,{reduceComponentsToState:h,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)},71807,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return l}});let s=e.r(81258)._(e.r(778)),a=e.r(2965),l=s.default.createContext(a.imageConfigDefault)},94220,(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(778)).default.createContext(null)},51836,(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}})},5656,(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(51836),a=e.r(40824);function l(e){let{config:t,src:r,width:l,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 n=(0,s.findClosestQuality)(i,t),o=(0,a.getDeploymentId)();return`${t.path}?url=${encodeURIComponent(r)}&w=${l}&q=${n}${r.startsWith("/")&&o?`&dpl=${o}`:""}`}l.__next_img_default=!0;let i=l},4357,(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(778);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=l(e,s)),t&&(a.current=l(t,s))},[e,t])}function l(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)},72039,(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),l=e.r(80506),i=a._(e.r(778)),n=s._(e.r(50919)),o=s._(e.r(93529)),d=e.r(1852),c=e.r(2965),u=e.r(71807);e.r(43946);let x=e.r(94220),m=s._(e.r(5656)),h=e.r(4357),p={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,l,i){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 b(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let f=(0,i.forwardRef)((e,t)=>{let{src:r,srcSet:s,sizes:a,height:n,width:o,decoding:d,className:c,style:u,fetchPriority:x,placeholder:m,loading:p,unoptimized:f,fill:j,onLoadRef:v,onLoadingCompleteRef:y,setBlurComplete:w,setShowAltText:N,sizesInput:k,onLoad:_,onError:E,...C}=e,S=(0,i.useCallback)(e=>{e&&(E&&(e.src=e.src),e.complete&&g(e,m,v,y,w,f,k))},[r,m,v,y,w,E,f,k]),T=(0,h.useMergedRef)(t,S);return(0,l.jsx)("img",{...C,...b(x),loading:p,width:o,height:n,decoding:d,"data-nimg":j?"fill":"1",className:c,style:u,sizes:a,srcSet:s,src:r,ref:T,onLoad:e=>{g(e.currentTarget,m,v,y,w,f,k)},onError:e=>{N(!0),"empty"!==m&&w(!0),E&&E(e)}})});function j(e){let{isAppRouter:t,imgAttributes:r}=e,s={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...b(r.fetchPriority)};return t&&n.default.preload?(n.default.preload(r.src,s),null):(0,l.jsx)(o.default,{children:(0,l.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...s},"__nimg-"+r.src+r.srcSet+r.sizes)})}let v=(0,i.forwardRef)((e,t)=>{let r=(0,i.useContext)(x.RouterContext),s=(0,i.useContext)(u.ImageConfigContext),a=(0,i.useMemo)(()=>{let e=p||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,h=(0,i.useRef)(n);(0,i.useEffect)(()=>{h.current=n},[n]);let g=(0,i.useRef)(o);(0,i.useEffect)(()=>{g.current=o},[o]);let[b,v]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1),{props:N,meta:k}=(0,d.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:b,showAltText:y});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f,{...N,unoptimized:k.unoptimized,placeholder:k.placeholder,fill:k.fill,onLoadRef:h,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:w,sizesInput:e.sizes,ref:t}),k.preload?(0,l.jsx)(j,{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)},58956,(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 l=e.r(81258),i=e.r(1852),n=e.r(72039),o=l._(e.r(5656));function d(e){let{props:t}=(0,i.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},59325,(e,t,r)=>{t.exports=e.r(58956)},31713,e=>{"use strict";var t,r=e.i(80506),s=e.i(778);e.i(27171);let a=["image/png","image/jpeg","image/webp","image/gif","image/heic","image/heif"];async function l(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 l=new Image;l.onload=()=>{try{let e=document.createElement("canvas");e.width=l.naturalWidth,e.height=l.naturalHeight;let i=e.getContext("2d");if(!i)return void a(Error("Failed to get canvas context"));i.drawImage(l,0,0);let n=e.toDataURL(t,r);s(n)}catch(e){a(e)}},l.onerror=()=>{a(Error("Failed to load image for conversion"))},l.src=e})}async function i(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`),l(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){if(!e.startsWith("data:"))return void window.open(e,"_blank");try{let t=n(e);if(!t)return void console.error("Failed to parse image format");let r=atob(t.data),s=new Uint8Array(r.length);for(let e=0;e<r.length;e++)s[e]=r.charCodeAt(e);let a=new Blob([s],{type:t.mimeType}),l=URL.createObjectURL(a);window.open(l,"_blank"),setTimeout(()=>URL.revokeObjectURL(l),6e4)}catch(e){console.error("Failed to open image:",e)}}let d={zh:{cannotReadImage:"無法讀取圖片",staticModeApiKeyRequired:"靜態版本需要提供 API 金鑰"},en:{cannotReadImage:"Cannot read image",staticModeApiKeyRequired:"Static mode requires API key"}};function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";return d[t][e]}let u=async e=>new Promise((t,r)=>{let s=new FileReader;s.onloadend=async()=>{try{let e=s.result,r=await i(e);t(r)}catch(e){r(e)}},s.onerror=r,s.readAsDataURL(e)}),x=null;async function m(){x||(x=await e.A(28292))}let h=async()=>!1,p=async(e,t,r,s,a,l)=>{let i=n(await u(e));if(!i)throw Error(c("cannotReadImage",l));if(await m(),!a)throw Error(c("staticModeApiKeyRequired",l));return x.analyzeProductImageClient({imageBase64:i.data,imageMimeType:i.mimeType,productName:t,productInfo:r,productUrl:s,apiKey:a,locale:l})},g=async(e,t,r,s,a,l)=>{if(await m(),!a)throw Error(c("staticModeApiKeyRequired",l));return x.generateContentPlanClient({route:e,analysis:t,referenceCopy:r,selectedSizes:s,apiKey:a,locale:l})},b=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,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"2k",i=arguments.length>6?arguments[6]:void 0;if(await m(),!t)throw Error(c("staticModeApiKeyRequired",i));return x.generateMarketingImageClient({prompt:e,referenceImageBase64:r,aspectRatio:s,secondaryImageBase64:a,resolution:l,apiKey:t})},f=async(e,t,r,s,a,l,i)=>{if(await m(),!a)throw Error(c("staticModeApiKeyRequired",i));return x.regenerateVisualPromptClient({title:e,copy:t,ratio:r,sizeLabel:s,visualSummary:l,apiKey:a})},j=async function(e,t,r,s){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"1:1",l=arguments.length>5?arguments[5]:void 0,i=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,u=arguments.length>10?arguments[10]:void 0,h=arguments.length>11?arguments[11]:void 0,p=arguments.length>12&&void 0!==arguments[12]?arguments[12]:"4k",g=arguments.length>13?arguments[13]:void 0;if(await m(),!s)throw Error(c("staticModeApiKeyRequired",g));return x.generateImageFromReferenceClient({productImageBase64:e,referenceImageBase64:t,similarity:r,aspectRatio:a,brandLogoBase64:l,titleText:i,copyText:n,showText:o,titleWeight:d,copyWeight:u,secondaryProductBase64:h,resolution:p,apiKey:s})};var v=((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 w=e=>{let{analysis:t,imageSrc:s}=e,{t:a}=(0,y.useLocale)(),l=t.key_features.split(/[,,、\n]+/).map(e=>e.trim()).filter(e=>e.length>0);return(0,r.jsx)("div",{className:"mb-10 sm:mb-14 animate-fade-in-up",children:(0,r.jsxs)("div",{className:"relative overflow-hidden rounded-2xl sm:rounded-3xl",children:[(0,r.jsxs)("div",{className:"absolute inset-0",children:[(0,r.jsx)("img",{src:s,alt:"",className:"w-full h-full object-cover scale-110 blur-2xl opacity-20","aria-hidden":"true"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-black/80 via-black/60 to-black/40"})]}),(0,r.jsxs)("div",{className:"relative flex flex-col md:flex-row items-center gap-8 lg:gap-12 p-6 sm:p-8 lg:p-12",children:[(0,r.jsx)("div",{className:"w-full md:w-2/5 shrink-0",children:(0,r.jsx)("div",{className:"aspect-square rounded-2xl overflow-hidden bg-black/30 shadow-2xl shadow-black/50 border border-white/10 max-w-[320px] mx-auto",children:(0,r.jsx)("img",{src:s,alt:t.name,className:"w-full h-full object-contain p-4"})})}),(0,r.jsxs)("div",{className:"w-full text-center md:text-left",children:[(0,r.jsx)("div",{className:"inline-block text-[10px] font-bold uppercase tracking-[0.2em] text-blue-400 bg-blue-500/10 px-3 py-1 rounded-full mb-4 border border-blue-500/20",children:a("productCard.analysisReport")}),(0,r.jsx)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-4 leading-tight tracking-tight",children:t.name}),(0,r.jsx)("p",{className:"text-gray-400 text-sm sm:text-base leading-relaxed mb-8 max-w-lg",children:t.visual_description}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-[0.15em] mb-3",children:a("productCard.keyFeatures")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2 justify-center md:justify-start",children:l.length>1?l.map((e,t)=>(0,r.jsx)("span",{className:"pill-tag",children:e},t)):(0,r.jsx)("p",{className:"text-gray-300 leading-relaxed text-sm",children:t.key_features})})]})]})]})]})})},N=e=>{let{isOpen:t,onClose:s}=e,{t:a,locale:l,messages:i}=(0,y.useLocale)();if(!t)return null;let n=i.guideV2;if(!n?.step1?.title||!n?.step2?.title)return console.error("Missing guideV2 data in locale messages"),null;let o="zh"===l?":":": ";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 animate-overlay-in",onClick:s}),(0,r.jsxs)("div",{className:"relative glass-panel rounded-2xl max-w-3xl w-full max-h-[90vh] overflow-y-auto shadow-2xl shadow-blue-900/20 animate-modal-in",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-gradient-to-br from-blue-500/30 to-blue-500/10 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-500/30",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step1.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:n.step1.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:n.step1.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),o,e.desc]},t))}),(0,r.jsx)("p",{className:"text-gray-500 text-xs mt-3",children:n.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-gradient-to-br from-blue-500/30 to-blue-500/10 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-500/30",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step2.title}),(0,r.jsxs)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:[n.step2.desc," ",(0,r.jsx)("strong",{className:"text-white",children:n.step2.descHighlight}),n.step2.descSuffix]}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1 mb-3",children:n.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:n.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-gradient-to-br from-blue-500/30 to-blue-500/10 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-500/30",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step3.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:n.step3.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1 mb-3",children:n.step3.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),o,e.desc]},t))}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed",children:n.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-gradient-to-br from-blue-500/30 to-blue-500/10 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-500/30",children:"4"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step4.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:n.step4.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:n.step4.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),o,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-gradient-to-br from-blue-500/30 to-blue-500/10 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-500/30",children:"5"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step5.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:n.step5.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:n.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-gradient-to-br from-blue-500/30 to-blue-500/10 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-500/30",children:"6"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step6.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:n.step6.desc}),(0,r.jsx)("div",{className:"space-y-3",children:n.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))})]})]})]})]})]})]})},k=(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}},_=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"}},E=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"})]})});E.displayName="Spinner";let C=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"}},S=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]"}},T=s.default.memo(e=>{let{contentSet:t,onChange:a,onRegeneratePrompt:l,isRegenerating:i,t:n,locale:o}=e,d="en"===o?[{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:"使用構圖摘要描述"}],[c,u]=(0,s.useState)(!1);return(0,r.jsxs)("div",{className:"glass-panel rounded-xl p-5 sm:p-6 lg:p-8",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 ${C(t.ratio)}`,children:[n("contentSuite.plan")," ",t.set_number]})}),(0,r.jsx)("button",{onClick:()=>l(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:n("contentSuite.regeneratePrompt"),children:i?(0,r.jsx)(E,{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-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label",children:n("contentSuite.titleLabel")}),(0,r.jsx)("textarea",{value:t.title,onChange:e=>a(t.id,"title",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500 focus:outline-none resize-none h-20 sm:h-24"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label",children:n("contentSuite.copyLabel")}),(0,r.jsx)("textarea",{value:t.copy,onChange:e=>a(t.id,"copy",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500 focus:outline-none resize-none h-24 sm:h-28"})]}),"1:1-commercial"===t.ratio&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-amber-400 mb-1",children:n("contentSuite.arrangement")}),(0,r.jsx)("div",{className:"grid grid-cols-5 gap-1",children:d.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>a(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:"field-label",children:n("contentSuite.visualSummary")}),(0,r.jsx)("textarea",{value:t.visual_summary,onChange:e=>a(t.id,"visual_summary",e.target.value),placeholder:"1:1-commercial"===t.ratio?k(t.arrangement_style||"single",o):n("contentSuite.visualSummaryPlaceholder"),className:`w-full bg-black/30 border rounded-lg px-3 py-2 text-xs focus:outline-none resize-none h-24 sm:h-28 ${"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.jsxs)("button",{onClick:()=>u(!c),className:"flex items-center gap-2 w-full text-left mb-1 group/prompt",children:[(0,r.jsx)("label",{className:"text-xs font-semibold tracking-wide text-gray-400 cursor-pointer",children:n("contentSuite.visualPrompt")}),(0,r.jsx)("svg",{className:`w-3.5 h-3.5 text-gray-500 transition-transform duration-200 ${c?"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"})})]}),c?(0,r.jsx)("textarea",{value:t.visual_prompt_en,onChange:e=>a(t.id,"visual_prompt_en",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-[10px] text-gray-300 focus:border-blue-500 focus:outline-none font-mono resize-none h-36 sm:h-44 animate-in fade-in slide-in-from-top-2 duration-200"}):(0,r.jsx)("div",{onClick:()=>u(!0),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-[10px] text-gray-500 font-mono line-clamp-2 h-12 cursor-pointer hover:border-white/20 transition-colors",children:t.visual_prompt_en||"..."})]})]})]})});T.displayName="ScriptEditorRow";let L=e=>{let{isOpen:t,onClose:a,sourceImage:l,sourceRatio:i,productImage:n,brandLogo:d,secondaryProduct:c,marketingRoute:u,contentTitle:x,contentCopy:m,apiKey:h,t:p}=e,g=[{ratio:"1:1",label:p("extend.sizeLabels.fb"),description:p("extend.sizeDescriptions.square")},{ratio:"9:16",label:p("extend.sizeLabels.story"),description:p("extend.sizeDescriptions.vertical")},{ratio:"4:5",label:p("extend.sizeLabels.ig"),description:p("extend.sizeDescriptions.portrait")},{ratio:"16:9",label:p("extend.sizeLabels.landscape"),description:p("extend.sizeDescriptions.horizontal")},{ratio:"1:1-commercial",label:p("extend.sizeLabels.commercial"),description:p("extend.sizeDescriptions.commercial")}],b=g.filter(e=>e.ratio!==i),[f,v]=(0,s.useState)([]),[y,w]=(0,s.useState)([]),[N,k]=(0,s.useState)(()=>{let e,t;return e=u.route_name.replace(/\s/g,""),t=[`#${e}`,p("extend.hashtags.newProduct"),p("extend.hashtags.recommended"),p("extend.hashtags.mustBuy"),p("extend.hashtags.quality")],[{platform:p("extend.socialTemplates.instagram"),title:u.headline,content:`${u.headline}
|
|
4
|
+
|
|
5
|
+
${m}
|
|
6
|
+
|
|
7
|
+
───
|
|
8
|
+
|
|
9
|
+
${u.subhead}
|
|
10
|
+
|
|
11
|
+
${u.style_brief?`${p("extendTemplates.styleLabel")}${u.style_brief}
|
|
12
|
+
`:""}${u.target_audience?`${p("extendTemplates.suitableFor")}${u.target_audience}
|
|
13
|
+
`:""}
|
|
14
|
+
${p("extendTemplates.clickToLearnMore")}
|
|
15
|
+
${p("extendTemplates.dmForDiscount")}
|
|
16
|
+
|
|
17
|
+
${t.join(" ")}`,hashtags:t},{platform:p("extend.socialTemplates.facebook"),title:u.headline,content:`【${x}】
|
|
18
|
+
${u.headline}
|
|
19
|
+
|
|
20
|
+
${m}
|
|
21
|
+
|
|
22
|
+
━━━━━━━━━━
|
|
23
|
+
|
|
24
|
+
${u.subhead}
|
|
25
|
+
|
|
26
|
+
${u.style_brief?`${p("extendTemplates.styleFeature")}${u.style_brief}
|
|
27
|
+
`:""}${u.target_audience?`${p("extendTemplates.targetAudience")}${u.target_audience}
|
|
28
|
+
`:""}
|
|
29
|
+
${p("extendTemplates.limitedOffer")}
|
|
30
|
+
${p("extendTemplates.freeShipping")}
|
|
31
|
+
|
|
32
|
+
${p("extendTemplates.comment1ForDm")}
|
|
33
|
+
${p("extendTemplates.learnMoreLink")}
|
|
34
|
+
|
|
35
|
+
${t.slice(0,4).join(" ")}`,hashtags:t.slice(0,4)},{platform:p("extend.socialTemplates.story"),title:x,content:`${u.headline}
|
|
36
|
+
|
|
37
|
+
${p("extendTemplates.swipeUpToLearnMore")}
|
|
38
|
+
|
|
39
|
+
${u.subhead}`,hashtags:t.slice(0,2)}]}),[_,C]=(0,s.useState)(null),[T,L]=(0,s.useState)(!1),[P,R]=(0,s.useState)("select"),I=(e,t)=>{navigator.clipboard.writeText(e),C(t),setTimeout(()=>C(null),2e3)},$=async()=>{if(0===f.length)return;L(!0),R("generating");let e=f.map(e=>{let t=g.find(t=>t.ratio===e);return{ratio:e,label:t.label,image:null,loading:!0,error:null}});w(e);let t=[...e];for(let e=0;e<f.length;e++){let r=f[e];try{let s=await j(n,l,85,h,r,d,x,m,!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:p("extend.generationFailed")}}w([...t])}k(O(u,x,m)),L(!1),R("results")},O=(e,t,r)=>{let s=e.route_name.replace(/\s/g,""),a=[`#${s}`,p("extend.hashtags.newProduct"),p("extend.hashtags.recommended"),p("extend.hashtags.mustBuy"),p("extend.hashtags.quality")];return[{platform:p("extend.socialTemplates.instagram"),title:e.headline,content:`${e.headline}
|
|
40
|
+
|
|
41
|
+
${r}
|
|
42
|
+
|
|
43
|
+
───
|
|
44
|
+
|
|
45
|
+
${e.subhead}
|
|
46
|
+
|
|
47
|
+
${e.style_brief?`風格:${e.style_brief}
|
|
48
|
+
`:""}${e.target_audience?`適合:${e.target_audience}
|
|
49
|
+
`:""}
|
|
50
|
+
點擊連結了解更多
|
|
51
|
+
私訊小編享專屬優惠
|
|
52
|
+
|
|
53
|
+
${a.join(" ")}`,hashtags:a},{platform:p("extend.socialTemplates.facebook"),title:e.headline,content:`【${t}】
|
|
54
|
+
${e.headline}
|
|
55
|
+
|
|
56
|
+
${r}
|
|
57
|
+
|
|
58
|
+
━━━━━━━━━━
|
|
59
|
+
|
|
60
|
+
${e.subhead}
|
|
61
|
+
|
|
62
|
+
${e.style_brief?`▸ 風格特色:${e.style_brief}
|
|
63
|
+
`:""}${e.target_audience?`▸ 適合對象:${e.target_audience}
|
|
64
|
+
`:""}
|
|
65
|
+
▸ 限時優惠進行中
|
|
66
|
+
▸ 全館滿額免運
|
|
67
|
+
|
|
68
|
+
留言 +1 小編私訊您
|
|
69
|
+
立即了解更多:[連結]
|
|
70
|
+
|
|
71
|
+
${a.slice(0,4).join(" ")}`,hashtags:a.slice(0,4)},{platform:p("extend.socialTemplates.story"),title:t,content:`${e.headline}
|
|
72
|
+
|
|
73
|
+
上滑了解更多
|
|
74
|
+
|
|
75
|
+
${e.subhead}`,hashtags:a.slice(0,2)}]},M=()=>{v([]),w([]),k([]),R("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"===P?M: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:p("extend.title")}),"generating"!==P&&(0,r.jsx)("button",{onClick:M,className:"p-2 text-gray-400 hover:text-white transition-colors",title:p("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"===P&&(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:l,alt:p("alt.source"),className:"w-full h-full object-cover",loading:"lazy"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-1",children:p("extend.sourceImage")}),(0,r.jsx)("p",{className:"text-white font-medium",children:x}),(0,r.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[g.find(e=>e.ratio===i)?.label," (",i,")"]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-3",children:p("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 ${f.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:$,disabled:0===f.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:[p("extend.startExtend")," (",f.length,")"]}),(0,r.jsxs)("div",{className:"pt-6 border-t border-white/10",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"})}),p("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:p("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:p("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:()=>I(`${e.title}
|
|
76
|
+
|
|
77
|
+
${e.content}`,t),className:`text-xs transition-colors ${_===t?"text-green-400":"text-gray-400 hover:text-white"}`,children:_===t?p("extend.copied"):p("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))})]})]}),"generating"===P&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)(E,{className:"w-12 h-12 text-white mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-white font-medium",children:p("extend.generating")}),(0,r.jsxs)("p",{className:"text-sm text-gray-400 mt-1",children:[y.filter(e=>!e.loading).length," / ",y.length]})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:y.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)(E,{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"===P&&(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"})}),p("extend.generatedImages")]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:y.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] ${S(e.ratio)}`,children:e.loading?(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,r.jsx)(E,{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=y[t].ratio,void(w(e=>{let r=[...e];return r[t]={...r[t],loading:!0,error:null},r}),j(n,l,85,h,e,d,x,m,!1,"bold","regular",c).then(e=>{w(r=>{let s=[...r];return s[t]={...s[t],image:e,loading:!1},s})}).catch(e=>{w(r=>{let s=[...r];return s[t]={...s[t],loading:!1,error:e instanceof Error?e.message:p("extend.generationFailed")},s})}))},className:"text-xs text-white underline",children:p("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:p("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"})}),p("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:p("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:p("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:()=>I(`${e.title}
|
|
78
|
+
|
|
79
|
+
${e.content}`,t),className:`text-xs transition-colors ${_===t?"text-green-400":"text-gray-400 hover:text-white"}`,children:_===t?p("extend.copied"):p("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:()=>{R("select"),v([])},className:"flex-1 py-3 bg-white/10 text-white font-bold rounded-lg hover:bg-white/20 transition-colors",children:p("extend.addMore")}),(0,r.jsx)("button",{onClick:M,className:"flex-1 py-3 bg-white text-black font-bold rounded-lg hover:bg-gray-200 transition-colors",children:p("extend.done")})]})]})]})]})]}):null},P={regular:"Regular (400)",medium:"Medium (500)",bold:"Bold (700)",black:"Black (900)"},R=e=>{let{contentSet:t,apiKey:a,productImage:l,secondaryProduct:i,brandLogo:n,onContentChange:d,t:c,globalSettings:x,marketingRoute:m}=e,[h,p]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[v,y]=(0,s.useState)(null),[w,N]=(0,s.useState)(!1),[k,_]=(0,s.useState)(!1),[T,R]=(0,s.useState)("prompt"),[I,$]=(0,s.useState)(null),[O,M]=(0,s.useState)(!1),{showText:A,titleWeight:D,copyWeight:z,similarityLevel:U,resolution:B}=x,W=async()=>{if(!l)return void y(c("production.uploadProductFirst"));if("reference"===T&&!I)return void y(c("production.uploadReferenceFirst"));f(!0),y(null);try{let e;if("reference"===T&&I)e=await j(l,I,"low"===U?20:"medium"===U?55:85,a,t.ratio,n,t.title,t.copy,A,D,z,i,B);else{let r=`CRITICAL: The product in the reference image is SACRED and MUST NOT be altered. Preserve EXACT packaging, colors, labels, text, shape. ONLY modify: background, lighting, props AROUND the product. ${t.visual_prompt_en}`;"1:1-commercial"===t.ratio&&(r+=" MANDATORY: CLEAN SOLID WHITE (#ffffff) OR LIGHT GRAY (#f6f6f6) BACKGROUND ONLY. Absolutely NO colored backgrounds, NO gradients, NO decorative elements, NO props, NO plants, NO patterns. Professional studio lighting only."),n&&(r+=" Place brand logo in corner subtly."),A&&(r+=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bold",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"regular",a=P[r]||"Bold (700)",l=P[s]||"Regular (400)";return`
|
|
80
|
+
|
|
81
|
+
【TEXT OVERLAY - CRITICAL INSTRUCTIONS】
|
|
82
|
+
Overlay the following Traditional Chinese text on the image:
|
|
83
|
+
- Title: "${e}" (Font: Noto Sans TC ${a})
|
|
84
|
+
- Copy: "${t}" (Font: Noto Sans TC ${l})
|
|
85
|
+
|
|
86
|
+
CRITICAL TEXT RENDERING RULES:
|
|
87
|
+
1. Render EXACT characters as provided - do NOT approximate, substitute, or hallucinate any characters
|
|
88
|
+
2. Each Chinese character must be pixel-perfect with correct strokes
|
|
89
|
+
3. Use proper Traditional Chinese (繁體中文) character forms, NOT Simplified Chinese
|
|
90
|
+
4. Typography must be clean, sharp, and legible at 4K resolution
|
|
91
|
+
5. Position text with appropriate contrast against background
|
|
92
|
+
6. Maintain consistent character spacing and line height`}(t.title,t.copy,D,z)),r+=" AVOID: distorted product, modified packaging, wrong text/labels, simplified Chinese, blurry details, unnatural proportions, extra watermarks, low quality.",e=await b(r,a,l,t.ratio,i,B)}p(e)}catch(e){y(e instanceof Error?e.message:c("production.generateFailed"))}finally{f(!1)}};return(0,r.jsxs)("div",{className:`flex flex-col gap-2 group relative ${v?"ring-2 ring-red-500/30 rounded-xl":""}`,children:[(0,r.jsxs)("div",{className:`relative rounded-xl overflow-hidden bg-[#15151a] border border-white/10 shadow-lg w-full ${S(t.ratio)}`,children:[g?(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)(E,{className:"w-10 h-10 text-white mb-3"}),(0,r.jsx)("p",{className:"text-sm text-white font-medium",children:c("production.generating")}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:c("production.pleaseWait")})]}):h?(0,r.jsxs)("div",{className:"relative w-full h-full",children:[(0,r.jsx)("img",{src:h,alt:t.title,className:"w-full h-full object-cover cursor-pointer",onClick:()=>o(h,t.title)}),(0,r.jsxs)("div",{className:"absolute inset-0 bg-black/50 hidden md:flex opacity-0 group-hover:opacity-100 transition-opacity items-center justify-center gap-2",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),o(h,t.title)},className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm",title:c("extend.openInNewTab"),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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}),(0,r.jsx)("a",{href:h,download:`${t.id}.png`,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm",title:c("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:W,disabled:g,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed",title:c("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:()=>_(!0),className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm",title:c("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:"absolute bottom-0 left-0 right-0 md:hidden flex justify-center gap-3 p-2 bg-gradient-to-t from-black/80 to-transparent",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),o(h,t.title)},className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm",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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}),(0,r.jsx)("a",{href:h,download:`${t.id}.png`,className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm",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:W,disabled:g,className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm disabled:opacity-50",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:()=>_(!0),className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm",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:[l&&(0,r.jsx)("div",{className:"absolute inset-0 opacity-15",children:(0,r.jsx)("img",{src:l,className:"w-full h-full object-cover blur-md",alt:c("alt.productBackground"),loading:"lazy"})}),(0,r.jsx)("p",{className:"text-sm text-white/60 font-medium mb-4 line-clamp-2 max-w-[80%] relative z-10",children:t.title}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 relative z-10",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),R("prompt")},className:`text-[10px] px-3 py-1 rounded-full transition-all ${"prompt"===T?"bg-white/15 text-white border border-white/30":"bg-white/5 text-gray-500 border border-white/10 hover:text-gray-300"}`,children:c("production.promptMode")}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),R("reference")},className:`text-[10px] px-3 py-1 rounded-full transition-all ${"reference"===T?"bg-white/15 text-white border border-white/30":"bg-white/5 text-gray-500 border border-white/10 hover:text-gray-300"}`,children:c("production.referenceMode")})]}),(0,r.jsxs)("button",{onClick:W,disabled:!l,className:"px-6 py-3 rounded-full bg-gradient-to-r from-white/15 to-white/5 border border-white/20 flex items-center gap-2 hover:scale-105 hover:border-white/40 transition-all text-white relative z-10 disabled:opacity-30 disabled:cursor-not-allowed disabled:hover:scale-100",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:"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)("span",{className:"text-sm font-medium",children:c("production.generateButton")})]})]}),(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 ${C(t.ratio)}`,children:[c("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-300 font-medium truncate flex-1 pr-2",title:t.title,children:t.title}),(0,r.jsxs)("button",{onClick:()=>N(!w),className:"text-[10px] text-gray-500 hover:text-white transition-colors flex items-center gap-1",children:[w?c("production.collapse"):c("production.expand"),(0,r.jsx)("svg",{className:`w-3 h-3 transition-transform ${w?"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"})})]})]}),w&&(0,r.jsxs)("div",{className:"space-y-4 p-4 sm:p-5 bg-white/5 rounded-xl 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:c("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"===T?"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:c("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"===T?"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:c("production.referenceMode")})]})]}),"reference"===T&&(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:c("production.uploadReference")}),(0,r.jsxs)("label",{className:`flex items-center justify-center w-full h-20 border border-dashed rounded-lg cursor-pointer transition-all relative overflow-hidden ${O?"border-white/60 bg-white/10 scale-[1.02]":"border-white/30 hover:border-white hover:bg-white/5"}`,onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),M(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation();let t=e.currentTarget.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&M(!1)},onDrop:async e=>{e.preventDefault(),e.stopPropagation(),M(!1);let t=e.dataTransfer.files;t&&t.length>0&&t[0].type.startsWith("image/")&&$(await u(t[0]))},children:[O?(0,r.jsx)("p",{className:"text-white/80 font-bold text-[10px] animate-pulse",children:c("input.dropToUpload")}):I?(0,r.jsxs)("div",{className:"w-full h-full relative group",children:[(0,r.jsx)("img",{src:I,alt:c("alt.reference"),className:"w-full h-full object-contain",loading:"lazy"}),(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:c("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 2v12a2 2 0 002 2z"})}),(0,r.jsx)("p",{className:"text-[10px] text-gray-400",children:c("contentSuite.clickToUpload")})]}),(0,r.jsx)("input",{type:"file",className:"hidden",accept:"image/*",onChange:async e=>{e.target.files&&e.target.files[0]&&$(await u(e.target.files[0]))}})]})]}),"prompt"===T&&(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:c("production.titleInput")}),(0,r.jsx)("input",{type:"text",value:t.title,onChange:e=>d(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:c("production.titlePlaceholder")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1 block",children:c("production.copyInput")}),(0,r.jsx)("textarea",{value:t.copy,onChange:e=>d(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:c("production.copyPlaceholder")})]})]}),v&&(0,r.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,r.jsx)("svg",{className:"w-4 h-4 text-red-400 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("p",{className:"text-xs text-red-400",children:v})]})]}),!w&&v&&(0,r.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,r.jsx)("svg",{className:"w-4 h-4 text-red-400 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("p",{className:"text-xs text-red-400",children:v})]}),h&&(0,r.jsx)(L,{isOpen:k,onClose:()=>_(!1),sourceImage:h,sourceRatio:t.ratio,productImage:l,brandLogo:n,secondaryProduct:i,marketingRoute:m,contentTitle:t.title,contentCopy:t.copy,apiKey:a,t:c})]})},I=s.default.memo(e=>{let{file:t,previewUrl:a,onFileChange:l,label:i,emptyText:n,changeText:o,hint:d,borderColor:c,iconColor:u}=e,[x,m]=(0,s.useState)(!1),h=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),p=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),m(!0)},[]),g=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=e.currentTarget.getBoundingClientRect(),r=e.clientX,s=e.clientY;(r<t.left||r>t.right||s<t.top||s>t.bottom)&&m(!1)},[]),b=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),m(!1);let t=e.dataTransfer.files;if(t&&t.length>0){let e=t[0];e.type.startsWith("image/")&&l(e)}},[l]);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{className:`block text-sm font-semibold mb-2 ${"white"===u?"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 ${x?"border-white/50 bg-white/10 scale-[1.02]":"white"===c?"border-white/20 hover:border-white/40 hover:bg-white/5":"indigo"===c?"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"}`,onDragOver:h,onDragEnter:p,onDragLeave:g,onDrop:b,children:[t&&a?(0,r.jsxs)("div",{className:"w-full h-full relative group",children:[(0,r.jsx)("img",{src:a,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:o})})]}):(0,r.jsx)("div",{className:"flex flex-col items-center justify-center py-4",children:x?(0,r.jsx)("p",{className:"text-white/80 font-bold text-xs animate-pulse",children:"Drop here"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:`w-8 h-8 mb-2 ${"white"===u?"text-white/60":"indigo"===u?"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"===u?"text-white/70":"indigo"===u?"text-indigo-300":"text-pink-300"}`,children:n}),d&&(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mt-1",children:d})]})}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:e=>{e.target.files&&e.target.files[0]&&l(e.target.files[0])},accept:"image/*"})]}),t&&(0,r.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),l(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 $(e){let[t,r]=(0,s.useState)(null),[a,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let t=!0,s=null;return e?(l(s=URL.createObjectURL(e)),u(e).then(e=>{t&&r(e)})):(r(null),l(null)),()=>{t=!1,s&&URL.revokeObjectURL(s)}},[e]),{base64:t,previewUrl:a}}I.displayName="ImageUploader";let O=e=>{let{plan:t,onContentUpdate:a,apiKey:l,productImage:i,secondaryProduct:n,brandLogo:o,onProductImageChange:d,onSecondaryProductChange:c,onBrandLogoChange:u,marketingRoute:x}=e,{t:m,locale:h}=(0,y.useLocale)(),[p,g]=(0,s.useState)("review"),[b,j]=(0,s.useState)(t.content_sets),[v,w]=(0,s.useState)(null),[N,E]=(0,s.useState)({}),[C,S]=(0,s.useState)({showText:!1,titleWeight:"bold",copyWeight:"regular",similarityLevel:"medium",resolution:"4k"}),L=$(i),P=$(n),O=$(o);(0,s.useEffect)(()=>{j(t.content_sets),g("review")},[t]);let M=(e,t,r)=>{let s=b.map(s=>s.id===e?{...s,[t]:r}:s);j(s),a(s)},A=async e=>{w(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=k(e,h)),s){let e="en"===h?"【Product Arrangement - Highest Priority】":"【產品排列方式 - 最高優先級】";r=`${e}${s}。
|
|
93
|
+
|
|
94
|
+
${r}`}}let s=await f(t.title,t.copy,t.ratio,t.size_label,l,r);M(e,"visual_prompt_en",s)}catch(t){let e=t instanceof Error?t.message:m("common.unknownError");alert(`${m("contentSuite.regeneratePromptFailed")}${e}`)}finally{w(null)}},D=(e,t)=>{S(r=>({...r,[e]:t}))},z=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-12 sm:mb-16",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:m("stepIndicator.step04")})}),(0,r.jsx)("h4",{className:"text-xl sm:text-2xl font-bold text-white mb-2",children:m("contentSuite.settingsTitle")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mb-8",children:m("contentSuite.settingsDescription")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 sm:gap-6",children:[(0,r.jsx)(I,{file:i,previewUrl:L.previewUrl,onFileChange:d,label:m("contentSuite.mainProduct"),emptyText:m("contentSuite.clickToUploadMain"),changeText:m("contentSuite.changeImage"),borderColor:"white",iconColor:"white"}),(0,r.jsx)(I,{file:n,previewUrl:P.previewUrl,onFileChange:c,label:m("contentSuite.secondaryProduct"),emptyText:m("contentSuite.clickToUploadSecondary"),changeText:m("contentSuite.changeImage"),hint:m("contentSuite.secondaryProductHint"),borderColor:"white",iconColor:"white"}),(0,r.jsx)(I,{file:o,previewUrl:O.previewUrl,onFileChange:u,label:m("contentSuite.brandLogo"),emptyText:m("contentSuite.clickToUploadLogo"),changeText:m("contentSuite.changeLogo"),borderColor:"white",iconColor:"white"})]})]}),(0,r.jsxs)("div",{className:"mb-10",children:[(0,r.jsx)("h2",{className:"text-3xl sm:text-4xl font-bold text-gradient-hero serif mb-2",children:t.plan_name}),(0,r.jsx)("p",{className:"text-gray-500 text-sm mb-8",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}${m("contentSuite.sets")}`}).join(" · ")}),(0,r.jsxs)("div",{className:"flex border-b border-white/10",children:[(0,r.jsx)("button",{onClick:()=>g("review"),className:`flex-1 sm:flex-none px-6 sm:px-8 py-3.5 text-sm font-bold transition-all duration-200 border-b-2 -mb-px ${"review"===p?"text-white border-blue-400":"text-gray-500 border-transparent hover:text-gray-300 hover:border-white/20"}`,children:m("contentSuite.reviewMode")}),(0,r.jsx)("button",{onClick:()=>g("production"),className:`flex-1 sm:flex-none px-6 sm:px-8 py-3.5 text-sm font-bold transition-all duration-200 border-b-2 -mb-px ${"production"===p?"text-white border-blue-400":"text-gray-500 border-transparent hover:text-gray-300 hover:border-white/20"}`,children:m("contentSuite.productionMode")})]})]}),"review"===p&&(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:m("contentSuite.reviewInfoTitle")}),(0,r.jsx)("p",{className:"text-blue-300/70 text-xs",children:m("contentSuite.reviewInfoDescription")})]})]}),z.map(e=>{let t=N[e.ratio]??0,s=e.sets[t];return(0,r.jsxs)("div",{className:"pb-10 last:pb-0",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:`w-1.5 h-8 rounded-full ${_(e.ratio)}`}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl sm:text-2xl font-bold text-white",children:e.label}),(0,r.jsxs)("p",{className:"text-xs text-gray-500",children:[e.ratio," · ",e.sets.length," ",m("contentSuite.sets")]})]})]}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:e.sets.map((s,a)=>(0,r.jsx)("button",{onClick:()=>E(t=>({...t,[e.ratio]:a})),className:`w-9 h-9 rounded-full text-sm font-bold transition-all duration-200 ${a===t?"bg-blue-500 text-white":"bg-white/5 text-gray-500 hover:bg-white/10 hover:text-white border border-white/10"}`,children:s.set_number},s.id))})]}),s&&(0,r.jsx)("div",{className:"animate-scale-in",children:(0,r.jsx)(T,{contentSet:s,onChange:M,onRegeneratePrompt:A,isRegenerating:v===s.id,t:m,locale:h})},s.id)]},e.ratio)})]}),"production"===p&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-8 p-4 sm:p-6 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"})]}),m("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:C.showText,onChange:e=>D("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:m("production.showContent")})]}),C.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:m("production.titleWeight")}),(0,r.jsxs)("select",{value:C.titleWeight,onChange:e=>D("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:m("fontWeights.regular")}),(0,r.jsx)("option",{value:"medium",children:m("fontWeights.medium")}),(0,r.jsx)("option",{value:"bold",children:m("fontWeights.bold")}),(0,r.jsx)("option",{value:"black",children:m("fontWeights.black")})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-gray-400",children:m("production.copyWeight")}),(0,r.jsxs)("select",{value:C.copyWeight,onChange:e=>D("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:m("fontWeights.regular")}),(0,r.jsx)("option",{value:"medium",children:m("fontWeights.medium")}),(0,r.jsx)("option",{value:"bold",children:m("fontWeights.bold")}),(0,r.jsx)("option",{value:"black",children:m("fontWeights.black")})]})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-gray-400 mb-2 block",children:m("production.referenceSimilarity")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:["low","medium","high"].map(e=>(0,r.jsxs)("button",{onClick:()=>D("similarityLevel",e),className:`flex-1 min-w-[100px] max-w-[140px] min-h-[44px] py-2 px-3 text-xs rounded-lg transition-colors ${C.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:m(`production.similarity${e.charAt(0).toUpperCase()+e.slice(1)}`)}),(0,r.jsx)("div",{className:"text-[10px] opacity-70 mt-0.5",children:m(`production.similarity${e.charAt(0).toUpperCase()+e.slice(1)}Desc`)})]},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-gray-400 mb-2 block",children:m("production.resolution")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:["1k","2k","4k"].map(e=>(0,r.jsxs)("button",{onClick:()=>D("resolution",e),className:`flex-1 min-w-[100px] max-w-[140px] min-h-[44px] py-2 px-3 text-xs rounded-lg transition-colors ${C.resolution===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:m(`production.resolution${e.toUpperCase()}`)}),(0,r.jsx)("div",{className:"text-[10px] opacity-70 mt-0.5",children:m(`production.resolution${e.toUpperCase()}Desc`)})]},e))})]})]}),(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mt-3",children:m("production.perCardModeHint")})]}),z.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 ${_(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)(R,{contentSet:e,apiKey:l,productImage:L.base64,secondaryProduct:P.base64,brandLogo:O.base64,onContentChange:M,t:m,globalSettings:C,marketingRoute:x},e.id))})]},e.ratio))]})]})},M="gemini_api_key";function A(){return localStorage.getItem(M)}let D=e=>{let{isOpen:t,onClose:a,onSave:l,serverHasKey:i=!1}=e,{t:n}=(0,y.useLocale)(),[o,d]=(0,s.useState)("");return((0,s.useEffect)(()=>{let e=A();e&&d(e)},[t]),t)?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm animate-overlay-in",onClick:a}),(0,r.jsxs)("div",{className:"relative glass-panel rounded-2xl p-8 max-w-md w-full shadow-2xl animate-modal-in",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-white mb-4 serif",children:n("apiKeyModal.title")}),i&&(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:i?(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-semibold text-gray-500 tracking-wide mb-2",children:[n("apiKeyModal.labelOptional")," ",i&&(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:"input-field 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.5 rounded-lg border border-white/10 text-gray-400 hover:bg-white/5 hover:text-white transition-colors text-sm font-medium",children:n(i?"common.close":"common.cancel")}),o.trim()&&(0,r.jsx)("button",{onClick:()=>{if(o.trim()){var e;e=o.trim(),localStorage.setItem(M,e),l(o.trim()),a()}},className:"flex-1 px-4 py-2.5 rounded-lg bg-[var(--accent-primary)] text-white font-bold hover:opacity-90 transition-opacity text-sm",children:n("apiKeyModal.saveButton")}),A()&&(0,r.jsx)("button",{onClick:()=>{localStorage.removeItem(M),d(""),l(""),a()},className:"flex-1 px-4 py-2.5 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-[var(--accent-primary)] hover:opacity-80 underline transition-opacity",children:n("apiKeyModal.getApiKey")})})]})]})]}):null},z=()=>{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 U(e){let{imagePreview:t,productName:a,productInfo:l,productUrl:i,refCopy:n,showAnalyzeButton:o,onFileChange:d,onFileDrop:c,onClearImage:u,onProductNameChange:x,onProductInfoChange:m,onProductUrlChange:h,onRefCopyChange:p,onAnalyze:g}=e,{t:b}=(0,y.useLocale)(),[f,j]=(0,s.useState)(!1),v=!!t,w=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),N=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),j(!0)},[]),k=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=e.currentTarget.getBoundingClientRect(),r=e.clientX,s=e.clientY;(r<t.left||r>t.right||s<t.top||s>t.bottom)&&j(!1)},[]),_=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),j(!1);let t=e.dataTransfer.files;if(t&&t.length>0){let e=t[0];e.type.startsWith("image/")&&c(e)}},[c]);return(0,r.jsx)("div",{className:`
|
|
95
|
+
w-full max-w-5xl mx-auto mt-6 sm:mt-8 animate-fade-in-up
|
|
96
|
+
rounded-2xl sm:rounded-3xl border-2 transition-all duration-500 overflow-hidden
|
|
97
|
+
${f?"border-white/60 bg-white/10 scale-[1.01]":v?"border-white/40 bg-white/5":"border-gray-600/50 bg-black/20"}
|
|
98
|
+
`,onDragOver:w,onDragEnter:N,onDragLeave:k,onDrop:_,children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row",children:[(0,r.jsx)("div",{className:"md:w-[55%] shrink-0 order-2 md:order-1",children:(0,r.jsxs)("label",{className:`flex flex-col items-center justify-center w-full h-full min-h-[300px] sm:min-h-[360px] md:min-h-[440px] cursor-pointer transition-all duration-500 relative overflow-hidden group ${f?"bg-white/10":v?"bg-black/30":"bg-black/20 hover:bg-black/10"}`,children:[f&&!v&&(0,r.jsxs)("div",{className:"absolute inset-0 z-20 flex flex-col items-center justify-center bg-white/5 backdrop-blur-[2px]",children:[(0,r.jsx)("svg",{className:"w-12 h-12 text-white/70 mb-3 animate-pulse-ring",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),(0,r.jsx)("p",{className:"text-white/80 font-bold text-sm",children:b("input.dropToUpload")})]}),t?(0,r.jsxs)("div",{className:"w-full h-full relative",children:[(0,r.jsx)("img",{src:t,alt:b("alt.preview"),className:"w-full h-full object-contain p-6 sm:p-8 transition-transform duration-500 group-hover:scale-105"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-transparent to-transparent flex items-end justify-center pb-6 opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-all duration-300",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:b("input.changeImage")})}),(0,r.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),u()},className:"absolute top-3 right-3 p-2 bg-black/60 hover:bg-red-500/80 rounded-full text-white transition-colors z-10",title:b("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-12 px-4 text-center",children:[(0,r.jsx)("div",{className:"w-20 h-20 sm:w-24 sm:h-24 rounded-2xl bg-gray-700/30 border border-gray-600/50 flex items-center justify-center mb-5 group-hover:scale-110 group-hover:border-gray-500/70 transition-all duration-300",children:(0,r.jsxs)("svg",{className:"w-10 h-10 sm:w-12 sm:h-12 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-base sm:text-lg font-medium text-gray-400 group-hover:text-gray-300 transition-colors",children:b("input.uploadOrTakePhoto")}),(0,r.jsx)("p",{className:"text-xs text-gray-600",children:b("input.supportedFormats")})]}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:d,accept:"image/*"})]})}),(0,r.jsxs)("div",{className:"md:w-[45%] order-1 md:order-2 p-5 sm:p-7 lg:p-8 flex flex-col gap-4 sm:gap-5 md:border-l border-white/10",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-semibold tracking-wide mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${v?"text-white":"text-gray-500"}`,children:b("input.productName")}),(0,r.jsx)("input",{type:"text",value:a,onChange:e=>x(e.target.value),placeholder:b("input.productNamePlaceholder"),className:`input-field text-sm sm:text-base ${v?"!border-white/20 hover:!border-white/30 focus:!border-white/40":""}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-semibold tracking-wide mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${v?"text-gray-400":"text-gray-600"}`,children:b("input.productInfo")}),(0,r.jsx)("textarea",{value:l,onChange:e=>m(e.target.value),placeholder:b("input.productInfoPlaceholder"),className:`input-field h-24 sm:h-28 resize-none text-xs sm:text-sm leading-relaxed ${v?"!border-white/20 hover:!border-white/30 focus:!border-white/40":""}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-semibold tracking-wide mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${v?"text-gray-400":"text-gray-600"}`,children:b("input.productUrl")}),(0,r.jsx)("input",{type:"url",value:i,onChange:e=>h(e.target.value),placeholder:b("input.productUrlPlaceholder"),className:`input-field text-sm sm:text-base ${v?"!border-white/20 hover:!border-white/30 focus:!border-white/40":""}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-semibold tracking-wide mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${v?"text-gray-400":"text-gray-600"}`,children:b("input.refCopy")}),(0,r.jsx)("textarea",{value:n,onChange:e=>p(e.target.value),placeholder:b("input.refCopyPlaceholder"),className:`input-field h-24 sm:h-28 resize-none text-xs sm:text-sm leading-relaxed ${v?"!border-white/20 hover:!border-white/30 focus:!border-white/40":""}`})]}),o&&(0,r.jsxs)("button",{onClick:g,className:`btn-primary mt-auto w-full py-3.5 sm:py-4 font-bold text-xs sm:text-sm tracking-widest rounded-xl transition-all duration-300 flex items-center justify-center gap-2 ${v?"bg-blue-500 text-white hover:bg-blue-400 hover:scale-[1.02] shadow-lg shadow-blue-500/20":"bg-gray-700 text-gray-400 cursor-not-allowed"}`,disabled:!v,children:[(0,r.jsx)("span",{children:b("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 B(e){let{routes:t,activeRouteIndex:s,routeSupplements:a,onSelectRoute:l,onUpdateRoute:i,onUpdateSupplement:n}=e,{t:o}=(0,y.useLocale)(),d=t[s];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-6 sm:mb-8",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:o("stepIndicator.step01")})}),(0,r.jsx)("h3",{className:"text-2xl sm:text-3xl font-bold text-gradient-hero",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:"flex border-b border-white/10 mb-8 overflow-x-auto",children:t.map((e,t)=>{let a=s===t;return(0,r.jsx)("button",{onClick:()=>l(t),className:`flex-1 min-w-0 px-4 sm:px-6 py-4 sm:py-5 text-left transition-all duration-300 border-b-2 -mb-px relative ${a?"text-white border-blue-400":"text-gray-500 border-transparent hover:text-gray-300 hover:border-white/20"}`,children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:`shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all ${a?"bg-blue-500 text-white":"bg-white/5 text-gray-500 border border-white/10"}`,children:String.fromCharCode(65+t)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h4",{className:`text-sm sm:text-base font-bold truncate transition-colors ${a?"text-white":"text-gray-400"}`,children:e.route_name}),(0,r.jsx)("p",{className:`text-xs truncate transition-colors ${a?"text-gray-400":"text-gray-600"}`,children:e.headline})]})]})},t)})}),d&&(0,r.jsxs)("div",{className:"animate-scale-in",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("input",{type:"text",value:d.route_name,onChange:e=>i(s,{...d,route_name:e.target.value}),className:"w-full bg-transparent text-2xl sm:text-3xl font-bold text-white border-none outline-none placeholder-gray-600 focus:ring-0",placeholder:o("phase1.routeName")}),(0,r.jsx)("div",{className:"h-px bg-gradient-to-r from-blue-500/30 via-blue-500/10 to-transparent mt-2"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-12",children:[(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label",children:o("phase1.headline")}),(0,r.jsx)("textarea",{value:d.headline,onChange:e=>i(s,{...d,headline:e.target.value}),className:"input-field text-sm sm:text-base font-medium text-white resize-none h-24 sm:h-28"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label",children:o("phase1.subhead")}),(0,r.jsx)("textarea",{value:d.subhead,onChange:e=>i(s,{...d,subhead:e.target.value}),className:"input-field text-sm text-gray-300 resize-none h-24 sm:h-28"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label text-white",children:o("phase1.supplement")}),(0,r.jsx)("textarea",{value:a[s],onChange:e=>n(s,e.target.value),placeholder:o("phase1.supplementPlaceholder"),className:"input-field text-sm text-gray-300 placeholder-gray-600 resize-none h-20 sm:h-24 !bg-white/5 !border-white/15"})]})]}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label",children:o("phase1.styleDescription")}),(0,r.jsx)("textarea",{value:d.style_brief,onChange:e=>i(s,{...d,style_brief:e.target.value}),className:"input-field text-sm text-gray-300 resize-none h-28 sm:h-32"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"field-label",children:o("phase1.targetAudience")}),(0,r.jsx)("textarea",{value:d.target_audience,onChange:e=>i(s,{...d,target_audience:e.target.value}),className:"input-field text-sm text-gray-300 resize-none h-24 sm:h-28"})]})]})]})]},s)]})}let W={blue:{border:"border-blue-400/40",bg:"bg-blue-500/15",glow:"shadow-[0_0_20px_rgba(59,130,246,0.15)]",checkbox:"bg-blue-400",text:"text-blue-100",accent:"text-blue-300",preview:"text-blue-400"},purple:{border:"border-purple-400/40",bg:"bg-purple-500/15",glow:"shadow-[0_0_20px_rgba(139,92,246,0.15)]",checkbox:"bg-purple-400",text:"text-purple-100",accent:"text-purple-300",preview:"text-purple-400"},pink:{border:"border-pink-400/40",bg:"bg-pink-500/15",glow:"shadow-[0_0_20px_rgba(236,72,153,0.15)]",checkbox:"bg-pink-400",text:"text-pink-100",accent:"text-pink-300",preview:"text-pink-400"},green:{border:"border-green-400/40",bg:"bg-green-500/15",glow:"shadow-[0_0_20px_rgba(16,185,129,0.15)]",checkbox:"bg-green-400",text:"text-green-100",accent:"text-green-300",preview:"text-green-400"},amber:{border:"border-amber-400/40",bg:"bg-amber-500/15",glow:"shadow-[0_0_20px_rgba(245,158,11,0.15)]",checkbox:"bg-amber-400",text:"text-amber-100",accent:"text-amber-300",preview:"text-amber-400"}},F={"1:1":{w:28,h:28},"9:16":{w:18,h:32},"4:5":{w:22,h:28},"16:9":{w:32,h:18},"1:1-commercial":{w:28,h:28}},K=s.default.memo(e=>{let{ratio:t,checked:s,onChange:a,name:l,ratioLabel:i,description:n,color:o}=e,d=W[o],c=F[t]||{w:28,h:28};return(0,r.jsxs)("label",{className:`
|
|
99
|
+
relative cursor-pointer p-4 sm:p-5 rounded-2xl border-2 transition-all duration-300 flex flex-col items-center justify-center gap-3 sm:gap-4 group h-40 sm:h-48
|
|
100
|
+
${s?`${d.bg} ${d.border} ${d.glow} scale-[1.02]`:"bg-black/20 border-white/5 hover:border-white/20 hover:bg-white/5 hover:scale-[1.01]"}
|
|
101
|
+
`,children:[(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:e=>a(e.target.checked),className:"sr-only"}),s&&(0,r.jsx)("div",{className:"absolute top-2.5 right-2.5 sm:top-3 sm:right-3",children:(0,r.jsx)("div",{className:`w-6 h-6 rounded-full ${d.checkbox} flex items-center justify-center shadow-lg`,children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5 text-black",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.jsx)("div",{className:`ratio-preview ${s?`ratio-preview-active ${d.preview}`:"text-gray-600"} transition-transform group-hover:scale-110`,style:{width:1.3*c.w,height:1.3*c.h}}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:`font-bold text-base sm:text-lg transition-colors ${s?d.text:"text-gray-300"}`,children:l}),(0,r.jsx)("div",{className:`text-xs sm:text-sm font-mono mt-0.5 ${s?d.accent:"text-gray-500"}`,children:i}),(0,r.jsx)("div",{className:`text-[10px] sm:text-xs mt-1.5 ${s?d.accent:"text-gray-500"} opacity-70 hidden sm:block`,children:n})]})]})});function G(e){let{sizeSelection:t,errorMsg:s,onSizeChange:a,onConfirm:l,onBack:i}=e,{t:n}=(0,y.useLocale)(),o=Object.values(t).filter(Boolean).length;return(0,r.jsxs)("div",{className:"animate-fade-in-up",children:[(0,r.jsxs)("div",{className:"mb-8 sm:mb-10",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-3",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:n("stepIndicator.step02")}),o>0&&(0,r.jsx)("span",{className:"text-xs font-bold text-blue-400 bg-blue-500/15 px-2.5 py-1 rounded-full border border-blue-500/20",children:o})]}),(0,r.jsx)("h3",{className:"text-2xl sm:text-3xl font-bold text-gradient-hero mb-2",children:n("phase2.title")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 max-w-lg",children:n("phase2.description")})]}),s&&(0,r.jsx)("div",{className:"mb-6 p-3 bg-red-500/10 border border-red-500/30 rounded-lg text-red-300 text-sm animate-slide-down",children:s}),(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 sm:gap-5",children:[(0,r.jsx)(K,{ratio:"1:1",checked:t["1:1"],onChange:e=>a("1:1",e),name:n("sizes.1:1.name"),ratioLabel:n("sizes.1:1.ratio"),description:n("sizes.1:1.description"),color:"blue"}),(0,r.jsx)(K,{ratio:"9:16",checked:t["9:16"],onChange:e=>a("9:16",e),name:n("sizes.9:16.name"),ratioLabel:n("sizes.9:16.ratio"),description:n("sizes.9:16.description"),color:"purple"}),(0,r.jsx)(K,{ratio:"4:5",checked:t["4:5"],onChange:e=>a("4:5",e),name:n("sizes.4:5.name"),ratioLabel:n("sizes.4:5.ratio"),description:n("sizes.4:5.description"),color:"pink"}),(0,r.jsx)(K,{ratio:"16:9",checked:t["16:9"],onChange:e=>a("16:9",e),name:n("sizes.16:9.name"),ratioLabel:n("sizes.16:9.ratio"),description:n("sizes.16:9.description"),color:"green"}),(0,r.jsx)(K,{ratio:"1:1-commercial",checked:t["1:1-commercial"],onChange:e=>a("1:1-commercial",e),name:n("sizes.1:1-commercial.name"),ratioLabel:n("sizes.1:1-commercial.ratio"),description:n("sizes.1:1-commercial.description"),color:"amber"})]}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-4 mt-10 sm:mt-12",children:[i&&(0,r.jsx)("button",{onClick:i,className:"px-6 sm:px-8 py-3 sm:py-3.5 rounded-full font-semibold text-sm text-gray-400 hover:text-white border border-white/10 hover:border-white/20 transition-all duration-300",children:n("common.back")}),(0,r.jsx)("button",{onClick:l,className:`px-10 sm:px-14 py-3.5 sm:py-4 rounded-full font-bold text-sm sm:text-base transition-all duration-300 ${o>0?"bg-blue-500 text-white hover:bg-blue-400 hover:scale-[1.02] shadow-lg shadow-blue-500/20":"bg-white/10 text-gray-500 cursor-not-allowed"}`,disabled:0===o,children:n("phase2.confirmButton")})]})]})}K.displayName="SizeCheckbox";var H=e.i(59325);function Y(){let{t:e}=(0,y.useLocale)();return(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center space-y-10 text-center animate-scale-in py-16",children:[(0,r.jsxs)("div",{className:"relative w-32 h-32",children:[(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-white/10 animate-pulse-ring"}),(0,r.jsx)("div",{className:"absolute inset-2 rounded-full border border-white/15 animate-pulse-ring",style:{animationDelay:"0.5s"}}),(0,r.jsx)("div",{className:"absolute inset-4 rounded-full border border-white/20 animate-pulse-ring",style:{animationDelay:"1s"}}),(0,r.jsx)("div",{className:"absolute inset-0 animate-orbit",children:(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-1 w-2.5 h-2.5 rounded-full bg-blue-400/80 shadow-[0_0_10px_rgba(59,130,246,0.5)]"})}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)(H.default,{src:"/images/logo.svg",alt:e("alt.loading"),width:44,height:44,className:"w-11 h-11 object-contain drop-shadow-[0_0_12px_rgba(59,130,246,0.4)]"})})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h2",{className:"text-2xl sm:text-3xl font-bold text-gradient-hero",children:e("analyzing.title")}),(0,r.jsx)("p",{className:"text-gray-500 text-sm sm:text-base",children:e("analyzing.description")})]})]})}function V(e){let{routeName:t}=e,{t:s}=(0,y.useLocale)();return(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center py-20 space-y-10 text-center animate-scale-in",children:[(0,r.jsxs)("div",{className:"relative w-32 h-32",children:[(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-white/10 animate-pulse-ring"}),(0,r.jsx)("div",{className:"absolute inset-2 rounded-full border border-white/15 animate-pulse-ring",style:{animationDelay:"0.5s"}}),(0,r.jsx)("div",{className:"absolute inset-4 rounded-full border border-white/20 animate-pulse-ring",style:{animationDelay:"1s"}}),(0,r.jsx)("div",{className:"absolute inset-0 animate-orbit",style:{animationDuration:"4s"},children:(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-1 w-2.5 h-2.5 rounded-full bg-blue-400/80 shadow-[0_0_10px_rgba(59,130,246,0.5)]"})}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)(H.default,{src:"/images/logo.svg",alt:s("alt.loading"),width:44,height:44,className:"w-11 h-11 object-contain drop-shadow-[0_0_12px_rgba(59,130,246,0.4)]"})})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h2",{className:"text-2xl sm:text-3xl font-bold text-gradient-hero",children:s("phase2.planningTitle")}),(0,r.jsxs)("p",{className:"text-gray-500 text-sm sm:text-base max-w-md mx-auto",children:[s("phase2.planningDescription"),(0,r.jsxs)("strong",{className:"text-white font-semibold",children:['"',t,'"']})," ",s("phase2.planningDescription2")]})]})]})}let q={"1:1":!1,"9:16":!1,"4:5":!1,"16:9":!1,"1:1-commercial":!1},Z={appState:v.IDLE,errorMsg:"",selectedFile:null,imagePreview:null,productName:"",productInfo:"",productUrl:"",refCopy:"",analysisResult:null,activeRouteIndex:0,editedRoutes:[],routeSupplements:["","",""],sizeSelection:q,contentPlan:null,editedContentSets:[],productImage:null,secondaryProduct:null,brandLogo:null,apiKey:"",serverHasKey:!1,isGuideOpen:!1,isApiKeyModalOpen:!1};function X(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:q,appState:v.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:v.SIZE_SELECTION};case"SET_ACTIVE_ROUTE":return{...e,activeRouteIndex:t.payload,contentPlan:null,editedContentSets:[],sizeSelection:q,appState:e.appState===v.SUITE_READY||e.appState===v.PLANNING?v.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:q};case"SET_CONTENT_PLAN":return{...e,contentPlan:t.payload,editedContentSets:t.payload.content_sets,appState:v.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:q,appState:v.IDLE};case"RESET_PHASE2":return{...e,contentPlan:null,editedContentSets:[],sizeSelection:q,appState:v.SIZE_SELECTION};case"GO_TO_STEP":{let r=t.payload;if(0===r)return{...e,appState:v.IDLE,errorMsg:""};if(1===r)return{...e,appState:v.SIZE_SELECTION,contentPlan:null,editedContentSets:[],errorMsg:""};return e}default:return e}}function J(){let{t:e,locale:t}=(0,y.useLocale)(),[a,l]=(0,s.useReducer)(X,Z),{appState:i,errorMsg:n,selectedFile:o,imagePreview:d,productName:c,productInfo:u,productUrl:x,refCopy:m,analysisResult:b,activeRouteIndex:f,editedRoutes:j,routeSupplements:k,sizeSelection:_,contentPlan:E,productImage:C,secondaryProduct:S,brandLogo:T,apiKey:L,serverHasKey:P,isGuideOpen:R,isApiKeyModalOpen:I}=a;s.default.useEffect(()=>{let e=A();e&&l({type:"SET_API_KEY",payload:e}),h().then(e=>{l({type:"SET_SERVER_HAS_KEY",payload:e})})},[]);let $=(0,s.useCallback)(e=>{l({type:"SET_API_KEY",payload:e})},[]),M=(0,s.useCallback)(e=>{let t=new FileReader;t.onload=t=>{l({type:"SET_SELECTED_FILE",payload:{file:e,preview:t.target?.result}})},t.readAsDataURL(e)},[]),W=(0,s.useCallback)(e=>{e.target.files&&e.target.files[0]&&M(e.target.files[0])},[M]),F=(0,s.useCallback)(e=>{M(e)},[M]),K=(0,s.useCallback)(()=>{l({type:"SET_SELECTED_FILE",payload:{file:null,preview:null}})},[]),q=(0,s.useCallback)(async()=>{if(o){if(!L&&!P)return void l({type:"SET_API_KEY_MODAL_OPEN",payload:!0});l({type:"CLEAR_ERROR"}),l({type:"SET_APP_STATE",payload:v.ANALYZING});try{let e=await p(o,c,u,x,L||void 0,t);l({type:"SET_ANALYSIS_RESULT",payload:e})}catch(t){console.error(t),l({type:"SET_ERROR",payload:t instanceof Error?t.message:e("errors.unexpectedError")}),l({type:"SET_APP_STATE",payload:v.ERROR})}}},[o,L,P,c,u,x,t,e]);(0,s.useCallback)(()=>{if(b){if(!L&&!P)return void l({type:"SET_API_KEY_MODAL_OPEN",payload:!0});l({type:"CLEAR_ERROR"}),l({type:"SET_APP_STATE",payload:v.SIZE_SELECTION}),setTimeout(()=>{document.getElementById("phase2-section")?.scrollIntoView({behavior:"smooth",block:"start"})},300)}},[b,L,P]);let J=(0,s.useCallback)(async()=>{if(!b)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 l({type:"SET_ERROR",payload:e("phase2.selectAtLeastOne")});let s=j[f],a=b.product_analysis,i=k[f],n=i?`${m}
|
|
102
|
+
|
|
103
|
+
${e("prompt.strategySupplement")}
|
|
104
|
+
${i}`:m;l({type:"CLEAR_ERROR"}),l({type:"SET_APP_STATE",payload:v.PLANNING});try{let e=await g(s,a,n,r,L||void 0,t);l({type:"SET_CONTENT_PLAN",payload:e}),setTimeout(()=>{document.getElementById("content-section")?.scrollIntoView({behavior:"smooth",block:"start"})},300)}catch(t){l({type:"SET_ERROR",payload:t instanceof Error?t.message:e("errors.contentPlanFailed")}),l({type:"SET_APP_STATE",payload:v.SIZE_SELECTION})}},[b,_,j,f,k,m,L,t,e]),Q=(0,s.useCallback)(e=>{l({type:"GO_TO_STEP",payload:e})},[]),ee=[{label:e("steps.analyze"),shortLabel:"01"},{label:e("steps.strategyFormat"),shortLabel:"02"},{label:e("steps.adjustGenerate"),shortLabel:"03"}],et=(()=>{switch(i){case v.IDLE:case v.ANALYZING:return 0;case v.RESULTS:case v.SIZE_SELECTION:return 1;case v.PLANNING:case v.SUITE_READY:return 2;default:return 0}})(),er=t=>{let{onClick:s,label:a}=t;return(0,r.jsxs)("button",{onClick:s,className:"flex items-center gap-1.5 text-sm text-gray-400 hover:text-white transition-colors group/back",children:[(0,r.jsx)("svg",{className:"w-4 h-4 transition-transform group-hover/back:-translate-x-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),(0,r.jsx)("span",{children:a||e("common.back")})]})};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)(N,{isOpen:R,onClose:()=>l({type:"SET_GUIDE_OPEN",payload:!1})}),(0,r.jsx)(D,{isOpen:I,onClose:()=>l({type:"SET_API_KEY_MODAL_OPEN",payload:!1}),onSave:$,serverHasKey:P}),(0,r.jsx)("header",{className:"w-full py-3 sm:py-4 sticky top-0 z-50 backdrop-blur-xl bg-black/60 border-b border-white/5",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.5 cursor-pointer group",onClick:()=>l({type:"SET_APP_STATE",payload:v.IDLE}),children:[(0,r.jsx)("div",{className:"w-7 h-7 flex items-center justify-center",children:(0,r.jsx)(H.default,{src:"/images/logo.svg",alt:"Logo",width:28,height:28,className:"w-full h-full object-contain"})}),(0,r.jsx)("h1",{className:"text-sm sm:text-base font-bold text-white/80 hidden sm:block group-hover:text-white transition-colors tracking-tight",children:e("common.appName")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,r.jsx)("button",{onClick:()=>l({type:"SET_API_KEY_MODAL_OPEN",payload:!0}),className:"text-gray-400 hover:text-white text-xs sm:text-sm font-medium transition-colors",children:P?L?e("header.apiSettingsCustom"):e("header.apiSettingsFree"):L?e("header.apiSettingsConnected"):e("header.apiSettings")}),(0,r.jsx)("a",{href:"https://github.com/supra126/IGiveUpOnLife",target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-full hover:bg-white/10 transition-colors","aria-label":"View on GitHub",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",className:"w-4.5 h-4.5 text-gray-500 hover:text-white transition-colors",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})})]})]})}),i===v.IDLE?null:(0,r.jsx)("div",{className:"w-full backdrop-blur-xl bg-black/60 border-b border-white/5 py-3 sticky top-[53px] 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:ee.map((e,t)=>{let a=t<et,l=t===et;return(0,r.jsxs)(s.default.Fragment,{children:[(0,r.jsxs)("div",{className:`flex items-center gap-2 ${a?"cursor-pointer group/step":""}`,onClick:()=>a&&Q(t),children:[(0,r.jsx)("div",{className:`
|
|
105
|
+
w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all duration-500
|
|
106
|
+
${a?"bg-blue-500 text-white group-hover/step:bg-blue-400 group-hover/step:scale-110":l?"bg-blue-500 text-white":"bg-white/5 text-gray-500 border border-white/10"}
|
|
107
|
+
`,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:`
|
|
108
|
+
text-sm font-medium transition-colors duration-300
|
|
109
|
+
${l?"text-white":a?"text-white group-hover/step:text-gray-300":"text-gray-500"}
|
|
110
|
+
`,children:e.label})]}),t<ee.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:`
|
|
111
|
+
absolute inset-y-0 left-0 bg-blue-500 transition-all duration-700 ease-out rounded-full
|
|
112
|
+
${t<et?"w-full":"w-0"}
|
|
113
|
+
`})})]},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-blue-500 flex items-center justify-center text-white font-bold text-sm",children:et+1}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-white font-bold text-sm",children:ee[et]?.label}),(0,r.jsx)("div",{className:"text-gray-500 text-xs",children:e("steps.stepOf").replace("{current}",String(et+1)).replace("{total}",String(ee.length))})]})]}),(0,r.jsx)("div",{className:"flex gap-1.5",children:ee.map((e,t)=>(0,r.jsx)("button",{onClick:()=>t<et&&Q(t),className:`
|
|
114
|
+
w-2.5 h-2.5 rounded-full transition-all duration-300
|
|
115
|
+
${t===et?"bg-blue-500 scale-110":t<et?"bg-blue-500/50 cursor-pointer hover:bg-blue-400/70":"bg-white/20"}
|
|
116
|
+
`},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 animate-slide-down",children:[(0,r.jsx)("span",{children:n}),(0,r.jsx)("button",{onClick:()=>l({type:"RESET_RESULTS"}),className:"text-sm underline hover:text-white",children:e("common.reset")})]}),i===v.ANALYZING&&(0,r.jsx)(Y,{}),i===v.IDLE&&(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center min-h-[60vh] md:text-center animate-fade-in-up",children:[(0,r.jsx)("h2",{className:"text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-gradient-hero serif mb-4 leading-[1.1] tracking-tight",children:e("home.heroTitle")}),(0,r.jsx)("h2",{className:"text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold text-white serif mb-8 leading-[1.1] tracking-tight",children:e("home.heroTitle2")}),(0,r.jsx)("p",{className:"text-gray-400 max-w-lg mx-auto mb-6 sm:mb-10 text-base sm:text-lg leading-relaxed",children:e("home.heroDescription")}),(0,r.jsx)(U,{imagePreview:d,productName:c,productInfo:u,productUrl:x,refCopy:m,showAnalyzeButton:!!o&&i===v.IDLE,onFileChange:W,onFileDrop:F,onClearImage:K,onProductNameChange:e=>l({type:"SET_INPUT",payload:{field:"productName",value:e}}),onProductInfoChange:e=>l({type:"SET_INPUT",payload:{field:"productInfo",value:e}}),onProductUrlChange:e=>l({type:"SET_INPUT",payload:{field:"productUrl",value:e}}),onRefCopyChange:e=>l({type:"SET_INPUT",payload:{field:"refCopy",value:e}}),onAnalyze:q})]}),(i===v.RESULTS||i===v.SIZE_SELECTION||i===v.PLANNING||i===v.SUITE_READY)&&(()=>{if(!b||!d)return null;let e=b.marketing_routes[f],t=i===v.RESULTS||i===v.SIZE_SELECTION;return(0,r.jsxs)("div",{className:"w-full max-w-6xl mx-auto px-4 pb-24 section-transition",children:[t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-8",children:(0,r.jsx)(er,{onClick:()=>Q(0)})}),(0,r.jsx)(w,{analysis:b.product_analysis,imageSrc:d}),(0,r.jsx)("div",{className:"mt-12 sm:mt-16",children:(0,r.jsx)(B,{routes:j,activeRouteIndex:f,routeSupplements:k,onSelectRoute:e=>l({type:"SET_ACTIVE_ROUTE",payload:e}),onUpdateRoute:(e,t)=>l({type:"UPDATE_EDITED_ROUTE",payload:{index:e,route:t}}),onUpdateSupplement:(e,t)=>l({type:"UPDATE_ROUTE_SUPPLEMENT",payload:{index:e,value:t}})})}),(0,r.jsx)("div",{className:"mt-16 sm:mt-20 pt-12 sm:pt-16 border-t border-white/5",id:"phase2-section",children:(0,r.jsx)(G,{sizeSelection:_,errorMsg:n,onSizeChange:(e,t)=>l({type:"SET_SIZE_SELECTION",payload:{ratio:e,checked:t}}),onConfirm:J,onBack:()=>Q(0)})})]}),i===v.PLANNING&&(0,r.jsx)(V,{routeName:e.route_name}),i===v.SUITE_READY&&E&&(0,r.jsxs)("div",{className:"relative section-transition",id:"content-section",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(er,{onClick:()=>Q(1)})}),(0,r.jsx)(O,{plan:E,onContentUpdate:e=>l({type:"SET_EDITED_CONTENT_SETS",payload:e}),apiKey:L,productImage:C,secondaryProduct:S,brandLogo:T,onProductImageChange:e=>l({type:"SET_PRODUCT_IMAGE",payload:e}),onSecondaryProductChange:e=>l({type:"SET_SECONDARY_PRODUCT",payload:e}),onBrandLogoChange:e=>l({type:"SET_BRAND_LOGO",payload:e}),marketingRoute:j[f]})]})]})})()]}),(0,r.jsx)("footer",{className:"border-t border-white/5 py-3 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:()=>l({type:"SET_GUIDE_OPEN",payload:!0}),className:"text-gray-500 hover:text-white text-xs font-medium transition-colors",children:e("header.guide")}),(0,r.jsx)("span",{className:"text-gray-700",children:"·"}),(0,r.jsx)(z,{})]})})]})}e.s(["default",()=>J],31713)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32491,e=>{e.v(JSON.parse('{"common":{"appName":"不想努力了","loading":"載入中...","error":"錯誤","success":"成功","cancel":"取消","close":"關閉","save":"儲存","reset":"重置","confirm":"確認","optional":"選填","required":"必填","unknownError":"未知錯誤","back":"上一步"},"header":{"guide":"使用方式","apiSettings":"連線努力","apiSettingsConnected":"連線努力 (已連線)","apiSettingsFree":"API 設定 (免費)","apiSettingsCustom":"API 設定 (自訂)"},"home":{"heroTitle":"打造完整品牌視覺資產?","heroTitle2":"不用,我不想努力了。","heroDescription":"讓 小GG 幫你結合產品識別、品牌故事與競品策略,你只需要負責呼吸就好"},"input":{"uploadOrTakePhoto":"上傳 / 拍照","dropToUpload":"放開以上傳圖片","supportedFormats":"支援 JPG, PNG","changeImage":"更換圖片","productName":"產品名稱","productNamePlaceholder":"例如:我大玫瑰洗面乳...","productInfo":"產品資訊(選填)","productInfoPlaceholder":"品牌故事、核心價值、產品特色...","productUrl":"產品網址(選填)","productUrlPlaceholder":"https://example.com/product","refCopy":"參考文案 / 競品參考(選填)","refCopyPlaceholder":"貼上同類型商品的熱銷文案,或競品官網內容。AI 將拆解其「說服邏輯」...","startButton":"啟動努力","clearImage":"清除圖片"},"analyzing":{"title":"小GG已上線,先讓他努力一下","description":"(正在假裝很專業地分析你的產品)"},"phase1":{"title":"讓我努力步驟一","selectHint":"選擇一條路線後點擊「繼續努力」","routeLabel":"努力方案","selected":"已選擇","select":"選擇","routeName":"路線名稱","headline":"主打標語","subhead":"副標題","styleDescription":"視覺風格","targetAudience":"目標受眾","supplement":"補充說明(選填)","supplementPlaceholder":"可以補充任何想法、特殊需求或調整方向...","editingRoute":"編輯詳細內容","continueButton":"繼續努力","retryButton":"再重新努力一次","processing":"哭勒..."},"phase2":{"title":"努力步驟二:選擇圖片尺寸","description":"請選擇您需要的圖片尺寸(可多選),每個尺寸將生成 3 組不同的內容方案","selectAtLeastOne":"請至少選擇一個圖片尺寸","confirmButton":"讓我努力一下","planningTitle":"不努力步驟二","planningDescription":"小GG正在爆肝寫腳本中,正依照","planningDescription2":"產出建議,先等著看看他的努力"},"sizes":{"1:1":{"name":"FB 貼文","ratio":"1:1 方形圖","description":"適合:FB 貼文、IG 輪播、電商主圖"},"9:16":{"name":"限時動態 / Stories","ratio":"9:16 直式長圖","description":"適合:IG Stories、Reels、手機全螢幕"},"4:5":{"name":"IG 貼文","ratio":"4:5 直式圖","description":"適合:IG Feed 主頁、優化手機瀏覽"},"16:9":{"name":"橫式貼文","ratio":"16:9 橫式長圖","description":"適合:封面、廣告圖片"},"1:1-commercial":{"name":"商業攝影","ratio":"1:1 方形圖","description":"適合:電商主圖、輪播圖、專業商品攝影"}},"contentSuite":{"settingsTitle":"爆肝產圖設定","settingsDescription":"上傳產品圖或品牌 Logo,讓 AI 生成圖片時使用(隨時可以調整)","mainProduct":"主產品圖片(選填)","secondaryProduct":"副產品圖片(選填)","secondaryProductHint":"與主產品融合展示","brandLogo":"品牌 Logo(選填)","clickToUpload":"點擊上傳","clickToUploadMain":"點擊上傳主產品","clickToUploadSecondary":"點擊上傳副產品","clickToUploadLogo":"點擊上傳品牌 Logo","changeImage":"更換圖片","changeLogo":"更換 Logo","reviewMode":"1. 內容來嘴看看","productionMode":"2. 爆肝產圖去","reviewTitle":"內容來嘴看看","reviewDescription":"檢查看看小GG剛剛生了什麼內容,標題不對味?內文有點怪?沒關係,你想改就改。修改後記得點擊「重新生成 Prompt」按鈕。","plan":"方案","sets":"組方案","title":"標題","titleLabel":"標題 (Title)","copy":"文案","copyLabel":"內文 (Copy)","visualSummary":"構圖摘要 (Visual Summary)","visualSummaryCommercial":"商業攝影模式","visualSummaryPlaceholder":"描述畫面構圖、背景、光線、氛圍等視覺元素...","visualSummaryHint":"修改後點擊「重新生成 Prompt」按鈕更新視覺提示詞","visualSummaryHintCommercial":"排列方式、構圖摘要修改後,點擊「重新生成 Prompt」按鈕更新視覺提示詞","visualPrompt":"視覺提示詞 (Prompt) - AI 生成","regeneratePrompt":"重新生成 Prompt","regenerating":"生成中...","arrangement":"排列方式","arrangementSingle":"單品特寫","arrangementSingleDesc":"單一產品置中展示","arrangementFan":"扇形展開","arrangementFanDesc":"多產品呈扇形排列","arrangementGrid":"整齊並排","arrangementGridDesc":"產品整齊排列成行","arrangementStack":"自然堆疊","arrangementStackDesc":"產品自然層疊擺放","arrangementCustom":"自訂","arrangementCustomDesc":"使用構圖摘要描述","reviewInfoTitle":"內容來嘴看看","reviewInfoDescription":"檢查看看小GG剛剛生了什麼內容,標題不對味?內文有點怪?沒關係,你想改就改。修改後記得點擊「重新生成 Prompt」按鈕。","regeneratePromptFailed":"重新生成 Prompt 失敗:"},"production":{"generateButton":"生成圖片","generating":"生成中...","pleaseWait":"請稍候片刻","uploadProductFirst":"請先上傳產品圖","uploadReferenceFirst":"請先上傳參考圖","generateFailed":"生成失敗","download":"下載","redraw":"重繪","showContent":"顯示內容(標題 + 文案)","titleInput":"標題","titlePlaceholder":"輸入標題","copyInput":"文案","copyPlaceholder":"輸入文案","promptMode":"提詞版","referenceMode":"參考版","referenceSettings":"參考圖設定","uploadReference":"上傳參考圖","changeReference":"更換參考圖","similarity":"相似度","referenceSimilarity":"參考圖相似度(參考版模式適用)","similarityLow":"低相似度","similarityLowDesc":"創意發揮","similarityMedium":"中等相似度","similarityMediumDesc":"適度參考","similarityHigh":"高相似度","similarityHighDesc":"完全模仿","globalSettings":"全局產圖設定","referenceByRatio":"每個尺寸可以設定不同的參考圖","generationMode":"產圖模式","textSettings":"文字設定","titleWeight":"標題字重","copyWeight":"文案字重","expand":"展開","collapse":"收合","perCardModeHint":"點擊「展開」可針對每張圖片獨立設定產圖模式與參考圖","resolution":"輸出解析度","resolution1K":"1K","resolution1KDesc":"1024px","resolution2K":"2K","resolution2KDesc":"2048px","resolution4K":"4K","resolution4KDesc":"4096px"},"apiKeyModal":{"title":"API Key 設定","freeMode":"免費模式已啟用","freeModeDesc":"本站提供免費 API 額度,您可以直接使用而無需輸入自己的 API Key。","freeModeDesc2":"如需更高額度或避免流量限制,可輸入自己的 Key。","enterKeyOptional":"輸入您自己的 Google Gemini API Key(選填):","enterKeyOptionalDesc":"自訂 Key 可享有獨立額度,不受免費模式的流量限制。","enterKeyRequired":"請輸入您的 Google Gemini API Key 以啟用 AI 功能。","enterKeyRequiredDesc":"您的 Key 僅會儲存在瀏覽器中,不會傳送至伺服器。","labelOptional":"Gemini API Key","saveButton":"儲存設定","useFreeMode":"改用免費模式","clearKey":"清除 Key","getApiKey":"取得 API Key"},"guideModal":{"title":"使用方式","apiKeyNotice":"關於 API 金鑰","apiKeyDesc":"本工具使用 Google Gemini API。你可以在","apiKeyLink":"Google AI Studio","apiKeyDesc2":"免費取得 API 金鑰。輸入後會儲存在瀏覽器中,關閉分頁後自動清除。","step1Title":"上傳與資訊輸入|一次填完所有資訊","step1Desc":"上傳產品圖後,可以選填以下資訊(填越多,AI 越懂你):","step2Title":"Phase 1:策略選擇|秒速決定視覺方向","step2Desc":"AI 會分析產品後,立即提供","step2Desc2":"三條截然不同的視覺策略","step2Desc3":",每條路線包含:","step3Title":"選擇圖片尺寸|多平台支援","step3Desc":"選擇策略路線後,系統會自動進入尺寸選擇畫面,勾選你需要的尺寸:","step4Title":"上傳產品圖與 Logo|產圖前置準備","step4Desc":"在「爆肝產圖設定」區域,上傳以下素材(這些設定會在所有方案間共用):","step5Title":"腳本審閱模式|內容來嘴看看","step5Desc":"切換至「內容來嘴看看」模式,可以:","step6Title":"圖片製作模式|爆肝產圖","step6Desc":"切換至「爆肝產圖」模式,針對每個方案可以:"},"language":{"zh":"繁中","en":"EN","switchToEnglish":"Switch to English","switchToChinese":"切換至繁體中文"},"productCard":{"originalImage":"原始圖片","analysisReport":"分析報告","keyFeatures":"核心賣點"},"promptCard":{"generateFailed":"圖片生成失敗","loadRefImageFailed":"讀取參考圖片失敗","generatedImage":"已生成圖片","downloadImage":"下載圖片","aiDrawing":"AI 正在繪製中...","waitingGenerate":"等待生成","designSummary":"設計摘要","version":"版本","noSummary":"暫無摘要","refImageOptional":"參考圖片(選填)","remove":"移除","refImage":"參考圖片","uploadRefHint":"+ 上傳(例如:指定顏色/Logo)","prompt":"提示詞(Prompt)","collapse":"收起","edit":"編輯","editPromptPlaceholder":"編輯提示詞...","generating":"生成中...","regenerate":"重新生成","generateVisual":"生成視覺圖","clickToEdit":"點擊編輯"},"errors":{"unexpectedError":"分析過程中發生了意外錯誤。","contentPlanFailed":"內容規劃失敗","apiKeyInvalid":"API 金鑰無效或已過期。請檢查您的金鑰設定。","rateLimitExceeded":"請求過於頻繁,已達到 API 限制。請稍後再試。","networkError":"網路連線錯誤。請檢查您的網路連線後再試。","requestTimeout":"請求超時。請稍後再試,或嘗試生成較簡單的內容。","contentBlocked":"內容被安全過濾器阻擋。請嘗試調整您的輸入內容。","serviceUnavailable":"AI 服務暫時無法使用。請稍後再試。","apiKeyMissing":"找不到 API 金鑰。請在設定中輸入金鑰,或聯繫管理員。","rateLimitWarning":"請求過於頻繁,請稍後再試","noResponse":"Gemini 沒有回應文字","invalidFormat":"AI 返回了無效的格式,且自動修復失敗。請再試一次。","rateLimitRetry":"請求過於頻繁,請在 {seconds} 秒後再試","cannotReadImage":"無法讀取圖片","staticModeApiKeyRequired":"靜態版本需要提供 API 金鑰","invalidImageFormat":"無效的圖片格式","failedToGetCanvas":"無法取得 Canvas 上下文","failedToLoadImage":"載入圖片失敗","planningFailed":"規劃失敗","missingContentSets":"API 返回格式錯誤:缺少 content_sets 陣列","missingSelectedSizes":"API 返回格式錯誤:缺少 selected_sizes 陣列","noImageGenerated":"未生成圖片","promptRegenerateFailed":"重新生成視覺提示詞失敗","invalidInput":"輸入無效"},"prompt":{"strategySupplement":"【策略補充說明】"},"steps":{"analyze":"分析","strategy":"策略","format":"格式","strategyFormat":"策略與格式","adjust":"調整","generate":"產圖","adjustGenerate":"調整與產圖","stepOf":"第 {current} 步,共 {total} 步"},"extend":{"title":"延伸至其他尺寸","sourceImage":"來源圖片","selectRatios":"選擇要延伸的尺寸","startExtend":"開始延伸","generating":"正在生成中...","generatedImages":"延伸圖片","socialCopy":"社群發文建議","headline":"主打標語","subhead":"副標題","copy":"複製","copied":"已複製","retry":"重試","addMore":"延伸更多尺寸","done":"完成","extendButton":"延伸","openInNewTab":"在新視窗開啟","sizeLabels":{"fb":"FB 貼文","story":"限時動態","ig":"IG 貼文","landscape":"橫式貼文","commercial":"商業攝影"},"sizeDescriptions":{"square":"1:1 方形圖","vertical":"9:16 直式","portrait":"4:5 直式","horizontal":"16:9 橫式","commercial":"1:1 商品"},"hashtags":{"newProduct":"#新品上市","recommended":"#好物推薦","mustBuy":"#必買清單","quality":"#品質保證"},"socialTemplates":{"instagram":"Instagram","facebook":"Facebook","story":"限時動態"},"generationFailed":"生成失敗"},"errorPage":{"title":"發生錯誤","description":"抱歉,應用程式發生了一些問題。請嘗試重新載入頁面。","errorCode":"錯誤代碼","retry":"重試","backToHome":"返回首頁","globalErrorTitle":"應用程式錯誤","globalErrorDescription":"抱歉,發生了嚴重的錯誤。請重新整理頁面或稍後再試。","reload":"重新載入"},"seo":{"appName":"不想努力了 I Give Up","fullTitle":"不想努力了 I Give Up - AI Marketing Content Generator","titleTemplate":"%s | 不想努力了 I Give Up","description":"使用 AI 快速生成產品行銷素材。","keywords":{"marketing":"產品行銷","ai":"AI 生成"},"ogImageAlt":"不想努力了 I Give Up - AI Marketing Content Generator"},"guide":{"step1":{"title":"上傳與資訊輸入|一次填完所有資訊","description":"上傳產品圖後,可以選填以下資訊(填越多,AI 越懂你):","items":{"productName":"產品名稱(必填)","productInfo":"產品資訊(選填):品牌故事、核心價值、產品特色等","productUrl":"產品網址(選填):AI 可能會參考該網站內容","refCopy":"參考文案(選填):貼上競品或同類型商品的熱銷文案,AI 將拆解其說服邏輯"},"tip":"💡 小提示:所有資訊一次填完,就不用在流程中重複輸入了"},"step2":{"title":"Phase 1:策略選擇|秒速決定視覺方向","description":"AI 會分析產品後,立即提供三條截然不同的視覺策略,每條路線包含:","items":{"routeName":"路線名稱:策略取向的一句話概括","headline":"主打標語:適合做標題、廣告文案的句子","subhead":"副標題:補充說明或進一步引導","styleDescription":"視覺風格:描述整體畫面氛圍、構圖方向","targetAudience":"目標受眾:推測適合的消費族群"}},"step3":{"title":"選擇圖片尺寸|多平台支援","description":"選擇策略路線後,系統會自動進入尺寸選擇畫面,勾選你需要的尺寸:","items":{"square":"1:1 方形圖(FB 貼文、IG 輪播、電商主圖)","story":"9:16 直式長圖(IG Stories、Reels、手機全螢幕)","portrait":"4:5 直式圖(IG Feed 主頁、優化手機瀏覽)","landscape":"16:9 橫式長圖(封面、廣告圖片)","commercial":"1:1 商業攝影(電商主圖、輪播圖、專業商品攝影)"}},"step4":{"title":"上傳產品圖與 Logo|產圖前置準備","description":"在「爆肝產圖設定」區域,上傳以下素材(這些設定會在所有方案間共用):","items":{"mainProduct":"主產品圖片:主要的產品照片","secondaryProduct":"副產品圖片(選填):與主產品融合展示的第二個產品","brandLogo":"品牌 Logo(選填):AI 會自動將 Logo 放置在圖片四角之一"}},"step5":{"title":"腳本審閱模式|內容來嘴看看","description":"切換至「內容來嘴看看」模式,可以:","items":{"editContent":"編輯標題、文案、構圖摘要等內容","arrangement":"選擇產品排列方式(商業攝影模式)","regeneratePrompt":"修改後點擊「重新生成 Prompt」按鈕更新視覺提示詞"}},"step6":{"title":"圖片製作模式|爆肝產圖","description":"切換至「爆肝產圖」模式,針對每個方案可以:","items":{"generateImage":"點擊卡片生成圖片","modes":"選擇產圖模式:","promptMode":"• 提詞版:根據 AI 生成的 Prompt 創作","referenceMode":"• 參考版:上傳參考圖,設定相似度等級","textSettings":"文字設定:調整標題與文案的字重","actions":"產圖後可以:下載圖片、重繪、延伸至其他尺寸"}}},"imageUtils":{"windowBlocked":"無法打開新窗口,可能被瀏覽器阻擋","imagePreview":"圖片預覽","previewImage":"預覽圖片"},"arrangement":{"single":"單品特寫","singleDesc":"單一產品置中展示","fan":"扇形展開","fanDesc":"多產品呈扇形排列","grid":"整齊並排","gridDesc":"產品整齊排列成行","stack":"自然堆疊","stackDesc":"產品自然層疊擺放","custom":"自訂","customDesc":"使用構圖摘要描述"},"fontWeights":{"regular":"Regular","medium":"Medium","bold":"Bold","black":"Black","regular400":"Regular (400)","medium500":"Medium (500)","bold700":"Bold (700)","black900":"Black (900)"},"stepIndicator":{"step01":"步驟 01","step02":"步驟 02","step03":"步驟 03","step04":"步驟 04"},"alt":{"preview":"預覽","loading":"載入中","source":"來源","productBackground":"產品背景","reference":"參考圖"},"guideV2":{"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 秒)","滑鼠移至圖片上方可下載或重繪"]}]}},"contentSuiteV2":{"arrangementPriorityNote":"【產品排列方式 - 最高優先級】"},"extendTemplates":{"styleLabel":"風格:","suitableFor":"適合:","clickToLearnMore":"點擊連結了解更多","dmForDiscount":"私訊小編享專屬優惠","styleFeature":"▸ 風格特色:","targetAudience":"▸ 適合對象:","limitedOffer":"▸ 限時優惠進行中","freeShipping":"▸ 全館滿額免運","comment1ForDm":"留言 +1 小編私訊您","learnMoreLink":"立即了解更多:[連結]","swipeUpToLearnMore":"上滑了解更多"}}'))},807,e=>{e.v(JSON.parse('{"common":{"appName":"I Give Up","loading":"Loading...","error":"Error","success":"Success","cancel":"Cancel","close":"Close","save":"Save","reset":"Reset","confirm":"Confirm","optional":"Optional","required":"Required","unknownError":"Unknown error","back":"Back"},"header":{"guide":"Guide","apiSettings":"Connection Hustle","apiSettingsConnected":"Hustling (Connected)","apiSettingsFree":"API Settings (Free)","apiSettingsCustom":"API Settings (Custom)"},"home":{"heroTitle":"Build a complete brand visual asset?","heroTitle2":"Nope. I quit.","heroDescription":"Let AI Director handle the boring stuff—product identity, brand story, competitor strategy. Your only job? Keep breathing."},"input":{"uploadOrTakePhoto":"Upload / Take Photo","dropToUpload":"Drop to upload","supportedFormats":"Supports JPG, PNG","changeImage":"Change Image","productName":"Product Name","productNamePlaceholder":"e.g., Rose Face Wash...","productInfo":"Product Info (Optional)","productInfoPlaceholder":"Brand story, core values, product features...","productUrl":"Product URL (Optional)","productUrlPlaceholder":"https://example.com/product","refCopy":"Reference Copy / Competitor Reference (Optional)","refCopyPlaceholder":"Paste successful ad copy from similar products. AI will analyze its persuasion logic...","startButton":"Let\'s Hustle","clearImage":"Clear Image"},"analyzing":{"title":"AI minion deployed. Let it grind.","description":"(Faking expertise like a pro)"},"phase1":{"title":"Step 1: The Grind Begins","selectHint":"Select a route and click \\"Keep Grinding\\"","routeLabel":"Route","selected":"Selected","select":"Select","routeName":"Route Name","headline":"Headline","subhead":"Subhead","styleDescription":"Visual Style","targetAudience":"Target Audience","supplement":"Additional Notes (Optional)","supplementPlaceholder":"Add any ideas, special requirements, or adjustments...","editingRoute":"Editing details","continueButton":"Keep Grinding","retryButton":"Ugh, Again","processing":"Sweating..."},"phase2":{"title":"Step 2: Select Image Sizes","description":"Select the image sizes you need (multiple selection). Each size will generate 3 different content sets.","selectAtLeastOne":"Please select at least one image size","confirmButton":"Let me grind","planningTitle":"Step 2: Still Grinding","planningDescription":"AI is burning the midnight oil on","planningDescription2":"Please wait for the results"},"sizes":{"1:1":{"name":"FB Post","ratio":"1:1 Square","description":"For: FB posts, IG carousel, e-commerce main image"},"9:16":{"name":"Stories","ratio":"9:16 Vertical","description":"For: IG Stories, Reels, full-screen mobile"},"4:5":{"name":"IG Post","ratio":"4:5 Portrait","description":"For: IG Feed, optimized for mobile"},"16:9":{"name":"Landscape","ratio":"16:9 Horizontal","description":"For: Covers, ad banners"},"1:1-commercial":{"name":"Commercial","ratio":"1:1 Square","description":"For: E-commerce main, carousel, professional product photography"}},"contentSuite":{"settingsTitle":"Overtime Image Settings","settingsDescription":"Upload product images or brand logo for AI to use (can be adjusted anytime)","mainProduct":"Main Product (Optional)","secondaryProduct":"Secondary Product (Optional)","secondaryProductHint":"Combined display with main product","brandLogo":"Brand Logo (Optional)","clickToUpload":"Click to upload","clickToUploadMain":"Click to upload main product","clickToUploadSecondary":"Click to upload secondary","clickToUploadLogo":"Click to upload brand logo","changeImage":"Change image","changeLogo":"Change logo","reviewMode":"1. Judge My Work","productionMode":"2. Crunch Time","reviewTitle":"Roast This Content","reviewDescription":"See what your AI minion cooked up. Hate the title? Copy feels off? Just fix it. Click \\"Regenerate Prompt\\" when done.","plan":"Plan","sets":"sets","title":"Title","titleLabel":"Title","copy":"Copy","copyLabel":"Copy","visualSummary":"Visual Summary","visualSummaryCommercial":"Commercial Mode","visualSummaryPlaceholder":"Describe composition, background, lighting, atmosphere...","visualSummaryHint":"Click \\"Regenerate Prompt\\" after editing to update","visualSummaryHintCommercial":"Click \\"Regenerate Prompt\\" after changing arrangement or visual summary","visualPrompt":"Visual Prompt - AI Generated","regeneratePrompt":"Regenerate Prompt","regenerating":"Generating...","arrangement":"Arrangement","arrangementSingle":"Single","arrangementSingleDesc":"Single product centered","arrangementFan":"Fan","arrangementFanDesc":"Fan-shaped arrangement","arrangementGrid":"Grid","arrangementGridDesc":"Organized grid layout","arrangementStack":"Stack","arrangementStackDesc":"Natural stacking","arrangementCustom":"Custom","arrangementCustomDesc":"Use visual summary","reviewInfoTitle":"Roast This Content","reviewInfoDescription":"See what your AI minion cooked up. Hate the title? Copy feels off? Just fix it. Click \\"Regenerate Prompt\\" when done.","regeneratePromptFailed":"Failed to regenerate prompt: "},"production":{"generateButton":"Generate Image","generating":"Generating...","pleaseWait":"Please wait","uploadProductFirst":"Please upload product image first","uploadReferenceFirst":"Please upload reference image first","generateFailed":"Generation failed","download":"Download","redraw":"Regenerate","showContent":"Show content (Title + Copy)","titleInput":"Title","titlePlaceholder":"Enter title","copyInput":"Copy","copyPlaceholder":"Enter copy","promptMode":"Prompt","referenceMode":"Reference","referenceSettings":"Reference Settings","uploadReference":"Upload reference","changeReference":"Change reference","similarity":"Similarity","referenceSimilarity":"Reference Similarity (for Reference mode)","similarityLow":"Low","similarityLowDesc":"Creative freedom","similarityMedium":"Medium","similarityMediumDesc":"Moderate reference","similarityHigh":"High","similarityHighDesc":"Close match","globalSettings":"Global Settings","referenceByRatio":"Set different reference images for each size","generationMode":"Generation Mode","textSettings":"Text Settings","titleWeight":"Title Weight","copyWeight":"Copy Weight","expand":"Expand","collapse":"Collapse","perCardModeHint":"Click \\"Expand\\" to set generation mode and reference image for each card","resolution":"Output Resolution","resolution1K":"1K","resolution1KDesc":"1024px","resolution2K":"2K","resolution2KDesc":"2048px","resolution4K":"4K","resolution4KDesc":"4096px"},"apiKeyModal":{"title":"API Key Settings","freeMode":"Free Mode Enabled","freeModeDesc":"This site provides free API quota. You can use it without entering your own API Key.","freeModeDesc2":"For higher quota or to avoid rate limits, enter your own Key.","enterKeyOptional":"Enter your Google Gemini API Key (Optional):","enterKeyOptionalDesc":"Custom Key enjoys independent quota without free mode limitations.","enterKeyRequired":"Please enter your Google Gemini API Key to enable AI features.","enterKeyRequiredDesc":"Your Key is stored locally in the browser only, not sent to any server.","labelOptional":"Gemini API Key","saveButton":"Save Settings","useFreeMode":"Use Free Mode","clearKey":"Clear Key","getApiKey":"Get API Key"},"guideModal":{"title":"User Guide","apiKeyNotice":"About API Key","apiKeyDesc":"This tool uses Google Gemini API. You can get a free API key at","apiKeyLink":"Google AI Studio","apiKeyDesc2":"The key is stored in your browser and cleared when you close the tab.","step1Title":"Upload & Input | Fill in all info at once","step1Desc":"After uploading product image, you can fill in the following (the more you fill, the better AI understands):","step2Title":"Phase 1: Strategy Selection | Instant visual direction","step2Desc":"After analyzing your product, AI provides","step2Desc2":"three different visual strategies","step2Desc3":", each including:","step3Title":"Select Image Sizes | Multi-platform support","step3Desc":"After selecting a strategy, choose the sizes you need:","step4Title":"Upload Product & Logo | Pre-generation setup","step4Desc":"In the \\"Image Generation Settings\\" area, upload these assets (shared across all plans):","step5Title":"Review Mode | Check the content","step5Desc":"Switch to \\"Review Content\\" mode to:","step6Title":"Production Mode | Generate images","step6Desc":"Switch to \\"Generate Images\\" mode to:"},"language":{"zh":"繁中","en":"EN","switchToEnglish":"Switch to English","switchToChinese":"切換至繁體中文"},"productCard":{"originalImage":"Original Image","analysisReport":"Analysis Report","keyFeatures":"Key Features"},"promptCard":{"generateFailed":"Image generation failed","loadRefImageFailed":"Failed to load reference image","generatedImage":"Generated image","downloadImage":"Download image","aiDrawing":"AI is drawing...","waitingGenerate":"Waiting","designSummary":"Design Summary","version":"Version","noSummary":"No summary","refImageOptional":"Reference Image (Optional)","remove":"Remove","refImage":"Reference image","uploadRefHint":"+ Upload (e.g., specify color/logo)","prompt":"Prompt","collapse":"Collapse","edit":"Edit","editPromptPlaceholder":"Edit prompt...","generating":"Generating...","regenerate":"Regenerate","generateVisual":"Generate Visual","clickToEdit":"Click to edit"},"errors":{"unexpectedError":"An unexpected error occurred during analysis.","contentPlanFailed":"Content planning failed","apiKeyInvalid":"API key is invalid or expired. Please check your key settings.","rateLimitExceeded":"Too many requests. API limit reached. Please try again later.","networkError":"Network connection error. Please check your connection and try again.","requestTimeout":"Request timed out. Please try again later or try generating simpler content.","contentBlocked":"Content was blocked by safety filters. Please adjust your input.","serviceUnavailable":"AI service is temporarily unavailable. Please try again later.","apiKeyMissing":"API key not found. Please enter your key in settings or contact administrator.","rateLimitWarning":"Too many requests, please try again later","noResponse":"Gemini returned no response","invalidFormat":"AI returned invalid format and auto-repair failed. Please try again.","rateLimitRetry":"Too many requests, please try again in {seconds} seconds","cannotReadImage":"Cannot read image","staticModeApiKeyRequired":"Static mode requires API key","invalidImageFormat":"Invalid image format","failedToGetCanvas":"Failed to get canvas context","failedToLoadImage":"Failed to load image for conversion","planningFailed":"Planning failed","missingContentSets":"API returned invalid format: missing content_sets array","missingSelectedSizes":"API returned invalid format: missing selected_sizes array","noImageGenerated":"No image was generated","promptRegenerateFailed":"Failed to regenerate visual prompt","invalidInput":"Invalid input"},"prompt":{"strategySupplement":"[Strategy Notes]"},"steps":{"analyze":"Analyze","strategy":"Strategy","format":"Format","strategyFormat":"Strategy & Format","adjust":"Adjust","generate":"Generate","adjustGenerate":"Adjust & Generate","stepOf":"Step {current} of {total}"},"extend":{"title":"Extend to Other Sizes","sourceImage":"Source Image","selectRatios":"Select sizes to extend","startExtend":"Start Extend","generating":"Generating...","generatedImages":"Extended Images","socialCopy":"Social Post Suggestions","headline":"Headline","subhead":"Subhead","copy":"Copy","copied":"Copied","retry":"Retry","addMore":"Extend More Sizes","done":"Done","extendButton":"Extend","openInNewTab":"Open in new tab","sizeLabels":{"fb":"FB Post","story":"Stories","ig":"IG Post","landscape":"Landscape","commercial":"Commercial"},"sizeDescriptions":{"square":"1:1 Square","vertical":"9:16 Vertical","portrait":"4:5 Portrait","horizontal":"16:9 Horizontal","commercial":"1:1 Product"},"hashtags":{"newProduct":"#NewProduct","recommended":"#Recommended","mustBuy":"#MustHave","quality":"#QualityAssured"},"socialTemplates":{"instagram":"Instagram","facebook":"Facebook","story":"Story"},"generationFailed":"Generation failed"},"errorPage":{"title":"An Error Occurred","description":"Sorry, something went wrong with the application. Please try reloading the page.","errorCode":"Error Code","retry":"Retry","backToHome":"Back to Home","globalErrorTitle":"Application Error","globalErrorDescription":"Sorry, a critical error occurred. Please refresh the page or try again later.","reload":"Reload"},"seo":{"appName":"I Give Up","fullTitle":"I Give Up - AI Marketing Content Generator","titleTemplate":"%s | I Give Up","description":"Generate product marketing materials quickly with AI.","keywords":{"marketing":"Product Marketing","ai":"AI Generation"},"ogImageAlt":"I Give Up - AI Marketing Content Generator"},"guide":{"step1":{"title":"Upload & Input | Fill in all info at once","description":"After uploading product image, you can fill in the following (the more you fill, the better AI understands):","items":{"productName":"Product Name (Required)","productInfo":"Product Info (Optional): Brand story, core values, product features, etc.","productUrl":"Product URL (Optional): AI may reference the website content","refCopy":"Reference Copy (Optional): Paste successful ad copy from competitors, AI will analyze its persuasion logic"},"tip":"💡 Tip: Fill in all info at once to avoid repeating input during the process"},"step2":{"title":"Phase 1: Strategy Selection | Instant visual direction","description":"After analyzing your product, AI provides three different visual strategies, each including:","items":{"routeName":"Route Name: One-sentence strategy summary","headline":"Headline: Suitable for titles and ad copy","subhead":"Subhead: Additional explanation or guidance","styleDescription":"Visual Style: Overall atmosphere and composition direction","targetAudience":"Target Audience: Predicted consumer demographic"}},"step3":{"title":"Select Image Sizes | Multi-platform support","description":"After selecting a strategy, choose the sizes you need:","items":{"square":"1:1 Square (FB posts, IG carousel, e-commerce main)","story":"9:16 Vertical (IG Stories, Reels, full-screen mobile)","portrait":"4:5 Portrait (IG Feed, optimized for mobile)","landscape":"16:9 Horizontal (Covers, ad banners)","commercial":"1:1 Commercial (E-commerce main, carousel, professional product photography)"}},"step4":{"title":"Upload Product & Logo | Pre-generation setup","description":"In the \\"Image Generation Settings\\" area, upload these assets (shared across all plans):","items":{"mainProduct":"Main Product: Primary product photo","secondaryProduct":"Secondary Product (Optional): Second product to display with main product","brandLogo":"Brand Logo (Optional): AI will automatically place logo in one of four corners"}},"step5":{"title":"Review Mode | Check the content","description":"Switch to \\"Review Content\\" mode to:","items":{"editContent":"Edit title, copy, visual summary, etc.","arrangement":"Select product arrangement (Commercial mode)","regeneratePrompt":"Click \\"Regenerate Prompt\\" button after editing to update visual prompt"}},"step6":{"title":"Production Mode | Generate images","description":"Switch to \\"Generate Images\\" mode to:","items":{"generateImage":"Click card to generate image","modes":"Select generation mode:","promptMode":"• Prompt Mode: Create based on AI-generated prompt","referenceMode":"• Reference Mode: Upload reference image, set similarity level","textSettings":"Text Settings: Adjust title and copy font weight","actions":"After generation: Download image, regenerate, extend to other sizes"}}},"imageUtils":{"windowBlocked":"Unable to open new window, possibly blocked by browser","imagePreview":"Image Preview","previewImage":"Preview Image"},"arrangement":{"single":"Single","singleDesc":"Single product centered","fan":"Fan","fanDesc":"Fan-shaped arrangement","grid":"Grid","gridDesc":"Organized grid layout","stack":"Stack","stackDesc":"Natural stacking","custom":"Custom","customDesc":"Use visual summary"},"fontWeights":{"regular":"Regular","medium":"Medium","bold":"Bold","black":"Black","regular400":"Regular (400)","medium500":"Medium (500)","bold700":"Bold (700)","black900":"Black (900)"},"stepIndicator":{"step01":"STEP 01","step02":"STEP 02","step03":"STEP 03","step04":"STEP 04"},"alt":{"preview":"Preview","loading":"Loading","source":"Source","productBackground":"Product background","reference":"Reference"},"guideV2":{"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"]}]}},"contentSuiteV2":{"arrangementPriorityNote":"【Product Arrangement - Highest Priority】"},"extendTemplates":{"styleLabel":"Style:","suitableFor":"Suitable for:","clickToLearnMore":"Click link to learn more","dmForDiscount":"DM for exclusive offer","styleFeature":"▸ Style Feature:","targetAudience":"▸ Target Audience:","limitedOffer":"▸ Limited time offer","freeShipping":"▸ Free shipping on orders","comment1ForDm":"Comment +1 for DM","learnMoreLink":"Learn more: [Link]","swipeUpToLearnMore":"Swipe up to learn more"}}'))},29712,e=>{"use strict";var t=e.i(80506),o=e.i(778),r=e.i(32491),i=e.i(807);let a=(0,o.createContext)(void 0),n="locale",s={zh:r.default,en:i.default};function l(e){let{children:r}=e,[i,l]=(0,o.useState)("en"),[c,d]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=localStorage.getItem(n);e&&("zh"===e||"en"===e)?l(e):l("undefined"==typeof navigator?"en":(navigator.language||navigator.userLanguage||"").startsWith("zh")?"zh":"en"),d(!0)},[]);let p=(0,o.useCallback)(e=>{l(e),localStorage.setItem(n,e)},[]),m=(0,o.useCallback)(()=>{p("zh"===i?"en":"zh")},[i,p]),u=s[i],g=(0,o.useCallback)(e=>(function(e,t){let o=t.split("."),r=e;for(let e of o)if(!r||"object"!=typeof r||!(e in r))return t;else r=r[e];return"string"==typeof r?r:t})(u,e),[u]);return c?(0,t.jsx)(a.Provider,{value:{locale:i,setLocale:p,toggleLocale:m,t:g,messages:u},children:r}):null}function c(){let e=(0,o.useContext)(a);if(void 0===e)throw Error("useLocale must be used within a LocaleProvider");return e}e.s(["LocaleProvider",()=>l,"useLocale",()=>c])},53348,e=>{"use strict";var t=e.i(80506),o=e.i(778),r=e.i(29712);function i(e){let{error:i,reset:a}=e,{t:n}=(0,r.useLocale)();return(0,o.useEffect)(()=>{console.error("Global application error:",i)},[i]),(0,t.jsx)("html",{children:(0,t.jsx)("body",{className:"bg-[#0a0a0f]",children:(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"max-w-md w-full bg-[#15151a] border border-red-500/20 rounded-2xl p-8 text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,t.jsx)("svg",{className:"w-8 h-8 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),(0,t.jsx)("h2",{className:"text-xl font-bold text-white mb-2",children:n("errorPage.globalErrorTitle")}),(0,t.jsx)("p",{className:"text-gray-400 mb-6 text-sm",children:n("errorPage.globalErrorDescription")}),i.digest&&(0,t.jsxs)("p",{className:"text-xs text-gray-600 mb-4 font-mono",children:[n("errorPage.errorCode"),": ",i.digest]}),(0,t.jsxs)("div",{className:"flex gap-3 justify-center",children:[(0,t.jsx)("button",{onClick:a,className:"px-6 py-2 bg-blue-600 hover:bg-blue-700 text-white font-bold rounded-lg transition-colors",children:n("errorPage.retry")}),(0,t.jsx)("button",{onClick:()=>window.location.href="/",className:"px-6 py-2 bg-white/10 hover:bg-white/20 text-white font-bold rounded-lg transition-colors",children:n("errorPage.reload")})]})]})})})})}function a(e){let{error:o,reset:a}=e;return(0,t.jsx)(r.LocaleProvider,{children:(0,t.jsx)(i,{error:o,reset:a})})}e.s(["default",()=>a])}]);
|