1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[74959],{5140:e=>{e.exports={divider:"Divider_divider__MuiXc"}},29502:e=>{e.exports={formInner:"PostNewForm_formInner__q8WkO",termsLink:"PostNewForm_termsLink__cVu1q",termsLineBreak:"PostNewForm_termsLineBreak___NgwW"}},35262:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(72958),l=i(80915),a=i(96300),s=e=>(0,a.jsx)("svg",(0,l._)((0,n._)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24"},e),{children:(0,a.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.116 3.116a1.25 1.25 0 0 1 1.768 0l4 4a1.25 1.25 0 0 1-1.768 1.768L12 5.768 8.884 8.884a1.25 1.25 0 1 1-1.768-1.768zM7.116 15.116a1.25 1.25 0 0 1 1.768 0L12 18.232l3.116-3.116a1.25 1.25 0 0 1 1.768 1.768l-4 4a1.25 1.25 0 0 1-1.768 0l-4-4a1.25 1.25 0 0 1 0-1.768",clipRule:"evenodd"})}))},38913:(e,t,i)=>{"use strict";i.d(t,{Z:()=>b});var n=i(96300),l=i(92960),a=i(26809),s=i(40777),r=i(90729),c=i(49817),o=i(8411),d=i(43545),u=i(45374),m=i(4288),h=i(5654),x=i(59070);let p=e=>{let{open:t,onClose:i,onSuccess:p,authenticatedState:b}=e,[_,k]=(0,l.useState)(""),[v,g]=(0,l.useState)([]),[f,j]=(0,l.useState)(!1),[y]=(0,c.n)(h.$,{client:u.G.apollo});(0,l.useEffect)(()=>{if(t){let e=b.user,t="ãªãªã_".concat(e.id.slice(0,4));k(b.user.hasCustomNickname?b.user.nickname:t),g([])}},[t,b.user]);let S=(0,l.useCallback)(async()=>{let e=_.trim(),t=[];if(0===e.length&&t.push("ããã¯ãã¼ã ãå
¥åãã¦ãã ãã"),e.length>x.P&&t.push("ããã¯ãã¼ã ã¯".concat(x.P,"æå以å
ã§å
¥åãã¦ãã ãã")),g(t),!(t.length>0)){j(!0);try{await y({variables:{input:{nickname:e}}}),b.refetch&&b.refetch(),p(e)}catch(t){g(["æ´æ°ã«å¤±æãã¾ãããããä¸åº¦ã試ããã ããã"]);let e=t instanceof Error?t:Error(String(t));m.C.errorLog(e)}finally{j(!1)}}},[_,b,y,p]);return(0,n.jsx)(o.c,{open:t,onClose:i,header:"ããã¯ãã¼ã ã¯ä½ã«ãã¾ããï¼",primaryActionLabel:f?"è¨å®ä¸...":"ãã®ããã¯ãã¼ã ã§åçãã",primaryActionDisabled:f,onPrimaryAction:S,showClose:!0,children:(0,n.jsxs)(a.Stack,{spacing:"sm",children:[(0,n.jsxs)(a.Stack,{spacing:"xs",children:[(0,n.jsx)(d.A,{type:"text",value:_,onChange:e=>k(e.target.value),maxLength:x.P,placeholder:"ããã¯ãã¼ã ãå
¥å"}),(0,n.jsxs)(s.Text,{size:"xs",textAlign:"right",color:"sub",children:[_.length," / ",x.P," æå"]})]}),(0,n.jsx)(s.Text,{size:"xs",color:"sub",children:"ããã¯ãã¼ã ï¼è¡¨ç¤ºåï¼ã¯ä»ã®ã¦ã¼ã¶ã¼ã¨éè¤OKãªæååã§ãå½ãµã¤ãå
ã§ã®è¡¨ç¤ºã«ä½¿ããã¾ãã"}),(0,n.jsx)(s.Text,{size:"xs",color:"red",children:"æ¬åãªã©å人ãç¹å®ããããããªããã¯ãã¼ã ï¼è¡¨ç¤ºåï¼ã¯ä½¿ç¨ããªãããã«ã注æãã ããã"}),v.length>0&&(0,n.jsxs)(a.Stack,{spacing:"xs",children:[(0,n.jsx)(r.Divider,{}),v.map((e,t)=>(0,n.jsx)(s.Text,{size:"sm",color:"red",children:e},t))]})]})})};function b(e){let t=(0,l.useRef)(null),[i,a]=(0,l.useState)(!1),s=(0,l.useCallback)(()=>new Promise(e=>{t.current=e,a(!0)}),[]),r=(0,l.useCallback)(()=>{var e;null==(e=t.current)||e.call(t,null),t.current=null,a(!1)},[]),c=(0,l.useCallback)(e=>{var i;null==(i=t.current)||i.call(t,e),t.current=null,a(!1)},[]);return{openNicknameSettingModal:s,nicknameSettingModalElement:"authenticated"===e.status?(0,n.jsx)(p,{open:i,onClose:r,onSuccess:c,authenticatedState:e}):null}}},40778:(e,t,i)=>{"use strict";i.d(t,{l:()=>m});var n=i(72958),l=i(80915),a=i(78293),s=i(96300),r=i(2879),c=i(92960),o=i(35262),d=i(45509),u=i.n(d);let m=(0,c.forwardRef)((e,t)=>{var{isInvalid:i=!1,disabled:c=!1,children:d,className:m}=e,h=(0,a._)(e,["isInvalid","disabled","children","className"]);return(0,s.jsxs)("div",{className:(0,r.default)({[u().isInvalid]:i,[u().disabled]:c},u().wrapper,m),children:[(0,s.jsx)("select",(0,l._)((0,n._)({},h),{disabled:c,className:u().select,ref:t,children:d})),(0,s.jsx)(o.A,{"aria-hidden":!0,className:u().icon})]})});m.displayName="Select"},45509:e=>{e.exports={wrapper:"Select_wrapper__WFjd6",select:"Select_select__8DuQD",icon:"Select_icon___J7A9",disabled:"Select_disabled__fdkUw",isInvalid:"Select_isInvalid__4ci8x"}},61641:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});let n=[{uuid:"a3be9be7-2bfe-4cd4-805d-b7e3fb5eaf73",code:"breastcancer",name:"ä¹³ãã"},{uuid:"2c7dde78-faf7-4d85-a1dd-4d6d4d3ec4fe",code:"dementia",name:"èªç¥ç"},{uuid:"4fcc23b7-f664-4add-83d7-b2756df9a16d",code:"mildcognitiveimpairment",name:"軽度èªç¥ç"}]},68538:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/byoki_community/posts/new",function(){return i(77795)}])},77795:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>B});var n=i(96300),l=i(26809),a=i(18047),s=i(81909),r=i(72958),c=i(80915),o=i(92960),d=i(46120),u=i(43961),m=i(40777),h=i(6587),x=i(39193),p=i(49817),b=i(44655),_=i.n(b),k=i(61964),v=i(30425),g=i(38913),f=i(45634),j=i.n(f),y=i(45374),S=i(40778),w=i(41373),N=i(61641);let C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"pageByokiCommunityPostNew"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateByokiCommunityPostInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createByokiCommunityPost"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"post"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}]};var P=i(4288),L=i(29502),T=i.n(L);let O=[{value:"question",label:"質å"},{value:"diary",label:"æ¥è¨"},{value:"announcement",label:"ãç¥ãã"}],z=()=>{let e=(0,k.b)(),t=(0,v.u)(),{openNicknameSettingModal:i,nicknameSettingModalElement:a}=(0,g.Z)(t),[s,b]=(0,o.useState)("question"),[f,L]=(0,o.useState)(null),[z,A]=(0,o.useState)(""),[B,D]=(0,o.useState)([]),[I,E]=(0,o.useState)(!1),[F]=(0,p.n)(C,{client:y.G.apollo});(0,d.A)(()=>{let t=e.query.disease;if("string"==typeof t){let e=N.X.find(e=>e.code===t);if(e)return void L(e.uuid)}1===N.X.length&&L(N.X[0].uuid)});let W=(0,o.useCallback)(()=>{let e=[];return f||e.push("対象ã®ç
æ°ã鏿ãã¦ãã ãã"),0===z.trim().length&&e.push("æç¨¿å
容ãå
¥åãã¦ãã ãã"),z.length>1e3&&e.push("æç¨¿å
容ã¯".concat(1e3,"æå以å
ã§å
¥åãã¦ãã ãã")),e},[f,z]),X=(0,o.useCallback)(async()=>{let n={path:e.asPath,source:"post_new_form",label:"ãã®å
å®¹ã§æç¨¿ãã"},l=W();if(D(l),l.length>0)return void P.C.eventLog("byoki_community_click",(0,c._)((0,r._)({},n),{result:"failure",validationErrors:l}));if(f&&"authenticated"===t.status){E(!0);try{var a,o;if(!t.user.hasCustomNickname){let e=await i();if(null===e){D(["ããã¯ãã¼ã ãè¨å®ãã¦ãã ãã"]),E(!1);return}}let l=await F({variables:{input:{theme:s,diseaseUuid:f,content:z.trim()}}});if(null==(o=l.data)||null==(a=o.createByokiCommunityPost)?void 0:a.post){let t=l.data.createByokiCommunityPost.post.id;P.C.eventLog("byoki_community_click",(0,c._)((0,r._)({},n),{targetPath:"/byoki_community/posts/".concat(t),contentId:t,contentType:"post",result:"success"})),e.push("/byoki_community/posts/".concat(t))}else P.C.eventLog("byoki_community_click",(0,c._)((0,r._)({},n),{result:"failure"})),D(["æç¨¿ã«å¤±æãã¾ãããããä¸åº¦ã試ããã ããã"]),E(!1)}catch(t){P.C.eventLog("byoki_community_click",(0,c._)((0,r._)({},n),{result:"failure"})),D(["æç¨¿ã«å¤±æãã¾ãããããä¸åº¦ã試ããã ããã"]),E(!1);let e=t instanceof Error?t:Error(String(t));P.C.errorLog(e)}}},[s,f,z,W,t,i,F,e]);return(0,n.jsxs)("div",{className:j().commonLayoutContentWidth,children:[(0,n.jsx)("div",{className:T().formInner,children:(0,n.jsx)(u.Box,{px:"md",width:"100%",children:(0,n.jsxs)(l.Stack,{spacing:"lg",children:[(0,n.jsx)(m.Text,{as:"h1",size:"lg",bold:!0,children:"æ°è¦æç¨¿"}),(0,n.jsxs)(l.Stack,{spacing:"sm",children:[(0,n.jsx)(m.Text,{as:"label",size:"sm",bold:!0,children:"æç¨¿ãã¼ã"}),(0,n.jsx)(u.Box,{maxWidth:"358px",children:(0,n.jsx)(S.l,{value:s,onChange:e=>b(e.target.value),children:O.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))})})]}),(0,n.jsxs)(l.Stack,{spacing:"sm",children:[(0,n.jsx)(m.Text,{as:"label",size:"sm",bold:!0,children:"対象ã®ç
æ°"}),(0,n.jsx)(u.Box,{maxWidth:"358px",children:(0,n.jsxs)(S.l,{value:null!=f?f:"",onChange:e=>L(e.target.value||null),disabled:1===N.X.length,children:[(0,n.jsx)("option",{value:"",children:"鏿ãã¦ãã ãã"}),N.X.map(e=>(0,n.jsx)("option",{value:e.uuid,children:e.name},e.uuid))]})})]}),(0,n.jsxs)(l.Stack,{spacing:"sm",children:[(0,n.jsx)(m.Text,{as:"label",size:"sm",bold:!0,children:"æç¨¿å
容"}),(0,n.jsx)(h.TextArea,{value:z,onChange:e=>A(e.target.value),placeholder:"ç
æ°ã®ä¸å®ãæ©ã¿ãç¸è«ã質åãä½é¨è«ãæ
å ±å
±æãæ²»çãæ¥ã
ã®ã§ããã¨ãªã©ãããªãã®æ³ããèªç±ã«æ¸ãã¾ããã",rows:10,maxLength:1e3}),(0,n.jsxs)(m.Text,{size:"xs",textAlign:"right",color:"sub",children:[z.length," / ",1e3," æå"]})]}),(0,n.jsxs)(m.Text,{size:"xs",color:"sub",textAlign:"center",children:[(0,n.jsx)(_(),{href:"/terms",target:"_blank",className:T().termsLink,children:"å©ç¨è¦ç´"}),"ã¨",(0,n.jsx)(_(),{href:"/policy",target:"_blank",className:T().termsLink,children:"ãã©ã¤ãã·ã¼ããªã·ã¼"}),"ã«",(0,n.jsx)("br",{className:T().termsLineBreak}),"åæã®ä¸ãå©ç¨ãã ãã"]}),B.length>0&&(0,n.jsx)(l.Stack,{spacing:"xs",children:B.map((e,t)=>(0,n.jsx)(m.Text,{size:"sm",color:"red",children:e},t))}),(0,n.jsx)(x.Flex,{justifyContent:"center",children:(0,n.jsx)(u.Box,{maxWidth:"358px",width:"100%",children:(0,n.jsx)(w.$,{variant:"byoki-community-primary",onClick:X,disabled:I,block:!0,children:I?"æç¨¿ä¸...":"ãã®
1å
å®¹ã§æç¨¿ãã"})})}),(0,n.jsx)(m.Text,{size:"xs",color:"sub",textAlign:"center",children:"å®å¿ãã¦ãå©ç¨ããã ãããããAIãç¨ãã¦ä¸é©åãªæç¨¿ã«ã¯å¶éããããå ´åãããã¾ã"})]})})}),a]})};var A=i(48683);let B=()=>{let e=(0,v.u)();return"initializing"===e.status?null:!1===e.isSignedIn?(0,n.jsx)(A.R,{isStatic:!0}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.a,{title:"æ°è¦æç¨¿"}),(0,n.jsxs)(l.Stack,{alignItems:"center",children:[(0,n.jsx)(z,{}),(0,n.jsx)(s.z,{})]})]})}},90729:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=i(72958),l=i(78293);var a=Object.create,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,o=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of c(t))d.call(e,l)||l===i||s(e,l,{get:()=>t[l],enumerable:!(n=r(t,l))||n.enumerable});return e},m={};((e,t)=>{for(var i in t)s(e,i,{get:t[i],enumerable:!0})})(m,{Divider:()=>_}),e.exports=u(s({},"__esModule",{value:!0}),m);var h=i(96300),x=i(92960),p=((e,t,i)=>(i=null!=e?a(o(e)):{},u(e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)))(i(5140)),b=i(70164);let _=(0,x.forwardRef)((e,t)=>{var{border:i="black",m:a,mx:s,my:r,mt:c,mr:o,mb:d,ml:u,width:m,minWidth:x,maxWidth:_}=e,k=l._(e,["border","m","mx","my","mt","mr","mb","ml","width","minWidth","maxWidth"]);return(0,h.jsx)("hr",n._({className:p.default.divider,style:n._({},(0,b.marginVariables)({m:a,mx:s,my:r,mt:c,mr:o,mb:d,ml:u}),(0,b.widthVariables)({width:m,minWidth:x,maxWidth:_}),(0,b.borderVariables)(i)),ref:t},k))});_.displayName="Divider"}},e=>{e.O(0,[81909,33217,90636,46593,38792],()=>e(e.s=68538)),_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.