2025-12-12 13:13:07 +01:00
|
|
|
(()=>{var e={1455:e=>{"use strict";e.exports=window.wp.apiFetch},8508:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var s=a(56427),c=a(86087),o=a(27723),r=a(15616),n=a(99879),i=a(62072),l=a(10790);const __=o.__;function d({blogType:e,blogId:t,cacheKey:a,feedbackSubmitted:o,addFeedback:d}){const{isSubmittingFeedback:u,submitFeedback:h,feedbackError:p,setFeedbackError:b}=(0,n.A)(e,t);(0,c.useEffect)(()=>{a.startsWith("jp-search-ai-")&&(w({rank:"",comment:""}),j(!1),b(!1))},[a]);const[k,w]=(0,c.useState)({rank:"",comment:""}),[m,j]=(0,c.useState)(!1),x=o.includes(a),g=e=>{w({...k,rank:e}),j(!0)},f=!p&&!x;return(0,l.jsxs)("div",{className:"jetpack-ai-chat-feedback-container",children:[p&&(0,l.jsx)(i.A,{error:p}),x&&(0,l.jsx)("div",{className:"jetpack-ai-chat-feedback-submitted",children:__("Thanks for your feedback!","jetpack")}),f&&(0,l.jsxs)("div",{className:"jetpack-ai-chat-answer-feedback",children:[(0,l.jsx)("hr",{}),(0,l.jsxs)("div",{className:"jetpack-ai-chat-answer-feedback-buttons",children:[__("Was this helpful?","jetpack"),(0,l.jsx)("a",{role:"button",className:"thumbs-up",disabled:u||"thumbs-up"===k.rank,label:__("Thumbs up","jetpack"),onClick:()=>g("thumbs-up"),children:(0,l.jsx)(s.Icon,{icon:r.tw})}),(0,l.jsx)("a",{role:"button",className:"thumbs-down",disabled:u||"thumbs-down"===k.rank,label:__("Thumbs down","jetpack"),onClick:()=>g("thumbs-down"),children:(0,l.jsx)(s.Icon,{icon:r.Su})})]}),m&&(0,l.jsxs)("div",{className:"jetpack-ai-chat-feedback-form",children:[(0,l.jsx)(s.TextControl,{className:"jetpack-ai-chat-feedback-input",placeholder:"thumbs-up"===k.rank?__("What did you like about it?","jetpack"):__("What didn't you like about it? How could it be improved?","jetpack"),size:50,value:k.comment,disabled:u||x,onChange:e=>w({...k,comment:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(s.Button,{className:"wp-block-button__link jetpack-ai-chat-feedback-submit",onClick:()=>{h(k,a),d(a),h(k,a)},disabled:u||x,children:__("Submit","jetpack")})]})]})]})}},10790:e=>{"use strict";e.exports=window.ReactJSXRuntime},15616:(e,t,a)=>{"use strict";a.d(t,{Su:()=>r,tw:()=>o,ui:()=>n});var s=a(56427),c=a(10790);const o=(0,c.jsx)(s.SVG,{viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(s.Path,{d:"M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"})}),r=(0,c.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,c.jsx)(s.Path,{d:"M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28
|