1import{C as h,j as e,u as A,r as a,d0 as E,i as b,I as D,F as $,cB as R}from"./BVHuk4O5.js";import{I as c}from"./Ci_46LRR.js";import{T as V}from"./B-1LhVwk.js";import{B as w}from"./DPuPmTFW.js";import{a as M,o as T}from"./CjixBXcv.js";import{c as F}from"./Dl42HQzf.js";const H="src-components-tool-GtoY-__root",U="src-components-tool-GtoY-__flex",q="src-components-tool-GtoY-__textWrap",P="src-components-tool-GtoY-__link",Z="src-components-tool-GtoY-__content",Q="src-components-tool-GtoY-__updateHistory",z="src-components-tool-GtoY-__historyWrap",K="src-components-tool-GtoY-__wrap",X="src-components-tool-GtoY-__buttonWrap",J="src-components-tool-GtoY-__uploadContentWrap",ee="src-components-tool-GtoY-__errorSection",te="src-components-tool-GtoY-__caution",oe="src-components-tool-GtoY-__errorContent",se="src-components-tool-GtoY-__itemWrap",ne="src-components-tool-GtoY-__errorItem",re="src-components-tool-GtoY-__uploadContent",ae="src-components-tool-GtoY-__name",le="src-components-tool-GtoY-__complete",ie="src-components-tool-GtoY-__loading",ce="src-components-tool-GtoY-__position",de={root:H,"contents-wrapper":"src-components-tool-GtoY-__contents-wrapper",flex:U,textWrap:q,link:P,content:Z,updateHistory:Q,historyWrap:z,wrap:K,buttonWrap:X,uploadContentWrap:J,"result-content":"src-components-tool-GtoY-__result-content",errorSection:ee,caution:te,errorContent:oe,itemWrap:se,errorItem:ne,uploadContent:re,name:ae,complete:le,loading:ie,position:ce,"mr-4":"src-components-tool-GtoY-__mr-4"},me="src-components-tool-GtoY-Loading-__loader",pe="src-components-tool-GtoY-Loading-__load3",xe={loader:me,load3:pe},he=()=>e.jsx(e.Fragment,{children:e.jsx("div",{styleName:"loader"})}),ue=h(he,xe,{allowMultiple:!0}),_e="/assets/Google1-CPERc3E8.png",je="/assets/Google2-qQeAQsSA.png",ye="/assets/Yahoo-Bwm-PHSJ.png",ge="src-components-tool-GtoY-SideBar-__root",Ne="src-components-tool-GtoY-SideBar-__sidebar",Ge="src-components-tool-GtoY-SideBar-__mask",ve="src-components-tool-GtoY-SideBar-__title",Se="src-components-tool-GtoY-SideBar-__hr",Ye="src-components-tool-GtoY-SideBar-__content",be="src-components-tool-GtoY-SideBar-__explain",we="src-components-tool-GtoY-SideBar-__wrap",fe="src-components-tool-GtoY-SideBar-__num",Ce="src-components-tool-GtoY-SideBar-__flex",Be="src-components-tool-GtoY-SideBar-__image",We="src-components-tool-GtoY-SideBar-__visible",ke={root:ge,sidebar:Ne,mask:Ge,title:ve,hr:Se,content:Ye,"text-wrap":"src-components-tool-GtoY-SideBar-__text-wrap",explain:be,wrap:we,num:fe,flex:Ce,image:Be,"mb-10":"src-components-tool-GtoY-SideBar-__mb-10","mb-15":"src-components-tool-GtoY-SideBar-__mb-15","mb-30":"src-components-tool-GtoY-SideBar-__mb-30","slide-in":"src-components-tool-GtoY-SideBar-__slide-in","slide-out":"src-components-tool-GtoY-SideBar-__slide-out",visible:We},Le=t=>e.jsxs("div",{styleName:t.isSidebarOpen?"root visible":"root",children:[t.isSidebarOpen?e.jsx("div",{styleName:"mask",onClick:()=>{t.setIsSidebarOpen(!t.isSidebarOpen)}}):null,e.jsxs("div",{styleName:t.isSidebarOpen?"sidebar slide-in":"sidebar slide-out",onClick:r=>{r.preventDefault(),r.stopPropagation()},children:[e.jsx("button",{type:"button",onClick:()=>{t.setIsSidebarOpen(!t.isSidebarOpen)},children:"Ã"}),e.jsx("h2",{styleName:"title",children:"Google åºåã¨ãã£ã¿ããCSVãã¨ã¯ã¹ãã¼ãããæ¹æ³"}),e.jsxs("div",{styleName:"content",children:[e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"1."}),e.jsx("span",{styleName:"mb-10",children:"Google åºåã¨ãã£ã¿ãéããã¡ãã¥ã¼ãã¼ã®ãã¢ã«ã¦ã³ãããããã¨ã¯ã¹ãã¼ããã鏿ãã¾ã"})]}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"2."}),e.jsx("span",{styleName:"mb-15",children:"ãã®ä¸ã®ã鏿ãããã£ã³ãã¼ã³ã¨åºåã°ã«ã¼ããã¨ã¯ã¹ãã¼ããã鏿ãã¾ã"})]}),e.jsx("img",{styleName:"image",src:_e,alt:"Google1"}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"3."}),e.jsx("span",{styleName:"mb-10",children:"ã¨ã¯ã¹ãã¼ããããæ¤ç´¢ãã£ã³ãã¼ã³ã鏿ãã¦ãã ãã"})]}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"4."}),e.jsx("span",{styleName:"mb-15",children:"ä¸é¨ã«ãããOKããã¿ã³ãæ¼ãã¦å®äºã§ã"})]}),e.jsx("img",{styleName:"image",src:je,alt:"Google2"}),e.jsxs("div",{styleName:"text-wrap",children:[e.jsx("span",{children:"â»"}),e.jsx("p",{styleName:"explain",children:"ã¨ã¯ã¹ãã¼ãã®æ¹æ³ã¯ä¸è¨ä»¥å¤ã§ãæ§ãã¾ããããæ¤ç´¢ãã£ã³ãã¼ã³ã®ã¿ãã¨ã¯ã¹ãã¼ãããããã«ã注æãã ãã"})]})]}),e.jsx("hr",{styleName:"hr"}),e.jsx("h2",{styleName:"title",children:"Yahoo!ãã£ã³ãã¼ã³ã¨ãã£ã¿ã¼ã«CSVãã¤ã³ãã¼ãããæ¹æ³"}),e.jsxs("div",{styleName:"content",children:[e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"1."}),e.jsx("span",{styleName:"mb-10",children:"Yahoo!ãã£ã³ãã¼ã³ã¨ãã£ã¿ã¼ãéãããã¤ã³ãã¼ãããã¿ã³ãæ¼ãã¾ã"})]}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"2."}),e.jsx("span",{styleName:"mb-10",children:"ããã¡ã¤ã«ã鏿ããã¿ã³ãæ¼ãã¦ãã¤ã³ãã¼ããããCSVãã¡ã¤ã«ã鏿ãã¦ãã ãã"})]}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"3."}),e.jsx("span",{styleName:"mb-10",children:"å
¥ç¨¿å¯¾è±¡ã®ã¢ã«ã¦ã³ãã鏿ãã¾ã"})]}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"4."}),e.jsx("span",{styleName:"mb-15",children:"ããã¬ãã¥ã¼ããã¿ã³ãæ¼ãã¾ã"})]}),e.jsx("img",{styleName:"image",src:ye,alt:"Yahoo"}),e.jsxs("div",{styleName:"wrap",children:[e.jsx("span",{styleName:"num",children:"5."}),e.jsx("span",{styleName:"mb-30",children:"ããã¼ã¿ã®ã¤ã³ãã¼ãããã¿ã³ãæ¼ãã¦å®äºã§ã"})]})]})]})]}),Oe=h(Le,ke,{allowMultiple:!0}),{HOST:Ie}=F.env,Ae=t=>({type:"CONVERT_GTOY_SUCCESS",data:t}),Ee=t=>({type:"CONVERT_GTOY_FAILED",error:t}),De=t=>r=>{const m=`${Ie}/api/v1/gtoy/convert`,d=new FormData;d.append("file",t);const i={headers:{"content-type":"multipart/form-data"}};return M.post(m,d,i).then(l=>(r(Ae(l.data)),{success:!0,data:l.data}
1)).catch(l=>(r(Ee(l)),r(T("夿ã«å¤±æãã¾ãã")),{success:!1}))},$e=()=>{const t=A(),[r,m]=a.useState(null),[d,i]=a.useState(null),[l,u]=a.useState([]),[f,_]=a.useState([]),[C,j]=a.useState([]),[y,g]=a.useState(null),[N,G]=a.useState(null),[v,S]=a.useState(!1),Y=n=>()=>{const o=n==="win"?N:y,s=new Uint8Array(o.data),x=new Uint8Array(s),I=new Blob([x],{type:"csv"});R.saveAs(I,`${r.name}_TO_YSS_${n}.csv`)},B=n=>{const o=n[0];o&&(m(o),i(!0),u([]),_([]),j([]),g(null),G(null),t(De(o)).then(s=>{i(!1),s.success&&(u(s.data.error_reasons),g(s.data.mac),G(s.data.win),j(s.data.reject_campaign_list),_(s.data.reject_ad_group_list))}).catch(()=>{i(!1)}))},W=()=>d?e.jsx("div",{styleName:"loading",children:e.jsx("div",{styleName:"position",children:e.jsx(ue,{})})}):null,k=()=>r?e.jsx("span",{styleName:"name",children:r.name}):null,L=()=>!N||!y?null:e.jsxs("div",{children:[e.jsxs("div",{styleName:"textWrap",children:[e.jsx(c,{name:"checkConverter",width:33.3,height:33.3}),e.jsxs("p",{styleName:"complete",children:[k(),"ã®å¤æãå®äºãã¾ãã"]})]}),e.jsxs("div",{styleName:"buttonWrap",children:[e.jsxs(w,{variant:"round",onClick:Y("win"),style:{display:"flex",alignItems:"center",marginRight:"20px",lineHeight:"initial",padding:"8px 20px"},children:[e.jsx(c,{name:"download",styleName:"mr-4",width:20,height:13.3}),"ãã¦ã³ãã¼ãããï¼Windowsç¨ï¼"]}),e.jsxs(w,{variant:"round",onClick:Y("mac"),style:{display:"flex",alignItems:"center",lineHeight:"initial",padding:"8px 20px"},children:[e.jsx(c,{name:"download",styleName:"mr-4",width:20,height:13.3}),"ãã¦ã³ãã¼ãããï¼Macç¨ï¼"]})]})]}),p=n=>{let o=[],s="";return n==="campaign"?(o=C,s="以ä¸ã®ãã£ã³ãã¼ã³ã¯å¤æä¸å¯ã«ããæé¤"):n==="adGroup"?(o=f,s="以ä¸ã®åºåã°ã«ã¼ãã¯å¤æä¸å¯ã«ããæé¤"):(o=l,s="夿ã§ããªãã£ãé
ç®ãããã¾ã"),D(o)?null:e.jsxs("div",{styleName:"errorSection",children:[e.jsxs("div",{styleName:"caution",children:[e.jsx(c,{name:"caution",styleName:"mr-4",width:16.5,height:14.25}),e.jsx("span",{children:s})]}),e.jsx("div",{styleName:"errorContent",children:e.jsx("div",{styleName:"itemWrap",children:$(o,x=>e.jsx("div",{styleName:"errorItem",children:x}))})})]})},O=()=>e.jsxs("div",{styleName:"textWrap",children:[e.jsxs("a",{styleName:"link",rel:"noreferrer",onClick:()=>{S(!v)},children:[">"," ã¨ãã£ã¿ã¼æä½æé "]}),e.jsxs("a",{styleName:"link",rel:"noreferrer",href:"https://guide.ag-boost.jp/ag-boostãã¼ã«/xpqtZrw9GPt9UNZhLn1YqB/æ¤ç´¢åºåcsv夿_夿é
ç®ä¸è¦§/8X33zndD1YEQp6S9fCYnLV",target:"_blank",children:[">"," 夿é
ç®ä¸è¦§",e.jsx(b,{style:{width:"16px",height:"16px",marginLeft:"5px"}})]}),e.jsxs("a",{styleName:"link",rel:"noreferrer",href:"https://guide.ag-boost.jp/ag-boostãã¼ã«/xpqtZrw9GPt9UNZhLn1YqB/æ¤ç´¢åºåcsv夿_è¦æ³¨æã»å
責äºé
/pAk7w8c4XgWCFjfo9UqjwL",target:"_blank",children:[">"," è¦æ³¨æã»å
責äºé
",e.jsx(b,{style:{width:"16px",height:"16px",marginLeft:"5px"}})]})]});return e.jsxs("div",{styleName:"root",children:[e.jsxs("div",{styleName:"contents-wrapper",children:[e.jsx(V,{children:"æ¤ç´¢åºåCSV夿"}),e.jsxs("div",{styleName:"flex",children:[e.jsx("p",{children:"Googleå
¥ç¨¿CSVãYahooç¨ã«å¤æã§ãã¾ããå¼ç¤¾ã§ã¯ã¢ãããã¼ãæ
å ±ãä¸ååå¾ãã¦ãã¾ããã"}),O()]}),e.jsx("div",{styleName:"content",children:e.jsxs("div",{styleName:"uploadContentWrap",children:[e.jsx("h3",{children:"夿ãããCSVãããããã¾ãã¯ãã¡ã¤ã«é¸æãã¦ãã ããã"}),e.jsxs("div",{styleName:"uploadContent",children:[W(),e.jsx(E,{multiple:!1,onDrop:n=>B(n),noKeyboard:!0,accept:".csv",children:({getRootProps:n,getInputProps:o})=>e.jsxs("div",{...n(),children:[e.jsx("input",{...o()}),e.jsx("div",{style:{textAlign:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",cursor:"pointer",width:"100%",padding:"30px 0"},children:e.jsx(c,{name:"uploadArea",width:180,height:200})})]})})]}),e.jsxs("div",{styleName:"result-content",children:[L(),p("campaign"),p("adGroup"),p("error")]})]})})]}),e.jsx(Oe,{isSidebarOpen:v,setIsSidebarOpen:S})]})},Ue=h($e,de,{allowMultiple:!0});export{Ue as default};
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.