PageSourceSearch

https://wow2share.vercel.app/_next/static/chunks/app/dashboard/page-e8cbd7823f896273.js

js wow2share.vercel.app collected 2026-10-03 08:04:18 UTC 50,348 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[105],{646:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(7565).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},1976:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(7565).A)("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]])},2523:(e,s,a)=>{"use strict";a.d(s,{p:()=>c});var t=a(5155),l=a(2115),r=a(9434);let c=l.forwardRef((e,s)=>{let{className:a,type:l,...c}=e;return(0,t.jsx)("input",{type:l,className:(0,r.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:s,...c})});c.displayName="Input"},4186:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(7565).A)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},5169:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(7565).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},5518:(e,s,a)=>{"use strict";a.d(s,{default:()=>P});var t=a(5155),l=a(2115),r=a(6874),c=a.n(r),n=a(285),i=a(7251),d=a(5695),o=a(6695),x=a(6126),m=a(6424),h=a(4165),p=a(9267),u=a(9434);let g={blue:{hover:"hover:border-blue-500 hover:bg-blue-50",icon:"text-blue-600",tag:"bg-blue-100 text-blue-800"},pink:{hover:"hover:border-pink-500 hover:bg-pink-50",icon:"text-pink-600",tag:"bg-pink-100 text-pink-800"},purple:{hover:"hover:border-purple-500 hover:bg-purple-50",icon:"text-purple-600",tag:"bg-purple-100 text-purple-800"},green:{hover:"hover:border-green-500 hover:bg-green-50",icon:"text-green-600",tag:"bg-green-100 text-green-800"},orange:{hover:"hover:border-orange-500 hover:bg-orange-50",icon:"text-orange-600",tag:"bg-orange-100 text-orange-800"},red:{hover:"hover:border-red-500 hover:bg-red-50",icon:"text-red-600",tag:"bg-red-100 text-red-800"}};function j(e){let{href:s,icon:a,title:l,description:r,tags:i,variant:d,isDesktop:o=!0}=e,m=g[d];return o?(0,t.jsx)(c(),{href:s,children:(0,t.jsxs)(n.$,{variant:"outline",className:(0,u.cn)("h-32 w-full flex flex-col transition-all",m.hover),children:[(0,t.jsx)("div",{className:"w-full flex justify-end p-2 pb-0 gap-1",children:i.map((e,s)=>(0,t.jsx)(x.E,{variant:"secondary",className:(0,u.cn)("text-xs text-center",m.tag),children:e},s))}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-2 pb-2",children:[(0,t.jsx)(a,{className:(0,u.cn)("h-8 w-8",m.icon)}),(0,t.jsx)("span",{className:"text-lg font-semibold",children:l}),(0,t.jsx)("span",{className:"text-sm text-gray-600 text-center px-2",children:r})]})]})}):(0,t.jsx)(c(),{href:s,children:(0,t.jsxs)(n.$,{variant:"outline",className:(0,u.cn)("h-20 w-full flex flex-col transition-all",m.hover),children:[(0,t.jsx)("div",{className:"w-full flex justify-end p-1 pb-0 gap-1",children:i.map((e,s)=>(0,t.jsx)(x.E,{variant:"secondary",className:(0,u.cn)("text-xs text-center",m.tag),children:e},s))}),(0,t.jsxs)("div",{className:"flex-1 flex items-center gap-3 px-2 pb-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)(a,{className:(0,u.cn)("h-6 w-6",m.icon)})}),(0,t.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"font-semibold truncate",children:l}),(0,t.jsx)("div",{className:"text-sm text-gray-600 line-clamp-2",children:r})]})]})]})})}var N=a(2523),f=a(3311),b=a(1497),v=a(5196),y=a(4357),w=a(381),k=a(5690),A=a(646),C=a(5169),T=a(7565);let S=(0,T.A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var z=a(7714);function U(e){let{isOpen:s,onClose:a,onComplete:r}=e,[c,m]=(0,l.useState)(1),[p,u]=(0,l.useState)(""),[g,j]=(0,l.useState)(""),[T,U]=(0,l.useState)(""),[$,R]=(0,l.useState)(!1),{user:L}=(0,i.A)(),F=(0,d.useRouter)(),D=["\uD83D\uDE80 新しいAIツール「wow2share」をリリースしました!\n\n創作者の皆さん、投稿文を考える時間がもったいないと思いませんか?\n\n✨ 特徴\n• 記事から自動で投稿文生成\n• X・Threads対応\n• 5分→20秒の時短効果\n\n無料トライアル実施中","\uD83D\uDCA1 創作に集中したい全ての人へ。\n\n記事は書けるのに、SNS投稿文で悩んでいませんか?\n\n\uD83C\uDFAF wow2shareなら\n• 自動で魅力的な投稿文を生成\n• 複数パターンから選択可能\n• ワンクリックでSNS投稿\n\n時間を創作に使いましょう ✨"],E=()=>{c<6&&m(c+1)},Z=()=>{u(""),j(""),U(""),E()},X=async()=>
1{if(L){R(!0);try{if(p.trim()&&await (0,z.uT)(L.uid,{settingType:"note",noteUserId:p.trim()}),g.trim()&&T.trim()){let e=(e=>{if(e.endsWith("/rss"))return e;let s=e.match(/^https:\/\/note\.com\/([a-zA-Z0-9_]+)\/m\/([a-zA-Z0-9_]+)\/?$/);if(s)return"https://note.com/".concat(s[1],"/m/").concat(s[2],"/rss");let a=e.match(/^https:\/\/note\.com\/([a-zA-Z0-9_]+)\/?$/);return a?"https://note.com/".concat(a[1],"/rss"):e})(T.trim());await (0,z.KG)(L.uid,{mediaType:"note",url:e,name:g.trim()})}}catch(e){console.error("Note settings save error:",e)}finally{R(!1),E()}}},_=async()=>{let e="https://note.com/nihei1206/n/n992df41fd584";if(p.trim())try{let a="https://note.com/".concat(p.trim(),"/rss"),t=await fetch("https://r.jina.ai/".concat(a),{headers:{Accept:"application/json"}});if(t.ok){var s;let a=((null==(s=(await t.json()).data)?void 0:s.content)||"").match(/https:\/\/note\.com\/[^\/]+\/n\/[a-zA-Z0-9]+/);a&&(e=a[0])}}catch(e){console.error("RSS取得エラー:",e)}r(),F.push("/tools/note-own?url=".concat(encodeURIComponent(e)))},[I,O]=(0,l.useState)(null),M=async(e,s)=>{let a=D[e],t="".concat("wow2share - 創作者のためのAI投稿文生成ツール","\n").concat("https://wow2share.vercel.app");try{await navigator.clipboard.writeText(t),O(e),setTimeout(()=>O(null),2e3)}catch(e){console.error("Failed to copy to clipboard:",e)}if(alert("いまから".concat("x"===s?"X":"Threads","へ移動しますが、すでに記事のタイトルとURLがコピーされています。そのまま投稿欄でペーストしてください。")),"x"===s){let e=encodeURIComponent(a);window.open("https://twitter.com/intent/tweet?text=".concat(e),"_blank")}else if("threads"===s){let e=encodeURIComponent(a);window.open("https://www.threads.net/intent/post?text=".concat(e),"_blank")}};return(0,t.jsx)(h.lG,{open:s,onOpenChange:a,children:(0,t.jsxs)(h.Cf,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[(0,t.jsx)(h.c7,{children:(0,t.jsxs)(h.L3,{className:"flex items-center justify-between",children:["チュートリアル",(0,t.jsxs)(x.E,{variant:"secondary",children:[c," / ",6]})]})}),(0,t.jsx)("div",{className:"px-2 py-4",children:(()=>{switch(c){case 1:return(0,t.jsxs)("div",{className:"text-center space-y-4",children:[(0,t.jsx)("div",{className:"mx-auto w-16 h-16 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center",children:(0,t.jsx)(f.A,{className:"h-8 w-8 text-white"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"wow2shareへようこそ!"}),(0,t.jsxs)("p",{className:"text-gray-600 leading-relaxed max-w-md mx-auto",children:["このツールは、",(0,t.jsx)("strong",{children:"「頭の中toパブリック」"}),"をコンセプトに、思考を形にして世界に発信することを、かつてないほど簡単に実現するツールを目指しています。"]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mt-4",children:(0,t.jsx)("p",{className:"text-sm text-blue-800",children:"\uD83D\uDCA1 あなたのアイデアや知識を、効果的なSNS投稿に変換して、多くの人に届けましょう!"})})]});case 2:return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsx)(b.A,{className:"mx-auto h-12 w-12 text-green-600 mb-2"}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-900",children:"SNSへパッと投稿ができます"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm",children:"生成された投稿文をワンクリックでSNSに投稿できます"})]}),(0,t.jsx)("div",{className:"space-y-3",children:D.map((e,s)=>(0,t.jsx)(o.Zp,{className:"relative",children:(0,t.jsx)(o.Wu,{className:"p-4",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-gray-700 whitespace-pre-line",children:e}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(n.$,{size:"sm",variant:"outline",className:"flex-1",onClick:()=>M(s,"x"),children:[I===s?(0,t.jsx)(v.A,{className:"w-4 h-4 mr-2"}):(0,t.jsx)("svg",{className:"w-4 h-4 mr-2",viewBox:"0 0 24 24",fill:"
1currentColor",children:(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),I===s?"コピー済み!":"Xに投稿"]}),(0,t.jsxs)(n.$,{size:"sm",variant:"outline",className:"flex-1",onClick:()=>M(s,"threads"),children:[I===s?(0,t.jsx)(v.A,{className:"w-4 h-4 mr-2"}):(0,t.jsx)(y.A,{className:"w-4 h-4 mr-2"}),I===s?"コピー済み!":"Threads"]})]})]})})},s))})]});case 3:return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(w.A,{className:"mx-auto h-12 w-12 text-blue-600 mb-2"}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-900",children:"note設定(任意)"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm",children:"あなたのnoteIDとよく読んでいるマガジンのタイトルとURLを記入してください"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"noteId",className:"block text-sm font-medium text-gray-700 mb-1",children:"あなたのnote ID"}),(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-3 py-2 border border-r-0 border-gray-300 bg-gray-50 text-gray-500 text-sm rounded-l-md",children:"https://note.com/"}),(0,t.jsx)(N.p,{id:"noteId",placeholder:"username",value:p,onChange:e=>u(e.target.value),className:"rounded-l-none"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"magazineTitle",className:"block text-sm font-medium text-gray-700 mb-1",children:"よく読むマガジンのタイトル"}),(0,t.jsx)(N.p,{id:"magazineTitle",placeholder:"例:テックマガジン",value:g,onChange:e=>j(e.target.value)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"magazineUrl",className:"block text-sm font-medium text-gray-700 mb-1",children:"マガジンのURL"}),(0,t.jsx)(N.p,{id:"magazineUrl",placeholder:"https://note.com/username/m/magazine123",value:T,onChange:e=>U(e.target.value)})]})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(n.$,{onClick:X,disabled:$,className:"flex-1",children:$?"保存中...":"設定を保存"}),(0,t.jsx)(n.$,{variant:"outline",onClick:Z,className:"flex-1",children:"スキップ"})]})]});case 4:return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(b.A,{className:"mx-auto h-12 w-12 text-orange-600 mb-2"}),(0,t.jsx)("h2",{className:"text-xl font-bold text-gray-900",children:"フィードバック機能で回数を増やそう"}),(0,t.jsx)("p",{className:"text-gray-600 text-sm",children:"生成結果へのフィードバックで、具体性に応じて使える回数が追加されます"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(o.Zp,{className:"border-orange-200 bg-orange-50",children:(0,t.jsx)(o.Wu,{className:"p-4",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("h3",{className:"font-medium text-gray-900 text-sm",children:"\uD83D\uDCDD フィードバック例"}),(0,t.jsx)("div",{className:"bg-white rounded-lg p-3 border",children:(0,t.jsx)("p",{className:"text-xs text-gray-700",children:"「もう少しカジュアルな表現にして、具体的な数値を入れた方が説得力が増すと思います。また、ターゲット層を明確にした内容にしてほしいです。」"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"具体性スコア"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex",children:[[1,2,3,4].map(e=>(0,t.jsx)("div",{className:"w-2 h-2 bg-orange-400 rounded-full mr-1"},e)),(0,t.jsx)("div",{className:"w-2 h-2 bg-gray-300 rounded-full"})]}),(0,t.jsx)("span",{className:"font-medium text-orange-600",children:"4/5 (80%)"})]})]}),(0,t.jsx)("div",{className:"bg-green-100 border border-green-300 rounded-lg p-2",children:(0,t.jsx)("p",{className:"text-xs text-green-800 font-medium",children:"✨ 具体性80%なので、4回数を付与しました!"})})]})})}),(0,t.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900 text-sm mb-2",children:"\uD83D\uDCCA 評価基準"}),(0,t.jsxs)("div",{className:"space-y-2 text-xs",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"「いいね」「ありがとう」"}),(0,t.jsx)("span",{className:"text-red-600",children:"0回 (0%)"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"感想レベルの内容"}),(0,t.jsx)("span",{className:"text-orange-600",children:"1-2回 (20-40%)"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-gray-600",children:"具体的な改善提案"}),(0,t.jsx)("span",{className:"text-green-600",children:"3-5回 (60-100%)"})]})]})]})]}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:(0,t.jsxs)("p",{className:"text-sm text-blue-800",children:["\uD83D\uDCA1 ",(0,t.jsx)("strong",{children:"具体的で建設的なフィードバック"}),"ほど多くの回数がもらえます。あなたの意見でツールをより良くしていきましょう!"]})})]});case 5:return(0,t.jsxs)("div",{className:"text-center space-y-4",children:[(0,t.jsx)("div",{className:"mx-auto w-16 h-16 bg-gradient-to-br from-green-500 to-blue-600 rounded-full flex items-center justify-center",children:(0,t.jsx)(k.A,{className:"h-8 w-8 text-white"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"それでは始めましょう!"}),(0,t.jsx)("p",{className:"text-gray-600 leading-relaxed max-w-md mx-auto",children:"設定が完了しました。実際にツールを使って、記事から効果的なSNS投稿文を生成してみましょう。"}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mt-4",children:(0,t.jsx)("p",{className:"text-sm text-blue-800",children:"\uD83C\uDFAF 次のステップで、実際のnote記事を使った投稿文生成を体験できます"})}),(0,t.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 mt-3",children:[(0,t.jsx)("p",{className:"text-sm text-green-800 font-medium mb-2",children:"✨ 新機能:URL to HTML画像生成"}),(0,t.jsx)("p",{className:"text-xs text-green-700",children:"記事URLから自動でSNS用の解説画像を生成できるようになりました!記事の内容を視覚的に魅力的な画像として表現し、より多くの人の
1関心を引くことができます。"})]})]});case 6:return(0,t.jsxs)("div",{className:"text-center space-y-4",children:[(0,t.jsx)("div",{className:"mx-auto w-16 h-16 bg-gradient-to-br from-green-500 to-emerald-600 rounded-full flex items-center justify-center",children:(0,t.jsx)(A.A,{className:"h-8 w-8 text-white"})}),(0,t.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"チュートリアル完了!"}),(0,t.jsx)("p",{className:"text-gray-600 leading-relaxed max-w-md mx-auto",children:"お疲れさまでした!それでは実際にツールを使って投稿文を生成してみましょう。"}),(0,t.jsx)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 mt-4",children:(0,t.jsx)("p",{className:"text-sm text-green-800",children:"\uD83C\uDF89 wow2shareで、あなたの思考を世界に発信しましょう!"})})]});default:return null}})()}),(0,t.jsxs)("div",{className:"flex justify-between p-6 pt-0",children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[c>1&&(0,t.jsxs)(n.$,{variant:"outline",onClick:()=>{c>1&&m(c-1)},size:"sm",children:[(0,t.jsx)(C.A,{className:"h-4 w-4 mr-1"}),"戻る"]}),c<6&&(0,t.jsx)(n.$,{variant:"ghost",onClick:()=>{r(),F.push("/dashboard")},size:"sm",children:"スキップ"})]}),(0,t.jsx)("div",{className:"flex gap-2",children:c<6?(0,t.jsxs)(n.$,{onClick:E,size:"sm",children:["次へ",(0,t.jsx)(S,{className:"h-4 w-4 ml-1"})]}):(0,t.jsxs)(n.$,{onClick:_,size:"sm",className:"bg-green-600 hover:bg-green-700",children:["開始する",(0,t.jsx)(k.A,{className:"h-4 w-4 ml-1"})]})})]})]})})}var $=a(7100),R=a(1976);let L=(0,T.A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var F=a(9588),D=a(3786),E=a(3417),Z=a(7434),X=a(1154),_=a(4186),I=a(556),O=a(1366),M=a(1539);let W=[{href:"/tools/note-own",icon:$.A,title:"あなたのnoteをシェア",description:"あなたの記事やアイデアを即座に",tags:["note"],variant:"blue"},{href:"/tools/audio",icon:R.A,title:"いいものをシェア",description:"あなたがいいと思ったものを紹介",tags:["URL"],variant:"pink"},{href:"/tools/genArticle",icon:L,title:"ひらめきを形に",description:"AIとの対話や雑多なメモから記事を生成",tags:["md","txt","AI"],variant:"purple"},{href:"/tools/audio-to-article",icon:F.A,title:"音声→記事変換",description:"音声選択はできるが、開発中...",tags:["audio","mp3","m4a"],variant:"red"},{href:"/tools/note-others",icon:D.A,title:"他の人のnoteをシェア",description:"感動した創作物をシェア",tags:["note"],variant:"green"},{href:"/tools/tech-article",icon:E.A,title:"技術記事をシェア",description:"Qiita、Zenn等の技術記事を紹介",tags:["tech","qiita","zenn"],variant:"orange"},{href:"/tools/url-to-document",icon:Z.A,title:"url→SNS用解説画像生成",description:"開発中...",tags:["URL","document","HTML"],variant:"blue"}];function P(e){let{userEmail:s="[email protected]",userName:a="ユーザー"}=e,{user:r}=(0,i.A)();(0,d.useRouter)();let[u,g]=(0,l.useState)(""),[N,b]=(0,l.useState)(!1),[w,k]=(0,l.useState)(null),[A,C]=(0,l.useState)(null),[T,S]=(0,l.useState)(null),[R,L]=(0,l.useState)(!1),[F,D]=(0,l.useState)(!1),[E,P]=(0,l.useState)([]),[B,H]=(0,l.useState)(!0),[J,q]=(0,l.useState)(!1),[G,K]=(0,l.useState)(null),[Q,V]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(null),et=(0,l.useCallback)(async()=>{if(null==r?void 0:r.uid)try{H(!0);let{history:e}=await (0,z.wL)(r.uid,10);P(e)}catch(e){console.error("履歴の取得に失敗しました:",e)}finally{H(!1)}},[null==r?void 0:r.uid]);(0,l.useEffect)(()=>{et()},[et]),(0,l.useEffect)(()=>{(null==r?void 0:r.uid)&&(async()=>{try{let e=await fetch("/api/user-status",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:r.uid})});if(e.ok){let s=await e.json();ea(s),console.log("Tutorial status check:",{tutorial_started:s.tutorial_started,shouldShowTutorial:!s.tutorial_started}),(!1===s.tutorial_started||void 0===s.tutorial_started)&&ee(!0)}}catch(e){console.error("User status check error:",e)}})()},[null==r?void 0:r.uid]);let el=async()=>
1{if(null==r?void 0:r.uid)try{(await fetch("/api/update-tutorial",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:r.uid,started:!0})})).ok&&(ee(!1),es&&ea({...es,tutorial_started:!0}),window.dispatchEvent(new Event("userStatusUpdated")))}catch(e){console.error("Tutorial complete error:",e)}},er=async e=>{if(!(null==r?void 0:r.uid))return void alert("ユーザー認証が必要です");let s=e||u;if(!s.trim())try{let e=await navigator.clipboard.readText();if(!(e&&e.trim()))return void alert("URLを入力するか、クリップボードにURLをコピーしてください");s=e,g(e)}catch(e){alert("URLを入力してください");return}b(!0);try{let e=await fetch("/api/generate-content",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:s,uid:r.uid})}),a=await e.json();b(!1),e.ok&&a.success?(k({promotion:a.promotion||[],summary:a.summary||[],teaser:a.teaser||[],social:a.social||[],articleTitle:a.articleTitle,sourceUrl:a.sourceUrl}),V(!0),et()):(console.error("生成エラー:",a.error),alert("投稿文の生成に失敗しました: ".concat(a.error)))}catch(e){b(!1),console.error("API呼び出しエラー:",e),alert("投稿文の生成中にエラーが発生しました")}},ec=async(e,s)=>{try{await navigator.clipboard.writeText(s),C(e),setTimeout(()=>C(null),2e3)}catch(e){console.error("コピーに失敗しました:",e)}},en=async(e,s)=>{try{let e=(null==w?void 0:w.articleTitle)||"記事タイトル",s=(null==w?void 0:w.sourceUrl)||"",a="".concat(e,"\n").concat(s);await navigator.clipboard.writeText(a),console.log("クリップボードにコピーしました:",a)}catch(e){console.error("クリップボードコピーに失敗しました:",e)}let a=encodeURIComponent(e),t="";"X"===s?t="https://twitter.com/intent/tweet?text=".concat(a):"Threads"===s&&(t="https://www.threads.net/intent/post?text=".concat(a)),t&&(alert("いまから".concat(s,"へ移動しますが、すでに記事のタイトルとURLがコピーされています。そのまま投稿欄でペーストしてください。")),window.open(t,"_blank","width=600,height=400"))},ei=e=>{K(e),q(!0)},ed=()=>{D(!1),er()},eo=()=>{g(""),S(null),L(!1),D(!1),k(null)};return(0,t.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-8",children:[(0,t.jsx)("section",{className:"bg-card border rounded-lg mb-6 lg:hidden overflow-hidden",children:(0,t.jsxs)("div",{className:"px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h2",{className:"text-sm font-medium text-foreground",children:"最近の履歴"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!B&&E.length>0&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"←スワイプ"}),(0,t.jsx)(c(),{href:"/dashboard/history",children:(0,t.jsx)(n.$,{variant:"ghost",size:"sm",className:"text-xs",children:"すべて見る"})})]})]}),(0,t.jsx)("div",{className:"w-full overflow-x-auto horizontal-scroll",children:(0,t.jsx)("div",{className:"flex space-x-3 pb-2",style:{minWidth:"max-content"},children:B?Array.from({length:3}).map((e,s)=>(0,t.jsx)(o.Zp,{className:"w-36 flex-shrink-0",children:(0,t.jsxs)(o.Wu,{className:"p-3",children:[(0,t.jsx)("div",{className:"h-4 bg-muted rounded animate-pulse mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-muted rounded animate-pulse mb-2"}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("div",{className:"h-4 w-8 bg-muted rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-8 bg-muted rounded animate-pulse"})]})]})},"loading-".concat(s))):0===E.length?(0,t.jsxs)("div",{className:"w-full text-center py-4",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"まだ生成履歴がありません"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"ツールで投稿を生成すると、ここに履歴が表示されます"})]}):E.map(e=>(0,t.jsx)(o.Zp,{className:"w-36 flex-shrink-0 cursor-pointer hover:shadow-md transition-shadow",onClick:()=>ei(e),children:(0,t.jsxs)(o.Wu,{className:"p-3",children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-foreground line-clamp-2 leading-relaxed",children:e.articleTitle?e.articleTitle:e.sourceUrl?e.sourceUrl.length>30?e.sourceUrl.substring(0,30)+"...":e.sourceUrl:"生成済みコンテンツ"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e.createdAt.toDate().toLocaleDateString("ja-JP")}),(0,t.jsx)("div",{className:"flex gap-1 mt-2",children:(0,t.jsx)(x.E,{variant:"outline",className:"text-xs px-1",children:"own"===e.sourceType?"自分":"他者"})})]})},e.id))})})]})}),(0,t.jsxs)("div",{className:"flex-1 overflow-auto",children:[(0,t.jsx)("div",{className:"hidden lg:block max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-8",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 lg:gap-8",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 space-y-4 sm:sp
1ace-y-6",children:[!T&&!N&&!w&&(0,t.jsxs)(o.Zp,{children:[(0,t.jsx)(o.aR,{children:(0,t.jsx)(o.ZB,{className:"text-center text-xl",children:"利用可能なツール"})}),(0,t.jsx)(o.Wu,{children:(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:W.map((e,s)=>(0,t.jsx)(j,{href:e.href,icon:e.icon,title:e.title,description:e.description,tags:e.tags,variant:e.variant,isDesktop:!0},s))})})]}),F&&!N&&(0,t.jsxs)(o.Zp,{children:[(0,t.jsx)(o.aR,{children:(0,t.jsxs)(o.ZB,{className:"flex items-center gap-2",children:[(0,t.jsx)(Z.A,{className:"h-5 w-5"}),"URLを入力してください"]})}),(0,t.jsxs)(o.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"宣伝したいコンテンツのURL"}),(0,t.jsx)("input",{type:"url",placeholder:"https://note.com/username/n/...",value:u,onChange:e=>g(e.target.value),className:"w-full px-3 py-2 border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)(n.$,{onClick:ed,className:"flex-1",children:"6パターン生成"}),(0,t.jsx)(n.$,{variant:"ghost",onClick:eo,children:"キャンセル"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground text-center mt-2",children:"空欄のまま生成ボタンを押すと、クリップボードから自動でペーストされます"})]})]}),T&&!R&&u&&!N&&!w&&(0,t.jsx)(o.Zp,{children:(0,t.jsx)(o.Wu,{className:"pt-6",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"入力されたURL:"}),(0,t.jsx)(n.$,{variant:"ghost",size:"sm",onClick:()=>{g(""),S(null)},children:"クリア"})]}),(0,t.jsx)("div",{className:"p-3 bg-muted rounded-md",children:(0,t.jsx)("p",{className:"text-sm font-mono break-all",children:u})}),(0,t.jsx)(n.$,{onClick:()=>er(),className:"w-full",children:"6パターン生成"})]})})}),N&&(0,t.jsx)(o.Zp,{children:(0,t.jsx)(o.Wu,{className:"py-12",children:(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-4",children:[(0,t.jsx)(X.A,{className:"h-12 w-12 animate-spin text-primary"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-lg font-medium text-foreground",children:"AIが投稿文を生成中..."}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"あと数秒お待ちください"})]})]})})})]}),(0,t.jsx)("div",{className:"lg:space-y-6",children:(0,t.jsxs)(o.Zp,{children:[(0,t.jsx)(o.aR,{className:"pb-4",children:(0,t.jsxs)(o.ZB,{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-lg",children:[(0,t.jsx)(_.A,{className:"h-5 w-5"}),"生成履歴"]}),(0,t.jsx)(c(),{href:"/dashboard/history",children:(0,t.jsx)(n.$,{variant:"outline",size:"sm",children:"もっと見る"})})]})}),(0,t.jsx)(o.Wu,{className:"space-y-3",children:B?Array.from({length:3}).map((e,s)=>(0,t.jsxs)("div",{className:"border-l-2 border-border pl-3 pb-3 p-2 -ml-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-1",children:[(0,t.jsx)("div",{className:"h-3 w-16 bg-muted rounded animate-pulse"}),(0,t.jsx)("div",{className:"h-4 w-12 bg-muted rounded animate-pulse"})]}),(0,t.jsx)("div",{className:"h-4 bg-muted rounded animate-pulse mb-2"}),(0,t.jsx)("div",{className:"h-4 w-3/4 bg-muted rounded animate-pulse mb-2"}),(0,t.jsx)("div",{className:"h-4 w-16 bg-muted rounded animate-pulse"})]},"loading-".concat(s))):0===E.length?(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"まだ生成履歴がありません"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"ツールで投稿を生成すると、ここに履歴が表示されます"})]}):E.slice(0,5).map(e=>(0,t.jsxs)("div",{className:"border-l-2 border-border pl-3 pb-3 cursor-pointer hover:bg-accent rounded-r-md p-2 -ml-2",onClick:()=>ei(e),children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:e.createdAt.toDate().toLocaleDateString("ja-JP")}),(0,t.jsx)(x.E,{variant:"outline",className:"text-xs",children:"own"===e.sourceType?"自分":"他者"})]}),(0,t.jsx)("p",{className:"text-sm text-foreground line-clamp-2 leading-relaxed",children:e.articleTitle||e.sourceUrl||"生成済みコンテンツ"})]},e.id))})]})})]})}),(0,t.jsxs)("div",{className:"lg:hidden px-4 py-4",children:[!T&&!N&&!w&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("h2",{className:"text-xl font-bold text-center",children:"利用可能なツール"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:W.map((e,s)=>
1(0,t.jsx)(j,{href:e.href,icon:e.icon,title:e.title,description:e.description,tags:e.tags,variant:e.variant,isDesktop:!1},s))})]}),F&&!N&&(0,t.jsxs)(o.Zp,{children:[(0,t.jsx)(o.aR,{children:(0,t.jsx)(o.ZB,{className:"text-center",children:"URLを入力してください"})}),(0,t.jsxs)(o.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"宣伝したいコンテンツのURL"}),(0,t.jsx)("input",{type:"url",placeholder:"https://note.com/username/n/...",value:u,onChange:e=>g(e.target.value),className:"w-full px-3 py-3 border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(n.$,{onClick:ed,className:"w-full py-3",children:"6パターン生成"}),(0,t.jsx)(n.$,{variant:"ghost",onClick:eo,className:"w-full",children:"キャンセル"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:"空欄のまま生成ボタンを押すと、クリップボードから自動でペーストされます"})]})]})]}),(w||N)&&!Q&&(0,t.jsxs)(o.Zp,{children:[(0,t.jsx)(o.aR,{className:"pb-4",children:(0,t.jsxs)(o.ZB,{className:"flex items-center gap-2 text-lg",children:[(0,t.jsx)("span",{children:"生成結果"}),(0,t.jsx)(x.E,{variant:"secondary",children:"8パターン"})]})}),(0,t.jsx)(o.Wu,{children:N?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[(0,t.jsx)(X.A,{className:"h-12 w-12 animate-spin text-primary"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-lg font-medium text-foreground",children:"AIが投稿文を生成中..."}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"少々お待ちください"})]})]}):w?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-base font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)(f.A,{className:"h-4 w-4 text-purple-600"}),"プロモーション投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-purple-500/20 text-purple-700 text-xs",children:"2パターン"})]}),(0,t.jsx)("div",{className:"space-y-3",children:w.promotion.map((e,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("promotion-".concat(s),e),className:"gap-1 text-xs px-2",children:A==="promotion-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"済"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(I.A,{className:"h-3 w-3"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(O.A,{className:"h-3 w-3"}),"Th"]})]})]})]},"promotion-".concat(s)))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-base font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)(Z.A,{className:"h-4 w-4 text-primary"}),"要約投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-primary/20 text-primary text-xs",children:"2パターン"})]}),(0,t.jsx)("div",{className:"space-y-3",children:w.summary.map((e,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("summary-".concat(s),e),className:"gap-1 text-xs px-2",children:A==="summary-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"済"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(I.A,{className:"h-3 w-3"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(O.A,{className:"h-3 w-3"}),"Th"]})]})]})]},"summary-".concat(s)))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-base font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)(M.A,{className:"h-4 w-4 text-orange-600"}),"ティーザー投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-orange-500/20 text-orange-700 text-xs",children:"2パターン"})]}),(0,t.jsx)("div",{className:"space-y-3",children:w.teaser.map((e,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("teaser-".concat(s),e),className:"gap-1 text-xs px-2",children:A==="teaser-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"済"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(I.A,{className:"h-3 w-3"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(O.A,{className:"h-3 w-3"}),"Th"]})]})]})]},"teaser-".concat(s)))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-base font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)($.A,{className:"h-4 w-4 text-green-600"}),"SNS投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-green-500/20 text-green-700 text-xs",children:"2パターン"})]}),(0,t.jsx)("div",{className:"space-y-3",children:w.social.map((e,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("social-".concat(s),e),className:"gap-1 text-xs px-2",children:A==="social-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"済"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(I.A,{className:"h-3 w-3"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-1 text-xs px-2",children:[(0,t.jsx)(O.A,{className:"h-3 w-3"}),"Th"]})]})]})]},"social-".concat(s)))})]}),(0,t.jsx)(n.$,{onClick:eo,variant:"outline",className:"w-full mt-4",children:"新しく生成する"})]}):null})]})]})]}),(0,t.jsx)(p.A,{isOpen:J,onOpenChange:q,generation:G,showReuseButton:!0,onReuse:e=>{g(e),q(!1)}}),(0,t.jsx)(h.lG,{open:Q,onOpenChange:V,children:(0,t.jsxs)(h.Cf,{className:"max-w-4xl max-h-[90vh] flex flex-col bg-card p-0",children:[(0,t.jsx)("div",{className:"p-6 pb-0",children:(0,t.jsx)(h.c7,{children:(0,t.jsxs)(h.L3,{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"生成結果"}),(0,t.jsx)(x.E,{variant:"secondary",children:"8パターン"})]})})}),(0,t.jsx)(m.F,{className:"flex-1 overflow-y-auto p-6",children:(0,t.jsx)("div",{className:"w-full",children:w&&(0,t.jsxs)("div",{className:"space-y-6 px-2",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)(f.A,{className:"h-5 w-5 text-green-600"}),"プロモーション投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-green-500/20 text-green-700",children:"2パターン"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:w.promotion.map((e,s)=>(0,t.jsxs)("div",{className:"border border-border rounded-lg p-4 space-y-3 bg-card shadow-sm",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("promotion-".concat(s),e),className:"gap-2",children:A==="promotion-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー済み"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(I.A,{className:"h-4 w-4"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(O.A,{className:"h-4 w-4"}),"Threads"]})]})]})]},"promotion-".concat(s)))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)(Z.A,{className:"h-5 w-5 text-primary"}),"要約投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-primary/20 text-primary",children:"2パターン"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:w.summary.map((e,s)=>(0,t.jsxs)("div",{className:"border border-border rounded-lg p-4 space-y-3 bg-card shadow-sm",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("summary-".concat(s),e),className:"gap-2",children:A==="summary-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー済み"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(I.A,{className:"h-4 w-4"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(O.A,{className:"h-4 w-4"}),"Threads"]})]})]})]},"summary-".concat(s)))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)(M.A,{className:"h-5 w-5 text-orange-600"}),"ティーザー投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-orange-500/20 text-orange-700",children:"2パターン"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:w.teaser.map((e,s)=>(0,t.jsxs)("div",{className:"border border-border rounded-lg p-4 space-y-3 bg-card shadow-sm",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("teaser-".concat(s),e),className:"gap-2",children:A==="teaser-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー済み"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(I.A,{className:"h-4 w-4"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(O.A,{className:"h-4 w-4"}),"Threads"]})]})]})]},"teaser-".concat(s)))})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-lg font-semibold text-foreground flex items-center gap-2",children:[(0,t.jsx)($.A,{className:"h-5 w-5 text-purple-600"}),"SNS投稿",(0,t.jsx)(x.E,{variant:"secondary",className:"bg-purple-500/20 text-purple-700",children:"2パターン"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:w.social.map((e,s)=>(0,t.jsxs)("div",{className:"border border-border rounded-lg p-4 space-y-3 bg-card shadow-sm",children:[(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap leading-relaxed",children:e}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[e.length,"文字"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(n.$,{variant:"outline",size:"sm",onClick:()=>ec("social-".concat(s),e),className:"gap-2",children:A==="social-".concat(s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー済み"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.A,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"コピー"})]})}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"X"),size:"sm",className:"bg-black hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(I.A,{className:"h-4 w-4"}),"X"]}),(0,t.jsxs)(n.$,{onClick:()=>en(e,"Threads"),size:"sm",className:"bg-gray-700 hover:bg-gray-800 text-white gap-2",children:[(0,t.jsx)(O.A,{className:"h-4 w-4"}),"Threads"]})]})]})]},"social-".concat(s)))})]})]})})})]})}),(0,t.jsx)(U,{isOpen:Y,onClose:()=>ee(!1),onComplete:el})]})}},5690:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(7565).A)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},9093:(e,s,a)=>{Promise.resolve().then(a.bind(a,5518)),Promise.resolve().then(a.bind(a,6926))},9267:(e,s,a)=>{"use strict";a.d(s,{A:()=>j});var t=a(5155),l=a(2115),r=a(4165),c=a(6424),n=a(285),i=a(6126),d=a(3786),o=a(133),x=a(3311),m=a(7434),h=a(1539),p=a(7100),u=a(2456),g=a(8970);function j(e){var s;let{isOpen:a,onOpenChange:j,generation:N,showReuseButton:f=!1,onReuse:b}=e,[v,y]=(0,l.useState)(null),[w,k]=(0,l.useState)(!1),[A,C]=(0,l.useState)(""),T=async(e,s)=>{if(N)try{let a="".concat(s,"\n\n").concat(N.articleTitle,"\n").concat(N.sourceUrl);await navigator.clipboard.writeText(a),y(e),setTimeout(()=>y(null),2e3)}catch(e){console.error("コピーに失敗しました:",e)}},S=async(e,s)=>{if(N)try{let a="".concat(N.articleTitle,"\n").concat(N.sourceUrl);await navigator.clipboard.writeText(a);let t=encodeURIComponent(e),l="";"X"===s?l="https://twitter.com/intent/tweet?text=".concat(t):"Threads"===s&&(l="https://www
1.threads.net/intent/post?text=".concat(t)),l&&(alert("いまから".concat(s,"へ移動しますが、すでに記事のタイトルとURLがコピーされています。そのまま投稿欄でペーストしてください。")),window.open(l,"_blank","width=600,height=400"))}catch(e){console.error("SNS投稿の準備に失敗しました:",e)}};return N?(0,t.jsxs)(r.lG,{open:a,onOpenChange:j,children:[(0,t.jsxs)(r.Cf,{className:"max-w-4xl max-h-[90vh] flex flex-col bg-gray-50 p-0",children:[(0,t.jsx)("div",{className:"p-6 pb-0",children:(0,t.jsxs)(r.c7,{children:[(0,t.jsxs)(r.L3,{className:"flex items-center gap-2",children:[N.articleTitle||((null==(s=N.sourceType)?void 0:s.includes("others"))?"URLコンテンツから生成":"生成結果"),(0,t.jsxs)(i.E,{variant:"secondary",children:[N.generatedContent.length,"パターン"]})]}),N.sourceUrl&&(0,t.jsx)("div",{className:"text-sm text-gray-600",children:(0,t.jsxs)("a",{href:N.sourceUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-blue-600 hover:text-blue-800",children:[(0,t.jsx)(d.A,{className:"h-4 w-4"}),"元のページを確認"]})})]})}),(0,t.jsx)(c.F,{className:"flex-1 overflow-y-auto p-6",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"space-y-6 px-2",children:[f&&(0,t.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[N.articleTitle&&(0,t.jsx)("h3",{className:"font-medium text-gray-900",children:N.articleTitle}),(0,t.jsx)("p",{className:"text-sm text-gray-700 leading-relaxed",children:N.sourceUrl}),N.personalReasons&&(0,t.jsxs)("div",{className:"mt-2 p-2 bg-blue-50 rounded",children:[(0,t.jsx)("p",{className:"text-xs text-gray-600 font-medium",children:"推薦理由:"}),(0,t.jsx)("p",{className:"text-sm text-gray-700",children:N.personalReasons})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-3",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500",children:N.createdAt.toDate().toLocaleString("ja-JP")}),b&&(0,t.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>{b(N.sourceUrl),j(!1)},className:"gap-2 ml-auto",children:[(0,t.jsx)(o.A,{className:"h-3 w-3"}),"再利用"]})]})]}),["promotion","summary","teaser","social"].map(e=>{let s=N.generatedContent.filter(s=>s.contentType===e);if(0===s.length)return null;let a={promotion:{icon:x.A,label:"プロモーション投稿",color:"green"},summary:{icon:m.A,label:"要約投稿",color:"blue"},teaser:{icon:h.A,label:"ティーザー投稿",color:"orange"},social:{icon:p.A,label:"SNS投稿",color:"purple"}}[e],l=a.icon;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"text-lg font-semibold text-gray-900 flex items-center gap-2",children:[(0,t.jsx)(l,{className:"h-5 w-5 text-".concat(a.color,"-600")}),a.label,(0,t.jsxs)(i.E,{variant:"secondary",className:"bg-".concat(a.color,"-100 text-").concat(a.color,"-800"),children:[s.length,"パターン"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:s.map((e,s)=>(0,t.jsx)(g.q,{content:e.content,contentType:e.contentType,index:s,onCopy:T,onPostToSocial:S,onOpenFeedback:(e,s)=>{C(e),k(!0)},copiedPostId:v,sourceUrl:N.sourceUrl},e.id))})]},e)})]})})})]}),(0,t.jsx)(u.B,{isOpen:w,onClose:()=>k(!1),generatedContent:A,contentType:(null==N?void 0:N.sourceType)||"generation",sourceUrl:null==N?void 0:N.sourceUrl,sourceType:null==N?void 0:N.sourceType})]}):null}},9588:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(7565).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])}},e=>{e.O(0,[135,965,341,244,559,998,977,441,964,358],()=>e(e.s=9093)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.