/*! For license information please see editor.js.LICENSE.txt */ (()=>{var e={7675:(e,t,r)=>{"use strict";r.d(t,{y:()=>l});var n=r(76416),s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s{const b=Object.assign({},l);let v;function k(){v.abort(),document.hidden||C()}b.accept||(b.accept=o),m||document.addEventListener("visibilitychange",k);let y=a,x=0;function j(){document.removeEventListener("visibilitychange",k),window.clearTimeout(x),v.abort()}null==r||r.addEventListener("abort",(()=>{j(),t()}));const w=null!=g?g:window.fetch,_=null!=u?u:c;async function C(){var r;v=new AbortController;try{const r=await w(e,Object.assign(Object.assign({},f),{headers:b,signal:v.signal}));await _(r),await(0,n.q5)(r.body,(0,n.iv)((0,n.VL)((e=>{e?b[i]=e:delete b[i]}),(e=>{y=e}),d))),null==p||p(),j(),t()}catch(e){if(!v.signal.aborted)try{const t=null!==(r=null==h?void 0:h(e))&&void 0!==r?r:y;window.clearTimeout(x),x=window.setTimeout(C,t)}catch(e){j(),s(e)}}}C()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(o)))throw new Error(`Expected content-type to be ${o}, Actual: ${t}`)}},76416:(e,t,r)=>{"use strict";async function n(e,t){const r=e.getReader();let n;for(;!(n=await r.read()).done;)t(n.value)}function s(e){let t,r,n,s=!1;return function(o){void 0===t?(t=o,r=0,n=-1):t=function(e,t){const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(t,o);const a=t.length;let i=0;for(;r0){const r=s.decode(o.subarray(0,i)),a=i+(32===o[i+1]?2:1),l=s.decode(o.subarray(a));switch(r){case"data":n.data=n.data?n.data+"\n"+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":const r=parseInt(l,10);isNaN(r)||t(n.retry=r)}}}}function a(){return{data:"",event:"",id:"",retry:void 0}}r.d(t,{VL:()=>o,iv:()=>s,q5:()=>n})},51113:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(86087);const s=(0,n.forwardRef)((function({icon:e,size:t=24,...r},s){return(0,n.cloneElement)(e,{width:t,height:t,...r,ref:s})}))},66955:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})})},62510:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})})},62599:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})})},57003:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})})},27375:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})})},17913:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})})},23751:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.75 8V13H11.25V8H12.75ZM12.75 14.5V16H11.25V14.5H12.75Z"})})},83883:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})})},68888:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})})},29115:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})})},31249:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},10991:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})})},24995:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"})})},93115:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})})},53512:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})},84066:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})})},10748:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})})},19783:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})})},76277:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})})},84008:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})})},82065:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})})},78938:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})},15788:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})})},45459:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})})},41417:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})})},88669:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})})},69457:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})})},40502:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})})},67709:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.332 5.748c-1.03-.426-2.06.607-1.632 1.636l1.702 3.93 7.481.575c.123.01.123.19 0 .2l-7.483.575-1.7 3.909c-.429 1.029.602 2.062 1.632 1.636l12.265-5.076c1.03-.426 1.03-1.884 0-2.31L6.332 5.748Z"})})},21955:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z"})})},90254:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})})},50347:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M19.8 4h-1.5l1 8h1.5l-1-8ZM17 5.8c-.1-1-1-1.8-2-1.8H6.8c-.9 0-1.7.6-1.9 1.4l-1.8 6C2.7 12.7 3.7 14 5 14h4.4l-.8 3.6c-.3 1.3.7 2.4 1.9 2.4h.2c.6 0 1.2-.3 1.6-.8l5-6.6c.3-.4.5-.9.4-1.5L17 5.7Zm-.9 5.9-5 6.6c0 .1-.2.2-.4.2h-.2c-.3 0-.6-.3-.5-.6l.8-3.6c.1-.4 0-.9-.3-1.3s-.7-.6-1.2-.6H4.9c-.3 0-.6-.3-.5-.6l1.8-6c0-.2.3-.4.5-.4h8.2c.3 0 .5.2.5.4l.7 5.4v.4Z"})})},7598:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m3 12 1 8h1.5l-1-8H3Zm15.8-2h-4.4l.8-3.6c.3-1.3-.7-2.4-1.9-2.4h-.2c-.6 0-1.2.3-1.6.8l-5 6.6c-.3.4-.4.8-.4 1.2v.2l.7 5.4v.2c.2.9 1 1.5 1.9 1.5h8.2c.9 0 1.7-.6 1.9-1.4l1.8-6c.4-1.3-.6-2.6-1.9-2.6Zm.5 2.1-1.8 6c0 .2-.3.4-.5.4H8.8c-.3 0-.5-.2-.5-.4l-.7-5.4v-.4l5-6.6c0-.1.2-.2.4-.2h.2c.3 0 .6.3.5.6l-.8 3.6c-.1.4 0 .9.3 1.3s.7.6 1.2.6h4.4c.3 0 .6.3.5.6Z"})})},11269:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})})},76673:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})},95789:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})})},52259:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})})},83822:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})})},7326:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5573),s=r(10790);const o=(0,s.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(n.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})})},43172:(e,t)=>{"use strict";t.qg=function(e,t){const r=new i,n=e.length;if(n<2)return r;const s=t?.decode||u;let o=0;do{const t=e.indexOf("=",o);if(-1===t)break;const a=e.indexOf(";",o),i=-1===a?n:a;if(t>i){o=e.lastIndexOf(";",t-1)+1;continue}const u=l(e,o,t),d=c(e,t,u),p=e.slice(u,d);if(void 0===r[p]){let n=l(e,t+1,i),o=c(e,i,n);const a=s(e.slice(n,o));r[p]=a}o=i+1}while(o{const e=function(){};return e.prototype=Object.create(null),e})();function l(e,t,r){do{const r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++tr;){const r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return r}function u(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},87399:e=>{!function(){"use strict";var t=[],r=3988292384;function n(e){var t,n,s,o,a=-1;for(t=0,s=e.length;t>>=1:o=o>>>1^r;a=a>>>8^o}return-1^a}function s(e,r){var n,o,a;if(void 0!==s.crc&&r&&e||(s.crc=~0,e)){for(n=s.crc,o=0,a=e.length;o>>8^t[255&(n^e[o])];return s.crc=n,-1^n}}!function(){var e,n,s;for(n=0;n<256;n+=1){for(e=n,s=0;s<8;s+=1)1&e?e=r^e>>>1:e>>>=1;t[n]=e>>>0}}(),e.exports=function(e,t){var r;e="string"==typeof e?(r=e,Array.prototype.map.call(r,(function(e){return e.charCodeAt(0)}))):e;return((t?n(e):s(e))>>>0).toString(16)},e.exports.direct=n,e.exports.table=s}()},51601:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n)try{n=r(42305)}catch(e){}var s=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},i=a.lib={},l=i.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=i.WordArray=l.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,s=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var i=0;i>>2]=r[i>>>2];return this.sigBytes+=s,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-s%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;s>>2]>>>24-s%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},m=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,s=n.words,o=n.sigBytes,a=this.blockSize,i=o/(4*a),l=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*a,u=e.min(4*l,o);if(l){for(var d=0;d>>24)|4278255360&(s<<24|s>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],h=e[t+2],m=e[t+3],g=e[t+4],f=e[t+5],b=e[t+6],v=e[t+7],k=e[t+8],y=e[t+9],x=e[t+10],j=e[t+11],w=e[t+12],_=e[t+13],C=e[t+14],A=e[t+15],S=o[0],E=o[1],N=o[2],T=o[3];S=c(S,E,N,T,a,7,i[0]),T=c(T,S,E,N,l,12,i[1]),N=c(N,T,S,E,h,17,i[2]),E=c(E,N,T,S,m,22,i[3]),S=c(S,E,N,T,g,7,i[4]),T=c(T,S,E,N,f,12,i[5]),N=c(N,T,S,E,b,17,i[6]),E=c(E,N,T,S,v,22,i[7]),S=c(S,E,N,T,k,7,i[8]),T=c(T,S,E,N,y,12,i[9]),N=c(N,T,S,E,x,17,i[10]),E=c(E,N,T,S,j,22,i[11]),S=c(S,E,N,T,w,7,i[12]),T=c(T,S,E,N,_,12,i[13]),N=c(N,T,S,E,C,17,i[14]),S=u(S,E=c(E,N,T,S,A,22,i[15]),N,T,l,5,i[16]),T=u(T,S,E,N,b,9,i[17]),N=u(N,T,S,E,j,14,i[18]),E=u(E,N,T,S,a,20,i[19]),S=u(S,E,N,T,f,5,i[20]),T=u(T,S,E,N,x,9,i[21]),N=u(N,T,S,E,A,14,i[22]),E=u(E,N,T,S,g,20,i[23]),S=u(S,E,N,T,y,5,i[24]),T=u(T,S,E,N,C,9,i[25]),N=u(N,T,S,E,m,14,i[26]),E=u(E,N,T,S,k,20,i[27]),S=u(S,E,N,T,_,5,i[28]),T=u(T,S,E,N,h,9,i[29]),N=u(N,T,S,E,v,14,i[30]),S=d(S,E=u(E,N,T,S,w,20,i[31]),N,T,f,4,i[32]),T=d(T,S,E,N,k,11,i[33]),N=d(N,T,S,E,j,16,i[34]),E=d(E,N,T,S,C,23,i[35]),S=d(S,E,N,T,l,4,i[36]),T=d(T,S,E,N,g,11,i[37]),N=d(N,T,S,E,v,16,i[38]),E=d(E,N,T,S,x,23,i[39]),S=d(S,E,N,T,_,4,i[40]),T=d(T,S,E,N,a,11,i[41]),N=d(N,T,S,E,m,16,i[42]),E=d(E,N,T,S,b,23,i[43]),S=d(S,E,N,T,y,4,i[44]),T=d(T,S,E,N,w,11,i[45]),N=d(N,T,S,E,A,16,i[46]),S=p(S,E=d(E,N,T,S,h,23,i[47]),N,T,a,6,i[48]),T=p(T,S,E,N,v,10,i[49]),N=p(N,T,S,E,C,15,i[50]),E=p(E,N,T,S,f,21,i[51]),S=p(S,E,N,T,w,6,i[52]),T=p(T,S,E,N,m,10,i[53]),N=p(N,T,S,E,x,15,i[54]),E=p(E,N,T,S,l,21,i[55]),S=p(S,E,N,T,k,6,i[56]),T=p(T,S,E,N,A,10,i[57]),N=p(N,T,S,E,b,15,i[58]),E=p(E,N,T,S,_,21,i[59]),S=p(S,E,N,T,g,6,i[60]),T=p(T,S,E,N,j,10,i[61]),N=p(N,T,S,E,h,15,i[62]),E=p(E,N,T,S,y,21,i[63]),o[0]=o[0]+S|0,o[1]=o[1]+E|0,o[2]=o[2]+N|0,o[3]=o[3]+T|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,s=8*t.sigBytes;r[s>>>5]|=128<<24-s%32;var o=e.floor(n/4294967296),a=n;r[15+(s+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(s+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var i=this._hash,l=i.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,s,o,a){var i=e+(t&r|~t&n)+s+a;return(i<>>32-o)+t}function u(e,t,r,n,s,o,a){var i=e+(t&n|r&~n)+s+a;return(i<>>32-o)+t}function d(e,t,r,n,s,o,a){var i=e+(t^r^n)+s+a;return(i<>>32-o)+t}function p(e,t,r,n,s,o,a){var i=e+(r^(t|~n))+s+a;return(i<>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),n.MD5)},86954:e=>{function t(e,t=100,r={}){if("function"!=typeof e)throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");const{immediate:n}="boolean"==typeof r?{immediate:r}:r;let s,o,a,i,l;function c(){const t=s,r=o;return s=void 0,o=void 0,l=e.apply(t,r),l}function u(){const e=Date.now()-i;e=0?a=setTimeout(u,t-e):(a=void 0,n||(l=c()))}const d=function(...e){if(s&&this!==s&&Object.getPrototypeOf(this)===Object.getPrototypeOf(s))throw new Error("Debounced method called with different contexts of the same prototype.");s=this,o=e,i=Date.now();const r=n&&!a;return a||(a=setTimeout(u,t)),r&&(l=c()),l};return Object.defineProperty(d,"isPending",{get:()=>void 0!==a}),d.clear=()=>{a&&(clearTimeout(a),a=void 0)},d.flush=()=>{a&&d.trigger()},d.trigger=()=>{l=c(),d.clear()},d}e.exports.debounce=t,e.exports=t},93764:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function s(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function i(e,t,r){var s={};return r.isMergeableObject(e)&&o(e).forEach((function(t){s[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(a(e,o)&&r.isMergeableObject(t[o])?s[o]=function(e,t){if(!t.customMerge)return l;var r=t.customMerge(e);return"function"==typeof r?r:l}(o,r)(e[o],t[o],r):s[o]=n(t[o],r))})),s}function l(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||s,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(r);return a===Array.isArray(e)?a?o.arrayMerge(e,r,o):i(e,r,o):n(r,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return l(e,r,t)}),{})};var c=l;e.exports=c},39904:(e,t)=>{"use strict";var r=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.t=function(e){if(!e)return!1;if(e.length>254)return!1;if(!r.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},2467:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function s(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,s,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function i(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var s,o,a,c;if(i(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(s=l(e))>0&&a.length>s&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},s=u.bind(n);return s.listener=r,n.wrapFn=s,s}function p(e,t,r){var n=e._events;if(void 0===n)return[];var s=n[t];return void 0===s?[]:"function"==typeof s?r?[s.listener||s]:[s]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(a=t[0]),a instanceof Error)throw a;var i=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw i.context=a,i}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,u=m(l,c);for(r=0;r=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,s=o;break}if(s<0)return this;0===s?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},58314:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},20305:e=>{"use strict";function t(e,t,r,n){var s=Number(e[t].meta.id+1).toString(),o="";return"string"==typeof n.docId&&(o="-"+n.docId+"-"),o+s}function r(e,t){var r=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(r+=":"+e[t].meta.subId),"["+r+"]"}function n(e,t,r,n,s){var o=s.rules.footnote_anchor_name(e,t,r,n,s),a=s.rules.footnote_caption(e,t,r,n,s),i=o;return e[t].meta.subId>0&&(i+=":"+e[t].meta.subId),''+a+""}function s(e,t,r){return(r.xhtmlOut?'
\n':'
\n')+'
\n
    \n'}function o(){return"
\n
\n"}function a(e,t,r,n,s){var o=s.rules.footnote_anchor_name(e,t,r,n,s);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),'
  • '}function i(){return"
  • \n"}function l(e,t,r,n,s){var o=s.rules.footnote_anchor_name(e,t,r,n,s);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),' ↩︎'}e.exports=function(e){var c=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=n,e.renderer.rules.footnote_block_open=s,e.renderer.rules.footnote_block_close=o,e.renderer.rules.footnote_open=a,e.renderer.rules.footnote_close=i,e.renderer.rules.footnote_anchor=l,e.renderer.rules.footnote_caption=r,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",(function(e,t,r,n){var s,o,a,i,l,c,d,p,h,m,g,f=e.bMarks[t]+e.tShift[t],b=e.eMarks[t];if(f+4>b)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(l=f+2;l=b||58!==e.src.charCodeAt(++l))return!1;if(n)return!0;for(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(f+2,l-2),e.env.footnotes.refs[":"+c]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:c},d.level=e.level++,e.tokens.push(d),s=e.bMarks[t],o=e.tShift[t],a=e.sCount[t],i=e.parentType,g=l,p=h=e.sCount[t]+l-(e.bMarks[t]+e.tShift[t]);l=a)&&(94===e.src.charCodeAt(i)&&(91===e.src.charCodeAt(i+1)&&(r=i+2,!((n=c(e,i+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),s=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(r,n),e.md,e.env,o=[]),e.push("footnote_ref","",0).meta={id:s},e.env.footnotes.list[s]={content:e.src.slice(r,n),tokens:o}),e.pos=n+1,e.posMax=a,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var r,n,s,o,a=e.posMax,i=e.pos;if(i+3>a)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(i))return!1;if(94!==e.src.charCodeAt(i+1))return!1;for(n=i+2;n=a)&&(n++,r=e.src.slice(i+2,n-1),void 0!==e.env.footnotes.refs[":"+r]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+r]<0?(s=e.env.footnotes.list.length,e.env.footnotes.list[s]={label:r,count:0},e.env.footnotes.refs[":"+r]=s):s=e.env.footnotes.refs[":"+r],o=e.env.footnotes.list[s].count,e.env.footnotes.list[s].count++,e.push("footnote_ref","",0).meta={id:s,subId:o,label:r}),e.pos=n,e.posMax=a,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,r,n,s,o,a,i,l,c,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(d=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=c,!1):(d&&c.push(e),!d)})),e.env.footnotes.list)){for(a=e.env.footnotes.list,i=new e.Token("footnote_block_open","",1),e.tokens.push(i),t=0,r=a.length;t0?a[t].count:1,n=0;n{"use strict";r.d(t,{A:()=>n});const n={button:"zI5tJ_qhWE6Oe6Lk75GY","is-icon-button":"tuBt2DLqimiImoqVzPqo",small:"Na39I683LAaSA99REg14",normal:"ipS7tKy9GntCS4R3vekF",icon:"paGLQwtPEaJmtArCcmyK",regular:"lZAo6_oGfclXOO9CC6Rd","full-width":"xJDOiJxTt0R_wSl8Ipz_",loading:"q_tVWqMjl39RcY6WtQA6","external-icon":"CDuBjJp_8jxzx5j6Nept"}},56058:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={"star-icon":"cuoSlhSNrqf1dozY22Xb",jetpack:"lAIiifeLMmZAPlQ9n9ZR","checkmark-icon":"JLquNpQVlysAamuh5lJO",socialIcon:"cbOwD8Y4tFjwimmtchQI",bluesky:"aLWBKY0yRghEk7tNCgK3",facebook:"aHOlEBGD5EA8NKRw3xTw",twitter:"af4Y_zItXvLAOEoSDPSv",linkedin:"f68aqF3XSD1OBvXR1get",tumblr:"xFI0dt3UiXRlRQdqPWkx",google:"q7JEoyymveP6kF747M43",mastodon:"DKOBOTVmTLbh26gUH_73",nextdoor:"n5XodNsuMfMAAvqHFmbw",instagram:"cL3m0xBYTYhIKI7lCqDB",whatsapp:"fftumuc_lJ6v0tq4UMVR",threads:"inzgC27qxdt7hSdhTWRI"}},39029:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},13372:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},99263:()=>{},74116:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={global:"_fUXxnSp5pagKBp9gSN7"}},99650:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},44997:e=>{var t=1e3,r=60*t,n=60*r,s=24*n,o=7*s,a=365.25*s;function i(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!i)return;var l=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*a;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*s;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var o=Math.abs(e);if(o>=s)return i(e,o,s,"day");if(o>=n)return i(e,o,n,"hour");if(o>=r)return i(e,o,r,"minute");if(o>=t)return i(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=s)return Math.round(e/s)+"d";if(o>=n)return Math.round(e/n)+"h";if(o>=r)return Math.round(e/r)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},68530:(e,t,r)=>{"use strict";var n=r(10961);e.exports=function(e,t){var r=this;return n(r.data,e,r.data[t]||s,r),r};var s=[]},35479:(e,t,r)=>{"use strict";var n=r(75466);e.exports=function(e){return Boolean(n(this,e))}},49897:(e,t,r)=>{"use strict";var n=r(74424);e.exports=function(e){var t,r,s,o,a=this,i=-1;n(e,a,a.data);for(;++i{"use strict";var n=r(58314),s=r(58496);e.exports=a;var o=a.prototype;function a(e,t){var r,o=-1;if(!(this instanceof a))return new a(e,t);if("string"==typeof e||n(e)?("string"==typeof t||n(t))&&(r=[{dic:t}]):e&&("length"in e?(r=e,e=e[0]&&e[0].aff):(e.dic&&(r=[e]),e=e.aff)),!e)throw new Error("Missing `aff` in dictionary");if(e=s(e),this.data=Object.create(null),this.compoundRuleCodes=e.compoundRuleCodes,this.replacementTable=e.replacementTable,this.conversion=e.conversion,this.compoundRules=e.compoundRules,this.rules=e.rules,this.flags=e.flags,r)for(;++o{"use strict";e.exports=function(e){var t,r,n,s,o=this,a=e.toString("utf8").split("\n"),i=-1;void 0===o.flags.FORBIDDENWORD&&(o.flags.FORBIDDENWORD=!1);s=o.flags.FORBIDDENWORD;for(;++i{"use strict";e.exports=function(e){return delete this.data[e],this}},92347:(e,t,r)=>{"use strict";var n=r(75466),s=r(91534);e.exports=function(e){var t=this,r=n(t,e,!0);return{correct:t.correct(e),forbidden:Boolean(r&&s(t.flags,"FORBIDDENWORD",t.data[r])),warn:Boolean(r&&s(t.flags,"WARN",t.data[r]))}}},98559:(e,t,r)=>{"use strict";var n=r(41455),s=r(92545),o=r(91534),a=r(75466);e.exports=function(e){var t,r,o,a,c,u,d,p,h,m,g,f,b,v,k,y,x,j,w,_,C,A,S,E,N,T=this,B={},P=[],I={},M=[];if(!(e=s(e.trim(),T.conversion.in))||T.correct(e))return[];N=n(e),a=-1;for(;++a-1;)M.push(e.replace(r[0],r[1])),c=e.indexOf(r[0],c+1);a=-1;for(;++aI[t]?-1:1}(e,t)||function(e,t){var r=n(e),s=n(t);return r===s?0:r===N?-1:s===N?1:void 0}(e,t)||function(e,t){return e.localeCompare(t)}(e,t)})),o=[],S=[],a=-1;for(;++a{"use strict";var n=r(77598);e.exports=function(e,t,r,a){var i,l,c,u,d,p,h,m=-1;(!("NEEDAFFIX"in a.flags)||r.indexOf(a.flags.NEEDAFFIX)<0)&&function(e,t,r){var n=e[t];t in e?n===o?e[t]=r.concat():s.apply(n,r):e[t]=r.concat()}(e,t,r);for(;++m{"use strict";var n=r(73509);e.exports=function(e){var t,r,u,d,p,h,m,g,f,b,v,k,y=Object.create(null),x=Object.create(null),j=Object.create(null),w=[],_={in:[],out:[]},C=[],A=e.toString("utf8"),S=[],E=0,N=A.indexOf("\n");j.KEY=[];for(;N>-1;)T(A.slice(E,N)),E=N+1,N=A.indexOf("\n",E);T(A.slice(E)),N=-1;for(;++N{"use strict";e.exports=function e(t,r,n,s){var o,a,i,l,c,u=-1;for(;++u{"use strict";function t(e){return e===e.toLowerCase()?"l":e===e.toUpperCase()?"u":null}e.exports=function(e){var r=t(e.charAt(0)),n=e.slice(1);if(!n)return r;if(n=t(n),r===n)return r;if("u"===r&&"l"===n)return"s";return null}},74424:(e,t,r)=>{"use strict";var n=r(73509),s=r(10961);e.exports=function(e,t,r){var n=e.toString("utf8"),s=n.indexOf("\n")+1,o=n.indexOf("\n",s);for(;o>-1;)9!==n.charCodeAt(s)&&a(n.slice(s,o),t,r),s=o+1,o=n.indexOf("\n",s);a(n.slice(s),t,r)};var o=/\s/g;function a(e,t,r){for(var a,i,l=e.indexOf("/"),c=e.indexOf("#"),u="";l>-1&&92===e.charCodeAt(l-1);)l=(e=e.slice(0,l-1)+e.slice(l)).indexOf("/",l);c>-1?l>-1&&l-1?(a=e.slice(0,l),u=e.slice(l+1)):a=e,(a=a.trim())&&s(r,a,n(t.flags,u.trim()),t)}},81277:(e,t,r)=>{"use strict";var n=r(91534);e.exports=function(e,t){var r=-1;if(e.data[t])return!n(e.flags,"ONLYINCOMPOUND",e.data[t]);if(t.length>=e.flags.COMPOUNDMIN)for(;++r{"use strict";e.exports=function(e,t,r){return r&&t in e&&r.indexOf(e[t])>-1}},75466:(e,t,r)=>{"use strict";var n=r(92545),s=r(81277),o=r(91534);function a(e,t,r){return o(e,"KEEPCASE",t)||r||o(e,"FORBIDDENWORD",t)}e.exports=function(e,t,r){var i,l=t.trim();if(!l)return null;if(l=n(l,e.conversion.in),s(e,l))return!r&&o(e.flags,"FORBIDDENWORD",e.data[l])?null:l;if(l.toUpperCase()===l){if(i=l.charAt(0)+l.slice(1).toLowerCase(),a(e.flags,e.data[i],r))return null;if(s(e,i))return i}if((i=l.toLowerCase())!==l){if(a(e.flags,e.data[i],r))return null;if(s(e,i))return i}return null}},92545:e=>{"use strict";e.exports=function(e,t){var r=-1;for(;++r{"use strict";e.exports=function(e,r){var n,s=0;if(!r)return t;if("long"===e.FLAG){for(n=new Array(Math.ceil(r.length/2));s{"use strict";e.exports=function(){return this.flags.WORDCHARS||null}},14936:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(87399),s=r.n(n),o=r(10067),a=r.n(o),i=r(11264),l=r.n(i);const c=a()("photon"),u={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},d="__domain__.invalid",p=`https://${d}`,h="https://i0.wp.com";function m(e,t){let r;try{r=new URL(e,p)}catch{return null}const n="https:"===r.protocol,o=new URL(h);if(a=r.host,/^i[0-2]\.wp\.com$/.test(a))o.pathname=r.pathname,o.hostname=n?"i0.wp.com":r.hostname;else{if(r.search)return null;let e=r.href.replace(`${r.protocol}/`,"");"blob:"===r.protocol&&(e=r.pathname.replace("://","//")),r.hostname===d&&(e=r.pathname),o.pathname=e,o.hostname=function(e,t){if(t)return"i0.wp.com";const r=s()(e),n=l()(r),o="i"+Math.floor(3*n());return c('determined server "%s" to use with "%s"',o,e),o+".wp.com"}(e,"https:"===o.protocol),n&&o.searchParams.set("ssl","1")}var a;if(t)for(const[e,r]of Object.entries(t))"host"!==e&&"hostname"!==e?"secure"!==e||r?o.searchParams.set(u[e]??e,r.toString()):o.protocol="http:":o.hostname=r;return c("generated Photon URL: %s",o.href),o.href}},15762:(e,t,r)=>{"use strict";var n=r(53761);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,t,r,s,o,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:s};return r.PropTypes=r,r}},28120:(e,t,r)=>{e.exports=r(15762)()},53761:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},87072:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>v});const n=2147483647,s=36,o=/^xn--/,a=/[^\0-\x7F]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const s=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(i,".")).split("."),t).join(".");return n+s}function h(e){const t=[];let r=0;const n=e.length;for(;r=55296&&s<=56319&&r>1,e+=c(e/t);e>455;n+=s)e=c(e/35);return c(n+36*e/(e+38))},f=function(e){const t=[],r=e.length;let o=0,a=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let r=0;r=128&&d("not-basic"),t.push(e.charCodeAt(r));for(let p=l>0?l+1:0;p=r&&d("invalid-input");const l=(u=e.charCodeAt(p++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:s;l>=s&&d("invalid-input"),l>c((n-o)/t)&&d("overflow"),o+=l*t;const h=a<=i?1:a>=i+26?26:a-i;if(lc(n/m)&&d("overflow"),t*=m}const h=t.length+1;i=g(o-l,h,0==l),c(o/h)>n-a&&d("overflow"),a+=c(o/h),o%=h,t.splice(o++,0,a)}var u;return String.fromCodePoint(...t)},b=function(e){const t=[],r=(e=h(e)).length;let o=128,a=0,i=72;for(const r of e)r<128&&t.push(u(r));const l=t.length;let p=l;for(l&&t.push("-");p=o&&tc((n-a)/h)&&d("overflow"),a+=(r-o)*h,o=r;for(const r of e)if(rn&&d("overflow"),r===o){let e=a;for(let r=s;;r+=s){const n=r<=i?1:r>=i+26?26:r-i;if(eString.fromCodePoint(...e)},decode:f,encode:b,toASCII:function(e){return p(e,(function(e){return a.test(e)?"xn--"+b(e):e}))},toUnicode:function(e){return p(e,(function(e){return o.test(e)?f(e.slice(4).toLowerCase()):e}))}}},24588:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function s(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,o,a=[];for(o in"string"!=typeof t&&(t="?"),e)if(r.call(e,o)){if((n=e[o])||null!=n&&!isNaN(n)||(n=""),o=s(o),n=s(n),null===o||null===n)continue;a.push(o+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,s={};t=r.exec(e);){var o=n(t[1]),a=n(t[2]);null===o||null===a||o in s||(s[o]=a)}return s}},32047:e=>{"use strict";function t(e,r){var n;if(Array.isArray(r))for(n=0;n{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},94107:(e,t,r)=>{"use strict";r.d(t,{A:()=>_});var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r0},e.prototype.connect_=function(){s&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){s&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;i.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),j="undefined"!=typeof WeakMap?new WeakMap:new n,w=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=c.getInstance(),n=new x(t,r,this);j.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){w.prototype[e]=function(){var t;return(t=j.get(this))[e].apply(t,arguments)}}));const _=void 0!==o.ResizeObserver?o.ResizeObserver:w},11264:e=>{"use strict";var t=256,r=[],n=window,s=Math.pow(t,6),o=Math.pow(2,52),a=2*o,i=255,l=Math.random;function c(e){var r,n=e.length,s=this,o=0,a=s.i=s.j=0,l=s.S=[];for(n||(e=[n++]);o=a;)e/=2,r/=2,n>>>=1;return(e+n)/r}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),r)},48931:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(1455),s=r.n(n);const o="default"in s()?s().default:s()},87286:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(10067),s=r.n(n),o=r(53664);const a=s()("jetpack-ai-client:ask-question");async function i(e,{postId:t=null,fromCache:r=!1,feature:n,functions:s,model:i}={}){return a("Asking question: %o. options: %o",e,{postId:t,fromCache:r,feature:n,functions:s,model:i}),new o.A({question:e,options:{postId:t,feature:n,fromCache:r,functions:s,model:i}})}},31439:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(10067),s=r.n(n),o=r(51391);const a=s()("jetpack-ai-client:ask-question-sync");async function i(e,t={}){a("Asking question with no streaming: %o. options: %o",e,t);let r=null;try{r=(await(0,o.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}const n={...Array.isArray(e)?{messages:e}:{question:e},...t,stream:!1},s={Authorization:`Bearer ${r}`,"Content-Type":"application/json"};try{const e=await fetch("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",{method:"POST",headers:s,body:JSON.stringify(n)}).then((e=>e.json()));return e?.data?.status&&e?.data?.status>200?(a("Error generating prompt: %o",e),Promise.reject(e)):e.choices?.[0]?.message?.content}catch(e){return a("Error asking question: %o",e),Promise.reject(e)}}},57745:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(10067),s=r.n(n),o=r(51391);const a=s()("jetpack-ai-client:audio-transcription");async function i(e,t,r){a("Transcribing audio: %o. Feature: %o",e,t);let n="";try{n=(await(0,o.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}const s=new FormData;s.append("audio_file",e);try{const e={Authorization:`Bearer ${n}`},o="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-transcription"+(t?`?feature=${t}`:"");return fetch(o,{method:"POST",body:s,headers:e,signal:r??void 0}).then((e=>(a("Transcription response: %o",e),e.ok?e.json().then((e=>e?.text)):e.json().then((e=>Promise.reject(e))))))}catch(e){return a("Transcription error response: %o",e),Promise.reject(e)}}},4867:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(10067),s=r.n(n),o=r(43984),a=r(74977),i=r(38344);const l=s()("ai-client:chrome-ai-factory");async function c(e){if(!await(0,a.O)())return l("Chrome AI is not available"),!1;const t={content:"",language:""};let r="",n=null,s=null;if(l("promptArg",e),Array.isArray(e))for(let o=0;o.75){r.sourceLanguage=e.detectedLanguage;break}l("languageOpts",r);const s=await self.Translator.availability(r);if(l("translationAvailability",s),"unavailable"===s)return l("Translator is unavailable"),!1;return new i.A({content:t.content,promptType:o.Gm,options:r})}if(r.startsWith("ai-content-lens")){if(!("Summarizer"in self))return l("Summarizer is not available"),!1;if(t.language&&"en (English)"!==t.language)return l("Summary is not English"),!1;l("awaiting detector detect");const e=await u.detect(t.content);for(const t of e)if(t.confidence>.75&&"en"!==t.detectedLanguage)return l("Confidence for non-English content"),!1;const r={tone:n,wordCount:s};l("summaryOpts",r);const a={content:t.content,promptType:o.UA,options:r};return l("chromeAiEventSourceOpts",a),new i.A(a)}return!1}},74977:(e,t,r)=>{"use strict";r.d(t,{O:()=>d});var n=r(99101),s=r(47143),o=r(93832),a=r(10067),i=r.n(a),l=r(48931);const c=i()("ai-client:chrome-ai-availability");const u=async({experimentName:e})=>{const t={experiment_name:e,anon_id:void 0,as_connected_user:!0};c("params",t);const r=(0,o.addQueryArgs)("https://public-api.wordpress.com/wpcom/v2/experiments/0.1.0/assignments/jetpack",t);return c("assignmentsRequestUrl",r),(0,l.A)({url:r,credentials:"include",mode:"cors",global:!0})};async function d(){const{featuresControl:e}=function(){const{getAiAssistantFeature:e}=(0,s.select)("wordpress-com/plans");return e()}();if(!0!==e?.["chrome-ai"]?.enabled)return c("feature is disabled for this site/user"),!1;(0,n.Pg)();const{loadExperimentAssignment:t}=(0,n.kU)({fetchExperimentAssignment:u,getAnonId:async()=>null,logError:c,isDevelopmentMode:!1}),{variationName:r}=await t("calypso_jetpack_ai_gemini_api_202503_v2");return c("variationName",r),"treatment"===r}},35209:(e,t,r)=>{"use strict";r(4867),r(38344)},38344:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(10067),s=r.n(n),o=r(43984),a=r(46219),i=r(55166),l=r(78836);const c=s()("ai-client:chrome-ai-suggestions");class u extends EventTarget{constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initSource(e)}initSource({content:e,promptType:t,options:r={}}){c("initSource",e,t,r),t===o.Gm&&this.translate(e,r.targetLanguage,r.sourceLanguage),t===o.UA&&this.summarize(e,r.tone,r.wordCount)}async initEventSource(){}close(){}checkForUnclearPrompt(){}processEvent(e){let t;c("processEvent",e);try{t=JSON.parse(e.data)}catch(e){return void this.processErrorEvent(e)}"translation"!==e.event&&"summary"!==e.event||this.dispatchEvent(new CustomEvent("suggestion",{detail:t.message})),t.complete&&this.dispatchEvent(new CustomEvent("done",{detail:{message:t.message,source:"chromeAI"}}))}processErrorEvent(e){c("processErrorEvent",e),this.dispatchEvent(new CustomEvent(l.mA,{detail:e})),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,a.fC)(l.mA)}))}async translate(e,t,r=""){if(!("Translator"in self))return;if("unavailable"===await self.Translator.availability({sourceLanguage:r,targetLanguage:t}))return c("awaiting translator ready"),void this.processErrorEvent({message:"Translator is unavailable"});const n=await self.Translator.create({sourceLanguage:r,targetLanguage:t});if(n)try{const t=await n.translate((0,i.Hh)({content:e}));this.processEvent({id:"",event:"translation",data:JSON.stringify({message:(0,i.rh)({content:t}),complete:!0})})}catch(e){this.processErrorEvent(e)}else this.processErrorEvent({message:"Translator failed to initialize"})}getSummarizerOptions(e,t){let r=`The summary you write should contain strictly less than ${t??50} words. Strive for precision in word count without compromising clarity and significance`;e&&(r+=`\n - Write with a ${e} tone.\n`);return{sharedContext:r,type:"teaser",format:"plain-text",length:"medium"}}async summarize(e,t,r){if(c("summarize",e,t,r),!("Summarizer"in self))return;const n=await self.Summarizer.availability();if("unavailable"===n)return void this.processErrorEvent({data:{message:"Summarizer is unavailable"}});const s=this.getSummarizerOptions(t,r),o=await self.Summarizer.create(s);"available"!==n&&(c("awaiting summarizer ready"),await o.ready);try{const n=`Write with a ${t} tone.`;c("context",n);let s=await o.summarize(e,{context:n});c("summary",s),r=r??50,s.split(" ").length>r&&(c("summary exceeds word count"),s=await o.summarize(s,{context:n})),this.processEvent({id:"",event:"summary",data:JSON.stringify({message:s,complete:!0})})}catch(e){c("error",e),this.processErrorEvent(e)}}}},70629:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(13022),o=r(6754),a=r(10790);function i({className:e,disabled:t=!1,value:r="",placeholder:i="",isTransparent:l=!1,state:c="init",onChange:u,banner:d=null,error:p=null,actions:h=null,message:m=null,promptUserInputRef:g=null,wrapperRef:f=null}){return(0,a.jsxs)("div",{className:(0,s.A)("jetpack-components-ai-control__container-wrapper",e),ref:f,children:[p,(0,a.jsxs)("div",{className:"jetpack-components-ai-control__container",children:[d,(0,a.jsxs)("div",{className:(0,s.A)("jetpack-components-ai-control__wrapper",{"is-transparent":l}),children:[(0,a.jsx)(o.A,{state:c}),(0,a.jsx)("div",{className:"jetpack-components-ai-control__input-wrapper",children:(0,a.jsx)(n.PlainText,{value:r,onChange:u,placeholder:i,className:"jetpack-components-ai-control__input",disabled:t,ref:g})}),h]}),m]})]})}},71417:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(56427),s=r(29491),o=r(86087),a=r(27723),i=r(51113),l=r(31249),c=r(62510),u=r(76673),d=r(40502),p=r(83883),h=r(10067),m=r.n(h),g=r(51609),f=r(63098),b=r(70629),v=r(10790);const __=a.__,k=m()("jetpack-ai-client:block-ai-control");function y({disabled:e=!1,value:t="",placeholder:r="",showAccept:a=!1,acceptLabel:h=__("Accept","jetpack"),showButtonLabels:m=!0,isTransparent:g=!1,state:y="init",showGuideLine:x=!1,customFooter:j=null,onChange:w,onSend:_,onStop:C,onAccept:A,onDiscard:S,showRemove:E=!1,banner:N=null,error:T=null,lastAction:B},P){const I="requesting"===y||"suggesting"===y,[M,L]=(0,o.useState)(!1),[R,D]=(0,o.useState)(t||null),F=(0,o.useRef)(null);(0,o.useImperativeHandle)(P,(()=>F.current)),(0,o.useEffect)((()=>{M&&F?.current?.focus()}),[M]);const O=(0,o.useCallback)((()=>{D(t),L(!1),_?.(t)}),[t]),z=(0,o.useCallback)((e=>{w?.(e),"init"!==y&&L(R?e!==R:e.length>0)}),[R,y]),U=(0,o.useCallback)((()=>{S?.()}),[]),H=(0,o.useCallback)((()=>{k("cancelEdit, revert to last value",R),w?.(R||""),L(!1)}),[R]);(0,s.useKeyboardShortcut)("mod+enter",(()=>{a&&A?.()}),{target:F}),(0,s.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),O()}),{target:F});const V=(0,v.jsxs)(v.Fragment,{children:[(!a||M)&&(0,v.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:I?(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:C,variant:"secondary",label:__("Stop request","jetpack"),children:m?__("Stop","jetpack"):(0,v.jsx)(i.A,{icon:l.A})}):(0,v.jsxs)(v.Fragment,{children:[M&&(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:H,variant:"secondary",label:__("Cancel","jetpack"),children:m?__("Cancel","jetpack"):(0,v.jsx)(i.A,{icon:l.A})}),E&&!M&&!t?.length&&S&&(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:U,variant:"secondary",label:__("Cancel","jetpack"),children:m?__("Cancel","jetpack"):(0,v.jsx)(i.A,{icon:l.A})}),t?.length>0&&(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:O,variant:"primary",disabled:!t?.length||e,label:__("Send request","jetpack"),children:m?__("Generate","jetpack"):(0,v.jsx)(i.A,{icon:c.A})})]})}),a&&!M&&(0,v.jsxs)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:[(t?.length>0||null===R)&&(0,v.jsxs)(n.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:U,tooltipPosition:"top",children:(0,v.jsx)(i.A,{icon:u.A})}),(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Regenerate","jetpack"),onClick:()=>_?.(t),tooltipPosition:"top",disabled:!t?.length||null===t||e,children:(0,v.jsx)(i.A,{icon:d.A})})]}),(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:A,variant:"primary",label:h,children:m?h:(0,v.jsx)(i.A,{icon:p.A})})]})]}),q=x&&!I&&!M&&(j||(0,v.jsx)(f.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:B,block:"ai-assistant"}}));return(0,v.jsx)(b.A,{disabled:e||I,value:t,placeholder:r,isTransparent:g,state:y,onChange:z,banner:N,error:T,actions:V,message:q,promptUserInputRef:F})}const x=(0,g.forwardRef)(y)},61:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(56427),s=r(29491),o=r(86087),a=r(27723),i=r(51113),l=r(31249),c=r(62510),u=r(95789),d=r(51609),p=r(63098),h=r(70629),m=r(10790);const __=a.__;function g({className:e,disabled:t=!1,value:r="",placeholder:a="",showButtonLabels:d=!0,isTransparent:g=!1,state:f="init",showGuideLine:b=!1,error:v,requestsRemaining:k,showUpgradeMessage:y=!1,showFairUsageMessage:x=!1,upgradeUrl:j,wrapperRef:w,onChange:_,onSend:C,onStop:A,onClose:S,onUndo:E,onUpgrade:N,onTryAgain:T,lastAction:B,blockType:P},I){const M="requesting"===f||"suggesting"===f,[L,R]=(0,o.useState)(!1),[D,F]=(0,o.useState)(r||null),O=(0,o.useRef)(null),z=r?.length<=0&&"done"===f;(0,o.useImperativeHandle)(I,(()=>O.current)),(0,o.useEffect)((()=>{L&&O?.current?.focus()}),[L]);const U=(0,o.useCallback)((()=>{F(r),R(!1),C?.(r)}),[C,r]),H=(0,o.useCallback)((e=>{_?.(e),"init"!==f&&R(D?e!==D:e.length>0)}),[_,D,f]),V=(0,o.useCallback)((()=>{A?.()}),[A]),q=(0,o.useCallback)((()=>{S?.()}),[S]),G=(0,o.useCallback)((()=>{E?.()}),[E]),$=(0,o.useCallback)((e=>{N?.(e)}),[N]),W=(0,o.useCallback)((()=>{T?.()}),[T]);(0,s.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),U()}),{target:O});const Z=(0,m.jsx)(m.Fragment,{children:M?(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:V,variant:"secondary",label:__("Stop request","jetpack"),children:d?__("Stop","jetpack"):(0,m.jsx)(i.A,{icon:l.A})}):(0,m.jsxs)(m.Fragment,{children:[r?.length>0&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:U,variant:"primary",disabled:!r?.length||t,label:__("Send request","jetpack"),children:d?__("Generate","jetpack"):(0,m.jsx)(i.A,{icon:c.A})})}),z&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsxs)(n.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Undo","jetpack"),onClick:G,tooltipPosition:"top",children:(0,m.jsx)(i.A,{icon:u.A})}),(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Close","jetpack"),onClick:q,variant:"tertiary",children:__("Close","jetpack")})]})})]})});let J=null;return v?.message?J=(0,m.jsx)(p.Kw,{error:v.message,code:v.code,onTryAgainClick:W,onUpgradeClick:$,upgradeUrl:j}):x?J=(0,m.jsx)(p.k9,{}):y?J=(0,m.jsx)(p.AK,{requestsRemaining:k,onUpgradeClick:$,upgradeUrl:j}):b&&(J=z?(0,m.jsx)(p.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:B,block:P}}):(0,m.jsx)(p.Yj,{})),(0,m.jsx)(h.A,{className:e,disabled:t||M,value:r,placeholder:a,isTransparent:g,state:f,onChange:H,actions:Z,message:J,promptUserInputRef:O,wrapperRef:w})}const f=(0,d.forwardRef)(g)},42299:(e,t,r)=>{"use strict";r.d(t,{FC:()=>s.A,N0:()=>n.A});r(70629);var n=r(71417),s=r(61)},11497:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(85985),s=r(56427),o=r(86087),a=r(27723),i=r(7598),l=r(50347),c=r(13022),u=r(10790);const __=a.__;function d({disabled:e=!1,iconSize:t=24,ratedItem:r="",feature:a="",savedRatings:d={},options:p={},onRate:h}){if(!function(e){return!0===(0,n.FB)(e).available}("ai-response-feedback"))return null;const[m,g]=(0,o.useState)({}),{tracks:f}=(0,n.st)();(0,o.useEffect)((()=>{const e={...d,...m};JSON.stringify(e)!==JSON.stringify(m)&&g(e)}),[d]);const b=e=>!!m[r]&&m[r]===e,v=e=>{const t=e?"thumbs-up":"thumbs-down";b(t)||(g({...m,[r]:t}),h?.(t),f.recordEvent("jetpack_ai_feedback",{type:a,rating:t,media_library_id:p.mediaLibraryId||null,prompt:p.prompt||null,revised_prompt:p.revisedPrompt||null,block:p.block||null}))};return(0,u.jsxs)("div",{className:"ai-assistant-feedback__selection",children:[(0,u.jsx)(s.Tooltip,{text:__("I like this","jetpack"),children:(0,u.jsx)(s.Button,{disabled:e,icon:i.A,onClick:()=>v(!0),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-up")})})}),(0,u.jsx)(s.Tooltip,{text:__("I don't find this useful","jetpack"),children:(0,u.jsx)(s.Button,{disabled:e,icon:l.A,onClick:()=>v(!1),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-down")})})})]})}},23059:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,R:()=>i});var n=r(56427),s=r(51113),o=r(5573),a=r(10790);const i=(0,a.jsxs)(n.SVG,{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsxs)(n.G,{clipPath:"url(#clip0_4479_1006)",children:[(0,a.jsx)(n.Path,{d:"M7.87488 0L10.1022 5.64753L15.7498 7.87488L10.1022 10.1022L7.87488 15.7498L5.64753 10.1022L0 7.87488L5.64753 5.64753L7.87488 0Z",fill:"#A7AAAD"}),(0,a.jsx)(n.Path,{d:"M31.4998 0L34.4696 7.53004L41.9997 10.4998L34.4696 13.4696L31.4998 20.9997L28.53 13.4696L21 10.4998L28.53 7.53004L31.4998 0Z",fill:"#A7AAAD"}),(0,a.jsx)(n.Path,{d:"M18.3748 15.7496L22.0871 25.1621L31.4996 28.8744L22.0871 32.5866L18.3748 41.9992L14.6625 32.5866L5.25 28.8744L14.6625 25.1621L18.3748 15.7496Z",fill:"#A7AAAD"})]}),(0,a.jsx)(o.Defs,{children:(0,a.jsx)("clipPath",{id:"clip0_4479_1006",children:(0,a.jsx)(n.Rect,{width:"41.9997",height:"41.9992",fill:"white"})})})]});function l({className:e,size:t=42}){return(0,a.jsx)(s.A,{icon:i,width:t,height:t,className:e})}},96390:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});var n=r(85985),s=r(56427),o=r(86087),a=r(27723),i=r(10067),l=r.n(i),c=r(66223),u=r(23101),d=r(46381),p=r(14016),h=r(57853),m=r(77990),g=r(47560),f=r(10790);const __=a.__,b="ai-image-generator",v=l()("jetpack-ai-client:ai-image-modal");function k({title:e,cost:t,open:r,images:a,currentIndex:i=0,onClose:l=null,onTryAgain:k=null,onGenerate:y=null,generating:x=!1,notEnoughRequests:j=!1,requireUpgrade:w=!1,currentLimit:_=null,currentUsage:C=null,isUnlimited:A=!1,upgradeDescription:S=null,hasError:E=!1,handlePreviousImage:N=()=>{},handleNextImage:T=()=>{},acceptButton:B=null,autoStart:P=!1,autoStartAction:I=null,instructionsPlaceholder:M=null,imageStyles:L=[],onGuessStyle:R=null,prompt:D="",setPrompt:F=()=>{},initialStyle:O=null,inputDisabled:z=!1,actionDisabled:U=!1}){const{tracks:H}=(0,n.st)(),{recordEvent:V}=H,q=(0,o.useRef)(!1),[G,$]=(0,o.useState)(!1),[W,Z]=(0,o.useState)(null),[J,K]=(0,o.useState)(L||[]),Y=(0,o.useCallback)((()=>{k?.({userPrompt:D,style:W})}),[k,D,W]),Q=(0,o.useCallback)((async()=>{if(W===c.Wp&&R){V("jetpack_ai_general_image_guess_style",{context:"block-editor",tool:"image"});const e=await R(D)||c.Hu;Z(e),v("guessed style",e),y?.({userPrompt:D,style:e})}else y?.({userPrompt:D,style:W})}),[y,D,W,R,V]),X=(0,o.useCallback)((e=>{v("change style",e),Z(e),V("jetpack_ai_image_generator_switch_style",{context:"block-editor",style:e})}),[Z,V]),ee=(w||j)&&!x,te=Boolean(!A&&t&&_),re=__("Generate","jetpack"),ne=__("Try again","jetpack");return(0,o.useEffect)((()=>{P&&r&&(q.current||(q.current=!0,I?.({})))}),[P,I,r]),(0,o.useEffect)((()=>{L&&L.length>0&&(K([L.find((({value:e})=>e===c.Hu)),L.find((({value:e})=>e===c.Wp)),...L.filter((({value:e})=>![c.Hu,c.Wp].includes(e)))].filter((e=>e))),$(!0),Z(O||c.Hu))}),[L,O]),(0,f.jsx)(f.Fragment,{children:r&&(0,f.jsxs)(p.A,{handleClose:l,title:e,children:[(0,f.jsxs)("div",{className:"ai-image-modal__content",children:[G&&(0,f.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,f.jsx)("div",{style:{fontWeight:500,flexGrow:1},children:__("Generate image","jetpack")}),(0,f.jsx)("div",{children:(0,f.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:W,options:J,onChange:X})})]}),(0,f.jsx)(u.K,{prompt:D,setPrompt:F,disabled:z,actionDisabled:U,generateHandler:E?Y:Q,placeholder:M,buttonLabel:E?ne:re}),ee&&(0,f.jsx)(h.A,{description:S,placement:b,useLightNudge:!0}),(0,f.jsx)("div",{className:"ai-image-modal__actions",children:(0,f.jsx)("div",{className:"ai-image-modal__actions-left",children:te&&(0,f.jsx)(g.A,{cost:t,currentLimit:_,currentUsage:C})})}),(0,f.jsx)("div",{className:"ai-image-modal__image-canvas",children:(0,f.jsx)(m.A,{images:a,current:i,handlePreviousImage:N,handleNextImage:T,actions:B})})]}),(0,f.jsx)("div",{className:"ai-image-modal__footer",children:(0,f.jsx)(d.A,{})})]})})}},77990:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(56427),s=r(86087),o=r(27723),a=r(51113),i=r(68888),l=r(29115),c=r(13022),u=r(11497),d=r(23059),p=r(10790);const __=o.__;function h({children:e,isDotted:t=!1,contentClassName:r=""}){const n=(0,p.jsx)("img",{className:"ai-assistant-image__carrousel-image",src:"data:image/svg+xml,",alt:""});return(0,p.jsxs)("div",{className:"ai-assistant-image__blank",children:[n,(0,p.jsx)("div",{className:(0,c.A)("ai-assistant-image__blank-content",r,{"is-dotted":t}),children:e})]})}function m({images:e,current:t,handlePreviousImage:r,handleNextImage:o,actions:m=null}){const[g,f]=(0,s.useState)(!1),b=(0,p.jsx)("button",{className:"ai-carrousel__prev",onClick:r,children:(0,p.jsx)(a.A,{icon:i.A,className:(0,c.A)("ai-carrousel__prev-icon",{"is-disabled":0===t})})}),v=(0,p.jsx)("button",{className:"ai-carrousel__next",onClick:o,children:(0,p.jsx)(a.A,{icon:l.A,className:(0,c.A)("ai-carrousel__next-icon",{"is-disabled":t+1===e.length})})}),k=e?.filter?.((e=>e?.generating||Object.hasOwn(e,"image")||Object.hasOwn(e,"libraryId")))?.length,y=0===t&&0===k?0:t+1;return(0,s.useEffect)((()=>{const r=e[t];r||f(!0);const{image:n,generating:s,error:o}=r||{};return n||s||o?s||o?f(!0):void f(!1):f(!0)}),[t,e]),(0,p.jsxs)("div",{className:"ai-assistant-image__carrousel",children:[(0,p.jsxs)("div",{className:"ai-assistant-image__carrousel-images",children:[e.length>1&&b,e.map((({image:e,generating:r,error:s,revisedPrompt:o,libraryUrl:a},i)=>(0,p.jsx)("div",{className:(0,c.A)("ai-assistant-image__carrousel-image-container",{"is-current":t===i,"is-prev":t>i}),children:r?(0,p.jsxs)(h,{contentClassName:"ai-assistant-image__loading",children:[__("Creating image…","jetpack"),(0,p.jsx)(n.Spinner,{style:{width:"50px",height:"50px"}})]}):(0,p.jsx)(p.Fragment,{children:s?(0,p.jsx)(h,{isDotted:!0,children:(0,p.jsxs)("div",{className:"ai-assistant-image__error",children:[__("An error occurred while generating the image. Please, try again!","jetpack"),s?.message&&(0,p.jsx)("span",{className:"ai-assistant-image__error-message",children:s?.message})]})}):(0,p.jsx)(p.Fragment,{children:r||e||a?(0,p.jsx)("img",{className:"ai-assistant-image__carrousel-image",src:e||a,alt:o}):(0,p.jsx)(h,{children:(0,p.jsx)(d.A,{})})})})},"image:"+i))),e.length>1&&v]}),(0,p.jsxs)("div",{className:"ai-assistant-image__carrousel-footer",children:[(0,p.jsxs)("div",{className:"ai-assistant-image__carrousel-footer-left",children:[(0,p.jsxs)("div",{className:"ai-assistant-image__carrousel-counter",children:[b,y," / ",k,v]}),(0,p.jsx)(u.A,{disabled:g,ratedItem:e[t]?.libraryUrl||"",iconSize:20,options:{mediaLibraryId:Number(e[t].libraryId),prompt:e[t].prompt,revisedPrompt:e[t].revisedPrompt},feature:"image-generator"})]}),(0,p.jsx)("div",{className:"ai-assistant-image__carrousel-actions",children:m})]})]})}},47560:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(86087),s=r(27723),o=r(10790);const __=s.__;function a({currentLimit:e,currentUsage:t,cost:r}){const a=e-t,i=(0,n.createInterpolateElement)( // Translators: %d is the cost of one image. // Translators: %d is the cost of one image. (0,s.sprintf)(__("Requests needed: %d","jetpack"),r),{counter:(0,o.jsx)("span",{})}),l=(0,n.createInterpolateElement)((0,s.sprintf)( // Translators: %d is the current requests balance. __("Requests available: %d","jetpack"),a),{counter:a{"use strict";r.d(t,{A:()=>x});var n=r(85985),s=r(56427),o=r(47143),a=r(43656),i=r(86087),l=r(27723),c=r(10067),u=r.n(c),d=r(43984),p=r(72448),h=r(71508),m=r(62038),g=r(96390),f=r(3620),b=r(35918),v=r(75988),k=r(10790);const __=l.__,y=u()("jetpack-ai-client:featured-image");function x({busy:e,disabled:t,placement:r,onClose:c=()=>{}}){const[u,x]=(0,i.useState)(r===v.hB),j=(0,b.A)(),{getPostContent:w,isEditedPostEmpty:_}=(0,h.A)(),{postTitle:C,postFeaturedMediaId:A,isEditorPanelOpened:S}=(0,o.useSelect)((e=>({postTitle:e(a.store).getEditedPostAttribute("title"),postFeaturedMediaId:e(a.store).getEditedPostAttribute("featured_media"),isEditorPanelOpened:e(a.store).isEditorPanelOpened??e("core/edit-post").isEditorPanelOpened})),[]),{saveToMediaLibrary:E}=(0,m.A)(),{tracks:N}=(0,n.st)(),{recordEvent:T}=N,[B,P]=(0,i.useState)(null),[I,M]=(0,i.useState)(""),{enableComplementaryArea:L}=(0,o.useDispatch)("core/interface"),{clearSelectedBlock:R}=(0,o.useDispatch)("core/block-editor"),{toggleEditorPanelOpened:D}=(0,o.useDispatch)("core/edit-post"),{editPost:F,toggleEditorPanelOpened:O}=(0,o.useDispatch)(a.store),{requireUpgrade:z,requestsCount:U,requestsLimit:H,currentTier:V,costs:q}=(0,p.A)(),G=(0,n.Bd)(V),$=q?.[v.oW]?.activeModel??10,W=$===q?.[v.oW]?.stableDiffusion?v.Dk:v.bb,Z=G===n.Ti,J=H-U<$,K=O??D,{pointer:Y,current:Q,setCurrent:X,processImageGeneration:ee,handlePreviousImage:te,handleNextImage:re,currentImage:ne,currentPointer:se,images:oe,imageStyles:ae,guessStyle:ie}=(0,f.A)({autoStart:!1,cost:$,type:"featured-image-generation",feature:v.oW,previousMediaId:A}),le=(0,i.useCallback)((()=>{x(!1),c?.()}),[c]),ce=(0,i.useCallback)((()=>{x(!0)}),[]),ue=(0,i.useCallback)((e=>{const t=C+"\n\n"+w();return ie(e,"featured-image-guess-style",t)}),[C,w,ie]),de=(0,i.useCallback)((({userPrompt:e,style:t})=>(T("jetpack_ai_featured_image_generation_generate_image",{placement:r,model:W,site_type:j,style:t,userPrompt:e}),x(!0),ee({userPrompt:e,postContent:C+"\n\n"+w(),notEnoughRequests:J,style:t}).catch((e=>{T("jetpack_ai_featured_image_generation_error",{placement:r,error:e?.message,model:W,site_type:j,style:t})})))),[T,r,W,j,ee,w,J,C]),pe=(0,i.useCallback)((async()=>{se.generating=!0;const e=await ue("");P(e);const t=await de({userPrompt:"",style:e});t&&(y("handleFirstGenerate",t.revisedPrompt),M(t.revisedPrompt||""))}),[se,de,ue]),he=(0,i.useCallback)((({userPrompt:e,style:t})=>{T("jetpack_ai_featured_image_generation_generate_another_image",{placement:r,model:W,site_type:j,style:t}),X((()=>oe.length)),ee({userPrompt:e,postContent:C+"\n\n"+w(),notEnoughRequests:J,style:t}).catch((n=>{T("jetpack_ai_featured_image_generation_error",{placement:r,error:n?.message,model:W,site_type:j,style:t,userPrompt:e})}))}),[T,r,W,j,X,ee,C,w,J,oe]),me=(0,i.useCallback)((({userPrompt:e,style:t})=>{T("jetpack_ai_featured_image_generation_try_again",{placement:r,model:W,site_type:j,style:t}),ee({userPrompt:e,postContent:C+"\n\n"+w(),notEnoughRequests:J,style:t}).catch((e=>{T("jetpack_ai_featured_image_generation_error",{placement:r,error:e?.message,model:W,site_type:j,style:t})}))}),[T,r,W,j,ee,w,J,C]),ge=(0,i.useCallback)((()=>(R(),L("core/edit-post","edit-post/document"))),[R,L]),fe=(0,i.useCallback)((()=>{T("jetpack_ai_featured_image_generation_use_image",{placement:r,model:W,site_type:j});const e=e=>{F({featured_media:e}),le(),setTimeout((()=>{const e=S("featured-image"),t=S("post-status");ge().then((()=>{e||K("featured-image"),t||K("post-status")}))}),500)};ne?.libraryId?e(ne?.libraryId):E(ne?.image).then((t=>{e(t?.id)})).catch((e=>{T("jetpack_ai_featured_image_saving_error",{placement:r,error:e?.message,model:W,site_type:j})}))}),[T,r,W,j,ne?.libraryId,ne?.image,F,le,S,ge,K,E]),be=__("Generate another image","jetpack"),ve=__("Generate","jetpack"),ke=!(_()&&!C.trim?.()),ye=ke?I.length>=0:I.length>=3,xe=J||se?.generating||z,je=xe||!ke&&!ye,we=J?(0,l.sprintf)( // Translators: %d is the cost of generating a featured image. __("Featured image generation costs %d requests per image. You don't have enough requests to generate another image.","jetpack"),$):null,_e=(0,k.jsx)(s.Button,{onClick:fe,variant:"primary",disabled:!ne?.image||ne?.generating||ne?.libraryId===A,children:__("Set as featured image","jetpack")});return(0,k.jsxs)(k.Fragment,{children:[(r===d.s6||r===d.wb)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("p",{className:"jetpack-ai-assistant__help-text",children:__("Based on your post content.","jetpack")}),(0,k.jsx)(s.Button,{onClick:ce,isBusy:e,disabled:t||J,variant:"secondary",__next40pxDefaultSize:!0,children:__("Generate image","jetpack")})]}),(0,k.jsx)(g.A,{autoStart:ke&&!A,autoStartAction:pe,images:oe,currentIndex:Q,title:__("Generate a featured image with AI","jetpack"),cost:$,open:u,placement:r,onClose:le,onTryAgain:me,onGenerate:Y?.current>0||A?he:de,generating:se?.generating,notEnoughRequests:J,requireUpgrade:z,upgradeDescription:we,currentLimit:H,currentUsage:U,isUnlimited:Z,hasError:Boolean(se?.error),handlePreviousImage:te,handleNextImage:re,acceptButton:_e,generateButtonLabel:Y?.current>0?be:ve,instructionsPlaceholder:__("Describe the featured image you'd like to create and select a style.","jetpack"),imageStyles:ae,onGuessStyle:ue,prompt:I,setPrompt:M,initialStyle:B,inputDisabled:xe,actionDisabled:je})]})}},83158:(e,t,r)=>{"use strict";r(85985),r(56427),r(86087),r(27723);var n=r(10067),s=r.n(n);r(72448),r(71508),r(62038),r(96390),r(3620),r(35918),r(10790);s()("jetpack-ai:general-purpose-image")},3620:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(47143),s=r(86087),o=r(27723),a=r(93832),i=r(31439),l=r(72448),c=r(62614),u=r(62038),d=r(75988);const __=o.__;function p({feature:e,type:t,cost:r,autoStart:o=!0,previousMediaId:p}){const{generateImageWithParameters:h}=(0,c.Ay)(),{increaseRequestsCount:m,featuresControl:g}=(0,l.A)(),{saveToMediaLibrary:f}=(0,u.A)(),{createNotice:b}=(0,n.useDispatch)("core/notices"),v=(0,s.useRef)(0),[k,y]=(0,s.useState)(0),[x,j]=(0,s.useState)([{generating:o}]),w=e===d.oW?"featured-image":"image",_=g?.[w],C=_?.styles,A=(0,s.useCallback)(((e,t)=>{j((r=>{const n=[...r];return n[t]={...n[t],...e},n}))}),[]),S=(0,n.useSelect)((e=>e("core")?.getMedia?.(p)),[p]);(0,s.useEffect)((()=>{S&&A({image:S.source_url,libraryId:S.id,libraryUrl:S.source_url,generating:!1},v.current)}),[S,A]);const E=(0,s.useCallback)((e=>{b("success",e,{type:"snackbar",isDismissible:!0})}),[b]),N=(0,s.useCallback)((()=>{m(r)}),[m,r]),T=(0,s.useCallback)((e=>{if(!e)return"image.png";const t=e.split(" ").slice(0,10).join(" ");return(0,a.cleanForSlug)(t)+".png"}),[]),B=(0,s.useCallback)((({userPrompt:r,postContent:n,notEnoughRequests:s,style:o=null})=>new Promise(((a,i)=>{if(p&&0===v.current&&v.current++,A({generating:!0,error:null},v.current),s)return A({generating:!1,error:new Error(__("You don't have enough requests to generate another image.","jetpack"))},v.current),void a({});const l=h({feature:e,size:"1792x1024",responseFormat:"b64_json",messages:[{role:"jetpack-ai",context:{type:t,request:r||null,content:n,style:o}}],style:o||""}),c=T(r);l.then((e=>{if(e.data.length>0){const t="data:image/png;base64,"+e.data[0].b64_json,n=r||null,s=e.data[0].revised_prompt||null;A({image:t,prompt:n,revisedPrompt:s},v.current),N(),f(t,c).then((e=>{E(__("Image saved to media library.","jetpack")),A({libraryId:e?.id,libraryUrl:e?.url,generating:!1},v.current),v.current+=1,a({image:t,libraryId:e?.id,libraryUrl:e?.url,revisedPrompt:s})})).catch((()=>{A({generating:!1},v.current),v.current+=1,a({image:t})}))}})).catch((e=>{A({generating:!1,error:e},v.current),i(e)}))}))),[A,h,e,t,N,f,E,T,p]),P=(0,s.useCallback)((()=>{y(Math.max(k-1,0))}),[k]),I=(0,s.useCallback)((()=>{y(Math.min(k+1,x.length-1))}),[k,x.length]),M=(0,s.useCallback)((async function(e,t="",r=""){if(!C||!C.length)return null;const n=[{role:"jetpack-ai",context:{type:t||"general-image-guess-style",request:e,content:r}}];try{const e=await(0,i.A)(n,{feature:"jetpack-ai-image-generator"});if(!e)return null;const t=C.find((({value:t})=>t===e));return t?t.value:null}catch(e){Promise.reject(e)}}),[C]);return{current:k,setCurrent:y,processImageGeneration:B,handlePreviousImage:P,handleNextImage:I,currentImage:x[k],currentPointer:x[v.current],images:x,pointer:v,imageStyles:C,guessStyle:M}}},35918:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(97999),s=r(86087);function o(){const[e]=(0,s.useState)((0,n.isWoASite)()?"atomic":(0,n.isSimpleSite)()?"simple":"jetpack");return e}},77089:(e,t,r)=>{"use strict";r.d(t,{m2:()=>n.A});var n=r(89289);r(83158)},75988:(e,t,r)=>{"use strict";r.d(t,{Dk:()=>s,bb:()=>o,hB:()=>a,oW:()=>n});const n="featured-post-image",s="stable-diffusion",o="dall-e-3",a="media-source-dropdown"},46381:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(56427),s=r(86087),o=r(27723),a=r(51113),i=r(19783),l=r(10790);const __=o.__;function c({onGuidelinesClick:e,onFeedbackClick:t}){const r=(0,s.useCallback)((()=>{e?.()}),[e]),o=(0,s.useCallback)((()=>{t?.()}),[t]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"ai-image-modal__footer-disclaimer",children:[(0,l.jsx)(a.A,{icon:i.A}),(0,l.jsx)("span",{children:__("Generated images could be inaccurate, biased or include text.","jetpack")}),(0,l.jsx)(n.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:r,children:(0,l.jsxs)("span",{children:[__("Guidelines","jetpack")," ↗"]})})]}),(0,l.jsx)(n.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"https://jetpack.com/redirect/?source=jetpack-ai-feedback",target:"_blank",onClick:o,children:(0,l.jsxs)("span",{children:[__("Give feedback","jetpack")," ↗"]})})]})}},6754:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(56427),s=r(13022),o=r(10790);function a({state:e}){return(0,o.jsx)("div",{className:(0,s.A)("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0}),children:(0,o.jsx)(n.Spinner,{})})}},68203:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(32569),s=r(10790);function o({duration:e,className:t}){return(0,s.jsx)("span",{className:t,children:(0,n.f)(e,{addDecimalPart:!1})})}},32569:(e,t,r)=>{"use strict";function n(e,{addDecimalPart:t=!1,showMinutes:r=!0,showHours:n=!1}={}){const s=Math.floor(e/36e5),o=Math.floor(e/6e4)%60,a=Math.floor(e/1e3)%60,i=Math.floor(e/10)%100,l=[s>0||n?s.toString().padStart(2,"0")+":":"",s>0||o>0||r?o.toString().padStart(2,"0")+":":"",a.toString().padStart(2,"0")];return t&&l.push("."+i.toString().padStart(2,"0")),l.join("")}r.d(t,{f:()=>n})},27802:(e,t,r)=>{"use strict";r.d(t,{AK:()=>l.AK,FC:()=>n.FC,HL:()=>s.A,Hb:()=>u.A,N0:()=>n.N0,QA:()=>u.Q,RD:()=>o.R,Yj:()=>l.Yj,m2:()=>a.m2,yV:()=>c.A,z3:()=>i.A});var n=r(42299),s=r(11497),o=r(23059),a=r(77089),i=(r(6754),r(68203)),l=(r(46381),r(63098)),c=r(14016),u=r(57853)},63098:(e,t,r)=>{"use strict";r.d(t,{AK:()=>j,Kw:()=>w,Yj:()=>y,k9:()=>x});var n=r(56427),s=r(86087),o=r(27723),a=r(83883),i=r(51113),l=r(13022),c=r(42154),u=r(78836),d=r(11497),p=r(10790);const __=o.__,h="warning",m="error",g="success",f="info",b={[f]:null,[h]:null,[m]:c.A,[g]:a.A};function v({severity:e=f,icon:t=null,aiFeedbackThumbsOptions:r={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}},children:n}){return(0,p.jsxs)("div",{className:(0,l.A)("jetpack-ai-assistant__message",`jetpack-ai-assistant__message-severity-${e}`),children:[(b[e]||t)&&(0,p.jsx)(i.A,{icon:b[e]||t}),(0,p.jsx)("div",{className:"jetpack-ai-assistant__message-content",children:n}),r.showAIFeedbackThumbs&&r.prompt&&(0,p.jsx)(d.A,{disabled:!1,ratedItem:r.ratedItem,feature:"ai-assistant",options:{prompt:r.prompt,block:r.block},onRate:r.onRate})]})}function k(){return(0,p.jsx)(n.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-guidelines",children:__("Learn more","jetpack")})}function y({aiFeedbackThumbsOptions:e={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}}}){return(0,p.jsxs)(v,{aiFeedbackThumbsOptions:e,children:[(0,p.jsx)("span",{children:__("AI-generated content could be inaccurate or biased.","jetpack")}),(0,p.jsx)(k,{})]})}function x(){const e=__("You've reached this month's request limit, per our fair usage policy","jetpack"),t=(0,s.createInterpolateElement)(e,{link:(0,p.jsx)(n.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy"})});return(0,p.jsx)(v,{severity:h,children:t})}function j({requestsRemaining:e,severity:t,onUpgradeClick:r,upgradeUrl:s}){let a=t;return null==a&&(a=e>0?f:h),(0,p.jsxs)(v,{severity:a,children:[(0,p.jsx)("span",{children:(0,o.sprintf)( // translators: %1$d: number of requests remaining __("You have %1$d requests remaining.","jetpack"),e)}),(0,p.jsx)(n.Button,{variant:"link",onClick:r,href:s,target:s?"_blank":null,children:(0,p.jsx)("span",{children:__("Upgrade now","jetpack")})})]})}function w({error:e,code:t,onTryAgainClick:r,onUpgradeClick:s,upgradeUrl:a}){const i=e||__("Something went wrong","jetpack");return(0,p.jsxs)(v,{severity:m,children:[(0,p.jsx)("span",{children:(0,o.sprintf)( // translators: %1$d: A dynamic error message __("Error: %1$s","jetpack"),i)}),t===u.Or?(0,p.jsx)(n.Button,{variant:"link",onClick:s,href:a,target:a?"_blank":null,children:(0,p.jsx)("span",{children:__("Upgrade now","jetpack")})}):(0,p.jsx)(n.Button,{variant:"link",onClick:r,children:(0,p.jsx)("span",{children:__("Try again","jetpack")})})]})}},14016:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(56427),s=r(27723),o=r(10991),a=r(6754),i=r(10790);const __=s.__,l=({requestingState:e,onClose:t,title:r})=>(0,i.jsxs)("div",{className:"ai-assistant-modal__header",children:[(0,i.jsxs)("div",{className:"ai-assistant-modal__title-wrapper",children:[(0,i.jsx)(a.A,{state:e}),(0,i.jsx)("h1",{className:"ai-assistant-modal__title",children:r})]}),(0,i.jsx)(n.Button,{icon:o.A,label:__("Close","jetpack"),onClick:t})]});function c({children:e,handleClose:t,hideHeader:r=!0,requestingState:s="init",title:o=__("AI Assistant","jetpack"),maxWidth:a=720}){return(0,i.jsx)(n.Modal,{__experimentalHideHeader:r,className:"ai-assistant-modal",shouldCloseOnClickOutside:!1,onRequestClose:t,children:(0,i.jsxs)("div",{className:"ai-assistant-modal__content",style:{maxWidth:a},children:[(0,i.jsx)(l,{requestingState:s,onClose:t,title:o}),(0,i.jsx)("hr",{className:"ai-assistant-modal__divider"}),e]})})}},57853:(e,t,r)=>{"use strict";r.d(t,{A:()=>b,Q:()=>f});var n=r(3924),s=r(85985),o=r(82201),a=r(56427),i=r(86087),l=r(27723),c=r(10067),u=r.n(c),d=r(42694),p=r(72448),h=r(71567),m=r(10790);const __=l.__,g=u()("jetpack-ai-client:upgrade-prompt"),f=({variant:e="error"})=>{const t=(()=>{const{usagePeriod:e}=(0,p.A)(),t=(e=>{const t=__("You've reached this month's request limit, per our fair usage policy.","jetpack");if(!e)return t; // Translators: %s is the date when the requests will reset. const r=__("Requests will reset on %s.","jetpack");return`${t} ${(0,l.sprintf)(r,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,i.createInterpolateElement)(t,{link:(0,m.jsx)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"}),span:(0,m.jsx)("span",{})})})();return"muted"===e?(0,m.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,m.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null},b=e=>{const{upgradeType:t,currentTier:r}=(0,p.A)();return 1===r?.value?(0,m.jsx)(f,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const r=t?h.U:o.cb,n=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. Please reach out to your VIP account team.","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(r,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||n,goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null})})({description:e.description,useLightNudge:e?.useLightNudge}):(({placement:e=null,description:t=null,useLightNudge:r=!1})=>{const a=r?h.U:o.cb,{checkoutUrl:c}=(0,d.A)(),u=(0,s.CP)(),{nextTier:f,tierPlansEnabled:b,currentTier:v,requestsCount:k}=(0,p.A)(),{tracks:y}=(0,s.st)(),x=(0,i.useCallback)((()=>{g("upgrade",e),y.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:v?.slug,requests_count:k,placement:e})}),[v,k,y,e]),j=(0,i.useCallback)((()=>{g("contact us",e),y.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})}),[y,e]);if(!u){const e=(0,i.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Reach out to the site administrator to upgrade and keep using Jetpack AI.","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(a,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(b){if(!f){const e=(0,n.A)("jetpack-ai-tiers-more-requests-contact"),r=__("You have reached the request limit for your current plan.","jetpack");return(0,m.jsx)(a,{buttonText:__("Contact Us","jetpack"),description:t||r,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:j,target:"_blank"})}const e=(0,i.createInterpolateElement)((0,l.sprintf)(/* Translators: number of requests */ __("You have reached the requests limit for your current plan. Upgrade now to increase your requests limit to %d.","jetpack"),f.limit),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(a,{buttonText:(0,l.sprintf)(/* Translators: number of requests */ __("Upgrade to %d requests","jetpack"),f.limit),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:x,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,m.jsx)(a,{buttonText:__("Upgrade","jetpack"),checkoutUrl:c,className:"jetpack-ai-upgrade-banner",description:(0,i.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! Upgrade now to keep using it.","jetpack"),{strong:(0,m.jsx)("strong",{})}),goToCheckoutPage:x,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},71567:(e,t,r)=>{"use strict";r.d(t,{U:()=>a});var n=r(56427),s=r(27723),o=r(10790);const __=s.__,a=({title:e,description:t,buttonText:r=null,checkoutUrl:s=null,goToCheckoutPage:a=null,isRedirecting:i=!1,showButton:l=!0,target:c="_top"})=>{const u=__("Redirecting…","jetpack");return(0,o.jsx)("div",{className:"jetpack-upgrade-plan-banner-light",children:(0,o.jsx)(n.Notice,{status:"error",isDismissible:!1,children:(0,o.jsxs)("p",{children:[e&&(0,o.jsx)("strong",{children:e}),t," ",l&&(0,o.jsx)(n.Button,{href:i?null:s,onClick:a,variant:"link",target:c,children:(0,o.jsx)("span",{children:i?u:r})})]})})})}},43984:(e,t,r)=>{"use strict";r.d(t,{A4:()=>l,DD:()=>j,DT:()=>B,Gm:()=>g,HM:()=>w,JR:()=>_,K2:()=>A,Rq:()=>T,UA:()=>m,UD:()=>C,br:()=>d,d5:()=>v,eJ:()=>h,fD:()=>p,fv:()=>k,im:()=>a,mI:()=>S,mT:()=>N,oZ:()=>o,pE:()=>f,s6:()=>P,sn:()=>i,so:()=>s,u0:()=>y,uQ:()=>x,vE:()=>u,wb:()=>I,yQ:()=>E,yy:()=>c,z5:()=>b});var n=r(27723);const __=n.__,s={en:{label:__("English","jetpack")},es:{label:__("Spanish","jetpack")},fr:{label:__("French","jetpack")},de:{label:__("German","jetpack")},it:{label:__("Italian","jetpack")},pt:{label:__("Portuguese","jetpack")},ru:{label:__("Russian","jetpack")},zh:{label:__("Chinese","jetpack")},ja:{label:__("Japanese","jetpack")},ar:{label:__("Arabic","jetpack")},hi:{label:__("Hindi","jetpack")},ko:{label:__("Korean","jetpack")}},o={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},a="titleSummary",i="continue",l="simplify",c="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",h="changeTone",m="summarize",g="changeLanguage",f="userPrompt",b="jetpackFormCustomPrompt",v="transformListToTable",k="writePostFromList",y=__("Translate","jetpack"),x=__("Change tone","jetpack"),j=__("Correct spelling and grammar","jetpack"),w=__("Simplify","jetpack"),_=__("Summarize","jetpack"),C=__("Make shorter","jetpack"),A=__("Expand","jetpack"),S=__("Turn list into a table","jetpack"),E=__("Write a post from this list","jetpack"),N=__("Generate a post title","jetpack"),T=__("Summary based on title","jetpack"),B=__("Continue writing","jetpack"),P="jetpack-sidebar",I="document-settings"},2166:(e,t,r)=>{"use strict";r.d(t,{R:()=>a});var n=r(51609),s=r(10790);const o=(0,n.createContext)({}),a=({value:e,children:t})=>(0,s.jsx)(o.Provider,{value:e,children:t})},13965:(e,t,r)=>{"use strict";r.d(t,{Rb:()=>n.R});var n=r(2166);r(59886),r(53471)},53471:(e,t,r)=>{"use strict";r(51609),r(78836),r(13965)},59886:(e,t,r)=>{"use strict";var n=r(29491),s=r(86087),o=r(46219),a=r(13965),i=r(10790);(0,n.createHigherOrderComponent)((e=>t=>{const{suggestion:r,error:n,requestingState:l,request:c,stopSuggestion:u,eventSource:d}=(0,o.Ay)(),p=(0,s.useMemo)((()=>({suggestion:r,requestingError:n,requestingState:l,eventSource:d,requestSuggestion:c,stopSuggestion:u})),[r,n,l,d,c,u]);return(0,i.jsx)(a.Rb,{value:p,children:(0,i.jsx)(e,{...t})})}),"withAiDataProvider")},42694:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(3924),s=r(97999),o=r(85985),a=r(72448);const i=()=>{const e=new URLSearchParams(window.location.search),t=(0,o.GE)();return(0,s.isSimpleSite)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`};function l(){const{nextTier:e,tierPlansEnabled:t}=(0,a.A)(),r=i(),l=(0,n.A)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,o.GE)(),path:t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly",query:`redirect_to=${encodeURIComponent(r)}`}),c=(0,n.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,o.GE)(),path:"jetpack_ai_yearly"}),u=(0,s.isWpcomPlatformSite)()?l:c,{autosaveAndRedirect:d,isRedirecting:p}=(0,o.ZR)(u);return{checkoutUrl:u,autosaveAndRedirect:d,isRedirecting:p}}},72448:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(85985),s=r(47143),o=r(86087);function a(){const e=(0,s.useSelect)((e=>e("wordpress-com/plans").getAiAssistantFeature()),[]),t=(0,s.useSelect)((e=>e("wordpress-com/plans").getIsRequestingAiAssistantFeature()),[]),{fetchAiAssistantFeature:r,increaseAiAssistantRequestsCount:a,dequeueAiAssistantFeatureAsyncRequest:i}=(0,s.useDispatch)("wordpress-com/plans");return(0,o.useMemo)((()=>{const s=(0,n.Bd)(e?.currentTier),o=e?.currentTier?.limit||e?.requestsLimit,l=s===n._X?e?.requestsCount:e?.usagePeriod?.requestsCount,c=s===n._X?e?.requestsLimit:o;return{...e,requestsCount:l,requestsLimit:c,loading:t,error:null,refresh:r,increaseRequestsCount:a,dequeueAsyncRequest:i}}),[e,t,r,a,i])}},46219:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>h,fC:()=>d});var n=r(86087),s=r(27723),o=r(10067),a=r.n(o),i=r(87286),l=r(4867),c=r(78836);const __=s.__,u=a()("ai-client:use-ai-suggestions");function d(e){switch(e){case c.Or:return{code:c.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case c.L9:return{code:c.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case c.AZ:return{code:c.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case c.ud:return{code:c.ud,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};case c.cT:return{code:c.cT,message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),severity:"info"};case c.mA:default:return{code:c.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function p(e){return e.replace(/^<\|start_header_id\|>assistant<\|end_header_id\|>[\n]+/,"")}function h({prompt:e,autoRequest:t=!1,askQuestionOptions:r={},initialRequestingState:s="init",onSuggestion:o,onDone:a,onStop:h,onError:m,onAllErrors:g}={}){const[f,b]=(0,n.useState)(s),[v,k]=(0,n.useState)(""),[y,x]=(0,n.useState)(c.Np),j=(0,n.useRef)(c.Np),w=e=>{x(e),j.current=e},[_,C]=(0,n.useState)(),A=(0,n.useRef)(void 0),S=(0,n.useCallback)((e=>{u("handleSuggestion",e);const t=p(e?.detail);t?(k(t),o?.(t)):u("no partial suggestion")}),[o]),E=(0,n.useCallback)((e=>{F();const t=p(e?.detail?.message??e?.detail);a?.(t,"chromeAI"===e?.detail?.source,j.current),b("done")}),[a]),N=(0,n.useCallback)((e=>{g?.(e?.detail,"chromeAI"===e?.detail?.source)}),[g]),T=(0,n.useCallback)((e=>{A?.current?.close(),b("error"),C(d(e)),m?.(d(e))}),[m]),B=(0,n.useCallback)((()=>T(c.Or)),[]),P=(0,n.useCallback)((()=>T(c.L9)),[]),I=(0,n.useCallback)((()=>T(c.AZ)),[]),M=(0,n.useCallback)((()=>T(c.ud)),[]),L=(0,n.useCallback)((()=>T(c.mA)),[]),R=(0,n.useCallback)((async(e,t={...r})=>{C(void 0),b("requesting");const n=await(0,l.A)(e);if(u("chromeAI",!1!==n),!1!==n?(w(c.sD),A.current=n):(w(c.Np),A.current=await(0,i.A)(e,t)),!A?.current)return void u("no event source");const s=A.current;b("suggesting"),s.addEventListener("suggestion",S),s.addEventListener(c.Or,B),s.addEventListener(c.L9,P),s.addEventListener(c.AZ,I),s.addEventListener(c.ud,M),s.addEventListener(c.mA,L),s.addEventListener(c.zn,N),s.addEventListener("done",E)}),[E,B,P,I,M,L,S]),D=(0,n.useCallback)((()=>{b("init"),k(""),C(void 0)}),[]),F=(0,n.useCallback)((()=>{if(!A?.current)return;const e=A?.current;e.close(),e.removeEventListener("suggestion",S),e.removeEventListener(c.Or,B),e.removeEventListener(c.L9,P),e.removeEventListener(c.AZ,I),e.removeEventListener(c.ud,M),e.removeEventListener(c.mA,L),e.removeEventListener("done",E)}),[A,S,B,P,I,M,L,E]),O=(0,n.useCallback)((()=>{F(),h?.(),b("done")}),[h]);return(0,n.useEffect)((()=>{if(e?.length)return t&&R(e,r),()=>{O()}}),[t,e,R,O]),{suggestion:v,model:y,error:_,requestingState:f,request:R,stopSuggestion:O,reset:D,handleErrorQuotaExceededError:B,eventSource:A.current}}},7804:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(86087),s=r(27723),o=r(10067),a=r.n(o),i=r(57745);const __=s.__,l=a()("jetpack-ai-client:use-audio-transcription"),c=e=>{if("string"==typeof e)return e;if("code"in e)switch(e.code){case"error_quota_exceeded":return __("You exceeded your current quota, please check your plan details.","jetpack");case"jetpack_ai_missing_audio_param":return __("The audio_file is required to perform a transcription.","jetpack");case"jetpack_ai_service_unavailable":return __("The Jetpack AI service is temporarily unavailable.","jetpack");case"file_size_not_supported":return __("The provided audio file is too big.","jetpack");case"file_type_not_supported":return __("The provided audio file type is not supported.","jetpack");case"jetpack_ai_error":return __("There was an error processing the transcription request.","jetpack");default:return e.message}return"message"in e?e.message:__("There was an error processing the transcription request.","jetpack")};function u({feature:e,onReady:t,onError:r}){const[s,o]=(0,n.useState)(""),[a,u]=(0,n.useState)(""),[d,p]=(0,n.useState)(!1),h=(0,n.useRef)(null);return{transcriptionResult:s,isTranscribingAudio:d,transcriptionError:a,transcribeAudio:(0,n.useCallback)((n=>{l("Transcribing audio"),o(""),u(""),p(!0);const s=new AbortController;h.current=s,(0,i.A)(n,e,s.signal).then((e=>{o(e),t?.(e)})).catch((e=>{s.signal.aborted||(u(e.message),r?.(c(e)))})).finally((()=>p(!1)))}),[i.A,o,u,p]),cancelTranscription:(0,n.useCallback)((()=>{h.current?.abort(),o(""),u(""),p(!1)}),[h,o,u,p])}}},66859:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(86087),s=r(27723);const __=s.__,o=25e6,a=1500,i=["audio/mpeg","audio/mp3","audio/ogg","audio/flac","audio/x-flac","audio/m4a","audio/x-m4a","audio/mp4","audio/wav","audio/wave","audio/x-wav","audio/webm"];function l(){const[e,t]=(0,n.useState)(!1);return{isValidatingAudio:e,validateAudio:(0,n.useCallback)(((e,r,n)=>{if(t(!0),e?.size>o)return t(!1),n(__("The audio file is too large. The maximum file size is 25MB.","jetpack"));const s=e instanceof File;if(s&&!i.includes(e.type))return t(!1),n(__("The audio file type is not supported. Please use a supported audio file type.","jetpack"));const l=new AudioContext;e.arrayBuffer().then((o=>{l.decodeAudioData(o,(function(o){const i=Math.ceil(o.duration);return i>a?(t(!1),n(__("The audio file is too long. The maximum recording time is 25 minutes.","jetpack"))):(t(!1),r({duration:i,isFile:s,size:e?.size}))}))}))}),[t])}}},66223:(e,t,r)=>{"use strict";r.d(t,{Hu:()=>s,Wp:()=>n});const n="auto",s="none"},62614:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u});var n=r(10067),s=r.n(n),o=r(31439),a=r(51391);const i=s()("ai-client:use-image-generator"),l=(e,t)=>{const r=4e3-t;return e.length>r?e.substring(0,r-6)+" [...]":e},c=async(e,t,r)=>{const n=((e,t)=>{if(t){const r=`I need a Stable Diffusion prompt to generate a featured image for a blog post based on this user-provided image description:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nThe image should be a photo. Make sure you highlight the main suject of the image description, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments.\n\nFor additional context, this is the post content:\n\n`;return r+l(e,r.length)}return"I need a Stable Diffusion prompt to generate a featured image for a blog post with the following content.\nThe image should be a photo. Make sure you highlight the main suject of the content, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments. The content is:\n\n"+l(e,412)})(e,t);return await(0,o.A)(n,{feature:r})},u=()=>{const e=async function(e){let t="";try{t=(await(0,a.A)()).token}catch(e){return i("Error getting token: %o",e),Promise.reject(e)}try{const r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-image",n={Authorization:`Bearer ${t}`,"Content-Type":"application/json"},s=await fetch(r,{method:"POST",headers:n,body:JSON.stringify(e)}).then((e=>e.json()));return s?.data?.status&&s?.data?.status>200?(i("Error generating image: %o",s),Promise.reject(s)):s}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}};return{generateImage:async function({feature:t,postContent:r,responseFormat:n="url",userPrompt:s}){try{i("Generating image");const o=((e,t)=>{if(t){const r=`I need a cover image for a blog post based on this user prompt:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nBefore creating the image, identify the main topic of the user prompt and relate it to the post content.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nFor additional context, this is the post content:\n\n`;return r+l(e,r.length)}const r="I need a cover image for a blog post.\nBefore creating the image, identify the main topic of the content and only represent it.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nThis is the post content:\n\n";return r+l(e,838)})(r,s),a={prompt:o,response_format:n,feature:t,size:"1792x1024"};return await e(a)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithStableDiffusion:async function({feature:t,postContent:r,userPrompt:n}){try{i("Generating image with Stable Diffusion");const s={prompt:await c(r,n,t),feature:t,model:"stable-diffusion"};return await e(s)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithParameters:e}}},96657:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(86087);const s="audio/mp4;codecs=mp4a",o="audio/mp4",a="audio/webm";function i({onDone:e}={}){const t=(0,n.useRef)(null),[r,i]=(0,n.useState)("inactive"),l=(0,n.useRef)(!1),c=(0,n.useRef)(0),[u,d]=(0,n.useState)(0),p=(0,n.useRef)(null),[h,m]=(0,n.useState)(null),g=(0,n.useRef)([]).current,[f,b]=(0,n.useState)(null),v=(0,n.useRef)(null);function k(){return MediaRecorder.isTypeSupported(s)?new Blob(g,{type:o}):new Blob(g,{type:a})}const y=(0,n.useCallback)((e=>{if(_(),!e)return t?.current?.start();e<100&&(e=100),c.current=Date.now(),t?.current?.start(e)}),[]),x=(0,n.useCallback)((()=>{l.current=!0,t?.current?.pause(),d((e=>e+Date.now()-c.current))}),[]),j=(0,n.useCallback)((()=>{l.current=!1,t?.current?.resume(),c.current=Date.now()}),[]),w=(0,n.useCallback)((()=>{t?.current?.stop(),"recording"===r&&d((e=>e+Date.now()-c.current))}),[]),_=(0,n.useCallback)((()=>{g.length=0,m(null),b(null),d(0),l.current=!1,c.current=0}),[]),C=(0,n.useCallback)((()=>{t?.current&&(t.current.removeEventListener("start",E),t.current.removeEventListener("stop",N),t.current.removeEventListener("pause",T),t.current.removeEventListener("resume",B),t.current.removeEventListener("dataavailable",P),t.current=null)}),[]),A=(0,n.useCallback)((()=>{if(i("inactive"),_(),C(),!navigator.mediaDevices?.getUserMedia)return;const e=new AudioContext;v.current=e.createAnalyser();navigator.mediaDevices.getUserMedia({audio:!0}).then((r=>{p.current=r;e.createMediaStreamSource(r).connect(v.current),MediaRecorder.isTypeSupported(s)?t.current=new MediaRecorder(r,{mimeType:s}):t.current=new MediaRecorder(r,{mimeType:a}),t.current.addEventListener("start",E),t.current.addEventListener("stop",N),t.current.addEventListener("pause",T),t.current.addEventListener("resume",B),t.current.addEventListener("dataavailable",P)})).catch((e=>{throw e}))}),[]),S=(0,n.useCallback)((e=>{w(),b("string"==typeof e?e:e.message),i("error")}),[]);function E(){i("recording")}function N(){const t=k();e?.(t),g.length=0}function T(){i("paused")}function B(){i("recording")}function P(e){const{data:t}=e;t?.size&&(g.push(t),m(k()),l.current||d((e=>{const t=Date.now(),r=t-c.current;return c.current=t,e+r})))}return(0,n.useEffect)((()=>(A(),()=>{p.current&&p.current.getTracks().forEach((e=>e.stop())),C()})),[]),{state:r,blob:h,error:f,duration:u,analyser:v.current,onError:S,controls:{start:y,pause:x,resume:j,stop:w,reset:A}}}},71508:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(74997),s=r(47143),o=r(43656),a=r(86087),i=r(55166);const l=()=>{const{getBlocks:e,isEditedPostEmpty:t}=(0,s.useSelect)((e=>{const t=e("core/block-editor"),r=e(o.store);return{getBlocks:t.getBlocks,isEditedPostEmpty:r.isEditedPostEmpty}}),[]),r=(0,a.useCallback)((()=>{const t=e();return 0===t.length?"":(0,n.serialize)(t)}),[e]);return{getPostContent:(0,a.useCallback)((e=>{let t=r();return t?(e&&"function"==typeof e&&(t=e(t)),t?(0,i.rh)({content:t}):""):""}),[e]),isEditedPostEmpty:t,getSerializedPostContent:r}}},62038:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(63162),s=r(47143),o=r(86087),a=r(10067);const i=r.n(a)()("jetpack-ai-client:save-to-media-library");function l(){const[e,t]=(0,o.useState)(!1),{getSettings:r}=(0,s.useSelect)((e=>e("core/block-editor")),[]);return{isLoading:e,saveToMediaLibrary:(e,s=null)=>{const o=r();return new Promise(((r,a)=>{t(!0),i("Fetching image from URL"),fetch(e).then((e=>{i("Transforming response to blob"),e.blob().then((e=>{i("Uploading blob to media library");const l=[];s?l.push(new File([e],s)):l.push(e),o.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,n.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),r(e)),t(!1))},onError(e){i("Error uploading image to media library:",e),a(e),t(!1)}})})).catch((e=>{i("Error transforming response to blob:",e?.message),a(e?.message),t(!1)}))})).catch((e=>{i("Error fetching image from URL:",e?.message),a(e?.message),t(!1)}))}))}}}},93869:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(63162),s=r(47143),o=r(86087),a=r(10067);const i=r.n(a)()("ai-client:save-to-media-library");function l(){const[e,t]=(0,o.useState)(!1),{getSettings:r}=(0,s.useSelect)((e=>e("core/block-editor")),[]);return{isLoading:e,saveToMediaLibrary:(e,s)=>{const o=r();return new Promise(((r,a)=>{t(!0),i("Fetching image from URL"),fetch(e).then((e=>{i("Transforming response to blob"),e.blob().then((e=>{i("Uploading blob to media library");const l=Array();s?l.push(new File([e],s)):l.push(e),o.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,n.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),r(e)),t(!1))},onError(e){i("Error uploading image to media library:",e),a(e),t(!1)}})})).catch((e=>{i("Error transforming response to blob:",e?.message),a(e?.message),t(!1)}))})).catch((e=>{i("Error fetching image from URL:",e?.message),a(e?.message),t(!1)}))}))}}}},97784:(e,t,r)=>{"use strict";r.d(t,{A:()=>c,u:()=>l});var n=r(86087),s=r(10067),o=r.n(s),a=r(46219);const i=o()("jetpack-ai-client:use-transcription-post-processing"),l="voice-to-content-simple-draft";function c({feature:e,onReady:t,onError:r,onUpdate:s}){const[o,l]=(0,n.useState)(""),[c,u]=(0,n.useState)(""),[d,p]=(0,n.useState)(!1),h=(0,n.useCallback)((e=>{l(e),s?.(e)}),[l,s]),m=(0,n.useCallback)((e=>{l(e),s?.(e),t?.(e)}),[l,s,t]),g=(0,n.useCallback)((e=>{u(e.message),r?.(e.message)}),[u,r]),{request:f,stopSuggestion:b}=(0,a.Ay)({onSuggestion:h,onDone:m,onError:g});return{postProcessingResult:o,isProcessingTranscription:d,postProcessingError:c,processTranscription:(0,n.useCallback)(((t,r)=>{i("Post-processing transcription"),l(""),u(""),p(!0);f([{role:"jetpack-ai",context:{type:t,content:r}}],{feature:e})}),[l,u,p,f,e]),cancelTranscriptionProcessing:(0,n.useCallback)((()=>{b(),p(!1)}),[b,p])}}},30151:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsxs)(n.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon",children:[(0,s.jsx)(n.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),(0,s.jsx)(n.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),(0,s.jsx)(n.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"})]})},42154:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsxs)(n.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.95833C6.66328 3.95833 3.95833 6.66327 3.95833 9.99999C3.95833 13.3367 6.66328 16.0417 10 16.0417C13.3367 16.0417 16.0417 13.3367 16.0417 9.99999C16.0417 6.66327 13.3367 3.95833 10 3.95833ZM2.70833 9.99999C2.70833 5.97292 5.97292 2.70833 10 2.70833C14.0271 2.70833 17.2917 5.97292 17.2917 9.99999C17.2917 14.0271 14.0271 17.2917 10 17.2917C5.97292 17.2917 2.70833 14.0271 2.70833 9.99999Z"}),(0,s.jsx)(n.Path,{d:"M10.8333 5.83333H9.16667V10.8333H10.8333V5.83333Z"}),(0,s.jsx)(n.Path,{d:"M10.8333 12.5H9.16667V14.1667H10.8333V12.5Z"})]})},91396:(e,t,r)=>{"use strict";r.d(t,{Qr:()=>a.A,Vo:()=>s.A,cj:()=>n.A,ni:()=>o.A});var n=r(30151),s=r(81353),o=(r(95007),r(96626),r(4416),r(25680)),a=r(67205)},81353:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsxs)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,s.jsx)(n.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),(0,s.jsx)(n.Rect,{x:"10.5",y:"8.25",width:"3",height:"4.875",rx:"1.5",fill:"#008710"}),(0,s.jsx)(n.Path,{d:"M15 11.25C15 11.644 14.9224 12.0341 14.7716 12.3981C14.6209 12.762 14.3999 13.0927 14.1213 13.3713C13.8427 13.6499 13.512 13.8709 13.1481 14.0216C12.7841 14.1724 12.394 14.25 12 14.25C11.606 14.25 11.2159 14.1724 10.8519 14.0216C10.488 13.8709 10.1573 13.6499 9.87868 13.3713C9.6001 13.0927 9.37913 12.762 9.22836 12.3981C9.0776 12.0341 9 11.644 9 11.25",stroke:"#008710",strokeWidth:"1.125",strokeLinecap:"round"}),(0,s.jsx)(n.Path,{d:"M11.4375 15.75C11.4375 16.0607 11.6893 16.3125 12 16.3125C12.3107 16.3125 12.5625 16.0607 12.5625 15.75L11.4375 15.75ZM11.4375 14.25L11.4375 15.75L12.5625 15.75L12.5625 14.25L11.4375 14.25Z",fill:"#008710"})]})},95007:(e,t,r)=>{"use strict";var n=r(56427),s=r(10790);n.SVG,n.Path,n.Path},25680:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsxs)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,s.jsx)(n.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),(0,s.jsx)(n.Rect,{x:"12.75",y:"9",width:"2.25",height:"6",fill:"#008710"}),(0,s.jsx)(n.Rect,{x:"9",y:"9",width:"2.25",height:"6",fill:"#008710"})]})},96626:(e,t,r)=>{"use strict";var n=r(56427),s=r(10790);n.SVG,n.Path,n.Path},4416:(e,t,r)=>{"use strict";var n=r(56427),s=r(10790);n.SVG,n.Path,n.Rect},67205:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsxs)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"})]})},96865:(e,t,r)=>{"use strict";r.d(t,{A4:()=>f.A4,AK:()=>h.AK,AZ:()=>m.AZ,DD:()=>f.DD,DT:()=>f.DT,E0:()=>l.A,FC:()=>h.FC,Fs:()=>g.Fs,Gm:()=>f.Gm,HL:()=>h.HL,HM:()=>f.HM,Hb:()=>h.Hb,JR:()=>f.JR,K2:()=>f.K2,L9:()=>m.L9,MB:()=>g.MB,N0:()=>h.N0,ON:()=>s.A,OO:()=>g.OO,Or:()=>m.Or,QA:()=>h.QA,Qr:()=>p.Qr,R0:()=>n.A,RD:()=>h.RD,Rq:()=>f.Rq,Su:()=>g.Su,Tg:()=>b.T,UA:()=>f.UA,UD:()=>f.UD,Vo:()=>p.Vo,Yj:()=>h.Yj,Zo:()=>g.Zo,_E:()=>g.Hh,_G:()=>g._G,be:()=>i.A,br:()=>f.br,cT:()=>m.cT,cj:()=>p.cj,d5:()=>f.d5,dh:()=>d.A,eJ:()=>f.eJ,fD:()=>f.fD,im:()=>f.im,in:()=>g.in,m2:()=>h.m2,mA:()=>m.mA,mI:()=>f.mI,mT:()=>f.mT,ni:()=>p.ni,o2:()=>a.Ay,oZ:()=>f.oZ,pE:()=>f.pE,rh:()=>g.rh,rr:()=>u.A,sn:()=>f.sn,so:()=>f.so,u0:()=>f.u0,uH:()=>m.uH,uQ:()=>f.uQ,ud:()=>m.ud,vE:()=>f.vE,xA:()=>c.A,yM:()=>o.A,yQ:()=>f.yQ,yV:()=>h.yV,yy:()=>f.yy,z3:()=>h.z3,z5:()=>f.z5});r(51391),r(53664),r(87286);var n=r(31439),s=(r(57745),r(42694)),o=r(72448),a=r(46219),i=r(96657),l=r(7804),c=r(97784),u=r(66859),d=(r(62614),r(71508)),p=r(91396),h=r(27802),m=(r(13965),r(78836)),g=r(72586),f=r(43984),b=r(23101);r(35209)},51391:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(97999),s=r(10067),o=r.n(s),a=r(48931);const i=o()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt",c=12e4;async function u({apiNonce:e,siteId:t,expirationTime:r}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,r=r||c;const s=localStorage.getItem(l);let o,u=null;if(s)try{u=JSON.parse(s)}catch(e){i("Error parsing token",e)}if(u&&u?.expire>Date.now())return i("Using cached token"),u;const d=(0,n.isSimpleSite)();o=d?await(0,a.A)({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await(0,a.A)({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const p={token:o.token,blogId:d?t:o.blog_id,expire:Date.now()+r};return i("Storing new token"),localStorage.setItem(l,JSON.stringify(p)),p}},20231:(e,t,r)=>{"use strict";r.d(t,{_:()=>s});var n=r(47143);const s=()=>{const e=(0,n.select)("core/block-editor").getBlocks(),t=[],r=e=>{t.push(e),e.innerBlocks?.length&&e.innerBlocks.forEach(r)};return e.forEach(r),t}},40464:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=async e=>{try{const t=await fetch(e),r=await t.arrayBuffer();return`data:image/png;base64,${btoa(new Uint8Array(r).reduce(((e,t)=>e+String.fromCharCode(t)),""))}`}catch{return e}}},72586:(e,t,r)=>{"use strict";r.d(t,{Fs:()=>a.F,Hh:()=>n.Hh,MB:()=>s.M,OO:()=>n.OO,Su:()=>n.Su,Zo:()=>l.Z,_G:()=>i._,in:()=>o.i,rh:()=>n.rh});var n=r(55166),s=r(84861),o=r(61269),a=r(1811),i=r(20231),l=r(40464)},84861:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(43984);function s(e,t={}){const{language:r,tone:s}=t,o=r?.split(" (")[0];switch(e){case n.Gm:return`${n.u0}: ${n.so[o].label}`;case n.eJ:return`${n.uQ}: ${n.oZ[s].label}`;case n.yy:return n.DD;case n.A4:return n.HM;case n.UA:return n.JR;case n.br:return n.K2;case n.fD:return n.UD;case n.d5:return n.mI;case n.fv:return n.yQ;case n.vE:return n.mT;case n.im:return n.Rq;case n.sn:return n.DT;default:return null}}},68641:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(21147);const s={paragraph:e=>e.replaceAll("\n","
    ")},o={emDelimiter:"_",headingStyle:"atx"},a={strikethrough:{filter:["del","s"],replacement:function(e){return"~~"+e+"~~"}}};class i{constructor({options:e={},rules:t={},keep:r=[],remove:s=[],fixes:i=[]}={}){this.fixes=i,this.turndownService=new n.A({...o,...e}),this.turndownService.keep(r),this.turndownService.remove(s);const l={...a,...t};for(const e in l)this.turndownService.addRule(e,l[e])}render({content:e}){const t=this.turndownService.turndown(e);return this.fixes.reduce(((e,t)=>s[t](e)),t)}}},55166:(e,t,r)=>{"use strict";r.d(t,{Hh:()=>i,OO:()=>n.A,Su:()=>s.S,rh:()=>l});var n=r(68641),s=r(31737);const o=new s.A,a=new n.A,i=({content:e,rules:t,extension:r})=>o.render({content:e,rules:t,extension:r}),l=({content:e})=>a.render({content:e})},31737:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,S:()=>o});var n=r(97158);const s=e=>e.replaceAll("\x3c!-- wp:list-item --\x3e","").replaceAll("\x3c!-- /wp:list-item --\x3e","").replaceAll("\x3c!-- wp:list --\x3e","").replaceAll("\x3c!-- /wp:list --\x3e","").replaceAll("
  • ","\x3c!-- wp:list-item --\x3e
  • ").replaceAll("
  • ","\x3c!-- /wp:list-item --\x3e").replaceAll("
      ",'\x3c!-- wp:list {"ordered":true} --\x3e
        ').replaceAll("
      ","
    \x3c!-- /wp:list --\x3e").replaceAll("
      ","\x3c!-- wp:list --\x3e
        ").replaceAll("
      ","
    \x3c!-- /wp:list --\x3e"),o={list:(e,t=!1)=>{const r=e.replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");return t?s(r):r},listItem:(e,t=!1)=>t?s(e.replace(/^<[ou]l>\s*/g,"").replace(/\s*<\/[ou]l>\s*$/g,"")):e,paragraph:(e,t=!1)=>t?e.replaceAll(/\s*<br \/>\s*/g,"
    "):e,table:(e,t=!1,{hasFixedLayout:r=!1})=>t?e.startsWith("\x3c!-- wp:table")?e:`\x3c!-- wp:table { "hasFixedLayout":${r?"true":"false"} } --\x3e${e}\x3c!-- /wp:table --\x3e`:e},a={breaks:!0},i=["list"];class l{constructor(e=a){this.markdownConverter=new n.A(e)}render({content:e,rules:t=i,extension:r=!1}){const n=this.markdownConverter.render(e);return t.reduce(((e,t)=>o[t](e,r)),n)}}},61269:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var n=r(94715),s=r(47143);function o(e){if(!e)return;const{selectBlock:t}=(0,s.dispatch)(n.store),{enableComplementaryArea:r}=(0,s.dispatch)("core/interface");t(e),r("core/edit-post","edit-post/block")}},1811:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(47143);const s=async()=>{const{clearSelectedBlock:e}=(0,n.dispatch)("core/block-editor"),{enableComplementaryArea:t}=(0,n.dispatch)("core/interface");e(),await t("core/edit-post","jetpack-sidebar/jetpack");const r=document.querySelector(".jetpack-ai-assistant-panel"),s=r?.classList.contains("is-opened"),o=r?.querySelector("h2 button");s&&o?.click(),setTimeout((()=>{o?.click()}),50)}},21902:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(10790);const s=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,n.jsx)("path",{d:"M6.99976 3.99994L7.84828 6.15141L9.99976 6.99994L7.84828 7.84847L6.99976 9.99994L6.15123 7.84847L3.99976 6.99994L6.15123 6.15141L6.99976 3.99994Z"}),(0,n.jsx)("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),(0,n.jsx)("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"})]})},11574:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(10790);const s=()=>(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9291 7.96836L10.7308 17.6492L6.2145 14.2911L7.10952 13.0873L10.4221 15.5504L16.7253 7.07333L17.9291 7.96836Z"})})},47621:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(10790);const s=()=>(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2927 13.7485C18.5014 17.0423 15.5366 19.4901 12 19.4901C8.92508 19.4901 6.28236 17.6396 5.12469 14.9915L8.79556 12.8139L12.2508 14.0309C12.482 14.1123 12.7383 14.0756 12.9374 13.9327L15.8243 11.8601L15.9039 11.8992C16.1998 12.0451 16.6072 12.249 17.0533 12.4807C17.8331 12.8857 18.6946 13.3572 19.2927 13.7485ZM19.499 12.1129C18.9341 11.7788 18.3001 11.4379 17.7447 11.1495C17.287 10.9118 16.8698 10.7031 16.5672 10.5539C16.4158 10.4792 16.2928 10.4193 16.2074 10.378L16.1085 10.3303L16.0824 10.3177L16.0729 10.3132C15.8261 10.1954 15.5347 10.2214 15.3126 10.3809L12.3802 12.4861L8.9634 11.2827C8.75395 11.2089 8.52258 11.2318 8.3316 11.3451L4.65716 13.5248C4.55414 13.0294 4.5 12.5161 4.5 11.9901C4.5 7.84798 7.85786 4.49011 12 4.49011C16.1421 4.49011 19.5 7.84798 19.5 11.9901C19.5 12.0311 19.4997 12.072 19.499 12.1129ZM21 11.9901C21 16.9607 16.9706 20.9901 12 20.9901C7.02944 20.9901 3 16.9607 3 11.9901C3 7.01955 7.02944 2.99011 12 2.99011C16.9706 2.99011 21 7.01955 21 11.9901Z"})})},97034:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(10790);const s=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,n.jsx)("path",{d:"M7 6.49011L11 8.99011L7 11.4901V6.49011Z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.99011C3.89543 2.99011 3 3.88554 3 4.99011V18.9901C3 20.0947 3.89543 20.9901 5 20.9901H19C20.1046 20.9901 21 20.0947 21 18.9901V4.99011C21 3.88554 20.1046 2.99011 19 2.99011H5ZM19 4.49011H5C4.72386 4.49011 4.5 4.71397 4.5 4.99011V15.6973L8.12953 13.0508C8.38061 12.8677 8.71858 12.8584 8.97934 13.0274L11.906 14.9243L15.4772 11.4524C15.7683 11.1694 16.2317 11.1694 16.5228 11.4524L19.5 14.3469V4.99011C19.5 4.71397 19.2761 4.49011 19 4.49011ZM4.5 18.9901V17.5537L8.59643 14.5667L11.5921 16.5084C11.8857 16.6987 12.2719 16.6607 12.5228 16.4167L16 13.0361L19.4772 16.4167L19.5 16.3933V18.9901C19.5 19.2663 19.2761 19.4901 19 19.4901H5C4.72386 19.4901 4.5 19.2663 4.5 18.9901Z"})]})},6019:(e,t,r)=>{"use strict";r.d(t,{Q:()=>a});var n=r(56427),s=r(78867),o=r(10790);const a=({variant:e="error"})=>{const t=(0,s.A)();return"muted"===e?(0,o.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,o.jsx)(n.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null}},95933:(e,t,r)=>{"use strict";r.d(t,{x:()=>a});var n=r(56427),s=r(27723),o=r(10790);const __=s.__,a=({onCancel:e,onRetry:t})=>{const r=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.","jetpack"),s=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, reload the page and try again.","jetpack");return(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,o.jsx)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:(0,o.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:t?r:s})}),(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,o.jsx)(n.Button,{variant:"tertiary",onClick:e,children:__("Cancel","jetpack")}),t&&(0,o.jsx)(n.Button,{variant:"primary",onClick:t,children:__("Try again","jetpack")})]})]})}},76194:(e,t,r)=>{"use strict";r.d(t,{N:()=>a});var n=r(27723),s=r(42669),o=r(10790);const __=n.__,a=({state:e="loadingFeature"})=>{const t=__("Loading…","jetpack"),r=__("Analyzing your site to create the perfect logo…","jetpack"),n=__("Generating logo…","jetpack");return(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__loading-wrapper",children:[(0,o.jsx)(s.$,{}),(0,o.jsxs)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:["loadingFeature"===e&&t,"analyzing"===e&&r,"generating"===e&&n]})]})}},64537:(e,t,r)=>{"use strict";r.d(t,{T:()=>S});var n=r(85985),s=r(56427),o=r(47143),a=r(27723),i=r(13022),l=r(10067),c=r.n(l),u=r(51609),d=r(46381),p=r(61356),h=r(60674),m=r(88725),g=r(44461),f=r(19362),b=r(74423),v=r(95933),k=r(76194),y=r(32623),x=r(34706),j=r(11114),w=r(35421),_=r(48204),C=r(10790);const __=a.__,A=c()("jetpack-ai-calypso:generator-modal"),S=({isOpen:e,onClose:t,onApplyLogo:r,onReload:a=null,siteDetails:l,context:c,placement:S})=>{const{tracks:E}=(0,n.st)(),{recordEvent:N}=E,{setSiteDetails:T,fetchAiAssistantFeature:B,loadLogoHistory:P,setIsLoadingHistory:I}=(0,o.useDispatch)(b.E),{getIsRequestingAiAssistantFeature:M}=(0,o.select)(b.E),[L,R]=(0,u.useState)(null),[D,F]=(0,u.useState)(),O=(0,u.useRef)(!0),z=(0,u.useRef)(!1),[U,H]=(0,u.useState)(!1),[V,q]=(0,u.useState)(!1),{selectedLogo:G,getAiAssistantFeature:$,generateFirstPrompt:W,generateLogo:Z,setContext:J,tierPlansEnabled:K,site:Y,requireUpgrade:Q}=(0,m.A)(),{featureFetchError:X,setFeatureFetchError:ee,firstLogoPromptFetchError:te,clearErrors:re}=(0,g.A)(),ne=l?.ID,[se,oe]=(0,u.useState)(!1),{nextTierCheckoutURL:ae}=(0,h.Q)(),ie=$(),le=(0,u.useCallback)((async()=>{try{R("analyzing"),N(p.vm,{context:c,tool:"first-prompt"});const e=await W();F(e),R("generating"),await Z({prompt:e,style:"none"}),R(null)}catch(e){A("Error generating first logo",e),R(null)}}),[c,W,Z]),ce=(0,u.useCallback)((async()=>{try{if(!ne)throw new Error("Site ID is missing");if(!ie?.featuresControl?.["logo-generator"]?.enabled)throw ee("Failed to fetch feature data"),new Error("Failed to fetch feature data");const e=!(0,f.NP)(String(ne)),t=ie?.costs?.["jetpack-ai-logo-generator"]?.logo??p._S,r=1,n=ie?.currentTier?.limit||0,s=ie?.currentTier?.value||0,o=ie?.usagePeriod?.requestsCount||0,a=!(K?1===s:s>0)&&!!ie?.nextTier&&!e&&(K?n-o{J(c),N(p.iz,{context:c,placement:S}),ce()}),[J,c,S,ce]),de=()=>{O.current=!0,t(),R(null),H(!1),q(!1),re(),oe(!1),I(!1),N(p.ub,{context:c,placement:S})},pe=(0,u.useCallback)((()=>{a&&(de(),z.current=!1,a())}),[a,de]),he=e=>{oe(!0),r?.(e)},me=()=>{N(p.$i,{context:c})};let ge;return(0,u.useEffect)((()=>{if(ne&&T(l),!z.current){M()||(z.current=!0,B())}}),[ne,l,T,M]),(0,u.useEffect)((()=>{e&&O.current&&(O.current=!1,ue())}),[e,ue]),ge=L?(0,C.jsx)(k.N,{state:L}):X||te?(0,C.jsx)(v.x,{onCancel:de,onRetry:a?pe:null}):U||V?(0,C.jsx)(w.R,{onCancel:de,upgradeURL:ae,reason:U?"feature":"requests"}):(0,C.jsxs)(C.Fragment,{children:[!se&&(0,C.jsx)(j.X,{initialPrompt:D}),(0,C.jsx)(x.s,{logo:G,onApplyLogo:he,logoAccepted:se,siteId:String(ne)}),se?(0,C.jsxs)("div",{className:"jetpack-ai-logo-generator__accept",children:[(0,C.jsx)(_.H,{}),(0,C.jsx)("div",{className:"jetpack-ai-logo-generator__accept-actions",children:(0,C.jsx)(s.Button,{variant:"primary",onClick:de,children:__("Close","jetpack")})})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(y.N,{}),(0,C.jsx)("div",{className:"jetpack-ai-logo-generator__footer",children:(0,C.jsx)(d.A,{onFeedbackClick:me})})]})]}),(0,C.jsx)(C.Fragment,{children:e&&(0,C.jsx)(s.Modal,{className:"jetpack-ai-logo-generator-modal",onRequestClose:de,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,title:__("Jetpack AI Logo Generator","jetpack"),children:(0,C.jsx)("div",{className:(0,i.A)("jetpack-ai-logo-generator-modal__body",{"notice-modal":U||V||X||te}),children:ge})})})}},32623:(e,t,r)=>{"use strict";r.d(t,{N:()=>u});var n=r(85985),s=r(56427),o=r(13022),a=r(26076),i=r(61356),l=r(88725),c=r(10790);const u=()=>{const{tracks:e}=(0,n.st)(),{recordEvent:t}=e,{logos:r,selectedLogo:u,setSelectedLogoIndex:d,context:p,isLoadingHistory:h}=(0,l.A)(),m=e=>{const t=new URL(e);return t.searchParams.has("resize")||t.searchParams.append("resize","48,48"),t.toString()};return(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator__carousel",children:[!r.length&&h&&(0,c.jsx)(s.Button,{disabled:!0,className:(0,o.A)("jetpack-ai-logo-generator__carousel-logo"),children:(0,c.jsx)("img",{height:"48",width:"48",src:a,alt:"loading"})}),!r.length&&!h&&(0,c.jsx)("div",{children:" "}),r.map(((e,n)=>(0,c.jsx)(s.Button,{className:(0,o.A)("jetpack-ai-logo-generator__carousel-logo",{"is-selected":e.url===u.url}),onClick:()=>(e=>{t(i.Nt,{context:p,logos_count:r.length,selected_logo:e+1}),d(e)})(n),children:(0,c.jsx)("img",{src:m(e.url),alt:e.description})},e.url)))]})}},42669:(e,t,r)=>{"use strict";r.d(t,{$:()=>a});var n=r(13022),s=r(26076),o=r(10790);const a=({className:e=null})=>(0,o.jsx)("img",{src:s,alt:"Loading",className:(0,n.A)("jetpack-ai-logo-generator-modal__loader",e)})},34706:(e,t,r)=>{"use strict";r.d(t,{s:()=>N});var n=r(85985),s=r(56427),o=r(47143),a=r(27723),i=r(10067),l=r.n(i),c=r(11497),u=r(11574),d=r(47621),p=r(97034),h=r(61356),m=r(88725),g=r(44461),f=r(19362),b=r(74423),v=r(42669),k=r(10790);const __=a.__,y=l()("jetpack-ai-calypso:logo-presenter"),x=({siteId:e})=>{const{tracks:t}=(0,n.st)(),{recordEvent:r}=t,{saveLogo:a,selectedLogo:i,isSavingLogoToLibrary:l,logos:c,selectedLogoIndex:d,context:g}=(0,m.A)(),v=!!i?.mediaId,{loadLogoHistory:x}=(0,o.useDispatch)(b.E),j=__("Saving…","jetpack"),w=__("Saved","jetpack");return l||v?(0,k.jsxs)(s.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",children:[(0,k.jsx)(s.Icon,{icon:l?(0,k.jsx)(p.A,{}):(0,k.jsx)(u.A,{})}),(0,k.jsx)("span",{className:"action-text",children:l?j:w})]}):(0,k.jsxs)(s.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{if(!v&&!l){r(h.h4,{context:g,logos_count:c.length,selected_logo:d?d+1:0});try{const t=await a(i);(0,f.H)({siteId:e,url:i.url,newUrl:t.mediaURL,mediaId:t.mediaId}),x(e)}catch(e){y("Error saving logo",e)}}},children:[(0,k.jsx)(s.Icon,{icon:(0,k.jsx)(p.A,{})}),(0,k.jsx)("span",{className:"action-text",children:__("Save in Library","jetpack")})]})},j=({onApplyLogo:e})=>{const{tracks:t}=(0,n.st)(),{recordEvent:r}=t,{isSavingLogoToLibrary:o,selectedLogo:a,logos:i,selectedLogoIndex:l,context:c}=(0,m.A)();return(0,k.jsxs)(s.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{o||(r(h.Zb,{context:c,logos_count:i.length,selected_logo:null!=l?l+1:0}),e?.(a?.mediaId))},disabled:o||!a?.mediaId,variant:"secondary",children:[(0,k.jsx)(s.Icon,{icon:(0,k.jsx)(d.A,{})}),(0,k.jsx)("span",{className:"action-text",children:__("Use on block","jetpack")})]})},w=()=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(v.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,k.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Generating new logo…","jetpack")})]}),_=()=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(v.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,k.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Fetching previous logos…","jetpack")})]}),C=()=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{style:{width:0,height:"229px"}}),(0,k.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Once you generate a logo, it will show up here","jetpack")})]}),A=({disabled:e,ratedItem:t,onRate:r})=>{const{logos:n,selectedLogo:s}=(0,m.A)(),o=n.filter((e=>e.rating)).reduce(((e,t)=>(e[t.url]=t.rating,e)),{});return(0,k.jsx)(c.A,{disabled:e,ratedItem:t,feature:"logo-generator",savedRatings:o,options:{mediaLibraryId:s.mediaId,prompt:s.description},onRate:r})},S=({siteId:e,logo:t,onApplyLogo:r})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("img",{src:t.url,alt:t.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__action-wrapper",children:[(0,k.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__description",children:t.description}),(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__actions",children:[(0,k.jsx)(x,{siteId:e}),(0,k.jsx)(j,{onApplyLogo:r}),(0,k.jsx)(A,{ratedItem:t.url,disabled:!1,onRate:r=>{(0,f.H)({siteId:e,url:t.url,newUrl:t.url,mediaId:t.mediaId,rating:r})}})]})]})]}),E=({logo:e})=>(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("img",{src:e.url,alt:e.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__success-wrapper",children:[(0,k.jsx)(s.Icon,{icon:(0,k.jsx)(u.A,{})}),(0,k.jsx)("span",{children:__("Your new logo was set to the block!","jetpack")})]})]}),N=({logo:e=null,loading:t=!1,onApplyLogo:r,logoAccepted:n=!1,siteId:s})=>{const{isRequestingImage:o}=(0,m.A)(),{saveToLibraryError:a,logoUpdateError:i}=(0,g.A)();let l;return e||o?e?l=t||o?(0,k.jsx)(w,{}):n?(0,k.jsx)(E,{logo:e}):(0,k.jsx)(S,{siteId:String(s),logo:e,onApplyLogo:r}):(y("No logo provided, history still loading or logo being generated"),l=(0,k.jsx)(_,{})):l=(0,k.jsx)(C,{}),(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__wrapper",children:[(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter",children:[(0,k.jsx)("div",{className:"jetpack-ai-logo-generator-modal-presenter__content",children:l}),!n&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator-modal-presenter__rectangle"})]}),a&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error saving the logo to your library. Please try again.","jetpack")}),i&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error applying the logo to your site. Please try again.","jetpack")})]})}},11114:(e,t,r)=>{"use strict";r.d(t,{K:()=>x,X:()=>j});var n=r(85985),s=r(56427),o=r(27723),a=r(51113),i=r(19783),l=r(10067),c=r.n(l),u=r(51609),d=r(66223),p=r(21902),h=r(61356),m=r(60674),g=r(88725),f=r(44461),b=r(6019),v=r(64024),k=r(10790);const __=o.__,y=c()("jetpack-ai-calypso:prompt-box"),x=({prompt:e="",setPrompt:t=()=>{},disabled:r=!1,actionDisabled:n=!1,generateHandler:o=()=>{},placeholder:a="",buttonLabel:i=""})=>{const l=(0,u.useRef)(null);(0,u.useEffect)((()=>{l.current&&l.current.textContent!==e&&(l.current.textContent=e)}),[e]);return(0,k.jsxs)("div",{className:"jetpack-ai-image-generator__prompt-query",children:[(0,k.jsx)("div",{role:"textbox",tabIndex:0,ref:l,contentEditable:!r,suppressContentEditableWarning:!0,className:"prompt-query__input",onInput:e=>{t(e.target.textContent||"")},onPaste:e=>{e.preventDefault();const r=e.currentTarget.ownerDocument.getSelection();if(!r||!r.rangeCount)return;const n=e.clipboardData.getData("text/plain");r.deleteFromDocument();r.getRangeAt(0).insertNode(document.createTextNode(n)),r.collapseToEnd(),t(l.current?.textContent||"")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),o()),e.stopPropagation()},onKeyUp:()=>{""===l.current?.textContent&&(l.current.innerHTML="")},"data-placeholder":a}),(0,k.jsx)(s.Button,{variant:"primary",className:"jetpack-ai-image-generator__prompt-submit",onClick:o,disabled:n,children:i||__("Generate","jetpack")})]})},j=({initialPrompt:e=""})=>{const{tracks:t}=(0,n.st)(),{recordEvent:r}=t,[l,c]=(0,u.useState)(e),[j,w]=(0,u.useState)(0),{enhancePromptFetchError:_,logoFetchError:C}=(0,f.A)(),{nextTierCheckoutURL:A,hasNextTier:S}=(0,m.Q)(),E=l?.length>=h.N3,[N,T]=(0,u.useState)(!1),[B,P]=(0,u.useState)(null),[I,M]=(0,u.useState)([]),{generateLogo:L,enhancePrompt:R,setIsEnhancingPrompt:D,isBusy:F,isEnhancingPrompt:O,site:z,getAiAssistantFeature:U,requireUpgrade:H,context:V,tierPlansEnabled:q,imageStyles:G,guessStyle:$}=(0,g.A)(),W=__("Enhancing…","jetpack"),Z=__("Enhance prompt","jetpack"),J=O?W:Z,K=(0,u.useRef)(null),Y=(0,u.useCallback)((async()=>{y("Enhancing prompt",l),D(!0),r(h.vm,{context:V,tool:"enhance-prompt"});try{const e=await R({prompt:l});c(e),D(!1)}catch(e){y("Error enhancing prompt",e),D(!1)}}),[V,R,l,D]),Q=U(String(z?.id||"")),X=Q?.currentTier?.value||0,ee=Q?.usagePeriod?.requestsCount||0,te=1===X;(0,u.useEffect)((()=>{w(X-ee<=0?0:X-ee)}),[X,ee]),(0,u.useEffect)((()=>{K.current&&K.current.textContent!==l&&(K.current.textContent=l)}),[l]),(0,u.useEffect)((()=>{G&&G.length>0?(M([G.find((({value:e})=>e===d.Hu)),G.find((({value:e})=>e===d.Wp)),...G.filter((({value:e})=>![d.Hu,d.Wp].includes(e)))].filter((e=>e))),T(!0),P(d.Hu)):(M([]),T(!1),P(null))}),[G]);const re=(0,u.useCallback)((async()=>{if(y(V),B===d.Wp){D(!0),r(h.Tk,{context:V,tool:"image"});const e=await $(l)||d.Hu;P(e),r(h.vm,{context:V,tool:"image",style:e}),D(!1),L({prompt:l,style:e})}else r(h.vm,{context:V,tool:"image",style:B}),L({prompt:l,style:B})}),[V,L,l,B]),ne=(0,u.useCallback)((e=>{y("change style",e),P(e),r(h.UO,{context:V,style:e})}),[V,P,r]);return(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt",children:[(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-header",children:[(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-label",children:__("Describe your site:","jetpack")}),(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-actions",children:(0,k.jsxs)(s.Button,{variant:"link",disabled:F||H||!E,onClick:Y,children:[(0,k.jsx)(p.A,{}),J]})}),N&&(0,k.jsx)(s.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:B,options:I,onChange:ne,disabled:F||H})]}),(0,k.jsx)(x,{prompt:l,setPrompt:c,generateHandler:re,disabled:F||H,actionDisabled:F||H||!E,placeholder:__("Describe your site or simply ask for a logo specifying some details about it","jetpack")}),(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-footer",children:[!te&&!H&&(0,k.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-requests",children:[(0,k.jsx)("div",{children:(0,o.sprintf)( // translators: %u is the number of requests __("%u requests remaining.","jetpack"),j)}),S&&(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(s.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{r(h.AN,{context:V,placement:h.Cn})},children:(0,k.jsx)("span",{children:__("Upgrade","jetpack")})})]})," ",(0,k.jsx)(s.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom",children:(0,k.jsx)(a.A,{className:"prompt-footer__icon",icon:i.A})})]}),H&&q&&(0,k.jsx)(v.G,{}),H&&!q&&(0,k.jsx)(b.Q,{}),_&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error enhancing prompt. Please try again.","jetpack")}),C&&(0,k.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error generating logo. Please try again.","jetpack")})]})]})}},64024:(e,t,r)=>{"use strict";r.d(t,{G:()=>h});var n=r(85985),s=r(56427),o=r(86087),a=r(27723),i=r(51113),l=r(23751),c=r(61356),u=r(60674),d=r(88725),p=r(10790);const __=a.__,h=()=>{const{tracks:e}=(0,n.st)(),{recordEvent:t}=e,r=__("Upgrade","jetpack"),a=(0,o.createInterpolateElement)(__("Not enough requests left to generate a logo. Upgrade now to increase it.","jetpack"),{strong:(0,p.jsx)("strong",{})}),{nextTierCheckoutURL:h}=(0,u.Q)(),{context:m}=(0,d.A)();return(0,p.jsx)("div",{className:"jetpack-upgrade-plan-banner",children:(0,p.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(i.A,{className:"jetpack-upgrade-plan-banner__icon",icon:l.A}),(0,p.jsx)("span",{className:"jetpack-upgrade-plan-banner__banner-description",children:a})]}),(0,p.jsx)(s.Button,{href:h,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})},children:(0,p.jsx)("span",{children:r})})]})})}},35421:(e,t,r)=>{"use strict";r.d(t,{R:()=>u});var n=r(3924),s=r(85985),o=r(56427),a=r(27723),i=r(61356),l=r(88725),c=r(10790);const __=a.__,u=({onCancel:e,upgradeURL:t,reason:r})=>{const{tracks:a}=(0,s.st)(),{recordEvent:u}=a,d=__("Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.","jetpack"),p=__("Not enough requests left to generate a logo. Upgrade your Jetpack AI to increase the amount of requests you can use in all AI-powered features.","jetpack"),h=(0,n.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,l.A)();return(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:[(0,c.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:"feature"===r?d:p})," ",(0,c.jsx)(o.Button,{variant:"link",href:h,target:"_blank",children:(0,c.jsx)("span",{children:__("Learn more about Jetpack AI.","jetpack")})})]}),(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,c.jsx)(o.Button,{variant:"tertiary",onClick:e,children:(0,c.jsx)("span",{children:__("Cancel","jetpack")})}),(0,c.jsx)(o.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{u(i.AN,{context:m,placement:i.Tz}),e()},children:(0,c.jsx)("span",{children:__("Upgrade","jetpack")})})]})]})}},48204:(e,t,r)=>{"use strict";r.d(t,{H:()=>c});var n=r(56427),s=r(27723),o=r(53512),a=r(13022),i=r(36791),l=r(10790);const __=s.__,c=({className:e=null,onVisitBlankTarget:t})=>(0,l.jsxs)("div",{className:(0,a.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e),children:[(0,l.jsx)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo",children:(0,l.jsx)("img",{src:i,alt:"Jetpack"})}),(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content",children:[(0,l.jsx)("strong",{children:__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")}),(0,l.jsx)("span",{children:__("Generate and tweak content, create forms, get feedback and much more.","jetpack")}),(0,l.jsx)("div",{children:(0,l.jsxs)(n.Button,{variant:"link",href:"https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai",target:"_blank",onClick:t||null,children:[(0,l.jsx)("span",{children:__("Learn more about Jetpack AI","jetpack")}),(0,l.jsx)(n.Icon,{icon:o.A,size:20})]})})]})]})},61356:(e,t,r)=>{"use strict";r.d(t,{$i:()=>c,AN:()=>u,Cn:()=>h,N3:()=>f,Nt:()=>l,Tk:()=>p,Tz:()=>m,UO:()=>d,Zb:()=>i,_S:()=>b,h4:()=>a,iz:()=>n,tF:()=>g,ub:()=>s,vm:()=>o});const n="jetpack_ai_logo_generator_modal_open",s="jetpack_ai_logo_generator_modal_close",o="jetpack_ai_logo_generator_generate",a="jetpack_ai_logo_generator_save",i="jetpack_ai_logo_generator_use",l="jetpack_ai_logo_generator_navigate",c="jetpack_ai_logo_generator_feedback",u="jetpack_ai_upgrade_button",d="jetpack_ai_logo_generator_switch_style",p="jetpack_ai_logo_generator_guess_style",h="input_footer",m="free_user_screen",g="upgrade_prompt",f=3,b=10},60674:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});var n=r(97999),s=r(85985),o=r(47143),a=r(74423);const i=()=>{const{nextTier:e,tierPlansEnabled:t}=(0,o.useSelect)((e=>{const t=e(a.E);return{nextTier:t.getAiAssistantFeature().nextTier,tierPlansEnabled:t.getAiAssistantFeature().tierPlansEnabled}}),[]),r=!(0,n.isWpcomPlatformSite)(),i=r?"jetpack-ai-upgrade-url-for-jetpack-sites":"jetpack-ai-yearly-tier-upgrade-nudge",l=(0,s.GE)(),c=`https://wordpress.com/home/${l}`,u=new URL("https://jetpack.com/redirect/");u.searchParams.set("source",i),u.searchParams.set("site",l),u.searchParams.set("path",t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly"),r||u.searchParams.set("query",`redirect_to=${encodeURIComponent(c)}`);return{nextTierCheckoutURL:u.toString(),hasNextTier:!!e}}},78867:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(3924),s=r(47143),o=r(86087),a=r(27723),i=r(74423),l=r(10790);const __=a.__,c=()=>{const{usagePeriod:e}=(0,s.useSelect)((e=>({usagePeriod:e(i.E).getAiAssistantFeature().nextTier})),[]),t=(e=>{const t=__("You've reached this month's request limit, per our fair usage policy.","jetpack");if(!e)return t; // Translators: %s is the date when the requests will reset. const r=__("Requests will reset on %s.","jetpack");return`${t} ${(0,a.sprintf)(r,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),r=(0,n.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,o.createInterpolateElement)(t,{link:(0,l.jsx)("a",{href:r,target:"_blank",rel:"noreferrer"}),span:(0,l.jsx)("span",{})})}},88725:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(47143),s=r(10067),o=r.n(s),a=r(51609),i=r(31439),l=r(62614),c=r(93869),u=r(51391),d=r(19362),p=r(28229),h=r(74423),m=r(44461);const g=o()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:r,setIsRequestingImage:s,setIsEnhancingPrompt:o,increaseAiAssistantRequestsCount:f,addLogoToHistory:b,setContext:v,setIsLoadingHistory:k}=(0,n.useDispatch)(h.E),{logos:y,selectedLogoIndex:x,selectedLogo:j,siteDetails:w,isSavingLogoToLibrary:_,isApplyingLogo:C,isEnhancingPrompt:A,isBusy:S,isRequestingImage:E,getAiAssistantFeature:N,requireUpgrade:T,context:B,tierPlansEnabled:P,isLoadingHistory:I}=(0,n.useSelect)((e=>{const t=e(h.E);return{logos:t.getLogos(),selectedLogoIndex:t.getSelectedLogoIndex(),selectedLogo:t.getSelectedLogo(),siteDetails:t.getSiteDetails(),isSavingLogoToLibrary:t.getIsSavingLogoToLibrary(),isApplyingLogo:t.getIsApplyingLogo(),isRequestingImage:t.getIsRequestingImage(),isEnhancingPrompt:t.getIsEnhancingPrompt(),isBusy:t.getIsBusy(),getAiAssistantFeature:t.getAiAssistantFeature,requireUpgrade:t.getRequireUpgrade(),context:t.getContext(),tierPlansEnabled:t.getTierPlansEnabled(),isLoadingHistory:t.getIsLoadingHistory()}}),[]),{setFirstLogoPromptFetchError:M,setEnhancePromptFetchError:L,setLogoFetchError:R,setSaveToLibraryError:D,setLogoUpdateError:F}=(0,m.A)(),{generateImageWithParameters:O}=(0,l.Ay)(),{saveToMediaLibrary:z}=(0,c.A)(),{ID:U=null,name:H=null,description:V=null}=w||{},q=U?String(U):null,G=N(q),$=G?.costs?.["jetpack-ai-logo-generator"]?.logo,W=G?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,a.useCallback)((async function(){M(null),f();try{const e=await(0,u.A)();if(!e||!e.token)throw new Error("No token provided");g("Generating first prompt for site");const t={question:`Generate a simple and short prompt asking for a logo based on the site's name and description, keeping the same language.\nExample for a site named "The minimalist fashion blog", described as "Daily inspiration for all things fashion": A logo for a minimalist fashion site focused on daily sartorial inspiration with a clean and modern aesthetic that is sleek and sophisticated.\nAnother example, now for a site called "El observatorio de aves", described as "Un sitio dedicado a nuestros compañeros y compañeras entusiastas de la observación de aves.": Un logo para un sitio web dedicado a la observación de aves, capturando la esencia de la naturaleza y la pasión por la avifauna en un diseño elegante y representativo, reflejando una estética natural y apasionada por la vida silvestre.\n\nSite name: ${H}\nSite description: ${V}`,feature:"jetpack-ai-logo-generator",stream:!1},r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",n={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},s=await fetch(r,{method:"POST",headers:n,body:JSON.stringify(t)}).then((e=>e.json()));return s?.choices?.[0]?.message?.content}catch(e){throw f(-1),M(e),e}}),[M,f,H,V]),K=(0,a.useCallback)((async function(e){if(R(null),!Z||!Z.length)return null;const t=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:H,description:V}}];try{const e=await(0,i.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)return null;const r=Z.find((({value:t})=>t===e));return r?r.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}}),[Z,H,V]),Y=(0,a.useCallback)((async function({prompt:e,style:t=null}){R(null);try{const r=await(0,u.A)();if(!r||!r.token)throw new Error("No token provided");if("auto"===t)throw new Error("Auto style is not supported");g("Generating image with prompt",e);const n={prompt:`I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS:\nCreate a single text-free iconic vector logo that symbolically represents the user request, using abstract or symbolic imagery.\nThe design should be modern, with either a vivid color scheme full of gradients or a color scheme that's monochromatic. Use any of those styles based on the user request mood.\nEnsure the logo is set against a clean solid background.\nEnsure the logo works in small sizes.\nThe imagery in the logo should subtly hint at the mood of the user request but DO NOT use any text, letters, or the name of the site on the imagery.\nThe image should contain a single icon, without variations, color palettes or different versions.\n\nUser request:${e}`,messages:t?[{role:"jetpack-ai",context:{type:"ai-assistant-generate-logo",request:e,name:H,description:V,style:t}}]:[],feature:"jetpack-ai-logo-generator",response_format:"b64_json",style:t||""};return await O(n)}catch(e){throw R(e),e}}),[H,V]),Q=(0,a.useCallback)((async e=>{D(null);try{if(g("Saving logo for site"),e.mediaId)return{mediaId:e.mediaId,mediaURL:e.url};const r={mediaId:0,mediaURL:""};t(!0);const{id:n,url:s}=await z(e.url,"site-logo.png");return r.mediaId=parseInt(n),r.mediaURL=s,r}catch(e){throw D(e),e}finally{t(!1)}}),[t,D]),X=(0,a.useCallback)((async()=>{F(null);try{if(!q||!j)throw new Error("Missing siteId or logo");g("Applying logo for site",q),r(!0);const{mediaId:e}=j;if(!e)throw new Error("Missing mediaId");await(0,p.Z)({siteId:q,imageId:String(e)})}catch(e){throw F(e),e}finally{r(!1)}}),[j,r,F,q]),ee=(0,a.useCallback)((e=>{b(e),(0,d.hm)({...e,siteId:String(q)})}),[q,b,d.hm]),te=(0,a.useCallback)((async function({prompt:e,style:t}){g("Generating logo for site"),s(!0);try{if(!$)throw new Error("Missing cost information");let r;f($);try{if(r=await Y({prompt:e,style:t}),!r||!r.data.length)throw new Error("No image returned")}catch(e){throw f(-$),e}const n=r.data[0].revised_prompt||null,s={url:"data:image/png;base64,"+r.data[0].b64_json,description:e,revisedPrompt:n};try{const t=await Q(s);ee({url:t.mediaURL,description:e,mediaId:t.mediaId,revisedPrompt:n})}catch(e){throw ee(s),e}}finally{s(!1)}}),[$,f,Q,ee,Y]);return{logos:y,selectedLogoIndex:x,selectedLogo:j,setSelectedLogoIndex:e,site:{id:q,name:H,description:V},generateFirstPrompt:J,saveLogo:Q,applyLogo:X,generateImage:Y,enhancePrompt:async function({prompt:e}){L(null),f();try{const t=await(0,u.A)();if(!t||!t.token)throw new Error("No token provided");g("Enhancing prompt",e);const r={messages:[{role:"system",content:"Enhance the prompt you receive.\nThe prompt is meant for generating a logo. Return the same prompt enhanced, and make each enhancement wrapped in brackets.\nDo not add any mention to text, letters, typography or the name of the site in the prompt.\nFor example: user's prompt: A logo for an ice cream shop. Returned prompt: A logo for an ice cream shop [that is pink] [and vibrant]."},{role:"user",content:e}],feature:"jetpack-ai-logo-generator",stream:!1},n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",s={Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},o=await fetch(n,{method:"POST",headers:s,body:JSON.stringify(r)}).then((e=>e.json()));return o?.choices?.[0]?.message?.content}catch(e){throw f(-1),L(e),e}},storeLogo:ee,generateLogo:te,setIsEnhancingPrompt:o,setIsRequestingImage:s,setIsSavingLogoToLibrary:t,setIsApplyingLogo:r,setContext:v,isEnhancingPrompt:A,isRequestingImage:E,isSavingLogoToLibrary:_,isApplyingLogo:C,isBusy:S,getAiAssistantFeature:N,requireUpgrade:T,context:B,tierPlansEnabled:P,isLoadingHistory:I,setIsLoadingHistory:k,imageStyles:Z,guessStyle:K}}},44461:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(47143),s=r(74423);const o=()=>{const{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:r,setLogoFetchError:o,setSaveToLibraryError:a,setLogoUpdateError:i}=(0,n.useDispatch)(s.E),{featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}=(0,n.useSelect)((e=>{const t=e(s.E);return{featureFetchError:t.getFeatureFetchError(),firstLogoPromptFetchError:t.getFirstLogoPromptFetchError(),enhancePromptFetchError:t.getEnhancePromptFetchError(),logoFetchError:t.getLogoFetchError(),saveToLibraryError:t.getSaveToLibraryError(),logoUpdateError:t.getLogoUpdateError()}}),[]);return{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:r,setLogoFetchError:o,setSaveToLibraryError:a,setLogoUpdateError:i,clearErrors:()=>{e(null),t(null),r(null),o(null),a(null),i(null)},featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}}},23101:(e,t,r)=>{"use strict";r.d(t,{K:()=>s.K,T:()=>n.T});var n=r(64537),s=r(11114)},19362:(e,t,r)=>{"use strict";r.d(t,{$t:()=>i,H:()=>a,NP:()=>l,Pv:()=>c,hm:()=>o});var n=r(13858);const s=10;function o({siteId:e,url:t,description:r,mediaId:n,revisedPrompt:o}){const a=i(e),l={url:t,description:r,mediaId:n,revisedPrompt:o};return a.push(l),localStorage.setItem(`logo-history-${e}`,JSON.stringify(a.slice(-s))),l}function a({siteId:e,url:t,newUrl:r,mediaId:n,rating:o}){const a=i(e),l=a.findIndex((e=>e.url===t));return l>-1&&(a[l].url=r,a[l].mediaId=n,a[l].rating=o),localStorage.setItem(`logo-history-${e}`,JSON.stringify(a.slice(-s))),a[l]}function i(e){const t=localStorage.getItem(`logo-history-${e}`);let r=t?JSON.parse(t):[];return Array.isArray(r)||(r=[]),r=r.slice(-s),r=r.filter((e=>"object"==typeof e&&"string"==typeof e.url&&"string"==typeof e.description)).map((e=>({url:e.url,description:e.description,mediaId:e.mediaId,rating:e.rating}))),r}function l(e){return 0===i(e).length}async function c(e){const t=i(e).filter((({mediaId:e})=>void 0!==e)).map((({mediaId:t})=>new Promise(((r,s)=>{(0,n.T)({siteId:e,mediaId:t}).then((e=>r({mediaId:t,exists:e}))).catch((e=>s(e)))}))));try{(await Promise.all(t)).filter((({exists:e})=>!e)).forEach((({mediaId:t})=>function({siteId:e,mediaId:t}){const r=i(e),n=r.findIndex((e=>e.mediaId===t));-1!==n&&(r.splice(n,1),localStorage.setItem(`logo-history-${e}`,JSON.stringify(r)))}({siteId:e,mediaId:t})))}catch{}}},13858:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var n=r(48931);async function s({mediaId:e}){const t=Number(e);if(Number.isNaN(t))return!1;try{return await(0,n.A)({path:`/wp/v2/media/${Number(e)}`,method:"GET"}),!0}catch(e){const t=e?.data?.status;if(404===t)return!1;throw e}}},28229:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(22746);async function s({siteId:e,imageId:t}){const r={site_logo:t,site_icon:t};return(0,n.A)({path:`/sites/${String(e)}/settings`,apiVersion:"v2",apiNamespace:"wp/v2",body:r,query:"source=jetpack-ai",method:"POST"})}},22746:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(48931);const s=5;let o=0;async function a(e){if(o+=1,o>s)throw o-=1,new Error("Too many requests");return(0,n.A)(e).finally((()=>{o-=1}))}},9624:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(19362),s=r(22746),o=r(9938);const a={storeAiAssistantFeature:e=>({type:o.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:o.ql});try{const t=await(0,s.A)({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature",query:"force=wpcom"});if(t.data)throw new Error("Failed to fetch");e(a.storeAiAssistantFeature(function(e){return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"],costs:e.costs,featuresControl:e["features-control"]}}(t)))}catch(t){e({type:o.Rx,error:t})}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:o.Lg,count:e})},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:o.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:o.c1,tierPlansEnabled:e}),setSiteDetails:e=>({type:o.Bz,siteDetails:e}),setSelectedLogoIndex:e=>({type:o.BG,selectedLogoIndex:e}),addLogoToHistory:e=>({type:o.sG,logo:e}),setIsSavingLogoToLibrary:e=>({type:o.E6,isSavingLogoToLibrary:e}),setIsApplyingLogo:e=>({type:o.Ep,isApplyingLogo:e}),updateSelectedLogo:(e,t)=>({type:o.r_,mediaId:e,url:t}),setIsRequestingImage:e=>({type:o.vk,isRequestingImage:e}),setIsEnhancingPrompt:e=>({type:o.O5,isEnhancingPrompt:e}),loadLogoHistory(e){const t=(0,n.$t)(e);return{type:o.ZI,history:t}},setFeatureFetchError:e=>({type:o.Rx,error:e}),setFirstLogoPromptFetchError:e=>({type:o.MQ,error:e}),setEnhancePromptFetchError:e=>({type:o.gG,error:e}),setLogoFetchError:e=>({type:o.q_,error:e}),setSaveToLibraryError:e=>({type:o.x0,error:e}),setLogoUpdateError:e=>({type:o.FN,error:e}),setContext:e=>({type:o.kZ,context:e}),setIsLoadingHistory:e=>({type:o.hY,isLoadingHistory:e})},i=a},9938:(e,t,r)=>{"use strict";r.d(t,{BG:()=>h,Bz:()=>l,E6:()=>g,Ep:()=>f,FN:()=>S,GB:()=>c,Kt:()=>a,Lg:()=>o,MQ:()=>w,O5:()=>k,Rx:()=>j,UU:()=>n,ZI:()=>y,c1:()=>i,gG:()=>_,hY:()=>x,kZ:()=>p,mx:()=>d,nb:()=>u,q_:()=>C,ql:()=>s,r_:()=>b,sG:()=>m,vk:()=>v,x0:()=>A});const n="STORE_AI_ASSISTANT_FEATURE",s="REQUEST_AI_ASSISTANT_FEATURE",o="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",a="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",i="SET_TIER_PLANS_ENABLED",l="SET_SITE_DETAILS",c=20,u=3e3,d=3,p="SET_CONTEXT",h="SET_SELECTED_LOGO_INDEX",m="ADD_LOGO_TO_HISTORY",g="SET_IS_SAVING_LOGO_TO_LIBRARY",f="SET_IS_APPLYING_LOGO",b="SAVE_SELECTED_LOGO",v="SET_IS_REQUESTING_IMAGE",k="SET_IS_ENHANCING_PROMPT",y="SET_SITE_HISTORY",x="SET_IS_LOADING_HISTORY",j="SET_FEATURE_FETCH_ERROR",w="SET_FIRST_LOGO_PROMPT_FETCH_ERROR",_="SET_ENHANCE_PROMPT_FETCH_ERROR",C="SET_LOGO_FETCH_ERROR",A="SET_SAVE_TO_LIBRARY_ERROR",S="SET_LOGO_UPDATE_ERROR"},74423:(e,t,r)=>{"use strict";r.d(t,{E:()=>i});var n=r(47143),s=r(9624),o=r(23695),a=r(80037);const i="jetpack-ai/logo-generator",l=(0,n.createReduxStore)(i,{__experimentalUseThunks:!0,actions:s.A,reducer:o.A,selectors:a.A});(0,n.register)(l)},94891:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(9938);const s={siteDetails:{},features:{aiAssistantFeature:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:n.GB,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:n.mx,asyncRequestTimerId:0,isRequestingImage:!1},featuresControl:{"logo-generator":{enabled:!1,styles:[]}}}},history:[],selectedLogoIndex:0}},23695:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(61356),s=r(9938),o=r(94891);function a(e=o.A,t){switch(t.type){case s.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:s.mx,asyncRequestTimerId:0}}}};case s.UU:{const r={"jetpack-ai-logo-generator":{logo:n._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:r,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case s.Lg:{const r=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},n=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);r.requestsCount+=t.count??1;const o=e?.features?.aiAssistantFeature?.currentTier?.value,a=void 0===o&&!e?.features?.aiAssistantFeature?.hasFeature||0===o,i=void 0===o&&e?.features?.aiAssistantFeature?.hasFeature||1===o;let l=e?.features?.aiAssistantFeature?.currentTier?.limit||s.GB;i?l=s.nb:a&&(l=e?.features?.aiAssistantFeature?.requestsLimit);const c=(i||a?n:e?.features?.aiAssistantFeature?.usagePeriod?.requestsCount||0)>=l,u=a||c&&null!==e?.features?.aiAssistantFeature?.nextTier;return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,isOverLimit:c,requestsCount:n,requireUpgrade:u,usagePeriod:{...r}}}}}case s.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case s.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case s.Bz:return{...e,siteDetails:t.siteDetails};case s.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case s.sG:{const r=[...e.history,t.logo];return{...e,history:r,selectedLogoIndex:r.length-1}}case s.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case s.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case s.r_:{const r=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...r,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case s.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case s.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case s.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case s.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case s.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case s.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case s.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case s.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case s.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case s.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case s.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},80037:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(61356);const s={getAiAssistantFeature(e){const t={...e.features.aiAssistantFeature};return delete t._meta,t},getSiteDetails:e=>e.siteDetails,getIsRequestingAiAssistantFeature:e=>e.features.aiAssistantFeature?._meta?.isRequesting??!1,getLogos:e=>e.history??[],getSelectedLogoIndex:e=>e.selectedLogoIndex??null,getSelectedLogo:e=>e.history?.[e.selectedLogoIndex]??null,getIsSavingLogoToLibrary:e=>e._meta?.isSavingLogoToLibrary??!1,getIsApplyingLogo:e=>e._meta?.isApplyingLogo??!1,getIsEnhancingPrompt:e=>e._meta?.isEnhancingPrompt??!1,getIsRequestingImage:e=>e._meta?.isRequestingImage??!1,getIsBusy:e=>s.getIsApplyingLogo(e)||s.getIsSavingLogoToLibrary(e)||s.getIsRequestingImage(e)||s.getIsEnhancingPrompt(e),getRequireUpgrade(e){const t=e.features.aiAssistantFeature;if(!t?.tierPlansEnabled)return t?.requireUpgrade;const r=t?.costs?.["jetpack-ai-logo-generator"]?.logo??n._S,s=t?.currentTier?.value||0,o=t?.usagePeriod?.requestsCount||0,a=1===s,i=!t?.nextTier;return e.features.aiAssistantFeature?.requireUpgrade||!a&&!i&&s-oe._meta?.featureFetchError??null,getFirstLogoPromptFetchError:e=>e._meta?.firstLogoPromptFetchError??null,getEnhancePromptFetchError:e=>e._meta?.enhancePromptFetchError??null,getLogoFetchError:e=>e._meta?.logoFetchError??null,getSaveToLibraryError:e=>e._meta?.saveToLibraryError??null,getLogoUpdateError:e=>e._meta?.logoUpdateError??null,getContext:e=>e._meta?.context??"",getTierPlansEnabled:e=>e.features.aiAssistantFeature?.tierPlansEnabled??!1,getIsLoadingHistory:e=>e._meta?.isLoadingHistory??!1},o=s},53664:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(7675),s=r(10067),o=r.n(s),a=r(46219),i=r(51391),l=r(78836);const c=o()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource({url:e,question:t,token:r,options:s={}}){if(!r)try{c("Token was not provided, requesting one..."),r=(await(0,i.A)()).token}catch(e){return void this.processErrorEvent(e)}const o={};if(Number.isInteger(parseInt(s.postId))&&(o.post_id=+s.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");s?.fromCache&&t.searchParams.append("stream_cache","true"),e=t.toString(),c("URL not provided, using default: %o",e)}Array.isArray(t)?o.messages=t:o.question=t,s?.feature?.length&&(c("Feature: %o",s.feature),o.feature=s.feature),s?.functions?.length&&(c("Functions: %o",s.functions),o.functions=s.functions),s?.model?.length&&(c("Model: %o",s.model),o.model=s.model),this.errorUnclearPromptTriggered=!1,await(0,n.y)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+r},body:JSON.stringify(o),onclose:()=>{c("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![413,422,429].includes(e.status)&&(c("Connection error: %o",e),t=l.mA,this.dispatchEvent(new CustomEvent(l.mA,{detail:e}))),503===e.status&&(t=l.AZ,this.dispatchEvent(new CustomEvent(l.AZ))),413===e.status&&(t=l.cT,this.dispatchEvent(new CustomEvent(l.cT))),422===e.status&&(t=l.ud,this.dispatchEvent(new CustomEvent(l.ud))),429===e.status&&(t=l.Or,this.dispatchEvent(new CustomEvent(l.Or))),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,a.fC)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");if(e.startsWith("JETPACK_AI_ERROR")){if(this.errorUnclearPromptTriggered)return;this.errorUnclearPromptTriggered=!0,this.dispatchEvent(new CustomEvent(l.L9)),c("Unclear error prompt dispatched"),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,a.fC)(l.L9)}))}else"JETPACK_AI_ERROR".startsWith(e)?c(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.errorUnclearPromptTriggered)return;if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void c("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void c("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void c("Error parsing JSON",e,t)}const{delta:r}=t?.choices?.[0]??{delta:{content:null,function_call:null}},n=r.content,s=r.function_call;n&&(this.fullMessage+=n,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:n})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),s&&(null!=s.name&&(this.fullFunctionCall.name+=s.name),null!=s.arguments&&(this.fullFunctionCall.arguments+=s.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processErrorEvent(e){c("onerror: %o",e),this.dispatchEvent(new CustomEvent(l.mA,{detail:e})),this.dispatchEvent(new CustomEvent(l.zn,{detail:(0,a.fC)(l.mA)}))}}},78836:(e,t,r)=>{"use strict";r.d(t,{AZ:()=>s,L9:()=>c,Np:()=>d,Or:()=>o,cT:()=>i,mA:()=>l,sD:()=>p,uH:()=>n.u,ud:()=>a,zn:()=>u});var n=r(97784);const s="error_service_unavailable",o="error_quota_exceeded",a="error_moderation",i="error_context_too_large",l="error_network",c="error_unclear_prompt",u="error_response",d="default",p="gemini-nano"},90372:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(10067);const s=r.n(n)()("dops:analytics");let o,a;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const i={initialize:function(e,t,r){i.setUser(e,t),i.setSuperProps(r),i.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){a={ID:e,username:t}},setSuperProps:function(e){o=e},assignSuperProps:function(e){o=Object.assign(o||{},e)},mc:{bumpStat:function(e,t){const r=function(e,t){let r="";if("object"==typeof e){for(const t in e)r+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);s("Bumping stats %o",e)}else r="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),s('Bumping stat "%s" in group "%s"',t,e);return r}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+r+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const r=function(e,t){let r="";if("object"==typeof e){for(const t in e)r+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);s("Built stats %o",e)}else r="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),s('Built stat "%s" in group "%s"',t,e);return r}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+r+"&t="+Math.random())}},pageView:{record:function(e,t){i.tracks.recordPageView(e),i.ga.recordPageView(e,t)}},purchase:{record:function(e,t,r,n,s,o,a){i.ga.recordPurchase(e,t,r,n,s,o,a)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(o&&(s("- Super Props: %o",o),t=Object.assign(t,o)),s('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):s('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};i.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){i.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){s("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};i.ga.initialized||(a&&(e={userId:"u-"+a.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),i.ga.initialized=!0)},recordPageView:function(e,t){i.ga.initialize(),s("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,r,n){i.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==r&&(o+=" [Option Label: "+r+"]"),void 0!==n&&(o+=" [Option Value: "+n+"]"),s(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,r,n)},recordPurchase:function(e,t,r,n,s,o,a){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:n,currency:a}),window.ga("ecommerce:addItem",{id:e,name:t,sku:r,price:s,quantity:o}),window.ga("ecommerce:send")}},identifyUser:function(){a&&window._tkq.push(["identifyUser",a.ID,a.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},l=i},51112:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(56427),s=r(27723),o=r(51113),a=r(53512),i=r(13022),l=r(51609),c=r(85488),u=r(10790);const __=s.__,d=(0,l.forwardRef)(((e,t)=>{const{children:r,variant:s="primary",size:l="normal",weight:d="bold",icon:p,iconSize:h,disabled:m,isDestructive:g,isLoading:f,isExternalLink:b,className:v,text:k,fullWidth:y,...x}=e,j=(0,i.A)(c.A.button,v,{[c.A.normal]:"normal"===l,[c.A.small]:"small"===l,[c.A.icon]:Boolean(p),[c.A.loading]:f,[c.A.regular]:"regular"===d,[c.A["full-width"]]:y,[c.A["is-icon-button"]]:Boolean(p)&&!r});x.ref=t;const w="normal"===l?20:16,_=b&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.A,{size:w,icon:a.A,className:c.A["external-icon"]}),(0,u.jsx)(n.VisuallyHidden,{as:"span",children:/* translators: accessibility text */ __("(opens in a new tab)","jetpack")})]}),C=b?"_blank":void 0,A=r?.[0]&&null!==r[0]&&"components-tooltip"!==r?.[0]?.props?.className;return(0,u.jsxs)(n.Button,{target:C,variant:s,className:(0,i.A)(j,{"has-text":!!p&&A}),icon:b?void 0:p,iconSize:h,disabled:m,"aria-disabled":m,isDestructive:g,text:k,...x,children:[f&&(0,u.jsx)(n.Spinner,{}),(0,u.jsx)("span",{children:r}),_]})}));d.displayName="Button";const p=d},69222:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(29491),s=r(86087),o=r(27723),a=r(51112),i=r(78478),l=r(10790);const __=o.__,c=({buttonStyle:e="icon",textToCopy:t,onCopy:r,...o})=>{const[c,u]=(0,s.useState)(!1),d=(0,s.useRef)(),p=(0,n.useCopyToClipboard)(t,(()=>{d.current&&clearTimeout(d.current),u(!0),r?.(),d.current=setTimeout((()=>{u(!1),d.current=void 0}),3e3)}));(0,s.useEffect)((()=>()=>{d.current&&clearTimeout(d.current)}),[]);let h=null,m=null;"text"!==e&&(h=c?(0,l.jsx)(i.Nr,{}):(0,l.jsx)(i.ui,{}));const g=__("Copy to clipboard","jetpack");return"icon"!==e&&(m=c?__("Copied!","jetpack"):g),(0,l.jsx)(a.A,{"aria-label":g,icon:h,children:m,ref:p,...o})}},78478:(e,t,r)=>{"use strict";r.d(t,{Nr:()=>l,ui:()=>c});var n=r(56427),s=r(13022),o=(r(84705),r(56058)),a=r(10790);const i=({className:e,size:t=24,viewBox:r="0 0 24 24",opacity:i=1,color:l="#2C3338",children:c})=>{const u={className:(0,s.A)(o.A.iconWrapper,e),width:t,height:t,viewBox:r,opacity:i,fill:void 0};return l&&(u.fill=l),(0,a.jsx)(n.SVG,{...u,fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(n.G,{opacity:i,children:c})})},l=({size:e,className:t=o.A["checkmark-icon"],color:r})=>(0,a.jsx)(i,{className:t,size:e,color:r,children:(0,a.jsx)(n.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})}),c=({size:e,className:t=o.A["clipboard-icon"],color:r})=>(0,a.jsx)(i,{className:t,size:e,color:r,children:(0,a.jsx)(n.Path,{d:"M5.625 5.5H15.375C15.444 5.5 15.5 5.55596 15.5 5.625V15.375C15.5 15.444 15.444 15.5 15.375 15.5H5.625C5.55596 15.5 5.5 15.444 5.5 15.375V5.625C5.5 5.55596 5.55596 5.5 5.625 5.5ZM4 5.625C4 4.72754 4.72754 4 5.625 4H15.375C16.2725 4 17 4.72754 17 5.625V10V15.375C17 16.2725 16.2725 17 15.375 17C15.375 17 6.52246 17 5.625 17C4.72754 17 4 16.2725 4 15.375V5.625ZM18.5 17.2812V8.28125H20V17.2812C20 18.7995 18.7704 20 17.2511 20H6.25V18.5H17.2511C17.9409 18.5 18.5 17.9721 18.5 17.2812Z"})})},67142:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(27723),s=r(13022),o=r(10790);const __=n.__,a=({logoColor:e="#069e08",showText:t=!0,className:r,height:n=32,...a})=>{const i=t?"0 0 118 32":"0 0 32 32";return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:i,className:(0,s.A)("jetpack-logo",r),"aria-labelledby":"jetpack-logo-title",height:n,...a,role:"img",children:[(0,o.jsx)("title",{id:"jetpack-logo-title",children:__("Jetpack Logo","jetpack")}),(0,o.jsx)("path",{fill:e,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z M15,19H7l8-16V19z M17,29V13h8L17,29z"}),t&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("path",{d:"M41.3,26.6c-0.5-0.7-0.9-1.4-1.3-2.1c2.3-1.4,3-2.5,3-4.6V8h-3V6h6v13.4C46,22.8,45,24.8,41.3,26.6z"}),(0,o.jsx)("path",{d:"M65,18.4c0,1.1,0.8,1.3,1.4,1.3c0.5,0,2-0.2,2.6-0.4v2.1c-0.9,0.3-2.5,0.5-3.7,0.5c-1.5,0-3.2-0.5-3.2-3.1V12H60v-2h2.1V7.1 H65V10h4v2h-4V18.4z"}),(0,o.jsx)("path",{d:"M71,10h3v1.3c1.1-0.8,1.9-1.3,3.3-1.3c2.5,0,4.5,1.8,4.5,5.6s-2.2,6.3-5.8,6.3c-0.9,0-1.3-0.1-2-0.3V28h-3V10z M76.5,12.3 c-0.8,0-1.6,0.4-2.5,1.2v5.9c0.6,0.1,0.9,0.2,1.8,0.2c2,0,3.2-1.3,3.2-3.9C79,13.4,78.1,12.3,76.5,12.3z"}),(0,o.jsx)("path",{d:"M93,22h-3v-1.5c-0.9,0.7-1.9,1.5-3.5,1.5c-1.5,0-3.1-1.1-3.1-3.2c0-2.9,2.5-3.4,4.2-3.7l2.4-0.3v-0.3c0-1.5-0.5-2.3-2-2.3 c-0.7,0-2.3,0.5-3.7,1.1L84,11c1.2-0.4,3-1,4.4-1c2.7,0,4.6,1.4,4.6,4.7L93,22z M90,16.4l-2.2,0.4c-0.7,0.1-1.4,0.5-1.4,1.6 c0,0.9,0.5,1.4,1.3,1.4s1.5-0.5,2.3-1V16.4z"}),(0,o.jsx)("path",{d:"M104.5,21.3c-1.1,0.4-2.2,0.6-3.5,0.6c-4.2,0-5.9-2.4-5.9-5.9c0-3.7,2.3-6,6.1-6c1.4,0,2.3,0.2,3.2,0.5V13 c-0.8-0.3-2-0.6-3.2-0.6c-1.7,0-3.2,0.9-3.2,3.6c0,2.9,1.5,3.8,3.3,3.8c0.9,0,1.9-0.2,3.2-0.7V21.3z"}),(0,o.jsx)("path",{d:"M110,15.2c0.2-0.3,0.2-0.8,3.8-5.2h3.7l-4.6,5.7l5,6.3h-3.7l-4.2-5.8V22h-3V6h3V15.2z"}),(0,o.jsx)("path",{d:"M58.5,21.3c-1.5,0.5-2.7,0.6-4.2,0.6c-3.6,0-5.8-1.8-5.8-6c0-3.1,1.9-5.9,5.5-5.9s4.9,2.5,4.9,4.9c0,0.8,0,1.5-0.1,2h-7.3 c0.1,2.5,1.5,2.8,3.6,2.8c1.1,0,2.2-0.3,3.4-0.7C58.5,19,58.5,21.3,58.5,21.3z M56,15c0-1.4-0.5-2.9-2-2.9c-1.4,0-2.3,1.3-2.4,2.9 C51.6,15,56,15,56,15z"})]})]})}},60442:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(29491),s=r(39029);const o=["sm","md","lg"],a=(e,t)=>{const r=Array.isArray(e)?e:[e],a=Array.isArray(t)?t:[t],[i,l,c]=o,u={sm:(0,n.useMediaQuery)(s.A[i]),md:(0,n.useMediaQuery)(s.A[l]),lg:(0,n.useMediaQuery)(s.A[c])};return r.map(((e,t)=>{const r=a[t];return r?((e,t,r)=>{const n=o.indexOf(e),s=n+1,a=t.includes("=");let i=[];return t.startsWith("<")&&(i=o.slice(0,a?s:n)),t.startsWith(">")&&(i=o.slice(a?n:s)),i?.length?i.some((e=>r[e])):r[e]})(e,r,u):u[e]}))}},11876:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(13022),s=r(13372),o=r(10790);const a=({children:e=null,width:t=null,height:r=null,className:a=""})=>(0,o.jsx)("div",{className:(0,n.A)(s.A.placeholder,a),style:{width:t,height:r},children:e})},36281:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(86221),s=r(10790);const o=({value:e="https://jetpack.com",size:t=248,bgColor:r,fgColor:o,level:a,includeMargin:i,imageSettings:l,renderAs:c="canvas"})=>{const u={value:e,size:t,bgColor:r,fgColor:o,level:a,includeMargin:i,imageSettings:l};return"svg"===c?(0,s.jsx)(n.h,{...u}):(0,s.jsx)(n.X,{...u})}},56461:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(28120),s=r.n(n),o=(r(99263),r(10790));const a=({color:e="#FFFFFF",className:t="",size:r=20})=>{const n=t+" jp-components-spinner",s={width:r,height:r,fontSize:r,borderTopColor:e},a={borderTopColor:e,borderRightColor:e};return(0,o.jsx)("div",{className:n,children:(0,o.jsx)("div",{className:"jp-components-spinner__outer",style:s,children:(0,o.jsx)("div",{className:"jp-components-spinner__inner",style:a})})})};a.propTypes={color:s().string,className:s().string,size:s().number};const i=a},50723:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>p});var n=r(51609),s=r(74116),o=r(10790);const a={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},i={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-5":"var(--jp-gray)","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},c={"--spacing-base":"8px"},u={},d=(e,t,r)=>{const n={...a,...i,...l,...c};for(const t in n)e.style.setProperty(t,n[t]);r&&e.classList.add(s.A.global),t&&(u[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:r,withGlobalStyles:s=!0})=>{const a=(0,n.useRef)(),i=u?.[r]?.provided;return(0,n.useLayoutEffect)((()=>{if(!i)return t?d(t,r,s):void(a?.current&&d(a.current,r,s))}),[t,a,i,r,s]),t?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)("div",{ref:a,children:e})}},3924:(e,t,r)=>{"use strict";function n(e,t={}){const r={};let n;if("undefined"!=typeof window&&(n=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,r.url=encodeURIComponent(e)}else r.source=encodeURIComponent(e);for(const e in t)r[e]=encodeURIComponent(t[e]);!Object.keys(r).includes("site")&&"undefined"!=typeof jetpack_redirects&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(r.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),n&&(r.calypso_env=n);return"https://jetpack.com/redirect/?"+Object.keys(r).map((e=>e+"="+r[e])).join("&")}r.d(t,{A:()=>n})},63673:(e,t,r)=>{"use strict";r.d(t,{$:()=>s,M:()=>n});const n="en",s="USD"},11452:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(38443),s=r(63673),o=r(49980),a=r(91167);const i=function(){let e,t;const r=()=>{const{l10n:{locale:t}}=(0,n.getSettings)();return(e??(t||window?.window?.navigator?.language)??s.M).split("_")[0]};return{setLocale:t=>{e=t},setGeoLocation:e=>{t=e},formatNumber:(e,{decimals:t=0,forceLatin:n=!0,numberFormatOptions:s={}}={})=>{try{return(0,a.j)({browserSafeLocale:r(),decimals:t,forceLatin:n,numberFormatOptions:s}).format(e)}catch{return String(e)}},formatNumberCompact:(e,{decimals:t=0,forceLatin:n=!0,numberFormatOptions:s={}}={})=>{try{return(0,a.c)({browserSafeLocale:r(),decimals:t,forceLatin:n,numberFormatOptions:s}).format(e)}catch{return String(e)}},formatCurrency:(e,n,{stripZeros:s=!1,isSmallestUnit:a=!1,signForPositive:i=!1,forceLatin:l=!0}={})=>(0,o.u)({number:e,currency:n,browserSafeLocale:r(),stripZeros:s,isSmallestUnit:a,signForPositive:i,geoLocation:t,forceLatin:l}),getCurrencyObject:(e,n,{stripZeros:s=!1,isSmallestUnit:a=!1,signForPositive:i=!1,forceLatin:l=!0}={})=>(0,o.v)({number:e,currency:n,browserSafeLocale:r(),stripZeros:s,isSmallestUnit:a,signForPositive:i,geoLocation:t,forceLatin:l})}}},3328:(e,t,r)=>{"use strict";r.d(t,{J:()=>l});var n=r(10067),s=r.n(n),o=r(63673);const a=s()("number-formatters:get-cached-formatter"),i=new Map;function l({locale:e,fallbackLocale:t=o.M,options:r,retries:n=1}){const s=JSON.stringify([e,r]);try{return i.get(s)??i.set(s,new Intl.NumberFormat(e,r)).get(s)}catch(s){if(a(`Intl.NumberFormat was called with a non-existent locale "${e}"; falling back to ${t}`),n)return l({locale:t,options:r,retries:n-1});throw s}}},54268:(e,t,r)=>{"use strict";r.d(t,{ZV:()=>a,qe:()=>i,vv:()=>l});const n=(0,r(11452).A)(),{setLocale:s,setGeoLocation:o,formatNumber:a,formatNumberCompact:i,formatCurrency:l,getCurrencyObject:c}=n},99054:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});const n={AED:{symbol:"د.إ.‏"},AFN:{symbol:"؋"},ALL:{symbol:"Lek"},AMD:{symbol:"֏"},ANG:{symbol:"ƒ"},AOA:{symbol:"Kz"},ARS:{symbol:"$"},AUD:{symbol:"A$"},AWG:{symbol:"ƒ"},AZN:{symbol:"₼"},BAM:{symbol:"КМ"},BBD:{symbol:"Bds$"},BDT:{symbol:"৳"},BGN:{symbol:"лв."},BHD:{symbol:"د.ب.‏"},BIF:{symbol:"FBu"},BMD:{symbol:"$"},BND:{symbol:"$"},BOB:{symbol:"Bs"},BRL:{symbol:"R$"},BSD:{symbol:"$"},BTC:{symbol:"Ƀ"},BTN:{symbol:"Nu."},BWP:{symbol:"P"},BYR:{symbol:"р."},BZD:{symbol:"BZ$"},CAD:{symbol:"C$"},CDF:{symbol:"FC"},CHF:{symbol:"CHF"},CLP:{symbol:"$"},CNY:{symbol:"¥"},COP:{symbol:"$"},CRC:{symbol:"₡"},CUC:{symbol:"CUC"},CUP:{symbol:"$MN"},CVE:{symbol:"$"},CZK:{symbol:"Kč"},DJF:{symbol:"Fdj"},DKK:{symbol:"kr."},DOP:{symbol:"RD$"},DZD:{symbol:"د.ج.‏"},EGP:{symbol:"ج.م.‏"},ERN:{symbol:"Nfk"},ETB:{symbol:"ETB"},EUR:{symbol:"€"},FJD:{symbol:"FJ$"},FKP:{symbol:"£"},GBP:{symbol:"£"},GEL:{symbol:"Lari"},GHS:{symbol:"₵"},GIP:{symbol:"£"},GMD:{symbol:"D"},GNF:{symbol:"FG"},GTQ:{symbol:"Q"},GYD:{symbol:"G$"},HKD:{symbol:"HK$"},HNL:{symbol:"L."},HRK:{symbol:"kn"},HTG:{symbol:"G"},HUF:{symbol:"Ft"},IDR:{symbol:"Rp"},ILS:{symbol:"₪"},INR:{symbol:"₹"},IQD:{symbol:"د.ع.‏"},IRR:{symbol:"﷼"},ISK:{symbol:"kr."},JMD:{symbol:"J$"},JOD:{symbol:"د.ا.‏"},JPY:{symbol:"¥"},KES:{symbol:"S"},KGS:{symbol:"сом"},KHR:{symbol:"៛"},KMF:{symbol:"CF"},KPW:{symbol:"₩"},KRW:{symbol:"₩"},KWD:{symbol:"د.ك.‏"},KYD:{symbol:"$"},KZT:{symbol:"₸"},LAK:{symbol:"₭"},LBP:{symbol:"ل.ل.‏"},LKR:{symbol:"₨"},LRD:{symbol:"L$"},LSL:{symbol:"M"},LYD:{symbol:"د.ل.‏"},MAD:{symbol:"د.م.‏"},MDL:{symbol:"lei"},MGA:{symbol:"Ar"},MKD:{symbol:"ден."},MMK:{symbol:"K"},MNT:{symbol:"₮"},MOP:{symbol:"MOP$"},MRO:{symbol:"UM"},MTL:{symbol:"₤"},MUR:{symbol:"₨"},MVR:{symbol:"MVR"},MWK:{symbol:"MK"},MXN:{symbol:"MX$"},MYR:{symbol:"RM"},MZN:{symbol:"MT"},NAD:{symbol:"N$"},NGN:{symbol:"₦"},NIO:{symbol:"C$"},NOK:{symbol:"kr"},NPR:{symbol:"₨"},NZD:{symbol:"NZ$"},OMR:{symbol:"﷼"},PAB:{symbol:"B/."},PEN:{symbol:"S/."},PGK:{symbol:"K"},PHP:{symbol:"₱"},PKR:{symbol:"₨"},PLN:{symbol:"zł"},PYG:{symbol:"₲"},QAR:{symbol:"﷼"},RON:{symbol:"lei"},RSD:{symbol:"Дин."},RUB:{symbol:"₽"},RWF:{symbol:"RWF"},SAR:{symbol:"﷼"},SBD:{symbol:"S$"},SCR:{symbol:"₨"},SDD:{symbol:"LSd"},SDG:{symbol:"£‏"},SEK:{symbol:"kr"},SGD:{symbol:"S$"},SHP:{symbol:"£"},SLL:{symbol:"Le"},SOS:{symbol:"S"},SRD:{symbol:"$"},STD:{symbol:"Db"},SVC:{symbol:"₡"},SYP:{symbol:"£"},SZL:{symbol:"E"},THB:{symbol:"฿"},TJS:{symbol:"TJS"},TMT:{symbol:"m"},TND:{symbol:"د.ت.‏"},TOP:{symbol:"T$"},TRY:{symbol:"TL"},TTD:{symbol:"TT$"},TVD:{symbol:"$T"},TWD:{symbol:"NT$"},TZS:{symbol:"TSh"},UAH:{symbol:"₴"},UGX:{symbol:"USh"},USD:{},UYU:{symbol:"$U"},UZS:{symbol:"сўм"},VEB:{symbol:"Bs."},VEF:{symbol:"Bs. F."},VND:{symbol:"₫"},VUV:{symbol:"VT"},WST:{symbol:"WS$"},XAF:{symbol:"F"},XCD:{symbol:"$"},XOF:{symbol:"F"},XPF:{symbol:"F"},YER:{symbol:"﷼"},ZAR:{symbol:"R"},ZMW:{symbol:"ZK"},WON:{symbol:"₩"}}},49980:(e,t,r)=>{"use strict";r.d(t,{u:()=>g,v:()=>f});var n=r(10067),s=r.n(n),o=r(63673),a=r(3328),i=r(99054);const l=s()("number-formatters:number-format-currency");function c(e,t){return"USD"===e&&t&&""!==t&&"US"!==t?{symbol:"US$"}:i.a[e]}function u(e,t){return c(e,t)?e:(l(`getValidCurrency was called with a non-existent currency "${e}"; falling back to ${o.$}`),o.$)}function d({number:e,currency:t,browserSafeLocale:r,forceLatin:n=!0,stripZeros:s,signForPositive:o}){const i=`${r}${n?"-u-nu-latn":""}`,l={style:"currency",currency:t,...s&&Number.isInteger(e)&&{maximumFractionDigits:0,minimumFractionDigits:0},...o&&{signDisplay:"exceptZero"}};return(0,a.J)({locale:i,options:l})}function p(e,t,r){return d({number:0,currency:t,browserSafeLocale:e,forceLatin:r}).resolvedOptions().maximumFractionDigits}function h(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}function m(e,t,r){if(isNaN(e))return l("formatCurrency was called with NaN"),0;if(r){Number.isInteger(e)||l("formatCurrency was called with isSmallestUnit and a float which will be rounded",e);const r=10**t;return h(Math.round(e)/r,t)}return h(e,t)}const g=({number:e,browserSafeLocale:t,currency:r,stripZeros:n,isSmallestUnit:s,signForPositive:o,geoLocation:a,forceLatin:i})=>{const l=u(r,a),h=c(l,a),g=p(t,l,i);if(s&&void 0===g)throw new Error(`Could not determine currency precision for ${l} in ${t}`);const f=m(e,g??0,s);return d({number:f,currency:l,browserSafeLocale:t,forceLatin:i,stripZeros:n,signForPositive:o}).formatToParts(f).reduce(((e,t)=>"currency"===t.type&&h?.symbol?e+h.symbol:e+t.value),"")},f=({number:e,browserSafeLocale:t,currency:r,stripZeros:n,isSmallestUnit:s,signForPositive:o,geoLocation:a,forceLatin:i})=>{const l=u(r,a),h=c(l,a),g=m(e,p(t,l,i)??0,s),f=d({number:g,currency:l,browserSafeLocale:t,forceLatin:i,stripZeros:n,signForPositive:o}).formatToParts(g);let b="",v="$",k="before",y=!1,x=!1,j="",w="";f.forEach((e=>{switch(e.type){case"currency":return v=h?.symbol??e.value,void(y&&(k="after"));case"group":case"integer":return j+=e.value,void(y=!0);case"decimal":case"fraction":return w+=e.value,y=!0,void(x=!0);case"minusSign":return void(b="-");case"plusSign":b="+"}}));const _=!Number.isInteger(g)&&x;return{sign:b,symbol:v,symbolPosition:k,integer:j,fraction:w,hasNonZeroFraction:_}}},91167:(e,t,r)=>{"use strict";r.d(t,{c:()=>o,j:()=>s});var n=r(3328);const s=({browserSafeLocale:e,decimals:t=0,forceLatin:r=!0,numberFormatOptions:s={}})=>{const o=`${e}${r?"-u-nu-latn":""}`,a={minimumFractionDigits:t,maximumFractionDigits:t,...s};return(0,n.J)({locale:o,options:a})},o=({numberFormatOptions:e={},...t})=>s({...t,numberFormatOptions:{notation:"compact",maximumFractionDigits:1,...e}})},85985:(e,t,r)=>{"use strict";r.d(t,{$i:()=>s.A,BT:()=>c.A,Bd:()=>m.Bd,CP:()=>v.C,Cq:()=>f.C,Dk:()=>u.Dk,FB:()=>i.A,Ft:()=>b.F,GE:()=>o.A,GT:()=>u.GT,Ti:()=>m.Ti,VA:()=>n.V,W4:()=>u.W4,ZR:()=>h.A,_6:()=>k.A,_X:()=>m._X,aq:()=>u.aq,ds:()=>m.ds,gB:()=>d.A,lk:()=>a.l,pP:()=>a.p,q7:()=>g.A,sH:()=>u.sH,sh:()=>f.s,st:()=>p.A,tu:()=>u.tu,vp:()=>l.A,xI:()=>v.x});var n=r(52810),s=r(34972),o=r(54815),a=(r(41409),r(62634)),i=r(60703),l=r(82034),c=r(65595),u=r(53265),d=r(49354),p=r(73489),h=r(47119),m=r(20710),g=(r(58406),r(76923)),f=r(30335),b=r(88290),v=r(9061),k=r(25929);r(5765)},5765:(e,t,r)=>{"use strict";r(98490)},52810:(e,t,r)=>{"use strict";r.d(t,{V:()=>a});var n=r(38377),s=r(97999);const o=n.T["Jetpack Green 40"];function a(){return(0,s.isWpcomPlatformSite)()?null:o}},82201:(e,t,r)=>{"use strict";r.d(t,{cb:()=>s.c,jt:()=>n.A,k4:()=>o.k});var n=r(15877),s=r(30984),o=r(82308)},15877:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(67142),s=r(10790);const o=()=>(0,s.jsx)(n.A,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1})},30984:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(56427),s=r(27723),o=r(13022),a=r(10790);const __=s.__,i=({className:e,description:t,align:r=null,title:s=null,buttonText:i=null,visible:l=!0,context:c=null,checkoutUrl:u=null,goToCheckoutPage:d=null,isRedirecting:p=!1,showButton:h=!0,target:m="_top"})=>{const g=(0,o.A)(e,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===c,"block-editor-block-list__block":"editor-canvas"===c,"jetpack-upgrade-plan__hidden":!l}),f=__("Redirecting…","jetpack");return(0,a.jsx)("div",{className:g,"data-align":r,children:(0,a.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[s&&(0,a.jsx)("strong",{className:(0,o.A)("banner-title",{[`${e}__title`]:e}),children:s}),t&&(0,a.jsx)("span",{className:`${e}__description banner-description`,children:t}),h&&(0,a.jsx)(n.Button,{href:p?null:u,onClick:d,target:m,className:(0,o.A)("is-primary",{"jetpack-upgrade-plan__hidden":!u}),isBusy:p,children:p?f:i})]})})}},82308:(e,t,r)=>{"use strict";r.d(t,{k:()=>i});var n=r(56427),s=r(47143),o=r(51609),a=r(10790);const i=(0,o.forwardRef)((({supportLink:e,supportPostId:t,children:r,onClick:o,style:i},l)=>{const c=(0,s.useDispatch)("automattic/help-center"),u=c?.setShowSupportDoc;return u?(0,a.jsx)("a",{href:e,onClick:r=>{r.preventDefault(),o?.(),u(e,t)},style:i,ref:l,children:r}):(0,a.jsx)(n.ExternalLink,{href:e,onClick:o,style:i,ref:l,children:r})}))},30335:(e,t,r)=>{"use strict";r.d(t,{C:()=>a,s:()=>o});var n=r(86087),s=r(19334);function o(e){const t={};let r="span",s=e.icon;const o=document.createElement("div");o.innerHTML=e.icon;const a=o.querySelector("svg");return a&&(r="svg",s=a.innerHTML,Array.from(a.attributes).forEach((({nodeName:e,nodeValue:r})=>t[e]=r))),(0,n.createElement)(r,{...t,dangerouslySetInnerHTML:{__html:s||""}})}function a(e){return{src:o(e),foreground:(0,s.A)()}}},19334:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(97999);const s="#069e08";function o(){return(0,n.isWpcomPlatformSite)()?null:s}},34972:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});const n="Jetpack_Editor_Initial_State";function s(){return"object"==typeof window?window?.[n]??null:null}},60703:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(34972);function s(e){const t=(0,n.A)(),r=t?.available_blocks?.[e]?.available??!1,s=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:r,...!r&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:s}}}},54815:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(97999);function s(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:(0,n.getScriptData)()?.site?.suffix??null}},73489:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(90372),s=r(39384),o=r(86087);const{tracks:a}=n.A,{recordEvent:i}=a,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:r="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,o.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:h={}}=(0,s.useConnection)(),{wpcomUser:{login:m,ID:g}={},blogId:f}=h.currentUser||{},b=(0,o.useCallback)((async(e,t={})=>{d&&g&&m&&i(e,t)}),[d,g,m]);return(0,o.useEffect)((()=>{d&&g&&m&&f&&n.A.initialize(g,m,{blog_id:f})}),[f,g,m,d]),(0,o.useEffect)((()=>{const n=e?`${t}_${e}_${r}`:null;p&&n&&(c||(b(n,l),u(!0)))}),[c,t,e,r,p,l,b]),{recordEvent:b,tracks:a}}},47119:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(47143),s=r(86087);const o=()=>{};function a(e=null,t=o){const[r,a]=(0,s.useState)(!1),{isAutosaveablePost:i,isDirtyPost:l,currentPost:c}=(0,n.useSelect)((e=>{const t=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}}),[]),u=Object.keys(c).length>0,d=(0,n.useSelect)((e=>!!window.wp?.customize||!!e("core/edit-widgets"))),p=(0,n.dispatch)("core/editor").savePost,h=(0,n.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),m=async e=>{e.preventDefault(),u?l&&i&&await p(e):await(async()=>{for(let e=0;e{n.preventDefault(),r||(a(!0),m(n).then((()=>{e&&function(e,t,r=!1){t&&t(e),r?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)})))},isRedirecting:r}}},76923:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(47143),s=r(86087),o=r(88290);const a=e=>{const{isModuleActive:t,isChangingStatus:r,isLoadingModules:a}=(0,n.useSelect)((t=>{const r=t(o.F);return{isModuleActive:r.isModuleActive(e),isChangingStatus:r.isModuleUpdating(e),isLoadingModules:r.areModulesLoading(e)}}),[e]),{updateJetpackModuleStatus:i}=(0,n.useDispatch)(o.F),l=(0,s.useCallback)((t=>i({name:e,active:t})),[e,i]);return(0,s.useMemo)((()=>({isLoadingModules:a,isChangingStatus:r,isModuleActive:t,changeStatus:l})),[a,r,t,l])}},20710:(e,t,r)=>{"use strict";r.d(t,{Bd:()=>a,Ti:()=>o,_X:()=>n,ds:()=>s});const n="free",s="tiered",o="unlimited",a=e=>e?0===e?.value?n:1===e?.value?o:s:null},58406:(e,t,r)=>{"use strict";r(86087)},25929:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(47143),s=r(52619),o=r(53265),a=r(47119);const i=()=>{},l="a8c.wpcom-block-editor.openCheckoutModal";function c(e,t=i){const{checkoutUrl:r,planData:c}=(0,n.useSelect)((t=>{const r=t("core/editor"),n=t("wordpress-com/plans"),{id:s,type:a}=r.getCurrentPost(),i=n&&n.getPlan(e);return{checkoutUrl:(0,o.Q4)({plan:i,planSlug:e,postId:s,postType:a}),planData:i}}),[e]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,a.A)(r,t);return[r,async e=>{if(e.preventDefault(),(0,s.hasAction)(l))return e.preventDefault(),u(e),void(0,s.doAction)(l,{products:[c]});d(e)},p,c]}},62410:(e,t,r)=>{"use strict";r.d(t,{KZ:()=>m,M4:()=>d,QB:()=>p,T3:()=>u,ik:()=>f,k7:()=>h,oW:()=>b,ud:()=>g,ux:()=>c});var n=r(38377),s=r(56427),o=r(13022),a=r(52810),i=r(10790);const l=n.T["Jetpack Green 40"],c=({size:e=24,border:t=0,className:r,color:n=l})=>{const a=t?-t/e*32:0;return(0,i.jsxs)(s.SVG,{className:(0,o.A)("jetpack-logo",r),width:e,height:e,viewBox:`${a} ${a} ${32-2*a} ${32-2*a}`,children:[(0,i.jsx)(s.Path,{className:"jetpack-logo__icon-circle",fill:n,stroke:t?"#fff":"transparent",strokeWidth:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,i.jsx)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*a},19 15,${3-a}`}),(0,i.jsx)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+a} 17,13 ${25+.5*a},13`})]})},u={foreground:(0,a.V)(),src:(0,i.jsx)(s.SVG,{viewBox:"0 0 100 100",children:(0,i.jsx)(s.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"})})},d={foreground:(0,a.V)(),src:(0,i.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve",children:(0,i.jsx)(s.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"})})},p={foreground:(0,a.V)(),src:(0,i.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve",children:(0,i.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 31.908c0 1.376.893 2.268 2.27 2.268h6.63c3.956 0 7.192-1.337 9.392-3.68H12v1.412zM20.901 9H14.27C12.893 9 12 9.893 12 11.269v1.411h18.294C28.093 10.338 24.857 9 20.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H33.4a13.644 13.644 0 0 0-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H12v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H12v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zm41.151 3.199"})})},h=((0,a.V)(),s.SVG,s.Rect,s.G,s.Path,(0,a.V)(),s.SVG,s.Rect,s.G,s.Path,(0,a.V)(),s.SVG,s.Rect,s.G,s.Path,(0,a.V)(),s.SVG,s.Rect,s.G,s.Path,(0,a.V)(),s.Path,(0,a.V)(),s.Path,(0,a.V)(),(0,a.V)(),s.SVG,s.Rect,s.G,s.Path,s.Path,s.Path,s.SVG,s.Path,s.SVG,s.Path,s.SVG,s.Path,(0,i.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,i.jsx)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,i.jsx)(s.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"})]})),m=(0,i.jsx)(s.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79037 0.59375C4.0363 0.59375 5.13102 1.41658 5.47215 2.60947L8.8452 14.4044C8.8486 14.4164 8.85411 14.4273 8.86124 14.4368L12.8572 0.59375H15.0927H21.2721C25.6033 0.59375 28.5066 3.39892 28.5066 7.64565C28.5066 11.9411 25.5272 14.6196 21.0818 14.6196H18.1499H14.3719L13.6379 16.8813C12.9796 18.9095 11.0827 20.2839 8.94152 20.2839C6.80035 20.2839 4.90341 18.9095 4.24517 16.8813L0.137069 4.22276C-0.444671 2.43022 0.898038 0.59375 2.79037 0.59375ZM15.7374 10.4119H20.0156C21.8718 10.4119 22.9856 9.35018 22.9856 7.64565C22.9856 5.93137 21.8718 4.91839 20.0156 4.91839H17.5202L15.7374 10.4119Z",fill:"#000000"})}),g=(0,i.jsx)(s.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{d:"M4.75725 2.075C4.60279 1.97745 4.41041 1.97489 4.25365 2.06832C4.09689 2.16174 4 2.3367 4 2.52632V21.4737C4 21.6633 4.09689 21.8383 4.25365 21.9317C4.41041 22.0251 4.60279 22.0226 4.75725 21.925L19.7573 12.4513C19.9079 12.3562 20 12.1849 20 12C20 11.8151 19.9079 11.6438 19.7573 11.5487L4.75725 2.075Z",fill:"white"})}),f=(s.SVG,s.Path,s.SVG,s.Path,s.Path,s.SVG,s.Path,s.SVG,s.Path,(0,i.jsx)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})})),b=(0,i.jsx)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.G,{children:(0,i.jsx)(s.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})})},49354:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(34972);function s(){return!(!(0,n.A)()?.jetpack?.is_current_user_connected&&!window?.JP_CONNECTION_INITIAL_STATE?.connectionStatus?.isUserConnected)}},9520:(e,t,r)=>{"use strict";r.d(t,{C:()=>d,x:()=>u});var n=r(97999),s=r(10067),o=r.n(s);const a=window?.JP_CONNECTION_INITIAL_STATE,i=o()("shared-extension-utils:connection");let l=!1;const c=e=>{l||(i(e),l=!0)};function u(){return(0,n.isSimpleSite)()?(c("Simple site connected ✅"),!0):(0,n.isWoASite)()?(c("Atomic site connected ✅"),!0):a?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function d(){if((0,n.isSimpleSite)())return!0;return!1==!(a?.userConnectionData?.currentUser?.permissions??{}).manage_options}},9061:(e,t,r)=>{"use strict";r.d(t,{C:()=>n.C,x:()=>n.x});var n=r(9520)},27105:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>d,E9:()=>u,F6:()=>l});var n=r(97999),s=r(47143),o=r(94478),a=r(88290);const i="SET_JETPACK_MODULES";function l(e){return u({isLoading:e})}function c(e,t){return{type:"SET_MODULE_UPDATING",name:e,isUpdating:t}}function u(e){return{type:i,options:e}}const d={updateJetpackModuleStatus:function*(e){try{yield c(e.name,!0),yield(0,o.sB)(e);const t=yield(0,o.wz)();return yield u({data:t}),!0}catch{const e=(0,s.select)(a.F).getJetpackModules();return yield u(e),!1}finally{yield c(e.name,!1)}},setJetpackModules:u,fetchModules:function*(){if((0,n.isSimpleSite)())return!0;try{yield l(!0);const e=yield(0,o.wz)();return yield u({data:e}),!0}catch{const e=(0,s.select)(a.F).getJetpackModules();return yield u(e),!1}finally{yield l(!1)}}}},94478:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>c,sB:()=>l,wz:()=>i});var n=r(1455),s=r.n(n);const o="FETCH_JETPACK_MODULES",a="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:o}),l=e=>({type:a,settings:e}),c={[o]:function(){return s()({path:"/jetpack/v4/module/all",method:"GET"})},[a]:function({settings:e}){return s()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},88290:(e,t,r)=>{"use strict";r.d(t,{F:()=>c});var n=r(47143),s=r(27105),o=r(94478),a=r(38862),i=r(62701),l=r(31640);const c="jetpack-modules",u=(0,n.createReduxStore)(c,{reducer:a.A,actions:s.Ay,controls:o.Ay,resolvers:i.A,selectors:l.A});(0,n.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,n.dispatch)(c).setJetpackModules({data:{...d}})},38862:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});const n={isLoading:!1,isUpdating:{},data:{}},s=(e=n,t)=>{switch(t.type){case"SET_JETPACK_MODULES":return{...e,...t.options};case"SET_MODULE_UPDATING":return{...e,isUpdating:{...e.isUpdating,[t.name]:t.isUpdating}}}return e}},62701:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(27105),s=r(94478);const o={getJetpackModules:function*(){try{yield(0,n.F6)(!0);const e=yield(0,s.wz)();if(e)return(0,n.E9)({data:e})}catch(e){console.error(e)}finally{yield(0,n.F6)(!1)}}}},31640:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(97999);const s={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,n.isSimpleSite)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},53265:(e,t,r)=>{"use strict";r.d(t,{Dk:()=>m,GT:()=>f,Q4:()=>c,W4:()=>u,aq:()=>d,sH:()=>g,tu:()=>p});var n=r(97999),s=r(27723),o=r(93832),a=r(34972),i=r(60703),l=r(54815);const __=s.__;function c({planSlug:e,plan:t,postId:r,postType:s}){const a=e.startsWith("jetpack_")?e:t?.path_slug,i=(void 0===s?()=>{const e=new URLSearchParams(window.location.search);return(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(s)?"":"edit";return(0,n.isSimpleSite)()?(0,o.addQueryArgs)("/"+[e,s,(0,l.A)(),r].filter(Boolean).join("/"),{plan_upgraded:1}):(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:r,plan_upgraded:1})})();return(0,n.isWoASite)()?(0,o.addQueryArgs)(`https://wordpress.com/plans/${(0,l.A)()}`,{redirect_to:i,customerType:"business"}):a&&(0,o.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.A)()}/${a}`,{redirect_to:i})}function u(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:r,unavailableReason:n}=(0,i.A)(t);return!r&&"missing_plan"===n}function d(e,t){return"missing_plan"===e&&t.required_plan}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:r,unavailableReason:n}=(0,i.A)(t);return d(n,r)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function m(){return(0,a.A)()?.jetpack?.enable_upgrade_nudge??!1}const g=e=>h.some((t=>t.name===e)),f=e=>h.filter((({name:t})=>t===e))[0]},82034:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(92279),s=r(60703);function o(e,t){const{available:r,unavailableReason:o}=(0,s.A)(e);return!!r&&(0,n.registerPlugin)(`jetpack-${e}`,t)}},41409:(e,t,r)=>{"use strict";r(97999)},62634:(e,t,r)=>{"use strict";r.d(t,{l:()=>o,p:()=>s});var n=r(34972);function s(){const e=(0,n.A)();return e?.jetpack?.is_private_site??!1}function o(){const e=(0,n.A)();return e?.jetpack?.is_coming_soon??!1}},26047:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(1455),s=r.n(n),o=r(41325);const a={setPlans:e=>({type:o.PC,plans:e}),fetchFromAPI:e=>({type:o.iH,url:e}),storeAiAssistantFeature:e=>({type:o.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:o.ql});try{const t=await s()({path:o.J8});e(a.storeAiAssistantFeature(function(e){return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"],costs:e.costs,featuresControl:e["features-control"],chromeAiTokens:e["chrome-ai-tokens"]}}(t)))}catch(e){console.error(e)}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:o.Lg,count:e}),t(a.decreaseAsyncRequestCountdownValue())},decreaseAsyncRequestCountdownValue:()=>async({dispatch:e,select:t})=>{e({type:o.yO});t.getAsyncRequestCountdownValue()<=0&&e(a.enqueueAiAssistantFeatureAsyncRequest())},enqueueAiAssistantFeatureAsyncRequest:()=>({dispatch:e})=>{e.dequeueAiAssistantFeatureAsyncRequest();const t=setTimeout((()=>{e(a.fetchAiAssistantFeature())}),o.gW);e({type:o.jM,timerId:t})},dequeueAiAssistantFeatureAsyncRequest:()=>({dispatch:e,select:t})=>{e({type:o.js,timerId:0});const r=t.getAsyncRequestCountdownTimerId();r&&window?.clearTimeout(r)},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:o.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:o.c1,tierPlansEnabled:e})},i=a},41325:(e,t,r)=>{"use strict";r.d(t,{GB:()=>d,J8:()=>u,Kt:()=>l,Lg:()=>i,PC:()=>n,UU:()=>o,c1:()=>c,gW:()=>m,iH:()=>s,jM:()=>f,js:()=>b,mx:()=>h,nb:()=>p,ql:()=>a,yO:()=>g});const n="SET_PLANS",s="FETCH_FROM_API",o="STORE_AI_ASSISTANT_FEATURE",a="REQUEST_AI_ASSISTANT_FEATURE",i="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",l="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",c="SET_TIER_PLANS_ENABLED",u="/wpcom/v2/jetpack-ai/ai-assistant-feature",d=20,p=3e3,h=3,m=5e3,g="DECREASE_NEW_ASYNC_REQUEST_COUNTDOWN",f="ENQUEUE_ASYNC_COUNTDOWN_REQUEST",b="DEQUEUE_ASYNC_COUNTDOWN_REQUEST"},74960:(e,t,r)=>{"use strict";var n=r(47143),s=r(26047),o=r(17740);const a={getPlan:(e,t)=>e.plans.find((e=>e.product_slug===t)),getAiAssistantFeature(e){const t={...e.features.aiAssistant};return delete t._meta,t},getIsRequestingAiAssistantFeature:e=>e.features.aiAssistant?._meta?.isRequesting,getAsyncRequestCountdownValue:e=>e.features.aiAssistant?._meta?.asyncRequestCountdown,getAsyncRequestCountdownTimerId:e=>e.features.aiAssistant?._meta?.asyncRequestTimerId},i=(0,n.createReduxStore)("wordpress-com/plans",{actions:s.A,reducer:o.A,selectors:a,controls:{FETCH_FROM_API:({url:e})=>fetch(e).then((e=>e.json()))},resolvers:{*getPlan(){const e=yield s.A.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return s.A.setPlans(e)},getAiAssistantFeature:e=>{if(!e?.features?.aiAssistant)return s.A.fetchAiAssistantFeature()}}});(0,n.register)(i)},17740:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(41325);const s={plans:[],features:{aiAssistant:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:n.GB,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:n.mx,asyncRequestTimerId:0}}}};function o(e=s,t){switch(t.type){case n.PC:return{...e,plans:t.plans};case n.ql:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,isRequesting:!0,asyncRequestCountdown:n.mx,asyncRequestTimerId:0}}}};case n.UU:return{...e,features:{...e.features,aiAssistant:{...t.feature,_meta:{...e.features.aiAssistant._meta,isRequesting:!1}}}};case n.Lg:{const r=e.features.aiAssistant.usagePeriod||{requestsCount:0},s=e.features.aiAssistant.requestsCount+t.count;r.requestsCount+=t.count;const o=e.features.aiAssistant.currentTier?.value,a=void 0===o&&!e.features.aiAssistant.hasFeature||0===o,i=void 0===o&&e.features.aiAssistant.hasFeature||1===o;let l=e.features.aiAssistant.currentTier?.limit;i?l=n.nb:a&&(l=e.features.aiAssistant.requestsLimit);const c=(a?s:e.features.aiAssistant.usagePeriod?.requestsCount)>=l,u=c&&null!==e.features.aiAssistant.nextTier;return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,isOverLimit:c,requestsCount:s,requireUpgrade:u,usagePeriod:{...r}}}}}case n.yO:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,asyncRequestCountdown:e.features.aiAssistant._meta.asyncRequestCountdown-1}}}};case n.jM:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,asyncRequestTimerId:t.timerId}}}};case n.Kt:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case n.c1:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,tierPlansEnabled:t.tierPlansEnabled}}}}return e}},65595:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(29491),s=r(10790);const o=e=>(0,n.createHigherOrderComponent)((t=>r=>(0,s.jsx)(t,{...r,className:r.name===e?"has-warning is-interactive":r.className})),"withHasWarningIsInteractiveClassNames")},84705:(e,t,r)=>{"use strict";r.d(t,{d6:()=>n.d});var n=r(58992);r(91135)},91135:(e,t,r)=>{"use strict";r.d(t,{$:()=>s});var n=r(10790);const s=[{name:"amazon",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M13.582 8.182c-1.648.185-3.802.308-5.344.984-1.781.769-3.03 2.337-3.03 4.644 0 2.953 1.86 4.429 4.253 4.429 2.02 0 3.125-.477 4.685-2.065.516.747.685 1.109 1.629 1.894a.59.59 0 0 0 .672-.066l.006.006c.567-.505 1.599-1.401 2.18-1.888.231-.188.19-.496.009-.754-.52-.718-1.072-1.303-1.072-2.634V8.305c0-1.876.133-3.599-1.249-4.891C15.23 2.369 13.422 2 12.04 2 9.336 2 6.318 3.01 5.686 6.351c-.068.355.191.542.423.594l2.754.298c.258-.013.445-.266.494-.523.236-1.151 1.2-1.706 2.284-1.706.584 0 1.249.215 1.595.738.398.584.346 1.384.346 2.061zm-.533 5.906c-.451.8-1.169 1.291-1.967 1.291-1.09 0-1.728-.83-1.728-2.061 0-2.42 2.171-2.86 4.227-2.86v.615c.001 1.108.027 2.031-.532 3.015m7.634 5.251C18.329 21.076 14.917 22 11.979 22c-4.118 0-7.826-1.522-10.632-4.057-.22-.199-.024-.471.241-.317 3.027 1.762 6.771 2.823 10.639 2.823 2.608 0 5.476-.541 8.115-1.66.397-.169.73.262.341.55m.653 1.704c-.194.163-.379.076-.293-.139.284-.71.92-2.298.619-2.684s-1.99-.183-2.749-.092c-.23.027-.266-.173-.059-.319 1.348-.946 3.555-.673 3.811-.356.26.32-.066 2.533-1.329 3.59"})})})},{name:"behance",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M7.799 5.698c.589 0 1.12.051 1.606.156q.722.155 1.241.507.516.351.804.938c.188.387.281.871.281 1.443q0 .93-.421 1.551-.424.62-1.255 1.014 1.133.328 1.689 1.146.559.822.557 1.975 0 .935-.359 1.612a3.14 3.14 0 0 1-.973 1.114q-.613.432-1.399.637A6.1 6.1 0 0 1 7.963 18H2V5.698zm-.35 4.97q.721 0 1.192-.345.465-.344.463-1.119 0-.43-.152-.707a1.1 1.1 0 0 0-.416-.427 1.7 1.7 0 0 0-.596-.216 3.6 3.6 0 0 0-.697-.06H4.709v2.874zm.151 5.237q.401.001.759-.077c.243-.053.457-.137.637-.261.182-.12.332-.283.441-.491q.164-.31.163-.798-.002-.948-.533-1.357c-.356-.27-.83-.404-1.413-.404H4.709v3.388zm8.562-.041q.552.538 1.583.538.74 0 1.277-.374c.354-.248.571-.514.654-.79h2.155c-.347 1.072-.872 1.838-1.589 2.299-.708.463-1.572.693-2.58.693q-1.05 0-1.899-.337a4 4 0 0 1-1.439-.958 4.4 4.4 0 0 1-.904-1.484 5.4 5.4 0 0 1-.32-1.899q0-1 .329-1.863a4.4 4.4 0 0 1 .933-1.492q.607-.63 1.444-.994a4.6 4.6 0 0 1 1.857-.363q1.131-.001 1.98.44a3.94 3.94 0 0 1 1.389 1.181 4.8 4.8 0 0 1 .783 1.69q.24.947.171 1.983h-6.428c-.001.706.237 1.372.604 1.73m2.811-4.68c-.291-.321-.783-.496-1.384-.496q-.585 0-.973.2a2 2 0 0 0-.621.491 1.8 1.8 0 0 0-.328.628 2.7 2.7 0 0 0-.111.587h3.98c-.058-.625-.271-1.085-.563-1.41m-3.916-3.446h4.985V6.524h-4.985z"})})})},{name:"blogger-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19.779 9.904h-.981l-.021.001a1.163 1.163 0 0 1-1.16-1.079l-.001-.013A5.813 5.813 0 0 0 11.803 3H8.871a5.813 5.813 0 0 0-5.813 5.813v6.375a5.813 5.813 0 0 0 5.813 5.813h6.257a5.814 5.814 0 0 0 5.813-5.813l.002-4.121a1.164 1.164 0 0 0-1.164-1.163M8.726 7.713h3.291a1.117 1.117 0 1 1 0 2.234H8.726a1.117 1.117 0 1 1 0-2.234m6.601 8.657H8.72a1.057 1.057 0 1 1 0-2.114h6.607a1.057 1.057 0 1 1 0 2.114"})})})},{name:"blogger",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M14.722 14.019a.654.654 0 0 1-.654.654H9.977a.654.654 0 0 1 0-1.308h4.091c.361 0 .654.293.654.654m-4.741-3.321h2.038a.692.692 0 0 0 0-1.384H9.981a.692.692 0 0 0 0 1.384M21 5v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-3.456 6.39a.72.72 0 0 0-.72-.72h-.607l-.013.001a.72.72 0 0 1-.718-.668l-.001-.008a3.6 3.6 0 0 0-3.599-3.599H10.07a3.6 3.6 0 0 0-3.599 3.599v3.947a3.6 3.6 0 0 0 3.599 3.599h3.874a3.6 3.6 0 0 0 3.599-3.599z"})})})},{name:"bluesky",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M21.2 3.3c-.5-.2-1.4-.5-3.6 1C15.4 6 12.9 9.2 12 11c-.9-1.8-3.4-5-5.7-6.7-2.2-1.6-3-1.3-3.6-1S2 4.6 2 5.1s.3 4.7.5 5.4c.7 2.3 3.1 3.1 5.3 2.8-3.3.5-6.2 1.7-2.4 5.9 4.2 4.3 5.7-.9 6.5-3.6.8 2.7 1.7 7.7 6.4 3.6 3.6-3.6 1-5.4-2.3-5.9 2.2.2 4.6-.5 5.3-2.8.4-.7.7-4.8.7-5.4 0-.5-.1-1.5-.8-1.8"})})})},{name:"codepen",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"m22.016 8.84-.007-.037q-.006-.037-.015-.072-.007-.022-.013-.042l-.023-.062-.02-.042a.4.4 0 0 0-.03-.057l-.025-.038-.035-.052-.03-.037q-.021-.026-.043-.045-.015-.018-.035-.035a.4.4 0 0 0-.048-.04l-.037-.03-.015-.012-9.161-6.096a.86.86 0 0 0-.955 0L2.359 8.237l-.015.012-.038.028-.048.04a.638.638 0 0 0-.078.082q-.018.018-.03.037-.018.026-.035.052l-.025.038q-.016.031-.03.059l-.02.041a1 1 0 0 0-.034.106q-.01.034-.016.071-.003.02-.006.037a1 1 0 0 0-.009.114v6.093q0 .056.008.112l.007.038q.006.035.015.072a.2.2 0 0 0 .013.04q.01.032.022.063l.02.04a.4.4 0 0 0 .055.096l.035.052.03.037.042.045.035.035q.023.02.048.04l.038.03.013.01 9.163 6.095a.858.858 0 0 0 .959.004l9.163-6.095.015-.01q.02-.015.037-.03l.048-.04q.02-.017.035-.035.025-.024.043-.045l.03-.037.035-.052.025-.038a.4.4 0 0 0 .03-.058l.02-.04.023-.063c.003-.013.01-.027.013-.04q.009-.037.015-.072l.007-.037q.006-.062.007-.117V8.954a1 1 0 0 0-.008-.114m-9.154-4.376 6.751 4.49-3.016 2.013-3.735-2.492zm-1.724 0v4.009l-3.735 2.494-3.014-2.013zm-7.439 6.098L5.853 12l-2.155 1.438zm7.439 8.974-6.749-4.491 3.015-2.011 3.735 2.492zM12 14.035 8.953 12 12 9.966 15.047 12zm.862 5.501v-4.009l3.735-2.492 3.016 2.011zm7.441-6.098L18.147 12l2.156-1.438z"})})})},{name:"deezer",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M20.129 3.662c.222-1.287.548-2.096.909-2.098h.001c.673.002 1.219 2.809 1.219 6.274s-.546 6.274-1.22 6.274c-.276 0-.531-.477-.736-1.276-.324 2.926-.997 4.937-1.776 4.937-.603 0-1.144-1.208-1.507-3.114-.248 3.624-.872 6.195-1.602 6.195-.458 0-.875-1.019-1.184-2.678C13.861 21.6 13.003 24 12.002 24s-1.861-2.399-2.231-5.824c-.307 1.659-.724 2.678-1.184 2.678-.73 0-1.352-2.571-1.602-6.195-.363 1.905-.903 3.114-1.507 3.114-.778 0-1.452-2.011-1.776-4.937-.204.802-.46 1.276-.736 1.276-.674 0-1.22-2.809-1.22-6.274s.546-6.274 1.22-6.274c.362 0 .685.812.91 2.098.357-2.22.94-3.662 1.6-3.662.784 0 1.463 2.04 1.784 5.002.314-2.156.791-3.53 1.325-3.53.749 0 1.385 2.703 1.621 6.474.443-1.933 1.085-3.146 1.795-3.146s1.352 1.214 1.795 3.146c.237-3.771.872-6.474 1.621-6.474.533 0 1.009 1.374 1.325 3.53.321-2.962 1-5.002 1.784-5.002.658 0 1.244 1.443 1.603 3.662M0 7.221c0-1.549.31-2.805.692-2.805s.692 1.256.692 2.805-.31 2.805-.692 2.805S0 8.77 0 7.221m22.616 0c0-1.549.31-2.805.692-2.805S24 5.672 24 7.221s-.31 2.805-.692 2.805-.692-1.256-.692-2.805"})})})},{name:"discord",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M20.33 4.523A20 20 0 0 0 15.379 3a14 14 0 0 0-.634 1.289 18.4 18.4 0 0 0-5.495 0A14 14 0 0 0 8.615 3 20 20 0 0 0 3.66 4.527C.527 9.163-.323 13.684.102 18.141a20 20 0 0 0 6.073 3.049 14.7 14.7 0 0 0 1.301-2.097 13 13 0 0 1-2.048-.978q.258-.189.502-.378a14.27 14.27 0 0 0 12.142 0q.247.202.502.378a13 13 0 0 1-2.052.98 14.5 14.5 0 0 0 1.301 2.095 19.9 19.9 0 0 0 6.076-3.047c.498-5.168-.851-9.648-3.568-13.62M8.013 15.4c-1.183 0-2.161-1.074-2.161-2.395S6.796 10.6 8.01 10.6s2.183 1.083 2.163 2.405S9.22 15.4 8.013 15.4m7.974 0c-1.186 0-2.16-1.074-2.16-2.395s.944-2.405 2.16-2.405 2.178 1.083 2.157 2.405-.951 2.395-2.158 2.395"})})})},{name:"dribbble",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10m8.434-8.631c-.292-.092-2.644-.794-5.32-.365 1.117 3.07 1.572 5.57 1.659 6.09a8.56 8.56 0 0 0 3.661-5.725m-5.098 6.507c-.127-.749-.623-3.361-1.822-6.477l-.056.019c-4.818 1.679-6.547 5.02-6.701 5.334A8.5 8.5 0 0 0 12 20.555a8.5 8.5 0 0 0 3.336-.679m-9.682-2.152c.193-.331 2.538-4.213 6.943-5.637q.167-.054.337-.102a29 29 0 0 0-.692-1.45c-4.266 1.277-8.405 1.223-8.778 1.216a8.497 8.497 0 0 0 2.19 5.973m-2.015-7.46c.382.005 3.901.02 7.897-1.041a55 55 0 0 0-3.167-4.94 8.57 8.57 0 0 0-4.73 5.981m6.359-6.555a46 46 0 0 1 3.187 5c3.037-1.138 4.323-2.867 4.477-3.085a8.51 8.51 0 0 0-7.664-1.915m8.614 2.903c-.18.243-1.612 2.078-4.77 3.367a27 27 0 0 1 .751 1.678c2.842-.357 5.666.215 5.948.275a8.5 8.5 0 0 0-1.929-5.32"})})})},{name:"dropbox",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 6.134 6.069 9.797 2 6.54l5.883-3.843zm-10 6.92 5.883 3.843L12 13.459 6.069 9.797zm10 .405 4.116 3.439L22 13.054l-4.069-3.257zM22 6.54l-5.884-3.843L12 6.134l5.931 3.663zm-9.989 7.66-4.129 3.426-1.767-1.153v1.291l5.896 3.539 5.897-3.539v-1.291l-1.769 1.153z"})})})},{name:"eventbrite",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M18.041 3.931 5.959 3A2.96 2.96 0 0 0 3 5.959v12.083A2.96 2.96 0 0 0 5.959 21l12.083-.931C19.699 19.983 21 18.744 21 17.11V6.89c0-1.634-1.259-2.863-2.959-2.959M16.933 8.17c-.082.215-.192.432-.378.551-.188.122-.489.132-.799.132-1.521 0-3.062-.048-4.607-.048q-.23 1.061-.451 2.128c.932-.004 1.873.005 2.81.005.726 0 1.462-.069 1.586.525.04.189-.001.426-.052.615-.105.38-.258.676-.625.783-.185.054-.408.058-.646.058-1.145 0-2.345.017-3.493.02-.169.772-.328 1.553-.489 2.333 1.57-.005 3.067-.041 4.633-.058.627-.007 1.085.194 1.009.85a2.2 2.2 0 0 1-.211.725c-.102.208-.248.376-.488.452-.237.075-.541.064-.862.078-.304.014-.614.008-.924.016-.309.009-.619.022-.919.022-1.253 0-2.429.08-3.683.073-.603-.004-1.014-.249-1.124-.757-.059-.273-.018-.58.036-.841a3543 3543 0 0 1 1.629-7.763c.056-.265.114-.511.225-.714a1.24 1.24 0 0 1 .79-.62c.368-.099.883-.047 1.344-.047.305 0 .612.008.914.016.925.026 1.817.03 2.747.053.304.007.615.016.915.016.621 0 1.17.073 1.245.614.039.288-.051.567-.132.783"})})})},{name:"facebook",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10"})})})},{name:"fediverse",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 743 743",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M181.131 275.137a68.9 68.9 0 0 1-29.465 29.328l161.758 162.389 38.998-19.764zm213.363 214.187-38.998 19.764 81.963 82.283a68.9 68.9 0 0 1 29.471-29.332zM581.646 339.391l-91.576 46.41 6.752 43.189 103.616-52.513a68.9 68.9 0 0 1-18.792-37.086m-144.738 73.351L220.383 522.477a68.9 68.9 0 0 1 18.795 37.089L443.66 455.934zM367.275 142.438l-104.48 203.97 30.848 30.967 110.623-215.957a68.9 68.9 0 0 1-36.991-18.98M235.621 399.459l-52.922 103.314a68.9 68.9 0 0 1 36.987 18.979l46.781-91.328zM150.768 304.918a68.9 68.9 0 0 1-34.416 7.195 69 69 0 0 1-6.651-.695l30.903 197.662a68.9 68.9 0 0 1 34.416-7.195 69 69 0 0 1 6.646.695zM239.342 560.545c.707 4.589.949 9.239.72 13.877a68.9 68.9 0 0 1-7.267 27.18l197.629 31.712c-.708-4.59-.95-9.24-.723-13.878a68.9 68.9 0 0 1 7.27-27.178zM601.133 377.199l-91.219 178.082a68.9 68.9 0 0 1 36.994 18.983l91.217-178.08a68.9 68.9 0 0 1-36.992-18.985M476.723 125.33a68.9 68.9 0 0 1-29.471 29.332l141.266 141.811a68.9 68.9 0 0 1 29.468-29.332zM347.787 104.631l-178.576 90.498a68.9 68.9 0 0 1 18.793 37.086l178.574-90.502a68.9 68.9 0 0 1-18.791-37.082M446.926 154.826a68.9 68.9 0 0 1-34.983 7.483 69 69 0 0 1-6.029-.633l15.818 101.291 43.163 6.926zm-16 167.028 37.4 239.482a68.9 68.9 0 0 1 33.914-6.943q3.625.206 7.207.791L474.09 328.777zM188.131 232.975c.734 4.66.988 9.383.758 14.095a68.9 68.9 0 0 1-7.16 26.983l101.369 16.281 19.923-38.908zm173.736 27.9-19.926 38.912 239.514 38.467a69 69 0 0 1-.695-13.719 68.9 68.9 0 0 1 7.349-27.324z"}),(0,n.jsx)("path",{fillOpacity:".996",d:"M412.284 156.054c34.538 1.882 64.061-24.592 65.943-59.13s-24.592-64.062-59.131-65.943c-34.538-1.882-64.061 24.592-65.943 59.13s24.593 64.062 59.131 65.943M646.144 390.82c34.538 1.881 64.062-24.593 65.943-59.131s-24.592-64.061-59.13-65.943-64.062 24.593-65.943 59.131 24.592 64.061 59.13 65.943M495.086 685.719c34.538 1.881 64.062-24.592 65.943-59.13s-24.592-64.062-59.13-65.943-64.062 24.592-65.943 59.13 24.592 64.062 59.13 65.943M167.866 633.211c34.538 1.882 64.062-24.592 65.943-59.13s-24.592-64.062-59.13-65.943-64.062 24.592-65.943 59.13 24.592 64.062 59.13 65.943M116.692 305.86c34.538 1.882 64.062-24.592 65.943-59.13s-24.592-64.062-59.131-65.943c-34.538-1.881-64.061 24.592-65.943 59.13s24.593 64.062 59.131 65.943"})]})})},{name:"feed",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M2 8.667V12c5.515 0 10 4.485 10 10h3.333c0-7.363-5.97-13.333-13.333-13.333M2 2v3.333c9.19 0 16.667 7.477 16.667 16.667H22C22 10.955 13.045 2 2 2m2.5 15a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5"})})})},{name:"flickr",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5m11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5"})})})},{name:"foursquare",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M17.573 2H6.905C5.434 2 5 3.107 5 3.805v16.948c0 .785.422 1.077.66 1.172.238.097.892.177 1.285-.275 0 0 5.035-5.843 5.122-5.93.132-.132.132-.132.262-.132h3.26c1.368 0 1.588-.977 1.732-1.552.078-.318.692-3.428 1.225-6.122l.675-3.368C19.56 2.893 19.14 2 17.573 2m-1.078 5.22c-.053.252-.372.518-.665.518h-4.157c-.467 0-.802.318-.802.787v.508c0 .467.337.798.805.798h3.528c.331 0 .655.362.583.715s-.407 2.102-.448 2.295c-.04.193-.262.523-.655.523h-2.88c-.523 0-.683.068-1.033.503-.35.437-3.505 4.223-3.505 4.223-.032.035-.063.027-.063-.015V4.852c0-.298.26-.648.648-.648h8.562c.315 0 .61.297.528.683z"})})})},{name:"ghost",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M10.203 20.997H3.005v-3.599h7.198zm10.792-3.599h-7.193v3.599h7.193zm.003-7.198H3v3.599h17.998zm-7.195-7.197H3.005v3.599h10.798zm7.197 0h-3.599v3.599H21z"})})})},{name:"git",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M23.519 10.947 13.053.482a1.543 1.543 0 0 0-2.183 0L8.696 2.656l2.756 2.756a1.83 1.83 0 0 1 1.886.439 1.84 1.84 0 0 1 .436 1.898l2.656 2.657a1.83 1.83 0 0 1 1.899.436 1.837 1.837 0 0 1 0 2.597 1.84 1.84 0 0 1-2.599 0 1.84 1.84 0 0 1-.4-1.998l-2.478-2.477v6.521a1.837 1.837 0 0 1 .485 2.945 1.837 1.837 0 0 1-2.597 0 1.837 1.837 0 0 1 0-2.598 1.8 1.8 0 0 1 .602-.401V8.85a1.8 1.8 0 0 1-.602-.4 1.84 1.84 0 0 1-.395-2.009L7.628 3.723.452 10.898a1.544 1.544 0 0 0 0 2.184l10.467 10.467a1.544 1.544 0 0 0 2.183 0l10.417-10.418a1.546 1.546 0 0 0 0-2.184"})})})},{name:"github",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.419 2.865 8.166 6.839 9.489.5.09.682-.218.682-.484 0-.236-.009-.866-.014-1.699-2.782.602-3.369-1.34-3.369-1.34-.455-1.157-1.11-1.465-1.11-1.465-.909-.62.069-.608.069-.608 1.004.071 1.532 1.03 1.532 1.03.891 1.529 2.341 1.089 2.91.833.091-.647.349-1.086.635-1.337-2.22-.251-4.555-1.111-4.555-4.943 0-1.091.39-1.984 1.03-2.682-.103-.254-.447-1.27.097-2.646 0 0 .84-.269 2.75 1.025A9.6 9.6 0 0 1 12 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.748-1.025 2.748-1.025.546 1.376.202 2.394.1 2.646.64.699 1.026 1.591 1.026 2.682 0 3.841-2.337 4.687-4.565 4.935.359.307.679.917.679 1.852 0 1.335-.012 2.415-.012 2.741 0 .269.18.579.688.481A10 10 0 0 0 22 12c0-5.523-4.477-10-10-10"})})})},{name:"google-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-.05 16c-3.312 0-6-2.688-6-6s2.688-6 6-6c1.62 0 2.976.594 4.014 1.566L14.26 9.222c-.432-.408-1.188-.888-2.31-.888-1.986 0-3.606 1.65-3.606 3.672s1.62 3.672 3.606 3.672c2.298 0 3.144-1.59 3.3-2.532h-3.306v-2.238h5.616c.084.378.15.732.15 1.23 0 3.426-2.298 5.862-5.76 5.862"})})})},{name:"google-plus-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M8 11h6.61c.06.35.11.7.11 1.16 0 4-2.68 6.84-6.72 6.84-3.87 0-7-3.13-7-7s3.13-7 7-7c1.89 0 3.47.69 4.69 1.83l-1.9 1.83c-.52-.5-1.43-1.08-2.79-1.08-2.39 0-4.34 1.98-4.34 4.42S5.61 16.42 8 16.42c2.77 0 3.81-1.99 3.97-3.02H8zm15 0h-2V9h-2v2h-2v2h2v2h2v-2h2"})})})},{name:"google-plus",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-1.919 14.05a4.051 4.051 0 0 1 0-8.1c1.094 0 2.009.401 2.709 1.057l-1.15 1.118a2.23 2.23 0 0 0-1.559-.599c-1.341 0-2.434 1.114-2.434 2.479s1.094 2.479 2.434 2.479c1.551 0 2.122-1.073 2.227-1.709h-2.232v-1.511h3.791c.057.255.101.494.101.83.001 2.312-1.55 3.956-3.887 3.956M19 12.75h-1.25V14h-1.5v-1.25H15v-1.5h1.25V10h1.5v1.25H19z"})})})},{name:"google",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12.02 10.18v3.73h5.51c-.26 1.57-1.67 4.22-5.5 4.22-3.31 0-6.01-2.75-6.01-6.12s2.7-6.12 6.01-6.12c1.87 0 3.13.8 3.85 1.48l2.84-2.76C16.99 2.99 14.73 2 12.03 2c-5.52 0-10 4.48-10 10s4.48 10 10 10c5.77 0 9.6-4.06 9.6-9.77 0-.83-.11-1.42-.25-2.05z"})})})},{name:"instagram",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 4.622c2.403 0 2.688.009 3.637.052.877.04 1.354.187 1.671.31.42.163.72.358 1.035.673s.51.615.673 1.035c.123.317.27.794.31 1.671.043.949.052 1.234.052 3.637s-.009 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.671-.163.42-.358.72-.673 1.035s-.615.51-1.035.673c-.317.123-.794.27-1.671.31-.949.043-1.233.052-3.637.052s-2.688-.009-3.637-.052c-.877-.04-1.354-.187-1.671-.31a2.8 2.8 0 0 1-1.035-.673 2.8 2.8 0 0 1-.673-1.035c-.123-.317-.27-.794-.31-1.671-.043-.949-.052-1.234-.052-3.637s.009-2.688.052-3.637c.04-.877.187-1.354.31-1.671.163-.42.358-.72.673-1.035s.615-.51 1.035-.673c.317-.123.794-.27 1.671-.31.949-.043 1.234-.052 3.637-.052M12 3c-2.444 0-2.751.01-3.711.054-.958.044-1.612.196-2.184.418a4.4 4.4 0 0 0-1.594 1.039c-.5.5-.808 1.002-1.038 1.594-.223.572-.375 1.226-.419 2.184C3.01 9.249 3 9.556 3 12s.01 2.751.054 3.711c.044.958.196 1.612.418 2.185.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.267.054 3.711.054s2.751-.01 3.711-.054c.958-.044 1.612-.196 2.185-.418a4.4 4.4 0 0 0 1.594-1.038c.5-.5.808-1.002 1.038-1.594.222-.572.375-1.227.418-2.185.044-.96.054-1.267.054-3.711s-.01-2.751-.054-3.711c-.044-.958-.196-1.612-.418-2.185A4.4 4.4 0 0 0 19.49 4.51c-.5-.5-1.002-.808-1.594-1.038-.572-.222-1.227-.375-2.185-.418C14.751 3.01 14.444 3 12 3m0 4.378a4.622 4.622 0 1 0 0 9.244 4.622 4.622 0 0 0 0-9.244M12 15a3 3 0 1 1 0-6 3 3 0 0 1 0 6m4.804-8.884a1.08 1.08 0 1 0 .001 2.161 1.08 1.08 0 0 0-.001-2.161"})})})},{name:"json-feed",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"m8.522 17.424.027.027c1.076-1.076 1.854-.993 3.154.306l2.053 2.053c2.136 2.136 4.131 2.028 6.515-.356l.729-.728-1.548-1.548-.373.373c-1.349 1.349-2.293 1.366-3.585.075l-2.409-2.409c-1.242-1.242-2.475-1.366-3.659-.381l-.232-.232c1.01-1.225.911-2.368-.29-3.568l-2.16-2.162c-1.317-1.317-1.308-2.236.058-3.602l.372-.372-1.54-1.54-.728.729c-2.393 2.393-2.525 4.346-.439 6.433l1.78 1.78c1.3 1.3 1.383 2.095.315 3.163l.008.008a1.384 1.384 0 0 0 1.952 1.951"}),(0,n.jsx)("circle",{cx:"13.089",cy:"10.905",r:"1.383"}),(0,n.jsx)("circle",{cx:"16.349",cy:"7.644",r:"1.383"}),(0,n.jsx)("circle",{cx:"19.61",cy:"4.383",r:"1.383"})]})})},{name:"line",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M14.255 9.572v3.333c0 .084-.066.15-.15.15h-.534a.16.16 0 0 1-.122-.061l-1.528-2.063v1.978c0 .084-.066.15-.15.15h-.534a.15.15 0 0 1-.15-.15V9.576c0-.084.066-.15.15-.15h.529a.14.14 0 0 1 .122.066l1.528 2.063V9.577c0-.084.066-.15.15-.15h.534a.15.15 0 0 1 .155.145m-3.844-.15h-.534a.15.15 0 0 0-.15.15v3.333c0 .084.066.15.15.15h.534c.084 0 .15-.066.15-.15V9.572c0-.08-.066-.15-.15-.15m-1.289 2.794H7.664V9.572a.15.15 0 0 0-.15-.15H6.98a.15.15 0 0 0-.15.15v3.333q0 .062.042.103a.16.16 0 0 0 .103.042h2.142c.084 0 .15-.066.15-.15v-.534a.15.15 0 0 0-.145-.15m7.945-2.794h-2.142c-.08 0-.15.066-.15.15v3.333c0 .08.066.15.15.15h2.142c.084 0 .15-.066.15-.15v-.534a.15.15 0 0 0-.15-.15h-1.458v-.563h1.458c.084 0 .15-.066.15-.15v-.539a.15.15 0 0 0-.15-.15h-1.458v-.563h1.458c.084 0 .15-.066.15-.15v-.534c-.005-.08-.07-.15-.15-.15M22.5 5.33v13.373c-.005 2.1-1.725 3.802-3.83 3.797H5.297c-2.1-.005-3.802-1.73-3.797-3.83V5.297c.005-2.1 1.73-3.802 3.83-3.797h13.373c2.1.005 3.802 1.725 3.797 3.83m-2.888 5.747c0-3.422-3.431-6.206-7.645-6.206s-7.645 2.784-7.645 6.206c0 3.066 2.719 5.634 6.394 6.122.895.192.792.52.591 1.725-.033.192-.155.755.661.413s4.402-2.592 6.009-4.439c1.106-1.219 1.636-2.452 1.636-3.82"})})})},{name:"link",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M17 13H7v-2h10zm1-6h-1c-1.631 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1a4 4 0 0 0 4-4v-2a4 4 0 0 0-4-4M2 11v2a4 4 0 0 0 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.631 7 7 7H6a4 4 0 0 0-4 4"})})})},{name:"linkedin",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19.7 3H4.3A1.3 1.3 0 0 0 3 4.3v15.4A1.3 1.3 0 0 0 4.3 21h15.4a1.3 1.3 0 0 0 1.3-1.3V4.3A1.3 1.3 0 0 0 19.7 3M8.339 18.338H5.667v-8.59h2.672zM7.004 8.574a1.548 1.548 0 1 1-.002-3.096 1.548 1.548 0 0 1 .002 3.096m11.335 9.764H15.67v-4.177c0-.996-.017-2.278-1.387-2.278-1.389 0-1.601 1.086-1.601 2.206v4.249h-2.667v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.779 3.203 4.092v4.711z"})})})},{name:"mail",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 4.236-8 4.882-8-4.882V6h16z"})})})},{name:"mastodon",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M11.973 2.352c-2.468.02-4.842.286-6.225.921 0 0-2.742 1.229-2.742 5.415 0 .958-.018 2.105.012 3.32.1 4.094.75 8.128 4.535 9.129 1.745.462 3.244.56 4.45.494 2.19-.122 3.417-.781 3.417-.781l-.072-1.588s-1.565.491-3.32.431c-1.74-.06-3.576-.188-3.858-2.324a4 4 0 0 1-.04-.598s1.709.416 3.874.516c1.324.06 2.563-.076 3.824-.226 2.418-.29 4.524-1.78 4.79-3.141.416-2.144.38-5.232.38-5.232 0-4.186-2.74-5.415-2.74-5.415-1.383-.635-3.76-.9-6.227-.921zM9.18 5.622c1.028 0 1.804.395 2.318 1.185l.502.84.5-.84c.514-.79 1.292-1.186 2.32-1.186.888 0 1.605.313 2.15.922q.795.915.794 2.469v5.068h-2.008V9.16c0-1.037-.438-1.562-1.31-1.562-.966 0-1.448.622-1.448 1.857v2.693h-1.996V9.455c0-1.235-.484-1.857-1.45-1.857-.872 0-1.308.525-1.308 1.562v4.92H6.236V9.012q-.001-1.554.793-2.469c.547-.609 1.263-.922 2.15-.922"})})})},{name:"medium-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{fillRule:"nonzero",d:"M7.423 6c3.27 0 5.922 2.686 5.922 6s-2.651 6-5.922 6S1.5 15.313 1.5 12s2.652-6 5.923-6m9.458.351c1.635 0 2.961 2.53 2.961 5.65 0 3.118-1.325 5.648-2.96 5.648S13.92 15.119 13.92 12s1.325-5.649 2.96-5.649m4.577.589c.576 0 1.042 2.265 1.042 5.06s-.466 5.06-1.042 5.06c-.575 0-1.04-2.265-1.04-5.06s.465-5.06 1.04-5.06"})})})},{name:"medium",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M3 3v18h18V3zm15 4.26-1 .93a.28.28 0 0 0-.11.27v6.8a.27.27 0 0 0 .11.27l.94.93v.2h-4.75v-.2l1-1c.09-.1.09-.12.09-.27V9.74l-2.71 6.9h-.37L8 9.74v4.62a.67.67 0 0 0 .17.54l1.27 1.54v.2H5.86v-.2l1.27-1.54a.64.64 0 0 0 .17-.54V9a.5.5 0 0 0-.16-.4L6 7.26v-.2h3.52L12.23 13l2.38-5.94H18z"})})})},{name:"messenger",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12.026.375C5.462.375.375 5.172.375 11.652c0 3.389 1.393 6.318 3.66 8.341.391.352.311.556.377 2.73a.934.934 0 0 0 1.307.823c2.48-1.092 2.512-1.178 2.933-1.064 7.185 1.977 14.973-2.621 14.973-10.83 0-6.48-5.035-11.277-11.599-11.277m6.996 8.678L15.6 14.47a1.75 1.75 0 0 1-2.527.465l-2.723-2.038a.7.7 0 0 0-.844 0l-3.674 2.786c-.49.372-1.133-.216-.802-.735l3.422-5.417a1.75 1.75 0 0 1 2.527-.465l2.722 2.037a.7.7 0 0 0 .844 0L18.22 8.32c.489-.374 1.132.213.801.732"})})})},{name:"microblog",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19.641 17.086c1.294-1.522 2.067-3.438 2.067-5.521 0-4.957-4.371-8.972-9.763-8.972s-9.763 4.015-9.763 8.972 4.371 8.972 9.763 8.972a10.5 10.5 0 0 0 3.486-.59.315.315 0 0 1 .356.112c.816 1.101 2.09 1.876 3.506 2.191a.194.194 0 0 0 .192-.309 3.82 3.82 0 0 1 .162-4.858zm-3.065-6.575-2.514 1.909.912 3.022a.286.286 0 0 1-.437.317l-2.592-1.802-2.592 1.802a.285.285 0 0 1-.436-.317l.912-3.022-2.515-1.909a.285.285 0 0 1 .167-.513l3.155-.066 1.038-2.981a.285.285 0 0 1 .539 0l1.038 2.981 3.155.066a.285.285 0 0 1 .17.513"})})})},{name:"nextdoor",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",strokeMiterlimit:"10",viewBox:"0 0 130 130",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M64.25 3.531c-31.144.337-57.596 24.22-60.469 55.907-3.064 33.799 21.857 63.685 55.657 66.75s63.685-21.857 66.75-55.657-21.857-63.686-55.657-66.75a62 62 0 0 0-6.281-.25m3.938 34.907C82.468 38.438 93.5 48.58 93.5 61.5v27c0 .685-.565 1.25-1.25 1.25H80.906a1.267 1.267 0 0 1-1.25-1.25V63.375c0-5.58-4.309-11.937-11.469-11.937-7.47 0-11.468 6.357-11.468 11.937V88.5c0 .685-.565 1.25-1.25 1.25H44.125c-.68 0-1.219-.57-1.219-1.25V64.156c0-.74-.529-1.364-1.25-1.531-13.13-2.93-15.115-10.285-15.375-21.125-.005-.332.142-.67.375-.906.233-.237.543-.375.875-.375l11.688.062c.66.01 1.187.529 1.218 1.188.13 4.44.438 9.406 4.438 9.406.83 0 1.443-1.179 1.813-1.719 4.41-6.48 12.28-10.718 21.5-10.718"})})})},{name:"patreon",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M20 7.408c-.003-2.299-1.746-4.182-3.79-4.862-2.54-.844-5.888-.722-8.312.453-2.939 1.425-3.862 4.545-3.896 7.656-.028 2.559.22 9.297 3.92 9.345 2.75.036 3.159-3.603 4.43-5.356.906-1.247 2.071-1.599 3.506-1.963 2.465-.627 4.146-2.626 4.142-5.273"})})})},{name:"pinterest-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12.289 2C6.617 2 3.606 5.648 3.606 9.622c0 1.846 1.025 4.146 2.666 4.878.25.111.381.063.439-.169.044-.175.267-1.029.365-1.428a.37.37 0 0 0-.091-.362c-.54-.63-.975-1.791-.975-2.873 0-2.777 2.194-5.464 5.933-5.464 3.23 0 5.49 2.108 5.49 5.122 0 3.407-1.794 5.768-4.13 5.768-1.291 0-2.257-1.021-1.948-2.277.372-1.495 1.089-3.112 1.089-4.191 0-.967-.542-1.775-1.663-1.775-1.319 0-2.379 1.309-2.379 3.059 0 1.115.394 1.869.394 1.869s-1.302 5.279-1.54 6.261c-.405 1.666.053 4.368.094 4.604.021.126.167.169.25.063.129-.165 1.699-2.419 2.142-4.051.158-.59.817-2.995.817-2.995.43.784 1.681 1.446 3.013 1.446 3.963 0 6.822-3.494 6.822-7.833C20.394 5.112 16.849 2 12.289 2"})})})},{name:"pinterest",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12c0 4.236 2.636 7.855 6.356 9.312-.087-.791-.166-2.005.035-2.869.182-.78 1.173-4.971 1.173-4.971s-.299-.599-.299-1.484c0-1.39.806-2.429 1.809-2.429.853 0 1.265.641 1.265 1.409 0 .858-.546 2.141-.828 3.329-.236.996.499 1.807 1.481 1.807 1.777 0 3.144-1.874 3.144-4.579 0-2.394-1.72-4.068-4.177-4.068-2.845 0-4.515 2.134-4.515 4.34 0 .859.331 1.781.744 2.282a.3.3 0 0 1 .069.287c-.077.316-.246.995-.279 1.134-.044.183-.145.222-.334.134-1.249-.581-2.03-2.407-2.03-3.874 0-3.154 2.292-6.051 6.607-6.051 3.469 0 6.165 2.472 6.165 5.775 0 3.446-2.173 6.22-5.189 6.22-1.013 0-1.966-.526-2.292-1.148l-.623 2.377c-.226.869-.835 1.957-1.243 2.622.936.289 1.93.445 2.961.445 5.523 0 10-4.477 10-10S17.523 2 12 2"})})})},{name:"pocket",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M21.927 4.194A1.82 1.82 0 0 0 20.222 3H3.839a1.823 1.823 0 0 0-1.813 1.814v6.035l.069 1.2c.29 2.73 1.707 5.115 3.899 6.778l.119.089.025.018a9.9 9.9 0 0 0 3.91 1.727 10.06 10.06 0 0 0 4.049-.014.3.3 0 0 0 .064-.023 9.9 9.9 0 0 0 3.753-1.691l.025-.018q.06-.043.119-.089c2.192-1.664 3.609-4.049 3.898-6.778l.069-1.2V4.814a1.8 1.8 0 0 0-.098-.62m-4.235 6.287-4.704 4.512a1.37 1.37 0 0 1-1.898 0l-4.705-4.512a1.371 1.371 0 1 1 1.898-1.979l3.756 3.601 3.755-3.601a1.372 1.372 0 0 1 1.898 1.979"})})})},{name:"polldaddy",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.487 2 2 6.487 2 12c0 5.514 4.487 10 10 10 5.514 0 10-4.486 10-10 0-5.513-4.486-10-10-10m.991 1.68c2.361.084 4.657 1.251 6.197 3.136.283.334.541.693.774 1.067a7.78 7.78 0 0 0-6.094-2.94 7.76 7.76 0 0 0-5.896 2.703q-.008.006-.016.014l-.152.159-.031.032a6.12 6.12 0 0 0-1.633 4.165 6.15 6.15 0 0 0 6.143 6.143c.57 0 1.123-.081 1.649-.227-1.849.839-4.131.747-5.926-.324-1.841-1.089-3.171-3.111-3.433-5.313A7.39 7.39 0 0 1 6.69 6.137C8.294 4.5 10.634 3.563 12.991 3.68m3.373 8.519c-.049-2.024-1.587-3.889-3.544-4.174-1.927-.343-3.917.857-4.451 2.661a3.67 3.67 0 0 0 .2 2.653c.39.8 1.067 1.451 1.894 1.759 1.664.654 3.63-.27 4.173-1.863.593-1.58-.396-3.423-1.94-3.776-1.52-.407-3.161.757-3.204 2.243a2.36 2.36 0 0 0 .753 1.879c.501.476 1.23.667 1.871.529a2.07 2.07 0 0 0 1.469-1.134 1.91 1.91 0 0 0-.087-1.767c-.297-.513-.859-.863-1.429-.881a1.7 1.7 0 0 0-1.437.679 1.53 1.53 0 0 0-.18 1.489q.006.016.016.03c.193.634.774 1.1 1.467 1.117a1.6 1.6 0 0 1-.97-.183c-.466-.244-.809-.747-.893-1.29a1.8 1.8 0 0 1 .499-1.539 2.02 2.02 0 0 1 1.58-.606c.593.04 1.159.35 1.517.859.364.496.51 1.156.383 1.773-.116.62-.529 1.174-1.093 1.514a2.52 2.52 0 0 1-1.914.286c-.65-.161-1.226-.606-1.584-1.206a2.83 2.83 0 0 1-.341-2.031c.143-.7.573-1.321 1.176-1.753 1.193-.883 3.056-.751 4.106.411 1.106 1.1 1.327 3.027.406 4.371-.877 1.376-2.74 2.086-4.374 1.594-1.639-.449-2.913-2.079-3.031-3.853-.07-.884.13-1.797.583-2.577.445-.777 1.155-1.432 1.972-1.862 1.64-.88 3.816-.743 5.349.424 1.251.924 2.083 2.42 2.236 4.009l.001.03c0 2.9-2.359 5.26-5.26 5.26a5.2 5.2 0 0 1-1.947-.376 5 5 0 0 0 2.613-.079 4.96 4.96 0 0 0 2.514-1.751c.618-.828.95-1.861.901-2.869M12 21.113c-5.024 0-9.111-4.087-9.111-9.113 0-4.789 3.713-8.723 8.411-9.081a7 7 0 0 0-.397.06c-2.644.453-5.017 2.106-6.32 4.409-1.309 2.301-1.391 5.19-.3 7.527 1.056 2.34 3.253 4.156 5.776 4.553 2.497.44 5.133-.483 6.787-2.301 1.719-1.797 2.269-4.529 1.486-6.796-.583-1.81-1.976-3.331-3.7-4.046 3.417.594 6.174 3.221 6.174 6.781 0 1.004-.241 2.02-.657 2.966-1.498 2.984-4.586 5.041-8.149 5.041"})})})},{name:"print",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M9 16h6v2H9zm13 1h-3v3a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2V9a2 2 0 0 1 2-2h1V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v2h1a2 2 0 0 1 2 2zM7 7h10V5H7zm10 7H7v6h10zm3-3.5a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 20 10.5"})})})},{name:"quora",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M47.736 16.521c-.41-.81-.898-1.631-1.846-1.631a1 1 0 0 0-.527.107l-.322-.644a2.93 2.93 0 0 1 1.836-.595c1.26 0 1.914.605 2.431 1.397a6.8 6.8 0 0 0 .449-2.675c0-2.773-.869-4.199-2.929-4.199-1.992 0-2.851 1.465-2.851 4.199s.859 4.17 2.851 4.17a4 4 0 0 0 .869-.107zm.498.966a6 6 0 0 1-1.367.185 5.27 5.27 0 0 1-5.263-5.204c0-3.114 2.558-5.233 5.263-5.233s5.282 2.109 5.282 5.233a5.08 5.08 0 0 1-1.992 4.072c.381.566.781.956 1.319.956.595 0 .839-.459.878-.82h.781c.049.488-.195 2.48-2.373 2.48-1.319 0-2.012-.761-2.529-1.66zm5.624-2.646v-3.563c0-.371-.146-.586-.615-.586h-.498v-.956h3.251v5.048c0 .849.459 1.231 1.161 1.231a1.56 1.56 0 0 0 1.465-.839V11.28c0-.371-.146-.586-.615-.586h-.527v-.957h3.28v5.302c0 .527.195.732.8.732h.107v.976l-2.929.468V16.21h-.057a3.12 3.12 0 0 1-2.509 1.152c-1.28 0-2.304-.644-2.304-2.558zm12.059 1.611c1.152 0 1.592-1.005 1.611-3.027.02-1.982-.459-2.929-1.611-2.929-1.005 0-1.641.956-1.641 2.929 0 2.021.625 3.027 1.641 3.027m0 .956a3.906 3.906 0 0 1-3.974-3.974c0-2.334 1.836-3.886 3.974-3.886 2.226 0 4.004 1.582 4.004 3.886a3.867 3.867 0 0 1-4.004 3.974m4.072-.146v-.956h.312c.781 0 .859-.224.859-.908v-4.121c0-.371-.215-.586-.732-.586h-.42v-.955h2.968l.146 1.553h.108c.371-1.113 1.221-1.699 2.051-1.699.693 0 1.221.39 1.221 1.181 0 .547-.264 1.093-1.005 1.093-.664 0-.8-.449-1.358-.449-.488 0-.869.468-.869 1.152v2.783c0 .673.166.908.937.908h.439v.956h-4.658zm9.901-1.093c.956 0 1.338-.898 1.338-1.797v-1.211c-.732.722-2.304.742-2.304 2.021 0 .625.371.986.966.986m1.387 0c-.39.752-1.191 1.26-2.314 1.26-1.309 0-2.148-.732-2.148-1.914 0-2.451 3.417-1.797 4.423-3.427v-.185c0-1.25-.488-1.445-1.035-1.445-1.524 0-.83 1.631-2.226 1.631-.673 0-.937-.371-.937-.859 0-.927 1.093-1.67 3.173-1.67 1.963 0 3.163.537 3.163 2.49v3.114q-.02.742.595.742a1 1 0 0 0 .449-.127l.254.615c-.205.312-.752.869-1.836.869-.908 0-1.465-.42-1.543-1.113h-.01zm-68.554 2.558c-.83-1.641-1.807-3.3-3.711-3.3a2.9 2.9 0 0 0-1.093.215l-.644-1.299a5.66 5.66 0 0 1 3.662-1.211c2.548 0 3.857 1.231 4.892 2.792q.917-2.012.908-5.38c0-5.585-1.748-8.417-5.829-8.417-4.033 0-5.76 2.87-5.76 8.417s1.738 8.397 5.76 8.397a5.9 5.9 0 0 0 1.748-.224zm.996 1.953a9.8 9.8 0 0 1-2.744.371C5.614 21.041.371 16.764.371 10.545.371 4.277 5.614 0 10.965 0c5.448 0 10.642 4.248 10.642 10.545a10.25 10.25 0 0 1-4.013 8.201c.732 1.152 1.563 1.914 2.665 1.914 1.201 0 1.689-.927 1.768-1.66h1.572c.088.966-.4 4.999-4.775 4.999-2.646 0-4.052-1.543-5.106-3.339z"})})})},{name:"reddit",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M22 11.816a2.28 2.28 0 0 0-2.277-2.277c-.593 0-1.122.24-1.526.614-1.481-.965-3.455-1.594-5.647-1.69l1.171-3.702 3.18.748a1.88 1.88 0 0 0 1.876 1.862 1.88 1.88 0 0 0 1.877-1.878 1.88 1.88 0 0 0-1.877-1.877c-.769 0-1.431.466-1.72 1.13l-3.508-.826a.386.386 0 0 0-.46.261l-1.35 4.268c-2.316.038-4.411.67-5.97 1.671a2.24 2.24 0 0 0-1.492-.581A2.28 2.28 0 0 0 2 11.816c0 .814.433 1.523 1.078 1.925a4 4 0 0 0-.061.672c0 3.292 4.011 5.97 8.941 5.97s8.941-2.678 8.941-5.97q-.002-.32-.053-.632A2.26 2.26 0 0 0 22 11.816m-3.224-7.422a1.1 1.1 0 1 1-.001 2.199 1.1 1.1 0 0 1 .001-2.199M2.777 11.816c0-.827.672-1.5 1.499-1.5.313 0 .598.103.838.269-.851.676-1.477 1.479-1.812 2.36a1.48 1.48 0 0 1-.525-1.129m9.182 7.79c-4.501 0-8.164-2.329-8.164-5.193S7.457 9.22 11.959 9.22s8.164 2.329 8.164 5.193-3.663 5.193-8.164 5.193m8.677-6.605c-.326-.89-.948-1.701-1.797-2.384.248-.186.55-.301.883-.301.827 0 1.5.673 1.5 1.5.001.483-.23.911-.586 1.185m-11.64 1.703c-.76 0-1.397-.616-1.397-1.376s.637-1.397 1.397-1.397 1.376.637 1.376 1.397-.616 1.376-1.376 1.376m7.405-1.376c0 .76-.616 1.376-1.376 1.376s-1.399-.616-1.399-1.376.639-1.397 1.399-1.397 1.376.637 1.376 1.397m-1.172 3.38a.39.39 0 0 1 0 .55c-.674.674-1.727 1.002-3.219 1.002l-.011-.002-.011.002c-1.492 0-2.544-.328-3.218-1.002a.389.389 0 1 1 .55-.55c.521.521 1.394.775 2.669.775l.011.002.011-.002c1.275 0 2.148-.253 2.669-.775a.387.387 0 0 1 .549 0"})})})},{name:"share",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M18 16c-.788 0-1.499.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118A3 3 0 0 0 15 19a3 3 0 1 0 3-3"})})})},{name:"sms",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M17.696 4C20.069 4 22 5.973 22 8.398v4.357c0 2.04-1.368 3.783-3.261 4.266v4.427l-5.234-4.295h-7.2C3.93 17.153 2 15.18 2 12.755V8.398C2 5.973 3.931 4 6.304 4zM7.028 8.515c-.98 0-1.66.562-1.66 1.349-.009.497.322.91.985 1.178l.39.142c.242.097.305.171.305.297 0 .162-.131.251-.442.251s-.76-.135-1.004-.284l-.112.046-.215.868c.359.258.832.364 1.33.364 1.104 0 1.764-.523 1.764-1.333-.008-.574-.305-.956-.954-1.216l-.393-.146c-.266-.108-.341-.181-.341-.287 0-.152.131-.243.387-.243.274 0 .587.093.808.214l.109-.047.214-.837c-.315-.224-.741-.316-1.171-.316m10.302 0c-.98 0-1.66.562-1.66 1.349-.008.497.322.91.985 1.178l.39.142c.243.097.305.171.305.297 0 .162-.13.251-.442.251-.311 0-.76-.135-1.004-.284l-.112.046-.215.868c.359.258.832.364 1.33.364 1.104 0 1.764-.523 1.764-1.333-.008-.574-.305-.956-.954-1.216l-.393-.146c-.266-.108-.341-.181-.341-.287 0-.152.131-.243.387-.243.274 0 .587.093.808.214l.109-.047.214-.837c-.316-.224-.741-.316-1.171-.316m-3.733 0c-.297 0-.55.066-.78.202l-.144.098a2 2 0 0 0-.264.247l-.078.095-.027-.077c-.15-.34-.55-.565-1.033-.565l-.169.007a1.36 1.36 0 0 0-.896.42l-.08.09-.038-.363-.075-.067H8.994l-.075.079.024.634c.005.2.008.397.008.604v2.652l.075.075h1.178l.075-.075v-2.269q-.002-.168.042-.274c.083-.23.262-.392.496-.392.314 0 .483.267.483.753v2.182l.075.075h1.179l.075-.075v-2.277c0-.097.016-.213.043-.285.077-.224.26-.373.486-.373.33 0 .5.272.5.817v2.118l.074.075h1.179l.075-.075v-2.293c0-1.131-.537-1.763-1.39-1.763Z"})})})},{name:"snapchat",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M11.989 1.728c3.221.001 5.904 2.683 5.908 5.912q.002 1.133.067 2.094a.737.737 0 0 0 .902.669l1.009-.237a.6.6 0 0 1 .129-.015c.256 0 .492.175.55.434a.74.74 0 0 1-.479.861l-1.532.618a.823.823 0 0 0-.485.98c1.229 4.543 4.661 4.071 4.661 4.662 0 .743-2.587.848-2.821 1.082s-.01 1.368-.532 1.588a1.1 1.1 0 0 1-.409.056c-.393 0-.95-.077-1.536-.077-.509 0-1.04.058-1.507.273-1.239.572-2.433 1.641-3.914 1.641S9.325 21.2 8.086 20.628c-.467-.216-.998-.273-1.507-.273-.586 0-1.143.077-1.536.077-.17 0-.31-.014-.409-.056-.522-.22-.299-1.354-.532-1.588s-2.821-.337-2.821-1.08c0-.592 3.432-.119 4.661-4.662a.824.824 0 0 0-.486-.98l-1.532-.618a.74.74 0 0 1-.479-.861.56.56 0 0 1 .679-.419l1.009.237q.086.02.169.02a.737.737 0 0 0 .733-.689q.065-.961.067-2.094c.004-3.229 2.666-5.91 5.887-5.912m0-1.281c-.961 0-1.898.194-2.784.574A7.2 7.2 0 0 0 6.93 2.572a7.2 7.2 0 0 0-1.539 2.282A7.1 7.1 0 0 0 4.82 7.64a33 33 0 0 1-.029 1.369l-.375-.088a2 2 0 0 0-.421-.049 1.86 1.86 0 0 0-1.135.389 1.84 1.84 0 0 0-.666 1.049 2.024 2.024 0 0 0 1.271 2.335l1.124.454c-.744 2.285-2.117 2.723-3.041 3.018a5 5 0 0 0-.659.246C.087 16.76 0 17.436 0 17.708c0 .521.247.996.694 1.339.223.17.499.311.844.43.47.162 1.016.265 1.459.347.021.164.053.341.106.518.22.738.684 1.069 1.034 1.217.332.14.676.156.905.156.224 0 .462-.018.713-.036.269-.02.548-.041.823-.041.426 0 .743.051.97.155.311.144.64.337.989.542.972.571 2.073 1.217 3.462 1.217s2.49-.647 3.462-1.217c.349-.205.679-.399.989-.542.226-.105.544-.155.97-.155.275 0 .554.021.823.041.251.019.488.036.713.036.229 0 .573-.016.905-.156.35-.147.814-.478 1.034-1.217.053-.178.084-.354.106-.518.443-.082.989-.185 1.459-.347.345-.119.621-.259.844-.43.448-.342.694-.818.694-1.339 0-.272-.087-.948-.891-1.347a5 5 0 0 0-.659-.246c-.924-.295-2.297-.733-3.041-3.018l1.124-.454a2.025 2.025 0 0 0 1.271-2.335 1.83 1.83 0 0 0-.666-1.049 1.86 1.86 0 0 0-1.556-.34l-.375.088a33 33 0 0 1-.029-1.369 7.1 7.1 0 0 0-.575-2.789c-.365-.853-.886-1.62-1.547-2.282s-1.428-1.182-2.28-1.547a7.1 7.1 0 0 0-2.786-.574"})})})},{name:"soundcloud",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M23.587 13.923a3.303 3.303 0 0 1-3.344 3.117h-8.037a.674.674 0 0 1-.667-.67V7.717a.74.74 0 0 1 .444-.705s.739-.512 2.296-.512a5.27 5.27 0 0 1 2.702.742 5.35 5.35 0 0 1 2.516 3.485 3.1 3.1 0 0 1 .852-.116 3.217 3.217 0 0 1 3.237 3.312m-13.05-5.659c.242 2.935.419 5.612 0 8.538a.261.261 0 0 1-.519 0c-.39-2.901-.221-5.628 0-8.538a.26.26 0 0 1 .398-.25.26.26 0 0 1 .12.25zm-1.627 8.541a.273.273 0 0 1-.541 0 32.7 32.7 0 0 1 0-7.533.274.274 0 0 1 .544 0 29.4 29.4 0 0 1-.003 7.533m-1.63-7.788c.264 2.69.384 5.099-.003 7.782a.262.262 0 0 1-.522 0c-.374-2.649-.249-5.127 0-7.782a.264.264 0 0 1 .525 0m-1.631 7.792a.268.268 0 0 1-.532 0 27.6 27.6 0 0 1 0-7.034.27.27 0 1 1 .541 0 25.8 25.8 0 0 1-.01 7.034zm-1.63-5.276c.412 1.824.227 3.435-.015 5.294a.255.255 0 0 1-.504 0c-.22-1.834-.402-3.482-.015-5.295a.268.268 0 0 1 .535 0m-1.626-.277c.378 1.869.254 3.451-.01 5.325-.031.277-.506.28-.531 0-.239-1.846-.352-3.476-.01-5.325a.277.277 0 0 1 .551 0m-1.643.907c.396 1.239.261 2.246-.016 3.517a.258.258 0 0 1-.514 0c-.239-1.246-.336-2.274-.021-3.517a.276.276 0 0 1 .55 0z"})})})},{name:"spotify",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424a.62.62 0 0 1-.857.207c-2.348-1.435-5.304-1.76-8.785-.964a.622.622 0 1 1-.277-1.215c3.809-.871 7.077-.496 9.713 1.115a.623.623 0 0 1 .206.857M17.81 13.7a.78.78 0 0 1-1.072.257c-2.687-1.652-6.785-2.131-9.965-1.166A.779.779 0 1 1 6.32 11.3c3.632-1.102 8.147-.568 11.234 1.328a.78.78 0 0 1 .256 1.072m.105-2.835c-3.223-1.914-8.54-2.09-11.618-1.156a.935.935 0 1 1-.542-1.79c3.532-1.072 9.404-.865 13.115 1.338a.936.936 0 1 1-.955 1.608"})})})},{name:"squarespace",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M20.87 9.271a3.86 3.86 0 0 0-5.458 0l-6.141 6.141a.964.964 0 1 0 1.365 1.364l6.14-6.14a1.929 1.929 0 1 1 2.729 2.729l-6.022 6.022a1.93 1.93 0 0 0 2.729 0l4.658-4.658a3.86 3.86 0 0 0 0-5.458m-2.047 2.047a.965.965 0 0 0-1.365 0l-6.14 6.14a1.93 1.93 0 0 1-2.729 0 .964.964 0 1 0-1.364 1.364 3.86 3.86 0 0 0 5.458 0l6.14-6.14a.966.966 0 0 0 0-1.364m-2.047-6.141a3.86 3.86 0 0 0-5.458 0l-6.14 6.14a.964.964 0 1 0 1.364 1.364l6.141-6.14a1.93 1.93 0 0 1 2.729 0 .965.965 0 1 0 1.364-1.364m-2.047 2.047a.964.964 0 0 0-1.364 0l-6.14 6.141a1.929 1.929 0 1 1-2.729-2.729l6.022-6.022a1.93 1.93 0 0 0-2.729 0L3.13 9.271a3.86 3.86 0 0 0 5.458 5.458l6.14-6.141a.963.963 0 0 0 .001-1.364"})})})},{name:"stackexchange",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M4 11.606h16v3.272H4zM4 7.377h16v3.272H4zM17.514 3H6.55C5.147 3 4 4.169 4 5.614v.848h16v-.85C20 4.167 18.895 3 17.514 3M4 15.813v.85c0 1.445 1.147 2.614 2.55 2.614h6.799v3.463l3.357-3.463h.744c1.402 0 2.55-1.169 2.55-2.614v-.85z"})})})},{name:"stackoverflow",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M18.18 20.103V14.78h1.767v7.09H4v-7.09h1.767v5.323z"}),(0,n.jsx)("path",{d:"m7.717 14.275 8.673 1.813.367-1.744-8.673-1.813zm1.147-4.13 8.031 3.74.734-1.606-8.031-3.763zm2.226-3.946 6.815 5.667 1.124-1.354-6.815-5.667zM15.495 2l-1.423 1.055 5.277 7.113 1.423-1.055zM7.533 18.314h8.857v-1.767H7.533z"})]})})},{name:"stumbleupon",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 4.294a4.47 4.47 0 0 0-4.471 4.471v6.353a1.059 1.059 0 1 1-2.118 0v-2.824H2v2.941a4.471 4.471 0 0 0 8.942 0v-6.47a1.059 1.059 0 1 1 2.118 0v1.294l1.412.647 2-.647V8.765A4.473 4.473 0 0 0 12 4.294m1.059 8.059v2.882a4.471 4.471 0 0 0 8.941 0v-2.824h-3.412v2.824a1.059 1.059 0 1 1-2.118 0v-2.882l-2 .647z"})})})},{name:"substack",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19.904 9.182H4.095V7.054h15.81v2.127M4.095 11.109V21L12 16.583 19.905 21v-9.891zM19.905 3H4.095v2.127h15.81z"})})})},{name:"telegram",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m3.08 14.757s-.25.625-.936.325l-2.541-1.949-1.63 1.486s-.127.096-.266.036c0 0-.12-.011-.27-.486s-.911-2.972-.911-2.972L6 12.349s-.387-.137-.425-.438c-.037-.3.437-.462.437-.462l10.03-3.934s.824-.362.824.238z"})})})},{name:"threads",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 192 192",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M141.537 88.988a67 67 0 0 0-2.518-1.143c-1.482-27.307-16.403-42.94-41.457-43.1h-.34c-14.986 0-27.449 6.396-35.12 18.036l13.779 9.452c5.73-8.695 14.724-10.548 21.348-10.548h.229c8.249.053 14.474 2.452 18.503 7.129 2.932 3.405 4.893 8.111 5.864 14.05-7.314-1.243-15.224-1.626-23.68-1.14-23.82 1.371-39.134 15.264-38.105 34.568.522 9.792 5.4 18.216 13.735 23.719 7.047 4.652 16.124 6.927 25.557 6.412 12.458-.683 22.231-5.436 29.049-14.127 5.178-6.6 8.453-15.153 9.899-25.93 5.937 3.583 10.337 8.298 12.767 13.966 4.132 9.635 4.373 25.468-8.546 38.376-11.319 11.308-24.925 16.2-45.488 16.351-22.809-.169-40.06-7.484-51.275-21.742C35.236 139.966 29.808 120.682 29.605 96c.203-24.682 5.63-43.966 16.133-57.317C56.954 24.425 74.204 17.11 97.013 16.94c22.975.17 40.526 7.52 52.171 21.847 5.71 7.026 10.015 15.86 12.853 26.162l16.147-4.308c-3.44-12.68-8.853-23.606-16.219-32.668C147.036 9.607 125.202.195 97.07 0h-.113C68.882.194 47.292 9.642 32.788 28.08 19.882 44.485 13.224 67.315 13.001 95.932L13 96v.067c.224 28.617 6.882 51.447 19.788 67.854C47.292 182.358 68.882 191.806 96.957 192h.113c24.96-.173 42.554-6.708 57.048-21.189 18.963-18.945 18.392-42.692 12.142-57.27-4.484-10.454-13.033-18.945-24.723-24.553M98.44 129.507c-10.44.588-21.286-4.098-21.82-14.135-.397-7.442 5.296-15.746 22.461-16.735q2.948-.17 5.79-.169c6.235 0 12.068.606 17.371 1.765-1.978 24.702-13.58 28.713-23.802 29.274"})})})},{name:"tiktok-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm7.531 3h2.053s-.114 2.635 2.85 2.82v2.04s-1.582.099-2.85-.87l.021 4.207a3.804 3.804 0 1 1-3.802-3.802h.533v2.082a1.73 1.73 0 0 0-1.922.648 1.727 1.727 0 0 0 1.947 2.646 1.73 1.73 0 0 0 1.19-1.642z"})})})},{name:"tiktok",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12.22 2h3.42s-.19 4.394 4.75 4.702v3.396s-2.636.166-4.75-1.448l.037 7.012a6.338 6.338 0 1 1-6.34-6.339h.89v3.472a2.882 2.882 0 1 0 2.024 2.752z"})})})},{name:"tripadvisor",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M21.01 9.859c.236-1.002.985-2.003.985-2.003l-3.341-.002C16.779 6.643 14.502 6 11.979 6 9.363 6 7 6.659 5.135 7.877L2 7.88s.74.988.98 1.983a4.98 4.98 0 0 0-.977 2.961 5.01 5.01 0 0 0 5.009 5.003 5 5 0 0 0 3.904-1.875l1.065 1.592 1.076-1.606a4.96 4.96 0 0 0 1.838 1.448 4.98 4.98 0 0 0 3.831.151 5.01 5.01 0 0 0 2.963-6.431 5 5 0 0 0-.679-1.247m-13.998 6.96a4 4 0 0 1-3.998-3.995 4 4 0 0 1 3.998-3.997 4 4 0 0 1 3.996 3.997 4 4 0 0 1-3.996 3.995m4.987-4.36A5.007 5.007 0 0 0 7.11 7.821c1.434-.613 3.081-.947 4.867-.947 1.798 0 3.421.324 4.853.966a4.984 4.984 0 0 0-4.831 4.619m6.288 4.134a3.97 3.97 0 0 1-3.058-.122 3.96 3.96 0 0 1-2.075-2.245v-.001a3.97 3.97 0 0 1 .118-3.056 3.97 3.97 0 0 1 2.246-2.077 4.005 4.005 0 0 1 5.135 2.366 4.006 4.006 0 0 1-2.366 5.135"}),(0,n.jsx)("path",{d:"M6.949 10.307a2.477 2.477 0 0 0-2.475 2.472 2.48 2.48 0 0 0 2.475 2.474 2.474 2.474 0 0 0 0-4.946m0 4.094a1.626 1.626 0 0 1-1.624-1.623 1.621 1.621 0 1 1 1.624 1.623M16.981 10.307a2.477 2.477 0 0 0-2.474 2.472 2.48 2.48 0 0 0 2.474 2.474 2.476 2.476 0 0 0 2.472-2.474 2.475 2.475 0 0 0-2.472-2.472m0 4.094a1.625 1.625 0 0 1-1.622-1.623 1.622 1.622 0 1 1 1.622 1.623"}),(0,n.jsx)("path",{d:"M7.778 12.778a.832.832 0 1 1-1.664.002.832.832 0 0 1 1.664-.002M16.981 11.947a.832.832 0 1 0 .002 1.666.832.832 0 0 0-.002-1.666"})]})})},{name:"tumblr-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M16.749 17.396c-.357.17-1.041.319-1.551.332-1.539.041-1.837-1.081-1.85-1.896V9.847h3.861v-2.91h-3.847V2.039h-2.817c-.046 0-.127.041-.138.144-.165 1.499-.867 4.13-3.783 5.181v2.484h1.945v6.282c0 2.151 1.587 5.206 5.775 5.135 1.413-.024 2.982-.616 3.329-1.126z"})})})},{name:"tumblr",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-5.569 14.265c-2.446.042-3.372-1.742-3.372-2.998v-3.668H8.923v-1.45c1.703-.614 2.113-2.15 2.209-3.025.007-.06.054-.084.081-.084h1.645V8.9h2.246v1.7H12.85v3.495c.008.476.182 1.131 1.081 1.107.298-.008.697-.094.906-.194l.54 1.601c-.205.296-1.121.641-1.946.656"})})})},{name:"twitch",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M16.499 8.089h-1.636v4.91h1.636zm-4.499 0h-1.637v4.91H12zM4.228 3.178 3 6.451v13.092h4.499V22h2.456l2.454-2.456h3.681L21 14.636V3.178zm15.136 10.638L16.5 16.681H12l-2.453 2.453V16.68H5.863V4.814h13.501z"})})})},{name:"twitter-alt",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M22.23 5.924a8.2 8.2 0 0 1-2.357.646 4.12 4.12 0 0 0 1.804-2.27 8.2 8.2 0 0 1-2.606.996 4.103 4.103 0 0 0-6.991 3.742 11.65 11.65 0 0 1-8.457-4.287 4.1 4.1 0 0 0-.556 2.063 4.1 4.1 0 0 0 1.825 3.415 4.1 4.1 0 0 1-1.859-.513v.052a4.104 4.104 0 0 0 3.292 4.023 4.1 4.1 0 0 1-1.853.07 4.11 4.11 0 0 0 3.833 2.85 8.24 8.24 0 0 1-5.096 1.756 8 8 0 0 1-.979-.057 11.6 11.6 0 0 0 6.29 1.843c7.547 0 11.675-6.252 11.675-11.675q0-.267-.012-.531a8.3 8.3 0 0 0 2.047-2.123"})})})},{name:"twitter",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m-2.534 6.71q.007.148.007.298c0 3.045-2.318 6.556-6.556 6.556a6.5 6.5 0 0 1-3.532-1.035q.27.032.55.032a4.63 4.63 0 0 0 2.862-.986 2.31 2.31 0 0 1-2.152-1.6 2.3 2.3 0 0 0 1.04-.04 2.306 2.306 0 0 1-1.848-2.259v-.029c.311.173.666.276 1.044.288a2.303 2.303 0 0 1-.713-3.076 6.54 6.54 0 0 0 4.749 2.407 2.305 2.305 0 0 1 3.926-2.101 4.6 4.6 0 0 0 1.463-.559 2.3 2.3 0 0 1-1.013 1.275c.466-.056.91-.18 1.323-.363-.31.461-.7.867-1.15 1.192"})})})},{name:"untappd",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"m11 13.299-5.824 8.133c-.298.416-.8.635-1.308.572-.578-.072-1.374-.289-2.195-.879S.392 19.849.139 19.323a1.4 1.4 0 0 1 .122-1.425l5.824-8.133a3.1 3.1 0 0 1 1.062-.927l1.146-.604c.23-.121.436-.283.608-.478.556-.631 2.049-2.284 4.696-4.957l.046-.212a.13.13 0 0 1 .096-.1l.146-.037a.135.135 0 0 0 .101-.141l-.015-.18a.13.13 0 0 1 .125-.142c.176-.005.518.046 1.001.393s.64.656.692.824a.13.13 0 0 1-.095.164l-.175.044a.13.13 0 0 0-.101.141l.012.15a.13.13 0 0 1-.063.123l-.186.112c-1.679 3.369-2.764 5.316-3.183 6.046a2.2 2.2 0 0 0-.257.73l-.205 1.281A3.1 3.1 0 0 1 11 13.3zm12.739 4.598-5.824-8.133a3.1 3.1 0 0 0-1.062-.927l-1.146-.605a2.1 2.1 0 0 1-.608-.478 51 51 0 0 0-.587-.654.09.09 0 0 0-.142.018 97 97 0 0 1-1.745 3.223 1.4 1.4 0 0 0-.171.485 3.5 3.5 0 0 0 0 1.103l.01.064c.075.471.259.918.536 1.305l5.824 8.133c.296.413.79.635 1.294.574a4.76 4.76 0 0 0 2.209-.881 4.76 4.76 0 0 0 1.533-1.802 1.4 1.4 0 0 0-.122-1.425zM8.306 3.366l.175.044a.134.134 0 0 1 .101.141l-.012.15a.13.13 0 0 0 .063.123l.186.112q.465.933.869 1.721c.026.051.091.06.129.019q.655-.703 1.585-1.668a.137.137 0 0 0 .003-.19c-.315-.322-.645-.659-1.002-1.02l-.046-.212a.13.13 0 0 0-.096-.099l-.146-.037a.135.135 0 0 1-.101-.141l.015-.18a.13.13 0 0 0-.123-.142c-.175-.005-.518.045-1.002.393-.483.347-.64.656-.692.824a.13.13 0 0 0 .095.164z"})})})},{name:"vimeo",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M22.396 7.164q-.139 3.039-4.245 8.32Q13.907 21 10.97 21q-1.82 0-3.079-3.359l-1.68-6.159q-.934-3.36-2.005-3.36-.234.001-1.634.98l-.978-1.261q1.541-1.353 3.037-2.708 2.056-1.774 3.084-1.869 2.429-.234 2.99 3.321.607 3.836.841 4.769.7 3.181 1.542 3.181.653 0 1.963-2.065 1.307-2.063 1.401-3.142.187-1.781-1.401-1.782-.747.001-1.541.341 1.534-5.024 5.862-4.884 3.21.095 3.024 4.161"})})})},{name:"vk",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M1.687 1.687C0 3.374 0 6.09 0 11.52v.96c0 5.431 0 8.146 1.687 9.833S6.09 24 11.52 24h.96c5.431 0 8.146 0 9.833-1.687S24 17.91 24 12.48v-.96c0-5.431 0-8.146-1.687-9.833S17.91 0 12.48 0h-.96C6.09 0 3.374 0 1.687 1.687M4.05 7.3c.13 6.24 3.25 9.99 8.72 9.99h.31v-3.57c2.01.2 3.53 1.67 4.14 3.57h2.84c-.78-2.84-2.83-4.41-4.11-5.01 1.28-.74 3.08-2.54 3.51-4.98h-2.58c-.56 1.98-2.22 3.78-3.8 3.95V7.3H10.5v6.92c-1.6-.4-3.62-2.34-3.71-6.92z"})})})},{name:"whatsapp",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"m2.048 22 1.406-5.136a9.9 9.9 0 0 1-1.323-4.955C2.133 6.446 6.579 2 12.042 2a9.85 9.85 0 0 1 7.011 2.906 9.85 9.85 0 0 1 2.9 7.011c-.002 5.464-4.448 9.91-9.91 9.91h-.004a9.9 9.9 0 0 1-4.736-1.206zm5.497-3.172.301.179a8.2 8.2 0 0 0 4.193 1.148h.003c4.54 0 8.235-3.695 8.237-8.237a8.2 8.2 0 0 0-2.41-5.828 8.18 8.18 0 0 0-5.824-2.416c-4.544 0-8.239 3.695-8.241 8.237a8.2 8.2 0 0 0 1.259 4.384l.196.312-.832 3.04zm9.49-4.554c-.062-.103-.227-.165-.475-.289s-1.465-.723-1.692-.806-.392-.124-.557.124-.64.806-.784.971-.289.186-.536.062-1.046-.385-1.991-1.229c-.736-.657-1.233-1.468-1.378-1.715s-.015-.382.109-.505c.111-.111.248-.289.371-.434.124-.145.165-.248.248-.413s.041-.31-.021-.434-.557-1.343-.763-1.839c-.202-.483-.407-.417-.559-.425-.144-.007-.31-.009-.475-.009a.9.9 0 0 0-.66.31c-.226.248-.866.847-.866 2.066s.887 2.396 1.011 2.562 1.746 2.666 4.23 3.739c.591.255 1.052.408 1.412.522.593.189 1.133.162 1.56.098.476-.071 1.465-.599 1.671-1.177.206-.58.206-1.075.145-1.179"})})})},{name:"woocommerce",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M19 2H5C3.3 2 2 3.3 2 5v11c0 1.7 1.3 3 3 3h4l6 3-1-3h5c1.7 0 3-1.3 3-3V5c0-1.7-1.3-3-3-3m-1.6 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7s-.3.4-.6.4-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6q.75 0 .9.9c.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2q.3.3.3.6c0 .3 0 .4-.1.5"})})})},{name:"wordpress",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M12.158 12.786 9.46 20.625a9 9 0 0 0 5.526-.144 1 1 0 0 1-.065-.124zM3.009 12a8.99 8.99 0 0 0 5.067 8.092L3.788 8.341A8.95 8.95 0 0 0 3.009 12m15.06-.454c0-1.112-.399-1.881-.741-2.48-.456-.741-.883-1.368-.883-2.109 0-.826.627-1.596 1.51-1.596q.06.002.116.007A8.96 8.96 0 0 0 12 3.009a8.98 8.98 0 0 0-7.512 4.052c.211.007.41.011.579.011.94 0 2.396-.114 2.396-.114.484-.028.541.684.057.741 0 0-.487.057-1.029.085l3.274 9.739 1.968-5.901-1.401-3.838c-.484-.028-.943-.085-.943-.085-.485-.029-.428-.769.057-.741 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.485-.028.542.684.057.741 0 0-.488.057-1.029.085l3.249 9.665.897-2.996q.684-1.753.684-2.907m1.82-3.86q.06.428.06.924c0 .912-.171 1.938-.684 3.22l-2.746 7.94a8.98 8.98 0 0 0 4.47-7.771 8.9 8.9 0 0 0-1.1-4.313M12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})})})},{name:"x",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387z"})})})},{name:"xanga",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M9 9h6v6H9zM3 9h6V3H3zm12 0h6V3h-6zm0 12h6v-6h-6zM3 21h6v-6H3z"})})})},{name:"youtube",svg:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)("g",{children:(0,n.jsx)("path",{d:"M21.8 8.001s-.195-1.378-.795-1.985c-.76-.797-1.613-.801-2.004-.847-2.799-.202-6.997-.202-6.997-.202h-.009s-4.198 0-6.997.202c-.39.047-1.242.051-2.003.847-.6.607-.795 1.985-.795 1.985S2 9.62 2 11.238v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.761.797 1.76.771 2.205.855 1.6.153 6.8.201 6.8.201s4.203-.006 7.001-.209c.391-.047 1.243-.051 2.004-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517c0-1.618-.2-3.237-.2-3.237M9.935 14.594l-.001-5.62 5.404 2.82z"})})})}]},58992:(e,t,r)=>{"use strict";r.d(t,{d:()=>l});var n=r(28120),s=r.n(n),o=r(51609),a=r(91135),i=r(10790);class l extends o.PureComponent{static defaultProps={size:24};static propTypes={icon:s().string.isRequired,size:s().number,onClick:s().func,className:s().string};render(){const{size:e,onClick:t,icon:r,className:n,...s}=this.props,l=["social-logo","social-logo-"+r,n].filter(Boolean).join(" "),c=a.$.find((e=>e.name===r));if(!c)return(0,i.jsx)("svg",{height:e,width:e,...s});return(0,o.cloneElement)(c.svg,{className:l,height:e,width:e,onClick:t,...s})}}},4187:(e,t,r)=>{"use strict";r.d(t,{Ck:()=>a,wf:()=>o});var n=r(43172);let s=null;const o=async()=>{let e=0;return s=new Promise((t=>{const r=()=>{const s=(0,n.qg)(document.cookie).tk_ai||null;"string"!=typeof s||""===s?99<=e?t(null):(e+=1,setTimeout(r,50)):t(s)};r()})),s},a=async()=>await s},57344:(e,t,r)=>{"use strict";r.d(t,{V:()=>u,z:()=>c});var n=r(1455),s=r.n(n),o=r(93832),a=r(10067);const i=r.n(a)()("jetpack-explat:client:assignment"),l=(e=!1)=>async({experimentName:t,anonId:r})=>{if(!r)throw i("anonId is null"),new Error("Tracking is disabled, can't fetch experimentAssignment");const n={experiment_name:t,anon_id:r??void 0,as_connected_user:e};i("params",n);const a=(0,o.addQueryArgs)("jetpack/v4/explat/assignments",n);return i("assignmentsRequestUrl",a),await s()({path:a})},c=l(!1),u=l(!0)},54639:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});var n=r(98548);const s=e=>{const t=e=>{n.D&&console.error("[ExPlat] Unable to send error to server:",e)};try{const{message:r,...s}=e,o={message:r,properties:{...s,context:"explat",explat_client:"jetpack"}};if(n.D)console.error("[ExPlat] ",e.message,e);else{const e=new window.FormData;e.append("error",JSON.stringify(o)),window.fetch("https://public-api.wordpress.com/rest/v1.1/js-error",{method:"POST",body:e}).catch(t)}}catch(e){t(e)}}},99101:(e,t,r)=>{"use strict";r.d(t,{Pg:()=>p,kU:()=>n.k});var n=r(39292),s=r(40090),o=r(10067),a=r.n(o),i=r(4187),l=r(57344),c=r(54639),u=r(98548);const d=a()("jetpack-explat:client"),p=async()=>(d("initializing explat"),(0,i.wf)().catch((e=>(0,c.v)({message:e.message}))));p();const h=(0,n.k)({fetchExperimentAssignment:l.z,getAnonId:i.Ck,logError:c.v,isDevelopmentMode:u.D}),{loadExperimentAssignment:m,dangerouslyGetExperimentAssignment:g}=h,{useExperiment:f,Experiment:b,ProvideExperimentData:v}=(0,s.A)(h),k=(0,n.k)({fetchExperimentAssignment:l.V,getAnonId:i.Ck,logError:c.v,isDevelopmentMode:u.D}),{loadExperimentAssignment:y,dangerouslyGetExperimentAssignment:x}=k,{useExperiment:j,Experiment:w,ProvideExperimentData:_}=(0,s.A)(k)},98548:(e,t,r)=>{"use strict";r.d(t,{D:()=>n});const n=!1},52068:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>y});var n=r(96865),s=r(56427),o=r(47143),a=r(27723),i=r(90254),l=r(69457),c=r(88669),u=r(41417),d=r(57003),p=r(27571),h=r(2162),m=r(62402),g=r(10790);const __=a.__,f="simplify",b="make-longer",v="make-shorter",k={default:[{name:n.DD,key:"correct-spelling",aiSuggestion:n.yy,icon:i.A}],"core/paragraph":[{name:n.HM,key:f,aiSuggestion:n.A4,icon:l.A},{name:n.JR,key:"summarize",aiSuggestion:n.UA,icon:c.A},{name:n.K2,key:b,aiSuggestion:n.br,icon:u.A},{name:n.UD,key:v,aiSuggestion:n.fD,icon:u.A}],"core/list-item":[{name:n.HM,key:f,aiSuggestion:n.A4,icon:l.A},{name:n.K2,key:b,aiSuggestion:n.br,icon:u.A},{name:n.UD,key:v,aiSuggestion:n.fD,icon:u.A}],"core/list":p.L.includes("core/list")?[{name:n.HM,key:f,aiSuggestion:n.A4,icon:l.A},{name:n.K2,key:b,aiSuggestion:n.br,icon:u.A},{name:n.UD,key:v,aiSuggestion:n.fD,icon:u.A},{name:n.mI,key:"turn-list-into-table",aiSuggestion:n.d5,icon:d.A,options:{alwaysTransformToAIAssistant:!0,rootParentOnly:!0}}]:[{name:n.yQ,key:"write-post-from-list",aiSuggestion:n.pE,icon:l.A,options:{userPrompt:"Write a post based on the list items. Include a title as first order heading and try to use secondary headings for each entry"}}]};function y({blockType:e,clientId:t,disabled:r=!1,onAskAiAssistant:a,onRequestSuggestion:i}){const l=k[e]??[],{getBlockParents:c}=(0,o.select)("core/block-editor"),u=c(t);return(0,g.jsxs)(g.Fragment,{children:[r&&(0,g.jsx)(s.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info",children:__("Add content to activate the tools below","jetpack")}),(0,g.jsxs)(s.MenuGroup,{children:[(0,g.jsx)(s.MenuItem,{icon:n.cj,iconPosition:"left",onClick:a,disabled:r,children:(0,g.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:__("Ask AI Assistant","jetpack")})},"key-ai-assistant"),[...k.default,...l].filter((e=>!(e.options?.rootParentOnly&&u.length>0))).map((e=>(0,g.jsx)(s.MenuItem,{icon:e?.icon,iconPosition:"left",onClick:()=>{i(e.aiSuggestion,{...e.options??{}})},disabled:r,children:(0,g.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:e.name})},`key-${e.key}`))),(0,g.jsx)(m.hN,{onChange:e=>{i(n.eJ,{tone:e})},disabled:r}),(0,g.jsx)(h.HU,{onChange:e=>{i(n.Gm,{language:e})},disabled:r})]})]})}},32249:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(3924),s=r(56427),o=r(27723),a=r(10790);const __=o.__;const i=function(){const e=(0,n.A)("jetpack-ai-feedback");return(0,a.jsx)("div",{className:"jetpack-ai-feedback-control",children:(0,a.jsxs)(s.BaseControl,{children:[(0,a.jsx)(s.BaseControl.VisualLabel,{children:__("Feedback","jetpack")}),(0,a.jsx)("p",{children:__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")}),(0,a.jsx)(s.ExternalLink,{href:e,children:__("Share your feedback","jetpack")})]})})}},2162:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>g,HU:()=>f});var n=r(96865),s=r(85985),o=r(56427),a=r(27723),i=r(51113),l=r(84066),c=r(29115),u=r(10790);const __=a.__,d=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],p=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,h=p?.split("-")[0]||"en",m=(p?.split("-"),({value:e,onChange:t})=>{const r=[...d.filter((e=>e!==h))];return d.includes(h)&&r.unshift(h),(0,u.jsx)(o.MenuGroup,{label:__("Select language","jetpack"),children:r.map((r=>(0,u.jsx)(o.MenuItem,{onClick:()=>t(r+" ("+n.so[r].label+")"),isSelected:e===r,children:n.so[r].label},`key-${r}`)))})});function g({value:e=h,label:t=n.u0,onChange:r,disabled:a=!1}){const{tracks:c}=(0,s.st)();return a?(0,u.jsx)(o.Tooltip,{text:t,children:(0,u.jsx)(o.Button,{disabled:!0,children:(0,u.jsx)(i.A,{icon:l.A})})}):(0,u.jsx)(o.ToolbarDropdownMenu,{icon:l.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})},children:()=>(0,u.jsx)(m,{value:e,onChange:r})})}function f({value:e=h,label:t=n.u0,onChange:r,disabled:s=!1}){return(0,u.jsx)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:l.A,label:t,toggleProps:{children:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"ai-assistant__i18n-dropdown__toggle-label",children:t}),(0,u.jsx)(i.A,{icon:c.A})]}),disabled:s},children:({onClose:t})=>(0,u.jsx)(m,{onChange:(...e)=>{r(...e),t()},value:e})})}},99050:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u});var n=r(96865),s=r(85985),o=r(56427),a=r(27723),i=r(78938),l=r(10790);const __=a.__,c=[{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:n.UA},{name:__("Make longer","jetpack"),key:"make-longer",aiSuggestion:n.br},{name:__("Make shorter","jetpack"),key:"make-shorter",aiSuggestion:n.fD}];function u({key:e,label:t=__("Improve","jetpack"),exclude:r=[],onChange:n,disabled:a=!1}){const{tracks:u}=(0,s.st)();return a?(0,l.jsx)(o.Tooltip,{text:t,children:(0,l.jsx)(o.Button,{disabled:!0,children:(0,l.jsx)(o.Icon,{icon:i.A})})}):(0,l.jsx)(o.ToolbarDropdownMenu,{icon:i.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})},children:()=>{const s=c.filter((e=>!r.includes(e.key)));return(0,l.jsx)(o.MenuGroup,{label:t,children:s.map((t=>(0,l.jsx)(o.MenuItem,{onClick:()=>n(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key,children:t.name},`key-${t.key}`)))})}})}},33468:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>f});var n=r(96865),s=r(85985),o=r(56427),a=r(27723),i=r(78938),l=r(41417),c=r(90254),u=r(69457),d=r(88669),p=r(11269),h=r(10790);const __=a.__,m=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about","jetpack")+" "}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining","jetpack")+" "}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on","jetpack")+" "}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on","jetpack")+" "}}],g=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that","jetpack")+" "}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about","jetpack")+" "}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about","jetpack")+" "}}];function f({hasContentBefore:e,hasContent:t,hasPostTitle:r,contentIsLoaded:a,onPromptSelect:f,onSuggestionSelect:b}){const v=__("Write with AI…","jetpack"),{tracks:k}=(0,s.st)();return(0,h.jsx)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:v,text:v,onToggle:e=>{e&&k.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})},children:({onClose:s})=>a?(0,h.jsx)(o.MenuGroup,{label:__("Write…","jetpack"),children:g.map(((e,t)=>(0,h.jsx)(o.MenuItem,{icon:i.A,iconPosition:"left",onClick:()=>{s(),f(e.description)},children:e.label},`key-${t}`)))}):(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsxs)(o.MenuGroup,{label:__("Based on preceding content…","jetpack"),children:[(0,h.jsx)(o.MenuItem,{icon:l.A,iconPosition:"left",onClick:()=>b(n.sn),children:n.DT}),(0,h.jsx)(o.MenuItem,{icon:c.A,iconPosition:"left",onClick:()=>b(n.yy),children:n.DD}),(0,h.jsx)(o.MenuItem,{icon:u.A,iconPosition:"left",onClick:()=>b(n.A4),children:n.HM})]}),t&&(0,h.jsxs)(o.MenuGroup,{label:__("Based on entire content…","jetpack"),children:[t&&(0,h.jsx)(o.MenuItem,{icon:d.A,iconPosition:"left",onClick:()=>b(n.UA),children:n.JR}),t&&(0,h.jsx)(o.MenuItem,{icon:p.A,iconPosition:"left",onClick:()=>b(n.vE),children:n.mT})]}),(0,h.jsxs)(o.MenuGroup,{label:__("Write…","jetpack"),children:[r&&(0,h.jsx)(o.MenuItem,{icon:i.A,iconPosition:"left",onClick:()=>b(n.im),children:n.Rq}),m.map(((e,t)=>(0,h.jsx)(o.MenuItem,{icon:i.A,iconPosition:"left",onClick:()=>{s(),f(e.description)},children:e.label},`key-${t}`)))]})]})})}},62402:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>h,US:()=>u,hN:()=>p});var n=r(96865),s=r(85985),o=r(56427),a=r(27723),i=r(29115),l=r(10790);const __=a.__,c=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d=({value:e,onChange:t})=>(0,l.jsx)(o.MenuGroup,{label:__("Select tone","jetpack"),children:c.map((r=>(0,l.jsx)(o.MenuItem,{onClick:()=>t(r),isSelected:e===r,children:`${n.oZ[r].emoji} ${n.oZ[r].label}`},`key-${r}`)))});function p({label:e=n.uQ,value:t=u,onChange:r,disabled:s=!1}){return(0,l.jsx)(o.DropdownMenu,{icon:n.Qr,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"ai-assistant__tone-dropdown__toggle-label",children:e}),(0,l.jsx)(o.Icon,{icon:i.A})]}),disabled:s},children:({onClose:e})=>(0,l.jsx)(d,{value:t,onChange:t=>{r(t),e()}})})}function h({value:e=u,onChange:t,disabled:r=!1}){const{tracks:a}=(0,s.st)();return r?(0,l.jsx)(o.Tooltip,{text:n.uQ,children:(0,l.jsx)(o.Button,{disabled:!0,children:(0,l.jsx)(o.Icon,{icon:n.Qr})})}):(0,l.jsx)(o.ToolbarDropdownMenu,{icon:n.Qr,label:n.uQ,popoverProps:{variant:"toolbar"},disabled:r,onToggle:e=>{e&&a.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})},children:()=>(0,l.jsx)(d,{value:e,onChange:t})})}},51698:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(96865),s=r(94715),o=r(56427),a=r(27723),i=r(83883),l=r(83822),c=r(2162),u=r(99050),d=r(33468),p=r(62402),h=r(10790);const __=a.__,m=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:r,handleAcceptContent:a,handleTryAgain:m,showRetry:g,contentBefore:f,hasPostTitle:b,wholeContent:v,setUserPrompt:k,recordEvent:y,isGeneratingTitle:x})=>(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(s.BlockControls,{children:[!g&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(o.ToolbarGroup,{children:(0,h.jsx)(d.Ay,{hasContentBefore:!!f?.length,hasContent:!!v?.length,hasPostTitle:b,contentIsLoaded:e,onPromptSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),k(e.translated)},onSuggestionSelect:e=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})}),(0,h.jsxs)(s.BlockControls,{group:"block",children:[(0,h.jsx)(p.Ay,{value:"neutral",onChange:r=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:n.eJ}),t(n.eJ,{tone:r,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(c.Ay,{value:"en",onChange:r=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:n.Gm}),t(n.Gm,{language:r,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(u.Ay,{onChange:t,exclude:x?["summarize"]:[],disabled:!e})]})]}),(g||m)&&(0,h.jsxs)(o.ToolbarGroup,{children:[!g&&e&&m&&(0,h.jsx)(o.ToolbarButton,{onClick:m,children:__("Try Again","jetpack")}),g&&e&&(0,h.jsx)(o.ToolbarButton,{icon:i.A,onClick:a,children:__("Accept","jetpack")}),g&&(0,h.jsx)(o.ToolbarButton,{icon:l.A,onClick:r,children:__("Retry","jetpack")})]})]})})},3586:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(96865),s=r(85985),o=r(94715),a=r(74997),i=r(56427),l=r(29491),c=r(47143),u=r(86087),d=r(27723),p=r(13022),h=r(27970),m=r(56199),g=r(2274),f=r(32249),b=r(51698),v=r(4393),k=r(44732),y=r(76695),x=r(10790);const __=d.__,j="post"===window?.Jetpack_Editor_Initial_State?.screenBase;function w({attributes:e,setAttributes:t,clientId:r,isSelected:d}){const[w,_]=(0,u.useState)(null),{tracks:C}=(0,s.st)(),{getBlock:A}=(0,c.useSelect)("core/block-editor"),S=(0,u.useRef)(null),E=(0,u.useRef)(null),{replaceBlocks:N,removeBlock:T}=(0,c.useDispatch)("core/block-editor"),{editPost:B}=(0,c.useDispatch)("core/editor"),[P,I]=(0,u.useState)((0,n.MB)(e.preTransformAction)),{isOverLimit:M,requireUpgrade:L,increaseRequestsCount:R,requestsCount:D,requestsLimit:F,currentTier:O,loading:z,tierPlansEnabled:U}=(0,n.yM)(),H=Math.max(F-D,0),{autosaveAndRedirect:V}=(0,n.ON)(),q=(0,s.Bd)(O),G=()=>{setTimeout((()=>{S.current?.focus?.()}),100)},$=()=>{setTimeout((()=>{E.current?.focus?.()}),100)},W=(0,l.useViewportMatch)("medium","<"),Z=(0,u.useRef)(null),{getSuggestionFromOpenAI:J,stopSuggestion:K,showRetry:Y,contentBefore:Q,postTitle:X,retryRequest:ee,wholeContent:te,requestingState:re,error:ne}=(0,v.A)({onSuggestionDone:(0,u.useCallback)((e=>{G(),e||R()}),[R]),onUnclearPrompt:(0,u.useCallback)((()=>{$(),R()}),[R]),onModeration:G,attributes:e,clientId:r,content:e.content,tracks:C,userPrompt:e.userPrompt,requireUpgrade:L,initialRequestingState:e.requestingState,contentRef:Z,blockRef:E}),se="requesting"===re,oe=["requesting","suggesting"].includes(re),ae=(0,s.xI)(),{productPageUrl:ie}=(0,k.A)(),le=(0,y.y)(r);(0,u.useEffect)((()=>{if(!le)return;const e=JSON.parse(localStorage.getItem(le));if(!e)return;const{type:t,options:r}=e;localStorage.removeItem(le),J(t,r)}),[le,J]),(0,u.useEffect)((()=>{ne&&_(!1)}),[ne]),(0,u.useEffect)((()=>{["init","done"].includes(re)&&t({requestingState:re})}),[re,t]);const ce=!!e.content,ue=e.promptType===n.vE,de=__("Accept","jetpack"),pe=__("Accept title","jetpack"),he=ue?pe:de,me=async()=>{let t=[],s=(0,n._E)({content:e.content||""});if(s?.split("\n").length>1&&s?.split("\n")?.[0]?.match(/^

    .*<\/h1>$/)&&!X){const e=s.split("\n"),t=e.shift();s=e.join("\n"),B({title:t.replace(/<[^>]*>/g,"")})}t=(0,a.rawHandler)({HTML:s}),await N(r,t);const o=(e=>{let t=null;return e.forEach((e=>{const r=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!r)return;"true"===r.contentEditable&&(t=r);const n=r.querySelectorAll("[contenteditable=true]");t=n.length?n[n.length-1]:t})),t})(t);o&&(e=>{const t=e.ownerDocument.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(o)},ge=()=>{me(),C.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},fe=()=>{j?(B({title:e.content?e.content.trim():""}),T(r),C.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):ge()},be=()=>{K(),G(),C.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},ve=(0,o.useBlockProps)({ref:E,className:(0,p.A)({"is-waiting-response":se})}),ke=__("Ask Jetpack AI…","jetpack"),ye=__("Write about… Make a table for…","jetpack"),xe=(0,x.jsxs)(x.Fragment,{children:[M&&d&&(0,x.jsx)(n.Hb,{placement:"ai-assistant-block"}),!ae&&(0,x.jsx)(g.A,{block:"AI Assistant"})]}),je=(0,x.jsx)(x.Fragment,{children:ne?.message&&!w&&"error_quota_exceeded"!==ne?.code&&(0,x.jsx)(i.Notice,{status:ne.status,isDismissible:!1,className:"jetpack-ai-assistant__error",children:ne.message})}),we=M&&q===s.Ti?(0,x.jsx)(n.QA,{variant:"muted"}):null,_e=(0,u.useCallback)((e=>{e.preventDefault(),C.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:O?.slug,requests_count:D,placement:"jetpack_ai_assistant_block"}),V(e)}),[C,O,D,V]);return(0,x.jsx)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(re)&&be()}},children:(0,x.jsxs)("div",{...ve,children:[ce&&(0,x.jsx)("div",{ref:Z,className:"jetpack-ai-assistant__content",children:(0,x.jsx)(u.RawHTML,{children:(0,n._E)({content:e.content||""})})}),(0,x.jsxs)(o.InspectorControls,{children:[we&&(0,x.jsxs)("div",{className:"block-editor-block-card",style:{paddingTop:0},children:[(0,x.jsx)("span",{className:"block-editor-block-icon"}),we]}),(0,x.jsxs)("div",{className:"block-editor-block-card",style:{paddingTop:0},children:[(0,x.jsx)("span",{className:"block-editor-block-icon"}),(0,x.jsx)(i.ExternalLink,{href:ie,children:__("Discover all features","jetpack")})]}),(q===s._X||U&&q!==s.Ti)&&(0,x.jsx)(i.PanelBody,{initialOpen:!0,children:(0,x.jsx)(i.PanelRow,{children:(0,x.jsx)(h.A,{placement:m.k})})}),(0,x.jsx)(i.PanelBody,{initialOpen:!0,children:(0,x.jsx)(i.PanelRow,{children:(0,x.jsx)(f.A,{})})})]}),!oe&&ae&&!L&&(0,x.jsx)(b.A,{isWaitingState:oe,contentIsLoaded:ce,getSuggestionFromOpenAI:(e,t)=>{const r=(0,n.MB)(e,t);I(r),J(e,t)},retryRequest:ee,handleAcceptContent:ge,handleAcceptTitle:fe,handleTryAgain:null,showRetry:Y,contentBefore:Q,hasPostTitle:!!X?.length,wholeContent:te,promptType:e.promptType,setUserPrompt:e=>{if(!S?.current)return;S.current.focus(),t({userPrompt:e})},recordEvent:C.recordEvent,isGeneratingTitle:ue}),(0,x.jsx)(n.N0,{ref:S,disabled:L||!ae,value:e.userPrompt,placeholder:e?.content?ke:ye,onChange:e=>{_(!0),t({userPrompt:e})},onSend:()=>{I(e.userPrompt),((...e)=>{J(...e),$()})("userPrompt"),C.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:be,onAccept:()=>{ue?fe():ge()},onDiscard:()=>{const n=e?.content===A(r).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),me(),n?C.recordEvent("jetpack_ai_assistant_block_dismiss"):C.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:re,isTransparent:L||!ae,showButtonLabels:!W,showAccept:"init"!==re&&ce&&!oe,acceptLabel:he,showGuideLine:ce,showRemove:e?.content?.length>0,banner:xe,error:je,customFooter:H%5!=0&&1!==D||z||q!==s._X?null:(0,x.jsx)(n.AK,{requestsRemaining:H,onUpgradeClick:_e}),lastAction:P})]})})}},61351:(e,t,r)=>{"use strict";var n=r(94375),s=r(54681),o=r(3586),a=r(13802);r(50797),r(78118);(0,n.M)(s,{edit:o.A,save:()=>null,transforms:a.Ay})},31124:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96865),s=r(56427),o=r(27723),a=r(10790);const __=o.__;function i({label:e=__("AI Assistant","jetpack"),behavior:t,onAction:r,onDropdownToggle:o,renderContent:i,behaviorContext:l,disabled:c}){return(0,a.jsx)(s.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:o,onToggle:i})=>(0,a.jsx)(s.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:()=>{if("function"!=typeof t)switch(t){case"action":r?.();break;case"dropdown":i()}else t({context:l})},"aria-haspopup":"true","aria-expanded":o,label:e,icon:n.cj,disabled:c}),onToggle:o,renderContent:i})}},9731:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(96865),s=r(85985),o=r(56427),a=r(86087),i=r(27723),l=r(52259),c=r(17913),u=r(10067),d=r.n(u),p=r(31124),h=r(89872),m=r(10790);const __=i.__,g=d()("jetpack-ai:image-extension-toolbar-dropdown"),f=(0,a.forwardRef)((({onClose:e,onRequestAltText:t,onRequestCaption:r,loadingAltText:s,loadingCaption:i},u)=>{const{requireUpgrade:d}=(0,n.yM)(),p=(0,a.useCallback)((async n=>{try{n===h.X?await(t?.()):await(r?.()),e?.()}catch(e){g("Error generating %s",n,e)}}),[t,r,e]);return(0,m.jsx)("div",{className:"jetpack-ai-assistant-image-toolbar-dropdown-wrapper",tabIndex:-1,ref:u,children:(0,m.jsxs)(o.MenuGroup,{children:[(0,m.jsx)(o.MenuItem,{icon:s?(0,m.jsx)(o.Spinner,{}):l.A,iconPosition:"left",onClick:()=>{p(h.X)},disabled:!!s||d,children:__("Generate alt text","jetpack")},"key-ai-assistant-alt-text"),(0,m.jsx)(o.MenuItem,{icon:i?(0,m.jsx)(o.Spinner,{}):c.A,iconPosition:"left",onClick:()=>{p(h.Q)},disabled:!!i||d,children:__("Generate caption","jetpack")},"key-ai-assistant-caption")]})})}));function b({label:e=__("AI Assistant","jetpack"),onRequestAltText:t,onRequestCaption:r,loadingAltText:o=!1,loadingCaption:i=!1,disabled:l=!1,wrapperRef:c}){const{requireUpgrade:u}=(0,n.yM)(),{tracks:d}=(0,s.st)(),h=(0,a.useCallback)((e=>{e&&(d.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:"core/image"}),u&&(0,n.Fs)())}),[u,d]),g=(0,a.useCallback)((()=>(d.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:"alt-text",block_type:"core/image"}),t?.())),[t,d]),b=(0,a.useCallback)((()=>(d.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:"caption",block_type:"core/image"}),r?.())),[r,d]);return(0,m.jsx)(p.A,{label:e,behavior:"dropdown",onDropdownToggle:h,disabled:l,renderContent:({onClose:e})=>(0,m.jsx)(f,{ref:c,onClose:e,onRequestAltText:g,onRequestCaption:b,loadingAltText:o,loadingCaption:i})})}},78118:(e,t,r)=>{"use strict";var n=r(96865),s=r(94715),o=r(29491),a=r(47143),i=r(43656),l=r(86087),c=r(52619),u=r(10067),d=r.n(u),p=r(16204),h=r(35317),m=r(48499),g=r(10821),f=r(4647),b=r(89872),v=r(9731),k=r(10790);const y=d()("jetpack-ai:image-extension"),x=(0,m.C)("ai-assistant-image-extension"),j={group:"block"};const w=(0,o.createHigherOrderComponent)((e=>{function t(t){const{increaseRequestsCount:r,dequeueAsyncRequest:o,requireUpgrade:c}=(0,n.yM)(),{getCurrentPostId:u,isImageBusy:d}=(0,a.useSelect)((e=>{const{getCurrentPostId:r}=e(i.store);return{getCurrentPostId:r,isImageBusy:e(p.M)?.isImageBusy(t.clientId)??!1}}),[t.clientId]),{getPostContent:h}=(0,n.dh)(),[m,g]=(0,l.useState)(d),[x,w]=(0,l.useState)(!1),{updateBlockAttributes:_}=(0,a.useDispatch)(i.store),{createNotice:C}=(0,a.useDispatch)("core/notices"),A=(0,l.useRef)(null),S=!!t.attributes.url,E=m||x;(0,l.useEffect)((()=>{g(d)}),[d]);const N=(e,t)=>{e===b.X?g(t):e===b.Q&&w(t)},T=(0,l.useCallback)((e=>{A.current&&(A.current.setAttribute("tabindex","0"),A.current.focus()),N(e,!0)}),[]),B=(0,l.useCallback)((e=>{C("error",e,{isDismissible:!0})}),[C]);(0,l.useEffect)((()=>{E||A.current&&A.current.setAttribute("tabindex","-1")}),[E]);const P=(0,l.useCallback)((async(e,s=!1)=>{if(!c){T(e);try{const a={};e===b.X&&(0,n.in)(t.clientId),e===b.Q&&(a.positions=[t.clientId]),o();const i=await(0,n.R0)([{role:"jetpack-ai",context:{type:e,content:h(f.P),...a,images:[{url:s?await(0,n.Zo)(t.attributes.url):t.attributes.url}]}}],{postId:u(),feature:"jetpack-ai-image-extension"});r();const l=JSON.parse(i?.replace?.(/^```json\s*/,"")?.replace(/```$/,""));if(e===b.X){const e=l.texts?.[0];_(t.clientId,{alt:e})}else if(e===b.Q){const e=l.captions?.[0];_(t.clientId,{caption:e})}N(e,!1)}catch(t){if(t?.message.includes("The image URL is invalid")&&!s)return y("Retrying with base64 image"),P(e,!0);y(`Error generating ${e}`,t),t?.message&&B(`Image ${e===b.X?"alt text":"caption"} generation failed: ${t.message}`),N(e,!1)}}}),[o,u,h,r,t.attributes.url,t.clientId,c,B,T,_]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(e,{...t}),(0,k.jsx)(s.BlockControls,{...j,children:(0,k.jsx)(v.A,{onRequestAltText:()=>P(b.X),onRequestCaption:()=>P(b.Q),loadingAltText:m,loadingCaption:x,disabled:!S,wrapperRef:A})})]})}return r=>(0,h.A)(r.name)?(0,k.jsx)(t,{...r}):(0,k.jsx)(e,{...r})}),"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-image-extension",(function(e,t){var r;return(r=t,!!(0,g.Bi)()&&!!x&&"core/image"===r)?{...e,edit:w(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},10821:(e,t,r)=>{"use strict";r.d(t,{Bi:()=>i});var n=r(85985),s=r(74997),o=r(47143);const a=(0,r(48499).C)("ai-assistant-support");function i(){if(!(0,s.getBlockType)("jetpack/ai-assistant"))return!1;if(!a)return!1;if(!(0,n.xI)())return!1;const{getHiddenBlockTypes:e}=(0,o.select)("core/edit-post")||{};return!(e?.()||[]).includes("jetpack/ai-assistant")}},4647:(e,t,r)=>{"use strict";r.d(t,{P:()=>s});var n=r(96865);const s=e=>{const t=(0,n._G)().filter((e=>"core/image"===e.name));let r=0;return e=(e=e.replace(/]*>.*?<\/figcaption>/g,"")).replace(//gs,(()=>{const e=t[r];return r++,e?``:""}))}},52998:(e,t,r)=>{"use strict";r.d(t,{mt:()=>a});var n=r(96865),s=r(74997),o=r(47143);class a{renderRules=[];firstUpdate=!0;behavior="dropdown";isChildBlock=!1;feature="ai-assistant";adjustPosition=!0;startOpen=!1;hideOnBlockFocus=!0;supports={};constructor(e,t=[]){this.clientId=e,this.renderRules=t}getBlock(){const{getBlock:e}=(0,o.select)("core/block-editor");return e(this.clientId)}getContent(){const e=this.getBlock();return t=(0,s.getBlockContent)(e),(0,n.rh)({content:t});var t}renderContent(e){return function(e,t=[]){return(0,n._E)({content:e,rules:t,extension:!0})}(e,this.renderRules)}onSuggestion(e){if(!e)return;const t=this.renderContent(e);this.replaceBlockContent(t)}onDone(e){this.firstUpdate=!0}replaceBlockContent(e){const[t]=(0,s.rawHandler)({HTML:e});if(!t)return;const{updateBlockAttributes:r,replaceInnerBlocks:n,__unstableMarkNextChangeAsNotPersistent:a}=(0,o.dispatch)("core/block-editor");this.firstUpdate?this.firstUpdate=!1:a(),r(this.clientId,t.attributes),a(),n(this.clientId,t.innerBlocks)}getExtensionInputPlaceholder(){return null}}},96306:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(96865),s=r(85985),o=r(86087),a=r(27723),i=r(13022),l=r(10790);const __=a.__,c=(0,i.A)("jetpack-ai-assistant-extension-ai-input","wp-block");function u({customPlaceholder:e,className:t,requestingState:r,requestingError:a,inputRef:u,wrapperRef:d,action:p,blockType:h,feature:m,request:g,stopSuggestion:f,close:b,undo:v,tryAgain:k,lastAction:y}){const x=e||__("Ask Jetpack AI to edit…","jetpack"),[j,w]=(0,o.useState)(""),[_,C]=(0,o.useState)(x),{checkoutUrl:A}=(0,n.ON)(),{tracks:S}=(0,s.st)(),[E,N]=(0,o.useState)(0),[T,B]=(0,o.useState)(!1),{requireUpgrade:P,requestsCount:I,requestsLimit:M,loading:L,nextTier:R,currentTier:D}=(0,n.yM)(),F=(0,o.useMemo)((()=>P||["requesting","suggesting"].includes(r)),[P,r]),O=(0,o.useMemo)((()=>P&&1===D?.value),[P,D]),z=(0,o.useCallback)((()=>{S.recordEvent("jetpack_ai_assistant_extension_generate",{block_type:h,feature:m}),g?.(j)}),[h,m,g,S,j]),U=(0,o.useCallback)((()=>{S.recordEvent("jetpack_ai_assistant_extension_stop",{block_type:h}),C(x),f?.()}),[h,x,f,S]);const H=(0,o.useCallback)((()=>{S.recordEvent("jetpack_ai_assistant_undo",{block_type:h,prompt:y||null}),v?.()}),[h,y,S,v]),V=(0,o.useCallback)((()=>{S.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:D?.slug,requests_count:I,placement:"jetpack_ai_assistant_extension"})}),[D?.slug,I,S]),q=(0,o.useCallback)((()=>{S.recordEvent("jetpack_ai_assistant_try_again",{block_type:h}),k?.()}),[h,S,k]);return(0,o.useEffect)((()=>{["init","done"].includes(r)&&w("")}),[r]),(0,o.useEffect)((()=>{C(p||x),p&&w("")}),[p,x]),(0,o.useEffect)((()=>{B(!L&&!!R&&0===j.length)}),[L,R,j]),(0,o.useEffect)((()=>{const e=Math.max(M-I,0);N(e)}),[M,I]),(0,l.jsx)(n.FC,{className:(0,i.A)(c,t),placeholder:_,disabled:F,value:j,state:r,showGuideLine:!0,error:a,requestsRemaining:E,showUpgradeMessage:T,showFairUsageMessage:O,upgradeUrl:A,onChange:w,onSend:z,onStop:U,onClose:function(){b?.()},onUndo:H,onUpgrade:V,onTryAgain:q,wrapperRef:d,ref:u,lastAction:y,blockType:h})}},37931:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(85985),s=r(86087),o=r(27723),a=r(52068),i=r(76695),l=r(31124),c=r(21785),u=r(10790);const __=o.__;function d({blockType:e,onClose:t,onAskAiAssistant:r,onRequestSuggestion:n}){const{canTransformToAIAssistant:o,transformToAIAssistant:l,getSelectedBlockClientIds:c}=(0,i.A)(),d=(0,s.useCallback)((s=>{const a=c(),[i]=a,u=s?.options?.alwaysTransformToAIAssistant||!1;!(a.length<2)&&o({clientId:i,blockName:e})||u?l({request:s}):(s?n?.(s.promptType,s.options):r?.(),t?.())}),[e,o,c,r,t,n,l]),[p]=c();return(0,u.jsx)(a.Ay,{blockType:e,clientId:p,onRequestSuggestion:(e,t)=>{d({promptType:e,options:t})},onAskAiAssistant:async()=>{d()},disabled:!1})}function p({behavior:e,blockType:t,label:r=__("AI Assistant","jetpack"),onAskAiAssistant:o,onRequestSuggestion:a}){const{tracks:i}=(0,n.st)(),p=(0,s.useContext)(c.B),h=(0,s.useCallback)((e=>{e&&i.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:t})}),[t,i]),m=(0,s.useCallback)((()=>{i.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_prompt_show",{block_type:t}),o?.()}),[t,o,i]),g=(0,s.useCallback)(((e,r)=>{i.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:t}),a?.(e,r)}),[t,a,i]);return(0,u.jsx)(l.A,{label:r,behavior:e,onAction:m,onDropdownToggle:h,renderContent:({onClose:e})=>(0,u.jsx)(d,{blockType:t,onClose:e,onAskAiAssistant:m,onRequestSuggestion:g}),behaviorContext:p})}},27571:(e,t,r)=>{"use strict";r.d(t,{L:()=>s,l:()=>n});const n=["jetpack/field-name","jetpack/field-number","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"],s=["core/heading","core/paragraph","core/list-item","core/list","jetpack/contact-form",...n]},21785:(e,t,r)=>{"use strict";r.d(t,{B:()=>g,Q:()=>f});var n=r(86087),s=r(10067),o=r.n(s),a=r(52998),i=r(27571),l=r(50161),c=r(22352),u=r(53269),d=r(94987),p=r(125);const h=o()("jetpack-ai-assistant:extensions:get-block-handler"),m={"core/heading":l.T,"core/paragraph":p.d,"core/list-item":d.g,"core/list":u.b,"jetpack/contact-form":c.p,...i.l.reduce(((e,t)=>({...e,[t]:c.g})),{})},g=(0,n.createContext)({});function f(e,t){let r=m[e];r||(h(`No handler found for block type: ${e}. Using default handler.`),r=a.mt);const n=new r(t);return{onSuggestion:n.onSuggestion.bind(n),onDone:n.onDone.bind(n),getContent:n.getContent.bind(n),getExtensionInputPlaceholder:n.getExtensionInputPlaceholder.bind(n),behavior:n.behavior,isChildBlock:n.isChildBlock,feature:n.feature,adjustPosition:n.adjustPosition,startOpen:n.startOpen,hideOnBlockFocus:n.hideOnBlockFocus,supports:n.supports}}},50161:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var n=r(52998);class s extends n.mt{constructor(e){super(e,[])}onSuggestion(e){const t=this.getBlock();if(e.startsWith("#")||(e=`${"#".repeat(t?.attributes?.level||1)} ${e}`),e.match(/^#*\s*$/))return;const r=this.renderContent(e);this.replaceBlockContent(r)}}},8663:(e,t,r)=>{"use strict";r.d(t,{g:()=>o});var n=r(47143),s=r(52998);class o extends s.mt{jetpackFormBlockName="jetpack/contact-form";constructor(e){super(e,[]),this.behavior=this.handleBehavior,this.isChildBlock=!0,this.hideOnBlockFocus=!1}handleBehavior=({context:e})=>{const t=(0,n.dispatch)("core/block-editor"),{getBlockParentsByBlockName:r}=(0,n.select)("core/block-editor"),s=r(this.clientId,this.jetpackFormBlockName)?.[0];t.selectBlock(s),e?.[this.jetpackFormBlockName]?.handleAskAiAssistant?.()}}},22352:(e,t,r)=>{"use strict";r.d(t,{g:()=>c.g,p:()=>u});var n=r(74997),s=r(47143),o=r(27723),a=r(62514),i=r(96568),l=r(52998),c=r(8663);const __=o.__;class u extends l.mt{currentListOfValidBlocks=[];originalVariationName=null;constructor(e){super(e,[]),this.behavior="action",this.feature="jetpack-form-ai-extension",this.startOpen=!0,this.hideOnBlockFocus=!1,this.supports={file_upload_field:1}}setContent(e,t=!1){const{replaceInnerBlocks:r,updateBlockAttributes:o}=(0,s.dispatch)("core/block-editor"),l=(0,n.parse)(e).find((e=>"jetpack/contact-form"===e.name));l&&l.attributes?.variationName&&(this.originalVariationName=l.attributes.variationName);const c=e.replace(//g,""),u=(0,i.d)(c),d=(0,n.parse)(u).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let p=!1;if(d.length0){const e=d[d.length-1],t=this.currentListOfValidBlocks[d.length-1];p=!(0,a.w)(e,t)}if(d.length>0&&(d.length!==this.currentListOfValidBlocks.length||p)&&(r(this.clientId,d),this.currentListOfValidBlocks=d),t){if(this.originalVariationName){const e=this.getBlock();e&&e.attributes.variationName!==this.originalVariationName&&o(this.clientId,{variationName:this.originalVariationName})}const e=d.filter((e=>"jetpack/button"===e.name)),t=d.some((e=>"jetpack/form-step-navigation"===e.name));if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],e.length>1){let t=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter((r=>"jetpack/button"!==r.name||(t++,t===e.length))),r(this.clientId,this.currentListOfValidBlocks)}else 0!==e.length||t||r(this.clientId,[...this.currentListOfValidBlocks,(0,n.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);this.currentListOfValidBlocks=[]}}getExtensionInputPlaceholder(){if(!this.getContent()){const e=[__("Example: a contact form with name, email, and message fields","jetpack"),__("Example: a pizza ordering form with name, address, phone number and toppings","jetpack"),__("Example: a survey form with multiple choice questions","jetpack")];return e[Math.floor(Math.random()*e.length)]}const e=[__("Example: remove email field","jetpack"),__("Example: make email optional","jetpack"),__("Example: add message field and make it required","jetpack")];return e[Math.floor(Math.random()*e.length)]}getContent(){const e=this.getBlock();if(!e)return"";const{innerBlocks:t}=e;return t?.length?t.reduce(((e,t)=>e+(0,n.serialize)(t)+"\n\n"),""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},71295:(e,t,r)=>{"use strict";r.d(t,{j:()=>o});var n=r(10821),s=r(27571);function o(e){return!!(0,n.Bi)()&&!!s.L.includes(e)}},94987:(e,t,r)=>{"use strict";r.d(t,{g:()=>s});var n=r(52998);class s extends n.mt{constructor(e){super(e,["listItem"]),this.isChildBlock=!0}}},53269:(e,t,r)=>{"use strict";r.d(t,{b:()=>s});var n=r(52998);class s extends n.mt{constructor(e){super(e,["list"])}}},125:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(96865),s=r(74997),o=r(52998);const a=new n.OO({fixes:["paragraph"]});class i extends o.mt{constructor(e){super(e,["paragraph"])}getContent(){const e=this.getBlock();return t=(0,s.getBlockContent)(e),a.render({content:t});var t}}},50797:(e,t,r)=>{"use strict";var n=r(96865),s=r(85985),o=r(94715),a=r(29491),i=r(47143),l=r(86087),c=r(52619),u=r(13022),d=r(10067),p=r.n(d),h=r(32735),m=r(35317),g=r(4e4),f=r(96306),b=r(37931),v=r(21785),k=r(71295),y=r(10790);const x=p()("jetpack-ai-assistant:extensions:with-ai-extension"),j={"core/heading":"heading","core/paragraph":"paragraph","core/list-item":"list-item","core/list":"list","jetpack/contact-form":"form-ai"},w={group:"block"},_=(0,a.createHigherOrderComponent)((e=>{function t(t){const{clientId:r,isSelected:a,name:c,isSelectionEnabled:d}=t,p=(0,l.useRef)(null),m=(0,l.useRef)(0),k=(0,l.useRef)(null),_=(0,l.useRef)(""),C=(0,l.useRef)(null),A=(0,l.useRef)(document),S=(0,l.useRef)([]),[E,N]=(0,l.useState)(""),[T,B]=(0,l.useState)(null),P=(0,l.useRef)(null),I=(0,l.useRef)(null),M=(0,l.useRef)(null),{undo:L}=(0,i.useDispatch)("core/editor"),{postId:R}=(0,i.useSelect)((e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}}),[]),{id:D,className:F}=(0,o.useBlockProps)({className:(0,u.A)({[c?.replace?.("/","-")]:!0})}),{increaseRequestsCount:O,dequeueAsyncRequest:z,requireUpgrade:U}=(0,n.yM)(),{snapToBottom:H,enableAutoScroll:V,disableAutoScroll:q}=(0,h.A)({current:A?.current?.getElementById(D)},void 0,!0),G=(0,l.useCallback)((()=>{C.current?.focus()}),[]),{tracks:$}=(0,s.st)(),{onSuggestion:W,onDone:Z,getContent:J,getExtensionInputPlaceholder:K,behavior:Y,isChildBlock:Q,feature:X,adjustPosition:ee,startOpen:te,hideOnBlockFocus:re,supports:ne}=(0,l.useMemo)((()=>(0,v.Q)(c,r)),[c,r]),se=K(),[oe,ae]=(0,l.useState)(te),ie=(0,l.useCallback)((()=>{ae((e=>!e))}),[]),le=(0,l.useCallback)((({promptType:e,options:t})=>{const r=J(),n=j[c];return[...S.current,{role:"jetpack-ai",context:{type:(0,g.p$)(e,n),content:r,request:t?.userPrompt,tone:t?.tone,language:t?.language,is_follow_up:S.current.length>0,supports:ne}}]}),[c,J,ne]),ce=(0,l.useCallback)((e=>{const t=e||A.current.getElementById(D);t&&p.current&&t.style.setProperty("padding-bottom",`calc(${m.current+16}px + ${_.current||"0px"} )`,"important")}),[D]),ue=(0,l.useCallback)((e=>{W(e),ee&&ce(),H()}),[W,ee,H,ce]),de=(0,l.useCallback)(((e,t,r)=>{if(q(),Z(e),t||O(),N(""),$.recordEvent("jetpack_ai_assistant_toolbar_extension_generate",{prompt_type:P.current,model:r}),I.current?.message){const e={role:"assistant",content:J()};if(S.current.push(I.current.message,e),S.current.length>20){S.current.splice(0,S.current.length-20);const e=S.current.findIndex((e=>"jetpack-ai"===e.role));-1!==e&&(S.current=S.current.slice(e),S.current[0].context={...S.current[0].context,is_follow_up:!1})}}I.current=null,setTimeout((()=>{ee&&ce(),G()}),100)}),[q,Z,O,J,ee,G,ce,$,P]),pe=(0,l.useCallback)((e=>{q(),N(""),x("Request error",e),e.code!==n.mA&&e.code!==n.Or&&O()}),[q,O]),{request:he,stopSuggestion:me,requestingState:ge,model:fe,error:be,reset:ve}=(0,n.o2)({onSuggestion:ue,onDone:de,onError:pe,askQuestionOptions:{postId:R,feature:X}});(0,l.useEffect)((()=>{M.current=ge}),[ge]);const ke=(0,l.useCallback)(((e,t)=>{if(ae(!0),U)return;P.current=e;const r=(0,n.MB)(e,t);r&&(N(r),B(r));const s=le({promptType:e,options:t});x("Request suggestion",e,t);const o=s[s.length-1];I.current={promptType:e,options:t,humanText:r,message:o},z(),V(),he(s)}),[z,V,le,he,U]),ye=(0,l.useCallback)((e=>{const t={userPrompt:e};B(e),V(),ke("userPrompt",t)}),[V,ke]),xe=(0,l.useCallback)((()=>{q(),me(),G()}),[q,me,G]),je=(0,l.useCallback)((()=>{I.current&&ke(I.current.promptType,I.current.options)}),[I,ke]),we=(0,l.useCallback)((()=>{ae(!1),ve(),N(""),I.current=null,S.current=[]}),[ve]),_e=(0,l.useCallback)((async()=>{$.recordEvent("jetpack_ai_assistant_toolbar_extension_undo",{prompt_type:P.current,model:fe}),await L(),we()}),[L,we,$,fe,P]);(0,l.useEffect)((()=>{a||we()}),[a,we]),(0,l.useEffect)((()=>{C.current&&d&&(A.current=C.current.ownerDocument,G())}),[oe,G,d]),(0,l.useEffect)((()=>{let e=A.current.getElementById(D);if(e&&ee)return oe&&!k.current&&p.current?(_.current=e.style.paddingBottom,k.current=new ResizeObserver((([t])=>{if(e=A.current.getElementById(D),m.current=t.contentRect.height,e&&p.current&&m.current>0){ce(e);const{marginBottom:t}=getComputedStyle(e),r=parseFloat(t);p.current.style.setProperty("margin-top",`-${m.current+r}px`,"important"),p.current.style.setProperty("margin-bottom",`${r+16}px`,"important")}})),k.current.observe(p.current)):k.current&&(e.style.paddingBottom=_.current,k.current.disconnect(),k.current=null,m.current=0),()=>{k.current&&k.current.disconnect()}}),[ce,ee,r,k,D,oe]),(0,l.useEffect)((()=>{if(re&&oe){const e=A.current.getElementById(D),t=()=>{["requesting","suggesting"].includes(M.current)||(ae(!1),e?.removeEventListener("focusin",t))};return e?.addEventListener("focusin",t),()=>{e?.removeEventListener("focusin",t)}}}),[re,oe,D]);const Ce=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(e,{...t}),oe&&(0,y.jsx)(f.A,{customPlaceholder:se||null,className:F,requestingState:ge,requestingError:be,wrapperRef:p,inputRef:C,action:E,blockType:c,feature:X,request:ye,stopSuggestion:xe,close:we,undo:_e,tryAgain:je,lastAction:T}),(0,y.jsx)(o.BlockControls,{...w,children:(0,y.jsx)(b.A,{blockType:c,onAskAiAssistant:ie,onRequestSuggestion:ke,behavior:Y})})]});if(Q)return Ce;const Ae={value:{[c]:{handleAskAiAssistant:ie,handleRequestSuggestion:ke}}};return(0,y.jsx)(v.B.Provider,{...Ae,children:Ce})}return r=>{const n=(0,m.A)(r.name);return r.clientId&&r.attributes&&n?(0,y.jsx)(t,{...r}):(0,y.jsx)(e,{...r})}}),"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-text-extension",(function(e,t){return(0,k.j)(t)?{...e,edit:_(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},89872:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,X:()=>n});const n="images-alt-text",s="images-caption"},4393:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(96865),s=r(47143),o=r(86087),a=r(10067),i=r.n(a),l=r(62402),c=r(64425),u=r(16597),d=r(32735);const p=i()("jetpack-ai-assistant:error"),h=({attributes:e,clientId:t,content:r,tracks:a,userPrompt:i,onSuggestionDone:h,onUnclearPrompt:m,onModeration:g,requireUpgrade:f,initialRequestingState:b,contentRef:v,blockRef:k})=>{const[y,x]=(0,o.useState)(!1),[j,w]=(0,o.useState)(""),{updateBlockAttributes:_}=(0,s.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAsyncRequest:C,setAiAssistantFeatureRequireUpgrade:A}=(0,s.useDispatch)("wordpress-com/plans"),{snapToBottom:S,enableAutoScroll:E,disableAutoScroll:N}=(0,d.A)(k,v),T=(0,s.useSelect)((e=>e("core/editor").getEditedPostAttribute("title"))),B=(0,s.useSelect)((e=>e("core/editor").getCurrentPostId())),P=(0,o.useRef)([]),I=(0,o.useRef)(void 0),{request:M,stopSuggestion:L,handleErrorQuotaExceededError:R,requestingState:D,error:F}=(0,n.o2)({onSuggestion:e=>{_(t,{content:e?.replaceAll(c.uV,"")}),S()},onDone:(e,r)=>{const n=e.replaceAll(c.uV,""),s={role:"assistant",content:n};P.current.push(I.current,s),P.current.length>20&&P.current.splice(0,P.current.length-20),_(t,{content:n,messages:P.current}),S(),N(),h?.(r)},onStop:()=>{S(),N(),h?.()},onError:e=>{switch(e?.code){case n.cT:x(!1);break;case n.ud:x(!1),g?.();break;case n.mA:case n.AZ:x(!0);break;case n.Or:x(!1),A(!0);break;case n.L9:m?.()}},onAllErrors:e=>{p(e)},initialRequestingState:b,askQuestionOptions:{postId:B,feature:"ai-assistant",functions:{}}}),O=["requesting","suggesting"].includes(D),z=async(s,o={})=>{if(C(),f)return R(),void x(!1);if(o={retryRequest:!1,tone:l.US,...o},O)return;x(!1);let d=j;if(a.recordEvent("jetpack_ai_chat_completion",{post_id:B}),P.current=[...e.messages],I.current={},o.retryRequest)I.current=d[d.length-1];else{const a=e?.isLayoutBuldingModeEnable?(0,u.rJ)(t):(0,u.aB)();d=(0,c.jf)({generatedContent:r,allPostContent:a,postContentAbove:(0,u.b$)(t),currentPostTitle:T,options:o,userPrompt:o?.userPrompt||i,type:s,isGeneratingTitle:e.promptType===n.vE}),I.current=d.pop(),d=[...d,...P.current],d.push(I.current),w(d),e.promptType!==n.vE&&_(t,{promptType:s})}try{E(),await M(d)}catch(e){p(e),x(!0),N()}};return{setShowRetry:x,showRetry:y,postTitle:T,contentBefore:(0,u.b$)(t),wholeContent:(0,u.aB)(),requestingState:D,error:F,getSuggestionFromOpenAI:z,stopSuggestion:L,retryRequest:()=>z("",{retryRequest:!0})}}},44732:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(3924),s=r(85985);function o(){const e=(0,s.$i)()?.jetpack?.is_my_jetpack_available,t=e?`${(0,s.$i)()?.adminUrl||""}admin.php?page=my-jetpack#/jetpack-ai`:(0,n.A)("org-ai"),{autosaveAndRedirect:r,isRedirecting:o}=(0,s.ZR)(t);return{productPageUrl:t,autosaveAndRedirect:r,isRedirecting:o,isMyJetpackAvailable:e}}},75956:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(90372),s=r(86087);const o=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,a=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,s.useEffect)((()=>{o&&n.A.initialize(o?.userid,o?.username,a?{blog_id:a}:{})}),[]),n.A)},32735:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(86087),s=r(10067);const o=r.n(s)()("jetpack-ai-assistant:use-auto-scroll"),a=(e,t,r=!1)=>{const s=(0,n.useRef)(null),a=(0,n.useRef)(null),i=(0,n.useRef)(!1),l=(0,n.useRef)(!1),c=(0,n.useRef)(!1),u=(0,n.useRef)(!1),d=(0,n.useRef)({scrollPadding:"",scrollMargin:""}),p=(0,n.useCallback)((()=>{o("enabling ignore scroll"),l.current=!0}),[]),h=(0,n.useCallback)((()=>{i.current&&c.current&&!l.current&&p()}),[p]),m=(0,n.useCallback)((()=>{i.current=!0,l.current=!1,c.current=!1,u.current=!1,s.current?.addEventListener("scroll",h),o("enabling auto scroll")}),[h]),g=(0,n.useCallback)((()=>{i.current=!1,l.current=!1,c.current=!1,u.current=!1,s.current?.removeEventListener("scroll",h),a.current?.style&&(a.current.style.scrollPadding=d.current.scrollPadding,a.current.style.scrollMargin=d.current.scrollMargin),s.current=null,o("disabling auto scroll")}),[h]),f=(0,n.useCallback)((()=>{if(!i.current||l.current)return;const n=r?e?.current:t?.current?.firstElementChild?.lastElementChild;n&&!u.current&&(c.current=!0,u.current=!0,s?.current?.removeEventListener?.("scroll",h),n?.scrollIntoView({block:"end",inline:"end"}),setTimeout((()=>{u.current=!1,s?.current?.addEventListener?.("scroll",h)}),200))}),[e,t,r,h]),b=(0,n.useCallback)((e=>{if(null==e)return null;if("BODY"===e?.nodeName)return e;if(e?.ownerDocument!==document)return e.ownerDocument;const{overflow:t}=window.getComputedStyle(e);return t.split(" ").every((e=>"auto"===e||"scroll"===e))?e:e?.parentElement?b(e?.parentElement):e}),[]);return(0,n.useEffect)((()=>{const t=b(e?.current?.parentElement);!s.current&&t&&(s.current=t,a.current=t instanceof HTMLElement?t:t.documentElement,d.current={scrollPadding:a.current.style.scrollPadding,scrollMargin:a.current.style.scrollMargin},i.current&&(a.current.style.scrollPadding="80px",a.current.style.scrollMargin="10px"))}),[e,b]),{snapToBottom:f,enableAutoScroll:m,disableAutoScroll:g}}},35317:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(85985);const s={"jetpack/contact-form":"contact-form"};function o(e){const t=s[e],{isModuleActive:r}=(0,n.q7)(t);return!t||r}},76695:(e,t,r)=>{"use strict";r.d(t,{A:()=>c,y:()=>l});var n=r(85985),s=r(47143),o=r(51609),a=r(16597),i=r(13802);function l(e){return`ai-assistant-block-${e}`}const c=()=>{const{replaceBlock:e,removeBlocks:t}=(0,s.useDispatch)("core/block-editor"),r=(0,s.useSelect)((e=>e("core/block-editor")),[]),{getSelectedBlockClientIds:c,getBlocksByClientId:u,getBlock:d,getBlockParents:p}=r,{tracks:h}=(0,n.st)();return{canTransformToAIAssistant:(0,o.useCallback)((({clientId:e,blockName:t})=>{if(!d(e))return!1;if(!i.y7.includes(t))return!1;const r=p(e);if(0===r.length)return!0;const n=d(r[r.length-1]);return!["core/list","core/list-item"].includes(n.name)}),[d,p]),transformToAIAssistant:(0,o.useCallback)((({request:r}={})=>{const n=c(),s=u(n),o=(0,a.Sb)(s),[d]=s,[p,...m]=n,g={...d?.attributes||{},content:o,preTransformAction:r?.promptType},f=(0,i.rr)(d.name,g);if(r?.promptType){h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:r.promptType,block_type:d.name});const e={clientId:p,type:r.promptType,options:{...r.options,contentType:"generated",fromExtension:!0}};localStorage.setItem(l(f.clientId),JSON.stringify(e))}else h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:d.name});e(p,f),t(m)}),[u,c,t,e,h]),getSelectedBlockClientIds:c}}},4e4:(e,t,r)=>{"use strict";r.d(t,{J1:()=>i,K6:()=>l,p$:()=>u});var n=r(96865);const s="title",o="content",a=null;function i(e){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e)}}}function l({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:s,options:o,type:a,userPrompt:i,isGeneratingTitle:l}){const u=[],d="generated"===o?.contentType;let p=null;switch(a){case n.im:p=s;break;case n.sn:case n.A4:case n.yy:p=r;break;case n.vE:p=t;break;case n.br:case n.fD:p=e;break;case n.eJ:case n.UA:case n.Gm:p=d?e:t;break;case n.d5:p=r;break;case n.pE:p=e||t}const h=function(e,t){return!e&&t&&t.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(a===n.pE?!!e?.length:d,p);return h&&u.push(h),u.push({role:"jetpack-ai",context:c({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:s,options:o,type:a,userPrompt:i,isGeneratingTitle:l})}),u}function c({options:e,type:t,userPrompt:r,isGeneratingTitle:i}){const l=function(e,t,r){return e?s:!t||r?o:a}(i,"generated"===e?.contentType,e?.fromExtension||!1);return{type:u(t),...l?{subject:l}:{},...t===n.eJ&&e?.tone?{tone:e.tone}:{},...t===n.Gm&&e?.language?{language:e.language}:{},...t===n.pE&&r?{request:r}:{}}}function u(e,t){const r={[n.im]:"ai-assistant-summary-by-title",[n.sn]:"ai-assistant-continue-writing",[n.A4]:"ai-assistant-simplify",[n.yy]:"ai-assistant-correct-spelling",[n.vE]:"ai-assistant-generate-title",[n.br]:"ai-assistant-make-longer",[n.fD]:"ai-assistant-make-shorter",[n.eJ]:"ai-assistant-change-tone",[n.UA]:"ai-assistant-summarize",[n.Gm]:"ai-assistant-change-language",[n.pE]:"ai-assistant-user-prompt",[n.d5]:"ai-assistant-transform-list-to-table"};return"form-ai"===t?"form-ai-extension":t?`${r[e]}-${t}-extension`:r[e]}},64425:(e,t,r)=>{"use strict";r.d(t,{jf:()=>a,uV:()=>o});var n=r(96865),s=r(4e4);n.im,n.sn,n.A4,n.yy,n.vE,n.br,n.fD,n.eJ,n.UA,n.Gm,n.pE,n.z5,n.d5;const o="````";function a({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:n,options:o,type:a,userPrompt:i,isGeneratingTitle:l}){return[(0,s.J1)(a),...(0,s.K6)({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:n,options:o,type:a,userPrompt:i,isGeneratingTitle:l})]}},16597:(e,t,r)=>{"use strict";r.d(t,{Sb:()=>l,aB:()=>i,b$:()=>a,rJ:()=>c});var n=r(96865),s=r(74997),o=r(47143);function a(e){if(!e)return"";const t=(0,o.select)("core/block-editor"),r=t.getBlockIndex(e),a=t.getBlocks().slice(0,r)??[];return a?.length?(0,n.rh)({content:(0,s.serialize)(a)}):""}function i(){const e=(0,o.select)("core/block-editor").getBlocks();return e?.length?(0,n.rh)({content:(0,s.serialize)(e)}):""}function l(e){return e.filter((e=>null!=e)).map((e=>(0,s.getBlockContent)(e))).join("\n\n")}function c(e){const t=(0,o.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?l(t.innerBlocks):""}},62514:(e,t,r)=>{"use strict";r.d(t,{w:()=>o});const n=e=>{delete e.clientId;for(const t of e.innerBlocks??[])n(t);return e},s=e=>n((e=>JSON.parse(JSON.stringify(e)))(e));function o(e,t){const r=s(e),n=s(t);return JSON.stringify(r)===JSON.stringify(n)}},96568:(e,t,r)=>{"use strict";function n(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}r.d(t,{d:()=>n})},48499:(e,t,r)=>{"use strict";r.d(t,{C:()=>s});var n=r(85985);function s(e){return!0===(0,n.FB)(e).available}},13802:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>c,rr:()=>l,y7:()=>a});var n=r(96865),s=r(74997),o=r(54681);const a=["core/heading","core/paragraph","core/list"],i=[];function l(e,t){const{content:r,...a}=t;let i=r;"core/heading"===e&&t?.level&&(i=i.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=(0,n.rh)({content:i}),c=[];return c.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:l}}),(0,s.createBlock)(o.name,{...a,content:l,originalContent:l,messages:c,originalMessages:c})}for(const e of a)i.push({type:"block",blocks:[e],isMatch:()=>a.includes(e),transform:(t,r)=>{const n=(0,s.getSaveContent)(e,t,r);return l(e,{...t,content:n})}});const c={from:i}},36920:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(85985),s=r(82201),o=r(27723),a=r(10790);const __=o.__,i=()=>{let e=window?.Jetpack_Editor_Initial_State?.adminUrl||"";e=e.replace(/wp-admin\/\?frame-nonce=[a-z0-9]+/,"wp-admin/");const t=`${e}admin.php?page=jetpack-search`,{autosaveAndRedirect:r,isRedirecting:o}=(0,n.ZR)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,a.jsx)(s.cb,{buttonText:__("Enable Jetpack Search","jetpack"),checkoutUrl:t,className:"jetpack-ai-connect-banner",description:__("You need to enable Jetpack Search so that Jetpack AI can index your site.","jetpack"),goToCheckoutPage:e=>{r(e)},isRedirecting:o,visible:!0,align:null,title:null,context:null})}},50443:(e,t,r)=>{"use strict";r.d(t,{G:()=>o,W:()=>s});var n=r(27723);const __=n.__,s=__("Ask","jetpack"),o=__("Ask a question about this site","jetpack")},51686:(e,t,r)=>{"use strict";r.d(t,{z:()=>c});var n=r(94715),s=r(56427),o=r(3582),a=r(27723),i=r(50443),l=r(10790);const __=a.__;function c({setAttributes:e,placeholder:t,showCopy:r,showFeedback:a,showSources:c}){const[u,d]=(0,o.useEntityProp)("root","site","jetpack_search_ai_prompt_override");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.InspectorControls,{children:(0,l.jsx)(s.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,children:(0,l.jsx)(s.TextControl,{label:__("Placeholder Text","jetpack"),className:"jetpack-ai-chat__ask-button-text",placeholder:i.G,onChange:t=>e({placeholder:t}),value:t,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}),(0,l.jsxs)(n.InspectorAdvancedControls,{children:[(0,l.jsx)(s.TextareaControl,{label:__("Additional instructions","jetpack"),help:__("Give Jetpack AI additional instructions for answer length, format, and tone.","jetpack"),value:u,onChange:d,__nextHasNoMarginBottom:!0}),(0,l.jsx)(s.ToggleControl,{label:__("Show copy answer button.","jetpack"),help:__("Allow users to easily copy the answer.","jetpack"),checked:r,onChange:t=>e({showCopy:t}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(s.ToggleControl,{label:__("Show rating button.","jetpack"),help:__("Allow users to rate the answer and give feedback.","jetpack"),checked:a,onChange:t=>e({showFeedback:t}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(s.ToggleControl,{label:__("Show list of sources.","jetpack"),help:__("Show used sources at the bottom of the answer.","jetpack"),checked:c,onChange:t=>e({showSources:t}),__nextHasNoMarginBottom:!0})]})]})}},32908:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(96865),s=r(94715),o=r(56427),a=r(47143),i=r(2274),l=r(26247),c=r(36920),u=r(50443),d=r(51686),p=r(10790);function h({attributes:e,setAttributes:t,clientId:r}){const{askButtonLabel:h=u.W,placeholder:m=u.G,showCopy:g,showFeedback:f,showSources:b}=e,v=(0,s.useBlockProps)(),k=(0,a.useSelect)((e=>e("core/block-editor").isBlockSelected(r)),[r]),y=(0,l.A)();return(0,p.jsxs)("div",{...v,children:[!y&&(0,p.jsx)(i.A,{block:"Jetpack AI Search"}),(0,p.jsx)(c.A,{}),(0,p.jsxs)("div",{className:"jetpack-ai-chat-question-wrapper",children:[(0,p.jsx)(o.TextControl,{className:"jetpack-ai-chat-question-input",placeholder:m,disabled:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,p.jsx)(s.RichText,{className:"wp-block-button__link jetpack-ai-chat-question-button",onChange:e=>t({askButtonLabel:e}),value:h,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})]}),k&&(0,p.jsx)(n.Yj,{}),(0,p.jsx)(s.InspectorControls,{children:(0,p.jsx)(d.z,{askButtonLabel:h,placeholder:m,setAttributes:t,showCopy:g,showFeedback:f,showSources:b})})]})}},8393:(e,t,r)=>{"use strict";var n=r(94375),s=r(1629),o=r(32908),a=r(41825);(0,n.M)(s,{edit:o.A,save:a.A})},41825:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(94715),s=r(50443),o=r(10790);function a({attributes:e}){const t=n.useBlockProps.save({"data-ask-button-label":e.askButtonLabel||s.W});return(0,o.jsx)("div",{...t})}},97571:(e,t,r)=>{"use strict";r.d(t,{z:()=>a});var n=r(56427),s=r(27723),o=r(10790);const __=s.__;function a({attributes:e,setAttributes:t}){const{statsData:r,statsOption:s}=e,a=[{value:"views",label:__("Views","jetpack")},{value:"visitors",label:__("Visitors","jetpack")}],i=[{value:"site",label:__("My whole site","jetpack")},{value:"post",label:__("This individual post","jetpack")}];return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(n.PanelBody,{title:__("Settings","jetpack"),children:[(0,o.jsx)(n.RadioControl,{label:__("Views or visitors","jetpack"),selected:r,onChange:e=>t({statsData:e}),options:a,help:__("Views represent site visits, whereas visitors represent unique individuals.","jetpack")}),(0,o.jsx)(n.RadioControl,{label:__("Show stats data for","jetpack"),selected:s,onChange:e=>t({statsOption:e}),options:i,disabled:"visitors"===r,help:"visitors"===r?__("Visitor counts aren't available for individual posts.","jetpack"):null}),(0,o.jsx)("span",{className:"jetpack-blog-stats__delay-notice",children:__("Stats are delayed for up to 5 minutes.","jetpack")})]})})}},20201:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(85985),s=r(54268),o=r(1455),a=r.n(o),i=r(94715),l=r(47143),c=r(86087),u=r(27723),d=r(97571),p=r(51744),h=r(10790);const __=u.__,_n=u._n;const m=function({attributes:e,className:t,setAttributes:r}){const{isLoadingModules:o,isChangingStatus:u,isModuleActive:m,changeStatus:g}=(0,n.q7)("stats"),{label:f,statsData:b,statsOption:v}=e,[k,y]=(0,c.useState)(null),[x,j]=(0,c.useState)(),[w,_]=(0,c.useState)(),C=(0,i.useBlockProps)(),A="post"===v?w:"views"===b?k:x,S=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId()),[]);if((0,c.useEffect)((()=>{m&&a()({path:Number.isInteger(S)?`/wpcom/v2/blog-stats?post_id=${S}`:"/wpcom/v2/blog-stats"}).then((e=>{y(e["blog-views"]),j(e["blog-visitors"]),_(Number.isInteger(S)?e["post-views"]:"12345")}))}),[S,m]),(0,c.useEffect)((()=>{"visitors"===b&&r({statsOption:"site"})}),[b,r]),!m&&!o)return(0,h.jsx)(p.k,{className:t,changeStatus:g,isLoading:u});const E=/* Translators: Number of visitors */ _n("visitor","visitors",parseInt(A),"jetpack",0),N=/* Translators: Number of views */ _n("hit","hits",parseInt(A),"jetpack",0);return(0,h.jsxs)("div",{...C,children:[(0,h.jsx)(i.InspectorControls,{children:(0,h.jsx)(d.z,{attributes:e,setAttributes:r})}),(0,h.jsx)("div",{className:t,children:o||null===k?(0,h.jsx)("p",{className:"jetpack-blog-stats__loading",children:__("Loading stats…","jetpack")}):(0,h.jsxs)("p",{children:[(0,h.jsxs)("span",{children:[(0,s.ZV)(A)," "]}),(0,h.jsx)(i.RichText,{tagName:"span",placeholder:"visitors"===b?E:N,value:f,allowedFormats:["core/bold","core/italic","core/link"],onChange:e=>r({label:e})})]})})]})}},95184:(e,t,r)=>{"use strict";var n=r(74997),s=r(94375),o=r(35116),a=r(20201);(0,s.M)(o,{edit:a.A,save:()=>null,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog-stats"===e,transform:({instance:e})=>{const t=e.raw.title?(0,n.createBlock)("core/heading",{content:e.raw.title,level:3}):null,r=(0,n.createBlock)("jetpack/blog-stats",{label:e.raw.hits});return t?[t,r]:r}}]}})},51744:(e,t,r)=>{"use strict";r.d(t,{k:()=>c});var n=r(97999),s=r(85985),o=r(56427),a=r(27723),i=r(35116),l=r(10790);const __=a.__,c=({className:e,isLoading:t,changeStatus:r})=>{const a=(0,n.isWoASite)()?"https://wordpress.com/support/stats/":"https://jetpack.com/support/jetpack-stats/";return(0,l.jsx)("div",{className:e,children:(0,l.jsxs)(o.Placeholder,{icon:(0,s.sh)(i),instructions:__("You'll need to activate the Stats module to use this block. Please note that hits are only counted while this module is active.","jetpack"),label:i.title,children:[(0,l.jsx)(o.Button,{disabled:t,isBusy:t,onClick:()=>r(!0),variant:"secondary",children:t?__("Activating Stats","jetpack"):__("Activate Stats","jetpack",0)}),(0,l.jsx)("div",{children:(0,l.jsx)(o.ExternalLink,{href:a,children:__("Learn more about the Stats module.","jetpack")})})]})})}},12169:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(1455),s=r.n(n),o=r(94715),a=r(56427),i=r(47143),l=r(86087),c=r(27723),u=r(93832),d=r(13022),p=r(54919),h=r(9075),m=r(10790);const __=c.__,_x=c._x;const g=(0,a.withNotices)((function({attributes:e,noticeOperations:t,noticeUI:r,setAttributes:n}){const g=(0,l.useRef)(!1),{answersLink:f,answersLinkText:b,gravatars:v,promptFetched:k,promptId:y,promptLabel:x,promptText:j,showLabel:w,showResponses:_,tagsAdded:C,isBloganuary:A}=e,S=(0,o.useBlockProps)({className:"jetpack-blogging-prompt"});(0,h.J)(y,C,(e=>n({tagsAdded:e})));const E=(0,i.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:r}=e("core"),n=t("root","site")?.language||"en_US";return r("getEntityRecord",["root","site"])?n:null}),[]);(0,l.useEffect)((()=>{if(!E||g.current||k)return;const e=()=>{n({promptFetched:!1,promptId:null,tagsAdded:!1}),g.current=!1,t.removeAllNotices()};let r="/wpcom/v3/blogging-prompts";if(y)r+="/"+encodeURIComponent(y);else{const e=new Date;r+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}r=(0,u.addQueryArgs)(r,{_locale:E,force_year:(new Date)?.getFullYear()}),g.current=!0,s()({path:r}).then((e=>{const t=y?e:e[0],r=(0,p.i)(E);n({answersLink:t.answered_link+`?locale=${r}`,answersLinkText:t.answered_link_text,gravatars:t.answered_users_sample.map((({avatar:e})=>({url:e}))),promptFetched:!0,promptLabel:t.label,promptText:t.text,promptId:t.id,isBloganuary:!!t.bloganuary_id})})).catch((r=>{n({promptFetched:!0});const s="rest_post_invalid_id"===r.code&&y?(o=y,(0,m.jsxs)(m.Fragment,{children:[(0,c.sprintf)(/* translators: %d is the prompt id. */ __("Prompt with id %d not found.","jetpack"),o)," ",(0,m.jsx)(a.Button,{variant:"link",onClick:e,children:__("Reset prompt","jetpack")})]})):(t=>(0,m.jsxs)(m.Fragment,{children:[(0,c.sprintf)(/* translators: %s is the error message. */ __("Error while fetching prompt: %s","jetpack"),t)," ",(0,m.jsx)(a.Button,{variant:"link",onClick:e,children:__("Retry","jetpack")})]}))(r.message);var o;t.removeAllNotices(),t.createErrorNotice(s)}))}),[g,t,k,y,n,E]);const N=e=>{n({showLabel:e})},T=e=>{n({showResponses:e})},B=(0,d.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":A});return(0,m.jsxs)("div",{...S,children:[r,(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(o.InspectorControls,{children:(0,m.jsxs)(a.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack"),children:[(0,m.jsx)(a.ToggleControl,{label:__("Show prompt label","jetpack"),checked:w,onChange:N,__nextHasNoMarginBottom:!0}),(0,m.jsx)(a.ToggleControl,{label:__("Show other responses","jetpack"),checked:_,onChange:T,__nextHasNoMarginBottom:!0})]})})}),k?(0,m.jsxs)(m.Fragment,{children:[w&&(0,m.jsx)("div",{className:B,children:x}),(0,m.jsx)("div",{className:"jetpack-blogging-prompt__text",children:j}),_&&y&&(0,m.jsxs)("div",{className:"jetpack-blogging-prompt__answers",children:[v&&v.slice(0,3).map((({url:e})=>e&&(0,m.jsx)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:e},e))),(0,m.jsx)("a",{className:"jetpack-blogging-prompt__answers-link",href:f,target:"_blank",rel:"external noreferrer noopener",children:b})]})]}):(0,m.jsx)("div",{className:"jetpack-blogging-prompt__spinner",children:(0,m.jsx)(a.Spinner,{})})]})}))},87888:(e,t,r)=>{"use strict";var n=r(74997),s=r(47143),o=r(27723),a=r(94375),i=r(27734),l=r(32442),c=r(12169),u=r(63757),d=r(94530),p=r(86239),h=r(57028);const __=o.__,m=new URL(document.location.href),g=m.pathname.endsWith("/wp-admin/post-new.php"),f=g?m.searchParams.get("answer_prompt")??"0":"0",b=parseInt(f),v={edit:c.A,save:h.A,example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:u},{url:d},{url:p}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0,isBloganuary:!1}}};b||(0,a.M)(l,v);async function k(e){await(0,i.O)();(0,n.getBlockType)("jetpack/blogging-prompt")||await new Promise((e=>{(0,a.M)(l,v),setTimeout(e,0)}));const{insertBlocks:t}=(0,s.dispatch)("core/block-editor");t([(0,n.createBlock)("jetpack/blogging-prompt",{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,n.createBlock)("core/paragraph")],0,void 0,!1)}g&&b&&k(b)},57028:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(94715),s=r(13022),o=r(10790);const a=function({attributes:e}){const{answersLink:t,answersLinkText:r,gravatars:a,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d,isBloganuary:p}=e,h=n.useBlockProps.save({className:"jetpack-blogging-prompt"}),m=(0,s.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":p});return(0,o.jsxs)("div",{...h,children:[u&&(0,o.jsx)("div",{className:m,children:l}),(0,o.jsx)("div",{className:"jetpack-blogging-prompt__text",children:c}),d&&i&&(0,o.jsxs)("div",{className:"jetpack-blogging-prompt__answers",children:[a.map((({url:e})=>e&&(0,o.jsx)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:e},e))),(0,o.jsx)("a",{className:"jetpack-blogging-prompt__answers-link",href:t,target:"_blank",rel:"external noreferrer noopener",children:r})]})]})}},9075:(e,t,r)=>{"use strict";r.d(t,{J:()=>c});var n=r(1455),s=r.n(n),o=r(47143),a=r(86087),i=r(89877);function l(e){const t=(0,i.escapeHTML)(e);return s()({path:"/wp/v2/tags",method:"POST",data:{name:t}}).catch((t=>"term_exists"!==t.code?Promise.reject(t):Promise.resolve({id:t.data.term_id,name:e})))}function c(e,t,r){const{editPost:n}=(0,o.useDispatch)("core/editor"),s=(0,a.useRef)("not-started"),{getEditedPostAttribute:i}=(0,o.useSelect)((e=>e("core/editor")),[]),c=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("type")),[]),u=(0,o.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")||[]),[]),d=(0,o.useSelect)((e=>e("core").getPostType("post")?.taxonomies?.includes("post_tag")),[]),p=(0,a.useMemo)((()=>0===u.length?null:{_fields:"id,name",context:"view",include:u.join(","),per_page:-1}),[u]),h=(0,o.useSelect)((e=>0===u.length?[]:e("core").getEntityRecords("taxonomy","post_tag",p)||[]),[p,u.length]),m=(0,o.useSelect)((e=>0===u.length||e("core").hasFinishedResolution("getEntityRecords",["taxonomy","post_tag",p])),[p,u.length]);(0,a.useEffect)((()=>{"post"===c&&d&&!t&&m&&e&&Array.isArray(h)&&("not-started"===s.current&&(h.some((e=>e.name&&"dailyprompt"===e.name))&&h.some((t=>t.name&&t.name===`dailyprompt-${e}`))?s.current="fulfilled":(s.current="pending",Promise.all([l("dailyprompt"),l(`dailyprompt-${e}`)]).then((e=>{const t=e.map((e=>e.id)),r=i("tags")||[];n({tags:[...r,...t]}),s.current="fulfilled"})).catch((e=>{console.error(e),s.current="rejected"})))),"fulfilled"===s.current&&r(!0))}),[n,d,c,e,s,r,h,u,t,m,i])}},59914:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=[r(97766)]},67805:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={id:{type:"string"},name:{type:"string"},icon:{type:"string",default:r(84954)},is_non_wpcom_site:{type:"boolean",default:!1},url:{type:"string"},description:{type:"string"}}},97766:(e,t,r)=>{"use strict";r.r(t),r.d(t,{attributes:()=>o.A,save:()=>i,supports:()=>a.A});var n=r(94715),s=r(10790),o=r(67805),a=r(13896);const i=()=>(0,s.jsx)(n.InnerBlocks.Content,{})},13896:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n={align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0,inserter:!1}},53808:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(56427),o=r(27723),a=r(10790);const __=o.__;const i=function({className:e,attributes:t,setAttributes:r}){const{icon:o,name:i,description:l}=t,c=(0,n.useBlockProps)({className:e});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{className:"wp-block-separator jetpack-blogroll-item-divider"}),(0,a.jsxs)("div",{...c,children:[(0,a.jsx)(n.MediaUpload,{multiple:!1,onSelect:e=>{r({icon:e.url})},render:({open:e})=>(0,a.jsx)(s.Button,{variant:"link",onClick:e,style:{padding:0},children:(0,a.jsx)("figure",{children:(0,a.jsx)("img",{className:"blogroll-item-image",onError:e=>{e.target.parentNode.classList.add("empty-site-icon")},src:o,alt:i})})})}),(0,a.jsxs)("div",{className:"jetpack-blogroll-item-content",children:[(0,a.jsx)("a",{children:(0,a.jsx)(n.RichText,{className:"jetpack-blogroll-item-title",value:i,tagName:"p",allowedFormats:["core/italic"],onChange:e=>{r({name:e})},placeholder:__("Enter site title","jetpack")})}),(0,a.jsx)(n.RichText,{className:"jetpack-blogroll-item-description",value:l,onChange:e=>{r({description:e})},placeholder:__("Enter site description","jetpack")})]})]})]})}},3686:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(n.Path,{d:"M12 12.75H21V11.25H12V12.75Z"}),(0,s.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3 12C3 10.3431 4.34315 9 6 9C7.65685 9 9 10.3431 9 12C9 13.6569 7.65685 15 6 15C4.34315 15 3 13.6569 3 12ZM3.77743 10.8857C4.08602 10.2714 4.64181 9.80266 5.31427 9.61008C5.15499 9.79493 5.01798 10.0132 4.90612 10.2532C4.81521 10.4483 4.73949 10.6605 4.68112 10.8857H3.77743ZM3.58718 11.4C3.53956 11.5922 3.51429 11.7931 3.51429 12C3.51429 12.2069 3.53956 12.4078 3.58718 12.6H4.58166C4.55616 12.4057 4.54286 12.205 4.54286 12C4.54286 11.7949 4.55616 11.5942 4.58166 11.4H3.58718ZM5.10094 11.4C5.0724 11.5917 5.05714 11.7926 5.05714 12C5.05714 12.2074 5.0724 12.4083 5.10094 12.6H6.89907C6.92761 12.4083 6.94286 12.2074 6.94286 12C6.94286 11.7926 6.92761 11.5917 6.89906 11.4H5.10094ZM7.41834 11.4C7.44384 11.5942 7.45714 11.7949 7.45714 12C7.45714 12.2051 7.44384 12.4058 7.41835 12.6H8.41282C8.46044 12.4078 8.48571 12.2069 8.48571 12C8.48571 11.7931 8.46044 11.5922 8.41282 11.4H7.41834ZM8.22257 10.8857H7.31888C7.26051 10.6605 7.18479 10.4483 7.09388 10.2532C6.98202 10.0132 6.845 9.79493 6.68571 9.61007C7.35817 9.80265 7.91398 10.2714 8.22257 10.8857ZM6.78494 10.8857H5.21506C5.25946 10.7382 5.31227 10.5992 5.37226 10.4705C5.5421 10.1061 5.76275 9.83732 5.99999 9.67974C6.23724 9.83732 6.45789 10.1061 6.62775 10.4705C6.68773 10.5992 6.74054 10.7382 6.78494 10.8857ZM3.77743 13.1143H4.68112C4.74269 13.3519 4.82356 13.5749 4.92121 13.7787C5.0301 14.0059 5.16199 14.2132 5.31431 14.3899C4.64184 14.1974 4.08603 13.7286 3.77743 13.1143ZM6.78495 13.1143H5.21506C5.26258 13.2722 5.31973 13.4203 5.38498 13.5564C5.5534 13.9078 5.76894 14.1668 6.00003 14.3203C6.23726 14.1627 6.45791 13.8939 6.62775 13.5295C6.68773 13.4008 6.74054 13.2618 6.78495 13.1143ZM7.09388 13.7468C7.18479 13.5517 7.26052 13.3395 7.31889 13.1143H8.22257C7.91398 13.7286 7.35819 14.1973 6.68574 14.3899C6.84501 14.2051 6.98203 13.9868 7.09388 13.7468Z",strokeWidth:"0.1"})]})},77782:(e,t,r)=>{"use strict";r.d(t,{UU:()=>d,W0:()=>p});var n=r(85985),s=r(94715),o=r(27723),a=r(84954),i=r(59914),l=r(53808),c=r(3686),u=r(10790);const __=o.__,d="blogroll-item",p={apiVersion:3,title:__("Blogroll Item","jetpack"),description:__("Blogroll Item","jetpack"),icon:{src:c.A,foreground:(0,n.VA)()},category:"grow",parent:["jetpack/blogroll"],keywords:[],supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0,inserter:!1},edit:l.A,attributes:{id:{type:"string"},name:{type:"string"},icon:{type:"string",default:a},is_non_wpcom_site:{type:"boolean",default:!1},url:{type:"string"},description:{type:"string"}},save:()=>{const e=s.useBlockProps.save();return(0,u.jsx)("div",{...e,children:(0,u.jsx)(s.InnerBlocks.Content,{})})},example:{attributes:{}},deprecated:i.A}},40536:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(3582),s=r(27723),o=r(10790);const __=s.__;function a({results:e,onSelect:t,searchInput:r,isLoading:a}){const[i]=(0,n.useEntityProp)("root","site","Blogroll Recommendations");if(a)return(0,o.jsx)("div",{className:"jetpack-blogroll__appender-results",children:(0,o.jsx)("div",{role:"status",children:__("Loading…","jetpack")})});const l=!r?.trim();return(0,o.jsxs)("div",{className:"jetpack-blogroll__appender-results",children:[l&&(0,o.jsx)("div",{"aria-autocomplete":"list",className:"jetpack-blogroll__appender-result-list-header-text",children:__("Suggestions","jetpack")}),0===e.length&&!l&&(0,o.jsxs)("div",{role:"status",className:"jetpack-blogroll__appender-no-results-message",children:[(0,o.jsx)("span",{className:"jetpack-blogroll__appender-no-results-message-main-text",children:__("No results","jetpack")}),(0,o.jsx)("span",{className:"jetpack-blogroll__appender-no-results-message-secondary-text",children:(0,s.sprintf)(/* translators: %s is search query. */ __("No sites found for %s.","jetpack"),r)})]}),e.length>0&&(0,o.jsx)("ul",{"aria-live":"polite",children:e.map(((e,r)=>{const n=i?.some?.((t=>t?.id===e?.blog_id))||!1;return(0,o.jsx)("li",{className:"jetpack-blogroll__appender-result-container",children:(0,o.jsxs)("button",{className:"jetpack-blogroll__appender-result-title",disabled:n,onClick:()=>t(e),children:[(0,o.jsx)("div",{className:"jetpack-blogroll__appender-result-image",children:e.site_icon&&(0,o.jsx)("img",{src:e.site_icon,alt:e.name,onError:e=>{e.target.parentNode.classList.add("empty-site-icon")}})}),(0,o.jsxs)("div",{className:"jetpack-blogroll__appender-result-text",children:[(0,o.jsx)("span",{className:"jetpack-blogroll__appender-result-title",children:e.name}),(0,o.jsx)("span",{className:"jetpack-blogroll__appender-result-description",children:e.description})]})]})},`${e.blog_id}-${r}`)}))})]})}},17454:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(56427),s=r(27723),o=r(10790);const __=s.__;function a({value:e,onChange:t}){return(0,o.jsx)("div",{className:"jetpack-blogroll__appender-search",children:(0,o.jsx)(n.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:e,onChange:e=>t(e)})})}},37127:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(56427),s=r(47143),o=r(86087),a=r(27723),i=r(45459),l=r(92507),c=r(85101),u=r(40536),d=r(17454),p=r(10790);const __=a.__;function h({isLoading:e,subscriptions:t,clientId:r}){const[a,h]=(0,o.useState)(!1),[m,g]=(0,o.useState)(),[f,b]=(0,o.useState)(""),{insertBlock:v}=(0,s.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,l.A)({siteURL:f,subscriptions:t,enabled:f});return e?(0,p.jsx)(n.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.Button,{className:"block-editor-button-blogroll-block-appender",ref:g,icon:i.A,label:__("Add Blogroll Item","jetpack"),onClick:()=>{h((e=>!e))}}),a&&(0,p.jsxs)(n.Popover,{anchor:m,className:"jetpack-blogroll__appender",children:[(0,p.jsx)(d.A,{value:f,onChange:b}),(0,p.jsx)(u.A,{results:k,onSelect:e=>{v((0,c.FN)(e),void 0,r),h(!1)},searchInput:f,isLoading:y})]})]})}},63166:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(94715),s=r(74997),o=r(56427),a=r(47143),i=r(86087),l=r(27723),c=r(13022),u=r(2274),d=r(26247),p=r(37127),h=r(32130),m=r(46542),g=r(25688),f=r(85101),b=r(10790);const __=l.__;const v=function({className:e,attributes:t,setAttributes:r,clientId:l}){const{show_avatar:v,show_description:k,open_links_new_window:y,ignore_user_blogs:x,load_placeholders:j}=t,w=(0,d.A)(),{isLoading:_,recommendations:C,errorMessage:A}=(0,h.A)(j),{isLoading:S,subscriptions:E,errorMessage:N}=(0,g.A)({ignore_user_blogs:x});(0,m.b)({clientId:l});const{replaceInnerBlocks:T}=(0,a.dispatch)("core/block-editor");(0,i.useEffect)((()=>{if(j&&C.length){r({load_placeholders:!1});const e=[(0,s.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...C.map(f.dy)];T(l,e)}}),[C,j,r,l,T]);const B=(0,n.useBlockProps)({className:(0,c.A)(e,{"hide-avatar":!v,"hide-description":!k})});if(!w)return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(u.A,{block:"Blogroll",explanation:__("Connect your WordPress.com account to use the Blogroll block.","jetpack")})});const P=A||N;return(0,b.jsxs)("div",{...B,children:[(0,b.jsx)(n.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!_&&(0,b.jsx)(p.A,{isLoading:S,subscriptions:E,clientId:l})}),P&&(0,b.jsx)(o.Notice,{status:"error",isDismissible:!1,children:(0,b.jsx)("p",{children:P})}),j&&_&&(0,b.jsx)(o.FlexBlock,{style:{padding:"30px",textAlign:"center"},children:(0,b.jsx)(o.Spinner,{})}),(0,b.jsx)(n.InspectorControls,{children:(0,b.jsxs)(o.PanelBody,{title:__("Settings","jetpack"),children:[(0,b.jsx)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!v,onChange:()=>r({show_avatar:!v}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Show description","jetpack"),checked:!!k,onChange:()=>r({show_description:!k}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Open links in a new window","jetpack"),checked:!!y,onChange:()=>r({open_links_new_window:!y}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Hide my own sites","jetpack"),checked:!!x,onChange:()=>r({ignore_user_blogs:!x}),__nextHasNoMarginBottom:!0})]})})]})}},22475:(e,t,r)=>{"use strict";var n=r(94375),s=r(52829),o=r(77782),a=r(63166),i=r(36219);(0,n.M)(s,{edit:a.A,save:i.A},[{name:o.UU,settings:o.W0}])},36219:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(94715),s=r(13022),o=r(10790);const a=function({attributes:{show_avatar:e,show_description:t},className:r}){const a=n.useBlockProps.save({className:(0,s.A)(r,{"hide-avatar":!e,"hide-description":!t})});return(0,o.jsx)("div",{...a,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}},13818:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(86087),s=r(85101);function o(e,t=!0){const[r,o]=(0,n.useState)(null),[a,i]=(0,n.useState)(null),[l,c]=(0,n.useState)(!1),u=function(e,t=100){const[r,s]=(0,n.useState)(e);return(0,n.useEffect)((()=>{const r=setTimeout((()=>{s(e)}),t);return()=>{clearTimeout(r)}}),[e,t]),r}((0,s.l$)(e),500);return(0,n.useEffect)((()=>{if(c(Boolean(t&&u)),t&&u){const e=new AbortController;return fetch(`https://public-api.wordpress.com/rest/v1.1/sites/${encodeURIComponent(u)}?force=wpcom`,{cache:"force-cache",signal:e.signal}).then((e=>{if(200===e.status)return e.json();e.status})).then((e=>{o(e),c(!1)})).catch((e=>{"AbortError"!==e.name&&i(e)})),()=>e.abort()}}),[u,t]),{response:r,error:a,isLoading:l}}},92507:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(13818),s=r(85101);function o({siteURL:e,subscriptions:t,enabled:r=!1}){const o=(0,s.l$)(e),{response:a,isLoading:i}=(0,n.Z)(o,Boolean(r)),l=[...a?[{blog_id:a?.ID.toString(),description:a?.description,URL:a?.URL,site_icon:(0,s.ZE)(a?.logo?.url),name:a?.name}]:[],...t].filter((t=>`${t.name}${t.URL}`.match(new RegExp(e,"i"))));return 0===l.length&&o&&l.unshift({blog_id:o,description:"",URL:o,site_icon:(0,s.ZE)(null),name:o,is_non_wpcom_site:!0}),{isLoading:i,siteDetails:l}}},32130:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(1455),s=r.n(n),o=r(86087),a=r(27723);const __=a.__;function i(e=!1){const[t,r]=(0,o.useState)(!1),[n,a]=(0,o.useState)(null),[i,l]=(0,o.useState)([]),c=(0,o.useRef)(void 0);return(0,o.useEffect)((()=>{e?(r(!0),a(null),c.current&&c.current.abort(),c.current="undefined"==typeof AbortController?void 0:new AbortController,s()({path:"/wpcom/v2/following/recommendations",global:!0,method:"GET",signal:c.current?.signal}).then((e=>{e.length||a(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),l(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?a(e.message):a(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{c.current=null,r(!1)}))):r(!1)}),[e]),{isLoading:t,errorMessage:n,recommendations:i}}},46542:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var n=r(3582),s=r(47143),o=r(86087),a=r(85101);const i=({clientId:e})=>{const[t,r]=(0,o.useState)(!1),{insertBlocks:i}=(0,s.useDispatch)("core/block-editor"),[l,c]=(0,n.useEntityProp)("root","site","Blogroll Recommendations"),u=(0,s.useSelect)((t=>t("core/block-editor").getBlock(e).innerBlocks.filter((({name:e})=>"jetpack/blogroll-item"===e)).map((({attributes:e})=>e))),[e]);(0,o.useEffect)((()=>{if(!t&&l){const t=l.filter((e=>!u.some((t=>t.id===e.id))));if(t.length){const r=t.map(a.dy);i(r,void 0,e)}r(!0)}}),[e,l,u,t,i]),(0,o.useEffect)((()=>{void 0!==l&&c(u)}),[u])}},25688:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(1455),s=r.n(n),o=r(86087),a=r(27723),i=r(93832),l=r(85101);const __=a.__;function c({ignore_user_blogs:e}){const[t,r]=(0,o.useState)(!1),[n,a]=(0,o.useState)(null),[c,u]=(0,o.useState)([]),d=(0,o.useRef)(void 0);return(0,o.useEffect)((()=>{r(!0),a(null),d.current&&d.current.abort(),d.current="undefined"==typeof AbortController?void 0:new AbortController,s()({path:(0,i.addQueryArgs)("/wpcom/v2/following/mine",{ignore_user_blogs:e}),global:!0,method:"GET",signal:d.current?.signal}).then((e=>{e.length||a(__("No subscriptions found. You need to follow some sites in order to see results.","jetpack")),e=e.map((e=>(e.site_icon=(0,l.ZE)(e.site_icon),e))),u(e)})).catch((e=>{"AbortError"!==e.name&&(e.message?a(e.message):a(__("Whoops, we have encountered an error. Please try again later.","jetpack")))})).finally((()=>{d.current=null,r(!1)}))}),[e]),{isLoading:t,errorMessage:n,subscriptions:c}}},85101:(e,t,r)=>{"use strict";r.d(t,{FN:()=>a,ZE:()=>l,dy:()=>o,l$:()=>i});var n=r(74997),s=r(84954);function o(e){let t;try{t=new URL(e?.url)?.host.replace(/^www\./,"")}catch{t=e?.URL}return(0,n.createBlock)("jetpack/blogroll-item",{...e,...!e.name&&{name:t}})}function a(e){const{blog_id:t,site_icon:r,URL:n,name:s,description:a,is_non_wpcom_site:i}=e;return o({id:t,icon:r,url:n,name:s,description:a,is_non_wpcom_site:i})}function i(e){if(!e)return null;const t=new RegExp("^([a-zA-Z]+:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])?)\\.)+[a-z]{2,})","i");try{return new URL(e)?.host}catch{return e.match(t)?.[2]??null}}function l(e){return e||s}},60487:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(56427),s=r(86087),o=r(27723),a=r(13022),i=r(66087),l=r(10790);const __=o.__,c="09:00",u="17:00";class d extends s.Component{renderInterval=(e,t)=>{const{day:r}=this.props,{opening:o,closing:i}=e;return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsxs)("div",{className:"business-hours__row",children:[(0,l.jsx)("div",{className:(0,a.A)(r.name,"business-hours__day"),children:0===t&&this.renderDayToggle()}),(0,l.jsxs)("div",{className:(0,a.A)(r.name,"business-hours__hours"),children:[(0,l.jsx)(n.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Opening","jetpack"),value:o,className:"business-hours__open",placeholder:c,onChange:e=>{this.setHour(e,"opening",t)}}),(0,l.jsx)(n.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Closing","jetpack"),value:i,className:"business-hours__close",placeholder:u,onChange:e=>{this.setHour(e,"closing",t)}})]}),(0,l.jsx)("div",{className:"business-hours__remove",children:r.hours.length>1&&(0,l.jsx)(n.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}})})]}),t===r.hours.length-1&&(0,l.jsxs)("div",{className:"business-hours__row business-hours-row__add",children:[(0,l.jsx)("div",{className:(0,a.A)(r.name,"business-hours__day"),children:" "}),(0,l.jsx)("div",{className:(0,a.A)(r.name,"business-hours__hours"),children:(0,l.jsx)(n.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval,children:__("Add Hours","jetpack")})}),(0,l.jsx)("div",{className:"business-hours__remove",children:" "})]})]},t)};setHour=(e,t,r)=>{const{day:n,attributes:s,setAttributes:o}=this.props,{days:a}=s;o({days:a.map((s=>s.name===n.name?{...s,hours:s.hours.map(((n,s)=>s===r?{...n,[t]:e}:n))}:s))})};toggleClosed=e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:s}=r;n({days:s.map((r=>{if(r.name===t.name){const t=e?[{opening:c,closing:u}]:[];return{...r,hours:t}}return r}))})};addInterval=()=>{const{day:e,attributes:t,setAttributes:r}=this.props,{days:n}=t;e.hours.push({opening:"",closing:""}),r({days:n.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})};removeInterval=e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:s}=r;n({days:s.map((r=>t.name===r.name?{...r,hours:r.hours.filter(((t,r)=>e!==r))}:r))})};isClosed(){const{day:e}=this.props;return(0,i.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)("span",{className:"business-hours__day-name",children:t.days[e.name]}),(0,l.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed})]})}renderClosed(){const{day:e}=this.props;return(0,l.jsxs)("div",{className:"business-hours__row business-hours-row__closed",children:[(0,l.jsx)("div",{className:(0,a.A)(e.name,"business-hours__day"),children:this.renderDayToggle()}),(0,l.jsx)("div",{className:(0,a.A)(e.name,"closed","business-hours__hours"),children:" "}),(0,l.jsx)("div",{className:"business-hours__remove",children:" "})]})}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const p=d},39943:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(86087),s=r(27723),o=r(66087),a=r(10790);const _x=s._x,i="undefined"!=typeof window&&window.navigator?.language||"en",l=Intl?.DateTimeFormat?new Intl.DateTimeFormat(i,{hour:"numeric",minute:"numeric",hour12:!0}):null;class c extends n.Component{formatTime(e){const[t,r]=e.split(":");if(!t||!r)return!1;const n=new Date;return n.setHours(t),n.setMinutes(r),l?l.format(n):e}renderInterval=(e,t)=>{const{day:r}=this.props,n=r.hours;return(0,a.jsxs)("span",{children:[(0,s.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),n.length>1+t&&(0,a.jsx)("span",{children:", "})]},t)};render(){const{day:e,localization:t}=this.props,r=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,a.jsxs)("div",{className:"jetpack-business-hours__item",children:[(0,a.jsx)("dt",{className:e.name,children:t.days[e.name]}),(0,a.jsxs)("dd",{children:[(0,o.isEmpty)(r)?_x("Closed","business is closed on a full day","jetpack"):r.map(this.renderInterval),(0,a.jsx)("br",{})]})]})}}const u=c},39155:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var n=r(85985),s=r(1455),o=r.n(s),a=r(94715),i=r(56427),l=r(38443),c=r(86087),u=r(27723),d=r(9050),p=r(60487),h=r(39943),m=r(10790);const __=u.__,g=(0,n.sh)(d),f={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0},b=e=>{const{attributes:t,isSelected:r}=e,n=(0,a.useBlockProps)(),[s,u]=(0,c.useState)(f),[d,b]=(0,c.useState)(!1),{days:v}=t,{startOfWeek:k}=s,y=v.concat(v.slice(0,k)).slice(k);let x;if((0,c.useEffect)((()=>{o()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{u(e),b(!0)}),(()=>{u(f),b(!0)}))}),[]),d)if(r)x=(0,m.jsx)("div",{className:"is-edit",children:y.map(((t,r)=>(0,m.jsx)(p.A,{day:t,localization:s,...e},r)))});else{const e=(0,l.getSettings)(),{formats:{time:t}}=e;x=(0,m.jsx)("dl",{className:"jetpack-business-hours",children:y.map(((e,r)=>(0,m.jsx)(h.A,{day:e,localization:s,timeFormat:t},r)))})}else x=(0,m.jsx)(i.Placeholder,{icon:g,label:__("Loading business hours","jetpack")});return(0,m.jsx)("div",{...n,children:x})}},71410:(e,t,r)=>{"use strict";var n=r(94375),s=r(9050),o=r(39155),a=r(10790);(0,n.M)(s,{edit:e=>(0,a.jsx)(o.A,{...e}),save:()=>null})},28310:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(98329);const s={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string",role:"content"},placeholder:{type:"string",role:"content"},url:{type:"string",role:"content"},textColor:{type:"string"},customTextColor:{type:"string",validator:n.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:n.A},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"},customVariant:{type:"string"},metaName:{type:"string"}}},12365:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(56427),s=r(86087),o=r(27723),a=r(8746),i=r(10790);const __=o.__;function l({borderRadius:e="",setAttributes:t}){const r=(0,s.useCallback)((e=>t({borderRadius:e})),[t]);return(0,i.jsx)(n.PanelBody,{title:__("Border Settings","jetpack"),children:(0,i.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,allowReset:!0,initialPosition:a.hc,label:__("Border radius","jetpack"),max:a.Bs,min:a.rG,onChange:r,value:e})})}},10179:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(94715),s=r(27723),o=r(10790);const __=s.__;function a({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:r,fallbackTextColor:s,gradientValue:a,setBackgroundColor:i,setGradient:l,setTextColor:c,textColor:u}){const d=(0,o.jsx)(n.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:r,fallbackTextColor:s,isLargeText:!1,textColor:u.color});return e?(0,o.jsx)(n.__experimentalPanelColorGradientSettings,{settings:[{colorValue:u.color,label:__("Text Color","jetpack"),onColorChange:c},{colorValue:t.color,gradientValue:a,label:__("Background","jetpack"),onColorChange:i,onGradientChange:l}],title:__("Background & Text Color","jetpack"),children:d}):(0,o.jsx)(n.PanelColorSettings,{colorSettings:[{value:u.color,onChange:c,label:__("Text Color","jetpack")},{value:t.color,onChange:i,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack"),children:d})}},8746:(e,t,r)=>{"use strict";r.d(t,{Bs:()=>a,Uc:()=>s,hc:()=>o,rG:()=>i});var n=r(94715);const s=!!n.__experimentalUseGradient,o=5,a=50,i=0},2761:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(47143),s=r(38062),o=r(12365),a=r(10179),i=r(10790);function l({attributes:e,backgroundColor:t,clientId:r,context:l,fallbackBackgroundColor:c,fallbackTextColor:u,setAttributes:d,setBackgroundColor:p,setTextColor:h,textColor:m,gradientValue:g,setGradient:f,isGradientAvailable:b}){const{align:v,borderRadius:k}=e,y="jetpack/parentBlockWidth"in l,x=y?l["jetpack/parentBlockWidth"]:e.width,j=(0,n.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:n}=e("core/block-editor");return t(n(r))})),{updateBlockAttributes:w}=(0,n.useDispatch)("core/block-editor");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{backgroundColor:t,fallbackBackgroundColor:c,fallbackTextColor:u,gradientValue:g,setBackgroundColor:p,setGradient:f,setTextColor:h,textColor:m,isGradientAvailable:b}),(0,i.jsx)(o.A,{borderRadius:k,setAttributes:d}),(0,i.jsx)(s.D,{align:v,width:x,onChange:e=>{y?w(j.clientId,{width:e}):d({width:e})}})]})}},55903:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(94715),s=r(29491),o=r(47143),a=r(86087),i=r(27723),l=r(13022),c=r(8746),u=r(2761),d=r(7528),p=r(81177),h=r(10790);const __=i.__;const m=(0,s.compose)((0,n.withColors)({backgroundColor:"background-color"},{textColor:"color"}))((function(e){const{attributes:t,backgroundColor:r,className:s,clientId:i,setAttributes:m,textColor:g}=e,{borderRadius:f,element:b,placeholder:v,text:k,width:y,fontSize:x,customVariant:j,metaName:w}=t;(0,p.A)({attributes:t,clientId:i,setAttributes:m});const{metadata:_}=(0,o.useSelect)((e=>{const{getBlockAttributes:t}=e(n.store);return{metadata:t(i)?.metadata}}),[i]),{updateBlockAttributes:C,__unstableMarkNextChangeAsNotPersistent:A}=(0,o.useDispatch)("core/block-editor"),{gradientClass:S,gradientValue:E,setGradient:N}=c.Uc?(0,n.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},T=(0,n.useBlockProps)({className:(0,l.A)("wp-block-button",s),style:{width:y}}),[B,P]=(0,d.A)(),I=(0,n.__experimentalUseBorderProps)(t),M=(0,l.A)("wp-block-button__link",I.className,{"has-background":r.color||E,[r.class]:!E&&r.class,"has-text-color":g.color,[g.class]:g.class,[S]:S,"no-border-radius":0===f,[`has-${x}-font-size`]:!!x,"has-custom-font-size":!!x,[`is-${j}`]:!!j});(0,a.useEffect)((()=>{i&&w&&_?.name!==w&&(A(),C(i,{metadata:{..._,name:w}}))}),[w,_,C,i,A]);const L={...!r.color&&E?{background:E}:{backgroundColor:r.color},fontSize:t.style?.typography?.fontSize,color:g.color,borderRadius:f?f+"px":void 0,...I.style};return(0,h.jsxs)("div",{...T,children:[(0,h.jsx)(n.RichText,{allowedFormats:"input"===b?[]:void 0,className:M,disableLineBreaks:"input"===b,onChange:e=>m({text:e}),placeholder:v||__("Add text…","jetpack"),ref:P,style:L,value:k,withoutInteractiveFormatting:!0}),(0,h.jsx)(n.InspectorControls,{children:(0,h.jsx)(u.A,{gradientValue:E,setGradient:N,isGradientAvailable:c.Uc,...B,...e})})]})}))},45878:(e,t,r)=>{"use strict";var n=r(94375),s=r(5383);(0,n.A)(s.U,s.W)},36270:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=(0,s.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(n.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"})})},5383:(e,t,r)=>{"use strict";r.d(t,{U:()=>c,W:()=>u});var n=r(27723),s=r(97969),o=r(28310),a=r(55903),i=r(36270),l=r(85154);const __=n.__,c="button",u={apiVersion:3,title:__("Button","jetpack"),icon:i.A,category:(0,s.A)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],selectors:{border:".wp-block-jetpack-button .wp-block-button__link"},attributes:o.A,edit:a.A,save:l.A,usesContext:["jetpack/parentBlockWidth"]}},85154:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(13022),o=r(8746),a=r(10790);function i({attributes:e,blockName:t,uniqueId:r}){const{backgroundColor:i,borderRadius:l,className:c,customBackgroundColor:u,customGradient:d,customTextColor:p,gradient:h,saveInPostContent:m,text:g,textColor:f,url:b,width:v,fontSize:k}=e;if(!m)return null;const y=n.useBlockProps.save(),x=(0,n.__experimentalGetBorderClassesAndStyles)(e),j=(0,n.getColorClassName)("background-color",i),w=o.Uc?(0,n.__experimentalGetGradientClass)(h):void 0,_=(0,n.getColorClassName)("color",f),C=(0,s.A)("wp-block-button","jetpack-submit-button",c,y?.className,x.className,{[`wp-block-jetpack-${t}`]:t}),A=(0,s.A)("wp-block-button__link",{"has-text-color":f||p,[_]:_,"has-background":i||h||u||d,[j]:j,[w]:w,"no-border-radius":0===l,"has-custom-width":!!v,[`has-${k}-font-size`]:!!k,"has-custom-font-size":!!k}),S={background:d||void 0,backgroundColor:j||d||h?void 0:u,fontSize:e.style?.typography?.fontSize,color:_?void 0:p,borderRadius:l?l+"px":void 0,width:v,...x.style};return(0,a.jsx)("div",{...y,className:C,children:(0,a.jsx)(n.RichText.Content,{className:A,"data-id-attr":r||"placeholder",href:b,id:r,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g})})}},7528:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(29491),s=r(86087);function o(){const[e,t]=(0,s.useState)(),r=(0,n.useRefEffect)((r=>{const n=()=>{const n=getComputedStyle(r),s=n.backgroundColor,o=n.color;s===e?.fallbackBackgroundColor&&o===e?.fallbackTextColor||t({fallbackBackgroundColor:s,fallbackTextColor:o})},s=new MutationObserver(n);return s.observe(r,{attributeFilter:["style","class"]}),n(),()=>{s.disconnect()}}),[]);return[e,r]}},81177:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(47143),s=r(86087),o=r(66087);function a({attributes:e,clientId:t,setAttributes:r}){const{passthroughAttributes:a}=e,i=(0,n.useSelect)((r=>{const n=r("core/block-editor"),s=n.getBlockRootClientId(t),o=n.getBlockAttributes(s)||{};if(!s||!a)return{};let i=!1;const l={};return Object.entries(a).forEach((([t,r])=>{const n=o[r];n!==e[t]&&(i=!0,l[t]=n)})),i?l:{}}),[t,a,e]);(0,s.useEffect)((()=>{(0,o.isEmpty)(i)||r(i)}),[i,r])}},95816:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});const n="https://calendly.com/wpcom/jetpack-block-example"},99723:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>d});var n=r(97999),s=r(94715),o=r(56427),a=r(27723),i=r(5873),l=r(10790);const __=a.__,_x=a._x,c=({onEditClick:e})=>(0,l.jsx)(o.ToolbarGroup,{children:(0,l.jsx)(o.ToolbarButton,{onClick:()=>e(!0),children:__("Edit","jetpack")})}),u=e=>{const{attributes:{hideEventTypeDetails:t,url:r},defaultClassName:s,embedCode:a,parseEmbedCode:i,setAttributes:c,setEmbedCode:u}=e;let d=null;return r&&(d=(0,n.isWpcomPlatformSite)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1,children:[(0,l.jsxs)("form",{onSubmit:i,className:`${s}-embed-form-sidebar`,children:[(0,l.jsx)("input",{type:"text",id:"embedCode",onChange:e=>u(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:a||"",className:"components-placeholder__input"}),(0,l.jsx)("div",{children:(0,l.jsx)(o.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})})]}),(0,l.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Hide event type details","jetpack"),checked:t,onChange:()=>c({hideEventTypeDetails:!t})})]}),d&&(0,l.jsx)(o.Notice,{className:`${s}-color-notice`,isDismissible:!1,children:(0,l.jsx)(o.ExternalLink,{href:d,children:__("Explore more customization options.","jetpack")})})]})},d=e=>{const{attributes:t,clientId:r,isEditingUrl:n,setAttributes:o,setIsEditingUrl:a}=e,{style:d,url:p}=t,h=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,l.jsxs)(l.Fragment,{children:[p&&!n&&(0,l.jsx)(s.BlockControls,{children:(0,l.jsx)(c,{onEditClick:a})}),p&&(0,l.jsx)(i.A,{clientId:r,styleOptions:h,onSelectStyle:o,activeStyle:d,attributes:t,viewportWidth:500}),(0,l.jsx)(s.InspectorControls,{children:(0,l.jsx)(u,{...e})})]})}},19493:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(74997),s=r(27723),o=r(98329),a=r(10790);const __=s.__,i={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:o.A},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:o.A},textColor:{type:"string",default:"4D5055",validator:o.A},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:o.A},customTextButtonColor:{type:"string",validator:o.A}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:r,submitButtonBackgroundColor:s,submitButtonClasses:o,backgroundButtonColor:a,textButtonColor:i,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,n.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:({attributes:{url:e}})=>(0,a.jsx)("a",{href:e,children:e})}},52385:(e,t,r)=>{"use strict";r.d(t,{A:()=>j});var n=r(85985),s=r(94715),o=r(74997),a=r(56427),i=r(47143),l=r(86087),c=r(27723),u=r(13022),d=r(66087),p=r(78218),h=r(56145),m=r(13248),g=r(95816),f=r(99723),b=r(38028),v=r(10790);const __=c.__,_x=c._x,k="jetpack/button",y={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:g.a},x=(0,n.sh)(m);const j=(0,a.withNotices)((function(e){const{attributes:t,clientId:r,name:n,noticeOperations:c,noticeUI:j,setAttributes:w}=e,_=(0,o.getBlockDefaultClassName)(n),C=(0,p.y)(m.attributes,t);(0,d.isEqual)(C,t)||w(C);const{backgroundColor:A,hideEventTypeDetails:S,primaryColor:E,textColor:N,style:T,url:B}=C,[P,I]=(0,l.useState)(B),[M,L]=(0,l.useState)(!1),[R,D]=(0,l.useState)(!1),[F,O]=(0,l.useState)({}),z=(0,s.useBlockProps)(),U=()=>{c.removeAllNotices(),c.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,l.useEffect)((()=>{B&&g.a!==B&&"link"!==T&&(0,h.A)(B,D).catch((()=>{w({url:void 0}),U()}))}),[]);const H=e=>{if(!e)return void U();e.preventDefault();const t=(0,b.a9)(P);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,i.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,i.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),O(t.buttonAttributes)}(0,h.A)(t.url,D).then((()=>{const e=(0,p.y)(m.attributes,t);w(e),L(!1),c.removeAllNotices()})).catch((()=>{w({url:void 0}),U()}))}else U()},V=(0,v.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,v.jsx)(a.Spinner,{}),(0,v.jsx)("p",{children:__("Embedding…","jetpack")})]}),q=(0,v.jsxs)(a.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:x,notices:j,children:[(0,v.jsxs)("form",{onSubmit:H,children:[(0,v.jsx)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:P||"",className:"components-placeholder__input"}),(0,v.jsx)("div",{children:(0,v.jsx)(a.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})})]}),(0,v.jsx)("div",{className:`${_}-learn-more`,children:(0,v.jsx)(a.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview",children:__("Need help finding your embed code?","jetpack")})})]}),G=(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:`${_}-overlay`}),(0,v.jsx)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:S?1:0,background_color:A,primary_color:E,text_color:N});return`${B}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})]}),$=(0,v.jsx)(s.InnerBlocks,{template:[[k,{...y,...F,passthroughAttributes:{url:"url"}}]],templateLock:"all"});return R?V:(0,v.jsxs)("div",{...z,className:(0,u.A)(z.className,{[`calendly-style-${T}`]:B&&!M}),children:[(0,v.jsx)(f.Ay,{...e,defaultClassName:_,embedCode:P,isEditingUrl:M,parseEmbedCode:H,setEmbedCode:I,setIsEditingUrl:L}),B&&!M?(W=T,"inline"===W?G:$):q]});var W}))},60312:(e,t,r)=>{"use strict";var n=r(74997),s=r(94375),o=r(13248),a=r(19493),i=r(52385),l=r(2668),c=r(38028);(0,s.M)(o,{edit:i.A,save:l.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&c.QL.test(e.textContent),transform:e=>{const t=(0,c.a9)(e.textContent);return(0,n.createBlock)("jetpack/calendly",t)}}]},deprecated:[a.A]})},2668:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(94715),s=r(10790);function o(){const e=n.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(n.InnerBlocks.Content,{})})}},38028:(e,t,r)=>{"use strict";r.d(t,{QL:()=>n,a9:()=>s});const n=/(^|\/\/)(calendly\.com[^"']*)/i,s=e=>{if(!e)return;const t=(e=>{const t=e.match(n);if(t)return"https://"+t[2]})(e);if(!t)return;const r=(e=>{const t={},r=new URL(e);if(t.url=r.origin+r.pathname,!r.search)return t;const n=new URLSearchParams(r.search),s=n.get("background_color"),o=n.get("primary_color"),a=n.get("text_color"),i=/^[A-Za-z0-9]{6}$/;return n.get("hide_event_type_details")&&(t.hideEventTypeDetails=n.get("hide_event_type_details")),s&&s.match(i)&&(t.backgroundColor=s),o&&o.match(i)&&(t.primaryColor=o),a&&a.match(i)&&(t.textColor=a),t})(t),s=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(s&&(r.style=s),"link"===s){r.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(r.buttonAttributes.text=t);const n=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);n&&(r.buttonAttributes.textColor=void 0,r.buttonAttributes.customTextColor=n);const s=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);s&&(r.buttonAttributes.backgroundColor=void 0,r.buttonAttributes.customBackgroundColor=s)}return r}},98091:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(94715),s=r(56427),o=r(86087),a=r(27723),i=r(13022),l=r(81942),c=r(10790);const __=a.__,u=e=>{const{attributes:{address:t,addressLine2:r,addressLine3:a,city:u,region:d,postal:p,country:h,linkToGoogleMaps:m},isSelected:g,setAttributes:f}=e,b=[t,r,a,u,d,p,h].some((e=>""!==e)),v=(0,i.A)({"jetpack-address-block":!0,"is-selected":g}),k=(0,o.useCallback)((e=>{"Enter"===e.key&&e.preventDefault()}),[]),y=(0,n.useBlockProps)({className:v}),x=(0,c.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>f({linkToGoogleMaps:e})});return(0,c.jsxs)("div",{...y,children:[!g&&b&&(0,l.A)(e),(g||!b)&&(0,c.jsxs)(o.Fragment,{children:[(0,c.jsx)(n.PlainText,{value:t,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>f({address:e}),onKeyDown:k}),(0,c.jsx)(n.PlainText,{value:r,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>f({addressLine2:e}),onKeyDown:k}),(0,c.jsx)(n.PlainText,{value:a,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>f({addressLine3:e}),onKeyDown:k}),(0,c.jsx)(n.PlainText,{value:u,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>f({city:e}),onKeyDown:k}),(0,c.jsx)(n.PlainText,{value:d,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>f({region:e}),onKeyDown:k}),(0,c.jsx)(n.PlainText,{value:p,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>f({postal:e}),onKeyDown:k}),(0,c.jsx)(n.PlainText,{value:h,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>f({country:e}),onKeyDown:k}),x]})]})}},39563:(e,t,r)=>{"use strict";r.d(t,{U:()=>u,W:()=>d});var n=r(56427),s=r(86087),o=r(27723),a=r(62289),i=r(98091),l=r(81942),c=r(10790);const __=o.__,_x=o._x,u="address",d={apiVersion:3,title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,a.A)((0,c.jsxs)(s.Fragment,{children:[(0,c.jsx)(n.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,c.jsx)(n.Circle,{cx:"12",cy:"9",r:"2.5"})]})),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:i.A,save:l.A}},81942:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(94715),s=r(86087),o=r(27723),a=r(10790);const __=o.__,i=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:o,postal:i,country:l}})=>(0,a.jsxs)(s.Fragment,{children:[e&&(0,a.jsx)("div",{className:"jetpack-address__address jetpack-address__address1",children:e}),t&&(0,a.jsx)("div",{className:"jetpack-address__address jetpack-address__address2",children:t}),r&&(0,a.jsx)("div",{className:"jetpack-address__address jetpack-address__address3",children:r}),n&&!(o||i)&&(0,a.jsx)("div",{className:"jetpack-address__city",children:n}),n&&(o||i)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"jetpack-address__city",children:n}),", ",(0,a.jsx)("span",{className:"jetpack-address__region",children:o})," ",(0,a.jsx)("span",{className:"jetpack-address__postal",children:i})]}),!n&&(o||i)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"jetpack-address__region",children:o})," ",(0,a.jsx)("span",{className:"jetpack-address__postal",children:i})]}),l&&(0,a.jsx)("div",{className:"jetpack-address__country",children:l})]}),l=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:s,postal:o,country:a}})=>{let i=s?`+${s},`:"";i=o?`${i}+${o}`:i;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${r?`${r},`:""}${n?`+${n},`:""}${i}${a?`+${a}`:""}`.replace(" ","+")},c=e=>{if(!(({address:e,addressLine2:t,addressLine3:r,city:n,region:s,postal:o,country:a})=>[e,t,r,n,s,o,a].some((e=>""!==e)))(e.attributes))return null;const t=n.useBlockProps.save();return(0,a.jsxs)("div",{...t,children:[e.attributes.linkToGoogleMaps&&(0,a.jsx)("a",{href:l(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack"),children:(0,a.jsx)(i,{...e})}),!e.attributes.linkToGoogleMaps&&(0,a.jsx)(i,{...e})]})}},44246:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(94715),s=r(13022),o=r(10790);const a=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],i=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],l=e=>{const{className:t,isSelected:r}=e,l=(0,n.useBlockProps)({className:(0,s.A)(t,{"jetpack-contact-info-block":!0,"is-selected":r})});return(0,o.jsx)("div",{...l,children:(0,o.jsx)(n.InnerBlocks,{allowedBlocks:a,templateLock:!1,template:i})})}},25907:(e,t,r)=>{"use strict";var n=r(74997),s=r(94375),o=r(39563),a=r(75173),i=r(44246),l=r(90951),c=r(70063),u=r(36611);(0,s.M)(a,{edit:i.A,save:u.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"widget_contact_info"===e,transform:({instance:e})=>{let t=[(0,n.createBlock)("core/heading",{content:e.raw.title}),(0,n.createBlock)("jetpack/email",{email:e.raw.email}),(0,n.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,n.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,n.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,n.createBlock)("jetpack/map",{address:e.raw.address})]),(0,n.createBlock)("jetpack/contact-info",{},t)}}]}},[{name:o.U,settings:o.W},{name:l.U,settings:l.W},{name:c.U,settings:c.W}])},43167:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(27723),o=r(64882),a=r(27266);const __=s.__,i=e=>{const t=(0,n.useBlockProps)(),{setAttributes:r}=e;return(0,o.A)("email",e,__("Email","jetpack"),a.A,(e=>r({email:e})),t)}},90951:(e,t,r)=>{"use strict";r.d(t,{U:()=>c,W:()=>u});var n=r(56427),s=r(27723),o=r(62289),a=r(43167),i=r(27266),l=r(10790);const __=s.__,_x=s._x,c="email",u={apiVersion:3,title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,o.A)((0,l.jsx)(n.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:a.A,save:i.A,parent:["jetpack/contact-info"]}},27266:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(86087),o=r(39904),a=r(10790);const i=({attributes:{email:e}})=>{if(!e)return null;const t=n.useBlockProps.save();return(0,a.jsx)("div",{...t,children:(r=e,r.split(/(\s+)/).map(((e,t)=>{const r=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&(0,o.t)(r)?e===r?(0,a.jsx)("a",{href:`mailto:${e}`,children:e},t):(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("a",{href:`mailto:${e}`,children:r},t),(0,a.jsx)(s.Fragment,{children:e.slice(-(e.length-r.length))})]},t):(0,a.jsx)(s.Fragment,{children:e},t)})))});var r}},42711:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(27723),o=r(64882),a=r(84330);const __=s.__,i=e=>{const t=(0,n.useBlockProps)(),{setAttributes:r}=e;return(0,o.A)("phone",e,__("Phone number","jetpack"),a.A,(e=>r({phone:e})),t)}},70063:(e,t,r)=>{"use strict";r.d(t,{U:()=>c,W:()=>u});var n=r(56427),s=r(27723),o=r(62289),a=r(42711),i=r(84330),l=r(10790);const __=s.__,_x=s._x,c="phone",u={apiVersion:3,title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,o.A)((0,l.jsx)(n.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:a.A,save:i.A}},84330:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(94715),s=r(10790);function o(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const r=e.indexOf(t[0]);let n=r?e.substring(r-1):e,o=r?e.substring(0,r):"",a=n.replace(/\D/g,"");/[0-9/+/(]/.test(n[0])?(o=o.slice(0,-1),"+"===n[0]&&(a="+"+a)):n=n.substring(1);return[o.trim()?(0,s.jsx)("span",{className:"phone-prefix",children:o},"phonePrefix"):null,(0,s.jsx)("a",{href:`tel:${a}`,children:n},"phoneNumber")]}const a=({attributes:{phone:e}})=>{if(!e)return null;const t=n.useBlockProps.save();return(0,s.jsx)("div",{...t,children:o(e)})}},36611:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(94715),s=r(10790);const o=()=>{const e=n.useBlockProps.save();return(0,s.jsx)("div",{...e,children:(0,s.jsx)(n.InnerBlocks.Content,{})})}},68071:(e,t,r)=>{"use strict";r.d(t,{a:()=>s});var n=r(27723);const __=n.__,s=(0,n.sprintf)( // translators: %s is a link to the cookie policy. __("Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: %s.","jetpack"),`${__("Cookie Policy","jetpack")}`)},15216:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(94715),s=r(56427),o=r(27723),a=r(68071),i=r(34839),l=r(10790);const __=o.__;const c=function({clientId:e,attributes:t,setAttributes:r}){const{consentExpiryDays:c,align:u,text:d=a.a}=t;(0,i.w)(e);const p=(0,n.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${u}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.InspectorControls,{children:(0,l.jsxs)(s.PanelBody,{title:__("Block Settings","jetpack"),children:[(0,l.jsx)(s.SelectControl,{label:__("Alignment","jetpack"),value:u,options:[{label:(0,o.isRTL)()?__("Right","jetpack"):__("Left","jetpack"),value:"left"},{label:__("Full","jetpack"),value:"full"},{label:__("Wide","jetpack"),value:"wide"},{label:(0,o.isRTL)()?__("Left","jetpack"):__("Right","jetpack"),value:"right"}],onChange:e=>function(e){const t=["wide","full"].includes(e)?{width:void 0,height:void 0}:{};r({...t,align:e})}(e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(s.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:c,type:"number",min:"1",max:"365",onChange:e=>r({consentExpiryDays:parseInt(e)}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)("p",{children:__("Note: The block position in the editor is not indicative of the position on the front end. The block will always be positioned at the bottom of the page.","jetpack")})]})}),(0,l.jsxs)("div",{...p,style:p.style,children:[(0,l.jsx)(n.RichText,{tagName:"p",value:d,onChange:e=>r({text:e})}),(0,l.jsx)(n.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})]})]})}},78165:(e,t,r)=>{"use strict";var n=r(94375),s=r(74095),o=r(15216),a=r(75757);(0,n.M)(s,{edit:o.A,save:a.A})},75757:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(94715),s=r(68071),o=r(10790);function a({attributes:e}){const t=n.useBlockProps.save(),{text:r=s.a,consentExpiryDays:a}=e;return(0,o.jsxs)("div",{...t,style:t.style,role:"dialog","aria-modal":"true",children:[(0,o.jsx)(n.RichText.Content,{tagName:"p",value:r}),(0,o.jsx)(n.InnerBlocks.Content,{}),(0,o.jsx)("span",{children:a})]})}},34839:(e,t,r)=>{"use strict";r.d(t,{w:()=>l});var n=r(74997),s=r(29491),o=r(3582),a=r(47143),i=r(86087);function l(e){const t=(0,a.useSelect)((e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:r}=e("core/editor");return t()||r()}),[]),r=!(!(0,s.usePrevious)(t)||t),[,l]=(0,o.useEntityProp)("root","site","cookie_consent_template"),{saveEditedEntityRecord:c}=(0,a.useDispatch)(o.store),[u,d]=(0,i.useState)(!1),p=(0,a.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t})),h=(0,i.useCallback)((e=>{d(!0),l(e),c("root","site",void 0,{cookie_consent_template:e}).finally((()=>{d(!1)}))}),[d,l,c]);(0,i.useEffect)((()=>()=>{p(e)||h(null)}),[]),(0,i.useEffect)((()=>{r&&!u&&h((0,n.serialize)([p(e)]))}),[r,u,h,p,e])}},75800:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(4567),s=r(3975),o=r(94715),a=r(86087),i=r(13022),l=r(72730),c=r(10790);const u=({className:e=null,currency:t=null,defaultValue:r=null,disabled:u=!1,label:d="",onChange:p=null,value:h=""})=>{const[m,g]=(0,a.useState)((0,n.Ay)(h,t,{symbol:""})),[f,b]=(0,a.useState)(!1),[v,k]=(0,a.useState)(!1),y=(0,a.useRef)(null),x=(0,a.useCallback)(((e,r)=>{g((n=>{if(e!==n){const n=(0,l.C_)(e,t);n&&n>=(0,l.dv)(t)?(k(!1),r&&p?.(n)):k(!0)}return e}))}),[t,p]),j=()=>{y.current&&(y.current.focus(),b(!0))};return(0,a.useEffect)((()=>{if(!y.current)return;const e=y.current,s=()=>{b(!1),m||x((0,n.Ay)(r,t,{symbol:""}))};return e.addEventListener("blur",s),()=>{e.removeEventListener("blur",s)}}),[t,r,m,y,x]),(0,a.useEffect)((()=>{f||v||g((0,n.Ay)(h,t,{symbol:""}))}),[t,f,v,h]),(0,a.useEffect)((()=>{x((0,n.Ay)(h,t,{symbol:""}))}),[t,h]),(0,c.jsxs)("div",{className:(0,i.A)("donations__amount",e,{"has-focus":f,"has-error":v}),role:"button",tabIndex:0,onClick:j,onKeyDown:j,children:[s.y[t].symbol,u?(0,c.jsx)("div",{className:"donations__amount-value",children:(0,n.Ay)(h||r,t,{symbol:""})}):(0,c.jsx)(o.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>x(e,!0),placeholder:(0,n.Ay)(r,t,{symbol:""}),ref:y,value:m,withoutInteractiveFormatting:!0})]})}},57018:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(3975),s=r(85985),o=r(94715),a=r(56427),i=r(27723),l=r(48558),c=r(72730),u=r(10790);const __=i.__,d=e=>{const{attributes:t,setAttributes:r}=e,{currency:i,oneTimeDonation:d,monthlyDonation:p,annualDonation:h,showCustomAmount:m}=t,g=(e,n)=>{const s={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[s];r({[s]:{...o,show:n}})};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.BlockControls,{children:(0,u.jsx)(a.ToolbarGroup,{children:(0,u.jsx)(a.ToolbarItem,{children:()=>(0,u.jsx)(a.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:({onToggle:e,isOpen:t})=>(0,u.jsx)(a.ToolbarButton,{className:"jetpack-donations__currency-toggle",icon:(0,u.jsxs)(u.Fragment,{children:[i+" - "+n.y[i].symbol,(0,u.jsx)(a.Dashicon,{icon:"arrow-down"})]}),label:__("Change currency","jetpack"),onClick:e,onKeyDown:r=>{t||r.keyCode!==l.DOWN||(r.preventDefault(),r.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,u.jsx)(a.MenuGroup,{children:Object.keys(c.VK).map((t=>(0,u.jsx)(a.MenuItem,{isSelected:t===i,icon:t===i?"yes":"",onClick:()=>{(e=>{const t=(0,c.Xj)(e);r({currency:e,oneTimeDonation:{...d,amounts:t},monthlyDonation:{...p,amounts:t},annualDonation:{...h,amounts:t}})})(t),e()},children:t+" - "+n.y[t].symbol},`jetpack-donations-currency-${t}`)))})})})})}),(0,u.jsx)(o.InspectorControls,{children:(0,u.jsxs)(a.PanelBody,{title:__("Settings","jetpack"),children:[(0,u.jsx)(a.ToggleControl,{checked:p.show,onChange:e=>g("1 month",e),label:__("Show monthly donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,u.jsx)(a.ToggleControl,{checked:h.show,onChange:e=>g("1 year",e),label:__("Show annual donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,u.jsx)(a.ToggleControl,{checked:m,onChange:e=>r({showCustomAmount:e}),label:__("Show custom amount option","jetpack"),__nextHasNoMarginBottom:!0}),(0,u.jsx)(a.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,s.GE)()}`,children:__("View donation earnings","jetpack")})]})})]})}},27718:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(4567),s=r(3975),o=r(94715),a=r(27723),i=r(72730),l=r(10790);const __=a.__,c={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:({attributes:e})=>{const{currency:t,oneTimeDonation:r,monthlyDonation:a,annualDonation:c,showCustomAmount:u,chooseAmountText:d,customAmountText:p}=e;if(!r||!r.show||-1===r.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...a.show&&{"1 month":{title:__("Monthly","jetpack")}},...c.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,l.jsx)("div",{children:(0,l.jsxs)("div",{className:"donations__container",children:[Object.keys(h).length>1&&(0,l.jsx)("div",{className:"donations__nav",children:Object.entries(h).map((([e,{title:t}])=>(0,l.jsx)("div",{role:"button",tabIndex:0,className:"donations__nav-item","data-interval":e,children:t},`jetpack-donations-nav-item-${e} `)))}),(0,l.jsx)("div",{className:"donations__content",children:(0,l.jsxs)("div",{className:"donations__tab",children:[(0,l.jsx)(o.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:r.heading}),a.show&&(0,l.jsx)(o.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:a.heading}),c.show&&(0,l.jsx)(o.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:c.heading}),(0,l.jsx)(o.RichText.Content,{tagName:"p",value:d}),(0,l.jsx)("div",{className:"donations__amounts donations__one-time-item",children:r.amounts.map((e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,n.Ay)(e,t)},e)))}),a.show&&(0,l.jsx)("div",{className:"donations__amounts donations__monthly-item",children:a.amounts.map((e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,n.Ay)(e,t)},e)))}),c.show&&(0,l.jsx)("div",{className:"donations__amounts donations__annual-item",children:c.amounts.map((e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,n.Ay)(e,t)},e)))}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.RichText.Content,{tagName:"p",value:p}),(0,l.jsxs)("div",{className:"donations__amount donations__custom-amount",children:[s.y[t].symbol,(0,l.jsx)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,n.Ay)(100*(0,i.dv)(t),t,{symbol:""})})]})]}),(0,l.jsx)("div",{className:"donations__separator",children:"——"}),(0,l.jsx)(o.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:r.extraText}),a.show&&(0,l.jsx)(o.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:a.extraText}),c.show&&(0,l.jsx)(o.RichText.Content,{tagName:"p",className:"donations__annual-item",value:c.extraText}),(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item",children:(0,l.jsx)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:r.buttonText})}),a.show&&(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item",children:(0,l.jsx)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:a.buttonText})}),c.show&&(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item",children:(0,l.jsx)(o.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:c.buttonText})})]})})]})})}}},31152:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var n=r(56461),s=r(94715),o=r(47143),a=r(86087),i=r(27723),l=r(2274),c=r(53796),u=r(72730),d=r(27574),p=r(26247),h=r(16521),m=r(3696),g=r(70975),f=r(93033),b=r(56848),v=r(79085),k=r(36580),y=r(10790);const __=i.__,x=e=>{const{attributes:t,setAttributes:r}=e,{currency:i}=t,x=(0,s.useBlockProps)(),[j,w]=(0,a.useState)(""),[_,C]=(0,a.useState)([]),[A,S]=(0,a.useState)(!1),E=(0,p.A)(),{lockPostSaving:N,unlockPostSaving:T}=(0,o.useDispatch)("core/editor"),{getEntityRecord:B,getCurrentUser:P}=(0,o.useSelect)("core"),{editEntityRecord:I,saveEditedEntityRecord:M}=(0,o.useDispatch)("core"),L=(0,o.useSelect)((e=>e("core/editor").getCurrentPost()),[]),R=(0,o.useSelect)((e=>e("core/editor").isPostSavingLocked()),[]),D=(0,o.useSelect)((e=>e(h.M).getConnectUrl()||""),[]),{setConnectUrl:F,setConnectedAccountDefaultCurrency:O}=(0,o.useDispatch)(m.EF),z=(0,o.useSelect)((e=>e(m.EF).getConnectedAccountDefaultCurrency()));(0,a.useEffect)((()=>{if(!i&&z&&!R){const e=z.toUpperCase(),t=!!u.VK[e];r(t?{currency:e}:{currency:"USD"})}}),[i,z,R,r]);const U=e=>{w(e)},H=P();(0,a.useEffect)((()=>{H?.id&&B("root","user",H.id)}),[H?.id,B]);const V=H?.meta?.jetpack_donation_warning_dismissed||!1;let q;(0,a.useEffect)((()=>{H?.id&&!1===V&&S(!0)}),[H,V]),(0,a.useEffect)((()=>{N("donations");const e=e=>e.reduce(((e,{id:t,currency:r,type:n,interval:s})=>(r===i&&"donation"===n&&(e[s]=t),e)),{});(0,f.A)("donation").then((t=>{if(!t&&"object"!=typeof t||t.errors)return T("donations"),void w(__("Could not load data from WordPress.com.","jetpack"));F((0,d.A)(L.id,t.connect_url)),O(t?.connected_account_default_currency?.toUpperCase());const r=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(r)?(C(r),void T("donations")):t.connect_url?(C({"one-time":-1,"1 month":-1,"1 year":-1}),void T("donations")):(i&&(0,g.A)(i).then((t=>{C(e(t)),T("donations")}),U),void T("donations"))}),U)}),[N,i,L.id,F,O,T]),q=E?j?(0,y.jsx)(v.A,{error:j}):D?(0,y.jsx)(c.V,{blockName:"donations"}):i?(0,y.jsx)(k.A,{...e,products:_}):(0,y.jsx)(n.A,{color:"black"}):(0,y.jsx)(l.A,{block:"Donations Form",explanation:__("Connect your WordPress.com account to enable donations.","jetpack")});return(0,y.jsxs)("div",{...x,children:[q,A&&(0,y.jsx)(b.A,{onClose:async()=>{if(S(!1),H?.id)try{await I("root","user",H.id,{meta:{jetpack_donation_warning_dismissed:!0}}),await M("root","user",H.id)}catch(e){console.error("Failed to update user meta:",e)}else console.error("Cannot update user meta: User not loaded")}})]})}},46197:(e,t,r)=>{"use strict";var n=r(94375),s=r(87325),o=r(27718),a=r(31152),i=r(47693);(0,n.M)(s,{edit:a.A,save:i.A,deprecated:[o.A]})},70975:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(1455),s=r.n(n);const o=async e=>{try{return await s()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},93033:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(1455),s=r.n(n),o=r(93832);const a=async(e=null)=>{const t=new URLSearchParams(window.location.search),r=(0,o.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await s()({path:r,method:"GET"})}catch(e){return Promise.reject(e.message)}}},56848:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(3924),s=r(97999),o=r(56427),a=r(86087),i=r(27723),l=r(10790);const __=i.__,c=({onClose:e})=>{const t=(0,s.isWpcomPlatformSite)()?"wpcom-support-donation-block":"jetpack-support-donation-block";return(0,l.jsx)(o.Modal,{className:"jetpack-donations-first-time-modal",onRequestClose:e,title:__("Accept Donations with Stripe","jetpack"),children:(0,l.jsxs)("div",{className:"jetpack-donations-first-time-modal__content",children:[(0,l.jsx)("p",{children:(0,a.createInterpolateElement)(__("To accept donations on your site, you'll need to connect your Stripe account. Here's what you need to do: Learn more about donations.","jetpack"),{docLink:(0,l.jsx)(o.ExternalLink,{href:(0,n.A)(t)})})}),(0,l.jsxs)("ol",{children:[(0,l.jsx)("li",{children:__("Connect your Stripe account to your WordPress.com account","jetpack")}),(0,l.jsx)("li",{children:__("Set up your business information in Stripe","jetpack")}),(0,l.jsx)("li",{children:__("Configure your payment settings and supported currencies","jetpack")})]}),(0,l.jsx)("p",{children:__("Once connected, you can customize your donation form and start accepting payments.","jetpack")}),(0,l.jsx)("p",{children:(0,a.createInterpolateElement)(__("Please note that accepting donations has additional requirements from Stripe. Learn more about requirements for accepting donations.","jetpack"),{requirementsLink:(0,l.jsx)(o.ExternalLink,{href:(0,n.A)("jetpack-support-donation-block-stripe-reqs")})})}),(0,l.jsx)("div",{className:"jetpack-donations-first-time-modal__actions",children:(0,l.jsx)(o.Button,{variant:"primary",onClick:e,children:__("Got it","jetpack")})})]})})}},79085:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(56427),s=r(27723),o=r(10790);const __=s.__,a=({error:e})=>(0,o.jsx)(n.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:e})},47693:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(94715),s=r(75703),o=r(10790);const a=(0,s.O)(),i=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:r,monthlyDonation:s,annualDonation:i}=e;if(!r||!r.show||!r.planId||-1===r.planId)return null;const l=n.useBlockProps.save();return(0,o.jsxs)("div",{...l,children:[(0,o.jsx)(n.RichText.Content,{tagName:"h4",value:a.oneTimeDonation?.heading}),(0,o.jsx)(n.RichText.Content,{tagName:"p",value:r.extraText??a.extraText}),(0,o.jsx)(n.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.oneTimeDonation?.buttonText}),s.show&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("hr",{className:"donations__separator"}),(0,o.jsx)(n.RichText.Content,{tagName:"h4",value:a.monthlyDonation?.heading}),(0,o.jsx)(n.RichText.Content,{tagName:"p",value:s.extraText??a.extraText}),(0,o.jsx)(n.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.monthlyDonation?.buttonText})]}),i.show&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("hr",{className:"donations__separator"}),(0,o.jsx)(n.RichText.Content,{tagName:"h4",value:a.annualDonation?.heading}),(0,o.jsx)(n.RichText.Content,{tagName:"p",value:i.extraText??a.extraText}),(0,o.jsx)(n.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.annualDonation?.buttonText})]})]})}},62225:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(94715),s=r(47143),o=r(27723),a=r(72730),i=r(75800),l=r(75703),c=r(10790);const __=o.__,u=(0,l.O)(),d=({activeTab:e,attributes:t,setAttributes:r})=>{const{currency:l,oneTimeDonation:d,monthlyDonation:p,annualDonation:h,showCustomAmount:m,chooseAmountText:g=u.chooseAmountText,customAmountText:f=u.customAmountText}=t,b={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"}[e],v=e=>t[b][e],k=(e,n)=>{const s=t[b];r({[b]:{...s,[e]:n}})},y=(0,a.Xj)(l),x=v("amounts"),j=(0,s.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,c.jsxs)("div",{className:"donations__tab",children:[(0,c.jsx)(n.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading")||u[b]?.heading,onChange:e=>k("heading",e)}),(0,c.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>r({chooseAmountText:e})}),(0,c.jsx)("div",{className:"donations__amounts",children:x.map(((e,t)=>(0,c.jsx)(i.A,{currency:l,defaultValue:y[t],label:(0,o.sprintf)( // translators: %d: Tier level e.g: "1", "2", "3" __("Tier %d","jetpack"),t+1),onChange:e=>((e,t)=>{const r=[...x];r[t]=e,k("amounts",r)})(e,t),value:e},`jetpack-donations-amount-${t}`)))}),m&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>r({customAmountText:e})}),(0,c.jsx)(i.A,{currency:l,label:__("Custom amount","jetpack"),defaultValue:100*(0,a.dv)(l),className:"donations__custom-amount",disabled:!0})]}),(0,c.jsx)("hr",{className:"donations__separator"}),(0,c.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:v("extraText")??u.extraText,onChange:e=>k("extraText",e)}),(0,c.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper",children:(0,c.jsx)(n.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:v("buttonText")||u[b]?.buttonText,onChange:e=>{return t=e,void r({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...h,buttonText:t}});var t},allowedFormats:j})})]})}},36580:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(86087),s=r(27723),o=r(13022),a=r(57018),i=r(62225),l=r(10790);const __=s.__,c=e=>{const{attributes:t,products:r,setAttributes:s}=e,{oneTimeDonation:c,monthlyDonation:u,annualDonation:d}=t,[p,h]=(0,n.useState)("one-time"),m=(0,n.useCallback)((e=>p===e),[p]),g={"one-time":{title:__("One-Time","jetpack")},...u.show&&{"1 month":{title:__("Monthly","jetpack")}},...d.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,n.useEffect)((()=>{c.planId===r["one-time"]&&u.planId===r["1 month"]&&d.planId===r["1 year"]||s({...r["one-time"]&&{oneTimeDonation:{...c,planId:r["one-time"]}},...r["1 month"]&&{monthlyDonation:{...u,planId:r["1 month"]}},...r["1 year"]&&{annualDonation:{...d,planId:r["1 year"]}}})}),[c,u,d,s,r]),(0,n.useEffect)((()=>{!u.show&&m("1 month")&&h("one-time"),!d.show&&m("1 year")&&h("one-time")}),[u,d,h,m]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"donations__container",children:[Object.keys(g).length>1&&(0,l.jsx)("div",{className:"donations__nav",children:Object.entries(g).map((([e,{title:t}])=>(0,l.jsx)("div",{role:"button",tabIndex:0,className:(0,o.A)("donations__nav-item",{"is-active":m(e)}),onClick:()=>h(e),onKeyDown:()=>h(e),children:t},`jetpack-donations-nav-item-${e} `)))}),(0,l.jsx)("div",{className:"donations__content",children:(0,l.jsx)(i.A,{activeTab:p,attributes:t,setAttributes:s})})]}),(0,l.jsx)(a.A,{...e})]})}},75703:(e,t,r)=>{"use strict";function n(){if("undefined"==typeof window)return{};const e=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeof e?{}:e}r.d(t,{O:()=>n})},36850:(e,t,r)=>{"use strict";r.d(t,{GY:()=>s,_t:()=>n,gQ:()=>o});const n=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,s=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,o="https://www.eventbrite.com/e/test-event-tickets-123456789"},38449:(e,t,r)=>{"use strict";r.d(t,{o:()=>c,s:()=>u});var n=r(56427),s=r(27723),o=r(5873),a=r(72660),i=r(10790);const __=s.__,_x=s._x,l=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,i.jsx)("div",{className:"block-editor-block-preview__container",children:(0,i.jsx)("img",{src:a,alt:__("In page Eventbrite checkout example","jetpack")})})},{value:"modal",label:__("Button & Modal","jetpack")}],c=({setEditingUrl:e})=>(0,i.jsx)(n.ToolbarGroup,{children:(0,i.jsx)(n.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})}),u=({attributes:e,clientId:t,setAttributes:r})=>(0,i.jsx)(o.A,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:t,styleOptions:l,onSelectStyle:r,activeStyle:e.style,attributes:e,viewportWidth:130})},77629:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const n=[r(87879).A]},87879:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(94715),s=r(74997),o=r(27723),a=r(13022),i=r(66087),l=r(10790);const _x=o._x,c=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const u={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:r}=e;let n=r;n||(n=e.useModal?"modal":"inline");const o={...Object.fromEntries(Object.entries(e).filter((([e])=>"useModal"!==e&&!c.includes(e)))),className:t&&t.replace("is-style-outline",""),style:n},a=(0,i.pick)(e,c);return[o,[(0,s.createBlock)("jetpack/button",{element:"a",text:a.text||_x("Register","verb: e.g. register for an event.","jetpack"),...a,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function({attributes:e}){const{eventId:t,useModal:r,url:s,style:o}=e;if(t)return r||"modal"===o?function(e){const{backgroundColor:t,borderRadius:r,customBackgroundColor:s,customTextColor:o,eventId:i,text:c,textColor:u,url:d}=e,p=(0,n.getColorClassName)("color",u),h=(0,n.getColorClassName)("background-color",t),m=(0,a.A)("wp-block-button__link",{"has-text-color":u||o,[p]:p,"has-background":t||s,[h]:h,"no-border-radius":0===r}),g={backgroundColor:h?void 0:s,color:p?void 0:o,borderRadius:r?r+"px":void 0};return(0,l.jsx)("div",{className:"wp-block-button",children:(0,l.jsx)(n.RichText.Content,{className:m,href:d,id:`eventbrite-widget-${i}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:c})})}(e):s&&(0,l.jsx)("a",{className:"eventbrite__direct-link",href:s,children:s})},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,i.isEmpty)(t)||Object.entries(e).some((([e,t])=>t&&c.includes(e))))}},56311:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(94715),s=r(56427),o=r(86087),a=r(27723),i=r(78218),l=r(56145),c=r(82306),u=r(36850),d=r(38449),p=r(50013),h=r(68332),m=r(72055),g=r(12074),f=r(10790);const __=a.__,_x=a._x,b={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},v=(0,s.withNotices)((e=>{const{attributes:t,noticeOperations:r,onReplace:a,setAttributes:v}=e,{url:k,style:y}=t,x=(0,n.useBlockProps)(),[j,w]=(0,o.useState)(!1),[_,C]=(0,o.useState)(t.url||""),[A,S]=(0,o.useState)(!1),E=!A&&k&&!u._t.test(k),N=(0,o.useCallback)((()=>{r.removeAllNotices(),r.createErrorNotice((0,f.jsxs)(f.Fragment,{children:[__("Sorry, this content could not be embedded.","jetpack")," ",(0,f.jsx)(s.Button,{variant:"link",onClick:()=>(0,g.pG)(_,a),children:_x("Convert block to link","button label","jetpack")})]}))}),[r,a,_]),T=(0,o.useCallback)((e=>{if(!e||u.gQ===e||"modal"===y)return;const t=(0,g.HE)(e);if(t){const n={eventId:t,url:e};(0,l.A)(n.url,S).then((e=>{const t=(0,i.y)(c.attributes,{...n,url:e});v(t),C(e),r.removeAllNotices()})).catch((()=>{v({eventId:void 0,url:void 0}),N()}))}else N()}),[y,r,N,v,C,S]);let B;return(0,o.useEffect)((()=>{T(k)}),[k,T]),B=A?(0,f.jsx)(h.A,{}):j||!k||E?(0,f.jsx)(p.A,{...e,editedUrl:_,onChange:e=>C(e.target.value),onSubmit:e=>{e&&e.preventDefault(),T((0,g.pJ)(_)),w(!1)}}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.s,{...e}),(0,f.jsx)(n.BlockControls,{children:(0,f.jsx)(d.o,{setEditingUrl:w})}),"modal"===y?(0,f.jsx)(n.InnerBlocks,{template:[[b.name,b.attributes]],templateLock:"all"}):(0,f.jsx)(m.A,{...e})]}),(0,f.jsx)("div",{...x,children:B})}))},34590:(e,t,r)=>{"use strict";var n=r(74997),s=r(94375),o=r(82306),a=r(36850),i=r(77629),l=r(56311),c=r(52074);(0,s.M)(o,{edit:l.A,save:c.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(a._t.test(e.textContent)||a.GY.test(e.textContent)),transform:e=>(0,n.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:i.A})},50013:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(97999),s=r(85985),o=r(56427),a=r(27723),i=r(82306),l=(r(12074),r(10790));const __=a.__,_x=a._x,c=(0,s.sh)(i),u=({className:e,noticeUI:t,editedUrl:r,onChange:s,onSubmit:a})=>{const i=(0,n.isWpcomPlatformSite)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,l.jsx)("div",{className:e,children:(0,l.jsxs)(o.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:c,notices:t,children:[(0,l.jsxs)("form",{onSubmit:a,children:[(0,l.jsx)("input",{type:"url",value:r,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:s}),(0,l.jsx)(o.Button,{variant:"secondary",type:"submit",children:_x("Embed","submit button label","jetpack")})]}),(0,l.jsx)("div",{className:"components-placeholder__learn-more",children:(0,l.jsx)(o.ExternalLink,{href:i,children:__("Learn more about Eventbrite embeds","jetpack")})})]})})}},68332:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(56427),s=r(27723),o=r(10790);const __=s.__,a=()=>(0,o.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,o.jsx)(n.Spinner,{}),(0,o.jsx)("p",{children:__("Embedding…","jetpack")})]})},72055:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(56427),s=r(10790);const o=({className:e,attributes:t})=>{const{eventId:r}=t;if(!r)return;const o=`eventbrite-widget-${r}`,a=`\n\t\t\t