/*! For license information please see editor-beta.js.LICENSE.txt */ (()=>{var e={7675(e,t,s){"use strict";s.d(t,{y:()=>i});var r=s(76416),n=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n{const f=Object.assign({},i);let b;function v(){b.abort(),document.hidden||_()}f.accept||(f.accept=o),h||document.addEventListener("visibilitychange",v);let k=1e3,y=0;function x(){document.removeEventListener("visibilitychange",v),window.clearTimeout(y),b.abort()}null==s||s.addEventListener("abort",()=>{x(),t()});const j=null!=m?m:window.fetch,w=null!=c?c:l;async function _(){var s;b=new AbortController;try{const s=await j(e,Object.assign(Object.assign({},g),{headers:f,signal:b.signal}));await w(s),await(0,r.q5)(s.body,(0,r.iv)((0,r.VL)(e=>{e?f[a]=e:delete f[a]},e=>{k=e},u))),null==d||d(),x(),t()}catch(e){if(!b.signal.aborted)try{const t=null!==(s=null==p?void 0:p(e))&&void 0!==s?s:k;window.clearTimeout(y),y=window.setTimeout(_,t)}catch(e){x(),n(e)}}}_()})}function l(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,s){"use strict";async function r(e,t){const s=e.getReader();let r;for(;!(r=await s.read()).done;)t(r.value)}function n(e){let t,s,r,n=!1;return function(o){void 0===t?(t=o,s=0,r=-1):t=function(e,t){const s=new Uint8Array(e.length+t.length);return s.set(e),s.set(t,e.length),s}(t,o);const a=t.length;let i=0;for(;s0){const s=n.decode(o.subarray(0,i)),a=i+(32===o[i+1]?2:1),l=n.decode(o.subarray(a));switch(s){case"data":r.data=r.data?r.data+"\n"+l:l;break;case"event":r.event=l;break;case"id":e(r.id=l);break;case"retry":const s=parseInt(l,10);isNaN(s)||t(r.retry=s)}}}}function a(){return{data:"",event:"",id:"",retry:void 0}}s.d(t,{VL:()=>o,iv:()=>n,q5:()=>r})},87399(e){!function(){"use strict";var t=[],s=3988292384;function r(e){var t,r,n,o,a=-1;for(t=0,n=e.length;t>>=1:o=o>>>1^s;a=a>>>8^o}return-1^a}function n(e,s){var r,o,a;if(void 0!==n.crc&&s&&e||(n.crc=~0,e)){for(r=n.crc,o=0,a=e.length;o>>8^t[255&(r^e[o])];return n.crc=r,-1^r}}!function(){var e,r,n;for(r=0;r<256;r+=1){for(e=r,n=0;n<8;n+=1)1&e?e=s^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var s;e="string"==typeof e?(s=e,Array.prototype.map.call(s,function(e){return e.charCodeAt(0)})):e;return((t?r(e):n(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=n}()},51601(e,t,s){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&"undefined"!=typeof window&&window.crypto&&(r=window.crypto),!r)try{r=s(42305)}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.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 s;return e.prototype=t,s=new e,e.prototype=null,s}}(),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,s){e=this.words=e||[],this.sigBytes=s!=t?s:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,s=e.words,r=this.sigBytes,n=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var i=0;i>>2]=s[i>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],s=0;s>>2]>>>24-n%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,s=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(s,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,s=e.sigBytes,r=[],n=0;n>>2]>>>24-n%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,s=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(s,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 s,r=this._data,n=r.words,o=r.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&(n<<24|n>>>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,s=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;s[n>>>5]|=128<<24-n%32;var o=e.floor(r/4294967296),a=r;s[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s[14+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(s.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,s,r,n,o,a){var i=e+(t&s|~t&r)+n+a;return(i<>>32-o)+t}function u(e,t,s,r,n,o,a){var i=e+(t&r|s&~r)+n+a;return(i<>>32-o)+t}function d(e,t,s,r,n,o,a){var i=e+(t^s^r)+n+a;return(i<>>32-o)+t}function p(e,t,s,r,n,o,a){var i=e+(s^(t|~r))+n+a;return(i<>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},86954(e){function t(e,t=100,s={}){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:r}="boolean"==typeof s?{immediate:s}:s;let n,o,a,i,l;function c(){const t=n,s=o;return n=void 0,o=void 0,l=e.apply(t,s),l}function u(){const e=Date.now()-i;e=0?a=setTimeout(u,t-e):(a=void 0,r||(l=c()))}const d=function(...e){if(n&&this!==n&&Object.getPrototypeOf(this)===Object.getPrototypeOf(n))throw new Error("Debounced method called with different contexts of the same prototype.");n=this,o=e,i=Date.now();const s=r&&!a;return a||(a=setTimeout(u,t)),s&&(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===s}(e)}(e)};var s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((s=e,Array.isArray(s)?[]:{}),e,t):e;var s}function n(e,t,s){return e.concat(t).map(function(e){return r(e,s)})}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,s){var n={};return s.isMergeableObject(e)&&o(e).forEach(function(t){n[t]=r(e[t],s)}),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)&&s.isMergeableObject(t[o])?n[o]=function(e,t){if(!t.customMerge)return l;var s=t.customMerge(e);return"function"==typeof s?s:l}(o,s)(e[o],t[o],s):n[o]=r(t[o],s))}),n}function l(e,s,o){(o=o||{}).arrayMerge=o.arrayMerge||n,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var a=Array.isArray(s);return a===Array.isArray(e)?a?o.arrayMerge(e,s,o):i(e,s,o):r(s,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,s){return l(e,s,t)},{})};var c=l;e.exports=c},39904(e,t){"use strict";var s=/^[-!#$%&'*+\/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(!s.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,s="object"==typeof Reflect?Reflect:null,r=s&&"function"==typeof s.apply?s.apply:function(e,t,s){return Function.prototype.apply.call(e,t,s)};t=s&&"function"==typeof s.ownKeys?s.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=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(s,r){function n(s){e.removeListener(t,o),r(s)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",n),s([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t,s){"function"==typeof e.on&&g(e,"error",t,s)}(e,n,{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,s,r){var n,o,a,c;if(i(s),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,s.listener?s.listener:s),o=e._events),a=o[t]),void 0===a)a=o[t]=s,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[s,a]:[a,s]:r?a.unshift(s):a.push(s),(n=l(e))>0&&a.length>n&&!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,s){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:s},n=u.bind(r);return n.listener=s,r.wrapFn=n,n}function p(e,t,s){var r=e._events;if(void 0===r)return[];var n=r[t];return void 0===n?[]:"function"==typeof n?s?[n.listener||n]:[n]:s?function(e){for(var t=new Array(e.length),s=0;s0&&(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)r(l,this,t);else{var c=l.length,u=m(l,c);for(s=0;s=0;o--)if(s[o]===t||s[o].listener===t){a=s[o].listener,n=o;break}if(n<0)return this;0===n?s.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);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,s,r){var n=Number(e[t].meta.id+1).toString(),o="";return"string"==typeof r.docId&&(o="-"+r.docId+"-"),o+n}function s(e,t){var s=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),"["+s+"]"}function r(e,t,s,r,n){var o=n.rules.footnote_anchor_name(e,t,s,r,n),a=n.rules.footnote_caption(e,t,s,r,n),i=o;return e[t].meta.subId>0&&(i+=":"+e[t].meta.subId),''+a+""}function n(e,t,s){return(s.xhtmlOut?'
\n':'
\n')+'
\n
    \n'}function o(){return"
\n
\n"}function a(e,t,s,r,n){var o=n.rules.footnote_anchor_name(e,t,s,r,n);return e[t].meta.subId>0&&(o+=":"+e[t].meta.subId),'
  • '}function i(){return"
  • \n"}function l(e,t,s,r,n){var o=n.rules.footnote_anchor_name(e,t,s,r,n);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=r,e.renderer.rules.footnote_block_open=n,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=s,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",function(e,t,s,r){var n,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(r)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),n=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)&&(s=i+2,!((r=c(e,i+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),n=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(s,r),e.md,e.env,o=[]),e.push("footnote_ref","",0).meta={id:n},e.env.footnotes.list[n]={content:e.src.slice(s,r),tokens:o}),e.pos=r+1,e.posMax=a,!0))))}),e.inline.ruler.after("footnote_inline","footnote_ref",function(e,t){var s,r,n,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(r=i+2;r=a)&&(r++,s=e.src.slice(i+2,r-1),void 0!==e.env.footnotes.refs[":"+s]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+s]<0?(n=e.env.footnotes.list.length,e.env.footnotes.list[n]={label:s,count:0},e.env.footnotes.refs[":"+s]=n):n=e.env.footnotes.refs[":"+s],o=e.env.footnotes.list[n].count,e.env.footnotes.list[n].count++,e.push("footnote_ref","",0).meta={id:n,subId:o,label:s}),e.pos=r,e.posMax=a,!0)))}),e.core.ruler.after("inline","footnote_tail",function(e){var t,s,r,n,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,s=a.length;t0?a[t].count:1,r=0;rr});const r={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,s){"use strict";s.d(t,{A:()=>r});const r={"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",x:"PW9A5OHnDYBX0yNn9RHO"}},39029(e,t,s){"use strict";s.d(t,{A:()=>r});const r={sm:"(max-width: 599px)",md:"(min-width: 600px) and (max-width: 959px)",lg:"(min-width: 960px)"}},13372(e,t,s){"use strict";s.d(t,{A:()=>r});const r={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},74116(e,t,s){"use strict";s.d(t,{A:()=>r});const r={global:"_fUXxnSp5pagKBp9gSN7"}},68071(){},15016(){},1103(){},28745(){},4521(){},61802(){},11672(){},57589(){},2128(){},38914(){},84998(){},78924(){},96929(){},92442(){},27998(){},57908(){},16341(){},24716(){},16585(){},44110(){},74587(){},47189(){},3269(){},6692(){},95178(){},13951(){},12069(){},68579(){},69084(e,t,s){"use strict";s.d(t,{A:()=>r});const r={"link-preview-modal":"uuzr0ceItcil_58_n92b","link-preview-tabs":"qFkKYGmOWLHX2m3wwVe7","link-preview-tab":"f6uLY4Sqr5h5ZlN9439o"}},34927(){},26233(){},50920(){},45608(){},47894(){},16282(){},14808(){},18155(){},40320(){},8277(){},11141(){},24625(){},16348(){},88627(){},34566(){},32991(){},93386(){},87495(){},1947(){},55179(){},8221(){},98989(){},47698(){},83572(){},41660(){},46236(){},3749(){},81699(){},55883(){},64799(){},85637(){},29317(){},4064(){},59400(){},61824(){},52054(){},79719(){},89592(){},23115(){},71035(){},23320(){},72847(){},27544(){},27400(){},82933(){},96117(){},56463(){},60335(){},3255(){},82741(){},55841(){},76602(){},71293(){},62585(){},83522(){},6085(){},22065(){},87264(){},96854(){},98920(){},12315(){},31501(){},70855(){},28868(){},73309(){},97225(){},5271(){},48289(){},95341(){},42646(){},72556(){},25440(){},65255(){},3983(){},8688(){},92647(){},21324(){},33362(){},40282(){},88460(){},47769(){},36556(){},76593(){},99650(e,t,s){"use strict";s.d(t,{A:()=>r});const r={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},73823(){},83091(){},56251(){},19316(){},15538(){},17280(){},66161(){},56389(){},86887(){},93768(){},65620(){},88942(){},58664(){},36631(){},50888(){},40678(){},43451(){},96440(){},18387(){},70699(){},61627(){},49472(){},98980(){},19595(){},95759(){},42106(){},4825(){},72808(){},44947(){},90483(){},80214(){},82588(){},701(){},2195(){},44895(){},28691(){},20499(){},44997(e){var t=1e3,s=60*t,r=60*s,n=24*r,o=7*n,a=365.25*n;function i(e,t,s,r){var n=t>=1.5*s;return Math.round(e/s)+" "+r+(n?"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*n;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*s;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>=n)return i(e,o,n,"day");if(o>=r)return i(e,o,r,"hour");if(o>=s)return i(e,o,s,"minute");if(o>=t)return i(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=n)return Math.round(e/n)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=s)return Math.round(e/s)+"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,s){"use strict";var r=s(10961);e.exports=function(e,t){var s=this;return r(s.data,e,s.data[t]||n,s),s};var n=[]},35479(e,t,s){"use strict";var r=s(75466);e.exports=function(e){return Boolean(r(this,e))}},49897(e,t,s){"use strict";var r=s(74424);e.exports=function(e){var t,s,n,o,a=this,i=-1;r(e,a,a.data);for(;++i-1;)M.push(e.replace(s[0],s[1])),c=e.indexOf(s[0],c+1);a=-1;for(;++aI[t]?-1:1}(e,t)||function(e,t){var s=r(e),n=r(t);return s===n?0:s===N?-1:n===N?1:void 0}(e,t)||function(e,t){return e.localeCompare(t)}(e,t)}),o=[],S=[],a=-1;for(;++a-1;)T(A.slice(E,N)),E=N+1,N=A.indexOf("\n",E);T(A.slice(E)),N=-1;for(;++N-1;)9!==r.charCodeAt(n)&&a(r.slice(n,o),t,s),n=o+1,o=r.indexOf("\n",n);a(r.slice(n),t,s)};var o=/\s/g;function a(e,t,s){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())&&n(s,a,r(t.flags,u.trim()),t)}},81277(e,t,s){"use strict";var r=s(91534);e.exports=function(e,t){var s=-1;if(e.data[t])return!r(e.flags,"ONLYINCOMPOUND",e.data[t]);if(t.length>=e.flags.COMPOUNDMIN)for(;++s-1}},75466(e,t,s){"use strict";var r=s(92545),n=s(81277),o=s(91534);function a(e,t,s){return o(e,"KEEPCASE",t)||s||o(e,"FORBIDDENWORD",t)}e.exports=function(e,t,s){var i,l=t.trim();if(!l)return null;if(l=r(l,e.conversion.in),n(e,l))return!s&&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],s))return null;if(n(e,i))return i}if((i=l.toLowerCase())!==l){if(a(e.flags,e.data[i],s))return null;if(n(e,i))return i}return null}},92545(e){"use strict";e.exports=function(e,t){var s=-1;for(;++sh});var r=s(87399),n=s.n(r),o=s(10067),a=s.n(o),i=s(11264),l=s.n(i);const c=a()("photon"),u={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},d="__domain__.invalid",p=`https://${d}`;function h(e,t){let s;try{s=new URL(e,p)}catch{return null}const r="https:"===s.protocol,o=new URL("https://i0.wp.com");if(a=s.host,/^i[0-2]\.wp\.com$/.test(a))o.pathname=s.pathname,o.hostname=r?"i0.wp.com":s.hostname;else{if(s.search)return null;let e=s.href.replace(`${s.protocol}/`,"");"blob:"===s.protocol&&(e=s.pathname.replace("://","//")),s.hostname===d&&(e=s.pathname),o.pathname=e,o.hostname=function(e,t){if(t)return"i0.wp.com";const s=n()(e),r=l()(s),o="i"+Math.floor(3*r());return c('determined server "%s" to use with "%s"',o,e),o+".wp.com"}(e,"https:"===o.protocol),r&&o.searchParams.set("ssl","1")}var a;if(t)for(const[e,s]of Object.entries(t))"host"!==e&&"hostname"!==e?"secure"!==e||s?o.searchParams.set(u[e]??e,s.toString()):o.protocol="http:":o.hostname=s;return c("generated Photon URL: %s",o.href),o.href}},15762(e,t,s){"use strict";var r=s(53761);function n(){}function o(){}o.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,o,a){if(a!==r){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 s={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:n};return s.PropTypes=s,s}},28120(e,t,s){e.exports=s(15762)()},53761(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},87072(e,t,s){"use strict";s.d(t,{Ay:()=>k});const r=2147483647,n=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 s=e.split("@");let r="";s.length>1&&(r=s[0]+"@",e=s[1]);const n=function(e,t){const s=[];let r=e.length;for(;r--;)s[r]=t(e[r]);return s}((e=e.replace(i,".")).split("."),t).join(".");return r+n}function h(e){const t=[];let s=0;const r=e.length;for(;s=55296&&n<=56319&&s=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:n},g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,s){let r=0;for(e=s?c(e/700):e>>1,e+=c(e/t);e>455;r+=n)e=c(e/35);return c(r+36*e/(e+38))},b=function(e){const t=[],s=e.length;let o=0,a=128,i=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let s=0;s=128&&d("not-basic"),t.push(e.charCodeAt(s));for(let u=l>0?l+1:0;u=s&&d("invalid-input");const l=m(e.charCodeAt(u++));l>=n&&d("invalid-input"),l>c((r-o)/t)&&d("overflow"),o+=l*t;const p=a<=i?1:a>=i+26?26:a-i;if(lc(r/h)&&d("overflow"),t*=h}const p=t.length+1;i=f(o-l,p,0==l),c(o/p)>r-a&&d("overflow"),a+=c(o/p),o%=p,t.splice(o++,0,a)}return String.fromCodePoint(...t)},v=function(e){const t=[],s=(e=h(e)).length;let o=128,a=0,i=72;for(const s of e)s<128&&t.push(u(s));const l=t.length;let p=l;for(l&&t.push("-");p=o&&tc((r-a)/h)&&d("overflow"),a+=(s-o)*h,o=s;for(const s of e)if(sr&&d("overflow"),s===o){let e=a;for(let s=n;;s+=n){const r=s<=i?1:s>=i+26?26:s-i;if(eString.fromCodePoint(...e)},decode:b,encode:v,toASCII:function(e){return p(e,function(e){return a.test(e)?"xn--"+v(e):e})},toUnicode:function(e){return p(e,function(e){return o.test(e)?b(e.slice(4).toLowerCase()):e})}}},24588(e,t){"use strict";var s=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function n(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,a=[];for(o in"string"!=typeof t&&(t="?"),e)if(s.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=n(o),r=n(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,s=/([^=?#&]+)=?([^&]*)/g,n={};t=s.exec(e);){var o=r(t[1]),a=r(t[2]);null===o||null===a||o in n||(n[o]=a)}return n}},32047(e){"use strict";function t(e,s){var r;if(Array.isArray(s))for(r=0;r_});var r=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var s=-1;return e.some(function(e,r){return e[0]===t&&(s=r,!0)}),s}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 s=e(this.__entries__,t),r=this.__entries__[s];return r&&r[1]},t.prototype.set=function(t,s){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=s:this.__entries__.push([t,s])},t.prototype.delete=function(t){var s=this.__entries__,r=e(s,t);~r&&s.splice(r,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 s=0,r=this.__entries__;s0},e.prototype.connect_=function(){n&&!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(){n&&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,s=void 0===t?"":t;i.some(function(e){return!!~s.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 s=0,r=Object.keys(t);s0},e}(),j="undefined"!=typeof WeakMap?new WeakMap:new r,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 s=c.getInstance(),r=new x(t,s,this);j.set(this,r)};["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,s=[],r=window,n=Math.pow(t,6),o=Math.pow(2,52),a=2*o,i=255,l=Math.random;function c(e){var s,r=e.length,n=this,o=0,a=n.i=n.j=0,l=n.S=[];for(r||(e=[r++]);o=a;)e/=2,s/=2,r>>>=1;return(e+r)/s}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),s)},48931(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1455),n=s.n(r);const o="default"in n()?n().default:n()},87286(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(47143),n=s(10067),o=s.n(n),a=s(53664);const i=o()("jetpack-ai-client:ask-question");async function l(e,{postId:t=null,fromCache:s=!1,feature:n,functions:o,model:l,languageCode:c}={}){const u=c||(0,r.select)("core").getEntityRecord("root","site")?.language||"en_US";return i("Asking question: %o. options: %o",e,{postId:t,fromCache:s,feature:n,functions:o,model:l,languageCode:u}),new a.A({question:e,options:{postId:t,feature:n,fromCache:s,functions:o,model:l,languageCode:u}})}},31439(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(47143),n=s(10067),o=s.n(n),a=s(51391);const i=o()("jetpack-ai-client:ask-question-sync");async function l(e,t={}){t.languageCode=t.languageCode||(0,r.select)("core").getEntityRecord("root","site")?.language||"en_US",i("Asking question with no streaming: %o. options: %o",e,t);let s=null;try{s=(await(0,a.A)()).token}catch(e){return i("Error getting token: %o",e),Promise.reject(e)}const n=Array.isArray(e)?{messages:e}:{question:e},{languageCode:o,...l}=t,c={...n,...l,language_code:o,stream:!1},u={Authorization:`Bearer ${s}`,"Content-Type":"application/json"};try{const e=await fetch("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",{method:"POST",headers:u,body:JSON.stringify(c)}).then(e=>e.json());return e?.data?.status&&e?.data?.status>200?(i("Error generating prompt: %o",e),Promise.reject(e)):e.choices?.[0]?.message?.content}catch(e){return i("Error asking question: %o",e),Promise.reject(e)}}},57745(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(10067),n=s.n(r),o=s(51391);const a=n()("jetpack-ai-client:audio-transcription");async function i(e,t,s){a("Transcribing audio: %o. Feature: %o",e,t);let r="";try{r=(await(0,o.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}const n=new FormData;n.append("audio_file",e);try{const e={Authorization:`Bearer ${r}`},o="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-transcription"+(t?`?feature=${t}`:"");return fetch(o,{method:"POST",body:n,headers:e,signal:s??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)}}},70629(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(13022),o=s(6754),a=(s(81443),s(10790));function i({className:e,disabled:t=!1,value:s="",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,n.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,n.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)(r.PlainText,{value:s,onChange:u,placeholder:i,className:"jetpack-components-ai-control__input",disabled:t,ref:g})}),h]}),m]})]})}},71417(e,t,s){"use strict";s.d(t,{A:()=>x});var r=s(56427),n=s(29491),o=s(86087),a=s(27723),i=s(13109),l=s(87756),c=s(88901),u=s(65995),d=s(48568),p=s(57839),h=s(10067),m=s.n(h),g=s(51609),f=s(63098),b=s(70629),v=(s(81443),s(10790));const __=a.__,k=m()("jetpack-ai-client:block-ai-control");function y({disabled:e=!1,value:t="",placeholder:s="",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,n.useKeyboardShortcut)("mod+enter",()=>{a&&A?.()},{target:F}),(0,n.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)(r.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:u.A})}):(0,v.jsxs)(v.Fragment,{children:[M&&(0,v.jsx)(r.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:u.A})}),E&&!M&&!t?.length&&S&&(0,v.jsx)(r.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:u.A})}),t?.length>0&&(0,v.jsx)(r.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:l.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)(r.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,v.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:U,tooltipPosition:"top",children:(0,v.jsx)(i.A,{icon:p.A})}),(0,v.jsx)(r.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)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:A,variant:"primary",label:h,children:m?h:(0,v.jsx)(i.A,{icon:c.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:s,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,s){"use strict";s.d(t,{A:()=>f});var r=s(56427),n=s(29491),o=s(86087),a=s(27723),i=s(13109),l=s(87756),c=s(65995),u=s(84701),d=s(51609),p=s(63098),h=s(70629),m=(s(81443),s(10790));const __=a.__;function g({className:e,disabled:t=!1,value:s="",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)(s||null),O=(0,o.useRef)(null),z=s?.length<=0&&"done"===f;(0,o.useImperativeHandle)(I,()=>O.current),(0,o.useEffect)(()=>{L&&O?.current?.focus()},[L]);const U=(0,o.useCallback)(()=>{F(s),R(!1),C?.(s)},[C,s]),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]),$=(0,o.useCallback)(()=>{E?.()},[E]),G=(0,o.useCallback)(e=>{N?.(e)},[N]),W=(0,o.useCallback)(()=>{T?.()},[T]);(0,n.useKeyboardShortcut)("enter",e=>{e.preventDefault(),U()},{target:O});const Z=(0,m.jsx)(m.Fragment,{children:M?(0,m.jsx)(r.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:c.A})}):(0,m.jsxs)(m.Fragment,{children:[s?.length>0&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:U,variant:"primary",disabled:!s?.length||t,label:__("Send request","jetpack"),children:d?__("Generate","jetpack"):(0,m.jsx)(i.A,{icon:l.A})})}),z&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsxs)(r.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,m.jsx)(r.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Undo","jetpack"),onClick:$,tooltipPosition:"top",children:(0,m.jsx)(i.A,{icon:u.A})}),(0,m.jsx)(r.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:G,upgradeUrl:j}):x?J=(0,m.jsx)(p.k9,{}):y?J=(0,m.jsx)(p.AK,{requestsRemaining:k,onUpgradeClick:G,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:s,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,s){"use strict";s.d(t,{FC:()=>n.A,N0:()=>r.A});s(70629);var r=s(71417),n=s(61)},11497(e,t,s){"use strict";s.d(t,{A:()=>d});var r=s(85985),n=s(56427),o=s(86087),a=s(27723),i=s(57577),l=s(44582),c=s(13022),u=(s(81913),s(10790));const __=a.__;function d({disabled:e=!1,iconSize:t=24,ratedItem:s="",feature:a="",savedRatings:d={},options:p={},onRate:h}){if(!function(e){return!0===(0,r.FB)(e).available}("ai-response-feedback"))return null;const[m,g]=(0,o.useState)({}),{tracks:f}=(0,r.st)();(0,o.useEffect)(()=>{const e={...d,...m};JSON.stringify(e)!==JSON.stringify(m)&&g(e)},[d]);const b=e=>!!m[s]&&m[s]===e,v=e=>{const t=e?"thumbs-up":"thumbs-down";b(t)||(g({...m,[s]: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)(n.Tooltip,{text:__("I like this","jetpack"),children:(0,u.jsx)(n.Button,{disabled:e,icon:l.A,onClick:()=>v(!0),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-up")})})}),(0,u.jsx)(n.Tooltip,{text:__("I don't find this useful","jetpack"),children:(0,u.jsx)(n.Button,{disabled:e,icon:i.A,onClick:()=>v(!1),iconSize:t,showTooltip:!1,className:(0,c.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-down")})})})]})}},23059(e,t,s){"use strict";s.d(t,{A:()=>l,R:()=>i});var r=s(56427),n=s(13109),o=s(5573),a=s(10790);const i=(0,a.jsxs)(r.SVG,{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsxs)(r.G,{clipPath:"url(#clip0_4479_1006)",children:[(0,a.jsx)(r.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)(r.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)(r.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)(r.Rect,{width:"41.9997",height:"41.9992",fill:"white"})})})]});function l({className:e,size:t=42}){return(0,a.jsx)(n.A,{icon:i,width:t,height:t,className:e})}},96390(e,t,s){"use strict";s.d(t,{A:()=>v});var r=s(85985),n=s(56427),o=s(86087),a=s(27723),i=s(10067),l=s.n(i),c=s(66223),u=s(23101),d=s(46381),p=s(14016),h=s(57853),m=s(77990),g=s(47560),f=(s(10169),s(10790));const __=a.__,b=l()("jetpack-ai-client:ai-image-modal");function v({title:e,cost:t,open:s,images:a,currentIndex:i=0,onClose:l=null,onTryAgain:v=null,onGenerate:k=null,generating:y=!1,notEnoughRequests:x=!1,requireUpgrade:j=!1,currentLimit:w=null,currentUsage:_=null,isUnlimited:C=!1,upgradeDescription:A=null,hasError:S=!1,handlePreviousImage:E=()=>{},handleNextImage:N=()=>{},acceptButton:T=null,autoStart:B=!1,autoStartAction:P=null,instructionsPlaceholder:I=null,imageStyles:M=[],onGuessStyle:L=null,prompt:R="",setPrompt:D=()=>{},initialStyle:F=null,inputDisabled:O=!1,actionDisabled:z=!1}){const{tracks:U}=(0,r.st)(),{recordEvent:H}=U,V=(0,o.useRef)(!1),[q,$]=(0,o.useState)(!1),[G,W]=(0,o.useState)(null),[Z,J]=(0,o.useState)(M||[]),K=(0,o.useCallback)(()=>{v?.({userPrompt:R,style:G})},[v,R,G]),Y=(0,o.useCallback)(async()=>{if(G===c.Wp&&L){H("jetpack_ai_general_image_guess_style",{context:"block-editor",tool:"image"});const e=await L(R)||c.Hu;W(e),b("guessed style",e),k?.({userPrompt:R,style:e})}else k?.({userPrompt:R,style:G})},[k,R,G,L,H]),Q=(0,o.useCallback)(e=>{b("change style",e),W(e),H("jetpack_ai_image_generator_switch_style",{context:"block-editor",style:e})},[W,H]),X=(j||x)&&!y,ee=Boolean(!C&&t&&w),te=__("Generate","jetpack"),se=__("Try again","jetpack");return(0,o.useEffect)(()=>{B&&s&&(V.current||(V.current=!0,P?.({})))},[B,P,s]),(0,o.useEffect)(()=>{M&&M.length>0&&(J([M.find(({value:e})=>e===c.Hu),M.find(({value:e})=>e===c.Wp),...M.filter(({value:e})=>![c.Hu,c.Wp].includes(e))].filter(e=>e)),$(!0),W(F||c.Hu))},[M,F]),(0,f.jsx)(f.Fragment,{children:s&&(0,f.jsxs)(p.A,{handleClose:l,title:e,children:[(0,f.jsxs)("div",{className:"ai-image-modal__content",children:[q&&(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)(n.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:G,options:Z,onChange:Q})})]}),(0,f.jsx)(u.K,{prompt:R,setPrompt:D,disabled:O,actionDisabled:z,generateHandler:S?K:Y,placeholder:I,buttonLabel:S?se:te}),X&&(0,f.jsx)(h.A,{description:A,placement:"ai-image-generator",useLightNudge:!0}),(0,f.jsx)("div",{className:"ai-image-modal__actions",children:(0,f.jsx)("div",{className:"ai-image-modal__actions-left",children:ee&&(0,f.jsx)(g.A,{cost:t,currentLimit:w,currentUsage:_})})}),(0,f.jsx)("div",{className:"ai-image-modal__image-canvas",children:(0,f.jsx)(m.A,{images:a,current:i,handlePreviousImage:E,handleNextImage:N,actions:T})})]}),(0,f.jsx)("div",{className:"ai-image-modal__footer",children:(0,f.jsx)(d.A,{})})]})})}},77990(e,t,s){"use strict";s.d(t,{A:()=>m});var r=s(56427),n=s(86087),o=s(27723),a=s(13109),i=s(39558),l=s(48329),c=s(13022),u=s(11497),d=s(23059),p=(s(79209),s(10790));const __=o.__;function h({children:e,isDotted:t=!1,contentClassName:s=""}){const r=(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:[r,(0,p.jsx)("div",{className:(0,c.A)("ai-assistant-image__blank-content",s,{"is-dotted":t}),children:e})]})}function m({images:e,current:t,handlePreviousImage:s,handleNextImage:o,actions:m=null}){const[g,f]=(0,n.useState)(!1),b=(0,p.jsx)("button",{className:"ai-carrousel__prev",onClick:s,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,n.useEffect)(()=>{const s=e[t];s||f(!0);const{image:r,generating:n,error:o}=s||{};return r||n||o?n||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:s,error:n,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:s?(0,p.jsxs)(h,{contentClassName:"ai-assistant-image__loading",children:[__("Creating image…","jetpack"),(0,p.jsx)(r.Spinner,{style:{width:"50px",height:"50px"}})]}):(0,p.jsx)(p.Fragment,{children:n?(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"),n?.message&&(0,p.jsx)("span",{className:"ai-assistant-image__error-message",children:n?.message})]})}):(0,p.jsx)(p.Fragment,{children:s||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,s){"use strict";s.d(t,{A:()=>a});var r=s(86087),n=s(27723),o=(s(97011),s(10790));const __=n.__;function a({currentLimit:e,currentUsage:t,cost:s}){const a=e-t,i=(0,r.createInterpolateElement)( // Translators: %d is the cost of one image. // Translators: %d is the cost of one image. (0,n.sprintf)(__("Requests needed: %d","jetpack"),s),{counter:(0,o.jsx)("span",{})}),l=(0,r.createInterpolateElement)((0,n.sprintf)( // Translators: %d is the current requests balance. __("Requests available: %d","jetpack"),a),{counter:ax});var r=s(85985),n=s(56427),o=s(47143),a=s(43656),i=s(86087),l=s(27723),c=s(10067),u=s.n(c),d=(s(54339),s(43984)),p=s(72448),h=s(71508),m=s(62038),g=s(96390),f=s(3620),b=s(35918),v=s(75988),k=s(10790);const __=l.__,y=u()("jetpack-ai-client:featured-image");function x({busy:e,disabled:t,placement:s,onClose:c=()=>{}}){const[u,x]=(0,i.useState)(s===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,r.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)(),$=(0,r.Bd)(V),G=q?.[v.oW]?.activeModel??10,W=G===q?.[v.oW]?.stableDiffusion?v.Dk:v.bb,Z=$===r.Ti,J=H-U{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:s,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:s,error:e?.message,model:W,site_type:j,style:t})})),[T,s,W,j,ee,w,J,C]),pe=(0,i.useCallback)(async()=>{ne.generating=!0;const e=await ue("");P(e);const t=await de({userPrompt:"",style:e});t&&(y("handleFirstGenerate",t.revisedPrompt),M(t.revisedPrompt||""))},[ne,de,ue]),he=(0,i.useCallback)(({userPrompt:e,style:t})=>{T("jetpack_ai_featured_image_generation_generate_another_image",{placement:s,model:W,site_type:j,style:t}),X(()=>oe.length),ee({userPrompt:e,postContent:C+"\n\n"+w(),notEnoughRequests:J,style:t}).catch(r=>{T("jetpack_ai_featured_image_generation_error",{placement:s,error:r?.message,model:W,site_type:j,style:t,userPrompt:e})})},[T,s,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:s,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:s,error:e?.message,model:W,site_type:j,style:t})})},[T,s,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:s,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)};re?.libraryId?e(re?.libraryId):E(re?.image).then(t=>{e(t?.id)}).catch(e=>{T("jetpack_ai_featured_image_saving_error",{placement:s,error:e?.message,model:W,site_type:j})})},[T,s,W,j,re?.libraryId,re?.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||ne?.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"),G):null,_e=(0,k.jsx)(n.Button,{onClick:fe,variant:"primary",disabled:!re?.image||re?.generating||re?.libraryId===A,children:__("Set as featured image","jetpack")});return(0,k.jsxs)(k.Fragment,{children:[(s===d.s6||s===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)(n.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:G,open:u,placement:s,onClose:le,onTryAgain:me,onGenerate:Y?.current>0||A?he:de,generating:ne?.generating,notEnoughRequests:J,requireUpgrade:z,upgradeDescription:we,currentLimit:H,currentUsage:U,isUnlimited:Z,hasError:Boolean(ne?.error),handlePreviousImage:te,handleNextImage:se,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,s){"use strict";s(85985),s(56427),s(86087),s(27723);var r=s(10067),n=s.n(r);s(54339),s(72448),s(71508),s(62038),s(96390),s(3620),s(35918),s(10790);n()("jetpack-ai:general-purpose-image")},3620(e,t,s){"use strict";s.d(t,{A:()=>p});var r=s(47143),n=s(86087),o=s(27723),a=s(93832),i=s(31439),l=s(72448),c=s(62614),u=s(62038),d=s(75988);const __=o.__;function p({feature:e,type:t,cost:s,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,r.useDispatch)("core/notices"),v=(0,n.useRef)(0),[k,y]=(0,n.useState)(0),[x,j]=(0,n.useState)([{generating:o}]),w=e===d.oW?"featured-image":"image",_=g?.[w],C=_?.styles,A=(0,n.useCallback)((e,t)=>{j(s=>{const r=[...s];return r[t]={...r[t],...e},r})},[]),S=(0,r.useSelect)(e=>e("core")?.getEntityRecord?.("postType","attachment",p),[p]);(0,n.useEffect)(()=>{S&&A({image:S.source_url,libraryId:S.id,libraryUrl:S.source_url,generating:!1},v.current)},[S,A]);const E=(0,n.useCallback)(e=>{b("success",e,{type:"snackbar",isDismissible:!0})},[b]),N=(0,n.useCallback)(()=>{m(s)},[m,s]),T=(0,n.useCallback)(e=>{if(!e)return"image.png";const t=e.split(" ").slice(0,10).join(" ");return(0,a.cleanForSlug)(t)+".png"},[]),B=(0,n.useCallback)(({userPrompt:s,postContent:r,notEnoughRequests:n,style:o=null})=>new Promise((a,i)=>{if(p&&0===v.current&&v.current++,A({generating:!0,error:null},v.current),n)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:s||null,content:r,style:o}}],style:o||""}),c=T(s);l.then(e=>{if(e.data.length>0){const t="data:image/png;base64,"+e.data[0].b64_json,r=s||null,n=e.data[0].revised_prompt||null;A({image:t,prompt:r,revisedPrompt:n},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:n})}).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,n.useCallback)(()=>{y(Math.max(k-1,0))},[k]),I=(0,n.useCallback)(()=>{y(Math.min(k+1,x.length-1))},[k,x.length]),M=(0,n.useCallback)(async function(e,t="",s=""){if(!C||!C.length)return null;const r=[{role:"jetpack-ai",context:{type:t||"general-image-guess-style",request:e,content:s}}];try{const e=await(0,i.A)(r,{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,s){"use strict";s.d(t,{A:()=>o});var r=s(97999),n=s(86087);function o(){const[e]=(0,n.useState)((0,r.isWoASite)()?"atomic":(0,r.isSimpleSite)()?"simple":"jetpack");return e}},77089(e,t,s){"use strict";s.d(t,{m2:()=>r.A});var r=s(89289);s(83158)},75988(e,t,s){"use strict";s.d(t,{Dk:()=>n,bb:()=>o,hB:()=>a,oW:()=>r});const r="featured-post-image",n="stable-diffusion",o="dall-e-3",a="media-source-dropdown"},46381(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(56427),n=s(86087),o=s(27723),a=s(13109),i=s(28847),l=(s(557),s(10790));const __=o.__;function c({onGuidelinesClick:e,onFeedbackClick:t}){const s=(0,n.useCallback)(()=>{e?.()},[e]),o=(0,n.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)(r.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:s,children:(0,l.jsxs)("span",{children:[__("Guidelines","jetpack")," ↗"]})})]}),(0,l.jsx)(r.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,s){"use strict";s.d(t,{A:()=>a});var r=s(56427),n=s(13022),o=(s(93208),s(10790));function a({state:e}){return(0,o.jsx)("div",{className:(0,n.A)("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0}),children:(0,o.jsx)(r.Spinner,{})})}},68203(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(32569),n=s(10790);function o({duration:e,className:t}){return(0,n.jsx)("span",{className:t,children:(0,r.f)(e,{addDecimalPart:!1})})}},32569(e,t,s){"use strict";function r(e,{addDecimalPart:t=!1,showMinutes:s=!0,showHours:r=!1}={}){const n=Math.floor(e/36e5),o=Math.floor(e/6e4)%60,a=Math.floor(e/1e3)%60,i=Math.floor(e/10)%100,l=[n>0||r?n.toString().padStart(2,"0")+":":"",n>0||o>0||s?o.toString().padStart(2,"0")+":":"",a.toString().padStart(2,"0")];return t&&l.push("."+i.toString().padStart(2,"0")),l.join("")}s.d(t,{f:()=>r})},27802(e,t,s){"use strict";s.d(t,{AK:()=>l.AK,FC:()=>r.FC,HL:()=>n.A,Hb:()=>u.A,N0:()=>r.N0,QA:()=>u.Q,RD:()=>o.R,Yj:()=>l.Yj,m2:()=>a.m2,yV:()=>c.A,z3:()=>i.A});var r=s(42299),n=s(11497),o=s(23059),a=s(77089),i=(s(6754),s(68203)),l=(s(46381),s(63098)),c=s(14016),u=s(57853)},63098(e,t,s){"use strict";s.d(t,{AK:()=>j,Kw:()=>w,Yj:()=>y,k9:()=>x});var r=s(56427),n=s(86087),o=s(27723),a=s(13109),i=s(88901),l=s(13022),c=(s(11008),s(42154)),u=s(78836),d=s(11497),p=s(10790);const __=o.__,h="warning",m="error",g="success",f="info",b={[f]:null,[h]:null,[m]:c.A,[g]:i.A};function v({severity:e=f,icon:t=null,aiFeedbackThumbsOptions:s={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}},children:r}){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)(a.A,{icon:b[e]||t}),(0,p.jsx)("div",{className:"jetpack-ai-assistant__message-content",children:r}),s.showAIFeedbackThumbs&&s.prompt&&(0,p.jsx)(d.A,{disabled:!1,ratedItem:s.ratedItem,feature:"ai-assistant",options:{prompt:s.prompt,block:s.block},onRate:s.onRate})]})}function k(){return(0,p.jsx)(r.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,n.createInterpolateElement)(e,{link:(0,p.jsx)(r.ExternalLink,{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",children:null})});return(0,p.jsx)(v,{severity:h,children:t})}function j({requestsRemaining:e,severity:t,onUpgradeClick:s,upgradeUrl:n}){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)(r.Button,{variant:"link",onClick:s,href:n,target:n?"_blank":null,children:(0,p.jsx)("span",{children:__("Upgrade now","jetpack")})})]})}function w({error:e,code:t,onTryAgainClick:s,onUpgradeClick:n,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)(r.Button,{variant:"link",onClick:n,href:a,target:a?"_blank":null,children:(0,p.jsx)("span",{children:__("Upgrade now","jetpack")})}):(0,p.jsx)(r.Button,{variant:"link",onClick:s,children:(0,p.jsx)("span",{children:__("Try again","jetpack")})})]})}},14016(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(56427),n=s(27723),o=s(51489),a=s(6754),i=(s(28494),s(10790));const __=n.__,l=({requestingState:e,onClose:t,title:s})=>(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:s})]}),(0,i.jsx)(r.Button,{icon:o.A,label:__("Close","jetpack"),onClick:t})]});function c({children:e,handleClose:t,hideHeader:s=!0,requestingState:n="init",title:o=__("AI Assistant","jetpack"),maxWidth:a=720}){return(0,i.jsx)(r.Modal,{__experimentalHideHeader:s,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:n,onClose:t,title:o}),e]})})}},57853(e,t,s){"use strict";s.d(t,{A:()=>b,Q:()=>f});var r=s(3924),n=s(85985),o=s(82201),a=s(56427),i=s(86087),l=s(27723),c=s(10067),u=s.n(c),d=s(42694),p=s(72448),h=s(71567),m=(s(17277),s(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 s=__("Requests will reset on %s.","jetpack");return`${t} ${(0,l.sprintf)(s,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:s}=(0,p.A)();return 1===s?.value?(0,m.jsx)(f,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const s=t?h.U:o.cb,r=(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)(s,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||r,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:s=!1})=>{const a=s?h.U:o.cb,{checkoutUrl:c}=(0,d.A)(),u=(0,n.CP)(),{nextTier:f,tierPlansEnabled:b,currentTier:v,requestsCount:k}=(0,p.A)(),{tracks:y}=(0,n.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,r.A)("jetpack-ai-tiers-more-requests-contact"),s=__("You have reached the request limit for your current plan.","jetpack");return(0,m.jsx)(a,{buttonText:__("Contact Us","jetpack"),description:t||s,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: %d: the number of requests allowed */ __("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: %d: the 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,s){"use strict";s.d(t,{U:()=>a});var r=s(56427),n=s(27723),o=(s(17277),s(10790));const __=n.__,a=({title:e,description:t,buttonText:s=null,checkoutUrl:n=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)(r.Notice,{status:"error",isDismissible:!1,children:(0,o.jsxs)("p",{children:[e&&(0,o.jsx)("strong",{children:e}),t," ",l&&(0,o.jsx)(r.Button,{href:i?null:n,onClick:a,variant:"link",target:c,children:(0,o.jsx)("span",{children:i?u:s})})]})})})}},43984(e,t,s){"use strict";s.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:()=>n,u0:()=>y,uQ:()=>x,vE:()=>u,wb:()=>I,yQ:()=>E,yy:()=>c,z5:()=>b});var r=s(27723);const __=r.__,n={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,s){"use strict";s.d(t,{R:()=>a});var r=s(51609),n=s(10790);const o=(0,r.createContext)({}),a=({value:e,children:t})=>(0,n.jsx)(o.Provider,{value:e,children:t})},13965(e,t,s){"use strict";s.d(t,{Rb:()=>r.R});var r=s(2166);s(59886),s(53471)},53471(e,t,s){"use strict";s(51609),s(78836),s(13965)},59886(e,t,s){"use strict";var r=s(29491),n=s(86087),o=s(46219),a=s(13965),i=s(10790);(0,r.createHigherOrderComponent)(e=>t=>{const{suggestion:s,error:r,requestingState:l,request:c,stopSuggestion:u,eventSource:d}=(0,o.Ay)(),p=(0,n.useMemo)(()=>({suggestion:s,requestingError:r,requestingState:l,eventSource:d,requestSuggestion:c,stopSuggestion:u}),[s,r,l,d,c,u]);return(0,i.jsx)(a.Rb,{value:p,children:(0,i.jsx)(e,{...t})})},"withAiDataProvider")},42694(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(3924),n=s(97999),o=s(85985),a=s(72448);function i(){const{nextTier:e,tierPlansEnabled:t}=(0,a.A)(),s=(()=>{const e=new URLSearchParams(window.location.search),t=(0,o.GE)();return(0,n.isSimpleSite)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`})(),i=(0,r.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(s)}`}),l=(0,r.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,o.GE)(),path:"jetpack_ai_yearly"}),c=(0,n.isWpcomPlatformSite)()?i:l,{autosaveAndRedirect:u,isRedirecting:d}=(0,o.ZR)(c);return{checkoutUrl:c,autosaveAndRedirect:u,isRedirecting:d}}},72448(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(85985),n=s(47143),o=s(86087);function a(){const e=(0,n.useSelect)(e=>e("wordpress-com/plans").getAiAssistantFeature(),[]),t=(0,n.useSelect)(e=>e("wordpress-com/plans").getIsRequestingAiAssistantFeature(),[]),{fetchAiAssistantFeature:s,increaseAiAssistantRequestsCount:a,dequeueAiAssistantFeatureAsyncRequest:i}=(0,n.useDispatch)("wordpress-com/plans");return(0,o.useMemo)(()=>{const n=(0,r.Bd)(e?.currentTier),o=e?.currentTier?.limit||e?.requestsLimit,l=n===r._X?e?.requestsCount:e?.usagePeriod?.requestsCount,c=n===r._X?e?.requestsLimit:o;return{...e,requestsCount:l,requestsLimit:c,loading:t,error:null,refresh:s,increaseRequestsCount:a,dequeueAsyncRequest:i}},[e,t,s,a,i])}},46219(e,t,s){"use strict";s.d(t,{Ay:()=>p,fC:()=>u});var r=s(86087),n=s(27723),o=s(10067),a=s.n(o),i=s(87286),l=s(78836);const __=n.__,c=a()("ai-client:use-ai-suggestions");function u(e){switch(e){case l.Or:return{code:l.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case l.L9:return{code:l.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case l.AZ:return{code:l.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case l.ud:return{code:l.ud,message:__("Our service provider OpenAI could not process your prompt due to a moderation system. Please try to rephrase it changing potentially problematic words and try again.","jetpack"),severity:"info"};case l.cT:return{code:l.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 l.mA:default:return{code:l.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function d(e){return e.replace(/^<\|start_header_id\|>assistant<\|end_header_id\|>[\n]+/,"")}function p({prompt:e,autoRequest:t=!1,askQuestionOptions:s={},initialRequestingState:n="init",onSuggestion:o,onDone:a,onStop:p,onError:h,onAllErrors:m}={}){const[g,f]=(0,r.useState)(n),[b,v]=(0,r.useState)(""),[k,y]=(0,r.useState)(l.Np),x=(0,r.useRef)(l.Np),[j,w]=(0,r.useState)(),_=(0,r.useRef)(void 0),C=(0,r.useCallback)(e=>{c("handleSuggestion",e);const t=d(e?.detail);t?(v(t),o?.(t)):c("no partial suggestion")},[o]),A=(0,r.useCallback)(e=>{R();const t=d(e?.detail?.message??e?.detail);a?.(t,x.current),f("done")},[a]),S=(0,r.useCallback)(e=>{m?.(e?.detail)},[m]),E=(0,r.useCallback)(e=>{_?.current?.close(),f("error"),w(u(e)),h?.(u(e))},[h]),N=(0,r.useCallback)(()=>E(l.Or),[]),T=(0,r.useCallback)(()=>E(l.L9),[]),B=(0,r.useCallback)(()=>E(l.AZ),[]),P=(0,r.useCallback)(()=>E(l.ud),[]),I=(0,r.useCallback)(()=>E(l.mA),[]),M=(0,r.useCallback)(async(e,t={...s})=>{var r;if(w(void 0),f("requesting"),r=l.Np,y(r),x.current=r,_.current=await(0,i.A)(e,t),!_?.current)return void c("no event source");const n=_.current;f("suggesting"),n.addEventListener("suggestion",C),n.addEventListener(l.Or,N),n.addEventListener(l.L9,T),n.addEventListener(l.AZ,B),n.addEventListener(l.ud,P),n.addEventListener(l.mA,I),n.addEventListener(l.zn,S),n.addEventListener("done",A)},[A,N,T,B,P,I,C]),L=(0,r.useCallback)(()=>{f("init"),v(""),w(void 0)},[]),R=(0,r.useCallback)(()=>{if(!_?.current)return;const e=_?.current;e.close(),e.removeEventListener("suggestion",C),e.removeEventListener(l.Or,N),e.removeEventListener(l.L9,T),e.removeEventListener(l.AZ,B),e.removeEventListener(l.ud,P),e.removeEventListener(l.mA,I),e.removeEventListener("done",A)},[_,C,N,T,B,P,I,A]),D=(0,r.useCallback)(()=>{R(),p?.(),f("done")},[p]);return(0,r.useEffect)(()=>{if(e?.length)return t&&M(e,s),()=>{D()}},[t,e,M,D]),{suggestion:b,model:k,error:j,requestingState:g,request:M,stopSuggestion:D,reset:L,handleErrorQuotaExceededError:N,eventSource:_.current}}},7804(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(86087),n=s(27723),o=s(10067),a=s.n(o),i=s(57745);const __=n.__,l=a()("jetpack-ai-client:use-audio-transcription");function c({feature:e,onReady:t,onError:s}){const[n,o]=(0,r.useState)(""),[a,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(!1),p=(0,r.useRef)(null);return{transcriptionResult:n,isTranscribingAudio:u,transcriptionError:a,transcribeAudio:(0,r.useCallback)(r=>{l("Transcribing audio"),o(""),c(""),d(!0);const n=new AbortController;p.current=n,(0,i.A)(r,e,n.signal).then(e=>{o(e),t?.(e)}).catch(e=>{n.signal.aborted||(c(e.message),s?.((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")})(e)))}).finally(()=>d(!1))},[i.A,o,c,d]),cancelTranscription:(0,r.useCallback)(()=>{p.current?.abort(),o(""),c(""),d(!1)},[p,o,c,d])}}},66859(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(86087),n=s(27723);const __=n.__,o=["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 a(){const[e,t]=(0,r.useState)(!1);return{isValidatingAudio:e,validateAudio:(0,r.useCallback)((e,s,r)=>{if(t(!0),e?.size>25e6)return t(!1),r(__("The audio file is too large. The maximum file size is 25MB.","jetpack"));const n=e instanceof File;if(n&&!o.includes(e.type))return t(!1),r(__("The audio file type is not supported. Please use a supported audio file type.","jetpack"));const a=new AudioContext;e.arrayBuffer().then(o=>{a.decodeAudioData(o,function(o){const a=Math.ceil(o.duration);return a>1500?(t(!1),r(__("The audio file is too long. The maximum recording time is 25 minutes.","jetpack"))):(t(!1),s({duration:a,isFile:n,size:e?.size}))})})},[t])}}},66223(e,t,s){"use strict";s.d(t,{Hu:()=>n,Wp:()=>r});const r="auto",n="none"},62614(e,t,s){"use strict";s.d(t,{Ay:()=>u});var r=s(10067),n=s.n(r),o=s(31439),a=s(51391);const i=n()("ai-client:use-image-generator"),l=(e,t)=>{const s=4e3-t;return e.length>s?e.substring(0,s-6)+" [...]":e},c=async(e,t,s)=>{const r=((e,t)=>{if(t){const s=`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 s+l(e,s.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)(r,{feature:s})},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 s="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-image",r={Authorization:`Bearer ${t}`,"Content-Type":"application/json"},n=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(e)}).then(e=>e.json());return n?.data?.status&&n?.data?.status>200?(i("Error generating image: %o",n),Promise.reject(n)):n}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}};return{generateImage:async function({feature:t,postContent:s,responseFormat:r="url",userPrompt:n}){try{i("Generating image");const o=((e,t)=>{if(t){const s=`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 s+l(e,s.length)}const s="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 s+l(e,838)})(s,n),a={prompt:o,response_format:r,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:s,userPrompt:r}){try{i("Generating image with Stable Diffusion");const n={prompt:await c(s,r,t),feature:t,model:"stable-diffusion"};return await e(n)}catch(e){return i("Error generating image: %o",e),Promise.reject(e)}},generateImageWithParameters:e}}},96657(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(86087);const n="audio/mp4;codecs=mp4a",o="audio/webm";function a({onDone:e}={}){const t=(0,r.useRef)(null),[s,a]=(0,r.useState)("inactive"),i=(0,r.useRef)(!1),l=(0,r.useRef)(0),[c,u]=(0,r.useState)(0),d=(0,r.useRef)(null),[p,h]=(0,r.useState)(null),m=(0,r.useRef)([]).current,[g,f]=(0,r.useState)(null),b=(0,r.useRef)(null);function v(){return MediaRecorder.isTypeSupported(n)?new Blob(m,{type:"audio/mp4"}):new Blob(m,{type:o})}const k=(0,r.useCallback)(e=>{if(w(),!e)return t?.current?.start();e<100&&(e=100),l.current=Date.now(),t?.current?.start(e)},[]),y=(0,r.useCallback)(()=>{i.current=!0,t?.current?.pause(),u(e=>e+Date.now()-l.current)},[]),x=(0,r.useCallback)(()=>{i.current=!1,t?.current?.resume(),l.current=Date.now()},[]),j=(0,r.useCallback)(()=>{t?.current?.stop(),"recording"===s&&u(e=>e+Date.now()-l.current)},[]),w=(0,r.useCallback)(()=>{m.length=0,h(null),f(null),u(0),i.current=!1,l.current=0},[]),_=(0,r.useCallback)(()=>{t?.current&&(t.current.removeEventListener("start",S),t.current.removeEventListener("stop",E),t.current.removeEventListener("pause",N),t.current.removeEventListener("resume",T),t.current.removeEventListener("dataavailable",B),t.current=null)},[]),C=(0,r.useCallback)(()=>{if(a("inactive"),w(),_(),!navigator.mediaDevices?.getUserMedia)return;const e=new AudioContext;b.current=e.createAnalyser();navigator.mediaDevices.getUserMedia({audio:!0}).then(s=>{d.current=s;e.createMediaStreamSource(s).connect(b.current),MediaRecorder.isTypeSupported(n)?t.current=new MediaRecorder(s,{mimeType:n}):t.current=new MediaRecorder(s,{mimeType:o}),t.current.addEventListener("start",S),t.current.addEventListener("stop",E),t.current.addEventListener("pause",N),t.current.addEventListener("resume",T),t.current.addEventListener("dataavailable",B)}).catch(e=>{throw e})},[]),A=(0,r.useCallback)(e=>{j(),f("string"==typeof e?e:e.message),a("error")},[]);function S(){a("recording")}function E(){const t=v();e?.(t),m.length=0}function N(){a("paused")}function T(){a("recording")}function B(e){const{data:t}=e;t?.size&&(m.push(t),h(v()),i.current||u(e=>{const t=Date.now(),s=t-l.current;return l.current=t,e+s}))}return(0,r.useEffect)(()=>(C(),()=>{d.current&&d.current.getTracks().forEach(e=>e.stop()),_()}),[]),{state:s,blob:p,error:g,duration:c,analyser:b.current,onError:A,controls:{start:k,pause:y,resume:x,stop:j,reset:C}}}},71508(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(74997),n=s(47143),o=s(43656),a=s(86087),i=s(55166);const l=()=>{const{getBlocks:e,isEditedPostEmpty:t}=(0,n.useSelect)(e=>{const t=e("core/block-editor"),s=e(o.store);return{getBlocks:t.getBlocks,isEditedPostEmpty:s.isEditedPostEmpty}},[]),s=(0,a.useCallback)(()=>{const t=e();return 0===t.length?"":(0,r.serialize)(t)},[e]);return{getPostContent:(0,a.useCallback)(e=>{let t=s();return t?(e&&"function"==typeof e&&(t=e(t)),t?(0,i.rh)({content:t}):""):""},[e]),isEditedPostEmpty:t,getSerializedPostContent:s}}},62038(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(63162),n=s(47143),o=s(86087),a=s(10067);const i=s.n(a)()("jetpack-ai-client:save-to-media-library");function l(){const[e,t]=(0,o.useState)(!1),{getSettings:s}=(0,n.useSelect)(e=>e("core/block-editor"),[]);return{isLoading:e,saveToMediaLibrary:(e,n=null)=>{const o=s();return new Promise((s,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=[];n?l.push(new File([e],n)):l.push(e),o.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,r.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),s({id:e.id,url:e.url,mime:e.mime})),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,s){"use strict";s.d(t,{A:()=>l});var r=s(63162),n=s(47143),o=s(86087),a=s(10067);const i=s.n(a)()("ai-client:save-to-media-library");function l(){const[e,t]=(0,o.useState)(!1),{getSettings:s}=(0,n.useSelect)(e=>e("core/block-editor"),[]);return{isLoading:e,saveToMediaLibrary:(e,n)=>{const o=s();return new Promise((s,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();n?l.push(new File([e],n)):l.push(e),o.mediaUpload({allowedTypes:["image"],filesList:l,onFileChange([e]){(0,r.isBlobURL)(e?.url)||(e&&(i("Image uploaded to media library",e),s(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,s){"use strict";s.d(t,{A:()=>c,u:()=>l});var r=s(86087),n=s(10067),o=s.n(n),a=s(46219);const i=o()("jetpack-ai-client:use-transcription-post-processing"),l="voice-to-content-simple-draft";function c({feature:e,onReady:t,onError:s,onUpdate:n}){const[o,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,p]=(0,r.useState)(!1),h=(0,r.useCallback)(e=>{l(e),n?.(e)},[l,n]),m=(0,r.useCallback)(e=>{l(e),n?.(e),t?.(e)},[l,n,t]),g=(0,r.useCallback)(e=>{u(e.message),s?.(e.message)},[u,s]),{request:f,stopSuggestion:b}=(0,a.Ay)({onSuggestion:h,onDone:m,onError:g});return{postProcessingResult:o,isProcessingTranscription:d,postProcessingError:c,processTranscription:(0,r.useCallback)((t,s)=>{i("Post-processing transcription"),l(""),u(""),p(!0);f([{role:"jetpack-ai",context:{type:t,content:s}}],{feature:e})},[l,u,p,f,e]),cancelTranscriptionProcessing:(0,r.useCallback)(()=>{b(),p(!1)},[b,p])}}},30151(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsxs)(r.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,n.jsx)(r.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,n.jsx)(r.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,n.jsx)(r.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,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsxs)(r.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)(r.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,n.jsx)(r.Path,{d:"M10.8333 5.83333H9.16667V10.8333H10.8333V5.83333Z"}),(0,n.jsx)(r.Path,{d:"M10.8333 12.5H9.16667V14.1667H10.8333V12.5Z"})]})},91396(e,t,s){"use strict";s.d(t,{Qr:()=>a.A,Vo:()=>n.A,cj:()=>r.A,ni:()=>o.A});var r=s(30151),n=s(81353),o=(s(95007),s(96626),s(4416),s(25680)),a=s(67205)},81353(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsxs)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,n.jsx)(r.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,n.jsx)(r.Rect,{x:"10.5",y:"8.25",width:"3",height:"4.875",rx:"1.5",fill:"#008710"}),(0,n.jsx)(r.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,n.jsx)(r.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,s){"use strict";var r=s(56427),n=s(10790);r.SVG,r.Path,r.Path},25680(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsxs)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,n.jsx)(r.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,n.jsx)(r.Rect,{x:"12.75",y:"9",width:"2.25",height:"6",fill:"#008710"}),(0,n.jsx)(r.Rect,{x:"9",y:"9",width:"2.25",height:"6",fill:"#008710"})]})},96626(e,t,s){"use strict";var r=s(56427),n=s(10790);r.SVG,r.Path,r.Path},4416(e,t,s){"use strict";var r=s(56427),n=s(10790);r.SVG,r.Path,r.Rect},67205(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsxs)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)(r.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,n.jsx)(r.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,s){"use strict";s.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:()=>n.A,OO:()=>g.OO,Or:()=>m.Or,QA:()=>h.QA,Qr:()=>p.Qr,R0:()=>r.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});s(51391),s(53664),s(87286);var r=s(31439),n=(s(57745),s(42694)),o=s(72448),a=s(46219),i=s(96657),l=s(7804),c=s(97784),u=s(66859),d=(s(62614),s(71508)),p=s(91396),h=s(27802),m=(s(13965),s(78836)),g=s(72586),f=s(43984),b=s(23101)},51391(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(97999),n=s(10067),o=s.n(n),a=s(48931);const i=o()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt";async function c({apiNonce:e,siteId:t,expirationTime:s}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,s=s||12e4;const n=localStorage.getItem(l);let o,c=null;if(n)try{c=JSON.parse(n)}catch(e){i("Error parsing token",e)}if(c&&c?.expire>Date.now())return i("Using cached token"),c;const u=(0,r.isSimpleSite)();o=u?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 d={token:o.token,blogId:u?t:o.blog_id,expire:Date.now()+s};return i("Storing new token"),localStorage.setItem(l,JSON.stringify(d)),d}},20231(e,t,s){"use strict";s.d(t,{_:()=>n});var r=s(47143);const n=()=>{const e=(0,r.select)("core/block-editor").getBlocks(),t=[],s=e=>{t.push(e),e.innerBlocks?.length&&e.innerBlocks.forEach(s)};return e.forEach(s),t}},40464(e,t,s){"use strict";s.d(t,{Z:()=>r});const r=async e=>{try{const t=await fetch(e),s=await t.arrayBuffer();return`data:image/png;base64,${btoa(new Uint8Array(s).reduce((e,t)=>e+String.fromCharCode(t),""))}`}catch{return e}}},72586(e,t,s){"use strict";s.d(t,{Fs:()=>a.F,Hh:()=>r.Hh,MB:()=>n.M,OO:()=>r.OO,Su:()=>r.Su,Zo:()=>l.Z,_G:()=>i._,in:()=>o.i,rh:()=>r.rh});var r=s(55166),n=s(84861),o=s(61269),a=s(1811),i=s(20231),l=s(40464)},84861(e,t,s){"use strict";s.d(t,{M:()=>n});var r=s(43984);function n(e,t={}){const{language:s,tone:n}=t,o=s?.split(" (")[0];switch(e){case r.Gm:return`${r.u0}: ${r.so[o].label}`;case r.eJ:return`${r.uQ}: ${r.oZ[n].label}`;case r.yy:return r.DD;case r.A4:return r.HM;case r.UA:return r.JR;case r.br:return r.K2;case r.fD:return r.UD;case r.d5:return r.mI;case r.fv:return r.yQ;case r.vE:return r.mT;case r.im:return r.Rq;case r.sn:return r.DT;default:return null}}},68641(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(21147);const n={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:s=[],remove:n=[],fixes:i=[]}={}){this.fixes=i,this.turndownService=new r.A({...o,...e}),this.turndownService.keep(s),this.turndownService.remove(n);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)=>n[t](e),t)}}},55166(e,t,s){"use strict";s.d(t,{Hh:()=>i,OO:()=>r.A,Su:()=>n.S,rh:()=>l});var r=s(68641),n=s(31737);const o=new n.A,a=new r.A,i=({content:e,rules:t,extension:s})=>o.render({content:e,rules:t,extension:s}),l=({content:e})=>a.render({content:e})},31737(e,t,s){"use strict";s.d(t,{A:()=>l,S:()=>o});var r=s(97158);const n=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 s=e.replace(/
  • \s+

    /g,"

  • ").replace(/<\/p>\s+<\/li>/g,"
  • ");return t?n(s):s},listItem:(e,t=!1)=>t?n(e.replace(/^<[ou]l>\s*/g,"").replace(/\s*<\/[ou]l>\s*$/g,"")):e,paragraph:(e,t=!1)=>t?e.split("<br />").map((e,t,s)=>(t0&&(e=e.trimStart()),e)).join("
    "):e,table:(e,t=!1,{hasFixedLayout:s=!1})=>t?e.startsWith("\x3c!-- wp:table")?e:`\x3c!-- wp:table { "hasFixedLayout":${s?"true":"false"} } --\x3e${e}\x3c!-- /wp:table --\x3e`:e},a={breaks:!0},i=["list"];class l{constructor(e=a){this.markdownConverter=new r.A(e)}render({content:e,rules:t=i,extension:s=!1}){const r=this.markdownConverter.render(e);return t.reduce((e,t)=>o[t](e,s),r)}}},61269(e,t,s){"use strict";s.d(t,{i:()=>o});var r=s(94715),n=s(47143);function o(e){if(!e)return;const{selectBlock:t}=(0,n.dispatch)(r.store),{enableComplementaryArea:s}=(0,n.dispatch)("core/interface");t(e),s("core/edit-post","edit-post/block")}},1811(e,t,s){"use strict";s.d(t,{F:()=>n});var r=s(47143);const n=async()=>{const{clearSelectedBlock:e}=(0,r.dispatch)("core/block-editor"),{enableComplementaryArea:t}=(0,r.dispatch)("core/interface");e(),await t("core/edit-post","jetpack-sidebar/jetpack");const s=document.querySelector(".jetpack-ai-assistant-panel"),n=s?.classList.contains("is-opened"),o=s?.querySelector("h2 button");n&&o?.click(),setTimeout(()=>{o?.click()},50)}},21902(e,t,s){"use strict";s.d(t,{A:()=>n});s(8655);var r=s(10790);const n=()=>(0,r.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,r.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,r.jsx)("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),(0,r.jsx)("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"})]})},11574(e,t,s){"use strict";s.d(t,{A:()=>n});s(8655);var r=s(10790);const n=()=>(0,r.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,r.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,s){"use strict";s.d(t,{A:()=>n});s(8655);var r=s(10790);const n=()=>(0,r.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,r.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,s){"use strict";s.d(t,{A:()=>n});s(8655);var r=s(10790);const n=()=>(0,r.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,r.jsx)("path",{d:"M7 6.49011L11 8.99011L7 11.4901V6.49011Z"}),(0,r.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,s){"use strict";s.d(t,{Q:()=>a});var r=s(56427),n=s(78867),o=s(10790);const a=({variant:e="error"})=>{const t=(0,n.A)();return"muted"===e?(0,o.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,o.jsx)(r.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null}},95933(e,t,s){"use strict";s.d(t,{x:()=>a});var r=s(56427),n=s(27723),o=s(10790);const __=n.__,a=({onCancel:e,onRetry:t})=>{const s=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.","jetpack"),n=__("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?s:n})}),(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,o.jsx)(r.Button,{variant:"tertiary",onClick:e,children:__("Cancel","jetpack")}),t&&(0,o.jsx)(r.Button,{variant:"primary",onClick:t,children:__("Try again","jetpack")})]})]})}},76194(e,t,s){"use strict";s.d(t,{N:()=>a});var r=s(27723),n=s(42669),o=(s(35797),s(10790));const __=r.__,a=({state:e="loadingFeature"})=>{const t=__("Loading…","jetpack"),s=__("Analyzing your site to create the perfect logo…","jetpack"),r=__("Generating logo…","jetpack");return(0,o.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__loading-wrapper",children:[(0,o.jsx)(n.$,{}),(0,o.jsxs)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:["loadingFeature"===e&&t,"analyzing"===e&&s,"generating"===e&&r]})]})}},64537(e,t,s){"use strict";s.d(t,{T:()=>S});var r=s(85985),n=s(56427),o=s(47143),a=s(27723),i=s(13022),l=s(10067),c=s.n(l),u=s(51609),d=s(46381),p=s(61356),h=s(60674),m=s(88725),g=s(44461),f=s(19362),b=s(74423),v=s(95933),k=s(76194),y=s(32623),x=s(34706),j=s(11114),w=s(35421),_=s(48204),C=(s(45736),s(10790));const __=a.__,A=c()("jetpack-ai-calypso:generator-modal"),S=({isOpen:e,onClose:t,onApplyLogo:s,onReload:a=null,siteDetails:l,context:c,placement:S})=>{const{tracks:E}=(0,r.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:$,getAiAssistantFeature:G,generateFirstPrompt:W,generateLogo:Z,setContext:J,tierPlansEnabled:K,site:Y,requireUpgrade:Q}=(0,m.A)(),{featureFetchError:X,setFeatureFetchError:ee,firstLogoPromptFetchError:te,clearErrors:se}=(0,g.A)(),re=l?.ID,[ne,oe]=(0,u.useState)(!1),{nextTierCheckoutURL:ae}=(0,h.Q)(),ie=G(),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(!re)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(re)),t=ie?.costs?.["jetpack-ai-logo-generator"]?.logo??p._S,s=1,r=ie?.currentTier?.limit||0,n=ie?.currentTier?.value||0,o=ie?.usagePeriod?.requestsCount||0,a=!(K?1===n:n>0)&&!!ie?.nextTier&&!e&&(K?r-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),se(),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),s?.(e)},me=()=>{N(p.$i,{context:c})};let ge;return(0,u.useEffect)(()=>{if(re&&T(l),!z.current){M()||(z.current=!0,B())}},[re,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:[!ne&&(0,C.jsx)(j.X,{initialPrompt:D}),(0,C.jsx)(x.s,{logo:$,onApplyLogo:he,logoAccepted:ne,siteId:String(re)}),ne?(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)(n.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)(n.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,s){"use strict";s.d(t,{N:()=>u});var r=s(85985),n=s(56427),o=s(13022),a=s(26076),i=s(61356),l=s(88725),c=(s(24046),s(10790));const u=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,{logos:s,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:[!s.length&&h&&(0,c.jsx)(n.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"})}),!s.length&&!h&&(0,c.jsx)("div",{children:" "}),s.map((e,r)=>(0,c.jsx)(n.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:s.length,selected_logo:e+1}),d(e)})(r),children:(0,c.jsx)("img",{src:m(e.url),alt:e.description})},e.url))]})}},42669(e,t,s){"use strict";s.d(t,{$:()=>a});var r=s(13022),n=s(26076),o=s(10790);const a=({className:e=null})=>(0,o.jsx)("img",{src:n,alt:"Loading",className:(0,r.A)("jetpack-ai-logo-generator-modal__loader",e)})},34706(e,t,s){"use strict";s.d(t,{s:()=>N});var r=s(85985),n=s(56427),o=s(47143),a=s(27723),i=s(10067),l=s.n(i),c=s(11497),u=s(11574),d=s(47621),p=s(97034),h=s(61356),m=s(88725),g=s(44461),f=s(19362),b=s(74423),v=s(42669),k=(s(55941),s(10790));const __=a.__,_x=a._x,y=l()("jetpack-ai-calypso:logo-presenter"),x=({siteId:e})=>{const{tracks:t}=(0,r.st)(),{recordEvent:s}=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=_x("Saving…","Logo save button","jetpack"),w=__("Saved","jetpack");return l||v?(0,k.jsxs)(n.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",children:[(0,k.jsx)(n.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)(n.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{if(!v&&!l){s(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)(n.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,r.st)(),{recordEvent:s}=t,{isSavingLogoToLibrary:o,selectedLogo:a,logos:i,selectedLogoIndex:l,context:c}=(0,m.A)();return(0,k.jsxs)(n.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{o||(s(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)(n.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:s})=>{const{logos:r,selectedLogo:n}=(0,m.A)(),o=r.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:n.mediaId,prompt:n.description},onRate:s})},S=({siteId:e,logo:t,onApplyLogo:s})=>(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:s}),(0,k.jsx)(A,{ratedItem:t.url,disabled:!1,onRate:s=>{(0,f.H)({siteId:e,url:t.url,newUrl:t.url,mediaId:t.mediaId,rating:s})}})]})]})]}),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)(n.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:s,logoAccepted:r=!1,siteId:n})=>{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,{}):r?(0,k.jsx)(E,{logo:e}):(0,k.jsx)(S,{siteId:String(n),logo:e,onApplyLogo:s}):(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}),!r&&(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,s){"use strict";s.d(t,{K:()=>x,X:()=>j});var r=s(85985),n=s(56427),o=s(27723),a=s(13109),i=s(28847),l=s(10067),c=s.n(l),u=s(51609),d=s(66223),p=s(21902),h=s(61356),m=s(60674),g=s(88725),f=s(44461),b=s(6019),v=s(64024),k=(s(47341),s(10790));const __=o.__,y=c()("jetpack-ai-calypso:prompt-box"),x=({prompt:e="",setPrompt:t=()=>{},disabled:s=!1,actionDisabled:r=!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:!s,suppressContentEditableWarning:!0,className:"prompt-query__input",onInput:e=>{t(e.target.textContent||"")},onPaste:e=>{e.preventDefault();const s=e.currentTarget.ownerDocument.getSelection();if(!s||!s.rangeCount)return;const r=e.clipboardData.getData("text/plain");s.deleteFromDocument();s.getRangeAt(0).insertNode(document.createTextNode(r)),s.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)(n.Button,{variant:"primary",className:"jetpack-ai-image-generator__prompt-submit",onClick:o,disabled:r,children:i||__("Generate","jetpack")})]})},j=({initialPrompt:e=""})=>{const{tracks:t}=(0,r.st)(),{recordEvent:s}=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:$,guessStyle:G}=(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),s(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)(()=>{$&&$.length>0?(M([$.find(({value:e})=>e===d.Hu),$.find(({value:e})=>e===d.Wp),...$.filter(({value:e})=>![d.Hu,d.Wp].includes(e))].filter(e=>e)),T(!0),P(d.Hu)):(M([]),T(!1),P(null))},[$]);const se=(0,u.useCallback)(async()=>{if(y(V),B===d.Wp){D(!0),s(h.Tk,{context:V,tool:"image"});const e=await G(l)||d.Hu;P(e),s(h.vm,{context:V,tool:"image",style:e}),D(!1),L({prompt:l,style:e})}else s(h.vm,{context:V,tool:"image",style:B}),L({prompt:l,style:B})},[V,L,l,B]),re=(0,u.useCallback)(e=>{y("change style",e),P(e),s(h.UO,{context:V,style:e})},[V,P,s]);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)(n.Button,{variant:"link",disabled:F||H||!E,onClick:Y,children:[(0,k.jsx)(p.A,{}),J]})}),N&&(0,k.jsx)(n.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:B,options:I,onChange:re,disabled:F||H})]}),(0,k.jsx)(x,{prompt:l,setPrompt:c,generateHandler:se,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: %d is the number of requests __("%d requests remaining.","jetpack"),j)}),S&&(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(n.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{s(h.AN,{context:V,placement:h.Cn})},children:(0,k.jsx)("span",{children:__("Upgrade","jetpack")})})]})," ",(0,k.jsx)(n.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,s){"use strict";s.d(t,{G:()=>h});var r=s(85985),n=s(56427),o=s(86087),a=s(27723),i=s(13109),l=s(84699),c=s(61356),u=s(60674),d=s(88725),p=(s(58275),s(10790));const __=a.__,h=()=>{const{tracks:e}=(0,r.st)(),{recordEvent:t}=e,s=__("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)(n.Button,{href:h,target:"_blank",className:"is-primary",onClick:()=>{t(c.AN,{context:m,placement:c.tF})},children:(0,p.jsx)("span",{children:s})})]})})}},35421(e,t,s){"use strict";s.d(t,{R:()=>u});var r=s(3924),n=s(85985),o=s(56427),a=s(27723),i=s(61356),l=s(88725),c=s(10790);const __=a.__,u=({onCancel:e,upgradeURL:t,reason:s})=>{const{tracks:a}=(0,n.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,r.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"===s?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,s){"use strict";s.d(t,{H:()=>c});var r=s(56427),n=s(27723),o=s(1866),a=s(13022),i=s(36791),l=(s(86263),s(10790));const __=n.__,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)(r.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)(r.Icon,{icon:o.A,size:20})]})})]})]})},61356(e,t,s){"use strict";s.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:()=>r,tF:()=>g,ub:()=>n,vm:()=>o});const r="jetpack_ai_logo_generator_modal_open",n="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,s){"use strict";s.d(t,{Q:()=>i});var r=s(97999),n=s(85985),o=s(47143),a=s(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}},[]),s=!(0,r.isWpcomPlatformSite)(),i=s?"jetpack-ai-upgrade-url-for-jetpack-sites":"jetpack-ai-yearly-tier-upgrade-nudge",l=(0,n.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"),s||u.searchParams.set("query",`redirect_to=${encodeURIComponent(c)}`);return{nextTierCheckoutURL:u.toString(),hasNextTier:!!e}}},78867(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(3924),n=s(47143),o=s(86087),a=s(27723),i=s(74423),l=s(10790);const __=a.__,c=()=>{const{usagePeriod:e}=(0,n.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 s=__("Requests will reset on %s.","jetpack");return`${t} ${(0,a.sprintf)(s,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),s=(0,r.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,o.createInterpolateElement)(t,{link:(0,l.jsx)("a",{href:s,target:"_blank",rel:"noreferrer"}),span:(0,l.jsx)("span",{})})}},88725(e,t,s){"use strict";s.d(t,{A:()=>f});var r=s(47143),n=s(10067),o=s.n(n),a=s(51609),i=s(31439),l=s(62614),c=s(93869),u=s(51391),d=s(19362),p=s(28229),h=s(74423),m=s(44461);const g=o()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:s,setIsRequestingImage:n,setIsEnhancingPrompt:o,increaseAiAssistantRequestsCount:f,addLogoToHistory:b,setContext:v,setIsLoadingHistory:k}=(0,r.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,r.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,$=N(q),G=$?.costs?.["jetpack-ai-logo-generator"]?.logo,W=$?.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},s="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",r={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},n=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(t)}).then(e=>e.json());return n?.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 s=Z.find(({value:t})=>t===e);return s?s.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 s=await(0,u.A)();if(!s||!s.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 r={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(r)}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 s={mediaId:0,mediaURL:""};t(!0);const{id:r,url:n}=await z(e.url,"site-logo.png");return s.mediaId=parseInt(r),s.mediaURL=n,s}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),s(!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{s(!1)}},[j,s,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"),n(!0);try{if(!G)throw new Error("Missing cost information");let s;f(G);try{if(s=await Y({prompt:e,style:t}),!s||!s.data.length)throw new Error("No image returned")}catch(e){throw f(-G),e}const r=s.data[0].revised_prompt||null,n={url:"data:image/png;base64,"+s.data[0].b64_json,description:e,revisedPrompt:r};try{const t=await Q(n);ee({url:t.mediaURL,description:e,mediaId:t.mediaId,revisedPrompt:r})}catch(e){throw ee(n),e}}finally{n(!1)}},[G,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 s={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},r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",n={Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},o=await fetch(r,{method:"POST",headers:n,body:JSON.stringify(s)}).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:n,setIsSavingLogoToLibrary:t,setIsApplyingLogo:s,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,s){"use strict";s.d(t,{A:()=>o});var r=s(47143),n=s(74423);const o=()=>{const{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:s,setLogoFetchError:o,setSaveToLibraryError:a,setLogoUpdateError:i}=(0,r.useDispatch)(n.E),{featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}=(0,r.useSelect)(e=>{const t=e(n.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:s,setLogoFetchError:o,setSaveToLibraryError:a,setLogoUpdateError:i,clearErrors:()=>{e(null),t(null),s(null),o(null),a(null),i(null)},featureFetchError:l,firstLogoPromptFetchError:c,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}}},23101(e,t,s){"use strict";s.d(t,{K:()=>n.K,T:()=>r.T});var r=s(64537),n=s(11114)},19362(e,t,s){"use strict";s.d(t,{$t:()=>a,H:()=>o,NP:()=>i,Pv:()=>l,hm:()=>n});var r=s(13858);function n({siteId:e,url:t,description:s,mediaId:r,revisedPrompt:n}){const o=a(e),i={url:t,description:s,mediaId:r,revisedPrompt:n};return o.push(i),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-10))),i}function o({siteId:e,url:t,newUrl:s,mediaId:r,rating:n}){const o=a(e),i=o.findIndex(e=>e.url===t);return i>-1&&(o[i].url=s,o[i].mediaId=r,o[i].rating=n),localStorage.setItem(`logo-history-${e}`,JSON.stringify(o.slice(-10))),o[i]}function a(e){const t=localStorage.getItem(`logo-history-${e}`);let s=t?JSON.parse(t):[];return Array.isArray(s)||(s=[]),s=s.slice(-10),s=s.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})),s}function i(e){return 0===a(e).length}async function l(e){const t=a(e).filter(({mediaId:e})=>void 0!==e).map(({mediaId:t})=>new Promise((s,n)=>{(0,r.T)({siteId:e,mediaId:t}).then(e=>s({mediaId:t,exists:e})).catch(e=>n(e))}));try{(await Promise.all(t)).filter(({exists:e})=>!e).forEach(({mediaId:t})=>function({siteId:e,mediaId:t}){const s=a(e),r=s.findIndex(e=>e.mediaId===t);-1!==r&&(s.splice(r,1),localStorage.setItem(`logo-history-${e}`,JSON.stringify(s)))}({siteId:e,mediaId:t}))}catch{}}},13858(e,t,s){"use strict";s.d(t,{T:()=>n});var r=s(48931);async function n({mediaId:e}){const t=Number(e);if(Number.isNaN(t))return!1;try{return await(0,r.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,s){"use strict";s.d(t,{Z:()=>n});var r=s(22746);async function n({siteId:e,imageId:t}){const s={site_logo:t,site_icon:t};return(0,r.A)({path:`/sites/${String(e)}/settings`,apiVersion:"v2",apiNamespace:"wp/v2",body:s,query:"source=jetpack-ai",method:"POST"})}},22746(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(48931);let n=0;async function o(e){if(n+=1,n>5)throw n-=1,new Error("Too many requests");return(0,r.A)(e).finally(()=>{n-=1})}},9624(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(19362),n=s(22746),o=s(9938);const a={storeAiAssistantFeature:e=>({type:o.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:o.ql});try{const t=await(0,n.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,r.$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,s){"use strict";s.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:()=>r,ZI:()=>y,c1:()=>i,gG:()=>_,hY:()=>x,kZ:()=>p,mx:()=>d,nb:()=>u,q_:()=>C,ql:()=>n,r_:()=>b,sG:()=>m,vk:()=>v,x0:()=>A});const r="STORE_AI_ASSISTANT_FEATURE",n="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,s){"use strict";s.d(t,{E:()=>i});var r=s(47143),n=s(9624),o=s(23695),a=s(80037);const i="jetpack-ai/logo-generator",l=(0,r.createReduxStore)(i,{__experimentalUseThunks:!0,actions:n.A,reducer:o.A,selectors:a.A});(0,r.register)(l)},94891(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(9938);const n={siteDetails:{},features:{aiAssistantFeature:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:r.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:r.mx,asyncRequestTimerId:0,isRequestingImage:!1},featuresControl:{"logo-generator":{enabled:!1,styles:[]}}}},history:[],selectedLogoIndex:0}},23695(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(61356),n=s(9938),o=s(94891);function a(e=o.A,t){switch(t.type){case n.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:n.mx,asyncRequestTimerId:0}}}};case n.UU:{const s={"jetpack-ai-logo-generator":{logo:r._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:s,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case n.Lg:{const s=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},r=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);s.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||n.GB;i?l=n.nb:a&&(l=e?.features?.aiAssistantFeature?.requestsLimit);const c=(i||a?r: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:r,requireUpgrade:u,usagePeriod:{...s}}}}}case n.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case n.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case n.Bz:return{...e,siteDetails:t.siteDetails};case n.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case n.sG:{const s=[...e.history,t.logo];return{...e,history:s,selectedLogoIndex:s.length-1}}case n.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case n.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case n.r_:{const s=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...s,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case n.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case n.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case n.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case n.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case n.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case n.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case n.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case n.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case n.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case n.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case n.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},80037(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(61356);const n={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=>n.getIsApplyingLogo(e)||n.getIsSavingLogoToLibrary(e)||n.getIsRequestingImage(e)||n.getIsEnhancingPrompt(e),getRequireUpgrade(e){const t=e.features.aiAssistantFeature;if(!t?.tierPlansEnabled)return t?.requireUpgrade;const s=t?.costs?.["jetpack-ai-logo-generator"]?.logo??r._S,n=t?.currentTier?.value||0,o=t?.usagePeriod?.requestsCount||0,a=1===n,i=!t?.nextTier;return e.features.aiAssistantFeature?.requireUpgrade||!a&&!i&&n-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=n},53664(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(7675),n=s(10067),o=s.n(n),a=s(46219),i=s(51391),l=s(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:s,options:n={}}){if(!s)try{c("Token was not provided, requesting one..."),s=(await(0,i.A)()).token}catch(e){return void this.processErrorEvent(e)}const o={};if(Number.isInteger(parseInt(n.postId))&&(o.post_id=+n.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");n?.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,n?.feature?.length&&(c("Feature: %o",n.feature),o.feature=n.feature),n?.functions?.length&&(c("Functions: %o",n.functions),o.functions=n.functions),n?.model?.length&&(c("Model: %o",n.model),o.model=n.model),n?.languageCode?.length&&(c("Language: %o",n.languageCode),o.language_code=n.languageCode),this.errorUnclearPromptTriggered=!1,await(0,r.y)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+s},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:s}=t?.choices?.[0]??{delta:{content:null,function_call:null}},r=s.content,n=s.function_call;r&&(this.fullMessage+=r,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:r})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),n&&(null!=n.name&&(this.fullFunctionCall.name+=n.name),null!=n.arguments&&(this.fullFunctionCall.arguments+=n.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,s){"use strict";s.d(t,{AZ:()=>n,L9:()=>c,Np:()=>d,Or:()=>o,cT:()=>i,mA:()=>l,uH:()=>r.u,ud:()=>a,zn:()=>u});var r=s(97784);const n="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"},90372(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(10067);const n=s.n(r)()("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,s){i.setUser(e,t),i.setSuperProps(s),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 s=function(e,t){let s="";if("object"==typeof e){for(const t in e)s+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);n("Bumping stats %o",e)}else s="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),n('Bumping stat "%s" in group "%s"',t,e);return s}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+s+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const s=function(e,t){let s="";if("object"==typeof e){for(const t in e)s+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);n("Built stats %o",e)}else s="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),n('Built stat "%s" in group "%s"',t,e);return s}(e,t);i.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+s+"&t="+Math.random())}},pageView:{record:function(e,t){i.tracks.recordPageView(e),i.ga.recordPageView(e,t)}},purchase:{record:function(e,t,s,r,n,o,a){i.ga.recordPurchase(e,t,s,r,n,o,a)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),o&&(n("- Super Props: %o",o),t=Object.assign(t,o)),n('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):n('- 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){n("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(),n("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,s,r){i.ga.initialize();let o="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==s&&(o+=" [Option Label: "+s+"]"),void 0!==r&&(o+=" [Option Value: "+r+"]"),n(o),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,s,r)},recordPurchase:function(e,t,s,r,n,o,a){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:a}),window.ga("ecommerce:addItem",{id:e,name:t,sku:s,price:n,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},5932(e,t,s){"use strict";s.d(t,{Ay:()=>d});var r=s(56439),n=s(93832);function o(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const a=o("JsonParseError"),i=o("JsonParseAfterRedirectError"),l=o("Api404Error"),c=o("Api404AfterRedirectError"),u=o("FetchNetworkError");const d=new function(e,t){let s=e,o=e,a={"X-WP-Nonce":t},i={credentials:"same-origin",headers:a},l={method:"post",credentials:"same-origin",headers:Object.assign({},a,{"Content-type":"application/json"})},c=function(e){const t=e.split("?"),s=t.length>1?t[1]:"",r=s.length?s.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){s=e},setWpcomOriginApiUrl(e){o=e},setApiNonce(e){a={"X-WP-Nonce":e},i={credentials:"same-origin",headers:a},l={method:"post",credentials:"same-origin",headers:Object.assign({},a,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{c=e},registerSite:(e,t,n)=>{const o={};return(0,r.jetpackConfigHas)("consumer_slug")&&(o.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(o.redirect_uri=t),n&&(o.from=n),m(`${s}jetpack/v4/connection/register`,l,{body:JSON.stringify(o)}).then(p).then(h)},fetchAuthorizationUrl:e=>d((0,n.addQueryArgs)(`${s}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),i).then(p).then(h),fetchSiteConnectionData:()=>d(`${s}jetpack/v4/connection/data`,i).then(h),fetchSiteConnectionStatus:()=>d(`${s}jetpack/v4/connection`,i).then(h),fetchSiteConnectionTest:()=>d(`${s}jetpack/v4/connection/test`,i).then(p).then(h),fetchUserConnectionData:()=>d(`${s}jetpack/v4/connection/data`,i).then(h),fetchUserTrackingSettings:()=>d(`${s}jetpack/v4/tracking/settings`,i).then(p).then(h),updateUserTrackingSettings:e=>m(`${s}jetpack/v4/tracking/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),disconnectSite:()=>m(`${s}jetpack/v4/connection`,l,{body:JSON.stringify({isActive:!1})}).then(p).then(h),fetchConnectUrl:()=>d(`${s}jetpack/v4/connection/url`,i).then(p).then(h),unlinkUser:(e=!1,t={})=>{const r={linked:!1,force:!!e};return t.disconnectAllUsers&&(r["disconnect-all-users"]=!0),m(`${s}jetpack/v4/connection/user`,l,{body:JSON.stringify(r)}).then(p).then(h)},reconnect:()=>m(`${s}jetpack/v4/connection/reconnect`,l).then(p).then(h),fetchConnectedPlugins:()=>d(`${s}jetpack/v4/connection/plugins`,i).then(p).then(h),setHasSeenWCConnectionModal:()=>m(`${s}jetpack/v4/seen-wc-connection-modal`,l).then(p).then(h),fetchModules:()=>d(`${s}jetpack/v4/module/all`,i).then(p).then(h),fetchModule:e=>d(`${s}jetpack/v4/module/${e}`,i).then(p).then(h),activateModule:e=>m(`${s}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!0})}).then(p).then(h),deactivateModule:e=>m(`${s}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>m(`${s}jetpack/v4/module/${e}`,l,{body:JSON.stringify(t)}).then(p).then(h),updateSettings:e=>m(`${s}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),getProtectCount:()=>d(`${s}jetpack/v4/module/protect/data`,i).then(p).then(h),resetOptions:e=>m(`${s}jetpack/v4/options/${e}`,l,{body:JSON.stringify({reset:!0})}).then(p).then(h),activateVaultPress:()=>m(`${s}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(h),getVaultPressData:()=>d(`${s}jetpack/v4/module/vaultpress/data`,i).then(p).then(h),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),m(`${s}jetpack/v4/plugins`,l,{body:JSON.stringify(r)}).then(p).then(h)},activateAkismet:()=>m(`${s}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(h),getAkismetData:()=>d(`${s}jetpack/v4/module/akismet/data`,i).then(p).then(h),checkAkismetKey:()=>d(`${s}jetpack/v4/module/akismet/key/check`,i).then(p).then(h),checkAkismetKeyTyped:e=>m(`${s}jetpack/v4/module/akismet/key/check`,l,{body:JSON.stringify({api_key:e})}).then(p).then(h),getFeatureTypeStatus:e=>d(`${s}jetpack/v4/feature/${e}`,i).then(p).then(h),fetchStatsData:e=>d(function(e){let t=`${s}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),i).then(p).then(h).then(f),getPluginUpdates:()=>d(`${s}jetpack/v4/updates/plugins`,i).then(p).then(h),getPlans:()=>d(`${s}jetpack/v4/plans`,i).then(p).then(h),fetchSettings:()=>d(`${s}jetpack/v4/settings`,i).then(p).then(h),updateSetting:e=>m(`${s}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),fetchSiteData:()=>d(`${s}jetpack/v4/site`,i).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteFeatures:()=>d(`${s}jetpack/v4/site/features`,i).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteProducts:()=>d(`${s}jetpack/v4/site/products`,i).then(p).then(h),fetchSitePurchases:()=>d(`${s}jetpack/v4/site/purchases`,i).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteBenefits:()=>d(`${s}jetpack/v4/site/benefits`,i).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteDiscount:()=>d(`${s}jetpack/v4/site/discount`,i).then(p).then(h).then(e=>e.data),fetchSetupQuestionnaire:()=>d(`${s}jetpack/v4/setup/questionnaire`,i).then(p).then(h),fetchRecommendationsData:()=>d(`${s}jetpack/v4/recommendations/data`,i).then(p).then(h),fetchRecommendationsProductSuggestions:()=>d(`${s}jetpack/v4/recommendations/product-suggestions`,i).then(p).then(h),fetchRecommendationsUpsell:()=>d(`${s}jetpack/v4/recommendations/upsell`,i).then(p).then(h),fetchRecommendationsConditional:()=>d(`${s}jetpack/v4/recommendations/conditional`,i).then(p).then(h),saveRecommendationsData:e=>m(`${s}jetpack/v4/recommendations/data`,l,{body:JSON.stringify({data:e})}).then(p),fetchProducts:()=>d(`${s}jetpack/v4/products`,i).then(p).then(h),fetchRewindStatus:()=>d(`${s}jetpack/v4/rewind`,i).then(p).then(h).then(e=>JSON.parse(e.data)),fetchScanStatus:()=>d(`${s}jetpack/v4/scan`,i).then(p).then(h).then(e=>JSON.parse(e.data)),dismissJetpackNotice:e=>m(`${s}jetpack/v4/notice/${e}`,l,{body:JSON.stringify({dismissed:!0})}).then(p).then(h),fetchPluginsData:()=>d(`${s}jetpack/v4/plugins`,i).then(p).then(h),fetchIntroOffers:()=>d(`${s}jetpack/v4/intro-offers`,i).then(p).then(h),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${s}jetpack/v4/verify-site/google/${e}`:`${s}jetpack/v4/verify-site/google`,i).then(p).then(h),verifySiteGoogle:e=>m(`${s}jetpack/v4/verify-site/google`,l,{body:JSON.stringify({keyring_id:e})}).then(p).then(h),submitSurvey:e=>m(`${s}jetpack/v4/marketing/survey`,l,{body:JSON.stringify(e)}).then(p).then(h),saveSetupQuestionnaire:e=>m(`${s}jetpack/v4/setup/questionnaire`,l,{body:JSON.stringify(e)}).then(p).then(h),updateLicensingError:e=>m(`${s}jetpack/v4/licensing/error`,l,{body:JSON.stringify(e)}).then(p).then(h),updateLicenseKey:e=>m(`${s}jetpack/v4/licensing/set-license`,l,{body:JSON.stringify({license:e})}).then(p).then(h),getUserLicensesCounts:()=>d(`${s}jetpack/v4/licensing/user/counts`,i).then(p).then(h),getUserLicenses:()=>d(`${s}jetpack/v4/licensing/user/licenses`,i).then(p).then(h),updateLicensingActivationNoticeDismiss:e=>m(`${s}jetpack/v4/licensing/user/activation-notice-dismiss`,l,{body:JSON.stringify({last_detached_count:e})}).then(p).then(h),updateRecommendationsStep:e=>m(`${s}jetpack/v4/recommendations/step`,l,{body:JSON.stringify({step:e})}).then(p),confirmIDCSafeMode:()=>m(`${s}jetpack/v4/identity-crisis/confirm-safe-mode`,l).then(p),startIDCFresh:e=>m(`${s}jetpack/v4/identity-crisis/start-fresh`,l,{body:JSON.stringify({redirect_uri:e})}).then(p).then(h),migrateIDC:()=>m(`${s}jetpack/v4/identity-crisis/migrate`,l).then(p),attachLicenses:e=>m(`${s}jetpack/v4/licensing/attach-licenses`,l,{body:JSON.stringify({licenses:e})}).then(p).then(h),fetchSearchPlanInfo:()=>d(`${o}jetpack/v4/search/plan`,i).then(p).then(h),fetchSearchSettings:()=>d(`${o}jetpack/v4/search/settings`,i).then(p).then(h),updateSearchSettings:e=>m(`${o}jetpack/v4/search/settings`,l,{body:JSON.stringify(e)}).then(p).then(h),fetchSearchStats:()=>d(`${o}jetpack/v4/search/stats`,i).then(p).then(h),fetchWafSettings:()=>d(`${s}jetpack/v4/waf`,i).then(p).then(h),updateWafSettings:e=>m(`${s}jetpack/v4/waf`,l,{body:JSON.stringify(e)}).then(p).then(h),fetchWordAdsSettings:()=>d(`${s}jetpack/v4/wordads/settings`,i).then(p).then(h),updateWordAdsSettings:e=>m(`${s}jetpack/v4/wordads/settings`,l,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${o}jetpack/v4/search/pricing`,i).then(p).then(h),fetchMigrationStatus:()=>d(`${s}jetpack/v4/migration/status`,i).then(p).then(h),fetchBackupUndoEvent:()=>d(`${s}jetpack/v4/site/backup/undo-event`,i).then(p).then(h),fetchBackupPreflightStatus:()=>d(`${s}jetpack/v4/site/backup/preflight`,i).then(p).then(h)};function d(e,t){return fetch(c(e),t)}function m(e,t,s){return fetch(e,Object.assign({},t,s)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise(()=>{throw e.redirected?new c(e.redirected):new l}):e.json().catch(e=>m(e)).then(t=>{const s=new Error(`${t.message} (Status ${e.status})`);throw s.response=t,s.name="ApiError",s})}function h(e){return e.json().catch(t=>m(t,e.redirected,e.url))}function m(e,t,s){throw t?new i(s):new a}function g(){throw new u}},51112(e,t,s){"use strict";s.d(t,{A:()=>p});var r=s(56427),n=s(27723),o=s(13109),a=s(1866),i=s(13022),l=s(51609),c=s(85488),u=s(10790);const __=n.__,d=(0,l.forwardRef)((e,t)=>{const{children:s,variant:n="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)&&!s}),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)(r.VisuallyHidden,{as:"span",children:/* translators: accessibility text */ __("(opens in a new tab)","jetpack")})]}),C=b?"_blank":void 0,A=s?.[0]&&null!==s[0]&&"components-tooltip"!==s?.[0]?.props?.className,S={ref:t,target:C,variant:n,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};return(0,u.jsxs)(r.Button,{...S,children:[f&&(0,u.jsx)(r.Spinner,{}),(0,u.jsx)("span",{children:s}),_]})});d.displayName="Button";const p=d},69222(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(29491),n=s(86087),o=s(27723),a=s(51112),i=s(78478),l=s(10790);const __=o.__,c=({buttonStyle:e="icon",textToCopy:t,onCopy:s,...o})=>{const[c,u]=(0,n.useState)(!1),d=(0,n.useRef)(),p=(0,r.useCopyToClipboard)(t,()=>{d.current&&clearTimeout(d.current),u(!0),s?.(),d.current=setTimeout(()=>{u(!1),d.current=void 0},3e3)});(0,n.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,s){"use strict";s.d(t,{Nr:()=>l,ui:()=>c});var r=s(56427),n=s(13022),o=(s(84705),s(56058)),a=s(10790);const i=({className:e,size:t=24,viewBox:s="0 0 24 24",opacity:i=1,color:l="#2C3338",children:c})=>{const u={className:(0,n.A)(o.A.iconWrapper,e),width:t,height:t,viewBox:s,opacity:i,fill:void 0};return l&&(u.fill=l),(0,a.jsx)(r.SVG,{...u,fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.G,{opacity:i,children:c})})},l=({size:e,className:t=o.A["checkmark-icon"],color:s})=>(0,a.jsx)(i,{className:t,size:e,color:s,children:(0,a.jsx)(r.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:s})=>(0,a.jsx)(i,{className:t,size:e,color:s,children:(0,a.jsx)(r.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,s){"use strict";s.d(t,{A:()=>a});var r=s(27723),n=s(13022),o=s(10790);const __=r.__,a=({logoColor:e="#069e08",showText:t=!0,className:s,height:r=32,title:a,...i})=>{const l=t?"0 0 118 32":"0 0 32 32",c=a??__("Jetpack Logo","jetpack");return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:l,className:(0,n.A)("jetpack-logo",s),"aria-labelledby":"jetpack-logo-title",height:r,...i,role:"img",children:[(0,o.jsx)("title",{id:"jetpack-logo-title",children:c}),(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,s){"use strict";s.d(t,{A:()=>a});var r=s(29491),n=s(39029);const o=["sm","md","lg"],a=(e,t)=>{const s=Array.isArray(e)?e:[e],a=Array.isArray(t)?t:[t],[i,l,c]=o,u={sm:(0,r.useMediaQuery)(n.A[i]),md:(0,r.useMediaQuery)(n.A[l]),lg:(0,r.useMediaQuery)(n.A[c])};return s.map((e,t)=>{const s=a[t];return s?((e,t,s)=>{const r=o.indexOf(e),n=r+1,a=t.includes("=");let i=[];return t.startsWith("<")&&(i=o.slice(0,a?n:r)),t.startsWith(">")&&(i=o.slice(a?r:n)),i?.length?i.some(e=>s[e]):s[e]})(e,s,u):u[e]})}},11876(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(13022),n=s(13372),o=s(10790);const a=({children:e=null,width:t=null,height:s=null,className:a=""})=>(0,o.jsx)("div",{className:(0,r.A)(n.A.placeholder,a),style:{width:t,height:s},children:e})},36281(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(86221),n=s(10790);const o=({value:e="https://jetpack.com",size:t=248,bgColor:s,fgColor:o,level:a,includeMargin:i,imageSettings:l,renderAs:c="canvas"})=>{const u={value:e,size:t,bgColor:s,fgColor:o,level:a,includeMargin:i,imageSettings:l};return"svg"===c?(0,n.jsx)(r.h,{...u}):(0,n.jsx)(r.X,{...u})}},50723(e,t,s){"use strict";s.d(t,{Ay:()=>p});var r=s(51609),n=s(74116),o=s(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,s)=>{const r={...a,...i,...l,...c};for(const t in r)e.style.setProperty(t,r[t]);s&&e.classList.add(n.A.global),t&&(u[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:s,withGlobalStyles:n=!0})=>{const a=(0,r.useRef)(),i=u?.[s]?.provided;return(0,r.useLayoutEffect)(()=>{if(!i)return t?d(t,s,n):void(a?.current&&d(a.current,s,n))},[t,a,i,s,n]),t?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)("div",{ref:a,children:e})}},3924(e,t,s){"use strict";function r(e,t={}){const s={};let r;if("undefined"!=typeof window&&(r=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,s.url=encodeURIComponent(e)}else s.source=encodeURIComponent(e);for(const e in t)s[e]=encodeURIComponent(t[e]);!Object.keys(s).includes("site")&&"undefined"!=typeof jetpack_redirects&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(s.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),r&&(s.calypso_env=r);return"https://jetpack.com/redirect/?"+Object.keys(s).map(e=>e+"="+s[e]).join("&")}s.d(t,{A:()=>r})},56439(e,t,s){let r={};try{r=s(74277)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const n=e=>Object.hasOwn(r,e);e.exports={jetpackConfigHas:n,jetpackConfigGet:e=>{if(!n(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},14882(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(5932),n=s(97999),o=s(47143),a=s(51609),i=s(34293);const l=window?.JP_CONNECTION_INITIAL_STATE||(0,n.getScriptData)()?.connection||{};function c({registrationNonce:e=l.registrationNonce,apiRoot:t=l.apiRoot,apiNonce:s=l.apiNonce,redirectUri:n,autoTrigger:c,from:u,skipUserConnection:d,skipPricingPage:p}={}){const{registerSite:h,connectUser:m,refreshConnectedPlugins:g}=(0,o.useDispatch)(i.a),f=(0,o.useSelect)(e=>e(i.a).getRegistrationError(),[]),{siteIsRegistering:b,userIsConnecting:v,userConnectionData:k,connectedPlugins:y,connectionErrors:x,isRegistered:j,isUserConnected:w,hasConnectedOwner:_,isOfflineMode:C}=(0,o.useSelect)(e=>{const t=e(i.a).getConnectionStatus();return{siteIsRegistering:e(i.a).getSiteIsRegistering(),userIsConnecting:e(i.a).getUserIsConnecting(),userConnectionData:e(i.a).getUserConnectionData()||{},connectedPlugins:e(i.a).getConnectedPlugins(),connectionErrors:e(i.a).getConnectionErrors(),isOfflineMode:e(i.a).getIsOfflineMode(),isRegistered:t.isRegistered??!1,isUserConnected:t.isUserConnected??!1,hasConnectedOwner:t.hasConnectedOwner??!1}},[]),A=()=>d?n?(window.location.href=n,Promise.resolve(n)):Promise.resolve():m({from:u,redirectUri:n,skipPricingPage:p}),S=t=>(t&&t.preventDefault(),j?A():h({registrationNonce:e,redirectUri:n,from:u}).then(()=>A()));return(0,a.useEffect)(()=>{r.Ay.setApiRoot(t),r.Ay.setApiNonce(s)},[t,s]),(0,a.useEffect)(()=>{!c||b||v||S()},[]),{handleRegisterSite:S,handleConnectUser:A,refreshConnectedPlugins:g,isRegistered:j,isUserConnected:w,siteIsRegistering:b,userIsConnecting:v,registrationError:f,userConnectionData:k,hasConnectedOwner:_,connectedPlugins:y,connectionErrors:x,isOfflineMode:C}}},33935(e,t,s){"use strict";s.d(t,{A1:()=>l,Ay:()=>j,DO:()=>i,Ij:()=>a,Kl:()=>h,LW:()=>c,MU:()=>m,XY:()=>u,ZO:()=>o,dz:()=>d,gH:()=>p,v_:()=>n});var r=s(5932);const n="SET_CONNECTION_STATUS",o="SET_CONNECTION_STATUS_IS_FETCHING",a="SET_SITE_IS_REGISTERING",i="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",c="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",d="DISCONNECT_USER_SUCCESS",p="SET_CONNECTED_PLUGINS",h="SET_CONNECTION_ERRORS",m="SET_IS_OFFLINE_MODE",g=e=>({type:n,connectionStatus:e}),f=e=>({type:a,isRegistering:e}),b=e=>({type:i,isConnecting:e}),v=e=>({type:l,registrationError:e}),k=()=>({type:c}),y=e=>({type:u,authorizationUrl:e}),x=e=>({type:p,connectedPlugins:e});const j={setConnectionStatus:g,setConnectionStatusIsFetching:e=>({type:o,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:f,setUserIsConnecting:b,setRegistrationError:v,clearRegistrationError:k,setAuthorizationUrl:y,registerSite:function*({registrationNonce:e,redirectUri:t,from:s=""}){yield k(),yield f(!0);try{const r=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t,from:s};return yield g({isRegistered:!0}),yield y(r.authorizeUrl),yield f(!1),Promise.resolve(r)}catch(e){return yield v(e),yield f(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:s,skipPricingPage:r}={}){yield b(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:s,skipPricingPage:r}},disconnectUserSuccess:()=>({type:d}),setConnectedPlugins:x,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise(t=>r.Ay.fetchConnectedPlugins().then(s=>{e(x(s)),t(s)})),setConnectionErrors:e=>({type:h,connectionErrors:e}),setIsOfflineMode:e=>({type:m,isOfflineMode:e})}},27938(e,t,s){"use strict";function r(e){return window.location.assign(e)}s.d(t,{d:()=>r})},22494(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(5932),n=s(47143),o=s(27938),a=s(32279);const i={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>r.Ay.fetchAuthorizationUrl(e),REGISTER_SITE:({redirectUri:e,from:t})=>r.Ay.registerSite(null,e,t),CONNECT_USER:(0,n.createRegistryControl)(({resolveSelect:e})=>({from:t,redirectFunc:s,redirectUri:r,skipPricingPage:n}={})=>new Promise((i,l)=>{e(a.A).getAuthorizationUrl(r).then(e=>{const r=s||(e=>(0,o.d)(e)),a=new URL(e);n&&a.searchParams.set("skip_pricing","true"),t&&a.searchParams.set("from",encodeURIComponent(t));const l=a.toString();r(l),i(l)}).catch(e=>{l(e)})}))}},5051(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(47143),n=s(33935);const o=(0,r.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case n.v_:return{...e,...t.connectionStatus};case n.dz:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===n.ZO?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===n.Ij?t.isRegistering:e,userIsConnecting:(e=!1,t)=>t.type===n.DO?t.isConnecting:e,registrationError:(e,t)=>{switch(t.type){case n.LW:return!1;case n.A1:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===n.XY?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:(e={},t)=>t.type===n.gH?t.connectedPlugins:e,connectionErrors:(e={},t)=>t.type===n.Kl?t.connectionErrors:e,isOfflineMode:(e=!1,t)=>t.type===n.MU?t.isConnecting:e})},58019(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(47143),n=s(33935),o=s(32279);const a={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const s=Boolean(e.authorizationUrl),n=(0,r.select)(o.A).hasFinishedResolution("getAuthorizationUrl",t);return s&&!n&&(0,r.dispatch)(o.A).finishResolution("getAuthorizationUrl",t),s},*fulfill(e){const t=yield n.Ay.fetchAuthorizationUrl(e);yield n.Ay.setAuthorizationUrl(t.authorizeUrl)}}}}},52676(e,t,s){"use strict";s.d(t,{A:()=>r});const r={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},18734(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(47143);class n{static store=null;static mayBeInit(e,t){null===n.store&&(n.store=(0,r.createReduxStore)(e,t),(0,r.register)(n.store))}}const o=n},32279(e,t,s){"use strict";s.d(t,{A:()=>r});const r="jetpack-connection"},34293(e,t,s){"use strict";s.d(t,{a:()=>u.A});var r=s(97999),n=s(33935),o=s(22494),a=s(5051),i=s(58019),l=s(52676),c=s(18734),u=s(32279);const d=window.JP_CONNECTION_INITIAL_STATE||(0,r.getScriptData)()?.connection;d||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),c.A.mayBeInit(u.A,{__experimentalUseThunks:!0,reducer:a.A,actions:n.Ay,selectors:l.A,resolvers:i.A,controls:o.A,initialState:d||{}})},63673(e,t,s){"use strict";s.d(t,{FALLBACK_CURRENCY:()=>n,FALLBACK_LOCALE:()=>r});s(38443);const r="en",n="USD"},11452(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(63673),n=s(49980),o=s(91167);const a=function(){let e,t;const s=()=>{const t="undefined"!=typeof window?window.wp?.date?.getSettings?.()?.l10n?.locale:void 0,s="undefined"!=typeof window?window?.navigator?.language:void 0;return(e??(t||s)??r.FALLBACK_LOCALE).split("_")[0]};return{setLocale:t=>{e=t},setGeoLocation:e=>{t=e},formatNumber:(e,{decimals:t=0,forceLatin:r=!0,numberFormatOptions:n={}}={})=>{try{return(0,o.j)({browserSafeLocale:s(),decimals:t,forceLatin:r,numberFormatOptions:n}).format(e)}catch{return String(e)}},formatNumberCompact:(e,{decimals:t=0,forceLatin:r=!0,numberFormatOptions:n={}}={})=>{try{return(0,o.c)({browserSafeLocale:s(),decimals:t,forceLatin:r,numberFormatOptions:n}).format(e)}catch{return String(e)}},formatCurrency:(e,r,{stripZeros:o=!1,isSmallestUnit:a=!1,signForPositive:i=!1,forceLatin:l=!0}={})=>(0,n.u)({number:e,currency:r,browserSafeLocale:s(),stripZeros:o,isSmallestUnit:a,signForPositive:i,geoLocation:t,forceLatin:l}),getCurrencyObject:(e,r,{stripZeros:o=!1,isSmallestUnit:a=!1,signForPositive:i=!1,forceLatin:l=!0}={})=>(0,n.v)({number:e,currency:r,browserSafeLocale:s(),stripZeros:o,isSmallestUnit:a,signForPositive:i,geoLocation:t,forceLatin:l})}}},3328(e,t,s){"use strict";s.d(t,{J:()=>l});var r=s(10067),n=s.n(r),o=s(63673);const a=n()("number-formatters:get-cached-formatter"),i=new Map;function l({locale:e,fallbackLocale:t=o.FALLBACK_LOCALE,options:s,retries:r=1}){const n=JSON.stringify([e,s]);try{return i.get(n)??i.set(n,new Intl.NumberFormat(e,s)).get(n)}catch(n){if(a(`Intl.NumberFormat was called with a non-existent locale "${e}"; falling back to ${t}`),r)return l({locale:t,options:s,retries:r-1});throw n}}},54268(e,t,s){"use strict";s.d(t,{ZV:()=>a,qe:()=>i,vv:()=>l});const r=(0,s(11452).A)(),{setLocale:n,setGeoLocation:o,formatNumber:a,formatNumberCompact:i,formatCurrency:l,getCurrencyObject:c}=r},76673(e,t,s){"use strict";s.d(t,{a:()=>r});const r={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,s){"use strict";s.d(t,{u:()=>g,v:()=>f});var r=s(10067),n=s.n(r),o=s(63673),a=s(3328),i=s(76673);const l=n()("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.FALLBACK_CURRENCY}`),o.FALLBACK_CURRENCY)}function d({number:e,currency:t,browserSafeLocale:s,forceLatin:r=!0,stripZeros:n,signForPositive:o}){const i=`${s}${r?"-u-nu-latn":""}`,l={style:"currency",currency:t,...n&&Number.isInteger(e)&&{maximumFractionDigits:0,minimumFractionDigits:0},...o&&{signDisplay:"exceptZero"}};return(0,a.J)({locale:i,options:l})}function p(e,t,s){return d({number:0,currency:t,browserSafeLocale:e,forceLatin:s}).resolvedOptions().maximumFractionDigits}function h(e,t){const s=Math.pow(10,t);return Math.round(e*s)/s}function m(e,t,s){if(isNaN(e))return l("formatCurrency was called with NaN"),0;if(s){Number.isInteger(e)||l("formatCurrency was called with isSmallestUnit and a float which will be rounded",e);const s=10**t;return h(Math.round(e)/s,t)}return h(e,t)}const g=({number:e,browserSafeLocale:t,currency:s,stripZeros:r,isSmallestUnit:n,signForPositive:o,geoLocation:a,forceLatin:i})=>{const l=u(s,a),h=c(l,a),g=p(t,l,i);if(n&&void 0===g)throw new Error(`Could not determine currency precision for ${l} in ${t}`);const f=m(e,g??0,n);return d({number:f,currency:l,browserSafeLocale:t,forceLatin:i,stripZeros:r,signForPositive:o}).formatToParts(f).reduce((e,t)=>"currency"===t.type&&h?.symbol?e+h.symbol:e+t.value,"")},f=({number:e,browserSafeLocale:t,currency:s,stripZeros:r,isSmallestUnit:n,signForPositive:o,geoLocation:a,forceLatin:i})=>{const l=u(s,a),h=c(l,a),g=m(e,p(t,l,i)??0,n),f=d({number:g,currency:l,browserSafeLocale:t,forceLatin:i,stripZeros:r,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:_,floatValue:g}}},91167(e,t,s){"use strict";s.d(t,{c:()=>o,j:()=>n});var r=s(3328);const n=({browserSafeLocale:e,decimals:t=0,forceLatin:s=!0,numberFormatOptions:n={}})=>{const o=`${e}${s?"-u-nu-latn":""}`,a={minimumFractionDigits:t,maximumFractionDigits:t,...n};return(0,r.J)({locale:o,options:a})},o=({numberFormatOptions:e={},...t})=>n({...t,numberFormatOptions:{notation:"compact",maximumFractionDigits:1,...e}})},85985(e,t,s){"use strict";s.d(t,{$i:()=>r.A,BT:()=>l.A,Bd:()=>h.Bd,CP:()=>v.C,Cq:()=>g.C,Dk:()=>c.Dk,FB:()=>a.A,GE:()=>n.A,GT:()=>c.GT,M_:()=>f.M,Mm:()=>b.A,Ti:()=>h.Ti,W4:()=>c.W4,ZR:()=>p.A,_6:()=>k.A,_X:()=>h._X,aq:()=>c.aq,ds:()=>h.ds,gB:()=>u.A,lk:()=>o.l,pP:()=>o.p,q7:()=>m.A,sH:()=>c.sH,sh:()=>g.s,st:()=>d.A,tu:()=>c.tu,vp:()=>i.A,xI:()=>v.x});var r=s(34972),n=s(54815),o=(s(41409),s(62634)),a=s(8573),i=s(82034),l=s(65595),c=s(53265),u=s(49354),d=s(73489),p=s(89581),h=s(20710),m=(s(58406),s(76923)),g=s(30335),f=s(88290),b=s(44360),v=s(9061),k=s(25929);s(5765)},5765(e,t,s){"use strict";s(98490)},82201(e,t,s){"use strict";s.d(t,{cb:()=>n.c,jt:()=>r.A,k4:()=>o.k});var r=s(15877),n=s(30984),o=s(82308)},15877(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(67142),n=s(97999),o=s(27723),a=(s(68071),s(10790));const __=o.__,i=()=>{const e=(0,n.getScriptData)()?.jetpack?.flags?.showJetpackBranding;return void 0===e||e?(0,a.jsx)(r.A,{className:"jetpack-editor-panel-logo",height:16,logoColor:"#1E1E1E",showText:!1,title:__("This feature is powered by Jetpack","jetpack")}):null}},30984(e,t,s){"use strict";s.d(t,{c:()=>i});var r=s(56427),n=s(27723),o=s(13022),a=(s(15016),s(10790));const __=n.__,i=({className:e,description:t,align:s=null,title:n=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":s,children:(0,a.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[n&&(0,a.jsx)("strong",{className:(0,o.A)("banner-title",{[`${e}__title`]:e}),children:n}),t&&(0,a.jsx)("span",{className:`${e}__description banner-description`,children:t}),h&&(0,a.jsx)(r.Button,{href:p?null:u,onClick:d,target:m,className:(0,o.A)("is-primary",{"jetpack-upgrade-plan__hidden":!u}),isBusy:p,children:(0,a.jsx)("span",{children:p?f:i})})]})})}},82308(e,t,s){"use strict";s.d(t,{k:()=>i});var r=s(56427),n=s(47143),o=s(51609),a=s(10790);const i=(0,o.forwardRef)(({supportLink:e,supportPostId:t,children:s,onClick:o,style:i},l)=>{const c=(0,n.useDispatch)("automattic/help-center"),u=c?.setShowSupportDoc;return u?(0,a.jsx)("a",{href:e,onClick:s=>{s.preventDefault(),o?.(),u(e,t)},style:i,ref:l,children:s}):(0,a.jsx)(r.ExternalLink,{href:e,onClick:o,style:i,ref:l,children:s})})},30335(e,t,s){"use strict";s.d(t,{C:()=>o,s:()=>n});var r=s(86087);function n(e){const t={};let s="span",n=e.icon;const o=document.createElement("div");o.innerHTML=e.icon;const a=o.querySelector("svg");return a&&(s="svg",n=a.innerHTML,Array.from(a.attributes).forEach(({nodeName:e,nodeValue:s})=>t[e]=s)),(0,r.createElement)(s,{...t,dangerouslySetInnerHTML:{__html:n||""}})}function o(e){return{src:n(e)}}},34972(e,t,s){"use strict";s.d(t,{A:()=>r});function r(){return"object"==typeof window?window?.Jetpack_Editor_Initial_State??null:null}},8573(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(34972);function n(e){const t=(0,r.A)(),s=t?.available_blocks?.[e]?.available??!1,n=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:s,...!s&&{details:t?.available_blocks?.[e]?.details??{},unavailableReason:n}}}},54815(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(97999);function n(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:(0,r.getScriptData)()?.site?.suffix??null}},73489(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(90372),n=s(14882),o=s(86087);const{tracks:a}=r.A,{recordEvent:i}=a,l=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:s="page_view",pageViewEventProperties:l={}}={})=>{const[c,u]=(0,o.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:h={}}=(0,n.A)(),{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&&r.A.initialize(g,m,{blog_id:f})},[f,g,m,d]),(0,o.useEffect)(()=>{const r=e?`${t}_${e}_${s}`:null;p&&r&&(c||(b(r,l),u(!0)))},[c,t,e,s,p,l,b]),{recordEvent:b,tracks:a}}},89581(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(47143),n=s(86087);const o=()=>{};function a(e=null,t=o){const[s,a]=(0,n.useState)(!1),{isAutosaveablePost:i,isDirtyPost:l,currentPost:c}=(0,r.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,r.useSelect)(e=>!!window.wp?.customize||!!e("core/edit-widgets")),p=(0,r.dispatch)("core/editor").savePost,h=(0,r.useSelect)(e=>e("core").__experimentalGetDirtyEntityRecords()),m=async e=>{e?.preventDefault(),u?l&&i&&await p(e):await(async()=>{for(let e=0;e{r?.preventDefault(),s||(a(!0),m(r).then(()=>{e&&function(e,t,s=!1){t&&t(e),s?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)}))},isRedirecting:s}}},76923(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(47143),n=s(86087),o=s(88290);const a=e=>{const{isModuleActive:t,isChangingStatus:s,isLoadingModules:a}=(0,r.useSelect)(t=>{const s=t(o.F);return{isModuleActive:s.isModuleActive(e),isChangingStatus:s.isModuleUpdating(e),isLoadingModules:s.areModulesLoading(e)}},[e]),{updateJetpackModuleStatus:i}=(0,r.useDispatch)(o.F),l=(0,n.useCallback)(t=>i({name:e,active:t}),[e,i]);return(0,n.useMemo)(()=>({isLoadingModules:a,isChangingStatus:s,isModuleActive:t,changeStatus:l}),[a,s,t,l])}},20710(e,t,s){"use strict";s.d(t,{Bd:()=>a,Ti:()=>o,_X:()=>r,ds:()=>n});const r="free",n="tiered",o="unlimited",a=e=>e?0===e?.value?r:1===e?.value?o:n:null},58406(e,t,s){"use strict";s(86087)},25929(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(47143),n=s(52619),o=s(53265),a=s(89581);const i=()=>{},l="a8c.wpcom-block-editor.openCheckoutModal";function c(e,t=i){const{checkoutUrl:s,planData:c}=(0,r.useSelect)(t=>{const s=t("core/editor"),r=t("wordpress-com/plans"),{id:n,type:a}=s.getCurrentPost(),i=r&&r.getPlan(e);return{checkoutUrl:(0,o.Q4)({plan:i,planSlug:e,postId:n,postType:a}),planData:i}},[e]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,a.A)(s,t);return[s,async e=>{if(e.preventDefault(),(0,n.hasAction)(l))return e.preventDefault(),u(e),void(0,n.doAction)(l,{products:[c]});d(e)},p,c]}},62410(e,t,s){"use strict";s.d(t,{KZ:()=>h,M4:()=>u,QB:()=>d,T3:()=>c,ik:()=>g,k7:()=>p,oW:()=>f,ud:()=>m,ux:()=>l});var r=s(38377),n=s(56427),o=s(13022),a=(s(1103),s(10790));const i=r.T["Jetpack Green 40"],l=({size:e=24,border:t=0,className:s="",color:r=i})=>{const l=t?-t/e*32:0;return(0,a.jsxs)(n.SVG,{className:(0,o.A)("jetpack-logo",s),width:e,height:e,viewBox:`${l} ${l} ${32-2*l} ${32-2*l}`,children:[(0,a.jsx)(n.Path,{className:"jetpack-logo__icon-circle",fill:r,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,a.jsx)(n.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*l},19 15,${3-l}`}),(0,a.jsx)(n.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+l} 17,13 ${25+.5*l},13`})]})},c={src:(0,a.jsx)(n.SVG,{viewBox:"0 0 100 100",children:(0,a.jsx)(n.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"})})},u={src:(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve",children:(0,a.jsx)(n.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"})})},d={src:(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve",children:(0,a.jsx)(n.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"})})},p=(n.SVG,n.Rect,n.G,n.Path,n.SVG,n.Rect,n.G,n.Path,n.SVG,n.Rect,n.G,n.Path,n.SVG,n.Rect,n.G,n.Path,n.Path,n.Path,n.SVG,n.Rect,n.G,n.Path,n.Path,n.Path,n.SVG,n.Path,n.SVG,n.Path,n.SVG,n.Path,(0,a.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(n.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)(n.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"})]})),h=(0,a.jsx)(n.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(n.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"})}),m=(0,a.jsx)(n.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(n.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"})}),g=(n.SVG,n.Path,n.SVG,n.Path,n.Path,n.SVG,n.Path,n.SVG,n.Path,(0,a.jsx)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(n.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"})})),f=(0,a.jsx)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(n.G,{children:(0,a.jsx)(n.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,s){"use strict";s.d(t,{A:()=>n});var r=s(34972);function n(){return!(!(0,r.A)()?.jetpack?.is_current_user_connected&&!window?.JP_CONNECTION_INITIAL_STATE?.connectionStatus?.isUserConnected)}},44360(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(34972);function n(){return!0===(0,r.A)()?.jetpack?.is_my_jetpack_available}},9520(e,t,s){"use strict";s.d(t,{C:()=>d,x:()=>u});var r=s(97999),n=s(10067),o=s.n(n);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,r.isSimpleSite)()?(c("Simple site connected ✅"),!0):(0,r.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,r.isSimpleSite)())return!0;return!1==!(a?.userConnectionData?.currentUser?.permissions??{}).manage_options}},9061(e,t,s){"use strict";s.d(t,{C:()=>r.C,x:()=>r.x});var r=s(9520)},27105(e,t,s){"use strict";s.d(t,{Ay:()=>u,E9:()=>c,F6:()=>i});var r=s(97999),n=s(47143),o=s(94478),a=s(88290);function i(e){return c({isLoading:e})}function l(e,t){return{type:"SET_MODULE_UPDATING",name:e,isUpdating:t}}function c(e){return{type:"SET_JETPACK_MODULES",options:e}}const u={updateJetpackModuleStatus:function*(e){try{yield l(e.name,!0),yield(0,o.sB)(e);const t=yield(0,o.wz)();return yield c({data:t}),!0}catch{const e=(0,n.select)(a.F).getJetpackModules();return yield c(e),!1}finally{yield l(e.name,!1)}},setJetpackModules:c,fetchModules:function*(){if((0,r.isSimpleSite)())return!0;try{yield i(!0);const e=yield(0,o.wz)();return yield c({data:e}),!0}catch{const e=(0,n.select)(a.F).getJetpackModules();return yield c(e),!1}finally{yield i(!1)}}}},94478(e,t,s){"use strict";s.d(t,{Ay:()=>c,sB:()=>l,wz:()=>i});var r=s(1455),n=s.n(r);const o="FETCH_JETPACK_MODULES",a="UPDATE_JETPACK_MODULE_STATUS",i=()=>({type:o}),l=e=>({type:a,settings:e}),c={[o]:function(){return n()({path:"/jetpack/v4/module/all",method:"GET"})},[a]:function({settings:e}){return n()({path:`/jetpack/v4/module/${e.name}/active`,method:"POST",data:{active:e.active}})}}},88290(e,t,s){"use strict";s.d(t,{F:()=>c,M:()=>u});var r=s(47143),n=s(27105),o=s(94478),a=s(38862),i=s(62701),l=s(31640);const c="jetpack-modules",u=(0,r.createReduxStore)(c,{reducer:a.A,actions:n.Ay,controls:o.Ay,resolvers:i.A,selectors:l.A});(0,r.register)(u);const d=window?.Initial_State?.getModules||window?.Jetpack_Editor_Initial_State?.modules||null;null!==d&&(0,r.dispatch)(c).setJetpackModules({data:{...d}})},38862(e,t,s){"use strict";s.d(t,{A:()=>n});const r={isLoading:!1,isUpdating:{},data:{}},n=(e=r,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,s){"use strict";s.d(t,{A:()=>o});var r=s(27105),n=s(94478);const o={getJetpackModules:function*(){try{yield(0,r.F6)(!0);const e=yield(0,n.wz)();if(e)return(0,r.E9)({data:e})}catch(e){console.error(e)}finally{yield(0,r.F6)(!1)}}}},31640(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(97999);const n={getJetpackModules:e=>e.data,isModuleActive:(e,t)=>(0,r.isSimpleSite)()||(e?.data?.[t]?.activated??!1),areModulesLoading:e=>e.isLoading??!1,isModuleUpdating:(e,t)=>e?.isUpdating?.[t]??!1}},53265(e,t,s){"use strict";s.d(t,{Dk:()=>m,GT:()=>f,Q4:()=>c,W4:()=>u,aq:()=>d,sH:()=>g,tu:()=>p});var r=s(97999),n=s(27723),o=s(93832),a=s(34972),i=s(8573),l=s(54815);const __=n.__;function c({planSlug:e,plan:t,postId:s,postType:n}){const a=e.startsWith("jetpack_")?e:t?.path_slug,i=(void 0===n?()=>{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(n)?"":"edit";return(0,r.isSimpleSite)()?(0,o.addQueryArgs)("/"+[e,n,(0,l.A)(),s].filter(Boolean).join("/"),{plan_upgraded:1}):(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.A)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:s,plan_upgraded:1})})();return(0,r.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:s,unavailableReason:r}=(0,i.A)(t);return!s&&"missing_plan"===r}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:s,unavailableReason:r}=(0,i.A)(t);return d(r,s)}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,s){"use strict";s.d(t,{A:()=>o});var r=s(92279),n=s(8573);function o(e,t){const{available:s,unavailableReason:o}=(0,n.A)(e);return!!s&&(0,r.registerPlugin)(`jetpack-${e}`,t)}},41409(e,t,s){"use strict";s(97999)},62634(e,t,s){"use strict";s.d(t,{l:()=>o,p:()=>n});var r=s(34972);function n(){const e=(0,r.A)();return e?.jetpack?.is_private_site??!1}function o(){const e=(0,r.A)();return e?.jetpack?.is_coming_soon??!1}},26047(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(1455),n=s.n(r),o=s(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 n()({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"]}}(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 s=t.getAsyncRequestCountdownTimerId();s&&window?.clearTimeout(s)},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:o.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:o.c1,tierPlansEnabled:e})},i=a},41325(e,t,s){"use strict";s.d(t,{GB:()=>d,J8:()=>u,Kt:()=>l,Lg:()=>i,PC:()=>r,UU:()=>o,c1:()=>c,gW:()=>m,iH:()=>n,jM:()=>f,js:()=>b,mx:()=>h,nb:()=>p,ql:()=>a,yO:()=>g});const r="SET_PLANS",n="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,s){"use strict";s.d(t,{j:()=>i});var r=s(47143),n=s(26047),o=s(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,r.createReduxStore)("wordpress-com/plans",{actions:n.A,reducer:o.A,selectors:a,controls:{FETCH_FROM_API:({url:e})=>fetch(e).then(e=>e.json())},resolvers:{*getPlan(){const e=yield n.A.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return n.A.setPlans(e)},getAiAssistantFeature:e=>{if(!e?.features?.aiAssistant)return n.A.fetchAiAssistantFeature()}}});(0,r.register)(i)},17740(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(41325);const n={plans:[],features:{aiAssistant:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:r.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:r.mx,asyncRequestTimerId:0}}}};function o(e=n,t){switch(t.type){case r.PC:return{...e,plans:t.plans};case r.ql:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,isRequesting:!0,asyncRequestCountdown:r.mx,asyncRequestTimerId:0}}}};case r.UU:return{...e,features:{...e.features,aiAssistant:{...t.feature,_meta:{...e.features.aiAssistant._meta,isRequesting:!1}}}};case r.Lg:{const s=e.features.aiAssistant.usagePeriod||{requestsCount:0},n=e.features.aiAssistant.requestsCount+t.count;s.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=r.nb:a&&(l=e.features.aiAssistant.requestsLimit);const c=(a?n: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:n,requireUpgrade:u,usagePeriod:{...s}}}}}case r.yO:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,asyncRequestCountdown:e.features.aiAssistant._meta.asyncRequestCountdown-1}}}};case r.jM:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,_meta:{...e.features.aiAssistant._meta,asyncRequestTimerId:t.timerId}}}};case r.Kt:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case r.c1:return{...e,features:{...e.features,aiAssistant:{...e.features.aiAssistant,tierPlansEnabled:t.tierPlansEnabled}}}}return e}},65595(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(29491),n=(s(28745),s(10790));const o=e=>(0,r.createHigherOrderComponent)(t=>s=>(0,n.jsx)(t,{...s,className:s.name===e?"has-warning is-interactive":s.className}),"withHasWarningIsInteractiveClassNames")},84705(e,t,s){"use strict";s.d(t,{d6:()=>r.d});var r=s(58992);s(91135)},91135(e,t,s){"use strict";s.d(t,{$:()=>n});var r=s(10790);const n=[{name:"amazon",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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:"apple-podcasts",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"M20.999 7.986a26 26 0 0 0-.008-.543 8 8 0 0 0-.104-1.182 4 4 0 0 0-.37-1.125 3.8 3.8 0 0 0-1.653-1.652c-.36-.183-.728-.3-1.124-.37a8 8 0 0 0-1.182-.104 25 25 0 0 0-.544-.008q-.322-.003-.645-.002H8.631l-.645.001q-.271.002-.543.008c-.395.011-.793.034-1.183.104a4 4 0 0 0-1.124.37 3.78 3.78 0 0 0-1.652 1.653c-.183.36-.3.728-.37 1.125-.07.39-.094.787-.105 1.181a25 25 0 0 0-.008.544L3 8.63v6.739l.001.645q.002.27.008.543c.011.394.034.792.104 1.182.071.396.188.764.37 1.124a3.78 3.78 0 0 0 1.653 1.652c.36.183.728.3 1.124.37.39.07.788.094 1.183.105q.27.006.543.008L8.63 21h6.739l.645-.001q.27-.001.543-.008a8 8 0 0 0 1.182-.104 4 4 0 0 0 1.124-.37 3.8 3.8 0 0 0 1.652-1.653c.184-.36.3-.728.371-1.124.07-.39.093-.788.104-1.182q.007-.271.008-.543l.001-.646V8.631zm-7.62 6.943a29 29 0 0 1-.231 1.861c-.076.488-.137.75-.193.939-.091.305-.43.572-.96.572-.531 0-.87-.267-.961-.572a7 7 0 0 1-.194-.939 29 29 0 0 1-.23-1.861c-.045-.53-.069-.86-.027-1.245a.76.76 0 0 1 .219-.473c.247-.261.68-.428 1.192-.428s.946.167 1.193.428a.76.76 0 0 1 .219.473c.041.385.018.716-.027 1.245m-3.53-1.279a.24.24 0 0 1 .076.188c-.012.215-.008.425.006.661a.076.076 0 0 1-.118.068 3.87 3.87 0 0 1-1.695-3.253 3.89 3.89 0 0 1 3.723-3.822 3.874 3.874 0 0 1 2.335 7.075.076.076 0 0 1-.118-.068c.014-.236.019-.446.007-.66a.24.24 0 0 1 .075-.189c.61-.572.991-1.385.991-2.285a3.14 3.14 0 0 0-3.26-3.133 3.145 3.145 0 0 0-3.012 3.049c-.025.933.361 1.779.99 2.369m3.492-2.758a1.347 1.347 0 1 1-2.693 0 1.347 1.347 0 0 1 2.693 0m.569 5.932a.077.077 0 0 1-.103-.084q.045-.298.084-.593a.2.2 0 0 1 .117-.156 5.05 5.05 0 0 0 3.033-4.626 5.05 5.05 0 0 0-5.088-5.046c-2.741.022-4.979 2.256-5.005 4.996A5.05 5.05 0 0 0 9.98 15.99a.2.2 0 0 1 .118.157q.039.295.083.593a.077.077 0 0 1-.102.084 5.795 5.795 0 0 1-3.872-5.533c.04-3.149 2.62-5.703 5.77-5.712a5.793 5.793 0 0 1 5.805 5.786c0 2.519-1.62 4.667-3.872 5.459"})})})},{name:"behance",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 743 743",children:(0,r.jsxs)("g",{children:[(0,r.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,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsxs)("g",{children:[(0,r.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,r.jsx)("circle",{cx:"13.089",cy:"10.905",r:"1.383"}),(0,r.jsx)("circle",{cx:"16.349",cy:"7.644",r:"1.383"}),(0,r.jsx)("circle",{cx:"19.61",cy:"4.383",r:"1.383"})]})})},{name:"line",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",strokeMiterlimit:"10",viewBox:"0 0 130 130",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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-casts",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m0 2.223a7.777 7.777 0 1 0 0 15.555v-1.945A5.833 5.833 0 1 1 17.833 12h1.944A7.777 7.777 0 0 0 12 4.223m0 3.11a4.667 4.667 0 0 0 0 9.334V14.97A2.97 2.97 0 1 1 14.97 12h1.697A4.667 4.667 0 0 0 12 7.333"})})})},{name:"polldaddy",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10H3.448a.6.6 0 0 1-.424-1.024L4.93 19.07A9.97 9.97 0 0 1 2 12C2 6.477 6.477 2 12 2m3.656 2.666c-.804 0-1.475.57-1.632 1.33a2.69 2.69 0 0 0-2.4 2.672v.008c-1.466.062-2.804.479-3.866 1.137a2.335 2.335 0 1 0-2.418 3.963c.077 2.711 3.031 4.892 6.665 4.892s6.59-2.183 6.664-4.896a2.336 2.336 0 0 0-1.001-4.445c-.535 0-1.028.18-1.422.484-1.072-.664-2.425-1.08-3.905-1.136v-.007c0-.992.737-1.815 1.693-1.95l.038.134a1.668 1.668 0 0 0 3.25-.52c0-.92-.746-1.666-1.666-1.666M12.005 14.99c.811 0 1.588.04 2.307.112.123.013.201.14.154.254a2.667 2.667 0 0 1-4.922 0 .185.185 0 0 1 .152-.254 23 23 0 0 1 2.309-.112m-3.086-3.344c.654 0 1.154.687 1.115 1.534-.039.846-.527 1.155-1.181 1.155-.655 0-1.228-.345-1.189-1.191.04-.847.601-1.497 1.255-1.498m6.172 0c.654 0 1.216.65 1.255 1.498.039.846-.535 1.191-1.189 1.191-.653 0-1.142-.308-1.181-1.155s.46-1.533 1.115-1.533"})})})},{name:"share",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsxs)("g",{children:[(0,r.jsx)("path",{d:"M18.18 20.103V14.78h1.767v7.09H4v-7.09h1.767v5.323z"}),(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 192 192",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsxs)("g",{children:[(0,r.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,r.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,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2M5.963 8.482c-.78 0-1.176.363-1.176 1.034 0 .67.418 1.055 1.176 1.055h.847v4.012c0 1.132.759 1.803 1.869 1.803.89 0 1.605-.44 2.143-1.45l1.199-2.244v1.903c0 1.12.725 1.79 1.846 1.79.88 0 1.528-.384 2.154-1.45l2.76-4.66c.604-1.023.175-1.792-1.154-1.793-.715 0-1.177.232-1.595 1.012l-1.901 3.572V9.89c0-.946-.451-1.407-1.286-1.408-.66 0-1.187.286-1.594 1.078l-1.792 3.506V9.923c0-1.011-.418-1.44-1.429-1.44z"})})})},{name:"wordpress",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.jsx)("path",{d:"M9 9h6v6H9zM3 9h6V3H3zm12 0h6V3h-6zm0 12h6v-6h-6zM3 21h6v-6H3z"})})})},{name:"youtube",svg:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("g",{children:(0,r.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,s){"use strict";s.d(t,{d:()=>l});var r=s(28120),n=s.n(r),o=s(51609),a=s(91135),i=s(10790);class l extends o.PureComponent{static defaultProps={size:24};static propTypes={icon:n().string.isRequired,size:n().number,onClick:n().func,className:n().string};render(){const{size:e,onClick:t,icon:s,className:r,...n}=this.props,l=["social-logo","social-logo-"+s,r].filter(Boolean).join(" "),c=a.$.find(e=>e.name===s);if(!c)return(0,i.jsx)("svg",{height:e,width:e,...n});return(0,o.cloneElement)(c.svg,{className:l,height:e,width:e,onClick:t,...n})}}},50513(e,t,s){"use strict";s.d(t,{_:()=>a});var r=s(51609),n=s(10790);function o(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 340 340",width:"36",height:"36","aria-hidden":"true",...e,children:(0,n.jsx)("path",{fill:"#DDD",d:"m169,.5a169,169 0 1,0 2,0zm0,86a76,76 0 1 1-2,0zM57,287q27-35 67-35h92q40,0 67,35a164,164 0 0,1-226,0"})})}function a({src:e,alt:t="",className:s,fallback:a=(0,n.jsx)(o,{className:s})}){const[i,l]=(0,r.useState)(""),c=(0,r.useCallback)(e=>{l(e.target.src)},[]);return!!e&&i!==e?(0,n.jsx)("img",{src:e,alt:t,onError:c,className:s}):a}},59002(e,t,s){"use strict";s.d(t,{S6:()=>n,_t:()=>o,dN:()=>a});var r=s(76223);const n=e=>(0,r.RA)((0,r.f5)(200),(0,r.ZT)(200))((0,r.$J)(e))||"",o=(e,t={})=>{const{offset:s=0,reserveUrlSpace:n=!0}=t;return(0,r.x5)(e,{platform:"bluesky",maxChars:300-(n?40:0)-s})},a=e=>(0,r.RA)((0,r.f5)(40),(0,r.ZT)(40))((0,r.$J)(e))||""},89014(e,t,s){"use strict";s.d(t,{c:()=>o});var r=s(51016),n=s(10790);const o=e=>(0,n.jsx)(r.O,{...e,user:void 0,media:void 0,customText:""})},51016(e,t,s){"use strict";s.d(t,{O:()=>u});var r=s(13022),n=s(21458),o=s(41817),a=s(26815),i=s(246),l=s(10519),c=(s(38914),s(10790));const u=e=>{const{user:t,media:s,appendUrl:u}=e;return(0,c.jsxs)("div",{className:"bluesky-preview__post",children:[(0,c.jsx)(l.Q,{user:t}),(0,c.jsxs)("div",{children:[(0,c.jsx)(i.A,{user:t}),(0,c.jsx)(o.A,{...e,appendUrl:u??Boolean(s?.length),children:s?.length?(0,c.jsx)("div",{className:(0,r.A)("bluesky-preview__media",{"as-grid":s.length>1}),children:s.map((e,t)=>(0,c.jsx)("div",{className:"bluesky-preview__media-item",children:e.type.startsWith("video/")?(0,c.jsx)("video",{controls:!0,children:(0,c.jsx)("source",{src:e.url,type:e.type})}):(0,c.jsx)("img",{alt:e.alt||"",src:e.url})},`bluesky-preview__media-item-${t}`))}):null}),s?.length?null:(0,c.jsx)(a.A,{...e}),(0,c.jsx)(n.A,{})]})]})}},21458(e,t,s){"use strict";s.d(t,{A:()=>n});s(4521);var r=s(10790);const n=()=>(0,r.jsxs)("div",{className:"bluesky-preview__post-actions",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("svg",{fill:"none",width:"18",viewBox:"0 0 24 24",height:"18",style:{color:"rgb(111, 134, 159)"},"aria-hidden":"true",children:(0,r.jsx)("path",{fill:"hsl(211, 20%, 53%)",fillRule:"evenodd",clipRule:"evenodd",d:"M2.002 6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H12.28l-4.762 2.858A1 1 0 0 1 6.002 21v-2h-1a3 3 0 0 1-3-3V6Zm3-1a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2a1 1 0 0 1 1 1v1.234l3.486-2.092a1 1 0 0 1 .514-.142h7a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-14Z"})}),(0,r.jsx)("span",{children:0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("svg",{fill:"none",width:"18",viewBox:"0 0 24 24",height:"18",style:{color:"rgb(111, 134, 159)"},"aria-hidden":"true",children:(0,r.jsx)("path",{fill:"hsl(211, 20%, 53%)",fillRule:"evenodd",clipRule:"evenodd",d:"M17.957 2.293a1 1 0 1 0-1.414 1.414L17.836 5H6a3 3 0 0 0-3 3v3a1 1 0 1 0 2 0V8a1 1 0 0 1 1-1h11.836l-1.293 1.293a1 1 0 0 0 1.414 1.414l2.47-2.47a1.75 1.75 0 0 0 0-2.474l-2.47-2.47ZM20 12a1 1 0 0 1 1 1v3a3 3 0 0 1-3 3H6.164l1.293 1.293a1 1 0 1 1-1.414 1.414l-2.47-2.47a1.75 1.75 0 0 1 0-2.474l2.47-2.47a1 1 0 0 1 1.414 1.414L6.164 17H18a1 1 0 0 0 1-1v-3a1 1 0 0 1 1-1Z"})}),(0,r.jsx)("span",{children:0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("svg",{fill:"none",width:"18",viewBox:"0 0 24 24",height:"18",style:{color:"rgb(111, 134, 159)"},"aria-hidden":"true",children:(0,r.jsx)("path",{fill:"hsl(211, 20%, 53%)",fillRule:"evenodd",clipRule:"evenodd",d:"M16.734 5.091c-1.238-.276-2.708.047-4.022 1.38a1 1 0 0 1-1.424 0C9.974 5.137 8.504 4.814 7.266 5.09c-1.263.282-2.379 1.206-2.92 2.556C3.33 10.18 4.252 14.84 12 19.348c7.747-4.508 8.67-9.168 7.654-11.7-.541-1.351-1.657-2.275-2.92-2.557Zm4.777 1.812c1.604 4-.494 9.69-9.022 14.47a1 1 0 0 1-.978 0C2.983 16.592.885 10.902 2.49 6.902c.779-1.942 2.414-3.334 4.342-3.764 1.697-.378 3.552.003 5.169 1.286 1.617-1.283 3.472-1.664 5.17-1.286 1.927.43 3.562 1.822 4.34 3.764Z"})}),(0,r.jsx)("span",{children:0})]}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"hsl(211, 20%, 53%)",fillRule:"evenodd",clipRule:"evenodd",d:"M2 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm16 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm-6-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z"})})})]})},41817(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(59002),n=(s(61802),s(10790));const o=({customText:e,url:t,children:s,appendUrl:o})=>{const a=o&&!!t&&!e?.includes(t);return(0,n.jsxs)("div",{className:"bluesky-preview__body",children:[e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:(0,r._t)(e,{reserveUrlSpace:a})}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:(0,r.dN)(t.replace(/^https?:\/\//,""))})]}):null]}):null,s]})}},26815(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(76223),n=s(59002),o=(s(11672),s(10790));const a=({title:e,description:t,url:s,image:a})=>(0,o.jsxs)("div",{className:"bluesky-preview__card",children:[a?(0,o.jsx)("div",{className:"bluesky-preview__card-image",children:(0,o.jsx)("img",{src:a,alt:""})}):null,(0,o.jsxs)("div",{className:"bluesky-preview__card-text",children:[(0,o.jsx)("div",{className:"bluesky-preview__card-site",children:(0,r.GA)(s)}),(0,o.jsx)("div",{className:"bluesky-preview__card-title",children:(0,n.S6)(e)||(0,r.X2)(t)}),(0,o.jsx)("div",{className:"bluesky-preview__card-description",children:(0,r.$J)(t)})]})]})},246(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(27723),n=(s(57589),s(10790));const __=r.__,_x=r._x,o=({user:e})=>{const{displayName:t,address:s}=e||{};let r=s||"username.bsky.social";return r.startsWith("@")||(r="@"+r),(0,n.jsxs)("div",{className:"bluesky-preview__post-header",children:[(0,n.jsxs)("div",{className:"bluesky-preview__post-header-user",children:[(0,n.jsx)("span",{className:"bluesky-preview__post-header--displayname",children:t||__("Account name","jetpack")}),(0,n.jsx)("span",{className:"bluesky-preview__post-header--username",children:r})]}),(0,n.jsx)("div",{className:"bluesky-preview__post-header--separator",children:"·"}),(0,n.jsx)("div",{className:"bluesky-preview__post-header--date",children:_x("1h",'refers to the time since the post was published, e.g. "1h"',"jetpack")})]})}},10519(e,t,s){"use strict";s.d(t,{Q:()=>o});var r=s(50513),n=(s(2128),s(10790));const o=({user:e})=>{const{avatarUrl:t}=e||{};return(0,n.jsx)("div",{className:"bluesky-preview__post-sidebar",children:(0,n.jsx)("div",{className:"bluesky-preview__post-sidebar-user",children:(0,n.jsx)(r._,{className:"bluesky-preview__post-avatar",src:t})})})}},33853(e,t,s){"use strict";s.d(t,{Kq:()=>r,_I:()=>n,q8:()=>o});const r="article",n="landscape",o="portrait"},30759(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(76223),n=s(28469),o=s(68457),a=s(10790);const i=({text:e,url:t,forceUrlDisplay:s})=>{let i;return((0,r.ti)(e,"a")||s&&!!t&&!e.includes(t))&&(i=(0,a.jsx)("a",{className:"facebook-preview__custom-text-post-url",href:t,rel:"nofollow noopener noreferrer",target:"_blank",children:t})),(0,a.jsxs)("p",{className:"facebook-preview__custom-text",children:[(0,a.jsx)("span",{children:(0,a.jsx)(n.MW,{text:e,children:e=>(0,r.x5)(e,{platform:"facebook",maxChars:o.zl})})}),i]})}},68457(e,t,s){"use strict";s.d(t,{B2:()=>a,t2:()=>o,zl:()=>n});var r=s(76223);const n=63206,o=e=>(0,r.RA)((0,r.f5)(110),(0,r.ZT)(110))((0,r.$J)(e))||"",a=e=>(0,r.RA)((0,r.f5)(200),(0,r.ZT)(200))((0,r.$J)(e))||""},87446(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(27723),n=s(51609),o=s(33853);const __=r.__,a=({mode:e})=>{const[t,s]=(0,n.useState)(e),[r,a]=(0,n.useState)(!0),i=(0,n.useCallback)(({target:e})=>{if(!t){const t=e;s(t.naturalWidth>t.naturalHeight?o._I:o.q8)}a(!1)},[t]),l=(0,n.useCallback)(()=>a(!1),[]);return[t,r,{alt:__("Facebook Preview Thumbnail","jetpack"),onLoad:i,onError:l}]}},66901(e,t,s){"use strict";s.d(t,{l:()=>h});var r=s(27723),n=s(33853),o=s(76223),a=s(30759),i=s(68457),l=s(87446),c=s(44381),u=s(47176),d=s(98714),p=(s(92442),s(10790));const __=r.__,h=({url:e,title:t,description:s,image:r,user:h,customText:m,type:g,imageMode:f,compactDescription:b})=>{const[v,k,y]=(0,l.A)({mode:f}),x=g===n.Kq,j="is-"+(x&&!r||v===n.q8?"portrait":"landscape");return(0,p.jsxs)("div",{className:"facebook-preview__post",children:[(0,p.jsx)(u.A,{user:h}),(0,p.jsxs)("div",{className:"facebook-preview__content",children:[m&&(0,p.jsx)(a.A,{text:m,url:e}),(0,p.jsxs)("div",{className:`facebook-preview__body ${j} ${r&&k?"is-loading":""}`,children:[(r||x)&&(0,p.jsx)("div",{className:`facebook-preview__image ${r?"":"is-empty"} ${j}`,children:r&&(0,p.jsx)("img",{src:r,...y})}),(0,p.jsx)("div",{className:"facebook-preview__text",children:(0,p.jsxs)("div",{className:"facebook-preview__text-wrapper",children:[(0,p.jsx)("div",{className:"facebook-preview__url",children:(0,o.GA)(e)}),(0,p.jsx)("div",{className:"facebook-preview__title",children:(0,i.t2)(t)||(0,o.GA)(e)}),(0,p.jsxs)("div",{className:"facebook-preview__description "+(b?"is-compact":""),children:[s&&(0,i.B2)(s),x&&!s&& // translators: Default description for a Facebook post __("Visit the post for more.","jetpack")]}),(0,p.jsx)("div",{className:"facebook-preview__info",children:(0,p.jsx)(d.A,{name:"info"})})]})})]})]}),(0,p.jsx)(c.A,{})]})}},44381(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(27723),n=s(98714),o=(s(84998),s(10790));const __=r.__,a=()=>(0,o.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like", // translators: Facebook "Like" action label:__("Like","jetpack")},{icon:"comment", // translators: Facebook "Comment" action label:__("Comment","jetpack")},{icon:"share", // translators: Facebook "Share" action label:__("Share","jetpack")}].map(({icon:e,label:t})=>(0,o.jsxs)("li",{children:[(0,o.jsx)(n.A,{name:e}),(0,o.jsx)("span",{children:t})]},e))})},47176(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(27723),n=s(50513),o=s(98714),a=(s(78924),s(10790));const __=r.__,_x=r._x,i=({user:e,timeElapsed:t,hideOptions:s})=>(0,a.jsxs)("div",{className:"facebook-preview__post-header",children:[(0,a.jsxs)("div",{className:"facebook-preview__post-header-content",children:[(0,a.jsx)(n._,{className:"facebook-preview__post-header-avatar",src:e?.avatarUrl}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"facebook-preview__post-header-name",children:e?.displayName|| // translators: name of a fictional Facebook User __("Anonymous User","jetpack")}),(0,a.jsxs)("div",{className:"facebook-preview__post-header-share",children:[(0,a.jsx)("span",{className:"facebook-preview__post-header-time",children:t?__( // translators: short version of `1 hour` "1h","jetpack"):_x( // translators: temporal indication of when a post was published "Just now","","jetpack")}),(0,a.jsx)("span",{className:"facebook-preview__post-header-dot","aria-hidden":"true",children:"·"}),(0,a.jsx)(o.A,{name:"public"})]})]})]}),!s&&(0,a.jsx)("div",{className:"facebook-preview__post-header-more"})]})},98714(e,t,s){"use strict";s.d(t,{A:()=>n});s(96929);var r=s(10790);const n=({name:e})=>(0,r.jsx)("i",{className:`facebook-preview__post-icon facebook-preview__post-icon-${e}`})},54560(e,t,s){"use strict";s.d(t,{m:()=>u});var r=s(76223),n=s(92917),o=(s(27998),s(10790));const a=160,i=e=>{const t=e.startsWith("https://")?"https://":"http://",s=t+e.replace(t,"").split("/").join(" › ");return(0,r.RA)((0,r.f5)(68),(0,r.ZT)(68))(s)},l=(0,r.RA)((0,r.f5)(63),(0,r.y5)(23,73),(0,r.ZT)(63)),c=(0,r.RA)((0,r.f5)(a),(0,r.y5)(80,170),(0,r.ZT)(a)),u=({description:e="",siteIcon:t,siteTitle:s,title:a="",url:u=""})=>{const d=(0,r.GA)(u);return(0,o.jsx)("div",{className:"search-preview",children:(0,o.jsxs)("div",{className:"search-preview__display",children:[(0,o.jsxs)("div",{className:"search-preview__header",children:[(0,o.jsxs)("div",{className:"search-preview__branding",children:[(0,o.jsx)(n.F,{className:"search-preview__icon",src:t}),(0,o.jsxs)("div",{className:"search-preview__site",children:[(0,o.jsx)("div",{className:"search-preview__site--title",children:s||d}),(0,o.jsx)("div",{className:"search-preview__url",children:i(u)})]})]}),(0,o.jsx)("div",{className:"search-preview__menu",children:(0,o.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})})]}),(0,o.jsx)("div",{className:"search-preview__title",children:l(a)}),(0,o.jsx)("div",{className:"search-preview__description",children:c((0,r.$J)(e))})]})})}},76223(e,t,s){"use strict";s.d(t,{$J:()=>p,GA:()=>a,RA:()=>d,TR:()=>v,X2:()=>h,ZT:()=>u,f5:()=>l,hV:()=>b,tX:()=>g,ti:()=>m,vI:()=>f,x5:()=>y,y5:()=>c});var r=s(86087),n=s(27723),o=s(10790);const a=e=>{const t=e.replace(/^[^/]+:\/\//,""),s=t.indexOf("/");return-1===s?t:t.substring(0,s)},i=e=>Array.from(e).length,l=e=>t=>i(t)<=e&&t,c=(e,t)=>s=>{const r=s.slice(0,t),n=r.lastIndexOf(" ");return n>e&&nt=>{return(s=t,r=0,n=e,Array.from(s).slice(r,n).join("")).concat("…");var s,r,n},d=(...e)=>t=>e.find(e=>!1!==e(t))?.(t),p=(e,t=[])=>{const s=new RegExp(`(<([^${t.join("")}>]+)>)`,"gi");return e?e.replace(s,""):""},h=e=>p(e).substring(0,50),m=(e,t)=>new RegExp(`<${t}[^>]*>`,"gi").test(e),g=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short"}).format,f=new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"2-digit",year:"numeric"}).format,b=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,v=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format,k={twitter:"https://twitter.com/hashtag/%1$s",facebook:"https://www.facebook.com/hashtag/%1$s",linkedin:"https://www.linkedin.com/feed/hashtag/?keywords=%1$s",instagram:"https://www.instagram.com/explore/tags/%1$s",mastodon:"https://%2$s/tags/%1$s",nextdoor:"https://nextdoor.com/hashtag/%1$s",threads:"https://www.threads.net/search?q=%1$s&serp_type=tags",tumblr:"https://www.tumblr.com/tagged/%1$s",bluesky:"https://bsky.app/hashtag/%1$s"};function y(e,t){const{platform:s,maxChars:a,maxLines:l,hyperlinkHashtags:c=!0,hyperlinkUrls:d="instagram"!==s}=t;let h=p(e);if(h=h.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),a&&i(h)>a&&(h=u(a)(h)),l){const e=h.split("\n");e.length>l&&(h=e.slice(0,l).join("\n"))}const m={};if(d){(h.match(/(https?:\/\/\S+)/g)||[]).forEach((e,t)=>{m[`Link${t}`]=(0,o.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:e}),h=h.replace(e,``)})}if(c&&k[s]){const e=h.matchAll(/(^|\s)#(\w+)/g),r=k[s];[...e].forEach(([e,s,a],i)=>{const l=(0,n.sprintf)(r,a,t.hashtagDomain);m[`Hashtag${i}`]=(0,o.jsx)("a",{href:l,rel:"noopener noreferrer",target:"_blank",children:`#${a}`}),h=h.replace(e,`${s}`)})}return h=h.replace(/\n/g,"
    "),m.br=(0,o.jsx)("br",{}),(0,r.createInterpolateElement)(h,m)}},83476(e,t,s){"use strict";s.d(t,{f:()=>n});var r=s(10790);function n(e){return(0,r.jsx)("svg",{focusable:"false","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14",...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})})}},13755(e,t,s){"use strict";s.d(t,{v:()=>r});const r=3e3},77123(e,t,s){"use strict";s.d(t,{X:()=>a});var r=s(76223),n=s(1798),o=s(10790);function a(e){return(0,o.jsx)(n.$,{name:"",profileImage:"",...e,description:"",media:void 0,title:e.title||(0,r.X2)(e.description)})}},1798(e,t,s){"use strict";s.d(t,{$:()=>c});var r=s(27723),n=s(50513),o=s(76223),a=s(28469),i=s(13755),l=(s(57908),s(10790));const __=r.__;function c({articleReadTime:e=5,image:t,jobTitle:s,name:c,profileImage:u,description:d,media:p,title:h,url:m}){const g=!!p?.length;return(0,l.jsx)("div",{className:"linkedin-preview__wrapper",children:(0,l.jsxs)("section",{className:"linkedin-preview__container "+(g?"has-media":""),children:[(0,l.jsxs)("div",{className:"linkedin-preview__header",children:[(0,l.jsx)("div",{className:"linkedin-preview__header--avatar",children:(0,l.jsx)(n._,{src:u})}),(0,l.jsxs)("div",{className:"linkedin-preview__header--profile",children:[(0,l.jsxs)("div",{className:"linkedin-preview__header--profile-info",children:[(0,l.jsx)("div",{className:"linkedin-preview__header--profile-name",children:c||__("Account Name","jetpack")}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("div",{className:"linkedin-preview__header--profile-actor",children: // translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc. __("1st","jetpack")})]}),s?(0,l.jsx)("div",{className:"linkedin-preview__header--profile-title",children:s}):null,(0,l.jsxs)("div",{className:"linkedin-preview__header--profile-meta",children:[(0,l.jsx)("span",{children: // translators: refers to the time since the post was published, e.g. "1h" __("1h","jetpack")}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",focusable:"false",children:(0,l.jsx)("path",{d:"M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z"})})]})]})]}),(0,l.jsxs)("div",{className:"linkedin-preview__content",children:[d?(0,l.jsxs)("div",{className:"linkedin-preview__caption",children:[(0,l.jsx)("span",{children:(0,l.jsx)(a.MW,{text:d,children:e=>(0,o.x5)(e,{platform:"linkedin",maxChars:i.v})})}),g&&m&&!d.includes(m)&&(0,l.jsxs)(l.Fragment,{children:[" - ",(0,l.jsx)("a",{href:m,rel:"nofollow noopener noreferrer",target:"_blank",children:m})]})]}):null,g?(0,l.jsx)("div",{className:"linkedin-preview__media",children:p.map((e,t)=>(0,l.jsx)("div",{className:"linkedin-preview__media-item",children:e.type.startsWith("video/")?(0,l.jsx)("video",{controls:!0,children:(0,l.jsx)("source",{src:e.url,type:e.type})}):(0,l.jsx)("img",{alt:e.alt||"",src:e.url})},`linkedin-preview__media-item-${t}`))}):(0,l.jsxs)("article",{children:[t?(0,l.jsx)("img",{className:"linkedin-preview__image",src:t,alt:""}):null,m?(0,l.jsxs)("div",{className:"linkedin-preview__description",children:[(0,l.jsx)("h2",{className:"linkedin-preview__description--title",children:h||(0,o.X2)(d)}),(0,l.jsxs)("div",{className:"linkedin-preview__description--meta",children:[(0,l.jsx)("span",{className:"linkedin-preview__description--url",children:(0,o.GA)(m)}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("span",{children:(0,r.sprintf)( // translators: %d is the number of minutes it takes to read the article __("%d min read","jetpack"),e)})]})]}):null]})]})]})})}},17562(e,t,s){"use strict";s.d(t,{w:()=>r});const r="mastodon.social"},50710(e,t,s){"use strict";s.d(t,{gD:()=>n});var r=s(76223);const n=e=>(0,r.RA)((0,r.f5)(200),(0,r.ZT)(200))((0,r.$J)(e))||""},5874(e,t,s){"use strict";s.d(t,{i:()=>i});var r=s(74822),n=s(23163),o=s(39490),a=(s(44110),s(10790));const i=e=>{const{user:t}=e;return(0,a.jsxs)("div",{className:"mastodon-preview__post",children:[(0,a.jsx)(o.A,{user:t}),(0,a.jsx)(n.A,{...e,customImage:""}),(0,a.jsx)(r.A,{})]})}},74822(e,t,s){"use strict";s.d(t,{A:()=>n});s(16341);var r=s(10790);const n=()=>(0,r.jsxs)("div",{className:"mastodon-preview__post-actions",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z"})})," ",(0,r.jsx)("span",{children:0})]}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M280-80 120-240l160-160 56 58-62 62h406v-160h80v240H274l62 62-56 58Zm-80-440v-240h486l-62-62 56-58 160 160-160 160-56-58 62-62H280v160h-80Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M200-120v-640q0-33 23.5-56.5T280-840h400q33 0 56.5 23.5T760-760v640L480-240 200-120Zm80-122 200-86 200 86v-518H280v518Zm0-518h400-400Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z"})})})]})},23163(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(27723),n=s(13022),o=s(76223),a=s(50710),i=(s(24716),s(10790));const __=r.__,l=({siteName:e,title:t,description:s,url:r,image:l,customImage:c})=>(0,i.jsxs)("div",{className:(0,n.A)("mastodon-preview__card",{"has-image":l}),children:[(0,i.jsx)("div",{className:"mastodon-preview__card-img",children:l||c?(0,i.jsx)("img",{src:l||c,alt:__("Mastodon preview thumbnail","jetpack")}):(0,i.jsx)("div",{className:"mastodon-preview__card-img--fallback",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520h200L520-800v200Z"})})})}),(0,i.jsxs)("div",{className:"mastodon-preview__card-text",children:[(0,i.jsx)("span",{className:"mastodon-preview__card-site",children:e||(0,o.GA)(r)}),(0,i.jsx)("span",{className:"mastodon-preview__card-title",children:(0,a.gD)(t)||(0,o.X2)(s)}),(0,i.jsx)("span",{className:"mastodon-preview__card-description",children:(0,o.$J)(s)})]})]})},39490(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(27723),n=s(50513),o=s(76223),a=s(17562),i=s(12625),l=(s(16585),s(10790));const __=r.__,c=({user:e})=>{const{displayName:t,address:s,avatarUrl:r}=e||{};return(0,l.jsxs)("div",{className:"mastodon-preview__post-header",children:[(0,l.jsxs)("div",{className:"mastodon-preview__post-header-user",children:[(0,l.jsx)(n._,{className:"mastodon-preview__post-avatar",src:r}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mastodon-preview__post-header-displayname",children:t|| // translators: username of a fictional Mastodon User __("anonymous-user","jetpack")}),(0,l.jsx)("div",{className:"mastodon-preview__post-header-username",children:s?.replace(`@${a.w}`,"")||"@username"})]})]}),(0,l.jsxs)("div",{className:"mastodon-preview__post-header-audience",children:[(0,l.jsx)(i.f,{}),(0,o.TR)(new Date)]})]})}},12625(e,t,s){"use strict";s.d(t,{f:()=>n});var r=s(10790);function n(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"15",viewBox:"0 -960 960 960",width:"15",role:"img",children:(0,r.jsx)("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-40-82v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q20-22 36-47.5t26.5-53q10.5-27.5 16-56.5t5.5-59q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z"})})}},73192(e,t,s){"use strict";s.d(t,{v:()=>r});const r=65e3},28236(e,t,s){"use strict";s.d(t,{$:()=>l});var r=s(27723),n=s(38013),o=s(30073),a=s(78607),i=s(10790);const __=r.__;function l(){return(0,i.jsxs)("div",{className:"nextdoor-preview__footer--actions",children:[(0,i.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,i.jsx)(o.p,{}),(0,i.jsx)("span",{children:__("Like","jetpack")})]}),(0,i.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,i.jsx)(n.T,{}),(0,i.jsx)("span",{children:__("Comment","jetpack")})]}),(0,i.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,i.jsx)(a.l,{}),(0,i.jsx)("span",{children:__("Share","jetpack")})]})]})}},96739(e,t,s){"use strict";s.d(t,{z:()=>n});var r=s(10790);function n(){return(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"#dfe1e4",fillRule:"evenodd",d:"M7.127 13.876a.732.732 0 1 0 1.035 1.035l4.75-4.749a.732.732 0 0 0 0-1.035L8.123 4.34A.732.732 0 0 0 7.09 5.375l4.27 4.27-4.232 4.23Z"})})}},38013(e,t,s){"use strict";s.d(t,{T:()=>n});var r=s(10790);function n(){return(0,r.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 10.031C2 5.596 5.574 2 10 2h4c4.427 0 8 3.596 8 8.031 0 4.435-3.573 8.031-8 8.031h-1.52a17.033 17.033 0 0 1-1.377 1.467c-.991.938-2.456 2.079-4.086 2.437a1.403 1.403 0 0 1-1.458-.565 1.55 1.55 0 0 1-.195-1.394c.28-.823.395-1.734.434-2.464.014-.257.018-.485.018-.672A8.017 8.017 0 0 1 2 10.031Zm5.798 6.178a7.02 7.02 0 0 1 .016.418c.005.252.004.606-.019 1.023-.03.573-.103 1.285-.266 2.024.775-.377 1.54-.974 2.202-1.598a15.066 15.066 0 0 0 1.448-1.586l.017-.022.003-.004a1 1 0 0 1 .801-.402h2c3.314 0 6-2.692 6-6.03C20 6.691 17.314 4 14 4h-4c-3.314 0-6 2.692-6 6.031 0 2.336 1.32 4.36 3.258 5.359.308.159.515.474.54.82Z",clipRule:"evenodd"})})}},84247(e,t,s){"use strict";s.d(t,{z:()=>n});var r=s(10790);function n(){return(0,r.jsx)("div",{className:"nextdoor-preview__default-image",children:(0,r.jsxs)("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",color:"#055c00",children:[(0,r.jsx)("path",{fill:"currentColor",d:"M13.207 5.207c1.51-1.51 4.076-1.51 5.586 0 1.51 1.51 1.51 4.076 0 5.586l-2.1 2.1c-1.51 1.51-4.077 1.51-5.586 0a1 1 0 1 0-1.414 1.414c2.29 2.29 6.123 2.29 8.414 0l2.1-2.1c2.29-2.29 2.29-6.124 0-8.414s-6.124-2.29-8.414 0l-.7.7a1 1 0 0 0 1.414 1.414l.7-.7Z"}),(0,r.jsx)("path",{fill:"currentColor",d:"M7.307 11.107c1.51-1.51 4.076-1.51 5.586 0a1 1 0 0 0 1.414-1.414c-2.29-2.29-6.124-2.29-8.414 0l-2.1 2.1c-2.29 2.29-2.29 6.123 0 8.414 2.29 2.29 6.124 2.29 8.414 0l.7-.7a1 1 0 0 0-1.414-1.414l-.7.7c-1.51 1.51-4.076 1.51-5.586 0-1.51-1.51-1.51-4.076 0-5.586l2.1-2.1Z"})]})})}},10569(e,t,s){"use strict";s.d(t,{f:()=>n});var r=s(10790);function n(){return(0,r.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.495-7.643c.286-.335.46-.357.505-.357.045 0 .219.022.505.357.282.33.581.868.852 1.619.464 1.283.79 3.034.872 5.024H9.771c.082-1.99.408-3.741.871-5.024.272-.751.571-1.289.854-1.62ZM7.77 11c.084-2.181.439-4.171.992-5.704.093-.255.192-.502.298-.738A8.009 8.009 0 0 0 4.062 11h3.707Zm-3.707 2h3.707c.084 2.181.439 4.171.992 5.704.093.255.192.502.298.738A8.009 8.009 0 0 1 4.062 13Zm15.876-2a8.009 8.009 0 0 0-4.997-6.442c.106.236.205.483.298.738.553 1.533.908 3.523.992 5.704h3.707Zm-3.707 2h3.707a8.009 8.009 0 0 1-4.997 6.442c.106-.236.205-.483.298-.738.553-1.533.908-3.523.992-5.704Zm-2.002 0c-.082 1.99-.408 3.741-.871 5.024-.272.751-.571 1.289-.854 1.62-.285.334-.46.356-.504.356-.045 0-.219-.022-.505-.357-.282-.33-.581-.868-.852-1.619-.464-1.283-.79-3.034-.872-5.024h4.458Z",clipRule:"evenodd"})})}},30073(e,t,s){"use strict";s.d(t,{p:()=>n});var r=s(10790);function n(){return(0,r.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.275 8.752a1.5 1.5 0 0 1-2.55 0C9.75 7.18 8.719 5.617 6.565 6.074 5.248 6.352 4 7.433 4 9.644c0 2.153 1.348 4.592 4.259 7.236A28.475 28.475 0 0 0 12 19.74a28.475 28.475 0 0 0 3.741-2.86C18.651 14.236 20 11.797 20 9.643c0-2.21-1.25-3.29-2.564-3.57-2.155-.456-3.187 1.106-4.16 2.68Zm-2.581-3.48C7.634 2.58 2 4.217 2 9.643c0 2.996 1.85 5.934 4.914 8.717 1.478 1.343 3.1 2.585 4.839 3.575a.5.5 0 0 0 .494 0c1.739-.99 3.361-2.232 4.84-3.575C20.148 15.577 22 12.64 22 9.643c0-5.426-5.634-7.062-8.694-4.371A5.287 5.287 0 0 0 12 7.04a5.287 5.287 0 0 0-1.306-1.77Z",clipRule:"evenodd"})})}},78607(e,t,s){"use strict";s.d(t,{l:()=>n});var r=s(10790);function n(){return(0,r.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.617 2.076a1 1 0 0 1 1.09.217l9 9a1 1 0 0 1 0 1.414l-9 9A1 1 0 0 1 11 21v-4.436c-2.849.366-5.261 2.271-6.384 4.837a1 1 0 0 1-1.856-.06C2.338 20.182 2 18.86 2 17.5a9.959 9.959 0 0 1 9-9.951V3a1 1 0 0 1 .617-.924ZM13 5.414V8.5a1 1 0 0 1-1 1c-4.448 0-8 3.552-8 8 0 .31.023.625.066.94C5.905 16.067 8.776 14.5 12 14.5a1 1 0 0 1 1 1v3.086L19.586 12 13 5.414Z",clipRule:"evenodd"})})}},26396(e,t,s){"use strict";s.d(t,{g:()=>a});var r=s(76223),n=s(94302),o=s(10790);function a(e){return(0,o.jsx)(n.K,{name:"",profileImage:"",...e,description:"",media:void 0,title:e.title||(0,r.X2)(e.description)})}},94302(e,t,s){"use strict";s.d(t,{K:()=>m});var r=s(27723),n=s(13022),o=s(50513),a=s(76223),i=s(28469),l=s(73192),c=s(28236),u=s(96739),d=s(84247),p=s(10569),h=(s(74587),s(10790));const __=r.__;function m({image:e,name:t,profileImage:s,description:r,neighborhood:m,media:g,title:f,url:b}){const v=!!g?.length;return(0,h.jsx)("div",{className:"nextdoor-preview__wrapper",children:(0,h.jsx)("section",{className:"nextdoor-preview__container "+(v?"has-media":""),children:(0,h.jsxs)("div",{className:"nextdoor-preview__content",children:[(0,h.jsxs)("div",{className:"nextdoor-preview__header",children:[(0,h.jsx)("div",{className:"nextdoor-preview__header--avatar",children:(0,h.jsx)(o._,{src:s})}),(0,h.jsxs)("div",{className:"nextdoor-preview__header--details",children:[(0,h.jsx)("div",{className:"nextdoor-preview__header--name",children:t||__("Account Name","jetpack")}),(0,h.jsxs)("div",{className:"nextdoor-preview__header--meta",children:[(0,h.jsx)("span",{children:m||__("Neighborhood","jetpack")}),(0,h.jsx)("span",{children:"•"}),(0,h.jsx)("span",{children:(0,a.tX)(Date.now())}),(0,h.jsx)("span",{children:"•"}),(0,h.jsx)(p.f,{})]})]})]}),(0,h.jsxs)("div",{className:"nextdoor-preview__body",children:[r?(0,h.jsxs)("div",{className:"nextdoor-preview__caption",children:[(0,h.jsx)("span",{children:(0,h.jsx)(i.MW,{text:r,children:e=>(0,a.x5)(e,{platform:"nextdoor",maxChars:l.v})})}),!v&&b&&!r.includes(b)&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("br",{}),(0,h.jsx)("br",{}),(0,h.jsx)("a",{href:b,rel:"nofollow noopener noreferrer",target:"_blank",children:b})]})]}):null,v?(0,h.jsx)("div",{className:"nextdoor-preview__media",children:g.map((e,t)=>(0,h.jsx)("div",{className:"nextdoor-preview__media-item",children:e?.type?.startsWith("video/")?(0,h.jsx)("video",{controls:!0,children:(0,h.jsx)("source",{src:e.url,type:e.type})}):(0,h.jsx)("img",{alt:e.alt||"",src:e.url})},`nextdoor-preview__media-item-${t}`))}):null,(0,h.jsxs)("article",{className:(0,n.A)("nextdoor-preview__card",{"small-preview":!e||v}),children:[e?(0,h.jsx)("img",{className:"nextdoor-preview__image",src:e,alt:""}):(0,h.jsx)(d.z,{}),b?(0,h.jsxs)("div",{className:"nextdoor-preview__description",children:[(0,h.jsx)("h2",{className:"nextdoor-preview__description--title",children:f||(0,a.X2)(r)}),(0,h.jsx)("span",{className:"nextdoor-preview__description--url",children:(0,a.GA)(b)})]}):null,v?(0,h.jsx)("div",{className:"nextdoor-preview__card--chevron-wrapper",children:(0,h.jsx)(u.z,{})}):null]})]}),(0,h.jsx)("div",{className:"nextdoor-preview__footer",children:(0,h.jsx)(c.$,{})})]})})})}},28469(e,t,s){"use strict";s.d(t,{MW:()=>l});var r=s(56427),n=s(27723),o=s(51609),a=s(76223),i=(s(47189),s(10790));const __=n.__;function l(e){const{text:t,children:s}=e,[n,l]=(0,o.useReducer)(e=>!e,!1),c=(0,a.$J)(t);if(function(e){return Array.from(e).length}(c)<=400)return(0,i.jsx)(i.Fragment,{children:s(t)});if(n)return(0,i.jsxs)(i.Fragment,{children:[s(t)," ",(0,i.jsx)(r.Button,{variant:"link",className:"social-previews__expand-toggle",onClick:l,children:__("See less","jetpack")})]});const u=function(e,t){const s=Array.from(e);if(s.length<=t)return e;const r=s.slice(0,t).join(""),n=r.lastIndexOf(" "),o=n>t-80?n:r.length;return r.slice(0,o)}(c,400);return(0,i.jsxs)(i.Fragment,{children:[s(u),"… ",(0,i.jsx)(r.Button,{variant:"link",className:"social-previews__expand-toggle",onClick:l,children:__("See more","jetpack")})]})}},92917(e,t,s){"use strict";s.d(t,{F:()=>i});var r=s(51609),n=s(83476),o=s(10790);function a({className:e}){return(0,o.jsx)("span",{className:e,"aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:"#e8eaed",color:"#5f6368",borderRadius:"50%"},children:(0,o.jsx)(n.f,{style:{width:"60%",height:"60%"}})})}function i({src:e,alt:t="",className:s,fallback:n=(0,o.jsx)(a,{className:s})}){const[i,l]=(0,r.useState)(""),c=(0,r.useCallback)(e=>{l(e.target.src)},[]);return e&&i!==e?(0,o.jsx)("img",{src:e,alt:t,onError:c,className:s}):n}},1795(e,t,s){"use strict";s.d(t,{Z:()=>i});var r=s(13022),n=s(76223),o=s(56678),a=s(10790);const i=({image:e,title:t,url:s})=>{const i=(0,r.A)({"threads-preview__card-has-image":!!e});return(0,a.jsx)("div",{className:"threads-preview__card",children:(0,a.jsxs)("div",{className:i,children:[e&&(0,a.jsx)("img",{className:"threads-preview__card-image",src:e,alt:""}),(0,a.jsxs)("div",{className:"threads-preview__card-body",children:[(0,a.jsx)("div",{className:"threads-preview__card-url",children:(0,n.GA)(s||"")}),(0,a.jsx)("div",{className:"threads-preview__card-title",children:(0,o.c)(t)})]})]})})}},27068(e,t,s){"use strict";s.d(t,{w:()=>n});var r=s(10790);const n=()=>(0,r.jsxs)("div",{className:"threads-preview__footer",children:[(0,r.jsx)("span",{className:"threads-preview__icon--like",children:(0,r.jsx)("svg",{role:"img",viewBox:"0 0 18 18",children:(0,r.jsx)("path",{d:"M1.34375 7.53125L1.34375 7.54043C1.34374 8.04211 1.34372 8.76295 1.6611 9.65585C1.9795 10.5516 2.60026 11.5779 3.77681 12.7544C5.59273 14.5704 7.58105 16.0215 8.33387 16.5497C8.73525 16.8313 9.26573 16.8313 9.66705 16.5496C10.4197 16.0213 12.4074 14.5703 14.2232 12.7544C15.3997 11.5779 16.0205 10.5516 16.3389 9.65585C16.6563 8.76296 16.6563 8.04211 16.6562 7.54043V7.53125C16.6562 5.23466 15.0849 3.25 12.6562 3.25C11.5214 3.25 10.6433 3.78244 9.99228 4.45476C9.59009 4.87012 9.26356 5.3491 9 5.81533C8.73645 5.3491 8.40991 4.87012 8.00772 4.45476C7.35672 3.78244 6.47861 3.25 5.34375 3.25C2.9151 3.25 1.34375 5.23466 1.34375 7.53125Z",strokeWidth:"1.25"})})}),(0,r.jsx)("span",{className:"threads-preview__icon--reply",children:(0,r.jsx)("svg",{role:"img",viewBox:"0 0 18 18",children:(0,r.jsx)("path",{d:"M15.376 13.2177L16.2861 16.7955L12.7106 15.8848C12.6781 15.8848 12.6131 15.8848 12.5806 15.8848C11.3779 16.5678 9.94767 16.8931 8.41995 16.7955C4.94194 16.5353 2.08152 13.7381 1.72397 10.2578C1.2689 5.63919 5.13697 1.76863 9.75264 2.22399C13.2307 2.58177 16.0261 5.41151 16.2861 8.92429C16.4161 10.453 16.0586 11.8841 15.376 13.0876C15.376 13.1526 15.376 13.1852 15.376 13.2177Z",strokeLinejoin:"round",strokeWidth:"1.25"})})}),(0,r.jsx)("span",{className:"threads-preview__icon--repost",children:(0,r.jsxs)("svg",{role:"img",viewBox:"0 0 18 18",children:[(0,r.jsx)("path",{d:"M6.41256 1.23531C6.6349 0.971277 7.02918 0.937481 7.29321 1.15982L9.96509 3.40982C10.1022 3.52528 10.1831 3.69404 10.1873 3.87324C10.1915 4.05243 10.1186 4.2248 9.98706 4.34656L7.31518 6.81971C7.06186 7.05419 6.66643 7.03892 6.43196 6.7856C6.19748 6.53228 6.21275 6.13685 6.46607 5.90237L7.9672 4.51289H5.20312C3.68434 4.51289 2.45312 5.74411 2.45312 7.26289V9.51289V11.7629C2.45312 13.2817 3.68434 14.5129 5.20312 14.5129C5.5483 14.5129 5.82812 14.7927 5.82812 15.1379C5.82812 15.4831 5.5483 15.7629 5.20312 15.7629C2.99399 15.7629 1.20312 13.972 1.20312 11.7629V9.51289V7.26289C1.20312 5.05375 2.99399 3.26289 5.20312 3.26289H7.85002L6.48804 2.11596C6.22401 1.89362 6.19021 1.49934 6.41256 1.23531Z"}),(0,r.jsx)("path",{d:"M11.5874 17.7904C11.3651 18.0545 10.9708 18.0883 10.7068 17.8659L8.03491 15.6159C7.89781 15.5005 7.81687 15.3317 7.81267 15.1525C7.80847 14.9733 7.8814 14.801 8.01294 14.6792L10.6848 12.206C10.9381 11.9716 11.3336 11.9868 11.568 12.2402C11.8025 12.4935 11.7872 12.8889 11.5339 13.1234L10.0328 14.5129H12.7969C14.3157 14.5129 15.5469 13.2816 15.5469 11.7629V9.51286V7.26286C15.5469 5.74408 14.3157 4.51286 12.7969 4.51286C12.4517 4.51286 12.1719 4.23304 12.1719 3.88786C12.1719 3.54269 12.4517 3.26286 12.7969 3.26286C15.006 3.26286 16.7969 5.05373 16.7969 7.26286V9.51286V11.7629C16.7969 13.972 15.006 15.7629 12.7969 15.7629H10.15L11.512 16.9098C11.776 17.1321 11.8098 17.5264 11.5874 17.7904Z"})]})}),(0,r.jsx)("span",{className:"threads-preview__icon--share",children:(0,r.jsxs)("svg",{role:"img",viewBox:"0 0 18 18",children:[(0,r.jsx)("path",{d:"M15.6097 4.09082L6.65039 9.11104",strokeLinejoin:"round",strokeWidth:"1.25"}),(0,r.jsx)("path",{d:"M7.79128 14.439C8.00463 15.3275 8.11131 15.7718 8.33426 15.932C8.52764 16.071 8.77617 16.1081 9.00173 16.0318C9.26179 15.9438 9.49373 15.5501 9.95761 14.7628L15.5444 5.2809C15.8883 4.69727 16.0603 4.40546 16.0365 4.16566C16.0159 3.95653 15.9071 3.76612 15.7374 3.64215C15.5428 3.5 15.2041 3.5 14.5267 3.5H3.71404C2.81451 3.5 2.36474 3.5 2.15744 3.67754C1.97758 3.83158 1.88253 4.06254 1.90186 4.29856C1.92415 4.57059 2.24363 4.88716 2.88259 5.52032L6.11593 8.7243C6.26394 8.87097 6.33795 8.94431 6.39784 9.02755C6.451 9.10144 6.4958 9.18101 6.53142 9.26479C6.57153 9.35916 6.59586 9.46047 6.64451 9.66309L7.79128 14.439Z",strokeLinejoin:"round",strokeWidth:"1.25"})]})})]})},18350(e,t,s){"use strict";s.d(t,{Y:()=>a});var r=s(27723),n=s(76223),o=s(10790);const __=r.__,a=({name:e,date:t})=>{const s=t||new Date;return(0,o.jsxs)("div",{className:"threads-preview__header",children:[(0,o.jsx)("span",{className:"threads-preview__name",children:e||__("Account Name","jetpack")}),(0,o.jsx)("time",{className:"threads-preview__date",dateTime:s.toISOString(),children:(0,n.vI)(s)})]})}},56678(e,t,s){"use strict";s.d(t,{_:()=>n,c:()=>o});var r=s(76223);const n=500,o=e=>(0,r.RA)((0,r.f5)(120),(0,r.ZT)(120))((0,r.$J)(e))||""},8450(e,t,s){"use strict";s.d(t,{G:()=>a});var r=s(27723),n=s(59028),o=s(10790);const __=r.__,a=e=>e.image?(0,o.jsx)(n.s,{...e,caption:"",media:void 0}):(0,o.jsx)("p",{className:"social-preview__section-desc",children:__("Threads link preview requires an image to be set for the post. Please add an image to see the preview.","jetpack")})},97241(e,t,s){"use strict";s.d(t,{$:()=>a});var r=s(13022),n=s(51609),o=s(10790);const a=({media:e})=>{const t=e.filter(e=>e.type.startsWith("image/")||e.type.startsWith("video/")).filter((e,t,s)=>0===t||!s[0].type.startsWith("video/")&&"image/gif"!==s[0].type&&(!e.type.startsWith("video/")&&"image/gif"!==e.type)).slice(0,4);if(0===t.length)return null;const s=t[0].type.startsWith("video/"),a=(0,r.A)(["threads-preview__media","threads-preview__media-children-"+t.length]);return(0,o.jsx)("div",{className:a,children:t.map((e,t)=>(0,o.jsx)(n.Fragment,{children:s?(0,o.jsx)("video",{controls:!0,children:(0,o.jsx)("source",{src:e.url,type:e.type})}):(0,o.jsx)("img",{alt:e.alt||"",src:e.url})},`threads-preview__media-item-${t}`))})}},59028(e,t,s){"use strict";s.d(t,{s:()=>p});var r=s(76223),n=s(28469),o=s(1795),a=s(27068),i=s(18350),l=s(56678),c=s(97241),u=s(34413),d=(s(3269),s(10790));const p=({caption:e,date:t,image:s,media:p,name:h,profileImage:m,showThreadConnector:g,title:f,url:b})=>{const v=!!p?.length,k=b&&s&&!v;return(0,d.jsx)("div",{className:"threads-preview__wrapper",children:(0,d.jsxs)("div",{className:"threads-preview__container",children:[(0,d.jsx)(u.B,{profileImage:m,showThreadConnector:g}),(0,d.jsxs)("div",{className:"threads-preview__main",children:[(0,d.jsx)(i.Y,{name:h,date:t}),(0,d.jsxs)("div",{className:"threads-preview__content",children:[e?(0,d.jsx)("div",{className:"threads-preview__text",children:(0,d.jsx)(n.MW,{text:e,children:e=>(0,r.x5)(e,{platform:"threads",maxChars:l._})})}):null,v?(0,d.jsx)(c.$,{media:p}):null,k?(0,d.jsx)(o.Z,{image:s,title:f||"",url:b}):null]}),(0,d.jsx)(a.w,{})]})]})})}},34413(e,t,s){"use strict";s.d(t,{B:()=>a});var r=s(27723),n=s(50513),o=s(10790);const __=r.__,a=({profileImage:e,showThreadConnector:t})=>(0,o.jsxs)("div",{className:"threads-preview__sidebar",children:[(0,o.jsx)("div",{className:"threads-preview__profile-image",children:(0,o.jsx)(n._,{alt:__("Threads profile image","jetpack"),src:e})}),t&&(0,o.jsx)("div",{className:"threads-preview__connector"})]})},42475(e,t,s){"use strict";s.d(t,{ZH:()=>o,fO:()=>a});var r=s(76223);const n=4096,o=e=>(0,r.RA)((0,r.f5)(1e3),(0,r.ZT)(1e3))((0,r.$J)(e))||"",a=e=>{let t=e,s=t.indexOf("\x3c!--");for(;-1!==s;){const e=t.indexOf("--\x3e",s);if(-1===e){t=t.substring(0,s);break}t=t.substring(0,s)+t.substring(e+3),s=t.indexOf("\x3c!--")}return t=t.replace(/<\/p>/g,"

    \n\n"),(0,r.RA)((0,r.f5)(n),(0,r.ZT)(n))((0,r.$J)(t))||""}},86587(e,t,s){"use strict";s.d(t,{Z:()=>c});var r=s(27723),n=s(76223),o=s(42475),a=s(21523),i=s(70793),l=(s(12069),s(10790));const __=r.__,c=({title:e,description:t,image:s,user:r,url:c})=>{const u=r?.avatarUrl;return(0,l.jsxs)("div",{className:"tumblr-preview__post",children:[u&&(0,l.jsx)("img",{className:"tumblr-preview__avatar",src:u,alt:""}),(0,l.jsxs)("div",{className:"tumblr-preview__card",children:[(0,l.jsx)(i.A,{user:r}),(0,l.jsxs)("div",{className:"tumblr-preview__window",children:[s&&(0,l.jsxs)("div",{className:"tumblr-preview__window-top",children:[(0,l.jsx)("div",{className:"tumblr-preview__overlay",children:(0,l.jsx)("div",{className:"tumblr-preview__title",children:(0,o.ZH)(e)})}),(0,l.jsx)("img",{className:"tumblr-preview__image",src:s,alt:__("Tumblr preview thumbnail","jetpack")})]}),(0,l.jsxs)("div",{className:"tumblr-preview__window-bottom "+(s?"":"is-full"),children:[!s&&(0,l.jsx)("div",{className:"tumblr-preview__title",children:(0,o.ZH)(e)}),t&&s&&(0,l.jsx)("div",{className:"tumblr-preview__description",children:(0,o.fO)(t)}),c&&(0,l.jsx)("div",{className:"tumblr-preview__site-name",children:(0,n.GA)(c)})]})]}),(0,l.jsx)(a.A,{})]})]})}},21523(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(27723),n=s(17712),o=(s(6692),s(10790));const __=r.__,a=()=>(0,o.jsxs)("div",{className:"tumblr-preview__post-actions",children:[(0,o.jsxs)("div",{className:"tumblr-preview__post-manage-actions",children:[(0,o.jsxs)("div",{className:"tumblr-preview__post-actions-blaze",children:[(0,o.jsx)(n.A,{name:"blaze"})," Blaze"]}),(0,o.jsx)("ul",{children:[{icon:"delete", // translators: "Delete" action on a Tumblr post label:__("Delete","jetpack")},{icon:"edit", // translators: "Edit" action on a Tumblr post label:__("Edit","jetpack")}].map(({icon:e,label:t})=>(0,o.jsx)("li",{"aria-label":t,children:(0,o.jsx)(n.A,{name:e})},e))})]}),(0,o.jsxs)("div",{className:"tumblr-preview__post-social-actions",children:[(0,o.jsx)("div",{children: // translators: count of notes on a Tumblr post __("0 notes","jetpack")}),(0,o.jsx)("ul",{children:[{icon:"share", // translators: "Share" action on a Tumblr post label:__("Share","jetpack")},{icon:"reply", // translators: "Reply" action on a Tumblr post label:__("Reply","jetpack")},{icon:"reblog", // translators: "Reblog" action on a Tumblr post label:__("Reblog","jetpack")},{icon:"like", // translators: "Like" action on a Tumblr post label:__("Like","jetpack")}].map(({icon:e,label:t})=>(0,o.jsx)("li",{"aria-label":t,children:(0,o.jsx)(n.A,{name:e})},e))})]})]})},70793(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(27723),n=s(17712),o=(s(95178),s(10790));const __=r.__,a=({user:e})=>(0,o.jsxs)("div",{className:"tumblr-preview__post-header",children:[(0,o.jsx)("div",{className:"tumblr-preview__post-header-username",children:e?.displayName|| // translators: username of a fictional Tumblr User __("anonymous-user","jetpack")}),(0,o.jsx)(n.A,{name:"ellipsis"})]})},17712(e,t,s){"use strict";s.d(t,{A:()=>n});s(13951);var r=s(10790);const n=({name:e})=>{let t;switch(e){case"blaze":t=(0,r.jsx)("svg",{viewBox:"0 0 25 22",children:(0,r.jsx)("path",{d:"m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z"})});break;case"delete":t=(0,r.jsxs)("svg",{viewBox:"0 0 14 17",children:[(0,r.jsx)("path",{d:"M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z"}),(0,r.jsx)("path",{d:"M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z"})]});break;case"edit":t=(0,r.jsx)("svg",{viewBox:"0 0 17.6 17.6",children:(0,r.jsx)("path",{d:"M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5"})});break;case"share":t=(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z"})});break;case"reply":t=(0,r.jsx)("svg",{viewBox:"0 0 17 17",children:(0,r.jsx)("path",{d:"M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z"})});break;case"reblog":t=(0,r.jsx)("svg",{viewBox:"0 0 17 18.1",children:(0,r.jsx)("path",{d:"M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z"})});break;case"like":t=(0,r.jsx)("svg",{viewBox:"0 0 20 18",children:(0,r.jsx)("path",{d:"M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z"})});break;case"ellipsis":t=(0,r.jsx)("svg",{viewBox:"0 0 17.5 3.9",children:(0,r.jsx)("path",{d:"M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9"})})}return(0,r.jsx)("span",{className:`tumblr-preview__post-icon tumblr-preview__post-icon-${e}`,children:t})}},58513(e,t,s){"use strict";s.d(t,{Z:()=>i});var r=s(13022),n=s(76223),o=s(10790);const a=(0,n.RA)((0,n.f5)(280),(0,n.ZT)(280)),i=({description:e,image:t,title:s,cardType:i,url:l})=>{const c=(0,r.A)(`twitter-preview__card-${i}`,{"twitter-preview__card-has-image":!!t});return(0,o.jsx)("div",{className:"twitter-preview__card",children:(0,o.jsxs)("div",{className:c,children:[t&&(0,o.jsx)("img",{className:"twitter-preview__card-image",src:t,alt:""}),(0,o.jsxs)("div",{className:"twitter-preview__card-body",children:[(0,o.jsx)("div",{className:"twitter-preview__card-url",children:(0,n.GA)(l||"")}),(0,o.jsx)("div",{className:"twitter-preview__card-title",children:s}),(0,o.jsx)("div",{className:"twitter-preview__card-description",children:a((0,n.$J)(e))})]})]})})}},32250(e,t,s){"use strict";s.d(t,{w:()=>n});var r=s(10790);const n=()=>(0,r.jsxs)("div",{className:"twitter-preview__footer",children:[(0,r.jsx)("span",{className:"twitter-preview__icon-replies",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-retweets",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-likes",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-analytics",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M8.75 21V3h2v18h-2zM18 21V8.5h2V21h-2zM4 21l.004-10h2L6 21H4zm9.248 0v-7h2v7h-2z"})})}),(0,r.jsx)("span",{className:"twitter-preview__icon-share",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12 2.59l5.7 5.7-1.41 1.42L13 6.41V16h-2V6.41l-3.3 3.3-1.41-1.42L12 2.59zM21 15l-.02 3.51c0 1.38-1.12 2.49-2.5 2.49H5.5C4.11 21 3 19.88 3 18.5V15h2v3.5c0 .28.22.5.5.5h12.98c.28 0 .5-.22.5-.5L19 15h2z"})})})]})},55664(e,t,s){"use strict";s.d(t,{Y:()=>a});var r=s(27723),n=s(76223),o=s(10790);const __=r.__,a=({name:e,screenName:t,date:s})=>(0,o.jsxs)("div",{className:"twitter-preview__header",children:[(0,o.jsx)("span",{className:"twitter-preview__name",children:e||__("Account Name","jetpack")}),(0,o.jsx)("span",{className:"twitter-preview__screen-name",children:t||"@account"}),(0,o.jsx)("span",{children:"·"}),(0,o.jsx)("span",{className:"twitter-preview__date",children:(0,n.hV)(s||Date.now())})]})},34900(e,t,s){"use strict";s.d(t,{E:()=>o});var r=s(18470),n=s(10790);const o=e=>(0,n.jsx)(r.O,{...e,text:"",media:void 0})},55971(e,t,s){"use strict";s.d(t,{$:()=>a});var r=s(13022),n=s(51609),o=s(10790);const a=({media:e})=>{const t=e.filter(e=>e.type.startsWith("image/")||e.type.startsWith("video/")).filter((e,t,s)=>0===t||!s[0].type.startsWith("video/")&&"image/gif"!==s[0].type&&(!e.type.startsWith("video/")&&"image/gif"!==e.type)).slice(0,4);if(0===t.length)return null;const s=t[0].type.startsWith("video/"),a=(0,r.A)(["twitter-preview__media","twitter-preview__media-children-"+t.length]);return(0,o.jsx)("div",{className:a,children:t.map((e,t)=>(0,o.jsx)(n.Fragment,{children:s?(0,o.jsx)("video",{controls:!0,children:(0,o.jsx)("source",{src:e.url,type:e.type})}):(0,o.jsx)("img",{alt:e.alt||"",src:e.url})},`twitter-preview__media-item-${t}`))})}},18470(e,t,s){"use strict";s.d(t,{O:()=>d});var r=s(58513),n=s(32250),o=s(55664),a=s(55971),i=s(68535),l=s(17915),c=s(11974),u=(s(68579),s(10790));const d=({date:e,description:t,image:s,media:d,name:p,profileImage:h,screenName:m,showThreadConnector:g,text:f,title:b,tweetUrl:v,cardType:k,url:y})=>{const x=!!d?.length;return(0,u.jsx)("div",{className:"twitter-preview__wrapper",children:(0,u.jsxs)("div",{className:"twitter-preview__container",children:[(0,u.jsx)(l.B,{profileImage:h,showThreadConnector:g}),(0,u.jsxs)("div",{className:"twitter-preview__main",children:[(0,u.jsx)(o.Y,{name:p,screenName:m,date:e}),(0,u.jsxs)("div",{className:"twitter-preview__content",children:[f?(0,u.jsx)(c.E,{text:f}):null,x?(0,u.jsx)(a.$,{media:d}):null,v?(0,u.jsx)(i.g,{tweetUrl:v}):null,!x&&y&&(0,u.jsx)(r.Z,{description:t||"",image:s,title:b||"",cardType:k||"",url:y})]}),(0,u.jsx)(n.w,{})]})]})})}},68535(e,t,s){"use strict";s.d(t,{g:()=>o});var r=s(56427),n=s(10790);const o=({tweetUrl:e})=>e?(0,n.jsxs)("div",{className:"twitter-preview__quote-tweet",children:[(0,n.jsx)(r.SandBox,{html:``,scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet"}),(0,n.jsx)("div",{className:"twitter-preview__quote-tweet-overlay"})]}):null},17915(e,t,s){"use strict";s.d(t,{B:()=>o});var r=s(50513),n=s(10790);const o=({profileImage:e,showThreadConnector:t})=>(0,n.jsxs)("div",{className:"twitter-preview__sidebar",children:[(0,n.jsx)("div",{className:"twitter-preview__profile-image",children:(0,n.jsx)(r._,{src:e})}),t&&(0,n.jsx)("div",{className:"twitter-preview__connector"})]})},11974(e,t,s){"use strict";s.d(t,{E:()=>o});var r=s(76223),n=s(10790);const o=({text:e})=>e?(0,n.jsx)("div",{className:"twitter-preview__text",children:(0,r.x5)(e,{platform:"twitter"})}):null},70499(e,t,s){"use strict";s.d(t,{m2:()=>r.m});s(60361);var r=s(69490);s(54914)},69490(e,t,s){"use strict";s.d(t,{m:()=>p});var r=s(56427),n=s(27723),o=s(13022),a=s(51609),i=s(48984),l=s(69084),c=s(60361),u=s(10790);const __=n.__;function d({previewData:e,initialTabName:t,title:s,className:n,...a}){const d=(0,i.q)();return(0,u.jsx)(r.Modal,{title:s||__("Previews","jetpack"),size:"fill",className:(0,o.A)(l.A["link-preview-modal"],n),...a,children:(0,u.jsx)(c.T,{initialTabName:t,...d,...e})})}function p({triggerButtonProps:e,...t}){const[s,n]=(0,a.useReducer)(e=>!e,!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.Button,{variant:"secondary",size:"compact",...e,onClick:n,children:e?.children||__("View previews","jetpack")}),s&&(0,u.jsx)(d,{...t,onRequestClose:n})]})}},60361(e,t,s){"use strict";s.d(t,{T:()=>i});var r=s(56427),n=s(69084),o=s(54914),a=s(10790);function i({initialTabName:e,...t}){const s=(0,o.g)();return(0,a.jsx)(r.TabPanel,{tabs:s,initialTabName:e,className:n.A["link-preview-tabs"],children:e=>(0,a.jsx)("div",{className:n.A["link-preview-tab"],children:(0,a.jsx)(e.preview,{...t})})})}},54914(e,t,s){"use strict";s.d(t,{g:()=>f});var r=s(54560),n=s(34900),o=s(8450),a=s(77123),i=s(26396),l=s(86587),c=s(5874),u=s(89014),d=s(66901),p=s(27723),h=s(51609),m=s(84705),g=s(10790);const __=p.__,_x=p._x;function f(){return(0,h.useMemo)(()=>[{title:__("Google Search","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"google"}),name:"google",preview:r.m},{title:__("X","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"x"}),name:"x",preview:n.E},{title:__("Facebook","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"facebook"}),name:"facebook",preview:d.l},{title:_x("Threads","The name of the social media network - threads.net","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"threads"}),name:"threads",preview:o.G},{title:__("LinkedIn","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"linkedin"}),name:"linkedin",preview:e=>(0,g.jsx)(a.X,{jobTitle:__("Job Title (Company Name)","jetpack"),...e})},{title:__("Nextdoor","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"nextdoor"}),name:"nextdoor",preview:i.g},{title:__("Tumblr","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"tumblr"}),name:"tumblr",preview:l.Z},{title:__("Mastodon","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"mastodon"}),name:"mastodon",preview:c.i},{title:__("Bluesky","jetpack"),icon:(0,g.jsx)(m.d6,{icon:"bluesky"}),name:"bluesky",preview:u.c}],[])}},48984(e,t,s){"use strict";s.d(t,{q:()=>d});var r=s(3582),n=s(47143),o=s(43656),a=s(18537),i=s(27723),l=s(51609),c=s(84282),u=s(92421);const __=i.__;function d(){const e=(0,n.useSelect)(e=>{const{getEditedPostAttribute:t}=e(o.store);return(t("meta")?.advanced_seo_description||t("excerpt")||t("content").split("\x3c!--more")[0]||__("Visit the post for more.","jetpack")||"").trim()},[]),t=(0,n.useSelect)(e=>{const t=e(o.store).getEditedPostAttribute("meta"),{getEntityRecord:s}=e(r.store),n=e(o.store).getEditedPostAttribute("featured_media");let a=n?(0,u.l)(s("postType","attachment",n)):"";const i=t.jetpack_social_options?.image_generator_settings?.enabled?(0,c.S1)(t.jetpack_social_options.image_generator_settings.token):"";if(i&&(a=i),!a){const t=(0,u.t)(e(o.store).getEditedPostContent());t&&(a=t)}return a},[]),{siteTitle:s,siteIcon:i}=(0,n.useSelect)(e=>{const{getUnstableBase:t}=e(r.store),s=t(void 0);return{siteTitle:s?.name||"",siteIcon:s?.site_icon_url||""}},[]),d=(0,n.useSelect)(e=>{const{getEditedPostAttribute:t}=e(o.store);return(t("meta")?.jetpack_seo_html_title||t("title")||"").trim()},[]),p=(0,n.useSelect)(e=>e(o.store).getEditedPostAttribute("link"),[]);return(0,l.useMemo)(()=>({description:(0,a.decodeEntities)(e),image:t,siteIcon:i,siteTitle:(0,a.decodeEntities)(s),title:(0,a.decodeEntities)(d),url:p}),[e,t,i,s,d,p])}},92421(e,t,s){"use strict";function r(e){return e?e.media_details?.sizes?.large?.source_url||e.source_url:""}function n(e){const t=(new DOMParser).parseFromString(e,"text/html"),s=Array.from(t.querySelectorAll("img")),r=s[0]?.src;return r??null}s.d(t,{l:()=>r,t:()=>n})},84282(e,t,s){"use strict";s.d(t,{S1:()=>n});var r=s(3924);function n(e){return e?(0,r.A)("sigenerate",{query:`t=${e}`}):""}},52068(e,t,s){"use strict";s.d(t,{Ay:()=>j});var r=s(96865),n=s(56427),o=s(47143),a=s(27723),i=s(55565),l=s(73493),c=s(93761),u=s(90437),d=s(80224),p=s(27571),h=s(48499),m=s(2162),g=s(62402),f=(s(34927),s(10790));const __=a.__,b="correct-spelling",v="simplify",k="make-longer",y="make-shorter",x={default:[{name:r.DD,key:b,aiSuggestion:r.yy,icon:d.A}],"core/paragraph":[{name:r.HM,key:v,aiSuggestion:r.A4,icon:u.A},{name:r.JR,key:"summarize",aiSuggestion:r.UA,icon:c.A},{name:r.K2,key:k,aiSuggestion:r.br,icon:l.A},{name:r.UD,key:y,aiSuggestion:r.fD,icon:l.A}],"core/list-item":[{name:r.HM,key:v,aiSuggestion:r.A4,icon:u.A},{name:r.K2,key:k,aiSuggestion:r.br,icon:l.A},{name:r.UD,key:y,aiSuggestion:r.fD,icon:l.A}],"core/list":p.L.includes("core/list")?[{name:r.HM,key:v,aiSuggestion:r.A4,icon:u.A},{name:r.K2,key:k,aiSuggestion:r.br,icon:l.A},{name:r.UD,key:y,aiSuggestion:r.fD,icon:l.A},{name:r.mI,key:"turn-list-into-table",aiSuggestion:r.d5,icon:i.A,options:{alwaysTransformToAIAssistant:!0,rootParentOnly:!0}}]:[{name:r.yQ,key:"write-post-from-list",aiSuggestion:r.pE,icon:u.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 j({blockType:e,clientId:t,disabled:s=!1,onAskAiAssistant:a,onRequestSuggestion:i}){const l=(0,h.C)("ai-correct-spelling"),c=x[e]??[],{getBlockParents:u}=(0,o.select)("core/block-editor"),d=u(t);return(0,f.jsxs)(f.Fragment,{children:[s&&(0,f.jsx)(n.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info",children:__("Add content to activate the tools below","jetpack")}),(0,f.jsxs)(n.MenuGroup,{children:[(0,f.jsx)(n.MenuItem,{icon:r.cj,iconPosition:"left",onClick:a,disabled:s,children:(0,f.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:__("Ask AI Assistant","jetpack")})},"key-ai-assistant"),[...x.default,...c].filter(e=>!(e.options?.rootParentOnly&&d.length>0||e.key===b&&!l)).map(e=>(0,f.jsx)(n.MenuItem,{icon:e?.icon,iconPosition:"left",onClick:()=>{i(e.aiSuggestion,{...e.options??{}})},disabled:s,children:(0,f.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:e.name})},`key-${e.key}`)),(0,f.jsx)(g.hN,{onChange:e=>{i(r.eJ,{tone:e})},disabled:s}),(0,f.jsx)(m.HU,{onChange:e=>{i(r.Gm,{language:e})},disabled:s})]})]})}},32249(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(3924),n=s(56427),o=s(27723),a=(s(26233),s(10790));const __=o.__;const i=function(){const e=(0,r.A)("jetpack-ai-feedback");return(0,a.jsx)("div",{className:"jetpack-ai-feedback-control",children:(0,a.jsxs)(n.BaseControl,{children:[(0,a.jsx)(n.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)(n.ExternalLink,{href:e,children:__("Share your feedback","jetpack")})]})})}},2162(e,t,s){"use strict";s.d(t,{Ay:()=>g,HU:()=>f});var r=s(96865),n=s(85985),o=s(56427),a=s(27723),i=s(13109),l=s(48329),c=s(41490),u=(s(50920),s(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 s=[...d.filter(e=>e!==h)];return d.includes(h)&&s.unshift(h),(0,u.jsx)(o.MenuGroup,{label:__("Select language","jetpack"),children:s.map(s=>(0,u.jsx)(o.MenuItem,{onClick:()=>t(s+" ("+r.so[s].label+")"),isSelected:e===s,children:r.so[s].label},`key-${s}`))})});function g({value:e=h,label:t=r.u0,onChange:s,disabled:a=!1}){const{tracks:l}=(0,n.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:c.A})})}):(0,u.jsx)(o.ToolbarDropdownMenu,{icon:c.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&l.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})},children:()=>(0,u.jsx)(m,{value:e,onChange:s})})}function f({value:e=h,label:t=r.u0,onChange:s,disabled:n=!1}){return(0,u.jsx)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:c.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:l.A})]}),disabled:n},children:({onClose:t})=>(0,u.jsx)(m,{onChange:(...e)=>{s(...e),t()},value:e})})}},99050(e,t,s){"use strict";s.d(t,{Ay:()=>u});var r=s(96865),n=s(85985),o=s(56427),a=s(27723),i=s(33196),l=s(10790);const __=a.__,c=[{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:r.UA},{name:__("Make longer","jetpack"),key:"make-longer",aiSuggestion:r.br},{name:__("Make shorter","jetpack"),key:"make-shorter",aiSuggestion:r.fD}];function u({key:e,label:t=__("Improve","jetpack"),exclude:s=[],onChange:r,disabled:a=!1}){const{tracks:u}=(0,n.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 n=c.filter(e=>!s.includes(e.key));return(0,l.jsx)(o.MenuGroup,{label:t,children:n.map(t=>(0,l.jsx)(o.MenuItem,{onClick:()=>r(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key,children:t.name},`key-${t.key}`))})}})}},33468(e,t,s){"use strict";s.d(t,{Ay:()=>b});var r=s(96865),n=s(85985),o=s(56427),a=s(27723),i=s(33196),l=s(73493),c=s(93761),u=s(90437),d=s(80224),p=s(55507),h=s(48499),m=s(10790);const __=a.__,g=[{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")+" "}}],f=[{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 b({hasContentBefore:e,hasContent:t,hasPostTitle:s,contentIsLoaded:a,onPromptSelect:b,onSuggestionSelect:v}){const k=__("Write with AI…","jetpack"),y=(0,h.C)("ai-correct-spelling"),{tracks:x}=(0,n.st)();return(0,m.jsx)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:k,text:k,onToggle:e=>{e&&x.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})},children:({onClose:n})=>a?(0,m.jsx)(o.MenuGroup,{label:__("Write…","jetpack"),children:f.map((e,t)=>(0,m.jsx)(o.MenuItem,{icon:i.A,iconPosition:"left",onClick:()=>{n(),b(e.description)},children:e.label},`key-${t}`))}):(0,m.jsxs)(m.Fragment,{children:[e&&(0,m.jsxs)(o.MenuGroup,{label:__("Based on preceding content…","jetpack"),children:[(0,m.jsx)(o.MenuItem,{icon:l.A,iconPosition:"left",onClick:()=>v(r.sn),children:r.DT}),y&&(0,m.jsx)(o.MenuItem,{icon:d.A,iconPosition:"left",onClick:()=>v(r.yy),children:r.DD}),(0,m.jsx)(o.MenuItem,{icon:u.A,iconPosition:"left",onClick:()=>v(r.A4),children:r.HM})]}),t&&(0,m.jsxs)(o.MenuGroup,{label:__("Based on entire content…","jetpack"),children:[t&&(0,m.jsx)(o.MenuItem,{icon:c.A,iconPosition:"left",onClick:()=>v(r.UA),children:r.JR}),t&&(0,m.jsx)(o.MenuItem,{icon:p.A,iconPosition:"left",onClick:()=>v(r.vE),children:r.mT})]}),(0,m.jsxs)(o.MenuGroup,{label:__("Write…","jetpack"),children:[s&&(0,m.jsx)(o.MenuItem,{icon:i.A,iconPosition:"left",onClick:()=>v(r.im),children:r.Rq}),g.map((e,t)=>(0,m.jsx)(o.MenuItem,{icon:i.A,iconPosition:"left",onClick:()=>{n(),b(e.description)},children:e.label},`key-${t}`))]})]})})}},62402(e,t,s){"use strict";s.d(t,{Ay:()=>h,US:()=>u,hN:()=>p});var r=s(96865),n=s(85985),o=s(56427),a=s(27723),i=s(48329),l=(s(45608),s(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(s=>(0,l.jsx)(o.MenuItem,{onClick:()=>t(s),isSelected:e===s,children:`${r.oZ[s].emoji} ${r.oZ[s].label}`},`key-${s}`))});function p({label:e=r.uQ,value:t=u,onChange:s,disabled:n=!1}){return(0,l.jsx)(o.DropdownMenu,{icon:r.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:n},children:({onClose:e})=>(0,l.jsx)(d,{value:t,onChange:t=>{s(t),e()}})})}function h({value:e=u,onChange:t,disabled:s=!1}){const{tracks:a}=(0,n.st)();return s?(0,l.jsx)(o.Tooltip,{text:r.uQ,children:(0,l.jsx)(o.Button,{disabled:!0,children:(0,l.jsx)(o.Icon,{icon:r.Qr})})}):(0,l.jsx)(o.ToolbarDropdownMenu,{icon:r.Qr,label:r.uQ,popoverProps:{variant:"toolbar"},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,s){"use strict";s.d(t,{A:()=>m});var r=s(96865),n=s(94715),o=s(56427),a=s(27723),i=s(88901),l=s(60484),c=s(2162),u=s(99050),d=s(33468),p=s(62402),h=s(10790);const __=a.__,m=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:s,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)(n.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)(n.BlockControls,{group:"block",children:[(0,h.jsx)(p.Ay,{value:"neutral",onChange:s=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:r.eJ}),t(r.eJ,{tone:s,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(c.Ay,{value:"en",onChange:s=>{y("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:r.Gm}),t(r.Gm,{language:s,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:s,children:__("Retry","jetpack")})]})]})})},3586(e,t,s){"use strict";s.d(t,{A:()=>w});var r=s(96865),n=s(85985),o=s(94715),a=s(74997),i=s(56427),l=s(29491),c=s(47143),u=s(86087),d=s(27723),p=s(13022),h=s(27970),m=s(56199),g=s(2274),f=s(32249),b=s(51698),v=s(4393),k=s(44732),y=s(76695),x=(s(47894),s(10790));const __=d.__,j="post"===window?.Jetpack_Editor_Initial_State?.screenBase;function w({attributes:e,setAttributes:t,clientId:s,isSelected:d}){const[w,_]=(0,u.useState)(null),{tracks:C}=(0,n.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,r.MB)(e.preTransformAction)),{isOverLimit:M,requireUpgrade:L,increaseRequestsCount:R,requestsCount:D,requestsLimit:F,currentTier:O,loading:z,tierPlansEnabled:U}=(0,r.yM)(),H=Math.max(F-D,0),{autosaveAndRedirect:V}=(0,r.ON)(),q=(0,n.Bd)(O),$=()=>{setTimeout(()=>{S.current?.focus?.()},100)},G=()=>{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:se,error:re}=(0,v.A)({onSuggestionDone:(0,u.useCallback)(()=>{$(),R()},[R]),onUnclearPrompt:(0,u.useCallback)(()=>{G(),R()},[R]),onModeration:$,attributes:e,clientId:s,content:e.content,tracks:C,userPrompt:e.userPrompt,requireUpgrade:L,initialRequestingState:e.requestingState,contentRef:Z,blockRef:E}),ne="requesting"===se,oe=["requesting","suggesting"].includes(se),ae=(0,n.xI)(),{productPageUrl:ie}=(0,k.A)(),le=(0,y.y)(s);(0,u.useEffect)(()=>{if(!le)return;const e=JSON.parse(localStorage.getItem(le));if(!e)return;const{type:t,options:s}=e;localStorage.removeItem(le),J(t,s)},[le,J]),(0,u.useEffect)(()=>{re&&_(!1)},[re]),(0,u.useEffect)(()=>{["init","done"].includes(se)&&t({requestingState:se})},[se,t]);const ce=!!e.content,ue=e.promptType===r.vE,de=__("Accept","jetpack"),pe=__("Accept title","jetpack"),he=ue?pe:de,me=async()=>{let t=[],n=(0,r._E)({content:e.content||""});if(n?.split("\n").length>1&&n?.split("\n")?.[0]?.match(/^

    .*<\/h1>$/)&&!X){const e=n.split("\n"),t=e.shift();n=e.join("\n"),B({title:t.replace(/<[^>]*>/g,"")})}t=(0,a.rawHandler)({HTML:n}),await N(s,t);const o=(e=>{let t=null;return e.forEach(e=>{const s=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!s)return;"true"===s.contentEditable&&(t=s);const r=s.querySelectorAll("[contenteditable=true]");t=r.length?r[r.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(s),C.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):ge()},be=()=>{K(),$(),C.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},ve=(0,o.useBlockProps)({ref:E,className:(0,p.A)({"is-waiting-response":ne})}),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)(r.Hb,{placement:"ai-assistant-block"}),!ae&&(0,x.jsx)(g.A,{block:"AI Assistant"})]}),je=(0,x.jsx)(x.Fragment,{children:re?.message&&!w&&"error_quota_exceeded"!==re?.code&&(0,x.jsx)(i.Notice,{status:re.status,isDismissible:!1,className:"jetpack-ai-assistant__error",children:re.message})}),we=M&&q===n.Ti?(0,x.jsx)(r.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(se)&&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,r._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===n._X||U&&q!==n.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 s=(0,r.MB)(e,t);I(s),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)(r.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),G()})("userPrompt"),C.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:be,onAccept:()=>{ue?fe():ge()},onDiscard:()=>{const r=e?.content===A(s).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),me(),r?C.recordEvent("jetpack_ai_assistant_block_dismiss"):C.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:se,isTransparent:L||!ae,showButtonLabels:!W,showAccept:"init"!==se&&ce&&!oe,acceptLabel:he,showGuideLine:ce,showRemove:e?.content?.length>0,banner:xe,error:je,customFooter:H%5!=0&&1!==D||z||q!==n._X?null:(0,x.jsx)(r.AK,{requestsRemaining:H,onUpgradeClick:_e}),lastAction:P})]})})}},61351(e,t,s){"use strict";var r=s(94375),n=s(54681),o=s(3586),a=s(13802);s(47894),s(50797),s(78118);(0,r.M)(n,{edit:o.A,save:()=>null,transforms:a.Ay})},31124(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(96865),n=s(56427),o=s(27723),a=s(10790);const __=o.__;function i({label:e=__("AI Assistant","jetpack"),behavior:t,onAction:s,onDropdownToggle:o,renderContent:i,behaviorContext:l,disabled:c}){return(0,a.jsx)(n.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:o,onToggle:i})=>(0,a.jsx)(n.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:()=>{if("function"!=typeof t)switch(t){case"action":s?.();break;case"dropdown":i()}else t({context:l})},"aria-haspopup":"true","aria-expanded":o,label:e,icon:r.cj,disabled:c}),onToggle:o,renderContent:i})}},9731(e,t,s){"use strict";s.d(t,{A:()=>b});var r=s(96865),n=s(85985),o=s(56427),a=s(86087),i=s(27723),l=s(83147),c=s(28755),u=s(10067),d=s.n(u),p=s(31124),h=s(89872),m=(s(16282),s(10790));const __=i.__,g=d()("jetpack-ai:image-extension-toolbar-dropdown"),f=(0,a.forwardRef)(({onClose:e,onRequestAltText:t,onRequestCaption:s,loadingAltText:n,loadingCaption:i},u)=>{const{requireUpgrade:d}=(0,r.yM)(),p=(0,a.useCallback)(async r=>{try{r===h.X?await(t?.()):await(s?.()),e?.()}catch(e){g("Error generating %s",r,e)}},[t,s,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:n?(0,m.jsx)(o.Spinner,{}):c.A,iconPosition:"left",onClick:()=>{p(h.X)},disabled:!!n||d,children:__("Generate alt text","jetpack")},"key-ai-assistant-alt-text"),(0,m.jsx)(o.MenuItem,{icon:i?(0,m.jsx)(o.Spinner,{}):l.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:s,loadingAltText:o=!1,loadingCaption:i=!1,disabled:l=!1,wrapperRef:c}){const{requireUpgrade:u}=(0,r.yM)(),{tracks:d}=(0,n.st)(),h=(0,a.useCallback)(e=>{e&&(d.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:"core/image"}),u&&(0,r.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"}),s?.()),[s,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,s){"use strict";var r=s(96865),n=s(94715),o=s(29491),a=s(47143),i=s(43656),l=s(86087),c=s(52619),u=s(10067),d=s.n(u),p=s(16204),h=s(35317),m=s(48499),g=s(10821),f=s(4647),b=s(89872),v=s(9731),k=s(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:s,dequeueAsyncRequest:o,requireUpgrade:c}=(0,r.yM)(),{getCurrentPostId:u,isImageBusy:d}=(0,a.useSelect)(e=>{const{getCurrentPostId:s}=e(i.store);return{getCurrentPostId:s,isImageBusy:e(p.M)?.isImageBusy(t.clientId)??!1}},[t.clientId]),{getPostContent:h}=(0,r.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,n=!1)=>{if(!c){T(e);try{const a={};e===b.X&&(0,r.in)(t.clientId),e===b.Q&&(a.positions=[t.clientId]),o();const i=await(0,r.R0)([{role:"jetpack-ai",context:{type:e,content:h(f.P),...a,images:[{url:n?await(0,r.Zo)(t.attributes.url):t.attributes.url}]}}],{postId:u(),feature:"jetpack-ai-image-extension"});s();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")&&!n)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,s,t.attributes.url,t.clientId,c,B,T,_]);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(e,{...t}),(0,k.jsx)(n.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 s=>(0,h.A)(s.name)?(0,k.jsx)(t,{...s}):(0,k.jsx)(e,{...s})},"blockEditWithAiComponents");(0,c.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-image-extension",function(e,t){var s;return(s=t,!!(0,g.Bi)()&&!!x&&"core/image"===s)?{...e,edit:w(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e},100)},10821(e,t,s){"use strict";s.d(t,{Bi:()=>i});var r=s(85985),n=s(74997),o=s(47143);const a=(0,s(48499).C)("ai-assistant-support");function i(){if(!(0,n.getBlockType)("jetpack/ai-assistant"))return!1;if(!a)return!1;if(!(0,r.xI)())return!1;return!((0,o.select)("core/edit-post")?.getHiddenBlockTypes?.()??[]).includes("jetpack/ai-assistant")}},4647(e,t,s){"use strict";s.d(t,{P:()=>n});var r=s(96865);const n=e=>{const t=(0,r._G)().filter(e=>"core/image"===e.name);let s=0;return e=(e=e.replace(/]*>.*?<\/figcaption>/g,"")).replace(//gs,()=>{const e=t[s];return s++,e?``:""})}},52998(e,t,s){"use strict";s.d(t,{mt:()=>a});var r=s(96865),n=s(74997),o=s(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,n.getBlockContent)(e),(0,r.rh)({content:t});var t}renderContent(e){return function(e,t=[]){return(0,r._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,n.rawHandler)({HTML:e});if(!t)return;const{updateBlockAttributes:s,replaceInnerBlocks:r,__unstableMarkNextChangeAsNotPersistent:a}=(0,o.dispatch)("core/block-editor");this.firstUpdate?this.firstUpdate=!1:a(),s(this.clientId,t.attributes),a(),r(this.clientId,t.innerBlocks)}getExtensionInputPlaceholder(){return null}}},96306(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(96865),n=s(85985),o=s(86087),a=s(27723),i=s(13022),l=(s(14808),s(10790));const __=a.__,c=(0,i.A)("jetpack-ai-assistant-extension-ai-input","wp-block");function u({customPlaceholder:e,className:t,requestingState:s,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,r.ON)(),{tracks:S}=(0,n.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,r.yM)(),F=(0,o.useMemo)(()=>P||["requesting","suggesting"].includes(s),[P,s]),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(s)&&w("")},[s]),(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)(r.FC,{className:(0,i.A)(c,t),placeholder:_,disabled:F,value:j,state:s,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,s){"use strict";s.d(t,{A:()=>p});var r=s(85985),n=s(86087),o=s(27723),a=s(52068),i=s(76695),l=s(31124),c=s(21785),u=s(10790);const __=o.__;function d({blockType:e,onClose:t,onAskAiAssistant:s,onRequestSuggestion:r}){const{canTransformToAIAssistant:o,transformToAIAssistant:l,getSelectedBlockClientIds:c}=(0,i.A)(),d=(0,n.useCallback)(n=>{const a=c(),[i]=a,u=n?.options?.alwaysTransformToAIAssistant||!1;!(a.length<2)&&o({clientId:i,blockName:e})||u?l({request:n}):(n?r?.(n.promptType,n.options):s?.(),t?.())},[e,o,c,s,t,r,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:s=__("AI Assistant","jetpack"),onAskAiAssistant:o,onRequestSuggestion:a}){const{tracks:i}=(0,r.st)(),p=(0,n.useContext)(c.B),h=(0,n.useCallback)(e=>{e&&i.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:t})},[t,i]),m=(0,n.useCallback)(()=>{i.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_prompt_show",{block_type:t}),o?.()},[t,o,i]),g=(0,n.useCallback)((e,s)=>{i.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:t}),a?.(e,s)},[t,a,i]);return(0,u.jsx)(l.A,{label:s,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,s){"use strict";s.d(t,{L:()=>n,l:()=>r});const r=["jetpack/field-name","jetpack/field-number","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-time","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"],n=["core/heading","core/paragraph","core/list-item","core/list","jetpack/contact-form",...r]},21785(e,t,s){"use strict";s.d(t,{B:()=>g,Q:()=>f});var r=s(86087),n=s(10067),o=s.n(n),a=s(52998),i=s(27571),l=s(50161),c=s(22352),u=s(53269),d=s(94987),p=s(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,r.createContext)({});function f(e,t){let s=m[e];s||(h(`No handler found for block type: ${e}. Using default handler.`),s=a.mt);const r=new s(t);return{onSuggestion:r.onSuggestion.bind(r),onDone:r.onDone.bind(r),getContent:r.getContent.bind(r),getExtensionInputPlaceholder:r.getExtensionInputPlaceholder.bind(r),behavior:r.behavior,isChildBlock:r.isChildBlock,feature:r.feature,adjustPosition:r.adjustPosition,startOpen:r.startOpen,hideOnBlockFocus:r.hideOnBlockFocus,supports:r.supports}}},50161(e,t,s){"use strict";s.d(t,{T:()=>n});var r=s(52998);class n extends r.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 s=this.renderContent(e);this.replaceBlockContent(s)}}},8663(e,t,s){"use strict";s.d(t,{g:()=>o});var r=s(47143),n=s(52998);class o extends n.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,r.dispatch)("core/block-editor"),{getBlockParentsByBlockName:s}=(0,r.select)("core/block-editor"),n=s(this.clientId,this.jetpackFormBlockName)?.[0];t.selectBlock(n),e?.[this.jetpackFormBlockName]?.handleAskAiAssistant?.()}}},22352(e,t,s){"use strict";s.d(t,{g:()=>c.g,p:()=>u});var r=s(74997),n=s(47143),o=s(27723),a=s(62514),i=s(96568),l=s(52998),c=s(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.adjustPosition=!1,this.supports={file_upload_field:1}}setContent(e,t=!1){const{replaceInnerBlocks:s,updateBlockAttributes:o}=(0,n.dispatch)("core/block-editor"),l=(0,r.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,r.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)&&(s(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=e=>"jetpack/button"===e.name||"core/button"===e.name&&"button"===e.attributes?.tagName,t=d.filter(e),n=d.some(e=>"jetpack/form-step-navigation"===e.name);if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],t.length>1){let r=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter(s=>!e(s)||(r++,r===t.length)),s(this.clientId,this.currentListOfValidBlocks)}else 0!==t.length||n||s(this.clientId,[...this.currentListOfValidBlocks,(0,r.createBlock)("core/button",{tagName:"button",type:"submit",text:__("Submit","jetpack"),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,r.serialize)(t)+"\n\n",""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},71295(e,t,s){"use strict";s.d(t,{j:()=>o});var r=s(10821),n=s(27571);function o(e){return!!(0,r.Bi)()&&!!n.L.includes(e)}},94987(e,t,s){"use strict";s.d(t,{g:()=>n});var r=s(52998);class n extends r.mt{constructor(e){super(e,["listItem"]),this.isChildBlock=!0}}},53269(e,t,s){"use strict";s.d(t,{b:()=>n});var r=s(52998);class n extends r.mt{constructor(e){super(e,["list"])}}},125(e,t,s){"use strict";s.d(t,{d:()=>i});var r=s(96865),n=s(74997),o=s(52998);const a=new r.OO({fixes:["paragraph"]});class i extends o.mt{constructor(e){super(e,["paragraph"])}getContent(){const e=this.getBlock();return t=(0,n.getBlockContent)(e),a.render({content:t});var t}}},50797(e,t,s){"use strict";var r=s(96865),n=s(85985),o=s(94715),a=s(29491),i=s(47143),l=s(86087),c=s(52619),u=s(13022),d=s(10067),p=s.n(d),h=s(32735),m=s(35317),g=s(4e4),f=s(96306),b=s(37931),v=s(21785),k=s(71295),y=s(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:s,isSelected:a,name:d,isSelectionEnabled:p}=t,m=(0,l.useRef)(null),k=(0,l.useRef)(0),_=(0,l.useRef)(null),C=(0,l.useRef)(""),A=(0,l.useRef)(null),S=(0,l.useRef)(document),E=(0,l.useRef)([]),[N,T]=(0,l.useState)(""),[B,P]=(0,l.useState)(null),I=(0,l.useRef)(null),M=(0,l.useRef)(null),L=(0,l.useRef)(null),R=(0,l.useRef)(null),{undo:D}=(0,i.useDispatch)("core/editor"),{postId:F}=(0,i.useSelect)(e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}},[]),{id:O,className:z}=(0,o.useBlockProps)({className:(0,u.A)({[d?.replace?.("/","-")]:!0})}),{increaseRequestsCount:U,dequeueAsyncRequest:H,requireUpgrade:V}=(0,r.yM)(),{snapToBottom:q,enableAutoScroll:$,disableAutoScroll:G}=(0,h.A)({current:S?.current?.getElementById(O)},void 0,!0),W=(0,l.useCallback)(()=>{A.current?.focus()},[]),{tracks:Z}=(0,n.st)(),{onSuggestion:J,onDone:K,getContent:Y,getExtensionInputPlaceholder:Q,behavior:X,isChildBlock:ee,feature:te,adjustPosition:se,startOpen:re,hideOnBlockFocus:ne,supports:oe}=(0,l.useMemo)(()=>(0,v.Q)(d,s),[d,s]),ae=Q(),[ie,le]=(0,l.useState)(re),ce=(0,l.useCallback)(()=>{le(e=>!e)},[]),ue=(0,l.useCallback)(({promptType:e,options:t})=>{const s=Y(),r=j[d];return[...E.current,{role:"jetpack-ai",context:{type:(0,g.p$)(e,r),content:s,request:t?.userPrompt,tone:t?.tone,language:t?.language,is_follow_up:E.current.length>0,supports:oe}}]},[d,Y,oe]),de=(0,l.useCallback)(e=>{const t=e||S.current.getElementById(O);t&&m.current&&t.style.setProperty("padding-bottom",`calc(${k.current+16}px + ${C.current||"0px"} )`,"important")},[O]),pe=(0,l.useCallback)(e=>{J(e),se&&de(),q()},[J,se,q,de]),he=(0,l.useCallback)((e,t)=>{if(G(),K(e),U(),T(""),Z.recordEvent("jetpack_ai_assistant_toolbar_extension_generate",{prompt_type:I.current,model:t,generation_time:null!==R.current?window?.performance?.now?.()-R.current:null}),M.current?.message){const e={role:"assistant",content:Y()};if(E.current.push(M.current.message,e),E.current.length>20){E.current.splice(0,E.current.length-20);const e=E.current.findIndex(e=>"jetpack-ai"===e.role);-1!==e&&(E.current=E.current.slice(e),E.current[0].context={...E.current[0].context,is_follow_up:!1})}}M.current=null,setTimeout(()=>{se&&de(),W()},100),(0,c.doAction)("jetpack_ai_assistant_generation_complete",s,d)},[G,K,U,Y,se,W,de,Z,I,s,d]),me=(0,l.useCallback)(e=>{G(),T(""),x("Request error",e),e.code!==r.mA&&e.code!==r.Or&&U()},[G,U]),{request:ge,stopSuggestion:fe,requestingState:be,model:ve,error:ke,reset:ye}=(0,r.o2)({onSuggestion:pe,onDone:he,onError:me,askQuestionOptions:{postId:F,feature:te}});(0,l.useEffect)(()=>{L.current=be},[be]);const xe=(0,l.useCallback)((e,t)=>{if(le(!0),V)return;I.current=e;const s=(0,r.MB)(e,t);s&&(T(s),P(s));const n=ue({promptType:e,options:t});x("Request suggestion",e,t);const o=n[n.length-1];M.current={promptType:e,options:t,humanText:s,message:o},H(),$(),R.current=window?.performance?.now?.()||null,ge(n)},[H,$,ue,ge,V]),je=(0,l.useCallback)(e=>{const t={userPrompt:e};P(e),$(),xe("userPrompt",t)},[$,xe]),we=(0,l.useCallback)(()=>{G(),fe(),W()},[G,fe,W]),_e=(0,l.useCallback)(()=>{M.current&&xe(M.current.promptType,M.current.options)},[M,xe]),Ce=(0,l.useCallback)(()=>{le(!1),ye(),T(""),M.current=null,E.current=[]},[ye]),Ae=(0,l.useCallback)(async()=>{Z.recordEvent("jetpack_ai_assistant_toolbar_extension_undo",{prompt_type:I.current,model:ve}),await D(),Ce()},[D,Ce,Z,ve,I]);(0,l.useEffect)(()=>{a||Ce()},[a,Ce]),(0,l.useEffect)(()=>{A.current&&p&&(S.current=A.current.ownerDocument,W())},[ie,W,p]),(0,l.useEffect)(()=>{let e=S.current.getElementById(O);if(e&&se)return ie&&!_.current&&m.current?(C.current=e.style.paddingBottom,_.current=new ResizeObserver(([t])=>{if(e=S.current.getElementById(O),k.current=t.contentRect.height,e&&m.current&&k.current>0){de(e);const{marginBottom:t}=getComputedStyle(e),s=parseFloat(t);m.current.style.setProperty("margin-top",`-${k.current+s}px`,"important"),m.current.style.setProperty("margin-bottom",`${s+16}px`,"important")}}),_.current.observe(m.current)):_.current&&(e.style.paddingBottom=C.current,_.current.disconnect(),_.current=null,k.current=0),()=>{_.current&&_.current.disconnect()}},[de,se,s,_,O,ie]),(0,l.useEffect)(()=>{if(ne&&ie){const e=S.current.getElementById(O),t=()=>{["requesting","suggesting"].includes(L.current)||(le(!1),e?.removeEventListener("focusin",t))};return e?.addEventListener("focusin",t),()=>{e?.removeEventListener("focusin",t)}}},[ne,ie,O]);const Se=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(e,{...t}),ie&&(0,y.jsx)(f.A,{customPlaceholder:ae||null,className:z,requestingState:be,requestingError:ke,wrapperRef:m,inputRef:A,action:N,blockType:d,feature:te,request:je,stopSuggestion:we,close:Ce,undo:Ae,tryAgain:_e,lastAction:B}),(0,y.jsx)(o.BlockControls,{...w,children:(0,y.jsx)(b.A,{blockType:d,onAskAiAssistant:ce,onRequestSuggestion:xe,behavior:X})})]});if(ee)return Se;const Ee={value:{[d]:{handleAskAiAssistant:ce,handleRequestSuggestion:xe}}};return(0,y.jsx)(v.B.Provider,{...Ee,children:Se})}return s=>{const r=(0,m.A)(s.name);return s.clientId&&s.attributes&&r?(0,y.jsx)(t,{...s}):(0,y.jsx)(e,{...s})}},"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,s){"use strict";s.d(t,{Q:()=>n,X:()=>r});const r="images-alt-text",n="images-caption"},4393(e,t,s){"use strict";s.d(t,{A:()=>h});var r=s(96865),n=s(47143),o=s(86087),a=s(10067),i=s.n(a),l=s(62402),c=s(64425),u=s(16597),d=s(32735);const p=i()("jetpack-ai-assistant:error"),h=({attributes:e,clientId:t,content:s,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,n.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAsyncRequest:C,setAiAssistantFeatureRequireUpgrade:A}=(0,n.useDispatch)("wordpress-com/plans"),{snapToBottom:S,enableAutoScroll:E,disableAutoScroll:N}=(0,d.A)(k,v),T=(0,n.useSelect)(e=>e("core/editor").getEditedPostAttribute("title")),B=(0,n.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,r.o2)({onSuggestion:e=>{_(t,{content:e?.replaceAll(c.uV,"")}),S()},onDone:e=>{const s=e.replaceAll(c.uV,""),r={role:"assistant",content:s};P.current.push(I.current,r),P.current.length>20&&P.current.splice(0,P.current.length-20),_(t,{content:s,messages:P.current}),S(),N(),h?.()},onStop:()=>{S(),N(),h?.()},onError:e=>{switch(e?.code){case r.cT:x(!1);break;case r.ud:x(!1),g?.();break;case r.mA:case r.AZ:x(!0);break;case r.Or:x(!1),A(!0);break;case r.L9:m?.()}},onAllErrors:e=>{p(e)},initialRequestingState:b,askQuestionOptions:{postId:B,feature:"ai-assistant",functions:{}}}),O=["requesting","suggesting"].includes(D),z=async(n,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:s,allPostContent:a,postContentAbove:(0,u.b$)(t),currentPostTitle:T,options:o,userPrompt:o?.userPrompt||i,type:n,isGeneratingTitle:e.promptType===r.vE}),I.current=d.pop(),d=[...d,...P.current],d.push(I.current),w(d),e.promptType!==r.vE&&_(t,{promptType:n})}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,s){"use strict";s.d(t,{A:()=>a});var r=s(3924),n=s(97999),o=s(85985);function a(){const e=(0,o.Mm)()&&!(0,n.isSimpleSite)(),t=e?(0,n.getMyJetpackUrl)("#/jetpack-ai"):(0,r.A)("org-ai"),{autosaveAndRedirect:s,isRedirecting:a}=(0,o.ZR)(t);return{productPageUrl:t,autosaveAndRedirect:s,isRedirecting:a,isMyJetpackAvailable:e}}},75956(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(90372),n=s(86087);const o=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,a=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,i=()=>((0,n.useEffect)(()=>{o&&r.A.initialize(o?.userid,o?.username,a?{blog_id:a}:{})},[]),r.A)},32735(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(86087),n=s(10067);const o=s.n(n)()("jetpack-ai-assistant:use-auto-scroll"),a=(e,t,s=!1)=>{const n=(0,r.useRef)(null),a=(0,r.useRef)(null),i=(0,r.useRef)(!1),l=(0,r.useRef)(!1),c=(0,r.useRef)(!1),u=(0,r.useRef)(!1),d=(0,r.useRef)({scrollPadding:"",scrollMargin:""}),p=(0,r.useCallback)(()=>{o("enabling ignore scroll"),l.current=!0},[]),h=(0,r.useCallback)(()=>{i.current&&c.current&&!l.current&&p()},[p]),m=(0,r.useCallback)(()=>{i.current=!0,l.current=!1,c.current=!1,u.current=!1,n.current?.addEventListener("scroll",h),o("enabling auto scroll")},[h]),g=(0,r.useCallback)(()=>{i.current=!1,l.current=!1,c.current=!1,u.current=!1,n.current?.removeEventListener("scroll",h),a.current?.style&&(a.current.style.scrollPadding=d.current.scrollPadding,a.current.style.scrollMargin=d.current.scrollMargin),n.current=null,o("disabling auto scroll")},[h]),f=(0,r.useCallback)(()=>{if(!i.current||l.current)return;const r=s?e?.current:t?.current?.firstElementChild?.lastElementChild;r&&!u.current&&(c.current=!0,u.current=!0,n?.current?.removeEventListener?.("scroll",h),r?.scrollIntoView({block:"end",inline:"end"}),setTimeout(()=>{u.current=!1,n?.current?.addEventListener?.("scroll",h)},200))},[e,t,s,h]),b=(0,r.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,r.useEffect)(()=>{const t=b(e?.current?.parentElement);!n.current&&t&&(n.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,s){"use strict";s.d(t,{A:()=>o});var r=s(85985);const n={"jetpack/contact-form":"contact-form"};function o(e){const t=n[e],{isModuleActive:s}=(0,r.q7)(t);return!t||s}},76695(e,t,s){"use strict";s.d(t,{A:()=>c,y:()=>l});var r=s(85985),n=s(47143),o=s(51609),a=s(16597),i=s(13802);function l(e){return`ai-assistant-block-${e}`}const c=()=>{const{replaceBlock:e,removeBlocks:t}=(0,n.useDispatch)("core/block-editor"),s=(0,n.useSelect)(e=>e("core/block-editor"),[]),{getSelectedBlockClientIds:c,getBlocksByClientId:u,getBlock:d,getBlockParents:p}=s,{tracks:h}=(0,r.st)();return{canTransformToAIAssistant:(0,o.useCallback)(({clientId:e,blockName:t})=>{if(!d(e))return!1;if(!i.y7.includes(t))return!1;const s=p(e);if(0===s.length)return!0;const r=d(s[s.length-1]);return!["core/list","core/list-item"].includes(r.name)},[d,p]),transformToAIAssistant:(0,o.useCallback)(({request:s}={})=>{const r=c(),n=u(r),o=(0,a.Sb)(n),[d]=n,[p,...m]=r,g={...d?.attributes||{},content:o,preTransformAction:s?.promptType},f=(0,i.rr)(d.name,g);if(s?.promptType){h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:s.promptType,block_type:d.name});const e={clientId:p,type:s.promptType,options:{...s.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,s){"use strict";s.d(t,{J1:()=>n,K6:()=>o,p$:()=>i});var r=s(96865);function n(e){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:i(e)}}}function o({generatedContent:e,allPostContent:t,postContentAbove:s,currentPostTitle:n,options:o,type:i,userPrompt:l,isGeneratingTitle:c}){const u=[],d="generated"===o?.contentType;let p=null;switch(i){case r.im:p=n;break;case r.sn:case r.A4:case r.yy:p=s;break;case r.vE:p=t;break;case r.br:case r.fD:p=e;break;case r.eJ:case r.UA:case r.Gm:p=d?e:t;break;case r.d5:p=s;break;case r.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}(i===r.pE?!!e?.length:d,p);return h&&u.push(h),u.push({role:"jetpack-ai",context:a({generatedContent:e,allPostContent:t,postContentAbove:s,currentPostTitle:n,options:o,type:i,userPrompt:l,isGeneratingTitle:c})}),u}function a({options:e,type:t,userPrompt:s,isGeneratingTitle:n}){const o=function(e,t,s){return e?"title":!t||s?"content":null}(n,"generated"===e?.contentType,e?.fromExtension||!1);return{type:i(t),...o?{subject:o}:{},...t===r.eJ&&e?.tone?{tone:e.tone}:{},...t===r.Gm&&e?.language?{language:e.language}:{},...t===r.pE&&s?{request:s}:{}}}function i(e,t){const s={[r.im]:"ai-assistant-summary-by-title",[r.sn]:"ai-assistant-continue-writing",[r.A4]:"ai-assistant-simplify",[r.yy]:"ai-assistant-correct-spelling",[r.vE]:"ai-assistant-generate-title",[r.br]:"ai-assistant-make-longer",[r.fD]:"ai-assistant-make-shorter",[r.eJ]:"ai-assistant-change-tone",[r.UA]:"ai-assistant-summarize",[r.Gm]:"ai-assistant-change-language",[r.pE]:"ai-assistant-user-prompt",[r.d5]:"ai-assistant-transform-list-to-table"};return"form-ai"===t?"form-ai-extension":t?`${s[e]}-${t}-extension`:s[e]}},64425(e,t,s){"use strict";s.d(t,{jf:()=>a,uV:()=>o});var r=s(96865),n=s(4e4);r.im,r.sn,r.A4,r.yy,r.vE,r.br,r.fD,r.eJ,r.UA,r.Gm,r.pE,r.z5,r.d5;const o="````";function a({generatedContent:e,allPostContent:t,postContentAbove:s,currentPostTitle:r,options:o,type:a,userPrompt:i,isGeneratingTitle:l}){return[(0,n.J1)(a),...(0,n.K6)({generatedContent:e,allPostContent:t,postContentAbove:s,currentPostTitle:r,options:o,type:a,userPrompt:i,isGeneratingTitle:l})]}},16597(e,t,s){"use strict";s.d(t,{Sb:()=>l,aB:()=>i,b$:()=>a,rJ:()=>c});var r=s(96865),n=s(74997),o=s(47143);function a(e){if(!e)return"";const t=(0,o.select)("core/block-editor"),s=t.getBlockIndex(e),a=t.getBlocks().slice(0,s)??[];return a?.length?(0,r.rh)({content:(0,n.serialize)(a)}):""}function i(){const e=(0,o.select)("core/block-editor").getBlocks();return e?.length?(0,r.rh)({content:(0,n.serialize)(e)}):""}function l(e){return e.filter(e=>null!=e).map(e=>(0,n.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,s){"use strict";s.d(t,{w:()=>o});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},n=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function o(e,t){const s=n(e),r=n(t);return JSON.stringify(s)===JSON.stringify(r)}},96568(e,t,s){"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}s.d(t,{d:()=>r})},48499(e,t,s){"use strict";s.d(t,{C:()=>n});var r=s(85985);function n(e){return!0===(0,r.FB)(e).available}},13802(e,t,s){"use strict";s.d(t,{Ay:()=>c,rr:()=>l,y7:()=>a});var r=s(96865),n=s(74997),o=s(54681);const a=["core/heading","core/paragraph","core/list"],i=[];function l(e,t){const{content:s,...a}=t;let i=s;"core/heading"===e&&t?.level&&(i=i.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const l=(0,r.rh)({content:i}),c=[];return c.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:l}}),(0,n.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,s)=>{const r=(0,n.getSaveContent)(e,t,s);return l(e,{...t,content:r})}});const c={from:i}},36920(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(85985),n=s(82201),o=s(27723),a=s(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:s,isRedirecting:o}=(0,r.ZR)(t);if(window?.Jetpack_AIChatBlock?.jetpackSettings?.instant_search_enabled)return null;return(0,a.jsx)(n.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=>{s(e)},isRedirecting:o,visible:!0,align:null,title:null,context:null})}},50443(e,t,s){"use strict";s.d(t,{G:()=>o,W:()=>n});var r=s(27723);const __=r.__,n=__("Ask","jetpack"),o=__("Ask a question about this site","jetpack")},51686(e,t,s){"use strict";s.d(t,{z:()=>c});var r=s(94715),n=s(56427),o=s(3582),a=s(27723),i=s(50443),l=s(10790);const __=a.__;function c({setAttributes:e,placeholder:t,showCopy:s,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)(r.InspectorControls,{children:(0,l.jsx)(n.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,children:(0,l.jsx)(n.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)(r.InspectorAdvancedControls,{children:[(0,l.jsx)(n.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)(n.ToggleControl,{label:__("Show copy answer button.","jetpack"),help:__("Allow users to easily copy the answer.","jetpack"),checked:s,onChange:t=>e({showCopy:t}),__nextHasNoMarginBottom:!0}),(0,l.jsx)(n.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)(n.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,s){"use strict";s.d(t,{A:()=>h});var r=s(96865),n=s(94715),o=s(56427),a=s(47143),i=(s(40320),s(2274)),l=s(26247),c=s(36920),u=s(50443),d=s(51686),p=s(10790);function h({attributes:e,setAttributes:t,clientId:s}){const{askButtonLabel:h=u.W,placeholder:m=u.G,showCopy:g,showFeedback:f,showSources:b}=e,v=(0,n.useBlockProps)(),k=(0,a.useSelect)(e=>e("core/block-editor").isBlockSelected(s),[s]),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)(n.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)(r.Yj,{}),(0,p.jsx)(n.InspectorControls,{children:(0,p.jsx)(d.z,{askButtonLabel:h,placeholder:m,setAttributes:t,showCopy:g,showFeedback:f,showSources:b})})]})}},8393(e,t,s){"use strict";var r=s(94375),n=s(1629),o=s(32908),a=s(41825);s(40320),s(18155);(0,r.M)(n,{edit:o.A,save:a.A})},41825(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(94715),n=s(50443),o=s(10790);function a({attributes:e}){const t=r.useBlockProps.save({"data-ask-button-label":e.askButtonLabel||n.W});return(0,o.jsx)("div",{...t})}},97571(e,t,s){"use strict";s.d(t,{z:()=>a});var r=s(56427),n=s(27723),o=s(10790);const __=n.__;function a({attributes:e,setAttributes:t}){const{statsData:s,statsOption:n}=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)(r.PanelBody,{title:__("Settings","jetpack"),children:[(0,o.jsx)(r.RadioControl,{label:__("Views or visitors","jetpack"),selected:s,onChange:e=>t({statsData:e}),options:a,help:__("Views represent site visits, whereas visitors represent unique individuals.","jetpack")}),(0,o.jsx)(r.RadioControl,{label:__("Show stats data for","jetpack"),selected:n,onChange:e=>t({statsOption:e}),options:i,disabled:"visitors"===s,help:"visitors"===s?__("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,s){"use strict";s.d(t,{A:()=>m});var r=s(85985),n=s(54268),o=s(1455),a=s.n(o),i=s(94715),l=s(47143),c=s(86087),u=s(27723),d=s(97571),p=s(51744),h=s(10790);const __=u.__,_n=u._n;const m=function({attributes:e,className:t,setAttributes:s}){const{isLoadingModules:o,isChangingStatus:u,isModuleActive:m,changeStatus:g}=(0,r.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&&s({statsOption:"site"})},[b,s]),!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:s})}),(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,n.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=>s({label:e})})]})})]})}},95184(e,t,s){"use strict";var r=s(74997),n=s(94375),o=s(35116),a=s(20201);s(8277);(0,n.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,r.createBlock)("core/heading",{content:e.raw.title,level:3}):null,s=(0,r.createBlock)("jetpack/blog-stats",{label:e.raw.hits});return t?[t,s]:s}}]}})},51744(e,t,s){"use strict";s.d(t,{k:()=>c});var r=s(97999),n=s(85985),o=s(56427),a=s(27723),i=s(35116),l=s(10790);const __=a.__,c=({className:e,isLoading:t,changeStatus:s})=>{const a=(0,r.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,n.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:()=>s(!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,s){"use strict";s.d(t,{A:()=>g});var r=s(1455),n=s.n(r),o=s(94715),a=s(56427),i=s(47143),l=s(86087),c=s(27723),u=s(93832),d=s(13022),p=(s(11141),s(54919)),h=s(9075),m=s(10790);const __=c.__,_x=c._x;const g=(0,a.withNotices)(function({attributes:e,noticeOperations:t,noticeUI:s,setAttributes:r}){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=>r({tagsAdded:e}));const E=(0,i.useSelect)(e=>{const{getEntityRecord:t,hasFinishedResolution:s}=e("core"),r=t("root","site")?.language||"en_US";return s("getEntityRecord",["root","site"])?r:null},[]);(0,l.useEffect)(()=>{if(!E||g.current||k)return;const e=()=>{r({promptFetched:!1,promptId:null,tagsAdded:!1}),g.current=!1,t.removeAllNotices()};let s="/wpcom/v3/blogging-prompts";if(y)s+="/"+encodeURIComponent(y);else{const e=new Date;s+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}s=(0,u.addQueryArgs)(s,{_locale:E,force_year:(new Date)?.getFullYear()}),g.current=!0,n()({path:s}).then(e=>{const t=y?e:e[0],s=(0,p.i)(E);r({answersLink:t.answered_link+`?locale=${s}`,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(s=>{r({promptFetched:!0});const n="rest_post_invalid_id"===s.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")})]}))(s.message);var o;t.removeAllNotices(),t.createErrorNotice(n)})},[g,t,k,y,r,E]);const N=e=>{r({showLabel:e})},T=e=>{r({showResponses:e})},B=(0,d.A)(["jetpack-blogging-prompt__label"],{"is-bloganuary-icon":A});return(0,m.jsxs)("div",{...S,children:[s,(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,s){"use strict";var r=s(74997),n=s(47143),o=s(27723),a=s(94375),i=s(30552),l=s(32442),c=s(12169),u=s(63757),d=s(94530),p=s(86239),h=s(57028);s(11141),s(24625);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,r.getBlockType)("jetpack/blogging-prompt")||await new Promise(e=>{(0,a.M)(l,v),setTimeout(e,0)});const{insertBlocks:t}=(0,n.dispatch)("core/block-editor");t([(0,r.createBlock)("jetpack/blogging-prompt",{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,r.createBlock)("core/paragraph")],0,void 0,!1)}g&&b&&k(b)},57028(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(94715),n=s(13022),o=s(10790);const a=function({attributes:e}){const{answersLink:t,answersLinkText:s,gravatars:a,promptId:i,promptLabel:l,promptText:c,showLabel:u,showResponses:d,isBloganuary:p}=e,h=r.useBlockProps.save({className:"jetpack-blogging-prompt"}),m=(0,n.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:s})]})]})}},9075(e,t,s){"use strict";s.d(t,{J:()=>c});var r=s(1455),n=s.n(r),o=s(47143),a=s(86087),i=s(89877);function l(e){const t=(0,i.escapeHTML)(e);return n()({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,s){const{editPost:r}=(0,o.useDispatch)("core/editor"),n=(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"===n.current&&(h.some(e=>e.name&&"dailyprompt"===e.name)&&h.some(t=>t.name&&t.name===`dailyprompt-${e}`)?n.current="fulfilled":(n.current="pending",Promise.all([l("dailyprompt"),l(`dailyprompt-${e}`)]).then(e=>{const t=e.map(e=>e.id),s=i("tags")||[];r({tags:[...s,...t]}),n.current="fulfilled"}).catch(e=>{console.error(e),n.current="rejected"}))),"fulfilled"===n.current&&s(!0))},[r,d,c,e,n,s,h,u,t,m,i])}},59914(e,t,s){"use strict";s.d(t,{A:()=>r});const r=[s(97766)]},67805(e,t,s){"use strict";s.d(t,{A:()=>r});const r={id:{type:"string"},name:{type:"string"},icon:{type:"string",default:s(84954)},is_non_wpcom_site:{type:"boolean",default:!1},url:{type:"string"},description:{type:"string"}}},97766(e,t,s){"use strict";s.r(t),s.d(t,{attributes:()=>o.A,save:()=>i,supports:()=>a.A});var r=s(94715),n=s(10790),o=s(67805),a=s(13896);const i=()=>(0,n.jsx)(r.InnerBlocks.Content,{})},13896(e,t,s){"use strict";s.d(t,{A:()=>r});const r={align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0,inserter:!1}},53808(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(56427),o=(s(16348),s(27723)),a=s(10790);const __=o.__;const i=function({className:e,attributes:t,setAttributes:s}){const{icon:o,name:i,description:l}=t,c=(0,r.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)(r.MediaUpload,{multiple:!1,onSelect:e=>{s({icon:e.url})},render:({open:e})=>(0,a.jsx)(n.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)(r.RichText,{className:"jetpack-blogroll-item-title",value:i,tagName:"p",allowedFormats:["core/italic"],onChange:e=>{s({name:e})},placeholder:__("Enter site title","jetpack")})}),(0,a.jsx)(r.RichText,{className:"jetpack-blogroll-item-description",value:l,onChange:e=>{s({description:e})},placeholder:__("Enter site description","jetpack")})]})]})]})}},3686(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)(r.Path,{d:"M12 12.75H21V11.25H12V12.75Z"}),(0,n.jsx)(r.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,s){"use strict";s.d(t,{UU:()=>u,W0:()=>d});var r=s(94715),n=s(27723),o=s(84954),a=s(59914),i=s(53808),l=s(3686),c=(s(16348),s(10790));const __=n.__,u="blogroll-item",d={apiVersion:3,title:__("Blogroll Item","jetpack"),description:__("Blogroll Item","jetpack"),icon:{src:l.A},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:i.A,attributes:{id:{type:"string"},name:{type:"string"},icon:{type:"string",default:o},is_non_wpcom_site:{type:"boolean",default:!1},url:{type:"string"},description:{type:"string"}},save:()=>{const e=r.useBlockProps.save();return(0,c.jsx)("div",{...e,children:(0,c.jsx)(r.InnerBlocks.Content,{})})},example:{attributes:{}},deprecated:a.A}},40536(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(3582),n=s(27723),o=(s(88627),s(10790));const __=n.__;function a({results:e,onSelect:t,searchInput:s,isLoading:a}){const[i]=(0,r.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=!s?.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,n.sprintf)(/* translators: %s is search query. */ __("No sites found for %s.","jetpack"),s)})]}),e.length>0&&(0,o.jsx)("ul",{"aria-live":"polite",children:e.map((e,s)=>{const r=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:r,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}-${s}`)})})]})}},17454(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(56427),n=s(27723),o=(s(34566),s(10790));const __=n.__;function a({value:e,onChange:t}){return(0,o.jsx)("div",{className:"jetpack-blogroll__appender-search",children:(0,o.jsx)(r.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,s){"use strict";s.d(t,{A:()=>h});var r=s(56427),n=s(47143),o=s(86087),a=s(27723),i=s(60167),l=s(92507),c=s(85101),u=s(40536),d=s(17454),p=(s(32991),s(10790));const __=a.__;function h({isLoading:e,subscriptions:t,clientId:s}){const[a,h]=(0,o.useState)(!1),[m,g]=(0,o.useState)(),[f,b]=(0,o.useState)(""),{insertBlock:v}=(0,n.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,l.A)({siteURL:f,subscriptions:t,enabled:f});return e?(0,p.jsx)(r.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.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)(r.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,s),h(!1)},searchInput:f,isLoading:y})]})]})}},63166(e,t,s){"use strict";s.d(t,{A:()=>v});var r=s(94715),n=s(74997),o=s(56427),a=s(47143),i=s(86087),l=s(27723),c=s(13022),u=s(2274),d=s(26247),p=s(37127),h=s(32130),m=s(46542),g=s(25688),f=s(85101),b=(s(93386),s(10790));const __=l.__;const v=function({className:e,attributes:t,setAttributes:s,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){s({load_placeholders:!1});const e=[(0,n.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...C.map(f.dy)];T(l,e)}},[C,j,s,l,T]);const B=(0,r.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)(r.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)(r.InspectorControls,{children:(0,b.jsxs)(o.PanelBody,{title:__("Settings","jetpack"),children:[(0,b.jsx)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!v,onChange:()=>s({show_avatar:!v}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Show description","jetpack"),checked:!!k,onChange:()=>s({show_description:!k}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Open links in a new window","jetpack"),checked:!!y,onChange:()=>s({open_links_new_window:!y}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(o.ToggleControl,{label:__("Hide my own sites","jetpack"),checked:!!x,onChange:()=>s({ignore_user_blogs:!x}),__nextHasNoMarginBottom:!0})]})})]})}},22475(e,t,s){"use strict";var r=s(94375),n=s(52829),o=s(77782),a=s(63166),i=s(36219);s(93386);(0,r.M)(n,{edit:a.A,save:i.A},[{name:o.UU,settings:o.W0}])},36219(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(94715),n=s(13022),o=s(10790);const a=function({attributes:{show_avatar:e,show_description:t},className:s}){const a=r.useBlockProps.save({className:(0,n.A)(s,{"hide-avatar":!e,"hide-description":!t})});return(0,o.jsx)("div",{...a,children:(0,o.jsx)(r.InnerBlocks.Content,{})})}},13818(e,t,s){"use strict";s.d(t,{Z:()=>o});var r=s(86087),n=s(85101);function o(e,t=!0){const[s,o]=(0,r.useState)(null),[a,i]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1),u=function(e,t=100){const[s,n]=(0,r.useState)(e);return(0,r.useEffect)(()=>{const s=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(s)}},[e,t]),s}((0,n.l$)(e),500);return(0,r.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:s,error:a,isLoading:l}}},92507(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(13818),n=s(85101);function o({siteURL:e,subscriptions:t,enabled:s=!1}){const o=(0,n.l$)(e),{response:a,isLoading:i}=(0,r.Z)(o,Boolean(s)),l=[...a?[{blog_id:a?.ID.toString(),description:a?.description,URL:a?.URL,site_icon:(0,n.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,n.ZE)(null),name:o,is_non_wpcom_site:!0}),{isLoading:i,siteDetails:l}}},32130(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(1455),n=s.n(r),o=s(86087),a=s(27723);const __=a.__;function i(e=!1){const[t,s]=(0,o.useState)(!1),[r,a]=(0,o.useState)(null),[i,l]=(0,o.useState)([]),c=(0,o.useRef)(void 0);return(0,o.useEffect)(()=>{e?(s(!0),a(null),c.current&&c.current.abort(),c.current="undefined"==typeof AbortController?void 0:new AbortController,n()({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,s(!1)})):s(!1)},[e]),{isLoading:t,errorMessage:r,recommendations:i}}},46542(e,t,s){"use strict";s.d(t,{b:()=>i});var r=s(3582),n=s(47143),o=s(86087),a=s(85101);const i=({clientId:e})=>{const[t,s]=(0,o.useState)(!1),{insertBlocks:i}=(0,n.useDispatch)("core/block-editor"),[l,c]=(0,r.useEntityProp)("root","site","Blogroll Recommendations"),u=(0,n.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 s=t.map(a.dy);i(s,void 0,e)}s(!0)}},[e,l,u,t,i]),(0,o.useEffect)(()=>{void 0!==l&&c(u)},[u])}},25688(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(1455),n=s.n(r),o=s(86087),a=s(27723),i=s(93832),l=s(85101);const __=a.__;function c({ignore_user_blogs:e}){const[t,s]=(0,o.useState)(!1),[r,a]=(0,o.useState)(null),[c,u]=(0,o.useState)([]),d=(0,o.useRef)(void 0);return(0,o.useEffect)(()=>{s(!0),a(null),d.current&&d.current.abort(),d.current="undefined"==typeof AbortController?void 0:new AbortController,n()({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,s(!1)})},[e]),{isLoading:t,errorMessage:r,subscriptions:c}}},85101(e,t,s){"use strict";s.d(t,{FN:()=>a,ZE:()=>l,dy:()=>o,l$:()=>i});var r=s(74997),n=s(84954);function o(e){let t;try{t=new URL(e?.url)?.host.replace(/^www\./,"")}catch{t=e?.URL}return(0,r.createBlock)("jetpack/blogroll-item",{...e,...!e.name&&{name:t}})}function a(e){const{blog_id:t,site_icon:s,URL:r,name:n,description:a,is_non_wpcom_site:i}=e;return o({id:t,icon:s,url:r,name:n,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||n}},60487(e,t,s){"use strict";s.d(t,{A:()=>p});var r=s(56427),n=s(86087),o=s(27723),a=s(13022),i=s(66087),l=s(10790);const __=o.__,c="09:00",u="17:00";class d extends n.Component{renderInterval=(e,t)=>{const{day:s}=this.props,{opening:o,closing:i}=e;return(0,l.jsxs)(n.Fragment,{children:[(0,l.jsxs)("div",{className:"business-hours__row",children:[(0,l.jsx)("div",{className:(0,a.A)(s.name,"business-hours__day"),children:0===t&&this.renderDayToggle()}),(0,l.jsxs)("div",{className:(0,a.A)(s.name,"business-hours__hours"),children:[(0,l.jsx)(r.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)(r.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:s.hours.length>1&&(0,l.jsx)(r.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}})})]}),t===s.hours.length-1&&(0,l.jsxs)("div",{className:"business-hours__row business-hours-row__add",children:[(0,l.jsx)("div",{className:(0,a.A)(s.name,"business-hours__day"),children:" "}),(0,l.jsx)("div",{className:(0,a.A)(s.name,"business-hours__hours"),children:(0,l.jsx)(r.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,s)=>{const{day:r,attributes:n,setAttributes:o}=this.props,{days:a}=n;o({days:a.map(n=>n.name===r.name?{...n,hours:n.hours.map((r,n)=>n===s?{...r,[t]:e}:r)}:n)})};toggleClosed=e=>{const{day:t,attributes:s,setAttributes:r}=this.props,{days:n}=s;r({days:n.map(s=>{if(s.name===t.name){const t=e?[{opening:c,closing:u}]:[];return{...s,hours:t}}return s})})};addInterval=()=>{const{day:e,attributes:t,setAttributes:s}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),s({days:r.map(t=>t.name===e.name?{...t,hours:e.hours}:t)})};removeInterval=e=>{const{day:t,attributes:s,setAttributes:r}=this.props,{days:n}=s;r({days:n.map(s=>t.name===s.name?{...s,hours:s.hours.filter((t,s)=>e!==s)}:s)})};isClosed(){const{day:e}=this.props;return(0,i.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)("span",{className:"business-hours__day-name",children:t.days[e.name]}),(0,l.jsx)(r.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,s){"use strict";s.d(t,{A:()=>u});var r=s(86087),n=s(27723),o=s(66087),a=s(10790);const _x=n._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 r.Component{formatTime(e){const[t,s]=e.split(":");if(!t||!s)return!1;const r=new Date;return r.setHours(t),r.setMinutes(s),l?l.format(r):e}renderInterval=(e,t)=>{const{day:s}=this.props,r=s.hours;return(0,a.jsxs)("span",{children:[(0,n.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),r.length>1+t&&(0,a.jsx)("span",{children:", "})]},t)};render(){const{day:e,localization:t}=this.props,s=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)(s)?_x("Closed","business is closed on a full day","jetpack"):s.map(this.renderInterval),(0,a.jsx)("br",{})]})]})}}const u=c},39155(e,t,s){"use strict";s.d(t,{A:()=>b});var r=s(85985),n=s(1455),o=s.n(n),a=s(94715),i=s(56427),l=s(38443),c=s(86087),u=s(27723),d=s(9050),p=s(60487),h=s(39943),m=s(10790);const __=u.__,g=(0,r.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:s}=e,r=(0,a.useBlockProps)(),[n,u]=(0,c.useState)(f),[d,b]=(0,c.useState)(!1),{days:v}=t,{startOfWeek:k}=n,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(s)x=(0,m.jsx)("div",{className:"is-edit",children:y.map((t,s)=>(0,m.jsx)(p.A,{day:t,localization:n,...e},s))});else{const e=(0,l.getSettings)(),{formats:{time:t}}=e;x=(0,m.jsx)("dl",{className:"jetpack-business-hours",children:y.map((e,s)=>(0,m.jsx)(h.A,{day:e,localization:n,timeFormat:t},s))})}else x=(0,m.jsx)(i.Placeholder,{icon:g,label:__("Loading business hours","jetpack")});return(0,m.jsx)("div",{...r,children:x})}},71410(e,t,s){"use strict";var r=s(94375),n=s(9050),o=s(39155),a=(s(87495),s(1947),s(10790));(0,r.M)(n,{edit:e=>(0,a.jsx)(o.A,{...e}),save:()=>null})},28310(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(98329);const n={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:r.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.A},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"},customVariant:{type:"string"},metaName:{type:"string"}}},12365(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(56427),n=s(86087),o=s(27723),a=s(8746),i=s(10790);const __=o.__;function l({borderRadius:e="",setAttributes:t}){const s=(0,n.useCallback)(e=>t({borderRadius:e}),[t]);return(0,i.jsx)(r.PanelBody,{title:__("Border Settings","jetpack"),children:(0,i.jsx)(r.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,allowReset:!0,initialPosition:a.hc,label:__("Border radius","jetpack"),max:a.Bs,min:a.rG,onChange:s,value:e})})}},10179(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(94715),n=s(27723),o=s(10790);const __=n.__;function a({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:s,fallbackTextColor:n,gradientValue:a,setBackgroundColor:i,setGradient:l,setTextColor:c,textColor:u}){const d=(0,o.jsx)(r.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:s,fallbackTextColor:n,isLargeText:!1,textColor:u.color});return e?(0,o.jsx)(r.__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)(r.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,s){"use strict";s.d(t,{Bs:()=>a,Uc:()=>n,hc:()=>o,rG:()=>i});var r=s(94715);const n=!!r.__experimentalUseGradient,o=5,a=50,i=0},2761(e,t,s){"use strict";s.d(t,{A:()=>l});var r=s(47143),n=s(38062),o=s(12365),a=s(10179),i=s(10790);function l({attributes:e,backgroundColor:t,clientId:s,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,r.useSelect)(e=>{const{getBlock:t,getBlockRootClientId:r}=e("core/block-editor");return t(r(s))}),{updateBlockAttributes:w}=(0,r.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)(n.D,{align:v,width:x,onChange:e=>{y?w(j.clientId,{width:e}):d({width:e})}})]})}},55903(e,t,s){"use strict";s.d(t,{A:()=>m});var r=s(94715),n=s(29491),o=s(47143),a=s(86087),i=s(27723),l=s(13022),c=s(8746),u=s(2761),d=s(7528),p=s(81177),h=(s(55179),s(10790));const __=i.__;const m=(0,n.compose)((0,r.withColors)({backgroundColor:"background-color"},{textColor:"color"}))(function(e){const{attributes:t,backgroundColor:s,className:n,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(r.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,r.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},T=(0,r.useBlockProps)({className:(0,l.A)("wp-block-button",n),style:{width:y}}),[B,P]=(0,d.A)(),I=(0,r.__experimentalUseBorderProps)(t),M=(0,l.A)("wp-block-button__link",I.className,{"has-background":s.color||E,[s.class]:!E&&s.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={...!s.color&&E?{background:E}:{backgroundColor:s.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)(r.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)(r.InspectorControls,{children:(0,h.jsx)(u.A,{gradientValue:E,setGradient:N,isGradientAvailable:c.Uc,...B,...e})})]})})},45878(e,t,s){"use strict";var r=s(94375),n=s(5383);(0,r.A)(n.U,n.W)},36270(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=(0,n.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(r.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,s){"use strict";s.d(t,{U:()=>c,W:()=>u});var r=s(27723),n=s(97969),o=s(28310),a=s(55903),i=s(36270),l=s(85154);const __=r.__,c="button",u={apiVersion:3,title:__("Button","jetpack"),icon:i.A,category:(0,n.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,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(13022),o=s(8746),a=s(10790);function i({attributes:e,blockName:t,uniqueId:s}){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=r.useBlockProps.save(),x=(0,r.__experimentalGetBorderClassesAndStyles)(e),j=(0,r.getColorClassName)("background-color",i),w=o.Uc?(0,r.__experimentalGetGradientClass)(h):void 0,_=(0,r.getColorClassName)("color",f),C=(0,n.A)("wp-block-button","jetpack-submit-button",c,y?.className,x.className,{[`wp-block-jetpack-${t}`]:t}),A=(0,n.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)(r.RichText.Content,{className:A,"data-id-attr":s||"placeholder",href:b,id:s,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g})})}},7528(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(29491),n=s(86087);function o(){const[e,t]=(0,n.useState)(),s=(0,r.useRefEffect)(s=>{const r=()=>{const r=getComputedStyle(s),n=r.backgroundColor,o=r.color;n===e?.fallbackBackgroundColor&&o===e?.fallbackTextColor||t({fallbackBackgroundColor:n,fallbackTextColor:o})},n=new MutationObserver(r);return n.observe(s,{attributeFilter:["style","class"]}),r(),()=>{n.disconnect()}},[]);return[e,s]}},81177(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(47143),n=s(86087),o=s(66087);function a({attributes:e,clientId:t,setAttributes:s}){const{passthroughAttributes:a}=e,i=(0,r.useSelect)(s=>{const r=s("core/block-editor"),n=r.getBlockRootClientId(t),o=r.getBlockAttributes(n)||{};if(!n||!a)return{};let i=!1;const l={};return Object.entries(a).forEach(([t,s])=>{const r=o[s];r!==e[t]&&(i=!0,l[t]=r)}),i?l:{}},[t,a,e]);(0,n.useEffect)(()=>{(0,o.isEmpty)(i)||s(i)},[i,s])}},95816(e,t,s){"use strict";s.d(t,{a:()=>r});const r="https://calendly.com/wpcom/jetpack-block-example"},99723(e,t,s){"use strict";s.d(t,{Ay:()=>d});var r=s(97999),n=s(94715),o=s(56427),a=s(27723),i=s(5873),l=s(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:s},defaultClassName:n,embedCode:a,parseEmbedCode:i,setAttributes:c,setEmbedCode:u}=e;let d=null;return s&&(d=(0,r.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:`${n}-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:`${n}-color-notice`,isDismissible:!1,children:(0,l.jsx)(o.ExternalLink,{href:d,children:__("Explore more customization options.","jetpack")})})]})},d=e=>{const{attributes:t,clientId:s,isEditingUrl:r,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&&!r&&(0,l.jsx)(n.BlockControls,{children:(0,l.jsx)(c,{onEditClick:a})}),p&&(0,l.jsx)(i.A,{clientId:s,styleOptions:h,onSelectStyle:o,activeStyle:d,attributes:t,viewportWidth:500}),(0,l.jsx)(n.InspectorControls,{children:(0,l.jsx)(u,{...e})})]})}},19493(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(74997),n=s(27723),o=s(98329),a=s(10790);const __=n.__,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:s,submitButtonBackgroundColor:n,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,r.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,s){"use strict";s.d(t,{A:()=>j});var r=s(85985),n=s(94715),o=s(74997),a=s(56427),i=s(47143),l=s(86087),c=s(27723),u=s(13022),d=s(66087),p=s(78218),h=s(56145),m=s(13248),g=s(95816),f=s(99723),b=s(38028),v=(s(8221),s(98989),s(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,r.sh)(m);const j=(0,a.withNotices)(function(e){const{attributes:t,clientId:s,name:r,noticeOperations:c,noticeUI:j,setAttributes:w}=e,_=(0,o.getBlockDefaultClassName)(r),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,n.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(s);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")})})]}),$=(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"})]}),G=(0,v.jsx)(n.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,s){"use strict";var r=s(74997),n=s(94375),o=s(13248),a=s(19493),i=s(52385),l=s(2668),c=s(38028);s(8221);(0,n.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,r.createBlock)("jetpack/calendly",t)}}]},deprecated:[a.A]})},2668(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(94715),n=s(10790);function o(){const e=r.useBlockProps.save();return(0,n.jsx)("div",{...e,children:(0,n.jsx)(r.InnerBlocks.Content,{})})}},38028(e,t,s){"use strict";s.d(t,{QL:()=>r,a9:()=>n});const r=/(^|\/\/)(calendly\.com[^"']*)/i,n=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const s=(e=>{const t={},s=new URL(e);if(t.url=s.origin+s.pathname,!s.search)return t;const r=new URLSearchParams(s.search),n=r.get("background_color"),o=r.get("primary_color"),a=r.get("text_color"),i=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),n&&n.match(i)&&(t.backgroundColor=n),o&&o.match(i)&&(t.primaryColor=o),a&&a.match(i)&&(t.textColor=a),t})(t),n=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(n&&(s.style=n),"link"===n){s.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(s.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(s.buttonAttributes.textColor=void 0,s.buttonAttributes.customTextColor=r);const n=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);n&&(s.buttonAttributes.backgroundColor=void 0,s.buttonAttributes.customBackgroundColor=n)}return s}},98091(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(94715),n=s(56427),o=s(86087),a=s(27723),i=s(13022),l=s(81942),c=s(10790);const __=a.__,u=e=>{const{attributes:{address:t,addressLine2:s,addressLine3:a,city:u,region:d,postal:p,country:h,linkToGoogleMaps:m},isSelected:g,setAttributes:f}=e,b=[t,s,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,r.useBlockProps)({className:v}),x=(0,c.jsx)(n.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)(r.PlainText,{value:t,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>f({address:e}),onKeyDown:k}),(0,c.jsx)(r.PlainText,{value:s,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>f({addressLine2:e}),onKeyDown:k}),(0,c.jsx)(r.PlainText,{value:a,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>f({addressLine3:e}),onKeyDown:k}),(0,c.jsx)(r.PlainText,{value:u,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>f({city:e}),onKeyDown:k}),(0,c.jsx)(r.PlainText,{value:d,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>f({region:e}),onKeyDown:k}),(0,c.jsx)(r.PlainText,{value:p,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>f({postal:e}),onKeyDown:k}),(0,c.jsx)(r.PlainText,{value:h,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>f({country:e}),onKeyDown:k}),x]})]})}},39563(e,t,s){"use strict";s.d(t,{U:()=>u,W:()=>d});var r=s(56427),n=s(86087),o=s(27723),a=s(62289),i=s(98091),l=s(81942),c=s(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)(n.Fragment,{children:[(0,c.jsx)(r.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)(r.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,s){"use strict";s.d(t,{A:()=>c});var r=s(94715),n=s(86087),o=s(27723),a=s(10790);const __=o.__,i=({attributes:{address:e,addressLine2:t,addressLine3:s,city:r,region:o,postal:i,country:l}})=>(0,a.jsxs)(n.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}),s&&(0,a.jsx)("div",{className:"jetpack-address__address jetpack-address__address3",children:s}),r&&!(o||i)&&(0,a.jsx)("div",{className:"jetpack-address__city",children:r}),r&&(o||i)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"jetpack-address__city",children:r}),", ",(0,a.jsx)("span",{className:"jetpack-address__region",children:o})," ",(0,a.jsx)("span",{className:"jetpack-address__postal",children:i})]}),!r&&(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:s,city:r,region:n,postal:o,country:a}})=>{let i=n?`+${n},`:"";i=o?`${i}+${o}`:i;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${s?`${s},`:""}${r?`+${r},`:""}${i}${a?`+${a}`:""}`.replace(" ","+")},c=e=>{if(!(({address:e,addressLine2:t,addressLine3:s,city:r,region:n,postal:o,country:a})=>[e,t,s,r,n,o,a].some(e=>""!==e))(e.attributes))return null;const t=r.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,s){"use strict";s.d(t,{A:()=>l});var r=s(94715),n=s(13022),o=s(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:s}=e,l=(0,r.useBlockProps)({className:(0,n.A)(t,{"jetpack-contact-info-block":!0,"is-selected":s})});return(0,o.jsx)("div",{...l,children:(0,o.jsx)(r.InnerBlocks,{allowedBlocks:a,templateLock:!1,template:i})})}},25907(e,t,s){"use strict";var r=s(74997),n=s(94375),o=s(39563),a=s(75173),i=s(44246),l=s(90951),c=s(70063),u=s(36611);s(47698),s(83572);(0,n.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,r.createBlock)("core/heading",{content:e.raw.title}),(0,r.createBlock)("jetpack/email",{email:e.raw.email}),(0,r.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,r.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,r.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,r.createBlock)("jetpack/map",{address:e.raw.address})]),(0,r.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,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(27723),o=s(64882),a=s(27266);const __=n.__,i=e=>{const t=(0,r.useBlockProps)(),{setAttributes:s}=e;return(0,o.A)("email",e,__("Email","jetpack"),a.A,e=>s({email:e}),t)}},90951(e,t,s){"use strict";s.d(t,{U:()=>c,W:()=>u});var r=s(56427),n=s(27723),o=s(62289),a=s(43167),i=s(27266),l=s(10790);const __=n.__,_x=n._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)(r.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,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(86087),o=s(39904),a=s(10790);const i=({attributes:{email:e}})=>{if(!e)return null;const t=r.useBlockProps.save();return(0,a.jsx)("div",{...t,children:(s=e,s.split(/(\s+)/).map((e,t)=>{const s=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&(0,o.t)(s)?e===s?(0,a.jsx)("a",{href:`mailto:${e}`,children:e},t):(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)("a",{href:`mailto:${e}`,children:s},t),(0,a.jsx)(n.Fragment,{children:e.slice(-(e.length-s.length))})]},t):(0,a.jsx)(n.Fragment,{children:e},t)}))});var s}},42711(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(27723),o=s(64882),a=s(84330);const __=n.__,i=e=>{const t=(0,r.useBlockProps)(),{setAttributes:s}=e;return(0,o.A)("phone",e,__("Phone number","jetpack"),a.A,e=>s({phone:e}),t)}},70063(e,t,s){"use strict";s.d(t,{U:()=>c,W:()=>u});var r=s(56427),n=s(27723),o=s(62289),a=s(42711),i=s(84330),l=s(10790);const __=n.__,_x=n._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)(r.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,s){"use strict";s.d(t,{A:()=>a});var r=s(94715),n=s(10790);function o(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const s=e.indexOf(t[0]);let r=s?e.substring(s-1):e,o=s?e.substring(0,s):"",a=r.replace(/\D/g,"");/[0-9/+/(]/.test(r[0])?(o=o.slice(0,-1),"+"===r[0]&&(a="+"+a)):r=r.substring(1);return[o.trim()?(0,n.jsx)("span",{className:"phone-prefix",children:o},"phonePrefix"):null,(0,n.jsx)("a",{href:`tel:${a}`,children:r},"phoneNumber")]}const a=({attributes:{phone:e}})=>{if(!e)return null;const t=r.useBlockProps.save();return(0,n.jsx)("div",{...t,children:o(e)})}},36611(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(94715),n=s(10790);const o=()=>{const e=r.useBlockProps.save();return(0,n.jsx)("div",{...e,children:(0,n.jsx)(r.InnerBlocks.Content,{})})}},90452(e,t,s){"use strict";s.d(t,{a:()=>n});var r=s(27723);const __=r.__,n=(0,r.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,s){"use strict";s.d(t,{A:()=>c});var r=s(94715),n=s(56427),o=s(27723),a=(s(41660),s(90452)),i=s(34839),l=s(10790);const __=o.__;const c=function({clientId:e,attributes:t,setAttributes:s}){const{consentExpiryDays:c,align:u,text:d=a.a}=t;(0,i.w)(e);const p=(0,r.useBlockProps)({className:`wp-block-jetpack-cookie-consent align${u}`});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.InspectorControls,{children:(0,l.jsxs)(n.PanelBody,{title:__("Block Settings","jetpack"),children:[(0,l.jsx)(n.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}:{};s({...t,align:e})}(e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)(n.TextControl,{label:__("Consent Expiry Time (in days)","jetpack"),value:c,type:"number",min:"1",max:"365",onChange:e=>s({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)(r.RichText,{tagName:"p",value:d,onChange:e=>s({text:e})}),(0,l.jsx)(r.InnerBlocks,{allowedBlocks:["core/button"],template:[["core/button",{text:__("Accept","jetpack")}]],templateLock:"all"})]})]})}},78165(e,t,s){"use strict";var r=s(94375),n=s(74095),o=s(15216),a=s(75757);s(41660);(0,r.M)(n,{edit:o.A,save:a.A})},75757(e,t,s){"use strict";s.d(t,{A:()=>a});var r=s(94715),n=s(90452),o=s(10790);function a({attributes:e}){const t=r.useBlockProps.save(),{text:s=n.a,consentExpiryDays:a}=e;return(0,o.jsxs)("div",{...t,style:t.style,role:"dialog","aria-modal":"true",children:[(0,o.jsx)(r.RichText.Content,{tagName:"p",value:s}),(0,o.jsx)(r.InnerBlocks.Content,{}),(0,o.jsx)("span",{children:a})]})}},34839(e,t,s){"use strict";s.d(t,{w:()=>l});var r=s(74997),n=s(29491),o=s(3582),a=s(47143),i=s(86087);function l(e){const t=(0,a.useSelect)(e=>{const{isSavingPost:t,isSavingNonPostEntityChanges:s}=e("core/editor");return t()||s()},[]),s=!(!(0,n.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)(()=>{s&&!u&&h((0,r.serialize)([p(e)]))},[s,u,h,p,e])}},75800(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(4567),n=s(3975),o=s(94715),a=s(86087),i=s(13022),l=s(72730),c=s(10790);const u=({className:e=null,currency:t=null,defaultValue:s=null,disabled:u=!1,label:d="",onChange:p=null,value:h=""})=>{const[m,g]=(0,a.useState)((0,r.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,s)=>{g(r=>{if(e!==r){const r=(0,l.C_)(e,t);r&&r>=(0,l.dv)(t)?(k(!1),s&&p?.(r)):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,n=()=>{b(!1),m||x((0,r.Ay)(s,t,{symbol:""}))};return e.addEventListener("blur",n),()=>{e.removeEventListener("blur",n)}},[t,s,m,y,x]),(0,a.useEffect)(()=>{f||v||g((0,r.Ay)(h,t,{symbol:""}))},[t,f,v,h]),(0,a.useEffect)(()=>{x((0,r.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:[n.y[t].symbol,u?(0,c.jsx)("div",{className:"donations__amount-value",children:(0,r.Ay)(h||s,t,{symbol:""})}):(0,c.jsx)(o.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>x(e,!0),placeholder:(0,r.Ay)(s,t,{symbol:""}),ref:y,value:m,withoutInteractiveFormatting:!0})]})}},57018(e,t,s){"use strict";s.d(t,{A:()=>d});var r=s(3975),n=s(85985),o=s(94715),a=s(56427),i=s(27723),l=s(48558),c=s(72730),u=s(10790);const __=i.__,d=e=>{const{attributes:t,setAttributes:s}=e,{currency:i,oneTimeDonation:d,monthlyDonation:p,annualDonation:h,showCustomAmount:m}=t,g=(e,r)=>{const n={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],o=t[n];s({[n]:{...o,show:r}})};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+" - "+r.y[i].symbol,(0,u.jsx)(a.Dashicon,{icon:"arrow-down"})]}),label:__("Change currency","jetpack"),onClick:e,onKeyDown:s=>{t||s.keyCode!==l.DOWN||(s.preventDefault(),s.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);s({currency:e,oneTimeDonation:{...d,amounts:t},monthlyDonation:{...p,amounts:t},annualDonation:{...h,amounts:t}})})(t),e()},children:t+" - "+r.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=>s({showCustomAmount:e}),label:__("Show custom amount option","jetpack"),__nextHasNoMarginBottom:!0}),(0,u.jsx)(a.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,n.GE)()}`,children:__("View donation earnings","jetpack")})]})})]})}},27718(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(4567),n=s(3975),o=s(94715),a=s(27723),i=s(72730),l=s(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:s,monthlyDonation:a,annualDonation:c,showCustomAmount:u,chooseAmountText:d,customAmountText:p}=e;if(!s||!s.show||-1===s.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:s.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:s.amounts.map(e=>(0,l.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,r.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,r.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,r.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:[n.y[t].symbol,(0,l.jsx)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,r.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:s.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:s.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,s){"use strict";s.d(t,{A:()=>x});var r=s(94715),n=s(56427),o=s(47143),a=s(86087),i=s(27723),l=s(2274),c=s(53796),u=s(72730),d=s(27574),p=s(26247),h=s(16521),m=s(3696),g=s(70975),f=s(93033),b=s(56848),v=(s(3749),s(79085)),k=s(36580),y=s(10790);const __=i.__,x=e=>{const{attributes:t,setAttributes:s}=e,{currency:i}=t,x=(0,r.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];s(t?{currency:e}:{currency:"USD"})}},[i,z,R,s]);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:s,type:r,interval:n})=>(s===i&&"donation"===r&&(e[n]=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 s=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(s)?(C(s),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.Spinner,{}):(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,s){"use strict";var r=s(94375),n=s(87325),o=s(27718),a=s(31152),i=s(47693);s(46236);(0,r.M)(n,{edit:a.A,save:i.A,deprecated:[o.A]})},70975(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1455),n=s.n(r);const o=async e=>{try{return await n()({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,s){"use strict";s.d(t,{A:()=>a});var r=s(1455),n=s.n(r),o=s(93832);const a=async(e=null)=>{const t=new URLSearchParams(window.location.search),s=(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 n()({path:s,method:"GET"})}catch(e){return Promise.reject(e.message)}}},56848(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(3924),n=s(97999),o=s(56427),a=s(86087),i=s(27723),l=s(10790);const __=i.__,c=({onClose:e})=>{const t=(0,n.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,r.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,r.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,s){"use strict";s.d(t,{A:()=>a});var r=s(56427),n=s(27723),o=s(10790);const __=n.__,a=({error:e})=>(0,o.jsx)(r.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:e})},47693(e,t,s){"use strict";s.d(t,{A:()=>i});var r=s(94715),n=s(75703),o=s(10790);const a=(0,n.O)(),i=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:s,monthlyDonation:n,annualDonation:i}=e;if(!s||!s.show||!s.planId||-1===s.planId)return null;const l=r.useBlockProps.save();return(0,o.jsxs)("div",{...l,children:[(0,o.jsx)(r.RichText.Content,{tagName:"h4",value:a.oneTimeDonation?.heading}),(0,o.jsx)(r.RichText.Content,{tagName:"p",value:s.extraText??a.extraText}),(0,o.jsx)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.oneTimeDonation?.buttonText}),n.show&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("hr",{className:"donations__separator"}),(0,o.jsx)(r.RichText.Content,{tagName:"h4",value:a.monthlyDonation?.heading}),(0,o.jsx)(r.RichText.Content,{tagName:"p",value:n.extraText??a.extraText}),(0,o.jsx)(r.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)(r.RichText.Content,{tagName:"h4",value:a.annualDonation?.heading}),(0,o.jsx)(r.RichText.Content,{tagName:"p",value:i.extraText??a.extraText}),(0,o.jsx)(r.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.annualDonation?.buttonText})]})]})}},62225(e,t,s){"use strict";s.d(t,{A:()=>d});var r=s(94715),n=s(47143),o=s(27723),a=s(72730),i=s(75800),l=s(75703),c=s(10790);const __=o.__,u=(0,l.O)(),d=({activeTab:e,attributes:t,setAttributes:s})=>{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,r)=>{const n=t[b];s({[b]:{...n,[e]:r}})},y=(0,a.Xj)(l),x=v("amounts"),j=(0,n.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)(r.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:v("heading")||u[b]?.heading,onChange:e=>k("heading",e)}),(0,c.jsx)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>s({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 s=[...x];s[t]=e,k("amounts",s)})(e,t),value:e},`jetpack-donations-amount-${t}`))}),m&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(r.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>s({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)(r.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)(r.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 s({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...h,buttonText:t}});var t},allowedFormats:j})})]})}},36580(e,t,s){"use strict";s.d(t,{A:()=>c});var r=s(86087),n=s(27723),o=s(13022),a=s(57018),i=s(62225),l=s(10790);const __=n.__,c=e=>{const{attributes:t,products:s,setAttributes:n}=e,{oneTimeDonation:c,monthlyDonation:u,annualDonation:d}=t,[p,h]=(0,r.useState)("one-time"),m=(0,r.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,r.useEffect)(()=>{c.planId===s["one-time"]&&u.planId===s["1 month"]&&d.planId===s["1 year"]||n({...s["one-time"]&&{oneTimeDonation:{...c,planId:s["one-time"]}},...s["1 month"]&&{monthlyDonation:{...u,planId:s["1 month"]}},...s["1 year"]&&{annualDonation:{...d,planId:s["1 year"]}}})},[c,u,d,n,s]),(0,r.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:n})})]}),(0,l.jsx)(a.A,{...e})]})}},75703(e,t,s){"use strict";function r(){if("undefined"==typeof window)return{};const e=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeof e?{}:e}s.d(t,{O:()=>r})},36850(e,t,s){"use strict";s.d(t,{GY:()=>n,_t:()=>r,gQ:()=>o});const r=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,n=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,o="https://www.eventbrite.com/e/test-event-tickets-123456789"},38449(e,t,s){"use strict";s.d(t,{o:()=>c,s:()=>u});var r=s(56427),n=s(27723),o=s(5873),a=s(72660),i=s(10790);const __=n.__,_x=n._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)(r.ToolbarGroup,{children:(0,i.jsx)(r.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})}),u=({attributes:e,clientId:t,setAttributes:s})=>(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:s,activeStyle:e.style,attributes:e,viewportWidth:130})},77629(e,t,s){"use strict";s.d(t,{A:()=>r});const r=[s(87879).A]},87879(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(94715),n=s(74997),o=s(27723),a=s(13022),i=s(66087),l=s(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:s}=e;let r=s;r||(r=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:r},a=(0,i.pick)(e,c);return[o,[(0,n.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:s,url:n,style:o}=e;if(t)return s||"modal"===o?function(e){const{backgroundColor:t,borderRadius:s,customBackgroundColor:n,customTextColor:o,eventId:i,text:c,textColor:u,url:d}=e,p=(0,r.getColorClassName)("color",u),h=(0,r.getColorClassName)("background-color",t),m=(0,a.A)("wp-block-button__link",{"has-text-color":u||o,[p]:p,"has-background":t||n,[h]:h,"no-border-radius":0===s}),g={backgroundColor:h?void 0:n,color:p?void 0:o,borderRadius:s?s+"px":void 0};return(0,l.jsx)("div",{className:"wp-block-button",children:(0,l.jsx)(r.RichText.Content,{className:m,href:d,id:`eventbrite-widget-${i}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:c})})}(e):n&&(0,l.jsx)("a",{className:"eventbrite__direct-link",href:n,children:n})},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,s){"use strict";s.d(t,{A:()=>v});var r=s(94715),n=s(56427),o=s(86087),a=s(27723),i=s(78218),l=s(56145),c=s(82306),u=s(36850),d=s(38449),p=s(50013),h=s(68332),m=s(72055),g=s(12074),f=(s(81699),s(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,n.withNotices)(e=>{const{attributes:t,noticeOperations:s,onReplace:a,setAttributes:v}=e,{url:k,style:y}=t,x=(0,r.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)(()=>{s.removeAllNotices(),s.createErrorNotice((0,f.jsxs)(f.Fragment,{children:[__("Sorry, this content could not be embedded.","jetpack")," ",(0,f.jsx)(n.Button,{variant:"link",onClick:()=>(0,g.pG)(_,a),children:_x("Convert block to link","button label","jetpack")})]}))},[s,a,_]),T=(0,o.useCallback)(e=>{if(!e||u.gQ===e||"modal"===y)return;const t=(0,g.HE)(e);if(t){const r={eventId:t,url:e};(0,l.A)(r.url,S).then(e=>{const t=(0,i.y)(c.attributes,{...r,url:e});v(t),C(e),s.removeAllNotices()}).catch(()=>{v({eventId:void 0,url:void 0}),N()})}else N()},[y,s,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)(r.BlockControls,{children:(0,f.jsx)(d.o,{setEditingUrl:w})}),"modal"===y?(0,f.jsx)(r.InnerBlocks,{template:[[b.name,b.attributes]],templateLock:"all"}):(0,f.jsx)(m.A,{...e})]}),(0,f.jsx)("div",{...x,children:B})})},34590(e,t,s){"use strict";var r=s(74997),n=s(94375),o=s(82306),a=s(36850),i=s(77629),l=s(56311),c=s(52074);(0,n.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,r.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:i.A})},50013(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(97999),n=s(85985),o=s(56427),a=s(27723),i=s(82306),l=(s(12074),s(10790));const __=a.__,_x=a._x,c=(0,n.sh)(i),u=({className:e,noticeUI:t,editedUrl:s,onChange:n,onSubmit:a})=>{const i=(0,r.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:s,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:n}),(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,s){"use strict";s.d(t,{A:()=>a});var r=s(56427),n=s(27723),o=s(10790);const __=n.__,a=()=>(0,o.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,o.jsx)(r.Spinner,{}),(0,o.jsx)("p",{children:__("Embedding…","jetpack")})]})},72055(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(56427),n=s(10790);const o=({className:e,attributes:t})=>{const{eventId:s}=t;if(!s)return;const o=`eventbrite-widget-${s}`,a=`\n\t\t\t