kollapsminoriteten/wp-content/plugins/jetpack/_inc/blocks/editor.js

216 lines
1.3 MiB
JavaScript
Raw Normal View History

2022-04-02 10:26:41 +02:00
/*! For license information please see editor.js.LICENSE.txt */
2023-12-07 09:44:11 +01:00
(()=>{var e,t,n,r,a,s,o={60400:(e,t,n)=>{"use strict";n.d(t,{L:()=>l});var r=n(2615),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const s="text/event-stream",o=1e3,i="last-event-id";function l(e,t){var{signal:n,headers:l,onopen:u,onmessage:d,onclose:p,onerror:m,openWhenHidden:h,fetch:g}=t,f=a(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,a)=>{const b=Object.assign({},l);let v;function k(){v.abort(),document.hidden||x()}b.accept||(b.accept=s),h||document.addEventListener("visibilitychange",k);let y=o,w=0;function E(){document.removeEventListener("visibilitychange",k),window.clearTimeout(w),v.abort()}null==n||n.addEventListener("abort",(()=>{E(),t()}));const _=null!=g?g:window.fetch,C=null!=u?u:c;async function x(){var n;v=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},f),{headers:b,signal:v.signal}));await C(n),await(0,r.Pw)(n.body,(0,r.UM)((0,r._U)((e=>{e?b[i]=e:delete b[i]}),(e=>{y=e}),d))),null==p||p(),E(),t()}catch(e){if(!v.signal.aborted)try{const t=null!==(n=null==m?void 0:m(e))&&void 0!==n?n:y;window.clearTimeout(w),w=window.setTimeout(x,t)}catch(e){E(),a(e)}}}x()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(s)))throw new Error(`Expected content-type to be ${s}, Actual: ${t}`)}},2615:(e,t,n)=>{"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function a(e){let t,n,r,a=!1;return function(s){void 0===t?(t=s,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,s);const o=t.length;let i=0;for(;n<o;){a&&(10===t[n]&&(i=++n),a=!1);let s=-1;for(;n<o&&-1===s;++n)switch(t[n]){case 58:-1===r&&(r=n-i);break;case 13:a=!0;case 10:s=n}if(-1===s)break;e(t.subarray(i,s),r),i=n,r=-1}i===o?t=void 0:0!==i&&(t=t.subarray(i),n-=i)}}function s(e,t,n){let r=o();const a=new TextDecoder;return function(s,i){if(0===s.length)null==n||n(r),r=o();else if(i>0){const n=a.decode(s.subarray(0,i)),o=i+(32===s[i+1]?2:1),l=a.decode(s.subarray(o));switch(n){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 n=parseInt(l,10);isNaN(n)||t(r.retry=n)}}}}function o(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{Pw:()=>r,UM:()=>a,_U:()=>s})},84788:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(2378);let a,s,o,i;const l=/<(\/)?(\w+)\s*(\/)?>/g;function c(e,t,n,r,a){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:a,children:[]}}const u=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,r.isValidElement)(e)))};function d(e){const t=function(){const e=l.exec(a);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,s,o]=e,i=n.length;if(o)return["self-closed",s,t,i];if(r)return["closer",s,t,i];return["opener",s,t,i]}(),[n,u,d,h]=t,g=i.length,f=d>s?s:null;if(!e[u])return p(),!1;switch(n){case"no-more-tokens":if(0!==g){const{leadingTextStart:e,tokenStart:t}=i.pop();o.push(a.substr(e,t))}return p(),!1;case"self-closed":return 0===g?(null!==f&&o.push(a.substr(f,d-f)),o.push(e[u]),s=d+h,!0):(m(c(e[u],d,h)),s=d+h,!0);case"opener":return i.push(c(e[u],d,h,d+h,f)),s=d+h,!0;case"closer":if(1===g)return function(e){const{element:t,leadingTextStart:n,prevOffset:s,tokenStart:l,children:c}=i.pop(),u=e?a.substr(s,e-s):a.substr(s);u&&c.push(u);null!==n&&o.push(a.substr(n,l-n));o.push((0,r.cloneElement)(t,null,...c))}(d),s=d+h,!0;const t=i.pop(),n=a.substr(t.prevOffset,d-t.prevOffset);t.children.push(n),t.prevOffset=d+h;const l=c(t.element,t.tokenStart,t.tokenLength,d+h);return l.children=t.children,m(l),s=d+h,!0;default:return p(),!1}}function p(){const e=a.length-s;0!=
_n("You have %d share remaining in the next 30 days. <upgradeLink>Upgrade now</upgradeLink> to share more.","You have %d shares remaining in the next 30 days. <upgradeLink>Upgrade now</upgradeLink> to share more.",n,"jetpack"),n),{upgradeLink:React.createElement("a",{className:S.Z["upgrade-link"],href:(0,r.Z)("jetpack-social-basic-plan-block-editor",{site:(0,a.lQ)(),query:"redirect_to="+encodeURIComponent(window.location.href)}),onClick:ne})}),React.createElement("br",null),React.createElement("a",{className:S.Z["more-link"],href:(0,r.Z)("jetpack-social-block-editor-more-info",{site:(0,a.lQ)(),...R?{query:"redirect_to="+encodeURIComponent(R)}:{}}),target:"_blank",rel:"noopener noreferrer",onClick:ne},__("More about Jetpack Social.","jetpack"))))),React.createElement(React.Fragment,null,Y.length>0&&React.createElement(C.Z,{type:"error"},(0,i.createInterpolateElement)(_n("One of your social connections is broken. Reconnect them on the <fixLink>connection management</fixLink> page.","Some of your social connections are broken. Reconnect them on the <fixLink>connection management</fixLink> page.",Y.length,"jetpack"),{fixLink:React.createElement(s.ExternalLink,{href:M})})),X.length>0&&React.createElement(C.Z,{type:"error"},(0,i.createInterpolateElement)(__("Twitter is not supported anymore. <moreInfo>Learn more here</moreInfo>.","jetpack"),{moreInfo:React.createElement(s.ExternalLink,{href:M})})),pe&&he&&ce&&q(G.autoConversion)&&React.createElement(C.Z,{type:"warning",actions:[React.createElement(s.Button,{onClick:ae,key:"dismiss",variant:"primary"},__("Got it","jetpack")),React.createElement(s.Button,{className:S.Z["change-settings-button"],key:"change-settings",href:R||A,target:"_blank",rel:"noreferrer noopener"},__("Change settings","jetpack"))]},__("When your post is published, the selected image will be converted for maximum compatibility across your connected social networks.","jetpack"))),he&&(Object.values(ue).includes(h.rs)?N?React.createElement(C.Z,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):React.createElement(C.Z,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(s.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):pe?null:React.createElement(C.Z,{type:"warning"},React.createElement("p",null,me.length===I.length?_n("The selected media cannot be shared to this platform.","The selected media cannot be shared to any of these platforms.",I.length,"jetpack"):_n("The selected media cannot be shared to one of these platforms.","The selected media cannot be shared to some of these platforms.",me.length,"jetpack")),React.createElement(s.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Troubleshooting tips","jetpack"))))):!$&&React.createElement(s.PanelRow,null,React.createElement(s.ExternalLink,{href:M},__("Connect an account","jetpack"))),!t&&React.createElement(i.Fragment,null,$&&React.createElement(C.Z,{onDismiss:W,type:"highlight",actions:[React.createElement(s.Button,{key:"connect",href:M,target:"_blank",rel:"noreferrer noopener",variant:"primary"},__("Connect now","jetpack")),React.createElement(s.Button,{key:"learn-more",href:(0,r.Z)("jetpack-social-connecting-to-social-networks"),target:"_blank",rel:"noreferrer noopener"},__("Learn more","jetpack"))]},__("You can now share directly to your Instagram account!","jetpack")),e&&I.some((e=>e.enabled))&&React.createElement(React.Fragment,null,React.createElement(_.Z,{maxLength:U,onChange:O,message:F}),N&&React.createElement(E.Z,{disabled:J,socialPostDisabled:!ce&&!H,connections:I,disabledNoticeMessage:J?__("It is not possible to add an image or video when Social Image Generator is enabled.","jetpack"):null})),T&&q(G.advancedUpgradeEditor)&&React.createElement(C.Z,{onDismiss:re,type:"highlight"},(0,
_n("%d character remaining","%d characters remaining",o,"jetpack"),o)})}},62578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(55609),a=n(65736),s=n(61074),o=n(6163),i=n(65235),l=n.n(i),c=n(25162),u=n.n(c),d=n(82283);const __=a.__,p=({children:e,type:t="default",actions:n=[],onDismiss:a})=>{const i=l()(d.Z.notice,d.Z[`notice--${t}`]);return React.createElement("div",{className:i},React.createElement("div",{className:d.Z.content}," ",e," "),a&&React.createElement("button",{className:d.Z.dismiss,onClick:a},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(s.Z,{icon:o.Z})),n&&n.length>0&&React.createElement("div",{className:d.Z.actions},n.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func};const m=p},574:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(3396),a=n(88275),s=n(45106),o=n(55609),i=n(65736),l=n(99196),c=n(34607),u=n(57304);const __=i.__,d=({isOpen:e,onToggle:t})=>React.createElement(o.Button,{className:u.Z["icon-button"],onClick:t,"aria-expanded":e},React.createElement(r.aA,{className:u.Z.icon})),p=({className:e,onClickLearnMore:t})=>{const n=(0,l.useCallback)((({onToggle:e})=>React.createElement("div",{className:"one-click-sharing-dropdown"},React.createElement(a.ZP,null,React.createElement(c.n,{buttonStyle:"icon-text"}),React.createElement("hr",{className:u.Z.divider}),React.createElement(s.ZP,{className:u.Z.description,variant:"body-small"},__("Share with a Single Click!✨ Just tap the Social icons or the 'Copy to Clipboard' icon, and we'll format your content for sharing.","jetpack")," ",React.createElement(o.Button,{variant:"link",onClick:()=>{t(),e(!1)}},__("Learn more…","jetpack")))))),[t]);return React.createElement(o.Dropdown,{focusOnMount:!0,contentClassName:u.Z.content,className:e,popoverProps:{placement:"bottom-start"},renderToggle:d,renderContent:n})}},23519:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(32054),a=n(88275),s=n(45106),o=n(55609),i=n(65736),l=n(34607),c=n(77551),u=n(54066),d=n(16184);const __=i.__,p=({onClose:e})=>{const[t]=(0,r.Z)("sm");return React.createElement(o.Modal,{className:d.Z.modal,onRequestClose:e},React.createElement(a.ZP,null,React.createElement("div",{className:d.Z.container},React.createElement("img",{className:d.Z.background,src:c,alt:""}),React.createElement("div",{className:d.Z.column},React.createElement(s.ZP,{className:d.Z.title},__("Introducing Simplified Sharing ","jetpack")),React.createElement(s.ZP,{className:d.Z.description,variant:"body-small"},__("Hey there! Quick update for you. You can now effortlessly share your new posts on X, WhatsApp, or any other platform.","jetpack"),React.createElement("br",null),React.createElement("br",null),__("We'll auto-format your shareable content. Just click on the Social icons, or the 'Copy to Clipboard' icon, and you're set. This way, you can share on any social platform you like.","jetpack"),React.createElement("br",null),React.createElement("br",null),__("Simplifying social sharing, one click at a time!","jetpack")),React.createElement("hr",null),React.createElement("div",{className:d.Z.sharing},React.createElement(s.ZP,{variant:"title-small"},__("One-Click Sharing","jetpack")),React.createElement(l.n,null)),React.createElement("hr",null)),!t&&React.createElement("div",{className:d.Z["second-column"]},React.createElement(o.ResponsiveWrapper,{naturalWidth:350},React.createElement("img",{className:d.Z.illustration,src:u,alt:""}))))))}},8714:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(99196),c=n(14085),u=n(86419),d=n(37568),p=n(49021),m=n(95788),h=n(574),g=n(23519),f=n(91474),b=n(23761);const __=i.__,v=({prePublish:e,children:t})=>{const{refresh:n,hasConnections:i,hasEnabledConnections:v}=(0,d.Z)(),k=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:y,hidePublicizeFeature:w,isPublicizeDisabledBySitePlan:E,togglePublicizeFeature:_,isShareLimitEnabled:C,numberOfSharesRemaining
(0,o.sprintf)(__("Presto! %s","jetpack"),String.fromCodePoint(127881))),React.createElement("p",null,__("Just like that, Jetpack Social has shared your post to your connected social accounts.","jetpack")),React.createElement("p",null,__("Please leave a review to let others know how easy getting your posts on social media can be!","jetpack")),React.createElement("div",{className:l.Z.buttons},React.createElement(a.Z,{onClick:c,isExternalLink:!0,href:e,className:l.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:u,variant:"link",className:l.Z.button},__("Dismiss","jetpack")))))}},69709:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(65736),a=n(14085),s=n(78619);const __=r.__;function o(){const{connectionsAdminUrl:e}=(0,a.Z)();return React.createElement("a",{className:s.Z["settings-link"],href:e,target:"_blank",rel:"noreferrer",title:__("Connect an account","jetpack")},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",fill:"#F6F7F7"}),React.createElement("path",{d:"M19 13.3333H14.6667V9H13.3333V13.3333H9V14.6667H13.3333V19H14.6667V14.6667H19V13.3333Z",fill:"black"}),React.createElement("rect",{x:"0.375",y:"0.375",width:"27.25",height:"27.25",rx:"1.125",stroke:"#A7AAAD",strokeWidth:"0.75",strokeDasharray:"2 2"})))}},2817:(e,t,n)=>{"use strict";n.d(t,{o:()=>a});var r=n(65736);const __=r.__,a=[{label:__("X","jetpack"),networkName:"x",url:"https://x.com/intent/tweet?text={{text}}&url={{url}}"},{label:__("WhatsApp","jetpack"),networkName:"whatsapp",url:"https://api.whatsapp.com/send?text={{text}}"},{label:__("Facebook","jetpack"),networkName:"facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"}]},22917:(e,t,n)=>{"use strict";n(34607)},34607:(e,t,n)=>{"use strict";n.d(t,{n:()=>g});var r=n(3396),a=n(90526),s=n(45106),o=n(14203),i=n(13419),l=n(69307),c=n(65736),u=n(65235),d=n.n(u),p=n(2817),m=n(30664),h=n(38730);const __=c.__;function g({buttonStyle:e="icon",buttonVariant:t}){const n=(0,h.S)(),{recordEvent:u}=(0,i.z$)(),g=(0,l.useCallback)((()=>{u("jetpack_social_share_button_clicked",{network:"clipboard"})}),[u]),f=(0,l.useCallback)((()=>n("{{text}}\n{{url}}",!1)),[n]),b=(0,l.useCallback)((function(e,t){return function(n){n.preventDefault(),u("jetpack_social_share_button_clicked",t),window.open(e,"","menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600")}}),[u]);return React.createElement("div",{className:d()(m.Z["share-buttons"],{[m.Z.vertical]:e.includes("text")})},p.o.map((({label:o,networkName:i,url:l})=>{const u=n(l),d="icon"===e?React.createElement(r.av,{serviceName:i}):null,p=(0,c.sprintf)(/* translators: %s is the name of a social network, e.g. Twitter. */
__("Share on %s","jetpack"),o);return React.createElement("div",{className:m.Z.container,key:i},React.createElement(a.Z,{icon:d,variant:t,"aria-label":p,href:u,target:"_blank",rel:"noopener noreferrer",onClick:b(u,{network:i}),className:"icon"===e?m.Z[i]:"has-text"},"icon"===e?null:React.createElement(React.Fragment,null,"icon-text"===e&&React.createElement(r.av,{className:m.Z[i],serviceName:i}),React.createElement(s.ZP,{className:m.Z.label,component:"span"},p))))})),React.createElement("div",{className:m.Z.container},React.createElement(o.Z,{buttonStyle:e,onCopy:g,textToCopy:f,className:"icon"===e?m.Z.clipboard:" has-text",variant:t},"icon"===e?null:React.createElement(s.ZP,{className:m.Z.label,component:"span"},__("Copy to clipboard","jetpack")))))}},38730:(e,t,n)=>{"use strict";n.d(t,{S:()=>o});var r=n(9818),a=n(69307),s=n(42032);function o(){const{shareMessage:e}=(0,s.usePostMeta)(),{message:t,link:n}=(0,r.useSelect)((t=>{const n=t("core/editor").getEditedPostAttribute;return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}}),[e]);return(0,a.useCallback)(((e,r=!0)=>{let a=t,s=n;return e.includes("{{url}}")||(a=a+"\n\n"+s,s=""),r&&(a=encodeURIComponent(a),s=encodeURIComponent(s)),e.replace("{{text}}",a).replace("{{url}}",s)}),[n,t])}},91474:(e,t,n)=>{"use strict";n.d(t,{o:()=>h});var r=n(55609),a=n(9818),s=n(12238),o=n(69307),i=n(65736),l=n(53961),c=n(14085),u=n(45579),d=n(37568);const __=i.__;function p(e=__("Unable to share the Post","jetpack")){const{createErrorNotice:t}=(0,a.dispatch)(l.store);t(e,{id:"publicize-post-share-message"})}function m(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,c.Z)(),{isFetching:n,isError:i,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[]);(0,o.useEffect)((()=>{if(!n)return i?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(l.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,i,m]);const f=!t||!e||!g||n,b=(0,o.useCallback)((()=>{if(!g)return p(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(l.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);return React.createElement(r.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:n},__("Share post","jetpack"))}function h(){const{isRePublicizeUpgradableViaUpsell:e}=(0,c.Z)();return(0,a.useSelect)((e=>e(s.store).isCurrentPostPublished()),[])?e?null:React.createElement(r.PanelRow,null,React.createElement(m,null)):null}},54005:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(55609),a=n(69307),s=n(65736),o=n(75263),i=n(9888),l=n(81469);const __=s.__,c=({prePublish:e=!1})=>{const t=e?a.Fragment:r.PanelBody,n=e?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:s,setIsEnabled:c}=(0,o.Z)(),[u,d]=(0,a.useState)(!1),p=(0,a.useCallback)((()=>d(!0)),[]),m=(0,a.useCallback)((()=>d(!1)),[]);return React.createElement(t,n,u&&React.createElement(l.Z,{onClose:m}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:s?"":__("Social Image is disabled for this post.","jetpack"),checked:s,onChange:c}),s&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(i.ZP,null),React.createElement("hr",null),React.createElement(r.Button,{variant:"secondary",onClick:p,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(75263),l=n(98811),c=n(9888),u=n(88649),d=n(39356),p=n(40088);const __=o.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack"),g=({onClose:e})=>{const{customText:t,imageType:n,imageId:o,template:g,updateSettings:f}=(0,i.Z)(),[b,v]=(0,s.useState)(o),[k,y]=(0,s.useState)(n||"featured"),[w,E]=(0,s.useState)(t),[_,C]=(0,s.useState)(g),[x]=(0,l.Z)(b),S=(0,s.useCallback)((()=>{f({template:_,image_type:k,custom_text:w||"",..."custom"===k&&{image_id:b}}),e()}),[f,_,k,b,w,e]),j=(0,s.useCallback)((e=>{v(e?.id)}),[v]);return React.crea
(0,a.sprintf)(__("Pick the %s template","jetpack"),t.label))))))}},57227:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30253),a=n(91948),s=n(5353);const o=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:s}]},76848:(e,t,n)=>{"use strict";n(9818),n(69307),n(99196),n(23177)},53513:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(88275),a=n(55609),s=n(69307),o=n(65736),i=n(88219),l=n(89696);const __=o.__,c=__("You need a featured image or media attached to your post to be able to share as a social post.","jetpack"),u=__("By default, the image and text appear on social media as a link preview. To optimize engagement, share as a social post.","jetpack");function d({disabled:e=!1}){const{shouldUploadAttachedMedia:t,updateShouldUploadAttachedMedia:n}=(0,i.Z)(),o=(0,s.useCallback)((e=>{n(e)}),[n]),d=e?a.Disabled:s.Fragment,p=e?{className:l.Z.disabled}:{};return React.createElement(r.ZP,null,React.createElement(d,p,React.createElement(a.CheckboxControl,{className:l.Z.checkbox,checked:t,onChange:o,label:__("Share as a social post","jetpack"),help:e?c:u})))}},63855:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(82674),a=n.n(r),s=n(13477),o=n(9818),i=n(48751),l=n(23177);const c=(0,o.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{message:t}=(0,i.Z)(),{title:n,excerpt:r,content:c}=e,u=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n}=e(l.Eg).getConnectionProfileDetails(l.uJ);return{displayName:t,avatarUrl:n}}));return React.createElement(s.S,a()({},e,{type:"article",user:u,customText:t||r||c||n}))}))},83704:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(82674),a=n.n(r),s=n(17915),o=n(9818),i=n(22629),l=n(99196),c=n.n(l);const u=function(e){const t=(0,o.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,i.decodeEntities)(t("root","site").title)}));return c().createElement(s.X,a()({},e,{siteTitle:t}))}},4124:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(4049),a=n(9818),s=n(99196),o=n.n(s),i=n(48751),l=n(23177);function c(e){const{title:t,image:n,media:s}=e,{username:c,profileImage:u}=(0,a.useSelect)((e=>e(l.Eg).getConnectionProfileDetails(l.M$))),{message:d}=(0,i.Z)(),p=d||t;return o().createElement(r.V,{image:n,media:s,name:c,profileImage:u,caption:p})}},27725:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var r=n(93453),a=n(9818),s=n(65736),o=n(99196),i=n.n(o),l=n(48751),c=n(23177);const __=s.__;function u(e){const{title:t,url:n,image:s,media:o}=e,{displayName:u,profileImage:d}=(0,a.useSelect)((e=>e(c.Eg).getConnectionProfileDetails(c.qk))),{message:p}=(0,l.Z)(),m=`${p||t} ${o.length?n:""}`.trim();return i().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:s,name:u,profileImage:d,title:t,description:m,url:n,media:o})}},28586:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(82674),a=n.n(r),s=n(60312),o=n(9818),i=n(22629),l=n(48751),c=n(23177),u=n(42032);const d=e=>{const{message:t}=(0,l.Z)(),{content:n,siteName:r}=(0,o.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,i.decodeEntities)(n().title)}})),{shouldUploadAttachedMedia:d}=(0,u.usePostMeta)(),p=(0,o.useSelect)((e=>{const{displayName:t,profileImage:n,username:r}=e(c.Eg).getConnectionProfileDetails(c.cs);return{displayName:t,avatarUrl:n,address:r}})),m=e.media?.[0],h=m?.type.startsWith("image/")?m.url:null;return React.createElement(s.I,a()({},e,{siteName:r,user:p,description:n,customText:t,customImage:h,isSocialPost:d}))}},8454:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(55609),a=n(65736),s=n(39517),o=n(41809),i=n(9279);const __=a.__,l=function({onClose:e,initialTabName:t}){const n=(0,o.P)(),{image:a,media:l,title:c,description:u,url:d}=(0,i.u)();return React.createElement(r.Modal,{onRequestClose:e,className:"jetpack-social-previews__modal",__experimentalHideHeader:!0},React.createElement(r.Button,{className:"jetpack-soc
__("Upgrade to %d requests","jetpack"),p.limit),checkoutUrl:e,className:"jetpack-ai-upgrade-banner",description:(0,s.createInterpolateElement)((0,o.sprintf)(/* Translators: number of requests */
__("You have reached the requests limit for your current plan.<br /><strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack"),p.limit),{br:(0,r.createElement)("br",null),strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:t,isRedirecting:n,visible:!0,align:"center",title:null,context:null})}return(0,r.createElement)(i.p,{buttonText:"Upgrade",checkoutUrl:e,className:"jetpack-ai-upgrade-banner",description:(0,s.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Upgrade now to keep using it.</strong>","jetpack"),{br:(0,r.createElement)("br",null),strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:t,isRedirecting:n,visible:!0,align:null,title:null,context:null})})()}},45624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(82674),a=n.n(r),s=n(51806),o=n(42290),i=n(13419),l=n(52175),c=n(4981),u=n(55609),d=n(94333),p=n(9818),m=n(69307),h=n(65736),g=n(65235),f=n.n(g),b=n(10185),v=n.n(b),k=n(99196),y=n(84102),w=n(3180),E=n(50297),_=n(85642),C=n(4965),x=n(5246),S=n(49259),j=n(18135),P=n(60751),N=n(71449),T=n(3687),L=n(63634);const __=h.__,A=new(v())({breaks:!0}),M="post"===window?.Jetpack_Editor_Initial_State?.screenBase,R=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function I({attributes:e,setAttributes:t,clientId:n,isSelected:r}){const[h,g]=(0,m.useState)(),[b,v]=(0,m.useState)({}),[I,Z]=(0,m.useState)(!1),[B,D]=(0,m.useState)([]),[z,F]=(0,m.useState)(null),[O,U]=(0,m.useState)(null),{tracks:H}=(0,i.z$)(),V=(0,p.useSelect)((e=>e("core/editor").getCurrentPostId())),{getBlock:q}=(0,p.useSelect)("core/block-editor"),G=(0,k.useRef)(null),$=(0,k.useRef)(null),{replaceBlocks:W,replaceBlock:J,removeBlock:K}=(0,p.useDispatch)("core/block-editor"),{editPost:Y}=(0,p.useDispatch)("core/editor"),{mediaUpload:X}=(0,p.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),{isOverLimit:Q,requireUpgrade:ee,increaseRequestsCount:te}=(0,j.Z)(),ne=()=>{setTimeout((()=>{G.current?.focus?.()}),100)},re=()=>{setTimeout((()=>{$.current?.focus?.()}),100)},ae=(0,d.useViewportMatch)("medium","<"),{isLoadingCategories:se,isLoadingCompletion:oe,wasCompletionJustRequested:ie,getSuggestionFromOpenAI:le,stopSuggestion:ce,showRetry:ue,contentBefore:de,postTitle:pe,retryRequest:me,wholeContent:he,requestingState:ge}=(0,P.Z)({onSuggestionDone:(0,m.useCallback)((()=>{ne(),te()}),[te]),onUnclearPrompt:(0,m.useCallback)((()=>{re(),te()}),[te]),onModeration:ne,attributes:e,clientId:n,content:e.content,setError:v,tracks:H,userPrompt:h,requireUpgrade:ee}),fe=(0,N.b)(),be=(0,S.$M)(n);(0,k.useEffect)((()=>{if(!be)return;const e=JSON.parse(localStorage.getItem(be));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(be),le(t,n)}),[be,le]),(0,k.useEffect)((()=>{b&&U(!1)}),[b]);const ve=(0,k.useRef)(e?.content);(0,k.useEffect)((()=>{if(!e?.useGutenbergSyntax)return;if(!ve?.current?.length)return;const t=q(n);if(t?.innerBlocks?.length)return;const r=(0,c.parse)(ve.current);r?.length&&W(n,r)}),[ve,n,W,q,e?.useGutenbergSyntax]);const[ke,ye]=(0,m.useState)(""),[we,Ee]=(0,m.useState)(0);(0,k.useEffect)((()=>{const e=setInterval((()=>{we<_.Ie.length?(ye(_.Ie[we].label),Ee((e=>e+1))):(clearInterval(e),ye(__("Ask Jetpack AI","jetpack")))}),1600);return()=>clearInterval(e)}),[ke,we]);const _e=async t=>{if(I)return;Z(!0),v({});const r=await fetch(t),a=await r.blob(),s=new File([a],"jetpack_ai_image.png",{type:"image/png"});X({filesList:[s],onFileChange:([t])=>{t.id&&J(n,(0,c.createBlock)("core/image",{url:t.url,caption:e.requestedPrompt,alt:e.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),Z(!1)}}),H.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:V})},Ce=e?.useGutenbergSyntax,xe=oe||se,Se=!!e.content,je="generateTitle"===e.promptType,Pe=__("Accept","jetpack"),Ne=__("Accept title","jetpack"),Te=je?Ne:Pe,Le=(...e)=>{le(...e),re()},Ae=async()=>{let t=[];if(Ce)t=q(n),t=t?.innerBlocks||[];else{const n=A.render(e.content).replace(/<li>\s+<p>/g,"<li>")
__("Prompt with id %d not found.","jetpack"),o)," ",(0,r.createElement)(i.Button,{variant:"link",onClick:e},__("Reset prompt","jetpack")))):(t=>(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %s is the error message. */
__("Error while fetching prompt: %s","jetpack"),t)," ",(0,r.createElement)(i.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(n.message);var o;t.removeAllNotices(),t.createErrorNotice(s)}))}),[m,t,b,v,a,x]);const S=e=>{a({showLabel:e})},j=e=>{a({showResponses:e})};return(0,r.createElement)("div",C,n,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,r.createElement)(i.ToggleControl,{label:__("Show daily prompt label","jetpack"),checked:w,onChange:S}),(0,r.createElement)(i.ToggleControl,{label:__("Show other responses","jetpack"),checked:E,onChange:j})))),b?(0,r.createElement)(r.Fragment,null,w&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__label"},k),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},y),E&&v&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},f&&f.slice(0,3).map((({url:e})=>e&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:e,key:e}))),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:h,target:"_blank",rel:"external noreferrer noopener"},g))):(0,r.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,r.createElement)(i.Spinner,null)))}))},35681:(e,t,n)=>{"use strict";var r=n(4981),a=n(9818),s=n(65736),o=n(31985),i=n(46185),l=n(37391),c=n(14303),u=n(19597),d=n(65783),p=n(43807),m=n(2275);const __=s.__;(0,o.S)(l,{edit:c.Z,save:m.Z,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}}}),function(){const e=new URL(document.location.href);if(!e.pathname.endsWith("/wp-admin/post-new.php"))return;const t=e.searchParams.get("answer_prompt")??"0",n=parseInt(t);n&&async function(e){await(0,i.U)();const{insertBlocks:t}=(0,a.dispatch)("core/block-editor");t([(0,r.createBlock)(`jetpack/${name}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,r.createBlock)("core/paragraph")],0,void 0,!1)}(n)}()},2275:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);const s=function({attributes:e}){const{answersLink:t,answersLinkText:n,gravatars:s,promptId:o,promptLabel:i,promptText:l,showLabel:c,showResponses:u}=e,d=a.useBlockProps.save({className:"jetpack-blogging-prompt"});return(0,r.createElement)("div",d,c&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__label"},i),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},l),u&&o&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},s.map((({url:e})=>e&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:e,key:e}))),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:t,target:"_blank",rel:"external noreferrer noopener"},n)))}},44266:(e,t,n)=>{"use strict";n.d(t,{n:()=>c});var r=n(86989),a=n.n(r),s=n(9818),o=n(69307),i=n(81975);function l(e){const t=(0,i.escapeHTML)(e);return a()({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,n){const{editPost:r}=(0,s.useDispatch)("core/editor"),a=(0,o.useRef)("not-started"),{postType:i,postsSupportTags:c,tags:u,tagIds:d,tagsHaveResolved:p}=(0,s.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getEntityRecords:n,getPostType:r,hasFinishedResolution:a}=e("core"),s=t("tags"),o={_fields:"id,name",context:"view",include:s?.join(","),per_page:-1};return{postType:t("type"),postsSupportTags:r("post")?.taxonomies.includes("post_tag"),tagIds:s||[],tags:s&&s.length?n("taxonomy","post_tag",o):[],tagsHaveResolved:!s||!s.length||a("getEntityRecords",["taxonomy","post_tag",o])}}),[]);(0,o.useEffect)((()=>{"post"==
__("No sites found for %s.","jetpack"),n))),e.length>0&&(0,r.createElement)("ul",{"aria-live":"polite"},e.map((e=>{const n=i.some((t=>t?.id===e?.blog_id));return(0,r.createElement)("li",{key:e.blog_id,className:"jetpack-blogroll__appender-result-container"},(0,r.createElement)("button",{className:"jetpack-blogroll__appender-result-title",disabled:n,onClick:()=>t(e)},(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-image"},e.site_icon&&(0,r.createElement)("img",{src:e.site_icon,alt:e.name})),(0,r.createElement)("div",{className:"jetpack-blogroll__appender-result-text"},(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-title"},e.name),(0,r.createElement)("span",{className:"jetpack-blogroll__appender-result-description"},e.description))))}))))}},46902:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__;function o({value:e,onChange:t}){return(0,r.createElement)("div",{className:"jetpack-blogroll__appender-search"},(0,r.createElement)(a.TextControl,{__nextHasNoMarginBottom:!0,label:__("Search for sites to add","jetpack"),hideLabelFromVision:!0,placeholder:__("Search…","jetpack"),value:e,onChange:e=>t(e)}))}},53335:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(51806),a=n(55609),s=n(9818),o=n(69307),i=n(65736),l=n(11908),c=n(1219),u=n(95686),d=n(75320),p=n(46902);const __=i.__;function m({isLoading:e,subscriptions:t,clientId:n}){const[i,m]=(0,o.useState)(!1),[h,g]=(0,o.useState)(),[f,b]=(0,o.useState)(""),{insertBlock:v}=(0,s.dispatch)("core/block-editor"),{siteDetails:k,isLoading:y}=(0,c.Z)({siteURL:f,subscriptions:t,enabled:f});return e?(0,r.createElement)(a.Spinner,{className:"jetpack-blogroll__appender-spinner"}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.Button,{className:"block-editor-button-blogroll-block-appender",ref:g,icon:l.Z,label:__("Add Blogroll Item","jetpack"),onClick:()=>{m((e=>!e))}}),i&&(0,r.createElement)(a.Popover,{anchor:h,className:"jetpack-blogroll__appender"},(0,r.createElement)(p.Z,{value:f,onChange:b}),(0,r.createElement)(d.Z,{results:k,onSelect:e=>{v((0,u.UW)(e),void 0,n),m(!1)},searchInput:f,isLoading:y})))}},11417:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(52175),s=n(4981),o=n(55609),i=n(9818),l=n(69307),c=n(65736),u=n(65235),d=n.n(u),p=n(53335),m=n(49105),h=n(56054),g=n(7973),f=n(95686);const __=c.__;const b=function({className:e,attributes:t,setAttributes:n,clientId:c}){const{show_avatar:u,show_description:b,open_links_new_window:v,ignore_user_blogs:k,load_placeholders:y}=t,{isLoading:w,recommendations:E,errorMessage:_}=(0,m.Z)(y),{isLoading:C,subscriptions:x,errorMessage:S}=(0,g.Z)({ignore_user_blogs:k});(0,h.k)({clientId:c});const{replaceInnerBlocks:j}=(0,i.dispatch)("core/block-editor");(0,l.useEffect)((()=>{if(y&&E.length){n({load_placeholders:!1});const e=[(0,s.createBlock)("core/heading",{content:__("Blogroll","jetpack"),level:3}),...E.map(f.v5)];j(c,e)}}),[E,y,n,c,j]);const P=(0,a.useBlockProps)({className:d()(e,{"hide-avatar":!u,"hide-description":!b})}),N=_||S;return(0,r.createElement)("div",P,(0,r.createElement)(a.InnerBlocks,{template:[["core/heading",{content:__("Blogroll","jetpack"),level:3}]],allowedBlocks:["jetpack/blogroll-item"],renderAppender:()=>!w&&(0,r.createElement)(p.Z,{isLoading:C,subscriptions:x,clientId:c})}),N&&(0,r.createElement)(o.Notice,{status:"error",isDismissible:!1},(0,r.createElement)("p",null,N)),y&&w&&(0,r.createElement)(o.FlexBlock,{style:{padding:"30px",textAlign:"center"}},(0,r.createElement)(o.Spinner,null)),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Show avatar","jetpack"),checked:!!u,onChange:()=>n({show_avatar:!u})}),(0,r.createElement)(o.ToggleControl,{label:__("Show description","jetpack"),checked:!!b,onChange:()=>n({show_description:!b})}),(0,r.createElement)(o.ToggleControl,{label:__("Open links in a new window","jetpack"),checked:!!v,onChange:()=>n({open_links_new_window:!v})}),(0,r.createElement)(o.ToggleControl,{lab
2022-12-15 17:41:53 +01:00
// translators: %d: Tier level e.g: "1", "2", "3"
2023-12-07 09:44:11 +01:00
__("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...y];n[t]=e,v("amounts",n)})(e,t),value:e})))),m&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>n({customAmountText:e})}),(0,r.createElement)(l.Z,{currency:c,label:__("Custom amount","jetpack"),defaultValue:100*(0,i.hj)(c),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:b("extraText"),onChange:e=>v("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(a.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:b("buttonText"),onChange:e=>{return t=e,void n({oneTimeDonation:{...u,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...p,buttonText:t}});var t},allowedFormats:w})))}},72833:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(69307),s=n(65736),o=n(65235),i=n.n(o),l=n(16367),c=n(82275),u=n(91757);const __=s.__,d=e=>{const{attributes:t,className:n,products:s,setAttributes:o}=e,{oneTimeDonation:d,monthlyDonation:p,annualDonation:m}=t,[h,g]=(0,a.useState)("one-time"),f=(0,a.useCallback)((e=>h===e),[h]),b={"one-time":{title:__("One-Time","jetpack")},...p.show&&{"1 month":{title:__("Monthly","jetpack")}},...m.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,a.useEffect)((()=>{d.planId===s["one-time"]&&p.planId===s["1 month"]&&m.planId===s["1 year"]||o({...s["one-time"]&&{oneTimeDonation:{...d,planId:s["one-time"]}},...s["1 month"]&&{monthlyDonation:{...p,planId:s["1 month"]}},...s["1 year"]&&{annualDonation:{...m,planId:s["1 year"]}}})}),[d,p,m,o,s]),(0,a.useEffect)((()=>{!p.show&&f("1 month")&&g("one-time"),!m.show&&f("1 year")&&g("one-time")}),[p,m,g,f]),(0,r.createElement)("div",{className:n},(0,r.createElement)(l.U,{blockName:"donations"}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(b).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(b).map((([e,{title:t}])=>(0,r.createElement)("div",{role:"button",tabIndex:0,className:i()("donations__nav-item",{"is-active":f(e)}),onClick:()=>g(e),onKeyDown:()=>g(e),key:`jetpack-donations-nav-item-${e} `},t)))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(u.Z,{activeTab:h,attributes:t,setAttributes:o}))),(0,r.createElement)(c.Z,e))}},92868:(e,t,n)=>{"use strict";n.d(t,{IJ:()=>a,Q7:()=>s,Wh:()=>r});const r=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,a=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,s="https://www.eventbrite.com/e/test-event-tickets-123456789"},6949:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(51806),a=n(55609),s=n(65736);const __=s.__,o=({setEditingUrl:e})=>(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)}))},1344:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=[n(24717).Z]},24717:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(52175),s=n(4981),o=n(65736),i=n(65235),l=n.n(i),c=n(92819);const _x=o._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const d={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:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const a={...(0,c.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outlin
_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",e,"jetpack"),e):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(a.Notice,{isDismissible:!1,status:"info"},t))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:p,onChange:e=>c({count:e}),min:1,max:o.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>c({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>c({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:h,onChange:()=>c({isStackedOnMobile:!h})})))}},36420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(51806),a=n(13419),s=n(52175),o=n(55609),i=n(69307),l=n(65736),c=n(65235),u=n.n(c),d=n(92819),p=n(4554),m=n(96946),h=n(696),g=n(64129),f=n(44961),b=n(79236),v=n(2681),k=n(75412);const __=l.__,y=(0,o.withNotices)((e=>{const{attributes:t,className:n,isSelected:l,noticeOperations:c,noticeUI:y,setAttributes:w}=e,{accessToken:E,align:_,columns:C,count:x,isStackedOnMobile:S,spacing:j}=t;(0,i.useEffect)((()=>{const e=(0,p.S)(m.attributes,t);(0,d.isEqual)(e,t)||w(e)}),[t,w]);const[P,N]=(0,i.useState)(E),{isRequestingWpcomConnectUrl:T,wpcomConnectUrl:L}=(0,v.Z)(),{images:A,isLoadingGallery:M,setImages:R}=(0,k.Z)({accessToken:E,noticeOperations:c,setAttributes:w,setSelectedAccount:N}),{connectToService:I,disconnectFromService:Z,isConnecting:B,isRequestingUserConnections:D,userConnections:z}=(0,b.Z)({accessToken:E,noticeOperations:c,selectedAccount:P,setAttributes:w,setImages:R,setSelectedAccount:N}),F=(0,a.Dp)(),O=x>A.length?A.length:x,U=!M&&(!E||(0,d.isEmpty)(A)),H=!U,V=E&&M&&(0,d.isEmpty)(A),q=!U&&!V,G=u()(n,{[`align${_}`]:_}),$=u()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${C}`,{"is-stacked-on-mobile":S}),W={gridGap:j,"--latest-instagram-posts-spacing":j?`${j}px`:void 0},J={padding:j},K=()=>{P&&h.D!==P?w({accessToken:P,instagramUser:(0,d.find)(z,{token:P}).username}):I()};return(0,r.createElement)("div",{className:G},U&&(0,r.createElement)(o.Placeholder,{icon:"instagram",instructions:F?D||z.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:y},F?(()=>{const e=z.length>0,t=[...(0,d.map)(z,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:h.D}],n=B||D||e&&!P;return(0,r.createElement)("div",null,e&&(0,r.createElement)(o.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>N(e),options:t,selected:P}),h.D===P&&(0,r.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,r.createElement)(o.Button,{disabled:n,variant:"primary",onClick:K},B&&__("Connecting…","jetpack"),D&&__("Loading your connections…","jetpack"),!B&&!D&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(o.Button,{disabled:T||!L,href:L,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),V&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),q&&(0,r.createElement)("div",{className:$,style:W},(0,d.times)(l?x:O,(e=>(0,r.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:J},(e=>{if(A[e]){const n=A[e];return(0,r.createElement)(f.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:j})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFc
_n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:s,completer:o}=this.props,{selectedIndex:i,filteredOptions:l}=this.state,{key:c=""}=l[i]||{},{className:p}=o,m=l.length>0,h=m?`components-autocomplete-listbox-${s}`:null,g=m?`components-autocomplete-item-${s}-${c}`:null;return(0,r.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:g,onChange:e,onKeyDown:t}),m&&(0,r.createElement)(a.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,r.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,d.map)(l,((e,t)=>(0,r.createElement)(a.Button,{key:e.key,id:`components-autocomplete-item-${s}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:u()("components-autocomplete__result",p,{"is-selected":t===i}),onClick:()=>this.select(e)},e.label))))))}}const h=(0,s.compose)([a.withSpokenMessages,s.withInstanceId,a.withFocusOutside])(m)},90055:(e,t,n)=>{"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{h:()=>r})},84634:(e,t,n)=>{"use strict";n.d(t,{YB:()=>a,b2:()=>r,k:()=>s,xt:()=>i,zb:()=>o});const r=e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0};function a(e,t){const n=new e.LngLatBounds;return t.forEach((e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])})),n}function s(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function o(e,t){e.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${t}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}function i(e){return new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},96442:(e,t,n)=>{"use strict";n.d(t,{E0:()=>d,E_:()=>i,F7:()=>l,eR:()=>c,ot:()=>o,rZ:()=>u});var r=n(85007);const a=6371e3;function s(e){return Math.abs(a*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function o(e,t){return 512/Math.pow(2,e)*.5*s(t)}function i(e,t){const n=e/s(t);return Math.log2(512/(n/.5))}function l(e,t){if(0===t.length)return null;const n=new e.Coordinate(-90,180),r=new e.Coordinate(90,-180);t.forEach((e=>{n.latitude=Math.max(n.latitude,e.coordinates.latitude),n.longitude=Math.min(n.longitude,e.coordinates.longitude),r.latitude=Math.min(r.latitude,e.coordinates.latitude),r.longitude=Math.max(r.longitude,e.coordinates.longitude)}));const a=new e.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),s=new e.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));return new e.CoordinateRegion(a,s)}function c(e,t){return()=>{const n=e.createElement("div");return n.classList.add("mapkit-popup-content"),t(n),n}}function u(e,t){return new Promise((n=>{if(t.mapkitScriptIsLoading)(0,r.Dz)(t,"mapkit").then((e=>{n(e)}));else{t.mapkitScriptIsLoading=!0;const a=e.createElement("script");a.addEventListener("load",(async()=>{const e=await(0,r.Dz)(t,"mapkit");t.mapkitScriptIsLoading=!1,n(e)}),{once:!0}),a.src="https://cdn.apple-mapkit.co
__("Open Table Preview %s","jetpack"),n),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,p.join)(N,"%2C")}&type=${t}&theme=${a}&overlay=false&domain=${L}&lang=${A&&f.v.includes(A)?A:"en-US"}&newtab=${M}&disablega=true`}))})()))}))},92482:(e,t,n)=>{"use strict";var r=n(51806),a=n(4981),s=n(31985),o=n(46385),i=n(80452),l=n(70398),c=n(76851),u=n(14680),d=n(48769);(0,s.S)(o,{edit:c.Z,save:({attributes:{rid:e}})=>(0,r.createElement)("div",null,e?.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`)))),attributes:o.attributes,styles:(0,u.Eo)(),transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(d.pU.test(e.textContent)||d.tC.test(e.textContent)),transform:e=>{const t=(0,d.CC)(e.textContent);return(0,a.createBlock)("jetpack/opentable",t)}}]},deprecated:[i.Z,l.Z]})},47144:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,v:()=>a});const r=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],a=r.map((e=>e.value))},57087:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(82674),a=n.n(r),s=n(51806),o=n(55609),i=n(69307),l=n(65736),c=n(92819),u=n(25392);const __=l.__,_n=l._n,d=20;function p(e){const[t,n]=(0,i.useState)(""),r=(0,u.Z)(t,d),[l,p]=(0,i.useState)(e.rids||[]),m=/^(\d+)$|\(\#(\d+)\)$/,h=r.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),g=(0,s.createElement)(o.FormTokenField,a()({value:l,suggestions:h,saveTransform:e=>u.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:d,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=m.exec(e);return t[1]||t[2]}));p(n),e.onChange&&e.onChange(n)}}));return(0,s.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,s.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,c.isEmpty)(l)?t:l)}},g,(0,s.createElement)(o.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):g)}},14680:(e,t,n)=>{"use strict";n.d(t,{Eo:()=>o,fL:()=>i,jn:()=>s});var r=n(65736),a=n(92819);const __=r.__,s={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},o=e=>(0,a.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&s]),i=e=>o(e).map((e=>e.name))},41007:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(69307);function a(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},25392:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,Z:()=>o});var r=n(69307),a=n(92819);const s=/^\s*(http[s]?:\/\/|\<script)/;function o(e,t){const[n,o]=(0,r.useState)([]),i=(0,r.useCallback)((0,a.throttle)(((e="")=>{fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(e)).then((e=>e.json())).then((e=>o((0,a.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,r.useEffect)((()=>{(0,a.isEmpty)(e)||s.test(e)||i(e)}),[e]),n}},48769:(e,t,n)=>{"use strict";n.d(t,{CC:()=>o,pU:()=>s,tC:()=>a});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,a=/restref=([0-9]+)&/,s=/rid=([0-9]+)&/,o=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let a=n.getAll("rid");if(a&&0!==a.length||(a=n.getAll("restref")),!a||0===a.length)return;const s={};a&&(s.rid=a);const o=n.get("domain");o&&(s.domain=o);const i=n.get("iframe");i&&(s.iframe=i);const l=n.get("lang");l&&(s.lang=l);const c=n.get("newtab");return c&&(s.newtab=c),r&&(s.style=r),s})((e=>{const t=e.match(r);return t&&t[1]?t[1]:a.test(e)||s.test(e)?e:
`${(0,l.sprintf)(__("Loading: %s","jetpack"),n)} ${s}`,"assertive"),!0};loadAndPlay=e=>{this.recordUserInteraction(),this.loadTrack(e)&&this.props.playMediaSource(this.props.playerId)};getTrack=e=>this.props.tracks[e];handleError=e=>{if(!this.state.hasUserInteraction){const t=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{throw new Error(t)}))}this.props.errorMediaSource(this.props.playerId),(0,a.speak)(`${__("Error: Episode unavailable - Open in a new tab","jetpack")}`,"assertive")};handlePlay=()=>{this.props.playMediaSource(this.props.playerId),this.setState({hasUserInteraction:!0})};handlePause=()=>{this.props.pauseMediaSource(this.props.playerId),this.props.playerState!==p.Vy&&this.props.pauseMediaSource(this.props.playerId)};handleTimeChange=e=>{this.props.setMediaSourceCurrentTime(this.props.playerId,e)};handleJump=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime-5)};handleSkip=()=>{this.props.setMediaSourceCurrentTime(this.props.playerId,this.props.currentTime+30)};updateMediaData=e=>{this.props.updateMediaSourceData(this.props.playerId,{duration:e.target?.duration,domId:e.target?.id})};registerPlayer(){const e=this.getTrack(this.state.currentTrack)||{},{playerId:t}=this.props;this.props.registerMediaSource(t,{title:e.title,link:e.link,state:p._5}),this.props.setDefaultMediaSource(t)}componentDidMount(){this.props.playerId&&this.registerPlayer()}componentWillUnmount(){this.props.playerId&&this.props.unregisterMediaSource(this.props.playerId)}componentDidUpdate(e){const t=e=>e?.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=new Set(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}static getDerivedStateFromProps(e,t){return e.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:a,tracks:s,attributes:o,currentTime:i,playerState:c}=this.props,{itemsToShow:p,primaryColor:f,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:w,backgroundColor:E,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:x,showEpisodeTitle:S,showEpisodeDescription:j}=o,{currentTrack:P}=this.state,N=s.slice(0,p),T=this.getTrack(P),L=(0,m.Aq)({primaryColor:f,customPrimaryColor:b,secondaryColor:k,customSecondaryColor:y,backgroundColor:E,customBackgroundColor:_}),A={color:y,backgroundColor:_,"--jetpack-podcast-player-primary":v,"--jetpack-podcast-player-secondary":w,"--jetpack-podcast-player-background":C},M=u()("jetpack-podcast-player",c,L.secondary.classes,L.background.classes);return(0,r.createElement)("section",{className:M,style:A,"aria-labelledby":t||T&&T.title?`${e}__title`:void 0,"aria-describedby":T&&T.description?`${e}__track-description`:void 0,"data-jetpack-iframe-ignore":!0},(0,r.createElement)(h.Z,{playerId:e,title:t,link:n,cover:a,track:this.getTrack(P),showCoverArt:x,showEpisodeTitle:S,showEpisodeDescription:j,colors:L},(0,r.createElement)(d.Z,{onJumpBack:this.handleJump,onSkipForward:this.handleSkip,trackSource:this.getTrack(P).src,onPlay:this.handlePlay,onPause:this.handlePause,onError:this.handleError,playStatus:c,currentTime:i,onTimeChange:this.handleTimeChange,onMetadataLoaded:this.updateMediaData})),N.length>1&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h4",{id:`jetpack-podcast-player__tracklist-title--${e}`,className:"jetpack-podcast-player--visually-hidden"},(0,l.sprintf)(
2022-12-15 17:41:53 +01:00
// translators: %s is the track title.
2023-12-07 09:44:11 +01:00
__("Playlist: %s","jetpack"),t)),(0,r.createElement)("p",{id:`jetpack-podcast-player__tracklist-description--${e}`,className:"jetpack-podcast-player--visually-hidden"},__("Select an episode to play it in the audio player.","jetpack")),(0,r.createElement)(g.Z,{playerId:e,playerState:c,currentTrack:P,tracks:N,selectTrack:this.selectTrack,colors:L})))}}b.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]};const v=(0,s.compose)([f.Z,(0,o.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(p.tT);return{currentTime:r(n),playerState:a(n)}})),(0,o.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:s,pauseMediaSource:o,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}=e(p.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:s,pauseMediaSource:o,toggleMediaSource:i,errorMediaSource:l,setMediaSourceCurrentTime:c}}))])(b)},46843:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(69307),s=n(65736);const __=s.__,o=(0,a.memo)((({link:e,title:t,colors:n})=>(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),e&&(0,r.createElement)("span",{className:n.secondary.classes,style:{color:n.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:e,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,s.sprintf)(/* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
__("%s:","jetpack"),t)} `),__("Open in a new tab","jetpack"))))))},96817:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(69307),s=n(65736),o=n(69650);const __=s.__,i=(0,a.memo)((({isPlaying:e,isError:t,className:n})=>{let a,s;t?(s="error",
2022-04-02 10:26:41 +02:00
/* translators: This is text to describe the current state. This will go
before the track title, such as "Error: [The title of the track]". */
2023-12-07 09:44:11 +01:00
a=__("Error:","jetpack")):e&&(s="playing",
2022-04-02 10:26:41 +02:00
/* translators: Text to describe the current state. This will go before the
track title, such as "Playing: [The title of the track]". */
2023-12-07 09:44:11 +01:00
a=__("Playing:","jetpack"));const i=o[s];return i?(0,r.createElement)("span",{className:`${n} ${n}--${s}`},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${a} `),i):(0,r.createElement)("span",{className:n})}))},72862:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(69307),s=n(65736),o=n(65235),i=n.n(o),l=n(66085),c=n(46843),u=n(96817);const __=s.__,d=(0,a.memo)((({track:e,isActive:t,isPlaying:n,isError:a,selectTrack:s,index:o,colors:d={primary:{},secondary:{}}})=>{const p=(0,l.Gd)("color",d.primary.name),m=(0,l.Gd)("color",d.secondary.name),h=i()("jetpack-podcast-player__track",{"is-active":t,"has-primary":t&&(d.primary.name||d.primary.custom),[p]:t&&!!p,"has-secondary":!t&&(d.secondary.name||d.secondary.custom),[m]:!t&&!!m}),g={};t&&d.primary.custom&&!p?g.color=d.primary.custom:t||!d.secondary.custom||m||(g.color=d.secondary.custom);const
2022-04-02 10:26:41 +02:00
/* translators: This needs to be a single word with no spaces. It describes
the current item in the group. A screen reader will announce it as "[title],
current track". */
2023-12-07 09:44:11 +01:00
f=t?__("track","jetpack"):void 0;return(0,r.createElement)("li",{className:h,style:Object.keys(g).length?g:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:e.link||e.src,role:"button","aria-current":f,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),s(o))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),s(o))}},(0,r.createElement)(u.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:n,isError:a}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},e.title),e.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:e.duration},e.duration)),t&&a&&(0,r.createElement)(c.Z,{link:e.link,title:e.title,colors:d}))}))},71540:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(69307),s=n(65736);const __=s.__;function o(e){class t extends a.Component{state={didError:!1,isIE11AudioIssue:!1};componentDidCatch=(e,t)=>{this.props.onError(e,t)};static getDerivedStateFromError=e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)});render(){const{didError:t,isIE11AudioIssue:n}=this.state;return t?(0,r.createElement)("section",{className:"jetpack-podcast-player"},(0,r.createElement)("p",{className:"jetpack-podcast-player__error"},n?__('The podcast player cannot be displayed as your browser settings do not allow for sounds to be played in webpages. This can be changed in your browsers "Internet options" settings. In the "Advanced" tab you will have to check the box next to "Play sounds in webpages" in the "Multimedia" section. Once you have confirmed that the box is checked, please press "Apply" and then reload this page.',"jetpack"):__("An unexpected error occured within the Podcast Player. Reloading this page might fix the problem.","jetpack",0))):(0,r.createElement)(e,this.props)}}return t.defaultProps={onError:()=>{}},t}},63226:(e,t,n)=>{"use strict";n.d(t,{b:()=>a,u:()=>r});const r="podcast-feed",a="embed-block"},16542:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(96483),a=n(24381);const s={attributes:{url:{type:"string",validator:r.isUrl},itemsToShow:{type:"integer",default:5},showCoverArt:{type:"boolean",default:!0},showEpisodeDescription:{type:"boolean",default:!0},primaryColor:{type:"string"},customPrimaryColor:{type:"string",validator:a.Z},hexPrimaryColor:{type:"string",validator:a.Z},secondaryColor:{type:"string"},customSecondaryColor:{type:"string",validator:a.Z},hexSecondaryColor:{type:"string",validator:a.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:a.Z},hexBackgroundColor:{type:"string",validator:a.Z},exampleFeedData:{type:"object"}},supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},99800:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var r=n(51806),a=n(13419),s=n(52175),o=n(4981),i=n(55609),l=n(94333),c=n(9818),u=n(69307),d=n(65736),p=n(96483),m=n(51128),h=n.n(m),g=n(92819),f=n(43718),b=n(85007),v=n(4554),k=n(98075),y=n(33665),w=n(71600),E=n(63226),_=n(13331),C=n(93610),x=n(66085);const __=d.__,S=h()("jetpack:podcast-player:edit"),j=(0,a.Wp)()||(0,a.Ug)()?"http://en.support.wordpress.com/wordpress-editor/blocks/podcast-player-block/":"https://jetpack.com/support/jetpack-blocks/podcast-player-block/",P=(0,l.compose)([(0,c.withDispatch)(((e,{clientId:t,attributes:n})=>({replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(t,(0,o.createBlock)("core/embed",{url:n.url}))}}))),(0,s.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),i.withNotices,l.withInstanceId,f.K])((({instanceId:e,className:t,attributes:n,setAttributes:a,noticeOperations:{createErrorNotice:o,removeAllNotices:l},noticeUI:c,primaryColor:d,setPrimaryColor:m,secondaryColor:h,setSecondaryColor:f,fallbackTextColor:P,backgroundColor:N,setBackgroundColor:T,fallbackBackgroundColor:L,isSelected:A,replaceWithEmbedBlock:M})=>{const R=(0,v.S)(y.attributes,n),{url:I,selectedEpisodes:Z,itemsToShow:B,showCoverArt:D,showEpisodeTitle:z,showEpisodeDescription:F,ex
2023-09-26 10:24:36 +02:00
_n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,c.sprintf)(/* translators: placeholder is a number. */
2023-12-07 09:44:11 +01:00
_n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,r.createElement)("div",{className:d()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,r.createElement)(o.Placeholder,{icon:g,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,r.createElement)(o.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,r.createElement)(o.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,r.createElement)(o.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(s.InnerBlocks,null)))}}const b=(0,i.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(f)},48516:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);const s=({className:e})=>(0,r.createElement)("div",{className:e},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks.Content,null)))},51100:(e,t,n)=>{"use strict";n.d(t,{Am:()=>a,FV:()=>r,Kv:()=>s});const r="after-visits",a="before-visits",s=3},35983:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(52175),s=n(51100);const o={attributes:{criteria:{type:"string",default:s.FV},threshold:{type:"number",default:s.Kv}},supports:{html:!1},save:({className:e})=>(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks.Content,null))}},50323:(e,t,n)=>{"use strict";var r=n(31985),a=n(18962),s=n(4498),o=n(48516),i=n(35983);(0,r.S)(a,{edit:s.Z,save:o.Z,deprecated:[i.Z]})},26208:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);function s({className:e}){return(0,r.createElement)("div",{className:e},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},23346:(e,t,n)=>{"use strict";var r=n(31985),a=n(91402),s=n(26208),o=n(26169),i=n(1645),l=n(71290);(0,r.S)(a,{edit:s.Z,save:o.Z,variations:i.Z},[{name:l.u2,settings:l.Xd}])},26169:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);const s=e=>(0,r.createElement)("div",{className:e.className},(0,r.createElement)(a.InnerBlocks.Content,null))},46482:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r=[{code:"US",label:"🇺🇸 +1",value:"1US"},{code:"CA",label:"🇨🇦 +1",value:"1CA"},{code:"BS",label:"🇧🇸 +1242",value:"1242BS"},{code:"BB",label:"🇧🇧 +1246",value:"1246BB"},{code:"AI",label:"🇦🇮 +1264",value:"1264AI"},{code:"AG",label:"🇦🇬 +1268",value:"1268AG"},{code:"VG",label:"🇻🇬 +1284",value:"1284VG"},{code:"VI",label:"🇻🇮 +1340",value:"1340VI"},{code:"BM",label:"🇧🇲 +1441",value:"1441BM"},{code:"GD",label:"🇬🇩 +1473",value:"1473GD"},{code:"TC",label:"🇹🇨 +1649",value:"1649TC"},{code:"MS",label:"🇲🇸 +1664",value:"1664MS"},{code:"MP",label:"🇲🇵 +1670",value:"1670MP"},{code:"GU",label:"🇬🇺 +1671",value:"1671GU"},{code:"AS",label:"🇦🇸 +1684",value:"1684AS"},{code:"LC",label:"🇱🇨 +1758",value:"1758LC"},{code:"DM",label:"🇩🇲 +1767",value:"1767DM"},{code:"VC",label:"🇻🇨 +1784",value:"1784VC"},{code:"DO",label:"🇩🇴 +1849",value:"1849DO"},{code:"TT",label:"🇹🇹 +1868",value:"1868TT"},{code:"KN",label:"🇰🇳 +1869",value:"1869KN"},{code:"JM",label:"🇯🇲 +1876",value:"1876JM"},{code:"PR",label:"🇵🇷 +1939",value:"1939PR"},{code:"EG",label:"🇪🇬 +20",value:"20EG"},{code:"M
2023-09-26 10:24:36 +02:00
__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return f.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,a.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency cant contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,u.sprintf)(/* translators: Placeholder is a number of decimals in a number. */
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If youre selling something, you need a price tag. Add yours here.","jetpack")}),!1)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?m.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: placeholder is an email address. */
2023-12-07 09:44:11 +01:00
__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)};validateTitle=()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what theyre paying for.","jetpack")}),!1)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=f.Rh.map((e=>{const{symbol:t}=(0,a.X)(e);return{value:e,label:t===e?e:`${e} ${(0,h.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(o.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(o.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText}))));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:a,instanceId:s,isSelected:i,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:x}=a,S=C&&(0,h.isEmpty)(c);if(!i&&S)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(v.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&m&&_&&x&&!e&&!t&&!n)return(0,r.createElement)(v.Z,{"aria-busy":"false",content:u,featuredMediaUrl:y,featuredMediaTitle:w,formattedPrice:(0,k.w)(_,d),multiple:E,title:x});const j=S?o.Disabled:"div";return(0,r.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(b.Z,{featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:l}),(0,r.createElement)("div",null,(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-title-error`,className:p()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:x}),(0,r.createElement)(g.Z,{id:`${s}-title-error`,isError:!0},n),(0,r.createElement)(o.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),value:u}),(0,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(o.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-price-error`,className:p()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,k.w)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(g.Z,{id:`${s}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.crea
2023-09-26 10:24:36 +02:00
__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return b.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,a.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,w.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency cant contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,u.sprintf)(/* translators: Placeholder is a number of decimals in a number. */
_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If youre selling something, you need a price tag. Add yours here.","jetpack")}),!1)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?h.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: Placeholder is an email address. */
2023-12-07 09:44:11 +01:00
__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)};validateTitle=()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what theyre paying for.","jetpack")}),!1)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=b.Rh.map((e=>{const{symbol:t}=(0,a.X)(e);return{value:e,label:t===e?e:`${e} ${(0,g.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(v.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:a,instanceId:s,isSelected:i,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:d,email:p,featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,multiple:E,price:_,productId:C,title:x}=a,S=C&&(0,g.isEmpty)(c);if(!i&&S)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(y.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!i&&p&&_&&x&&!e&&!t&&!n)return(0,r.createElement)(y.Z,{"aria-busy":"false",content:u,featuredMediaUrl:b,featuredMediaTitle:v,formattedPrice:(0,w.T4)(_,d),multiple:E,title:x});const j=S?o.Disabled:"div";return(0,r.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(k.Z,{featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,setAttributes:l}),(0,r.createElement)("div",null,(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-title-error`,className:m()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:x}),(0,r.createElement)(f.Z,{id:`${s}-title-error`,isError:!0},n),(0,r.createElement)(o.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),"aria-label":__("Describe your item in a few words","jetpack"),value:u}),(0,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(o.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-price-error`,className:m()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,w.T4)(0,d,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(f.Z,{id:`${s}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(o.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,r.createElement)(o.TextControl,{"aria-describedby":`${s}-email-${e?"error":"help"}`,className:m()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetp
__("Go to slide %s","jetpack"),e)+'"></button>'}else a+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return a}},67240:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(19486);const s=({attributes:{align:e,autoplay:t,delay:n,effect:s,images:o},className:i})=>(0,r.createElement)(a.Z,{align:e,autoplay:t,className:i,delay:n,effect:s,images:o})},19486:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(51806),a=n(11313),s=n(52175),o=n(55609),i=n(69307),l=n(65736),c=n(65235),u=n.n(c),d=n(92819),p=n(6209),m=n(30847),h=n(85575),g=n(17766);const __=l.__;class f extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:a,images:s,onError:o}=this.props;if(t===e.align&&(0,d.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||s!==e.images){let t;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{o(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new p.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,g.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:n,effect:i,images:l}=this.props;return(0,r.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":i},(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,r.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((({alt:e,caption:t,id:n,url:i})=>(0,r.createElement)("li",{className:u()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,a.isBlobURL)(i)&&"is-transient"),key:n||i},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${n}`,"data-id":n,src:i}),(0,a.isBlobURL)(i)&&(0,r.createElement)(o.Spinner,null),t&&(0,r.createElement)(s.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})))))),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,r.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,m.Z)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,lo
__("Slide %d, currently selected","jetpack"),n+1):(0,a.sprintf)(/* translators: %d: Slide number. */
__("Go to slide %d","jetpack"),n+1)),(0,r.createElement)("button",{role:c?"presentation":"tab",key:n,className:o()("wp-story-pagination-bullet",{"wp-story-pagination-ellipsis":e}),"aria-label":u,"aria-disabled":c||s,onClick:c||s?void 0:l,disabled:c},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar"},(0,r.createElement)("div",{className:"wp-story-pagination-bullet-bar-progress",style:{width:`${i}%`}})))}},44689:(e,t,n)=>{"use strict";n.d(t,{b:()=>l,r:()=>c});var r=n(82674),a=n.n(r),s=n(51806),o=n(65235),i=n.n(o);const l=({className:e,size:t,label:n,isPressed:r,...o})=>(0,s.createElement)("button",a()({type:"button","aria-label":n,"aria-pressed":r,className:i()("jetpack-mdc-icon-button","circle-icon","outlined","bordered",e),style:{width:`${t}px`,height:`${t}px`}},o)),c=({className:e,size:t=24,label:n,isPressed:r,...o})=>(0,s.createElement)("button",a()({type:"button","aria-label":n,"aria-pressed":r,className:i()("jetpack-mdc-icon-button",e),style:{width:`${t}px`,height:`${t}px`}},o))},51543:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(51806);const a=()=>(0,r.createElement)("div",{className:"wp-story-loading-spinner"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__outer"},(0,r.createElement)("div",{className:"wp-story-loading-spinner__inner"})))},85584:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(44689),o=n(89620);const _x=a._x;function i({playing:e,muted:t,onPlayPressed:n,onMutePressed:a,showMute:i}){return(0,r.createElement)("div",{className:"wp-story-controls"},(0,r.createElement)(s.r,{isPressed:e,label:e?_x("pause","Button tooltip text","jetpack"):_x("play","Button tooltip text","jetpack",0),onClick:n},e?(0,r.createElement)(o.fp,null):(0,r.createElement)(o.o1,null)),i&&(0,r.createElement)(s.r,{isPressed:t,label:t?_x("unmute","Button tooltip text","jetpack"):_x("mute","Button tooltip text","jetpack",0),onClick:a},t?(0,r.createElement)(o.xb,null):(0,r.createElement)(o.MC,null)))}},14904:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(65736),s=n(44689),o=n(89620);const __=a.__;function i({fullscreen:e,onExitFullscreen:t,siteIconUrl:n,storyTitle:a}){return e?(0,r.createElement)("div",{className:"wp-story-meta"},(0,r.createElement)("div",{className:"wp-story-icon"},(0,r.createElement)("img",{alt:__("Site icon","jetpack"),src:n,width:"40",height:"40"})),(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"wp-story-title"},a)),(0,r.createElement)(s.r,{className:"wp-story-exit-fullscreen",label:__("Exit Fullscreen","jetpack"),onClick:t},(0,r.createElement)(o.Tw,null))):null}},89620:(e,t,n)=>{"use strict";n.d(t,{JM:()=>p,MC:()=>u,Tw:()=>c,Vq:()=>m,fp:()=>l,o1:()=>i,xb:()=>d});var r=n(51806),a=n(70444),s=n(36598);const o=({children:e,size:t})=>(0,s.Z)(e,t,t),i=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M8 5v14l11-7z"})),l=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"})),c=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),u=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"})),d=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"})),p=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),m=({size:e})=>(0,r.createElement)(o,{size:e},(0,r.createElement)(a.Path,{d:"M10 6L8.59 7.4
_n("<span>%s reader</span> is subscribed.","<span>%s readers</span> are subscribed.",T,"jetpack"),(0,a.Z)(T)),{span:(0,r.createElement)("span",{style:{fontWeight:"bold"}})})),E&&(0,r.createElement)(i.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:e.color,onColorChange:S,gradientValue:n.gradientValue,onGradientChange:n.setGradient,label:__("Button Background","jetpack")},{colorValue:L.color,onColorChange:j,label:__("Button Text","jetpack")},{colorValue:t.color,onColorChange:x,label:__("Border","jetpack")}],initialOpen:!0},(0,r.createElement)(i.ContrastChecker,{fontSize:y.size,textColor:L.color,backgroundColor:b.color,fallbackButtonBackgroundColor:v,fallbackTextColor:k})),!E&&(0,r.createElement)(i.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:e.color,onChange:S,label:__("Button Background Color","jetpack")},{value:L.color,onChange:j,label:__("Button Text Color","jetpack")},{value:t.color,onColorChange:x,label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(i.ContrastChecker,{fontSize:y.size,textColor:L.color,backgroundColor:b.color,fallbackButtonBackgroundColor:v,fallbackTextColor:k})),(0,r.createElement)(l.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(i.FontSizePicker,{withSlider:!0,value:y.size,onChange:e=>{const t=e||m.tm;C({fontSize:t,customFontSize:t})},__nextHasNoMarginBottom:!0})),(0,r.createElement)(l.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(l.RangeControl,{value:h,label:__("Border Radius","jetpack"),min:m.G0,max:m.Gp,initialPosition:m.S9,allowReset:!0,onChange:e=>C({borderRadius:e})}),(0,r.createElement)(l.RangeControl,{value:g,label:__("Border Weight","jetpack"),min:m.VF,max:m.K3,initialPosition:m.XJ,allowReset:!0,onChange:e=>C({borderWeight:e})})),(0,r.createElement)(l.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(l.RangeControl,{value:_,label:__("Space Inside","jetpack"),min:m.xV,max:m.bK,initialPosition:m.HE,allowReset:!0,onChange:e=>C({padding:e})}),(0,r.createElement)(l.RangeControl,{value:N,label:__("Space Between","jetpack"),min:m.Tr,max:m.pC,initialPosition:m.FP,allowReset:!0,onChange:e=>C({spacing:e})}),(0,r.createElement)(p.g,{width:A,onChange:e=>C({buttonWidth:e})})),(0,r.createElement)(l.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(l.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:P,onChange:()=>{C({showSubscribersTotal:!P})},help:()=>{if(!T||T<1)return __("This will remain hidden until there is at least one subscriber.","jetpack")}}),P&&Z?(0,r.createElement)(l.ToggleControl,{disabled:!P,label:__("Include social followers in count","jetpack"),checked:w,onChange:()=>{C({includeSocialFollowers:!w})}}):null,(0,r.createElement)(l.ToggleControl,{label:__("Place button on new line","jetpack"),checked:f,onChange:()=>{C({buttonOnNewLine:!f})}}),(0,r.createElement)(l.TextareaControl,{value:M,label:__("Input placeholder text","jetpack"),help:__("Edit the placeholder text of the email address input.","jetpack"),onChange:e=>C({subscribePlaceholder:e})}),(0,r.createElement)(l.TextareaControl,{value:R,label:__("Submit button label","jetpack"),help:__("Edit the label of the button a user clicks to subscribe.","jetpack"),onChange:e=>C({submitButtonText:e})}),!(0,o.Wp)()&&(0,r.createElement)(l.TextareaControl,{value:I,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>C({successMessage:e})})))}},2916:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(75623),a=n(45097),s=n(20121),o=n(76609),i=n(11689),l=n(79024),c=n(68600);const u=[n(39583).Z,c.Z,l.Z,i.Z,o.Z,s.Z,a.
_n("Join %s other subscriber","Join %s other subscribers",r,"jetpack"),r)}})),ee=x?(0,o.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},te=x?(0,o.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},ne={"no-border-radius":0===O,[R.class]:R.class,"has-text-color":N.color,[N.class]:N.class},re={...ne,"has-background":p.color||ee.gradientValue,[p.class]:!ee.gradientValue&&p.class,[ee.gradientClass]:ee.gradientClass},ae={...ne,"has-background":C.color||te.gradientValue,[C.class]:!te.gradientValue&&C.class,[te.gradientClass]:te.gradientClass},se=e=>e||y.FP,oe={color:N.color,borderColor:A.color,borderRadius:O?O+"px":y.S9+"px",borderWidth:U?U+"px":y.XJ+"px",fontSize:R.size?R.size:y.tm,padding:(e=>{const t=e||y.HE;return t+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})(q)},ie={"--subscribe-block-border-radius":O?O+"px":y.S9+"px"},le={...oe,...!p.color&&ee.gradientValue?{background:ee.gradientValue}:{backgroundColor:p.color}},ce={...oe,...!C.color&&te.gradientValue?{background:te.gradientValue}:{backgroundColor:C.color},...K?{marginTop:se(G)+"px"}:{marginLeft:se(G)+"px"},width:H},ue=(0,l.usePrevious)(C);return(0,u.useEffect)((()=>{D&&ue?.color===A?.color&&A?.color!==C?.color&&M(C.color)}),[C,ue,A,M,D]),Z?(0,r.createElement)(_.Z,null):D?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(w.Z,{buttonBackgroundColor:C,borderColor:A,buttonGradient:te,borderRadius:O,borderWeight:U,buttonOnNewLine:K,emailFieldBackgroundColor:p,fallbackButtonBackgroundColor:P,fallbackTextColor:T,fontSize:R,includeSocialFollowers:V,isGradientAvailable:x,padding:q,setAttributes:a,setBorderColor:M,setButtonBackgroundColor:j,setTextColor:L,showSubscribersTotal:J,spacing:G,subscriberCount:X,textColor:N,buttonWidth:H,subscribePlaceholder:W,submitButtonText:$,successMessage:Y})),(0,f.M)()&&(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.Toolbar,null,(0,r.createElement)(b.ZP,{context:"toolbar",hasTierPlans:I}))),(0,r.createElement)("div",{className:m()(t,"wp-block-jetpack-subscriptions__container","wp-block-jetpack-subscriptions__supports-newline",K?"wp-block-jetpack-subscriptions__use-newline":void 0,J?"wp-block-jetpack-subscriptions__show-subs":void 0),style:ie},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__container is-not-subscriber"},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form-elements"},(0,r.createElement)(i.TextControl,{placeholder:W,disabled:!0,className:m()(re,"wp-block-jetpack-subscriptions__textfield"),style:le}),(0,r.createElement)(o.RichText,{className:m()(ae,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:ce,value:$,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})))),J&&(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__subscount"},Q))):(0,r.createElement)(E.f,{changeStatus:z,isModuleActive:D,isLoading:B})}))},57780:(e,t,n)=>{"use strict";var r=n(51806),a=n(13419),s=n(4981),o=n(31985),i=n(56071),l=n(2916),c=n(99343),u=n(79914);const d=i.name.replace("jetpack/","");(0,o.S)(i,{edit:c.Z,transforms:{from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"blog_subscription"===e,transform:({instance:e})=>(0,s.createBlock)("jetpack/subscriptions",{showSubscribersTotal:e.raw.show_subscribers_total,submitButtonText:e.raw.subscribe_button,subscribePlaceholder:e.raw.subscribe_placeholder,successMessage:e.raw.success_message})}]},deprecated:l.Z}),(0,a.o_)(d,{render:()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(u.Z,null))})},18005:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(51806),a=n(32054),s=n(13419),o=n(86989),i=n.n(o),l=n(55609),c=n(9818),u=n(12238),d=n(69307),p=n(65736),m=n(79201),h=n(92770);const __=p._
__("<postPublishedLink>%1$s</postPublishedLink> was sent to <strong>%2$s %3$s</strong>.","jetpack"),g,S,j);if(_&&E.length&&e!==h.So.paid_subscribers.key){const e=(0,b.CT)(C,E),t=e+(0,b.Y0)(x);e&&(P=(0,d.sprintf)(
// translators: %1s is the post name, %2s is the list of categories with subscriptions count
__("<postPublishedLink>%1$s</postPublishedLink> was sent to everyone subscribed to %2$s.","jetpack"),g,t))}const N=(0,b.hc)(w,e);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PluginPostPublishPanel,{initialOpen:!0,title:(0,r.createElement)(r.Fragment,null,__("Newsletter:","jetpack"),e&&(0,r.createElement)("span",{className:"jetpack-subscribe-post-publish-panel__heading"},h.So[e].panelHeading)),className:"jetpack-subscribe-newsletters-panel jetpack-subscribe-post-publish-panel",icon:(0,r.createElement)(s.Pm,null)},!N&&(0,r.createElement)(o.Notice,{className:"jetpack-subscribe-post-publish-panel__notice",isDismissible:!1},(0,u.createInterpolateElement)(P,{strong:(0,r.createElement)("strong",null),postPublishedLink:(0,r.createElement)(f.rU,{href:k})}))),!y&&(0,r.createElement)(l.PluginPostPublishPanel,{initialOpen:!0,className:"jetpack-subscribe-newsletters-panel paid-newsletters-post-publish-panel",title:__("Set up a paid newsletter","jetpack"),icon:(0,r.createElement)(s.Pm,null)},(0,r.createElement)(o.PanelRow,null,(0,r.createElement)("p",null,__("Allow your subscribers to support your work. Connect a Stripe account to get started.","jetpack"))),(0,r.createElement)("div",{role:"link",className:"post-publish-panel__postpublish-buttons"},(0,r.createElement)(o.Button,{target:"_blank",variant:"secondary",href:(0,a.Z)("wpcom-earn",{site:(0,s.lQ)()})},__("Turn on paid newsletters","jetpack"),(0,r.createElement)(p.Z,{icon:m.Z,className:"paid-newsletters-post-publish-panel__external_icon"})))))}function P(){const{isModuleActive:e}=(0,s.el)(w),t=(0,i.useSelect)((e=>e(c.store).getCurrentPostType()),[]),[n,a]=(0,u.useState)(!1),{tracks:o}=(0,s.z$)(),l=(0,g._)(t);return"post"!==t?null:(0,g.M)()?(0,s.M6)()||(0,s.aQ)()?(0,r.createElement)(x,null):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(_,{accessLevel:l}),(0,r.createElement)(S,{accessLevel:l,isModuleActive:e,showPreviewModal:()=>{o.recordEvent("jetpack_send_email_preview_prepublish_preview_button"),a(!0)}}),e&&(0,r.createElement)(j,{accessLevel:l}),(0,r.createElement)(y.Z,{isModalOpen:n,closeModal:()=>a(!1)})):null}},68269:(e,t,n)=>{"use strict";n.d(t,{f:()=>u});var r=n(51806),a=n(13419),s=n(55609),o=n(69307),i=n(65736),l=n(56071);const __=i.__,c=(0,a.dM)(l),u=({changeStatus:e,isLoading:t,isModuleActive:n})=>{const{tracks:i}=(0,a.z$)();return(0,o.useEffect)((()=>{i.recordEvent("jetpack_editor_subscriptions_placeholder_view")}),[i]),(0,r.createElement)(s.Placeholder,{icon:c,instructions:__("You'll need to activate the Subscriptions feature to use the Subcribe block.","jetpack"),label:l.title},(0,r.createElement)(s.Button,{disabled:n||t,isBusy:t,onClick:()=>(i.recordEvent("jetpack_editor_subscriptions_enable"),e(!0)),variant:"secondary"},t?__("Activating Subscriptions","jetpack"):__("Activate Subscriptions","jetpack",0)),(0,r.createElement)("div",{className:"membership-button__disclaimer"},(0,r.createElement)(s.ExternalLink,{href:"https://jetpack.com/support/subscriptions/"},__("Learn more about the Subscriptions feature.","jetpack"))))}},22750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(22636),s=n(55609);const o=function(){return(0,r.createElement)(s.Placeholder,null,(0,r.createElement)(s.Flex,{gap:2,direction:"column",style:{width:"100%"}},(0,r.createElement)(s.Flex,{gap:4},(0,r.createElement)(s.FlexItem,null,(0,r.createElement)(a.Z,{width:30,height:30})),(0,r.createElement)(s.FlexBlock,null,(0,r.createElement)(a.Z,{width:"90%",height:30}))),(0,r.createElement)(s.Flex,{style:{marginTop:12}},(0,r.createElement)(s.FlexBlock,null,(0,r.createElement)(a.Z,{height:30,width:"60%"}))),(0,r.createElement)(s.Flex,{style:{marginTop:12}},(0,r.createElement)(s.FlexBlock,null,(0,r.createElement)(a.Z,{width:150,height:50}))),(0,r.createElement)(s.Flex,{style:{marginTop:18}},(0,r.createElement)(s.FlexBlock,null,(0,r.createElement)(a.Z,{width:"90%",height:16})))))}},3740:(e,t,n)=>{"use strict";n.d(t,{GP:()=>i,P0:()=>c,RA:()=>r,Z5:()=>o,hI:()=>s,q3:()=>a,xJ:()=>l});const r=["image"],a=4,s=20,o=20,i=2e3,l="circle",c=[{isDefault:!0,name:"rectangular"},{n
__("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":i,height:e.height,id:e.id,origUrl:e.url,isSelected:s===t,key:t,link:e.link,linkTo:a,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:o}=this.props,i=m(o)?d.Z:u.Z,l=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(i,{align:e,columns:a,images:s,layoutStyle:o,renderedImages:l}),t)}}function m(e){return["circle","square"].includes(e)}function h(e,t={}){const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);return r.toString()}},30791:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(69307),s=n(6209),o=n(52235),i=n(89754),l=n(36472),c=n(6817),u=n(6648);class d extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t;(0,u.W)(n).forEach((t=>(0,u.i)(t,e)))}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:s}=this.props,u=(0,c.h9)(n),d="columns"===a?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});let p=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(l.Z,{key:t},e.map(((e,t)=>{const n=s.slice(p,p+e);return p+=e,(0,r.createElement)(o.Z,{key:t},n)}))))))}}},6817:(e,t,n)=>{"use strict";n.d(t,{T9:()=>x,h9:()=>a,sv:()=>o});var r=n(92819);function a(e){return(0,r.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(s,(t=>{const r=o<=(e+1)*n;return r&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}return a.push(s.length),[a]}const i=S([2,1,2],5),l=j([P,P,N,P,P]),c=j([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=j([N,P,P,N]),p=S([1,2,1],5),m=j([N,P,P,P]),h=S([1,3],3),g=j([P,P,P,N]),f=S([3,1],3),b=j([L(1.6),(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),w=S([1,1,1],3),E=j([(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2)),L(1.6)]),_=S([2,1],3),C=j([function(e){return e>=2}]);function x(e,{isWide:t}={}){const n=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),x=(0,r.sum)(s),S=a.slice(x);return n(o,S)};return n([],e)}function S(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:l});return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":p,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:d===t,key:t,link:e.link,linkTo:i,origUrl:e.url,showMovers:o.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:o,roundedCorners:c}=this.props,m=(0,u.v)(o)?p.Z:d.Z,h=this.props.images.map(this.renderImage,this),g=o!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{className:i()(n,{[`has-rounded-corners-${g}`]:g>0})},(0,r.createElement)(m,{align:e,columns:a,images:s,layoutStyle:o,renderedImages:h}),t)}}},84420:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(69307),s=n(85407),o=n(40195),i=n(56243),l=n(12126);class c extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:c}=this.props,u=(0,l.h9)(n),d="columns"===a?(0,l.sv)(u,t):(0,l.T9)(u,{isWide:["full","wide"].includes(e)});let p=0;return(0,r.createElement)(o.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e.map(((e,t)=>{const n=c.slice(p,p+e);return p+=e,(0,r.createElement)(s.Z,{key:t},n)}))))))}}},12126:(e,t,n)=>{"use strict";n.d(t,{T9:()=>x,h9:()=>a,sv:()=>o});var r=n(92819);function a(e){return(0,r.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(s,(t=>{const r=o<=(e+1)*n;return r&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}return a.push(s.length),[a]}const i=S([2,1,2],5),l=j([P,P,N,P,P]),c=j([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=j([N,P,P,N]),p=S([1,2,1],5),m=j([N,P,P,P]),h=S([1,3],3),g=j([P,P,P,N]),f=S([3,1],3),b=j([L(1.6),(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),w=S([1,1,1],3),E=j([(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2)),L(1.6)]),_=S([2,1],3),C=j([function(e){return e>=2}]);function x(e,{isWide:t}={}){const n=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),x=(0,r.sum)(s),S=a.slice(x);return n(o,S)};return n([],e)}function S(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function N(e){return e<1}function T(e){return t=>t>=e}function L(e){return t=>t<e}},56243:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(65235),s=n.n(a);function o({children:e,className:t}){return(0,r.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},87178:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(92819),s=n(86738),o=n(85407),i=n(40195),l=n(56243);function c({columns:e,renderedImages:t}){const n=Math.min(s.hI,e),c=t.length%n;return(0,r.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),n)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(o.Z,{key:t},e)))))))}},68405:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(51806),a=n(81518),s=n(86738),o=n(73208);function i(e){return Math.min(3,e.images.length)}function l({attributes:e}){const{imageFilter:t,images:n}=e;if(!n.length)return null;const{align:l,className:c,columns:u=i(e),linkTo:d,roun
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:m(t),onRemove:i?void 0:h(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:o,roundedCorners:c,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,u.v)(o)?p.Z:d.Z,b=this.props.images.map(this.renderImage,this),v=o!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{className:i()(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(f,{align:e,columns:a,columnWidths:h?g:void 0,images:s,layoutStyle:o,renderedImages:b,onResize:h?void 0:m}),t)}}},47510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(69307),s=n(17410),o=n(46349),i=n(78922),l=n(3453);class c extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:c,columnWidths:u}=this.props,d=(0,l.h9)(n),p="columns"===a?(0,l.sv)(d,t):(0,l.T9)(d,{isWide:["full","wide"].includes(e)});let m=0;return(0,r.createElement)(o.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e.map(((e,n)=>{const a=c.slice(m,m+e);return m+=e,(0,r.createElement)(s.Z,{key:n,width:u?.[t]?.[n]},a)}))))))}}},3453:(e,t,n)=>{"use strict";n.d(t,{T9:()=>x,h9:()=>a,sv:()=>o});var r=n(92819);function a(e){return(0,r.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(s,(t=>{const r=o<=(e+1)*n;return r&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}return a.push(s.length),[a]}const i=S([2,1,2],5),l=j([P,P,N,P,P]),c=j([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=j([N,P,P,N]),p=S([1,2,1],5),m=j([N,P,P,P]),h=S([1,3],3),g=j([P,P,P,N]),f=S([3,1],3),b=j([L(1.6),(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),w=S([1,1,1],3),E=j([(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2)),L(1.6)]),_=S([2,1],3),C=j([function(e){return e>=2}]);function x(e,{isWide:t}={}){const n=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){const a=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(a<2.5||a<5&&t.length>=3&&t[0]===t[2]||n)}(e,a,t)?[1,1,1]:E(a)&&_(e)?[2,1]:C(a)?[1]:a.length>3?[1,1]:Array(a.length).fill(1);const o=e.concat([s]),x=(0,r.sum)(s),S=a.slice(x);return n(o,S)};return n([],e)}function S(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function P(e){return e>=1&&e<2}function N(e){return e<1}function T(e){return t=>t>=e}function L(e){return t=>t<e}},78922:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(51806),a=n(65235),s=n.n(a);function o({children:e,className:t}){return(0,r.createElement)("div",{className:s()("tiled-gallery__row",t)},e)}},65662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(92819),s=n(13993),o=n(17410),i=n(46349),l=n(78922);function c({columns:e,renderedImages:t}){const n=Math.min(s.hI,e),c=t.length%n;return(0,r.createElement)(i.Z,null,[...c?[(0,a.take)(t,c)]:[],...(0,a.chunk)((0,a.drop)(t,c),n)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(o.Z,{key:t},e)))))))}},5826:(e,t,n)=>{"use strict";n.d(t,{Z:()=
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:f===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:m(t),onRemove:i?void 0:h(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:o.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:o,roundedCorners:c,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,u.v)(o)?p.Z:d.Z,v=this.props.images.map(this.renderImage,this),k=o!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{style:h,className:i()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:g?f:void 0,images:s,layoutStyle:o,renderedImages:v,onResize:g?void 0:m}),t)}}},82265:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(69307),s=n(6209),o=n(63866),i=n(750),l=n(2911),c=n(76981),u=n(76187);class d extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:s,renderedImages:u}=this.props,d=(0,c.h9)(n),p="columns"===s?(0,c.sv)(d,t):(0,c.T9)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();let h=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(l.Z,{key:t},e.map(((e,n)=>{const a=u.slice(h,h+e);return h+=e,(0,r.createElement)(o.Z,{key:n,width:m?.[t]?.[n]},a)}))))))}}},76981:(e,t,n)=>{"use strict";n.d(t,{T9:()=>x,h9:()=>a,sv:()=>o});var r=n(92819);function a(e){return(0,r.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(s,(t=>{const r=o<=(e+1)*n;return r&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}return a.push(s.length),[a]}const i=S([2,1,2],5),l=j([P,P,N,P,P]),c=j([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=j([N,P,P,N]),p=S([1,2,1],5),m=j([N,P,P,P]),h=S([1,3],3),g=j([P,P,P,N]),f=S([3,1],3),b=j([L(1.6),(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),w=S([1,1,1],3),E=j([(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2)),L(1.6)]),_=S([2,1],3),C=j([function(e){return e>=2}]);function x(e,{isWide:t}={}){const n=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){const a=(0
__("image %1$d of %2$d in gallery","jetpack"),t+1,o.length),y=i?u.Z:c.Z,{src:w,srcSet:E}=(0,d.z)(e,{layoutStyle:p});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===o.length,isSelected:b===t,key:t,link:e.link,linkTo:l,onMoveBackward:i?void 0:m(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:g(t),onSelect:i?void 0:f(t),origUrl:e.url,setAttributes:i?void 0:v(t),showMovers:o.length>1,srcSet:E,url:w,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:s,layoutStyle:o,roundedCorners:c,onResize:u,style:h,isSave:g,columnWidths:f}=this.props,b=(0,d.v)(o)?m.Z:p.Z,v=this.props.images.map(this.renderImage,this),k=o!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{style:h,className:i()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:g?f:void 0,images:s,layoutStyle:o,renderedImages:v,onResize:g?void 0:u}),t)}}},46438:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(69307),s=n(6209),o=n(24639),i=n(75084),l=n(51309),c=n(96001),u=n(99856);class d extends a.Component{gallery=(0,a.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new s.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:s,renderedImages:u}=this.props,d=(0,c.h9)(n),p="columns"===s?(0,c.sv)(d,t):(0,c.T9)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();let h=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(l.Z,{key:t},e.map(((e,n)=>{const a=u.slice(h,h+e);return h+=e,(0,r.createElement)(o.Z,{key:n,width:m?.[t]?.[n]},a)}))))))}}},96001:(e,t,n)=>{"use strict";n.d(t,{T9:()=>x,h9:()=>a,sv:()=>o});var r=n(92819);function a(e){return(0,r.map)(e,s)}function s({height:e,width:t}){return e&&t?t/e:1}function o(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,a=[];let s=e,o=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(s,(t=>{const r=o<=(e+1)*n;return r&&(o+=t),r})).length;a.push(t),s=(0,r.drop)(s,t)}return a.push(s.length),[a]}const i=S([2,1,2],5),l=j([P,P,N,P,P]),c=j([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=j([N,P,P,N]),p=S([1,2,1],5),m=j([N,P,P,P]),h=S([1,3],3),g=j([P,P,P,N]),f=S([3,1],3),b=j([L(1.6),(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2))]),v=S([1,2],3),k=S([1,1,1,1,1],1),y=S([1,1,1,1],1),w=S([1,1,1],3),E=j([(0,r.overEvery)(T(.9),L(2)),(0,r.overEvery)(T(.9),L(2)),L(1.6)]),_=S([2,1],3),C=j([function(e){return e>=2}]);function x(e,{isWide:t}={}){const n=(e,a)=>{if(!a.length)return e;let s;s=a.length>15&&l(a)&&i(e)?[2,1,2]:a.length>15&&c(a)&&u(e)?[3,1,3]:5!==a.length&&d(a)&&p(e)?[1,2,1]:m(a)&&h(e)?[1,3]:g(a)&&f(e)?[3,1]:b(a)&&v(e)?[1,2]:t&&(5===a.length||10!==a.length&&a.length>6)&&k(e)&&(0,r.sum)((0,r.take)(a,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,
__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:Z,help:this.getAutoplayHelp}),(0,s.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),/* translators: Tooltip describing the "loop" option for the VideoPress player */
__("Restarts the video when it reaches the end","jetpack")),onChange:this.toggleAttribute("loop"),checked:F}),(0,s.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:O}),(0,s.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Playback Controls","jetpack"),/* translators: Tooltip describing the "controls" option for the VideoPress player */
__("Display the video playback controls","jetpack")),onChange:this.toggleAttribute("controls"),checked:D}),(0,s.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Play Inline","jetpack"),/* translators: Tooltip describing the "playsinline" option for the VideoPress player */
__("Play the video inline instead of full-screen on mobile devices","jetpack")),onChange:this.toggleAttribute("playsinline"),checked:U}),(0,s.createElement)(u.SelectControl,{label:this.renderControlLabelWithTooltip(__("Preload","jetpack"),/* translators: Tooltip describing the "preload" option for the VideoPress player */
__("Content to dowload before the video is played","jetpack")),value:V??"",onChange:e=>p({preload:e}),options:[{value:"auto",label:_x("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:_x("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:_x("None","VideoPress preload setting","jetpack")}],help:this.getPreloadHelp()}),(0,s.createElement)(c.MediaUploadCheck,null,(0,s.createElement)(u.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,s.createElement)(c.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:L,render:({open:e})=>(0,s.createElement)(u.Button,{variant:"secondary",onClick:e,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}),(0,s.createElement)("p",{id:J,hidden:!0},K?(0,g.sprintf)(/* translators: Placeholder is an image URL. */
__("The current poster image url is %s","jetpack"),H??I):__("There is no poster image currently selected","jetpack")),K&&(0,s.createElement)(u.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")))),(0,m.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,s.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,s.createElement)(S.Z,{attributes:t,setAttributes:p,useAverageColor:q,toggleAttribute:this.toggleAttribute}),(0,s.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,s.createElement)(u.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:w??"",disabled:v||k,options:[{label:_x("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:_x("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:_x("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"}],onChange:this.onChangeRating}),(0,s.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Allow download","jetpack"),/* translators: Tooltip describing the "allow download" option for the VideoPress player */
__("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:x,disabled:v||N}),(0,s.createElement)(u.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(P),onChange:this.onChangePrivacySetting,value:P??"",options:[{value:_.v.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:_.v.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:_.v.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:v||R})))),X=e=>{this.setState({fileForUpload:e[0]})},Q=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):p({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,h.escapeHTML)(b?(0,T.K8)(b.name):""),ne=({mediaId:e,guid:t,src:n})=>{this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!e,isEditingWhileUploading:!!e&&this.state.isEditingWhileUploading}),e&&t&&n&&p({id:e,guid:t,src:n})},re=e=>{this.setState({title:e})},ae=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},se=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},oe=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ie=()=>de({poster_attachment_id:this.state.videoPosterImageData.id}),le=e=>{e.generating?ce():ue(e.poster)},ce=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(z):i()({path:`/videos/${z}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>le(e)))}),2e3)},ue=e=>{e&&p({poster:e})},de=e=>{if(ee())return window.videoPressUploadPoster(z,e).then((e=>le(e)));i()({path:`/videos/${z}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&se(),I?ie():null!=t&&oe()},me=()=>{this.setState({isEditingWhileUploading:!1}),pe()};if(null!=b&&b.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,s.createElement)(A,{fileForUpload:b,filename:te,uploadFinished:ne,blockSettings:Y,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ae,onSave:pe})}const he=v||r,ge=f||o||!z,fe=ge&&!o&&!he,be=(0,s.createElement)(m.Fragment,null,(0,s.createElement)("div",{className:o||he?"":"videopress-block-hide"},(0,s.createElement)(C.Z,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,s.createElement)("div",{className:fe?"":"videopress-block-hide"},(0,s.createElement)(e,this.props)));if(ge)return d?(0,s.createElement)(E.Z,{onFilesSelected:X,onMediaItemSelected:Q},be):(0,s.createElement)(m.Fragment,null,be);const{html:ve,scripts:ke}=l||{html:null,scripts:null},ye=he||!l;return(0,s.createElement)(m.Fragment,null,Y,ye&&(0,s.createElement)(C.Z,{text:__("Generating preview…","jetpack")}),!ye&&(0,s.createElement)(M,a()({},this.props,{hideOverlay:this.hideOverlay,html:ve,scripts:ke,interactive:y,caption:B})))}}]),"withVideoPressEdit")},37549:(e,t,n)=>{"use strict";var r=n(82674),a=n.n(r),s=n(51806),o=n(6975),i=n(13419),l=n(11313),c=n(52175),u=n(65391),d=n(4981),p=n(55609),m=n(94333),h=n(9818),g=n(12238),f=n(69307),b=n(92694),v=n(65736),k=n(92819),y=n(10723),w=n(29899),E=n(97504),_=n(34284),C=n(58351),x=n(30053),S=n(23096),j=n(77290),P=n(23062),N=n(84676),T=n(41194);const __=v.__,L=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,c.useBlockEditContext)();return"core/video"!==n?(0,s.createElement)(e,t):(0,s.createElement)(e,a()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,s.createElement)(p.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("M
__("Paused (%s%%)","jetpack"),w):(0,o.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */
__("Uploading (%s%%)","jetpack"),w)),(0,r.createElement)("div",{className:"resumable-upload__file-size"},_)),(0,r.createElement)("div",{className:"resumable-upload__actions"},(0,r.createElement)(a.Button,{variant:"link",onClick:()=>{p&&(i?p.start():p.abort(),d(!i))}},i?"Resume":"Pause"))))}},5482:(e,t,n)=>{"use strict";n.d(t,{J:()=>o,v:()=>a});var r=n(99537);const a=function(e){return new Promise((function(t,n){const r=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...r}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){n(e)}))}))},s={},o=({onUploadUuidRetrieved:e,onError:t,onProgress:n,onSuccess:o})=>(i,l)=>{const c=new r.gq(i,{onError:t,onProgress:n,endpoint:l.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:i.name,filetype:i.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(t,n){if(n.getStatus()>=400)return;const r=n.getHeader("x-videopress-upload-guid"),a=n.getHeader("x-videopress-upload-media-id"),i=n.getHeader("x-videopress-upload-src-url");if(r&&a&&i)return void(o&&o({mediaId:Number(a),guid:r,src:i}));const l={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},c={};Object.keys(l).forEach((function(e){const t=n.getHeader(e);t&&(c[l[e]]=t)})),c.key&&c.token&&(s[c.key]=c.token),c.key&&e(c.key)},onBeforeRequest:function(e){const t=e._method;if(["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0),Object.keys(e._headers).map((function(t){e.setHeader(t,e._headers[t])})),"POST"===t){if(!!!l.token)throw"should never happen";e.setHeader("x-videopress-upload-token",l.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const n=new URL(e._url).pathname.split("/"),r=n[n.length-1];if(s[r])e.setHeader("x-videopress-upload-token",s[r]);else if("HEAD"===t)return a(r).then((t=>(s[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}return Promise.resolve(e)}});return c.findPreviousUploads().then((function(e){e.length&&c.resumeFromPreviousUpload(e[0]),c.start()})),c}},23096:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(52175),s=n(94333),o=n(65235),i=n.n(o),l=n(90953);const c=(0,s.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:s,controls:o,guid:c,loop:u,muted:d,playsinline:p,poster:m,preload:h,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w,maxWidth:E}={}}=t,_=a.useBlockProps.save({className:i()("wp-block-video",f,g,{[`align${b}`]:b})});if(!c)return e(t);const C=(0,l.p)(c,{autoplay:n,controls:o,loop:u,muted:d,playsinline:p,poster:m,preload:h,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w});let x={};return E&&E.length>0&&"100%"!==E&&(x={maxWidth:E,margin:"auto"}),(0,r.createElement)("figure",_,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:x},`\n${C}\n`),!a.RichText.isEmpty(s)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:s}))}),"withVideoPressSave")},75880:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(52175),s=n(55609),o=n(69307),i=n(65736);n(99196);const __=i.__;class l extends o.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}}handleChangeSeekbarColor=e=>{this.setState({seekbarColor:e})};handleChangeSeekbarLoadingColor=e=>{this.setState({seekbarLoadingColor:e})};handleChangeSeekbarPlayedColor=e=>{this.setState({seekbarPlayedColor:e})};saveColors=()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n}=this.state,{setAttributes:r}=this.props;r({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n})};render(){const{seekbarColor:e,seekbarPlayedColor:t,s
__("Delete %s","jetpack"),o.label),disabled:a===l},a===l?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(i.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},o)}function y({track:e,guid:t,onChange:n,onClose:a,onCancel:s,trackExists:d}){const[g,f]=(0,c.useState)(),[v=!1,k]=(0,c.useState)(),{label:y="",srcLang:w="",kind:E=p}=e,_=e.tmpFile?e.tmpFile.name:"";if(!(0,l.useSelect)((e=>e(o.store).getSettings().mediaUpload),[]))return null;return(0,r.createElement)(i.NavigableMenu,null,(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,r.createElement)("span",null,__("File","jetpack"),":"),""!==_&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,_)),(0,r.createElement)(o.MediaUploadCheck,null,(0,r.createElement)(i.FormFileUpload,{onChange:t=>{const r=t.target.files;!r.length>0||(e.tmpFile=r[0],n(e))},accept:m,render:({openFileDialog:e})=>(0,r.createElement)(i.Button,{variant:"link",onClick:()=>{e()}},""===_?__("Select track","jetpack"):__("Change track","jetpack",0)),disabled:v}))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},/* translators: %s: The allowed file types to be uploaded as a video text track." */
(0,u.sprintf)(__("Allowed formats: %s","jetpack"),m))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language"},(0,r.createElement)(i.TextControl,{onChange:t=>n({...e,label:t}),label:__("Label","jetpack"),value:y,help:__("Title of track","jetpack"),disabled:v}),(0,r.createElement)(i.TextControl,{onChange:t=>n({...e,srcLang:t}),label:__("Source language","jetpack"),value:w,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:v})),(0,r.createElement)(i.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:E,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
__("Kind","jetpack"),onChange:t=>{n({...e,kind:t})},disabled:v}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},v?(0,r.createElement)(i.Spinner,null):(0,r.createElement)(i.Button,{variant:"secondary",disabled:!e.tmpFile,onClick:()=>{f(null),""===y&&(e.label=__("English","jetpack")),""===w&&(e.srcLang="en"),void 0===e.kind&&(e.kind=p),d(e)?f(__("A track already exists for that language and kind.","jetpack")):(k(!0),b(e,t).then((()=>{n(e),f(null),a()})).catch((e=>{e.message&&f(e.message)})).finally((()=>{k(!1)})))}},__("Save","jetpack")),(0,r.createElement)(i.Button,{variant:"link",onClick:s},__("Close","jetpack"))),g&&(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},/* translators: %s: An error message returned after a failed video track file upload." */
(0,u.sprintf)(__("Error: %s","jetpack"),g))))}function w({tracks:e=[],onChange:t,guid:n}){const[a,s]=(0,c.useState)(null);return(0,r.createElement)(i.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:({isOpen:e,onToggle:t})=>(0,r.createElement)(i.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:t,icon:g}),renderContent:()=>null!==a?(0,r.createElement)(y,{track:e[a],guid:n,onChange:n=>{const r=[...e];r[a]=n,t(r)},onClose:()=>s(null),onCancel:()=>{t(e.filter(((e,t)=>t!==a))),s(null)},trackExists:t=>-1!==e.filter(((e,t)=>t!==a)).findIndex((e=>e.kind===t.kind&&e.srcLang===t.srcLang))}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.NavigableMenu,null,(0,r.createElement)(k,{tracks:e,onChange:t,guid:n}),(0,r.createElement)(i.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,r.createElement)(i.MenuItem,{icon:d.Z,onClick:()=>{(()=>{const n=e.length,r=[...e];r[n]||(r[n]={}),r[n]={...e[n]},t(r),s(n)})()}},__("Upload track","jetpack")))))})}},32478:(e,t,n)=>{"use strict";n.d(t,{$:()=>g});var r=n(51806),a=n(52175),s=n(55609),o=n(69307),i=n(65736),l=n(61074),c=n(65235),u=n.n(c),d=n(81427);const __=i.__,p=["image"],m=e=>{const{videoPosterImageUrl:t}=e;return(0,r.createElement)("div",{className:"resumable-upload__editor-thumb-placeholder"},t?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("img",{src:t,alt:"Poster"}),(0,r.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:d.o1})):(0,r.createElement)("span",null,"No Poster Selected"))},h=e=>{const{onSelectPoster:t,onRemovePoster:n}=e;return(0,r.createElement)(s.BaseControl,{className:u()(e.className,"editor-video-poster-control")},(0,r.createElement)(m,e),(0,r.createElement)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:p,render:({open:e})=>(0,r.createElement)("div",{className:"poster-selector__buttons"},(0,r.createElement)(s.Button,{onClick:n,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")),(0,r.createElement)(s.Button,{variant:"secondary",onClick:e},__("Select Poster Image","jetpack")))}))},g=e=>{const{file:t,onSelectPoster:n,onRemovePoster:i,videoPosterImageData:c,title:u,onChangeTitle:m,onVideoFrameSelected:g}=e,[f,b]=(0,o.useState)(0),[v,k]=(0,o.useState)(!0),y=(0,o.useRef)(null),w=(0,o.useRef)(null),E=()=>{k(!1)};(0,o.useEffect)((()=>{null!==t&&y&&(y.current.src=URL.createObjectURL(t))}),[t,y]);const _={};return c&&(_.display="none"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"uploading-editor"},(0,r.createElement)("div",{className:"uploading-editor__summary"}),(0,r.createElement)("div",{className:"uploading-editor__fields"},(0,r.createElement)(s.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:u}),(0,r.createElement)("div",{className:"uploading-editor__content"},(0,r.createElement)(s.BaseControl,{label:__("Video poster (optional)","jetpack")},v?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"uploading-editor__video-container"},(0,r.createElement)("div",{className:"uploading-editor__video-poster-wrapper"},c&&(0,r.createElement)(h,{onSelectPoster:n,onRemovePoster:i,videoPosterImageUrl:c.url}),(0,r.createElement)("video",{ref:y,muted:!0,className:"uploading-editor__video",onDurationChange:e=>{const t=e.target.duration;b(t),y.current&&(y.current.currentTime=t/2)},onError:E,onLoadedMetadata:e=>{e.target.videoHeight||E()},style:_})),!c&&(0,r.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:d.o1})),(0,r.createElement)("span",{style:_},(0,r.createElement)(s.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:f,showTooltip:!1,withInputField:!1,onChange:e=>{g(1e3*e),y.current&&(y.current.currentTime=e)}})),(0,r.createElement)("span",{className:"uploading-editor__scrubber-help",style:_},(0,o.createInterpolateElement)(__("This is how the video will look. Use the slider to choose a poster or <a>select a custom one</a
c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),_x("Upgrade","Call to action to buy a new plan","jetpack")),d=({onRedirect:e,align:t,className:n,title:d=l,description:p=null,buttonText:m=u,visible:h=!0,requiredPlan:g,context:f})=>{const[b,v,k]=(0,i.Z)(g,e),y=(0,a.useSelect)((e=>{if(p)return p;const t=e("wordpress-com/plans"),n=t&&t.getPlan(g);return n?(0,s.sprintf)(c,n.product_name_short):null}),[p]);return y&&(0,r.createElement)(o.p,{align:t,buttonText:m,checkoutUrl:b,className:n,context:f,description:y,goToCheckoutPage:v,isRedirecting:k,title:d,visible:h})}},38140:(e,t,n)=>{"use strict";n.d(t,{W:()=>a,v:()=>r});const r=({plan:e,blockName:t,context:n,tracks:r})=>{r.recordEvent("jetpack_editor_block_upgrade_click",{plan:e,block:t,context:n})},a=({plan:e,blockName:t,context:n,tracks:r})=>{r.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:e,block:t,context:n})}},27003:(e,t,n)=>{"use strict";n.d(t,{v:()=>m});var r=n(51806),a=n(13419),s=n(52175),o=n(94333),i=n(9818),l=n(69307),c=n(87950),u=n(66316),d=n(38140);const p=(0,o.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:o,isSelected:p,attributes:m,setAttributes:h}=t||{},g=(0,a.Rl)(n);if(!g)return(0,r.createElement)(e,t);const f=(0,a.HD)(n),b=(0,a.m3)(n),[v,k]=(0,l.useState)(!f),[y,w]=(0,l.useState)(!1),E="editor-canvas",_=(0,i.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(o,!0)),[]),{hasParentBanner:C}=(0,l.useContext)(c.x)||{},x=(p||_)&&v&&!C,{tracks:S}=(0,a.z$)(),j=(0,l.useMemo)((()=>({plan:g,blockName:n,context:E,tracks:S})),[g,n,S]);(0,l.useEffect)((()=>{x&&w(!0)}),[x,w]),(0,l.useEffect)((()=>{!y&&x&&(0,d.W)(j)}),[y,j,x]),(0,l.useEffect)((()=>k(!f)),[m,k,f]),(0,l.useEffect)((()=>{h({shouldDisplayFrontendBanner:!C})}),[h,C]);const P=(0,s.useBlockProps)();return(0,r.createElement)(c.L,{onBannerVisibilityChange:k,hasParentBanner:x},(0,r.createElement)("div",{ref:P.ref},(0,r.createElement)(u.ZP,{className:`is-${n.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:x,description:b?.description,requiredPlan:g,context:E,onRedirect:()=>(0,d.v)(j)}),(0,r.createElement)(e,t)))}),"withUpgradeBanner");function m(e,t){return(0,a.Rl)(t)?{...e,edit:p(e.edit)}:e}},90607:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(51806),a=n(13419),s=n(55609),o=n(72067),i=n(69307),l=n(65736),c=(n(99196),n(63206)),u=n(18135),d=n(34613),p=n(75317),m=n(84102);const __=l.__,h=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-usage-panel"]?.available||!1,g=({onClick:e,type:t})=>{const{tracks:n}=(0,a.z$)(),o=(0,i.useCallback)((t=>{n.recordEvent("jetpack_ai_get_feedback_upgrade_click"),e?.(t)}),[e,n]),l=(0,i.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,r.createElement)("strong",null)}),c=(0,i.createInterpolateElement)(__("You have reached the limit of 20 free requests. <button>Upgrade to continue generating feedback.</button>","jetpack"),{button:(0,r.createElement)(s.Button,{variant:"link",onClick:o})});return(0,r.createElement)("div",null,"vip"===t?l:c)};function f(){const{requireUpgrade:e,upgradeType:t}=(0,u.Z)(),{autosaveAndRedirect:n,isRedirecting:i}=(0,c.Z)(),l=__("AI Assistant","jetpack");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.Z,null,(0,r.createElement)(s.PanelBody,{title:l,initialOpen:!1},(0,r.createElement)(s.PanelRow,null,(0,r.createElement)(s.BaseControl,{className:"jetpack-ai-proofread-control__header",label:__("AI feedback on post","jetpack")},(0,r.createElement)(p.Z,{busy:i,disabled:e}))),e&&!h&&(0,r.createElement)(s.PanelRow,null,(0,r.createElement)(g,{onClick:n,type:t})),h&&(0,r.createElement)(s.PanelRow,null,(0,r.createElement)(m.Z,null)))),(0,r.createElement)(o.PluginPrePublishPanel,{title:l,icon:(0,r.createElement)(a.Pm,null),initialOpen:!1},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.Z,{busy:i,disabled:e}),e&&(0,r.createElement)(g,{onClick:n,type:t}))))}},75317:(e,t,n)=>{"use strict";n.d(t,{Z:()
// translators: %1$d: number of days until the next usage count reset
__("Requests will reset in %1$d days.","jetpack"),i);d.push(e)}const p=n/o;return(0,r.createElement)(a.BaseControl,{help:d.length?d.join(" "):null,label:__("Usage","jetpack")},t===l._5&&(0,r.createElement)("p",null,(0,s.sprintf)(
// translators: %1$d: current request counter; %2$d: request allowance;
__("%1$d / %2$d free requests.","jetpack"),n,o)),t===l.dt&&(0,r.createElement)("p",null,(0,s.sprintf)(
// translators: %1$d: current request counter; %2$d: request allowance;
__("%1$d / %2$d requests.","jetpack"),n,o)),t===l.hp&&(0,r.createElement)("p",null,__("Unlimited requests.","jetpack")),(t===l._5||t===l.dt)&&(0,r.createElement)(c,{usage:p,limitReached:u}))}},10964:(e,t,n)=>{"use strict";n.d(t,{_5:()=>r,dt:()=>a,hp:()=>s});const r="free",a="tiered",s="unlimited"},84102:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(51806),a=n(6895),s=n(13419),o=n(55609),i=n(65736),l=(n(99196),n(63206)),c=n(18135),u=n(71449),d=n(46867),p=n(14465),m=n(10964);const __=i.__,h=e=>e?0===e?.value?m._5:1===e?.value?m.hp:m.dt:null,g=e=>{if(!e)return null;const t=new Date(e),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())-Date.now();return Math.ceil(n/864e5)},f=(e,t)=>e===m._5?__("Upgrade","jetpack"):t?(0,i.sprintf)(
// translators: %1$d: an integer, the number of requests to upgrade to on the next tier
__("Get %1$d requests","jetpack"),t):__("Get more requests","jetpack"),b=()=>{const e=(0,a.Z)("jetpack-ai-tiers-more-requests-contact"),{autosaveAndRedirect:t,isRedirecting:n}=(0,d.Z)(e);return{contactUsURL:e,autosaveAndRedirectContactUs:t,isRedirectingContactUs:n}};function v(){const{checkoutUrl:e,autosaveAndRedirect:t,isRedirecting:n}=(0,l.Z)(),{contactUsURL:a,autosaveAndRedirectContactUs:i}=b(),d=(0,u.d)(),{requestsCount:v,requestsLimit:k,isOverLimit:y,usagePeriod:w,currentTier:E,nextTier:_}=(0,c.Z)(),C=h(E),x=g(w?.nextStart),S=C===m.dt?w?.requestsCount:v,j=C===m._5?k:E?.limit,P=f(C,_?.limit),N=((0,s.Wp)()||(0,s.Ug)())&&C===m.dt&&!_;return(0,r.createElement)("div",{className:"jetpack-ai-usage-panel"},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.Z,{isOverLimit:y,requestsCount:S,requestsLimit:j,daysUntilReset:x,planType:C}),(C===m._5||C===m.dt)&&d&&(0,r.createElement)("div",{className:"jetpack-ai-usage-panel-upgrade-button"},N&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Need more requests?","jetpack")),(0,r.createElement)(o.Button,{variant:"primary",label:__("Contact us for more requests","jetpack"),href:a,onClick:i},__("Contact Us","jetpack"))),!N&&(0,r.createElement)(o.Button,{variant:"primary",label:__("Upgrade your Jetpack AI plan","jetpack"),href:e,onClick:t,disabled:n},P))))}},44359:(e,t,n)=>{"use strict";var r=n(13419),a=n(94746);(0,r.o_)(a.u,a.X)},94746:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,u:()=>a});var r=n(90607);const a="ai-assistant-plugin",s={render:r.Z}},10350:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(51806),a=n(42290),s=n(55609),o=n(65736),i=n(99196),l=n.n(i),c=n(81612),u=n(27298),d=n(93085);const __=o.__;function p({minWords:e=10,maxWords:t=100,disabled:n,words:o,onWordsNumberChange:i,language:p,onLanguageChange:m,tone:h,onToneChange:g,model:f,onModelChange:b}){const[v,k]=l().useState(!1);const y=p?.split(" ")[0],w=c.QA[y]?.label||__("Language","jetpack"),E=u.bu[h]?.label||__("Tone","jetpack");return(0,r.createElement)("div",{className:"jetpack-ai-generate-excerpt-control"},(0,r.createElement)(s.BaseControl,{className:"jetpack-ai-generate-excerpt-control__header",label:__("Settings","jetpack")},(0,r.createElement)(s.Button,{label:__("Advanced AI options","jetpack"),icon:a.u_,onClick:function(){k((e=>!e))},isPressed:v,isSmall:!0})),v&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.xK,{disabled:n,onChange:m,value:p,label:w}),(0,r.createElement)(u.IP,{disabled:n,label:E,value:h,onChange:g}),(0,r.createElement)(d.Z,{model:f,onModelChange:b,disabled:n})),(0,r.createElement)(s.RangeControl,{label:__("Desired length","jetpack"),value:o,onChange:i,min:e,max:t,help:__("Sets the desired length in words for the auto-generated excerpt. The final count may vary due to how AI works.","jetpack"),showTooltip:!1,disabled:n}))}},23134:(e,t,n)=>{"use strict";var r=n(13419),a=n(9818),s=n(92694),o=n(23536),i=n(54765),l=n(72956);const c=window?.Jetpack_Editor_Initial_State?.available_blocks["ai-content-lens"];c?.available&&(0,s.addFilter)("blocks.registerBlockType","jetpack/ai-content-lens-features",(function(e,t){return t!==o.name?e:(0,i.J7)()?((0,r.o_)(l.x,l.S),(0,a.dispatch)("core/edit-post")?.removeEditorPanel("post-excerpt"),e):e}))},14237:(e,t,n)=>{"use strict";n.d(t,{V:()=>v});var r=n(51806),a=n(42290),s=n(13419),o=n(55609),i=n(9818),l=n(72067),c=n(12238),u=n(69307),d=n(65736),p=n(35266),m=n(5246),h=n(18135),g=n(78680),f=n(10350);const __=d.__,_n=d._n;function b(){const{excerpt:e,postId:t}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostId:n}=e(c.store);return{excerpt:t("excerpt")??"",postId:n()??0}}),[]),{editPost:n}=(0,i.useDispatch)("core/editor"),{dequeueAiAssistantFeatureAyncRequest:l,increaseAiAssistantRequestsCount:g}=(0,i.useDispatch)("wordpress-com/plans"),[b,v]=(0,u.useState)(50),[k,y]=(0,u.useState)(!1),[w,E]=(0,u.useState)(),[_,C]=(0,u.useState)(),[x,S]=(0,u.useState)(a.bP),{request:j,stopSuggestion:P,suggestion:N,requestingState:T,error:L,reset:A}=(0,a.pw)({onDone:(0,u.useCallback)((()=>{g()}),[g]),onError:(0,u.useCallback)((e=>{"er
// Translators: %1$s is the number of words in the excerpt.
_n("%1$s word","%1$s words",I,"jetpack"),I),B="requesting"===T||"suggesting"===T||"done"===T&&!k,D="requesting"===T||"suggesting"===T,z=D||"done"===T;const{requireUpgrade:F,isOverLimit:O}=(0,h.Z)(),U=(0,s.Ug)()||(0,s.Wp)()?__("https://wordpress.com/support/excerpts/","jetpack"):__("https://jetpack.com/support/create-better-post-excerpts-with-ai/","jetpack");return(0,r.createElement)("div",{className:"jetpack-ai-post-excerpt"},(0,r.createElement)(o.TextareaControl,{__nextHasNoMarginBottom:!0,label:__("Write an excerpt (optional)","jetpack"),onChange:e=>n({excerpt:e}),help:I?Z:null,value:R,disabled:z}),(0,r.createElement)(o.ExternalLink,{href:U},__("Learn more about manual excerpts","jetpack")),(0,r.createElement)("div",{className:"jetpack-generated-excerpt__ai-container"},L?.code&&"error_quota_exceeded"!==L.code&&(0,r.createElement)(o.Notice,{status:L.severity,isDismissible:!1,className:"jetpack-ai-assistant__error"},L.message),O&&(0,r.createElement)(m.Z,null),(0,r.createElement)(f.A,{words:b,onWordsNumberChange:e=>{v(e),y(!0)},language:w,onLanguageChange:e=>{E(e),y(!0)},tone:_,onToneChange:e=>{C(e),y(!0)},model:x,onModelChange:e=>{S(e),y(!0)},disabled:D||F}),(0,r.createElement)(o.BaseControl,{help:M?.length?null:__("Add content to generate an excerpt.","jetpack")},(0,r.createElement)("div",{className:"jetpack-generated-excerpt__generate-buttons-container"},(0,r.createElement)(o.Button,{onClick:function(){n({excerpt:e}),A()},variant:"secondary",isDestructive:!0,disabled:"done"!==T||F},__("Discard","jetpack")),(0,r.createElement)(o.Button,{onClick:function(){n({excerpt:N}),A()},variant:"secondary",disabled:"done"!==T||F},__("Accept","jetpack")),(0,r.createElement)(o.Button,{onClick:function(){y(!1),A();const e=[{role:"jetpack-ai",context:{type:"ai-content-lens",contentType:"post-excerpt",postId:t,words:b,language:w,tone:_,content:`Post content:\n${M}\n`}}];l(),j(e,{feature:"jetpack-ai-content-lens",model:x})},variant:"secondary",isBusy:D,disabled:B||F||!M},__("Generate","jetpack"))))))}const v=()=>(0,r.createElement)(c.PostTypeSupportCheck,{supportKeys:"excerpt"},(0,r.createElement)(l.PluginDocumentSettingPanel,{className:(0,g.L)("ai-content-lens")?"is-beta-extension inset-shadow":"",name:"ai-content-lens-plugin",title:__("Excerpt","jetpack")},(0,r.createElement)(b,null)))},72956:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,x:()=>a});var r=n(14237);const a="ai-content-lens",s={render:r.V}},22473:(e,t,n)=>{"use strict";n.d(t,{P:()=>l});var r=n(51806),a=n(6895),s=n(13419),o=n(55609),i=n(65736);const __=i.__,l=({changeStatus:e,isLoading:t,isModuleActive:n})=>{const{tracks:i}=(0,s.z$)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the Likes feature to allow others to like your posts.","jetpack")),(0,r.createElement)(o.Button,{disabled:n||t,isBusy:t,onClick:()=>(i.recordEvent("jetpack_editor_likes_enable"),e(!0)),variant:"secondary"},t?__("Activating Likes","jetpack"):__("Activate Likes","jetpack",0)),(0,r.createElement)("div",{className:"components-likes-placeholder__learn-more"},(0,r.createElement)(o.ExternalLink,{href:(0,a.Z)("jetpack-support-likes")},__("Learn more about Jetpack Likes.","jetpack"))))}},67708:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});var r=n(51806),a=n(88275),s=n(22636),o=n(55609);const i=()=>(0,r.createElement)(a.ZP,null,(0,r.createElement)(o.Placeholder,null,(0,r.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.Z,{width:"100%",height:30})),(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.Z,{width:"100%",height:90})))))},66852:(e,t,n)=>{"use strict";var r=n(13419),a=n(12885);(0,r.o_)(a.u,a.X)},12885:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,u:()=>a});var r=n(77944);const a="likes",s={render:r.Z}},77944:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(51806),a=n(13419),s=n(55609),o=n(94333),i=n(9818),l=n(12238),c=n(65736),u=n(8264),d=n(22473),p=n(67708);const __=c.__,m=(0,i.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{areLikesEnabled:t("jetpack_like
__("To re-share a post, you need to upgrade to the %s plan","jetpack"),E)),(0,r.createElement)(o.Button,{href:f?null:h,onClick:g,target:"_top",icon:u.Z,className:p()("jetpack-publicize__upsell-button is-primary",{"jetpack-upgrade-plan__hidden":!h}),isBusy:f},f?__("Redirecting…","jetpack"):S)):(0,r.createElement)("div",{className:"jetpack-publicize__upsell"},(0,r.createElement)("strong",null,C),(0,r.createElement)("br",null),(0,c.sprintf)(/* translators: placeholder is the product name of the plan. */
__("This feature is for sites with a %s plan.","jetpack"),E),(0,r.createElement)("br",null),(0,r.createElement)(o.ExternalLink,{href:x},__("More information.","jetpack")))}},55802:(e,t,n)=>{"use strict";var r=n(13419),a=n(71259);(0,r.o_)(a.u,a.X)},71259:(e,t,n)=>{"use strict";n.d(t,{X:()=>d,u:()=>u});var r=n(51806),a=n(13419),s=n(12238),o=n(34613),i=n(2811),l=n(81142),c=n(36999);const u="publicize",d={render:()=>{const{isLoadingModules:e,isChangingStatus:t,isModuleActive:n,changeStatus:d}=(0,a.el)(u);return e?(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(o.Z,null,(0,r.createElement)(l.Z,null))):n?(0,r.createElement)(c.Z,null):(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(o.Z,null,(0,r.createElement)(i.e,{changeStatus:d,isModuleActive:n,isLoading:t})))}}},36999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(51806),a=n(81050),s=n(13419),o=n(72067),i=n(12238),l=n(65736),c=n(34613),u=n(18374);const __=l.__,d=()=>{(0,a.useSyncPostDataToStore)();const{hasEnabledConnections:e}=(0,a.useSocialMediaConnections)(),{isSocialImageGeneratorAvailable:t}=(0,a.usePublicizeConfig)();return(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(c.Z,null,(0,r.createElement)(a.PublicizePanel,null,(0,r.createElement)(u.Z,null)),t&&(0,r.createElement)(a.SocialImageGeneratorPanel,null)),(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:e,id:"publicize-title",title:(0,r.createElement)("span",{id:"publicize-defaults",key:"publicize-title-span"},__("Share this post","jetpack")),icon:(0,r.createElement)(s.Pm,null)},(0,r.createElement)(a.PublicizePanel,{prePublish:!0},(0,r.createElement)(u.Z,null))),t&&(0,r.createElement)(o.PluginPrePublishPanel,{initialOpen:!0,title:__("Social Image Generator","jetpack"),icon:(0,r.createElement)(s.Pm,null)},(0,r.createElement)(a.SocialImageGeneratorPanel,{prePublish:!0})),(0,r.createElement)(a.PostPublishOneClickSharing,null),(0,r.createElement)(a.PostPublishReviewPrompt,null))}},68607:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(51806),a=n(6895),s=n(13419),o=n(55609),i=n(65736);const __=i.__,l=({changeStatus:e,isLoading:t,isModuleActive:n})=>{const{tracks:i}=(0,s.z$)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the SEO feature and start optimizing your posts for search engines.","jetpack")),(0,r.createElement)(o.Button,{disabled:n||t,isBusy:t,onClick:()=>(i.recordEvent("jetpack_editor_seo_enable"),e(!0)),variant:"secondary"},t?__("Activating Jetpack SEO","jetpack"):__("Activate Jetpack SEO","jetpack",0)),(0,r.createElement)("div",{className:"components-seo-placeholder__learn-more"},(0,r.createElement)(o.ExternalLink,{href:(0,a.Z)("jetpack-support-seo-tools")},__("Learn more about Jetpack SEO.","jetpack"))))}},26779:(e,t,n)=>{"use strict";n.d(t,{f:()=>i});var r=n(51806),a=n(88275),s=n(22636),o=n(55609);const i=()=>(0,r.createElement)(a.ZP,null,(0,r.createElement)(o.Placeholder,null,(0,r.createElement)(o.Flex,{gap:2,direction:"column",style:{flexBasis:"100%",padding:"0 1em"}},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.Z,{width:"100%",height:30})),(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.Z,{width:"100%",height:90})),(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(s.Z,{width:"100%",height:30})))))},71181:(e,t,n)=>{"use strict";n.d(t,{J:()=>l});var r=n(82674),a=n.n(r),s=n(51806),o=n(55609),i=n(65736);n(99196);const __=i.__,_n=i._n,l=({suggestedLimit:e,value:t,label:n,...r})=>{const l=!e||t.length<=e?(0,i.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */
_n("%d character","%d characters",t.length,"jetpack"),t.length):(0,i.sprintf)(/* translators: Placeholder is a number of characters in a sentence. */
__("Its recommended to use less than %1$d characters in this field. (%2$d used)","jetpack"),e,t.length);return(0,s.createElement)("div",{className:"jetpack-seo-message-box"},(0,s.createElement)(o.TextareaControl,a()({label:n,help:l,value:t},r)))}},83811:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(69307),s=n(65736),o=n(71181),i=n(12017);const __=s.__;class l extends a.Component{onMessageChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(o.J,{value:e,onChange:this.onMessageChange,label:__("SEO Description","jetpack"),placeholder:__("Write a description…","jetpack"),suggestedLimit:156,rows:4})}}const c=(0,i.M)("advanced_seo_description")(l)},48111:(e,t,n)=>{"use strict";var r=n(13419),a=n(67500);(0,r.o_)(a.u,a.X)},67500:(e,t,n)=>{"use strict";n.d(t,{X:()=>k,u:()=>b});var r=n(82674),a=n.n(r),s=n(51806),o=n(13419),i=n(55609),l=n(72067),c=n(69307),u=n(65736),d=n(34613),p=n(68607),m=n(26779),h=n(83811),g=n(13344),f=n(18543);const __=u.__,b="seo",v=()=>{const{isLoadingModules:e,isChangingStatus:t,isModuleActive:n,changeStatus:r}=(0,o.el)("seo-tools"),u={title:__("SEO","jetpack")},b={icon:(0,s.createElement)(o.Pm,null),title:__("SEO","jetpack")};return n?(0,s.createElement)(c.Fragment,null,(0,s.createElement)(d.Z,null,(0,s.createElement)(i.PanelBody,a()({className:"jetpack-seo-panel"},u),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(f.Z,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(h.Z,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(g.Z,null)))),(0,s.createElement)(l.PluginPrePublishPanel,b,(0,s.createElement)(c.Fragment,null,(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(f.Z,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(h.Z,null)),(0,s.createElement)(i.PanelRow,null,(0,s.createElement)(g.Z,null))))):(0,s.createElement)(c.Fragment,null,(0,s.createElement)(d.Z,null,(0,s.createElement)(i.PanelBody,a()({className:"jetpack-seo-panel"},u,{initialOpen:!1}),e?(0,s.createElement)(m.f,null):(0,s.createElement)(p.C,{changeStatus:r,isModuleActive:n,isLoading:t}))))},k={render:()=>(0,s.createElement)(v,null)}},13344:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(51806),a=n(55609),s=n(65736),o=(n(99196),n(12017));const __=s.__,i=(0,o.M)("jetpack_seo_noindex")((({metaValue:e,updateMetaValue:t})=>(0,r.createElement)(a.ToggleControl,{label:__("Hide page from search engines","jetpack"),help:__("If selected, a 'noindex' tag will help instruct search engines to not include this page in search results. This page will also be removed from the Jetpack sitemap.","jetpack"),checked:!!e,onChange:e=>{t(e)}})))},18543:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(51806),a=n(69307),s=n(65736),o=(n(99196),n(71181)),i=n(12017);const __=s.__;class l extends a.Component{onTitleChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(o.J,{value:e,onChange:this.onTitleChange,label:__("SEO Title","jetpack"),placeholder:__("Write a title…","jetpack"),suggestedLimit:70,rows:2})}}const c=(0,i.M)("jetpack_seo_html_title")(l)},12017:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var r=n(94333),a=n(9818),s=n(92819);const o=e=>(0,r.compose)([(0,a.withSelect)((t=>({metaValue:(0,s.get)(t("core/editor").getEditedPostAttribute("meta"),[e],"")}))),(0,a.withDispatch)((t=>({updateMetaValue(n){var r;"boolean"!=typeof(r=n)&&("string"!=typeof r||""!==r&&0===r.trim().length)||t("core/editor").editPost({meta:{[e]:n}})}})))])},33726:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(51806),a=n(6895),s=n(13419),o=n(55609),i=n(65736);const __=i.__,l=({changeStatus:e,isLoading:t,isModuleActive:n})=>{const{tracks:i}=(0,s.z$)();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",null,__("Activate the Sharing feature to allow others to share your posts.","jetpack")),(0,r.createElement)(o.Button,{disabled:n||t,isBusy:t,onClick:()=>(i.recordEvent("jetpack_editor_sharing_enable"),e(!0)),variant:"secondary"},t?__("Activating Sharing","jetpack"):__("Activate Sharing","jetpack",0)),(0,r.createEl
__("Editing the %1$s %2$s","jetpack"),i,l.toLowerCase());n(r,{id:t,type:"snackbar"})}),[c,e,n,o,i,l]),null}}},10601:(e,t,n)=>{"use strict";var r=n(13419),a=n(81836);(0,r.o_)(a.u2,a.Xd)},81836:(e,t,n)=>{"use strict";n.d(t,{Xd:()=>p,u2:()=>d});var r=n(51806),a=n(81050),s=n(13419),o=n(55609),i=n(72067),l=n(69307),c=n(65736),u=n(34613);const __=c.__,d="social-previews",p={render:()=>(0,r.createElement)(m,null)},m=function(){const[e,t]=(0,l.useState)(!1);return(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(a.SocialPreviewsModal,{onClose:()=>t(!1)}),(0,r.createElement)(u.Z,null,(0,r.createElement)(o.PanelBody,{title:__("Social Previews","jetpack"),initialOpen:!1},(0,r.createElement)(a.SocialPreviewsPanel,{openModal:()=>t(!0)}))),(0,r.createElement)(i.PluginPrePublishPanel,{title:__("Social Previews","jetpack"),icon:(0,r.createElement)(s.Pm,null),initialOpen:!1},(0,r.createElement)(a.SocialPreviewsPanel,{openModal:()=>t(!0)})))}},43718:(e,t,n)=>{"use strict";n.d(t,{K:()=>a});var r=n(55609);const a=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,s=n&&n.color;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:s||!e?void 0:getComputedStyle(e).color}}))},85921:(e,t,n)=>{"use strict";var r=n(51806),a=n(13419),s=n(4981),o=n(65736),i=n(81427);const __=o.__;(0,a.Wp)()||(0,a.Ug)()||(0,s.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(i.IM,null)}),(0,s.setCategories)([...(0,s.getCategories)().filter((({slug:e})=>"contact-form"!==e)),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,r.createElement)(i.IM,null)}]),(0,s.setCategories)([...(0,s.getCategories)().filter((({slug:e})=>"earn"!==e)),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(i.IM,null)}]),(0,s.setCategories)([...(0,s.getCategories)().filter((({slug:e})=>"grow"!==e)),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(i.IM,null)}])},85007:(e,t,n)=>{"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function a(e,t,n=!1){let a=[];if(!t||!e&&!e.length||!function(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}(t))return a;const{currentDoc:s,currentWindow:o}=r(t);if(!function(e){try{return!!e?.parent?.location.href}catch(e){return!1}}(o))return a;const i=o?.parent?.document;return s&&i?(a=e.filter((e=>{const t=i.querySelector(e),r=!!s.querySelector(e);return!(!t||r)&&(s.head.appendChild(t.cloneNode()),n&&t.remove(),!0)})),a):a}function s(e,t,n){const a=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:s}=r(n),o=s.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(s.getElementById(e.id))return;const t=s.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,o.appendChild(t)}if("js"===r){const i=t[e.id]?t[e.id]:null;if(s.getElementById(e.id))return i();const l=s.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${a}/${n}-${e.version}.${r}`,l.onload=i,o.appendChild(l)}}))}function o(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{DT:()=>a,Dz:()=>o,Pp:()=>s,bL:()=>r})},70355:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var r=n(80550),a=n(13419);const s=r.O["Jetpack Green 40"];function o(){return(0,a.Ug)()||(0,a.Wp)()?null:s}},81518:(e,t,n)=>{"use strict";n.d(t,{t:()=>o});var r=n(29512),a=n.n(r),s=n(92819);function o(e,t){const n=function(e,t){for(const n of new(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,s.find)(e,{name:t});if(r)return r}return(0,s.find)(e,"isDefault")}(e,t);return n?n.name:null}},26788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(51806),a=n(55609),s=n(69307),o=n(65736);const __=o.__,_x=o._x;class i extends s.Component{state={hasCopied:!1};onCopy=()=>this.setState({hasCopied:!0});onFinishCopy=()=>this.setState({hasCopied:!1});onFocus=e=>e.target.select();render(){const{link:e}=this.props,{hasCopied:t
2022-12-15 17:41:53 +01:00
// translators: %s: amount
2023-12-07 09:44:11 +01:00
__("%s / month","jetpack"),s);case"1 year":return(0,l.sprintf)(
2022-12-15 17:41:53 +01:00
// translators: %s: amount
2023-12-07 09:44:11 +01:00
__("%s / year","jetpack"),s);case"one-time":return s}return(0,l.sprintf)(
2022-12-15 17:41:53 +01:00
// translators: %s: amount, plan interval
2023-12-07 09:44:11 +01:00
__("%1$s / %2$s","jetpack"),s,n)}function v({onClose:e,product:t}){const{selectedProductIds:n,setSelectedProductIds:a}=(0,h.Q)(),{id:s,title:i}=t,l=n&&n.includes(s),u=l?c.Z:void 0,d=t?" "+b(t):null;return(0,r.createElement)(o.MenuItem,{icon:u,onClick:t=>{t.preventDefault();const r=l?n.filter((e=>e!==s)):[...n,s];a(r),e()},selected:l,value:s},i," : ",d)}function k({onClose:e}){const{clientId:t,productType:n}=(0,h.Q)(),a=(0,i.useSelect)((e=>e(p.h).getSiteSlug())),s=(0,g.Z)(t);if(m.BM===(0,m.j3)())return(0,r.createElement)(o.MenuItem,null,a&&(0,r.createElement)(o.ExternalLink,{href:`https://wordpress.com/earn/payments/${a}#add-new-payment-plan`},(0,f.l)("add a new product",n)));return(0,r.createElement)(o.MenuItem,{onClick:t=>{t.preventDefault(),s(),setTimeout((()=>{const e=document.getElementById("new-product-title");null!==e&&e.focus()}),100),e()}},(0,f.l)("add a new product",n))}function y(){const{products:e,productType:t,selectedProductIds:n}=(0,h.Q)(),{selectedProducts:a}=(0,i.useSelect)((e=>{const{getSelectedProducts:t}=e(p.h);return{selectedProducts:t(n)}}));let l=null,c=u.Z;return a.length>1?l=__("Multiple products selected","jetpack"):1===a.length&&(l=b(a[0])),a.length!=a.length&&(l=(0,f.l)("product not found",t),c=d.Z),(0,r.createElement)(s.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(o.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:c,label:(0,f.l)("select a product",t),text:l},(({onClose:t})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.MenuGroup,null,e.map((e=>(0,r.createElement)(v,{key:e.id,onClose:t,product:e})))),(0,r.createElement)(o.MenuGroup,null,(0,r.createElement)(k,{onClose:t}))))))}},60510:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(52175),a=n(9818),s=n(72067),o=n(99307);function i(e){const t=(0,o.j3)(),{selectBlock:n}=(0,a.useDispatch)(r.store),{enableComplementaryArea:i}=(0,a.useDispatch)("core/interface"),{closePublishSidebar:l}=(0,a.useDispatch)(s.store);return()=>{switch(e&&n(e),t){case o.fH:return i("core/edit-site","edit-site/block-inspector");case o.CG:return i("core/edit-widgets","edit-widgets/block-inspector");default:l(),i("core/edit-post","edit-post/block")}}}},51585:(e,t,n)=>{"use strict";n.d(t,{_:()=>l,l:()=>o});var r=n(65736),a=n(14436);const __=r.__,s={"add a new product":{[a.Bn]:__("Add a new payment plan","jetpack"),[a.DM]:__("Add a new subscription","jetpack")},"product not found":{[a.Bn]:__("Payment plan not found","jetpack"),[a.DM]:__("Subscription not found","jetpack")},"select a product":{[a.Bn]:__("Select a payment plan","jetpack"),[a.DM]:__("Select a subscription","jetpack")},"default new product title":{[a.Bn]:__("Monthly Subscription","jetpack"),[a.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[a.Bn]:__("Manage your payment plans.","jetpack"),[a.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[a.Bn]:__("Saving payment plan…","jetpack"),[a.DM]:__("Saving subscription…","jetpack")},"add product":{[a.Bn]:__("Add payment plan","jetpack"),[a.DM]:__("Add subscription","jetpack")},"product requires a name":{[a.Bn]:__("Payment plan requires a name","jetpack"),[a.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[a.Bn]:__("Payment plan requires a valid price","jetpack"),[a.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[a.Bn]:__("Successfully created payment plan","jetpack"),[a.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[a.Bn]:__("There was an error when adding the payment plan.","jetpack"),[a.DM]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[a.Bn]:__("Invalid payment plan configured for this block.","jetpack"),[a.DM]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[a.Bn]:__("The button will be hidden from your visitors until you select a valid paym
2022-04-02 10:26:41 +02:00
/* translators: category of images */
label:__("All categories","jetpack")},{value:"animals",
/* translators: category of images */
label:__("Animals","jetpack")},{value:"arts",
/* translators: category of images */
label:__("Arts","jetpack")},{value:"birthdays",
/* translators: category of images */
label:__("Birthdays","jetpack")},{value:"cityscapes",
/* translators: category of images */
label:__("Cityscapes","jetpack")},{value:"crafts",
/* translators: category of images */
label:__("Crafts","jetpack")},{value:"fashion",
/* translators: category of images */
label:__("Fashion","jetpack")},{value:"food",
/* translators: category of images */
label:__("Food","jetpack")},{value:"flowers",
/* translators: category of images */
label:__("Flowers","jetpack")},{value:"gardens",
/* translators: category of images */
label:__("Gardens","jetpack")},{value:"holidays",
/* translators: category of images */
label:__("Holidays","jetpack")},{value:"houses",
/* translators: category of images */
label:__("Houses","jetpack")},{value:"landmarks",
/* translators: category of images */
label:__("Landmarks","jetpack")},{value:"landscapes",
/* translators: category of images */
label:__("Landscapes","jetpack")},{value:"night",
/* translators: category of images */
label:__("Night","jetpack")},{value:"people",
/* translators: category of images */
label:__("People","jetpack")},{value:"pets",
/* translators: category of images */
label:__("Pets","jetpack")},{value:"selfies",
/* translators: category of images */
label:__("Selfies","jetpack")},{value:"sport",
/* translators: category of images */
label:__("Sport","jetpack")},{value:"travel",
/* translators: category of images */
label:__("Travel","jetpack")},{value:"weddings",
/* translators: category of images */
2023-12-07 09:44:11 +01:00
label:__("Weddings","jetpack")}],m=["mountain","ocean","river","clouds","pattern","abstract","sky"],h="ANY",g="LAST_7_DAYS",f="LAST_30_DAYS",b="LAST_6_MONTHS",v="LAST_12_MONTHS",k="CUSTOM",y=[{value:h,label:__("Any time","jetpack")},{value:g,label:__("Last 7 days","jetpack")},{value:f,label:__("Last 30 days","jetpack")},{value:b,label:__("Last 6 months","jetpack")},{value:v,label:__("Last 12 months","jetpack")},{value:k,label:__("Specific Month/Year","jetpack")}],w=(new Date).getFullYear(),E=[{label:__("Any Month","jetpack"),value:-1},...(0,s.map)((0,s.range)(0,12),(e=>({label:(0,r.dateI18n)("F",new Date(0,e)),value:e})))]},54414:(e,t,n)=>{"use strict";var r=n(82674),a=n.n(r),s=n(51806),o=n(13419),i=n(52175),l=n(92694),c=n(10892),u=n(1285),d=n(38457);if((0,o.Dp)()&&"function"==typeof i.useBlockEditContext){(0,u.HO)(),(0,u.on)();const e=e=>e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1,t=(e,t)=>["core/cover","core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/story","jetpack/tiled-gallery","videopress/video"].indexOf(e)>-1&&-1===t.toString().indexOf("coblocks");(0,l.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(n=>r=>{const{name:o}=(0,i.useBlockEditContext)();let{render:l}=r;if(t(o,l)||e(r)){const{allowedTypes:e,gallery:t=!1,value:n=[]}=r;e.indexOf("image")>-1&&!(t&&n.length>0)&&(l=e=>(0,s.createElement)(c.Z,a()({},e,{mediaProps:r})))}return(0,s.createElement)(n,a()({},r,{render:l}))}),100),(0,l.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:{...e,keywords:[...e.keywords,...d.Dv.map((e=>e.keyword))]}}))}},11583:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(51806),a=n(55609),s=n(69307),o=n(65736),i=n(39630),l=n(65235),c=n.n(l),u=n(92819),d=n(46406),p=n(9827);const __=o.__,m=(0,s.memo)((()=>(0,r.createElement)("div",{className:"jetpack-external-media-browser__empty"},(0,r.createElement)("p",null,__("Sorry, but nothing matched your search criteria.","jetpack")))));const h=function(e){const{media:t,isCopying:n,isLoading:o,pageHandle:l,className:h,multiple:g,setPath:f,nextPage:b,onCopy:v}=e,[k,y]=(0,s.useState)([]),[w,E]=(0,s.useState)(-1),_=(0,s.useRef)(-1),C=(0,s.useRef)(null),x=(0,s.useCallback)((e=>{let t=[e];"folder"===e.type?f(e.ID):g?(t=k.slice(0,9).concat(e),k.find((t=>e.ID===t.ID))&&(t=k.filter((t=>t.ID!==e.ID)))):1===k.length&&e.ID===k[0].ID&&(t=[]),y(t)}),[k,g,f]),S=(0,s.useCallback)((()=>{v(k)}),[k,v]),j=t.filter((e=>"folder"!==e.type)).length>0,P=c()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":o}),N=c()({"jetpack-external-media-browser":!0,[h]:!0}),T=()=>{let e=1;const t=C.current.children;if(t.length>0){const n=t[0].offsetTop;for(;e<t.length&&t[e].offsetTop===n;)++e}_.current=e},L=(0,u.debounce)(T,400);(0,s.useEffect)((()=>(window.addEventListener("resize",L),()=>{window.removeEventListener("resize",L)})),[]),(0,s.useEffect)((()=>{t.length&&-1===_.current&&T()}),[t]);const A=(e,{item:t})=>{x(t)},M=(e,{item:n,index:r})=>{[i.LEFT,i.RIGHT,i.UP,i.DOWN].includes(e.keyCode)?((e,n)=>{switch(e){case i.LEFT:n>=1&&E(n-1);break;case i.RIGHT:n<t.length&&E(n+1);break;case i.UP:n>=_.current&&E(n-_.current);break;case i.DOWN:n<t.length-_.current&&E(n+_.current)}})(e.keyCode,r):i.SPACE===e.keyCode?(x(n),e.preventDefault()):i.ENTER===e.keyCode&&x(n),[i.LEFT,i.RIGHT,i.UP,i.DOWN,i.SPACE,i.ENTER].includes(e.keyCode)&&e.stopPropagation()};return(0,r.createElement)("div",{className:N},(0,r.createElement)("ul",{ref:C,className:P},t.map(((e,t)=>(0,r.createElement)(d.Z,{item:e,index:t,key:e.ID,onClick:A,onKeyDown:M,focus:t===w,isSelected:k.find((t=>t.ID===e.ID)),isCopying:n}))),0===t.length&&!o&&(0,r.createElement)(m,null),o&&(0,r.createElement)(p.Z,null),l&&!o&&(0,r.createElement)(a.Button,{variant:"secondary",className:"jetpack-external-media-browser__loadmore",disabled:o||n,onClick:()=>{t.length&&E(t.length),b()}},__("Load More","jetpack"))),j&&(0,r.createElement)((()=>{const e=0===k.length||n,t=n?__("Inserting
// translators: %1$s is the list of categories with subscriptions count
__("This post will be sent to everyone subscribed to %1$s.","jetpack"),t),{strong:(0,r.createElement)("strong",null)})}return __("This post will be sent to all subscribers.","jetpack")})())))})}},88966:(e,t,n)=>{"use strict";n.d(t,{$P:()=>u,CT:()=>p,Y0:()=>m,ZP:()=>d,hc:()=>c,nZ:()=>l});var r=n(51806),a=n(55609),s=n(69307),o=n(65736),i=n(40083);const _x=o._x,__=o.__,l=e=>{const t="https://wordpress.com/earn/payments/"+location.hostname;return e?t:t+"#add-tier-plan"},c=(e,t)=>"public"!==e&&t!==i.So.everybody.key,u=()=>(0,r.createElement)(a.Notice,{status:"warning",isDismissible:!1,className:"edit-post-post-misconfiguration__warning"},(0,s.createInterpolateElement)(__("Youll need to change the posts access to Everybody or visibility to Public.<br/><br/>Subscribers arent able to view private or password-protected posts.","jetpack"),{br:(0,r.createElement)("br",null)}));function d({context:e="other",hasTierPlans:t}){const n=t?_x("Manage plans","unused context to distinguish translations","jetpack"):__("Set up a paid plan","jetpack");return"toolbar"===e?(0,r.createElement)(a.ToolbarButton,{href:l(t),target:"_blank"},n):(0,r.createElement)(a.Button,{variant:"primary",href:l(t),target:"_blank"},n)}const p=(e,t)=>{const n=e.length?e:[1],r=n.some((e=>!t.some((t=>t.id===e)))),a=t.filter((e=>n.includes(e.id))).map((e=>e.name));r&&a.push(__("All content","jetpack"));const s=a.map((e=>`<strong>${e}</strong>`));let i="";if(1===s.length)i=s[0];else if(2===s.length)
// translators: %1$s: first category name, %2$s: second category name
i=(0,o.sprintf)(__("%1$s and %2$s","jetpack"),...s);else{const e=s.slice(0,-1).join(`${__(",","jetpack")} `),t=s[s.length-1];i=(0,o.sprintf)(
// translators: %1$s: a comma-separated list of category names except for the last one, %2$s: the name of the last category
__("%1$s, and %2$s","jetpack"),e,t)}return i},m=e=>1===e?__(" (1 subscriber)","jetpack"):(0,o.sprintf)(
// translators: %s is the number of subscribers in numerical format
__(" (%s subscribers)","jetpack"),e)},63066:(e,t,n)=>{"use strict";var r=n(13419),a=n(86989),s=n.n(a),o=n(9818),i=n(65736);n(53961);const __=i.__;function l(){const e=(0,r.lQ)();return void 0!==typeof window&&window.location&&e?(0,r.Wp)()||(0,r.Ug)()?`https://wordpress.com/plans/my-plan/${e}`:`${window.location.protocol}//${e.replace("::","/")}/wp-admin/admin.php?page=jetpack#/my-plan`:null}(async()=>{if(void 0!==typeof window&&window.location){if(new URLSearchParams(window.location.search).get("plan_upgraded")){let e=null;e:try{if((0,r.Wp)())break e;const t=await s()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{const t=l();(0,o.dispatch)("core/notices").createNotice("success",e?(0,i.sprintf)(/* translators: %s is the plan name, such as Jetpack Premium. */
__("Congratulations! Your site is now on the %s plan.","jetpack"),e):__("Congratulations! Your site is now on a paid plan.","jetpack"),{isDismissible:!0,...t&&{actions:[{url:l(),label:__("View my plan","jetpack")}]}})}}}})()},80425:(e,t,n)=>{"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},31985:(e,t,n)=>{"use strict";n.d(t,{S:()=>l,Z:()=>i});var r=n(13419),a=n(4981),s=n(92694);const o="jetpack/";function i(e,t,n=[],i=!0){const l="string"==typeof e?e:e.name,c=l.startsWith(o),u=c?l.slice(o.length):l,{available:d,details:p,unavailableReason:m}=(0,r.OZ)(u),h=(0,r._D)(m,p),g=i||c?o:"";if(!d&&!h)return!1;const f=g+u,b=(0,a.registerBlockType)("object"==typeof e?e:f,t);return h&&(0,s.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,r.T)(f)),n.forEach((e=>(0,a.registerBlockType)(g+e.name,e.settings))),b}function l(e,t,n,a){const s={...t,icon:(0,r.lt)(e),attributes:e.attributes||{}},{variations:o}=e;return Array.isArray(o)&&o.length>0&&(s.variations=o.map((e=>({...e,icon:(0,r.lt)(e)})))),i(e,s,n,a)}},36598:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(70444);const s=(e,t=24,n=24,s="0 0 24 24")=>(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:s},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)},66425:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(51806),a=n(52175);const s=(e,t,n,s,o)=>{const{isSelected:i}=t,l=t.attributes[e];return(0,r.createElement)("div",{className:i?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!i&&""!==l&&s(t),(i||""===l)&&(0,r.createElement)(a.PlainText,{value:l,placeholder:n,"aria-label":n,onChange:o}))}},92713:(e,t,n)=>{"use strict";var r=n(9818),a=n(65736);n(53961);const __=a.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,r.dispatch)("core/notices").createNotice("success",__("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):e.get("stripe_connect_cancelled")&&(0,r.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},23621:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(86989),a=n.n(r),s=n(92819);function o(e,t=s.noop){return t(!0),new Promise(((n,r)=>{a()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((a=>{t(!1);const s=a.status?parseInt(a.status,10):null;s&&s>=400?r():n(a.url||e)}),(()=>{t(!1),r()}))}))}},46867:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9818),a=n(69307),s=n(92819);function o(e,t=s.noop){const[n,o]=(0,a.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,m=(0,r.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=async e=>{e.preventDefault(),u?l&&i&&await p(e):await(async()=>{for(let e=0;e<m.length;e++)await(0,r.dispatch)("core").saveEditedEntityRecord(m[e].kind,m[e].name,m[e].key)})()};return{autosave:h,autosaveAndRedirect:async r=>{r.preventDefault(),n||(o(!0),h(r).then((()=>{!function(e,t,n=!1){t&&t(e),n?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)})))},isRedirecting:n}}},78798:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(13419),a=n(9818),s=n(92694),o=n(92819),i=n(46867);const l="a8c.wpcom-block-editor.openCheckoutModal";function c(e,t=o.noop){const{checkoutUrl:n,planData:c}=(0,a.useSelect)((t=>{const n=t("core/editor"),a=t("wordpress-com/plans"),{id:s,type:o}=n.getCurrentPost(),i=a&&a.getPlan(e);return{checkoutUrl:(0,r.Qq)({plan:i,planSlug:e,postId:s,postType:o}),planData:i}}),[]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,i.Z)(n,t);return[n,async e=>{if(e.prev
2022-12-15 17:41:53 +01:00
// translators: %s: Price
2023-12-07 09:44:11 +01:00
__("Minimum allowed price is %s.","jetpack"),(0,r.ZP)(k,b)),h),void a(!1);if(!(0,c.vs)(b,v))return(0,d.q)((0,l.l)("product requires a valid price",t),h),void a(!1);try{const r=await s()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),o={id:r.id,title:r.title,interval:r.interval,price:r.price,currency:r.currency},c=h.select(u.G4).getProducts();i(p(c.concat([o]))),n([o.id]),m&&(0,d.w)((0,l.l)("successfully created product",t),h),a(!0)}catch(e){(0,d.q)((0,l.l)("there was an error when adding the product",t),h),a(!1)}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e}),k=e=>({type:"SET_NEWSLETTER_CATEGORIES",newsletterCategories:e}),y=e=>({type:"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT",newsletterCategoriesSubscriptionsCount:e})},23267:(e,t,n)=>{"use strict";n.d(t,{G4:()=>r,P:()=>o,Zq:()=>i,cH:()=>s,lp:()=>a});const r="jetpack/membership-products",a=0,s=1,o=2,i="tier"},7652:(e,t,n)=>{"use strict";n.d(t,{h:()=>c});var r=n(9818),a=n(6247),s=n(23267),o=n(93100),i=n(20360),l=n(93245);const c=(0,r.createReduxStore)(s.G4,{actions:a,reducer:o.Z,resolvers:i,selectors:l,__experimentalUseThunks:!0});(0,r.register)(c)},93100:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r={products:[],apiState:n(23267).lp,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null},newsletterCategories:{enabled:!1,categories:[]}};function a(e=r,t){switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts};case"SET_NEWSLETTER_CATEGORIES":return{...e,newsletterCategories:t.newsletterCategories};case"SET_NEWSLETTER_CATEGORIES_SUBSCRIPTIONS_COUNT":return{...e,newsletterCategoriesSubscriptionsCount:t.newsletterCategoriesSubscriptionsCount}}return e}},20360:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fetchNewsletterCategoriesSubscriptionsCount:()=>k,getNewsletterCategories:()=>C,getNewsletterCategoriesSubscriptionsCount:()=>x,getNewsletterTierProducts:()=>w,getProducts:()=>E,getSubscriberCounts:()=>_});var r=n(86989),a=n.n(r),s=n(12238),o=n(96483),i=n(14436),l=n(51585),c=n(73905),u=n(74251),d=n(6247),p=n(23267),m=n(46529);const h="membership-products-resolver-getProducts",g="membership-products-resolver-getSubscriberCounts",f="membership-products-resolver-getNewsletterCategories",b="membership-products-resolver-getNewsletterCategoriesSubscriptionsCount";let v=!1;const k=async e=>{const t=await a()({path:`/wpcom/v2/newsletter-categories/count?term_ids=${e.join(",")}`,method:"GET"});if(!t||"object"!=typeof t)throw new Error("Unexpected API response");const n=t?.errors&&Object.values(t.errors)?.[0]?.[0];if(n)throw new Error(n);return t},y=(e,t,n)=>{if(e.length>0)return;const r=n.getProductsNoResolver()[0]?.id;r&&t([r])},w=(e=i.Bn,t=[],n=(()=>{}))=>E(e,t,n,!1),E=(e=i.Bn,t=[],n=(()=>{}),r=!0)=>async({dispatch:i,registry:g,select:f})=>{if(await c.Z.blockExecution(h),v)return void y(t,n,f);const b=c.Z.acquire(h);try{const c=await(async()=>{const e=(0,o.getQueryArg)(window.location.href,"origin"),t=(0,o.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),n=await a()({path:t,method:"GET"});if(!n&&"object"!=typeof n)throw new Error("Unexpected API response");const r=n?.errors&&Object.values(n.errors)?.[0]?.[0];if(r)throw new Error(r);return n})();((e,t,n)=>{const r=t.select(s.store).getCurrentPostId();n((0,d.setConnectUrl)((0,u.Z)(r,e.connect_url))),n((0,d.setSiteSlug)(e.site_slug)),n((0,d.setProducts)(e.products)),n((0,d.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),n((0,d.setApiState)(e.connected_account_id?p.cH:p.P))})(c,g,i),(e=>!e.products.length&&e.connected_account_id)(c)&&await(
2023-09-26 10:24:36 +02:00
// translators: Default description for a Facebook post
2023-12-07 09:44:11 +01:00
__("Visit the post for more.","jetpack")]}),(0,r.jsx)("div",{className:"facebook-preview__info",children:(0,r.jsx)(d.Z,{name:"info"})})]})})]})]}),(0,r.jsx)(c.Z,{})]})}},34245:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var r=n(30275),a=n(37580),s=n(52208),o=n(53251),i=n(3451),l=n(69133);n(59961);const c=({url:e,user:t,customText:n,media:c,imageMode:u})=>{const[d]=(0,o.Z)({mode:u}),p="is-"+(d===a.Mf?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(l.Z,{user:t}),(0,r.jsxs)("div",{className:"facebook-preview__content",children:[n&&(0,r.jsx)(s.Z,{text:n,url:e,forceUrlDisplay:!0}),(0,r.jsx)("div",{className:"facebook-preview__body",children:c?(0,r.jsx)("div",{className:`facebook-preview__media ${p}`,children:c.map(((e,t)=>(0,r.jsx)("div",{className:`facebook-preview__media-item ${p}`,children:e.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,children:(0,r.jsx)("source",{src:e.url,type:e.type})}):(0,r.jsx)("img",{alt:e.alt||"",src:e.url})},`facebook-preview__media-item-${t}`)))}):null})]}),(0,r.jsx)(i.Z,{})]})}},3451:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30275),a=n(65736),s=n(69094);n(1488);const __=a.__,o=()=>(0,r.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like",
2023-09-26 10:24:36 +02:00
// translators: Facebook "Like" action
label:__("Like","jetpack")},{icon:"comment",
// translators: Facebook "Comment" action
label:__("Comment","jetpack")},{icon:"share",
// translators: Facebook "Share" action
2023-12-07 09:44:11 +01:00
label:__("Share","jetpack")}].map((({icon:e,label:t})=>(0,r.jsxs)("li",{children:[(0,r.jsx)(s.Z,{name:e}),(0,r.jsx)("span",{children:t})]},e)))})},69133:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(30275),a=n(65736),s=n(99196),o=n(69094);n(56878);const __=a.__,_x=a._x,i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IB2cksfwAADwtJREFUeJztXet2mzgX3RLg+H5NmsRt0zad6Zp5/6eYtebPvMDX20zaJm4udmwH20jfDyQQQthpgm1gsTuMWgukg7aOzjmSAPLX3/9wlCgs6L4FKLFdlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFRElxwlAQXHCXBBUdJcMFh71uAbYMQsjaf82I/e1c4ggkh4JwrB8DBAQ6I/wEg4j8CQvxr5FE0wgtDMCEEjDF4ngdKKSzLQr1eQ71WxUGlAtu2QamvzYxxrFYruIsFZvMHzGZzeJ4XXEspLQzRhSF4tVrBcRwM+j30um2020049uNub7laYTy+x83tGLd3YyyXS1iWtXWZd4FcE0wI4HkchAAnJy9wfNhHvV6Lnccjw3NwNaR5dmwbg34Xg34Xs9kcP0bXuLwcgXPAsgjyrMy5Jdgnl6Fer+Ht6yHa7RYQOE0hefJcYJOzBQAc9XoN785eYtBt49PXC8xmc1gWzS3JuQyTCCFYrRh6vTb+/PDeJ5f7JPnO0lPKlA6ar+ztdgt/fniPXq+N1Ypt9MazitwRTACsPA+DXge/n7+F49hBRhocEBIqu+PY+P38LQa9Dlaet2EMyCZyR7DHOBq1Gt6fn/ne7hbr4gAopXh/foZGrQaP5W+czh3BlBK8ORvCsixwzreqVUTYdMuy8OZsGIRZeUKuCPY8htOTI3TaLZ/cHdhFOfnRabdwenIEz2NbrzNN5IZgzjmq1QMMT46BR0xBpglZ1/DkGNXqQa4mQXJBMCEEHmM4GvT2FrL4MTHF0aAHj+XHq84FwZxzVBwH/X5X/rIPKQAA/X4XFcfJjRZnnmBCCDzPQ6fdRK1W3ZntNcnBOUetVkWn3YTnebnQ4swTLAltNRuZiEMJ4MuSk5WnzBMMEYs2mnVgx86VDll3o1kHpblouuwTzDlgWzYatfgiwr7QqNVgW3Yu5qczTbA/0cDQaFQzpTGUUjQaVXDOMmE21iE7rWaCmPyvVg/2LUkMfjyMdCbAt4hsEwx/u41jO/7fMzAkShkc2/G3AmUcmScYHLDlilEmGtSXwXbsbIizAdknGBxWBodBX6bsM5wDggGSwVWcLMpkQg4IJmBZML4amNgalHXkgGCAsewt0WVRJhMyTzAhwHK5En/fv8ZIGZbLVdYjJCAPBAMErrvYtxAx+DJln+FME8w5B6UE8/k8Yx4rx3w+B6XZX3DINME+COYPLhZimM4CFssV5g9uqcFpgBDfoRlP7oE9Pw0o6x5P7sEYK21wGvAX/Blub8f7FiXA7e0YnpePbTuZJ5hzDmpZGE+mcF13bwvtcuOB67oYT6agYttu1pF5ggGAEoIH18XV6Fr8sg/N8eu8Gl3jwXVBc6C9yAvBnHPYlOJydI3Vaj/xJyH+I6qXo2vYOXp+OBcEAwChFK67xPcfI2DHzpas6/uPEVx3CZKhzQebkBtJ/UdICL79uMLkfrozWyxt7+R+im8/rsTzwvnQXuSJYB/+FtpPn//d2bZVuW1X1pmH2FdFzggGLMvC/XSOz18vdlbn568XuJ/Oc/lah9wRzDmHbVNcXv3Epy//bXUbD+fApy//4fLqJ2w7P46VitwRjOA5IQvfvl/i4+evQcOnQYBa1sfPX/Ht+6V4VPXZRe8FuX1Hh6/JNr5fjuCtPJydDXFQqQR5v2qf5TWEELiLBT5/ucDo+gaObedScyVySzAEKY5tY3Rzi+lsjuHwGC8O+wG5kpgkstV8ec7l6BoXFz8wd93ck4u8EwypyZYFd7HA/z5+wWh0jRcvBmi3mqg4ztprJamL5RLjyT0uL39iPLkHIQR2TqYiNyH3BEMbXseTKe7GE9TrNTTqdbSaddRqNRxUnMAL9jwP7mKJ+XyOyf0M09kMs9kchNDgCYoikIuiEKyCUgJCbMznLmazOX5e30TeRQlBnjz8ZT8KuwDDsQmFIxjKThBC7IhXzJi0uRApCYgtIrkoKsESOmkmX6uoxErkMg4u8XjkQoP1sEfC/JLR1GuPaX6SPFlEZglWX+wtJ/l9uxo6S7t6MZlqx315GAAOSmnmXySeKYJ1UgkhqFUPUK0eoFaronrg/91x7OCl39veWcGELIwxLJcrPDy4eHBdzOcPeHhwMX9whVOXTbIzRbD/wk+Cg4qDfq+DTqeNWu0gmILcBygAW8TPtSrQbjWDPHexwHzu4u5ujOubO7iLJThnsKzsuDbkr7//2Xt3k8/5tFtNHB0N0O92Yo20adpxV0iSw/MYrm/vcDX6ifHY3+KbhddO7E2D5TcWGGNot1oYnh6h22lHGk5dNNg3sRK6HFJG+Ra8w34Xt3djXHy7wngy2fs3IPZCsL+BzUOl4mB4eoyTFwPFM41ORGQd0Q7p/7vX7aDbaeP75U9cfPuBxWIp1pN3L99eCPY8D91uG+/OXgUvWAnnk/chUTqQsst7OT0+RK/Twscv/+LubgxKd78jZKdGgnPf3g5Pj/HHh/PIm1vzoK2PhRonV6sH+OPDOYanx2CM7VyLd6bBIpLE2zcvcfLiKPitSMTqIIRAfCIEZ6+GqFQcfP5yAQ6ys617W9fgwEkC8Nv5WUAucrc/8WlQ7/HkxRF+Oz8LfttF5946wXLi4t2bVxj0e9uuLvMY9Ht49+bVzlawtkqwHwpxvH51iqPDfqYe4d4XOICjwz5evzoFY9t/NfLWCPa/bbTCYb+L05OjrX9AIy+QH/o4PT7C4aArnrXaXstsjWDP89Co1/Dm7KXRpXjMVtdN5zxnu6x+bfSLpfG8x5SnX5+UD6EAb85eolGvbfVDH1vV4LPXQziOHeykWNeApgNy4j72ydjHlAEt1a8lsVQ9HiujKqt6PIZwx7Zx9nq41dg/dYLlE/mHgx66nbb/Makn3sBmDSJaGrk6knLtAHiwniy/Maz+eYqs6wjVO5C8pttp43DQ29obA1KPgxljcBwbL0+Phd3lACebm0y/Nx5JDI1OACI+/Ey44VW0RBg8M/8hueIkrs0xP0ZerqQx8Xn0JKKdxP0zKIDh6TFubsdbeaAuVQ2WCwiHgx6q1YNgaDYhpjE8fsjfw8ZSD6kp3DjExvJjKhzV8CQZTbKa5I2PANEeYDIR0uGqVQ9wOOiJHZ7pEpyqBnPO4TgODgc9/0bCjM3Xbvg90dEKUkM+EVWThOsjHCSVv77eJMHD+jaXyznH4aCH0c+b1F+RmJoGy+do260m6vV64BnK+/xVGyeVLGnbld58uoJy1bYmDKGb8rGG4JgMcSO/dozgSpt4jKFer6O9hc/1pKbBcttKt9sGkYOU6gnr5wf2M8FOcq2BTPnEV1GZRiC1UqR8Q5utkzGQNVa+MN2G7Fi+Tlogmzydo9dp4+bmLtUZrlQJdhwH7VYLHuPS8gg/KM5gxD+CuZuvG0HlBzsICDhnTyxfSmYaVUi8jMgNR9NY/+N6H9OHXqV88dncdrsFx3GwXC5T0+JUhmjpLDQbdf/bgozFYlEdXIYWSdqj5AWp+siJMK4y/dU4OZ4X9Zugcbjxen2UFjKqsupxduRgDBalaDbqIvpIB+nYYDEMN5uN4KPNMT/SQAARN0oMN6znxav0h2ViGp4VmZJMBDQCYz64QR71zyb5AxkVWWM9KNy64stACRrNejhxkgJSGaKl/a0eVERvDAUMmtYUi6
2023-09-26 10:24:36 +02:00
// translators: name of a fictional Facebook User
2023-12-07 09:44:11 +01:00
__("Anonymous User","jetpack")}),(0,r.jsxs)("div",{className:"facebook-preview__post-header-share",children:[(0,r.jsx)("span",{className:"facebook-preview__post-header-time",children:t?__(
2023-09-26 10:24:36 +02:00
// translators: short version of `1 hour`
"1h","jetpack"):_x(
// translators: temporal indication of when a post was published
2023-12-07 09:44:11 +01:00
"Just now","","jetpack")}),(0,r.jsx)("span",{className:"facebook-preview__post-header-dot","aria-hidden":"true",children:"·"}),(0,r.jsx)(o.Z,{name:"public"})]})]})]}),!n&&(0,r.jsx)("div",{className:"facebook-preview__post-header-more"})]})}},69094:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(30275);n(40888);const a=({name:e})=>(0,r.jsx)("i",{className:`facebook-preview__post-icon facebook-preview__post-icon-${e}`})},13477:(e,t,n)=>{"use strict";n.d(t,{S:()=>u});var r=n(30275),a=n(55609),s=n(65736),o=n(10263),i=n(7558),l=n(26767),c=n(34245);const __=s.__,u=({headingLevel:e,hideLinkPreview:t,hidePostPreview:n,...s})=>{const u=!!s.media?.length,d=!!s.customImage;return(0,r.jsxs)("div",{className:"social-preview facebook-preview",children:[!n&&(0,r.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,r.jsx)(o.Z,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a social post on Facebook
2023-12-07 09:44:11 +01:00
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Facebook:","jetpack")}),u?(0,r.jsx)(c.C,{...s}):(0,r.jsx)(i.g,{...s})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,r.jsx)(o.Z,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a link to a Facebook post
2023-12-07 09:44:11 +01:00
__("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Facebook.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),d?(0,r.jsx)(l.F,{...s}):(0,r.jsx)(i.g,{...s,compactDescription:!0,customText:"",user:void 0})]})]})}},17915:(e,t,n)=>{"use strict";n.d(t,{X:()=>c});var r=n(30275),a=n(21987);n(73443);const s=160,o=e=>{const t=e.startsWith("https://")?"https://":"http://",n=t+e.replace(t,"").split("/").join(" ");return(0,a.SL)((0,a.hs)(68),(0,a.KB)(68))(n)},i=(0,a.SL)((0,a.hs)(63),(0,a.I$)(23,73),(0,a.KB)(63)),l=(0,a.SL)((0,a.hs)(s),(0,a.I$)(80,170),(0,a.KB)(s)),c=({description:e="",siteTitle:t,title:n="",url:s=""})=>{const c=(0,a.wy)(s);return(0,r.jsx)("div",{className:"search-preview",children:(0,r.jsxs)("div",{className:"search-preview__display",children:[(0,r.jsxs)("div",{className:"search-preview__header",children:[(0,r.jsxs)("div",{className:"search-preview__branding",children:[(0,r.jsx)("img",{className:"search-preview__icon",src:`https://www.google.com/s2/favicons?sz=128&domain_url=${c}`,alt:""}),(0,r.jsxs)("div",{className:"search-preview__site",children:[(0,r.jsx)("div",{className:"search-preview__site--title",children:t||c}),(0,r.jsx)("div",{className:"search-preview__url",children:o(s)})]})]}),(0,r.jsx)("div",{className:"search-preview__menu",children:(0,r.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.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,r.jsx)("div",{className:"search-preview__title",children:i(n)}),(0,r.jsx)("div",{className:"search-preview__description",children:l((0,a.ju)(e))})]})})}},21987:(e,t,n)=>{"use strict";n.d(t,{I$:()=>l,KB:()=>c,SL:()=>u,YW:()=>h,ge:()=>p,hs:()=>i,ju:()=>d,u_:()=>f,vB:()=>m,wy:()=>o});var r=n(30275),a=n(69307),s=n(65736);const o=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),i=e=>t=>t.length<=e&&t,l=(e,t)=>n=>{const r=n.slice(0,t),a=r.lastIndexOf(" ");return a>e&&a<t&&r.slice(0,a).concat("…")},c=e=>t=>t.slice(0,e).concat("…"),u=(...e)=>t=>e.find((e=>!1!==e(t)))?.(t),d=(e,t=[])=>{const n=new RegExp(`(<([^${t.join("")}>]+)>)`,"gi");return e?e.replace(n,""):""},p=(e,t)=>new RegExp(`<${t}[^>]*>`,"gi").test(e),m=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short"}).format,h=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,g={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"};function f(e,t){const{platform:n,maxChars:o,maxLines:i,hyperlinkHashtags:l=!0,hyperlinkUrls:c="instagram"!==n}=t;let u=d(e);if(u=u.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),o&&u.length>o&&(u=u.substring(0,o)),i){const e=u.split("\n");e.length>i&&(u=e.slice(0,i).join("\n"))}const p={};if(c){(u.match(/(https?:\/\/\S+)/g)||[]).forEach(((e,t)=>{p[`Link${t}`]=(0,r.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:e}),u=u.replace(e,`<Link${t} />`)}))}if(l&&g[n]){const e=u.matchAll(/(^|\s)#(\w+)/g),a=g[n];[...e].forEach((([e,n,o],i)=>{const l=(0,s.sprintf)(a,o,t.hashtagDomain);p[`Hashtag${i}`]=(0,r.jsx)("a",{href:l,rel:"noopener noreferrer",target:"_blank",children:`#${o}`}),u=u.replace(e,`${n}<Hashtag${i} />`)}))}return u=u.replace(/\n/g,"<br />"),p.br=(0,r.jsx)("br",{}),(0,a.createInterpolateElement)(u,p)}},81683:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,P:()=>a});const r=120,a=2},68280:(e,t,n)=>{"use strict";n.d(t,{r:()=>a});var r=n(30275);const a=()=>(0,r.jsx)("svg",{color:"rgb(38, 38, 38)",fill:"rgb(38, 38, 38)",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:(0,r.jsx)("polygon",{fill:"non
2023-09-26 10:24:36 +02:00
// translators: refers to a social post on Instagram
2023-12-07 09:44:11 +01:00
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Instagram:","jetpack")}),(0,r.jsx)(o.R,{...n})]})})},24687:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,P:()=>a});const r=212,a=3},52493:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(30275);const a=()=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",width:"128",height:"128",children:[(0,r.jsx)("path",{fill:"#e7e2dc",d:"M0 0h128v128H0z"}),(0,r.jsx)("path",{d:"M88.41 84.67a32 32 0 10-48.82 0 66.13 66.13 0 0148.82 0z",fill:"#788fa5"}),(0,r.jsx)("path",{d:"M88.41 84.67a32 32 0 01-48.82 0A66.79 66.79 0 000 128h128a66.79 66.79 0 00-39.59-43.33z",fill:"#9db3c8"}),(0,r.jsx)("path",{d:"M64 96a31.93 31.93 0 0024.41-11.33 66.13 66.13 0 00-48.82 0A31.93 31.93 0 0064 96z",fill:"#56687a"})]})},23736:(e,t,n)=>{"use strict";n.d(t,{u:()=>s});var r=n(30275),a=n(98170);function s(e){return(0,r.jsx)(a.w,{name:"",profileImage:"",...e,description:"",media:void 0})}},98170:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var r=n(30275),a=n(65736),s=n(21987),o=n(24687),i=n(52493);n(44046);const __=a.__;function l({articleReadTime:e=5,image:t,jobTitle:n,name:l,profileImage:c,description:u,media:d,title:p,url:m}){const h=!!d?.length;return(0,r.jsx)("div",{className:"linkedin-preview__wrapper",children:(0,r.jsxs)("section",{className:"linkedin-preview__container "+(h?"has-media":""),children:[(0,r.jsxs)("div",{className:"linkedin-preview__header",children:[(0,r.jsx)("div",{className:"linkedin-preview__header--avatar",children:c?(0,r.jsx)("img",{src:c,alt:""}):(0,r.jsx)(i.q,{})}),(0,r.jsxs)("div",{className:"linkedin-preview__header--profile",children:[(0,r.jsxs)("div",{className:"linkedin-preview__header--profile-info",children:[(0,r.jsx)("div",{className:"linkedin-preview__header--profile-name",children:l||__("Account Name","jetpack")}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("div",{className:"linkedin-preview__header--profile-actor",children:
2023-09-26 10:24:36 +02:00
// translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc.
2023-12-07 09:44:11 +01:00
__("1st","jetpack")})]}),n?(0,r.jsx)("div",{className:"linkedin-preview__header--profile-title",children:n}):null,(0,r.jsxs)("div",{className:"linkedin-preview__header--profile-meta",children:[(0,r.jsx)("span",{children:
2023-09-26 10:24:36 +02:00
// translators: refers to the time since the post was published, e.g. "1h"
2023-12-07 09:44:11 +01:00
__("1h","jetpack")}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",focusable:"false",children:(0,r.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,r.jsxs)("div",{className:"linkedin-preview__content",children:[u?(0,r.jsx)("div",{className:"linkedin-preview__caption",children:(0,s.u_)(u,{platform:"linkedin",maxChars:o.A,maxLines:o.P})}):null,h?(0,r.jsx)("div",{className:"linkedin-preview__media",children:d.map(((e,t)=>(0,r.jsx)("div",{className:"linkedin-preview__media-item",children:e.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,children:(0,r.jsx)("source",{src:e.url,type:e.type})}):(0,r.jsx)("img",{alt:e.alt||"",src:e.url})},`linkedin-preview__media-item-${t}`)))}):(0,r.jsxs)("article",{children:[t?(0,r.jsx)("img",{className:"linkedin-preview__image",src:t,alt:""}):null,m?(0,r.jsxs)("div",{className:"linkedin-preview__description",children:[(0,r.jsx)("h2",{className:"linkedin-preview__description--title",children:p}),(0,r.jsxs)("div",{className:"linkedin-preview__description--meta",children:[(0,r.jsx)("span",{className:"linkedin-preview__description--url",children:(0,s.wy)(m)}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("span",{children:(0,a.sprintf)(
2023-09-26 10:24:36 +02:00
// translators: %d is the number of minutes it takes to read the article
2023-12-07 09:44:11 +01:00
__("%d min read","jetpack"),e)})]})]}):null]})]})]})})}},93453:(e,t,n)=>{"use strict";n.d(t,{S:()=>c});var r=n(30275),a=n(55609),s=n(65736),o=n(10263),i=n(23736),l=n(98170);const __=s.__,c=({headingLevel:e,hideLinkPreview:t,hidePostPreview:n,...s})=>(0,r.jsxs)("div",{className:"social-preview linkedin-preview",children:[!n&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(o.Z,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a social post on LinkedIn
2023-12-07 09:44:11 +01:00
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on LinkedIn:","jetpack")}),(0,r.jsx)(l.w,{...s})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(o.Z,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a link to a LinkedIn post
2023-12-07 09:44:11 +01:00
__("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on LinkedIn.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(i.u,{...s,name:"",profileImage:""})]})]})},64011:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});const r="mastodon.social"},82335:(e,t,n)=>{"use strict";n.d(t,{Eu:()=>i,WV:()=>l,eP:()=>c,tZ:()=>o});var r=n(21987),a=n(64011);const s=/^@([^@]*)@([^@]*)$/i,o=e=>(0,r.SL)((0,r.hs)(200),(0,r.KB)(200))((0,r.ju)(e))||"",i=(e,t)=>{const{instance:n,offset:a}=t;return(0,r.u_)(e,{platform:"mastodon",maxChars:470-a,hashtagDomain:n})},l=e=>(0,r.SL)((0,r.hs)(30),(0,r.KB)(30))((0,r.ju)(e))||"",c=e=>{const t=e.match(s);return{username:t?.[1]||"",instance:t?.[2]||a.q}}},16534:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var r=n(30275),a=n(93397),s=n(3440),o=n(37951),i=n(52664);n(46154);const l=e=>{const{user:t}=e;return(0,r.jsxs)("div",{className:"mastodon-preview__post",children:[(0,r.jsx)(i.Z,{user:t}),(0,r.jsx)(s.Z,{...e}),(0,r.jsx)(o.Z,{...e}),(0,r.jsx)(a.Z,{})]})}},67686:(e,t,n)=>{"use strict";n.d(t,{h:()=>l});var r=n(30275),a=n(65736),s=n(93397),o=n(3440),i=n(52664);n(46154);const __=a.__,l=e=>{const{user:t,customImage:n,image:a}=e,l=n||a;return(0,r.jsxs)("div",{className:"mastodon-preview__post",children:[(0,r.jsx)(i.Z,{user:t}),(0,r.jsx)(o.Z,{...e,children:l&&(0,r.jsx)("img",{className:"mastodon-preview__img",src:l,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,r.jsx)(s.Z,{})]})}},93397:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30275),a=n(65736),s=n(34525);n(7679);const __=a.__,o=()=>(0,r.jsx)("div",{className:"mastodon-preview__post-actions",children:(0,r.jsx)("ul",{children:[{icon:"reply",
2023-09-26 10:24:36 +02:00
// translators: "Reply" action on a Mastodon post
label:__("Reply","jetpack"),text:0},{icon:"boost",
// translators: "Boost" action on a Mastodon post
label:__("Boost","jetpack")},{icon:"like",
// translators: "Favourite" action on a Mastodon post
label:__("Favourite","jetpack")},{icon:"bookmark",
// translators: "Bookmark" action on a Mastodon post
label:__("Bookmark","jetpack")},{icon:"more",
// translators: "More" menu on a Mastodon post
2023-12-07 09:44:11 +01:00
label:__("More","jetpack")}].map((({icon:e,label:t,text:n})=>(0,r.jsxs)("li",{"aria-label":t,children:[(0,r.jsx)("span",{className:"mastodon-preview__post-icon-wrapper",children:(0,r.jsx)(s.Z,{name:e})}),("number"==typeof n||n)&&(0,r.jsx)("span",{className:"mastodon-preview__post-icon-text",children:n})]},e)))})})},3440:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30275),a=n(21987),s=n(82335);n(15184);const o=e=>{const{title:t,description:n,customText:o,url:i,user:l,children:c}=e,u={instance:l?.address?(0,s.eP)(l.address).instance:"",offset:0};let d;if(o)d=(0,r.jsx)("p",{children:(0,s.Eu)(o,u)});else if(n){const e=(0,a.ju)(t);u.offset=e.length,d=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:e}),(0,r.jsx)("p",{children:(0,s.Eu)(n,u)})]})}else d=(0,r.jsx)("p",{children:(0,s.Eu)(t,u)});return(0,r.jsxs)("div",{className:"mastodon-preview__body",children:[d,(0,r.jsx)("a",{href:i,target:"_blank",rel:"noreferrer noopener",children:(0,s.WV)(i.replace(/^https?:\/\//,""))}),c]})}},37951:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(30275),a=n(65736),s=n(21987),o=n(82335);n(9170);const __=a.__,i=({siteName:e,title:t,url:n,image:a,customImage:i})=>(0,r.jsxs)("div",{className:"mastodon-preview__card",children:[(0,r.jsx)("div",{className:"mastodon-preview__card-img",children:(a||i)&&(0,r.jsx)("img",{src:a||i,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,r.jsxs)("div",{className:"mastodon-preview__card-text",children:[(0,r.jsx)("span",{className:"mastodon-preview__card-title",children:(0,o.tZ)(t)}),(0,r.jsx)("span",{className:"mastodon-preview__card-site",children:e||(0,s.wy)(n)})]})]})},52664:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(30275),a=n(65736),s=n(64011),o=n(34525);n(32295);const __=a.__,i=({user:e})=>{const{displayName:t,address:n,avatarUrl:a}=e||{};return(0,r.jsxs)("div",{className:"mastodon-preview__post-header",children:[(0,r.jsxs)("div",{className:"mastodon-preview__post-header-user",children:[a&&(0,r.jsx)("img",{className:"mastodon-preview__post-avatar",src:a,alt:""}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mastodon-preview__post-header-displayname",children:t||
2023-09-26 10:24:36 +02:00
// translators: username of a fictional Mastodon User
2023-12-07 09:44:11 +01:00
__("anonymous-user","jetpack")}),(0,r.jsx)("div",{className:"mastodon-preview__post-header-username",children:n?.replace(`@${s.q}`,"")})]})]}),(0,r.jsxs)("div",{className:"mastodon-preview__post-header-audience",children:[(0,r.jsx)(o.Z,{name:"globe"}),
2023-09-26 10:24:36 +02:00
// translators: time elapsed since post was published (1 hour)
2023-12-07 09:44:11 +01:00
__("1h","jetpack")]})]})}},34525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(30275);n(61154);const a=({name:e})=>(0,r.jsx)("i",{className:`mastodon-preview__post-icon mastodon-preview__post-icon-${e}`})},60312:(e,t,n)=>{"use strict";n.d(t,{I:()=>c});var r=n(30275),a=n(55609),s=n(65736),o=n(10263),i=n(16534),l=n(67686);const __=s.__,c=({headingLevel:e,hidePostPreview:t,hideLinkPreview:n,...s})=>(0,r.jsxs)("div",{className:"social-preview mastodon-preview",children:[!t&&(0,r.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,r.jsx)(o.O,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a social post on Mastodon
2023-12-07 09:44:11 +01:00
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Mastodon:","jetpack")}),(0,r.jsx)(l.h,{...s})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,r.jsx)(o.O,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a link to a Mastodon post
2023-12-07 09:44:11 +01:00
__("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Mastodon.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(i.W,{...s,user:void 0})]})]})},41678:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,P:()=>a});const r=160,a=2},38664:(e,t,n)=>{"use strict";n.d(t,{p:()=>l});var r=n(30275),a=n(65736),s=n(45551),o=n(7254),i=n(5812);const __=a.__;function l(){return(0,r.jsxs)("div",{className:"nextdoor-preview__footer--actions",children:[(0,r.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,r.jsx)(o.l,{}),(0,r.jsx)("span",{children:__("Like","jetpack")})]}),(0,r.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,r.jsx)(s.q,{}),(0,r.jsx)("span",{children:__("Comment","jetpack")})]}),(0,r.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,r.jsx)(i.a,{}),(0,r.jsx)("span",{children:__("Share","jetpack")})]})]})}},98248:(e,t,n)=>{"use strict";n.d(t,{D:()=>a});var r=n(30275);function a(){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"})})}},45551:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(30275);function a(){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"})})}},63209:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(30275);const a=()=>(0,r.jsx)("div",{className:"nextdoor-preview__default-avatar",children:"A"})},75742:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a});var r=n(30275);function a(){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"})]})})}},91127:(e,t,n)=>{"use strict";n.d(t,{n:()=>a});var r=n(30275);function a(){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.7
// translators: refers to a social post on Nextdoor
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Nextdoor:","jetpack")}),(0,r.jsx)(l.M,{...s})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section nextdoor-preview__section",children:[(0,r.jsx)(o.Z,{level:e,children:
// translators: refers to a link to a Nextdoor post
__("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Nextdoor.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(i.t,{...s,name:"",profileImage:""})]})]})},10263:(e,t,n)=>{"use strict";n.d(t,{O:()=>s,Z:()=>o});var r=n(30275);const a=[2,3,4,5,6],s=({className:e,level:t,children:n})=>{const s=`h${t&&a.includes(t)?t:3}`;return(0,r.jsx)(s,{className:`social-preview__section-heading ${e??""}`,children:n})},o=s},80748:(e,t,n)=>{"use strict";n.d(t,{G:()=>s,M:()=>a});var r=n(21987);const a=e=>(0,r.SL)((0,r.hs)(1e3),(0,r.KB)(1e3))((0,r.ju)(e))||"",s=e=>(0,r.SL)((0,r.hs)(400),(0,r.KB)(400))((0,r.ju)(e))||""},96492:(e,t,n)=>{"use strict";n.d(t,{H:()=>c});var r=n(30275),a=n(65736),s=n(21987),o=n(80748),i=n(91100),l=n(5536);n(5609);const __=a.__,c=({title:e,description:t,image:n,user:a,url:c})=>{const u=a?.avatarUrl;return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[u&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:u,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(l.Z,{user:a}),(0,r.jsxs)("div",{className:"tumblr-preview__window",children:[n&&(0,r.jsxs)("div",{className:"tumblr-preview__window-top",children:[(0,r.jsx)("div",{className:"tumblr-preview__overlay",children:(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,o.M)(e)})}),(0,r.jsx)("img",{className:"tumblr-preview__image",src:n,alt:__("Tumblr preview thumbnail","jetpack")})]}),(0,r.jsxs)("div",{className:"tumblr-preview__window-bottom "+(n?"":"is-full"),children:[!n&&(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,o.M)(e)}),t&&n&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,o.G)(t)}),c&&(0,r.jsx)("div",{className:"tumblr-preview__site-name",children:(0,s.wy)(c)})]})]}),(0,r.jsx)(i.Z,{})]})]})}},97450:(e,t,n)=>{"use strict";n.d(t,{x:()=>l});var r=n(30275),a=n(65736),s=n(80748),o=n(91100),i=n(5536);n(5609);const __=a.__,l=({title:e,description:t,image:n,user:a,url:l,customText:c,media:u})=>{const d=a?.avatarUrl,p=u?.[0];return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[d&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:d,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(i.Z,{user:a}),(0,r.jsxs)("div",{className:"tumblr-preview__body",children:[(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,s.M)(e)}),c&&(0,r.jsx)("div",{className:"tumblr-preview__custom-text",children:c}),t&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,s.G)(t)}),p?(0,r.jsx)("div",{className:"tumblr-preview__media-item",children:p.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,className:"tumblr-preview__media--video",children:(0,r.jsx)("source",{src:p.url,type:p.type})}):(0,r.jsx)("img",{className:"tumblr-preview__image",src:n,alt:""})}):n&&(0,r.jsx)("img",{className:"tumblr-preview__image",src:n,alt:__("Tumblr preview thumbnail","jetpack")}),(0,r.jsx)("a",{className:"tumblr-preview__url",href:l,target:"_blank",rel:"noreferrer",children:__("View On WordPress","jetpack")})]}),(0,r.jsx)(o.Z,{})]})]})}},91100:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30275),a=n(65736),s=n(22313);n(91680);const __=a.__,o=()=>(0,r.jsxs)("div",{className:"tumblr-preview__post-actions",children:[(0,r.jsxs)("div",{className:"tumblr-preview__post-manage-actions",children:[(0,r.jsxs)("div",{className:"tumblr-preview__post-actions-blaze",children:[(0,r.jsx)(s.Z,{name:"blaze"})," Blaze"]}),(0,r.jsx)("ul",{children:[{icon:"delete",
2023-09-26 10:24:36 +02:00
// translators: "Delete" action on a Tumblr post
label:__("Delete","jetpack")},{icon:"edit",
// translators: "Edit" action on a Tumblr post
2023-12-07 09:44:11 +01:00
label:__("Edit","jetpack")}].map((({icon:e,label:t})=>(0,r.jsx)("li",{"aria-label":t,children:(0,r.jsx)(s.Z,{name:e})},e)))})]}),(0,r.jsxs)("div",{className:"tumblr-preview__post-social-actions",children:[(0,r.jsx)("div",{children:
2023-09-26 10:24:36 +02:00
// translators: count of notes on a Tumblr post
__("0 notes","jetpack")}),(0,r.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
2023-12-07 09:44:11 +01:00
label:__("Like","jetpack")}].map((({icon:e,label:t})=>(0,r.jsx)("li",{"aria-label":t,children:(0,r.jsx)(s.Z,{name:e})},e)))})]})]})},5536:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(30275),a=n(65736),s=n(22313);n(49304);const __=a.__,o=({user:e})=>(0,r.jsxs)("div",{className:"tumblr-preview__post-header",children:[(0,r.jsx)("div",{className:"tumblr-preview__post-header-username",children:e?.displayName||
2023-09-26 10:24:36 +02:00
// translators: username of a fictional Tumblr User
2023-12-07 09:44:11 +01:00
__("anonymous-user","jetpack")}),(0,r.jsx)(s.Z,{name:"ellipsis"})]})},22313:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(30275);n(27212);const a=({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
2023-09-26 10:24:36 +02:00
// translators: refers to a social post on Tumblr
2023-12-07 09:44:11 +01:00
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Tumblr:","jetpack")}),(0,r.jsx)(l.x,{...s})]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,r.jsx)(o.O,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a link on Tumblr
2023-12-07 09:44:11 +01:00
__("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on Tumblr.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(i.H,{...s,user:void 0})]})]})},5894:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(30275),a=n(65235),s=n.n(a),o=n(21987);const i=(0,o.SL)((0,o.hs)(200),(0,o.KB)(200)),l=({description:e,image:t,title:n,cardType:a,url:l})=>{const c=s()(`twitter-preview__card-${a}`,{"twitter-preview__card-has-image":!!t});return(0,r.jsx)("div",{className:"twitter-preview__card",children:(0,r.jsxs)("div",{className:c,children:[t&&(0,r.jsx)("img",{className:"twitter-preview__card-image",src:t,alt:""}),(0,r.jsxs)("div",{className:"twitter-preview__card-body",children:[(0,r.jsx)("div",{className:"twitter-preview__card-url",children:(0,o.wy)(l||"")}),(0,r.jsx)("div",{className:"twitter-preview__card-title",children:n}),(0,r.jsx)("div",{className:"twitter-preview__card-description",children:i((0,o.ju)(e))})]})]})})}},66370:(e,t,n)=>{"use strict";n.d(t,{$:()=>a});var r=n(30275);const a=()=>(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"})})})]})},78678:(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var r=n(30275),a=n(65736),s=n(21987);const __=a.__,o=({name:e,screenName:t,date:n})=>(0,r.jsxs)("div",{className:"twitter-preview__header",children:[(0,r.jsx)("span",{className:"twitter-preview__name",children:e||__("Account Name","jetpack")}),(0,r.jsx)("span",{className:"twitter-preview__screen-name",children:t||"@account"}),(0,r.jsx)("span",{children:"·"}),(0,r.jsx)("span",{className:"twitter-preview__date",children:(0,s.YW)(n||Date.now())})]})},42029:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r=n(30275);const a=()=>(0,r.jsxs)("svg",{version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"271pt",height:"270pt
2023-09-26 10:24:36 +02:00
// translators: refers to a social post on Twitter
2023-12-07 09:44:11 +01:00
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on X:","jetpack")}),s.map(((e,t)=>{const n=t+1===s.length;return(0,r.jsx)(l.g,{...e,showThreadConnector:!n},`twitter-preview__tweet-${t}`)}))]}),!t&&(0,r.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,r.jsx)(o.Z,{level:e,children:
2023-09-26 10:24:36 +02:00
// translators: refers to a link to a Twitter post
2023-12-07 09:44:11 +01:00
__("Link preview","jetpack")}),(0,r.jsxs)("p",{className:"social-preview__section-desc",children:[__("This is what it will look like when someone shares the link to your WordPress post on X.","jetpack")," ",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(i.m,{...s[0],name:"",profileImage:"",screenName:""})]})]}):null},15850:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var r=n(30275),a=n(55609);const s=({tweet:e})=>e?(0,r.jsxs)("div",{className:"twitter-preview__quote-tweet",children:[(0,r.jsx)(a.SandBox,{html:`<blockquote class="twitter-tweet" data-conversation="none" data-dnt="true"><a href="${e}"></a></blockquote>`,scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet"}),(0,r.jsx)("div",{className:"twitter-preview__quote-tweet-overlay"})]}):null},94615:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});var r=n(30275),a=n(65736),s=n(42029);const __=a.__,o=({profileImage:e,showThreadConnector:t})=>(0,r.jsxs)("div",{className:"twitter-preview__sidebar",children:[(0,r.jsx)("div",{className:"twitter-preview__profile-image",children:e?(0,r.jsx)("img",{alt:__("Twitter profile image","jetpack"),src:e}):(0,r.jsx)(s.q,{})}),t&&(0,r.jsx)("div",{className:"twitter-preview__connector"})]})},98969:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var r=n(30275),a=n(21987);const s=({text:e,url:t,retainUrl:n})=>{if(!e)return null;const s=t&&!n&&e.endsWith(t)?e.substring(0,e.lastIndexOf(t)):e;return(0,r.jsx)("div",{className:"twitter-preview__text",children:(0,a.u_)(s,{platform:"twitter"})})}},51128:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(a=r))})),t.splice(a,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(62942)(t);cons