(()=>{vare={7404(e,t,a){"use strict";a.d(t,{A:()=>l});vars=a(56427),c=a(29491),o=a(86087),r=a(27723),n=a(55163),i=a(10790);const__=r.__,_x=r._x;functionl({answer:e}){const[t,a]=(0,o.useState)(!1),r=(newDOMParser).parseFromString(e,"text/html"),l=r.body.textContent||r.body.innerText||"",d=(0,c.useCopyToClipboard)(l,()=>{a(!0),setTimeout(()=>a(!1),3e3)});return(0,i.jsx)("div",{className:"jetpack-ai-chat-copy-button-container",children:(0,i.jsxs)(s.Button,{className:"jetpack-ai-chat-copy-button",disabled:t,label:__("Copy Response","jetpack"),variant:"has-text",ref:d,children:[(0,i.jsx)(s.Icon,{className:"copy-icon",icon:n.ui}),t?_x("Copied!","Copied to clipboard","jetpack"):_x("Copy Response","Copy to clipboard.","jetpack")]})})}},73829(e,t,a){"use strict";a.d(t,{A:()=>o});vars=a(27723),c=a(10790);const__=s.__;functiono(){return(0,c.jsx)("div",{className:"jetpack-ai-chat-error-container",children:__("There was an error while generating the answer. Please try again later.","jetpack")})}},85443(e,t,a){"use strict";a.d(t,{A:()=>d});vars=a(56427),c=a(86087),o=a(27723),r=a(55163),n=a(89692),i=a(73829),l=a(10790);const__=o.__;functiond({blogType:e,blogId:t,cacheKey:a,feedbackSubmitted:o,addFeedback:d}){const{isSubmittingFeedback:h,submitFeedback:u,feedbackError:p,setFeedbackError:b}=(0,n.A)(e,t);(0,c.useEffect)(()=>{a.startsWith("jp-search-ai-")&&(m({rank:"",comment:""}),j(!1),b(!1))},[a]);const[k,m]=(0,c.useState)({rank:"",comment:""}),[w,j]=(0,c.useState)(!1),x=o.includes(a),g=e=>{m({...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:h||"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:h||"thumbs-down"===k.rank,label:__("Thumbs down","jetpack"),onClick:()=>g("thumbs-down"),children:(0,l.jsx)(s.Icon,{icon:r.Su})})]}),w&&(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:h||x,onChange:e=>m({...k,comment:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(s.Button,{className:"wp-block-button__link jetpack-ai-chat-feedback-submit",onClick:()=>{u(k,a),d(a),u(k,a)},disabled:h||x,children:__("Submit","jetpack")})]})]})]})}},50443(e,t,a){"use strict";a.d(t,{G:()=>o,W:()=>c});vars=a(27723);const__=s.__,c=__("Ask","jetpack"),o=__("Ask a question about this site","jetpack")},55163(e,t,a){"use strict";a.d(t,{Su:()=>r,tw:()=>o,ui:()=>n});vars=a(56427),c=a(10790);consto=(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.27286.69C475.04271.84480256480236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.818.85-28.138.85-46.54C366.5531.936328.860271.280c-61.6070-58.09394.933-71.76108.6-22.74722.747-49.61566.447-68.7683.4H32c-17.6730-3214.327-3232v240c017.67314.327323232h64c14.893027.408-10.17430.978-23.9544.5091.00175.0639.94177.80239.947.22015.22.0122.22.0177.1170111.986-39.423112.94-95.3313.319-18.42520.299-43.12217.34-66.999.854-18.45213.664-40.3438.99-62.99zm-61.7553.83c12.5621.131.2649.41-13.9457.577.748.78-17.60865.9-53.1265.9h-37.82c-71.6390-118.029-37.82-171.64-37.82V240h10.92c28.36067.98-70.8994.54-97.4628.36-28.3618.91-75.6337.82-94.5447.27047.2732.9847.2756.73039.17-28.3656.72-28.3694.54h103.99c