_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.",P,"jetpack"),P),{upgradeLink:React.createElement("a",{className:C.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:C.Z["more-link"],href:(0,r.Z)("jetpack-social-block-editor-more-info",{site:(0,a.lQ)(),...I?{query:"redirect_to="+encodeURIComponent(I)}:{}}),target:"_blank",rel:"noopener noreferrer",onClick:ne},__("More about Jetpack Social.","jetpack"))))),React.createElement(React.Fragment,null,X.length>0&&React.createElement(E.Z,{type:"error"},(0,s.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.",X.length,"jetpack"),{fixLink:React.createElement(o.ExternalLink,{href:R})})),Y.length>0&&React.createElement(E.Z,{type:"error"},(0,s.createInterpolateElement)(__("Twitter is not supported anymore. <moreInfo>Learn more here</moreInfo>.","jetpack"),{moreInfo:React.createElement(o.ExternalLink,{href:R})})),pe&&he&&le&&V(G.autoConversion)&&React.createElement(E.Z,{type:"warning",actions:[React.createElement(o.Button,{onClick:ae,key:"dismiss",variant:"primary"},__("Got it","jetpack")),React.createElement(o.Button,{className:C.Z["change-settings-button"],key:"change-settings",href:I||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(E.Z,{type:"warning"},__("To share to Instagram, add an image/video, or enable Social Image Generator.","jetpack"),React.createElement("br",null),React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):React.createElement(E.Z,{type:"warning"},__("You need a featured image to share to Instagram.","jetpack"),React.createElement("br",null),React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Learn more","jetpack"))):pe?null:React.createElement(E.Z,{type:"warning"},React.createElement("p",null,me.length===M.length?_n("The selected media cannot be shared to this platform.","The selected media cannot be shared to any of these platforms.",M.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(o.ExternalLink,{href:(0,r.Z)("jetpack-social-media-support-information")},__("Troubleshooting tips","jetpack"))))),!n&&React.createElement(s.Fragment,null,q&&React.createElement(E.Z,{onDismiss:W,type:"highlight",actions:[React.createElement(o.Button,{key:"connect",href:R,target:"_blank",rel:"noreferrer noopener",variant:"primary"},__("Connect now","jetpack")),React.createElement(o.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")),t&&M.some((e=>e.enabled))&&React.createElement(React.Fragment,null,React.createElement(w.Z,{maxLength:O,onChange:z,message:F})),L&&V(G.advancedUpgradeEditor)&&React.createElement(E.Z,{onDismiss:re,type:"highlight"},(0,s.createInterpolateElement)(__("Need more reach? Unlock custom media sharing with the <upgradeLink>Advanced Plan</upgradeLink>","jetpack"),{upgradeLink:React.createElement(o.ExternalLink,{href:(0,r.Z)("jetpack-social-advanced-site-checkout",{site:(0,a.lQ)(),query:"redirect_to="+encodeURIComponent(window.location.href)})})})),N&&Re
_n("%d character remaining","%d characters remaining",s,"jetpack"),s)})}},62578:function(e,t,n){"use strict";varr=n(55609),a=n(65736),o=n(61074),i=n(6163),s=n(65235),c=n.n(s),l=n(25162),u=n.n(l),d=n(82283);const__=a.__,p=e=>{let{children:t,type:n="default",actions:a=[],onDismiss:s}=e;constl=c()(d.Z.notice,d.Z[`notice--${n}`]);returnReact.createElement("div",{className:l},React.createElement("div",{className:d.Z.content}," ",t," "),s&&React.createElement("button",{className:d.Z.dismiss,onClick:s},React.createElement(r.VisuallyHidden,null,__("Dismiss notice","jetpack")),React.createElement(o.Z,{icon:i.Z})),a&&a.length>0&&React.createElement("div",{className:d.Z.actions},a.map((e=>e))))};p.propTypes={children:u().node.isRequired,type:u().oneOf(["default","highlight","warning","error"]),actions:u().arrayOf(u().element),onDismiss:u().func},t.Z=p},8714:function(e,t,n){"use strict";varr=n(55609),a=n(9818),o=n(12238),i=n(69307),s=n(65736),c=n(14085),l=n(86419),u=n(37568),d=n(49021),p=n(95788),m=n(91474),h=n(63609);const__=s.__;t.Z=e=>{let{prePublish:t,enableTweetStorm:n,children:s}=e;const{refresh:g,hasConnections:f,hasEnabledConnections:b}=(0,u.Z)(),v=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]),{isPublicizeEnabled:k,hidePublicizeFeature:y,isPublicizeDisabledBySitePlan:w,togglePublicizeFeature:E,isShareLimitEnabled:_,numberOfSharesRemaining:C,hasPaidPlan:j,connectionsAdminUrl:S,adminUrl:x,isEnhancedPublishingEnabled:P,isSocialImageGeneratorAvailable:N,shouldShowAdvancedPlanNudge:L,jetpackSharingSettingsUrl:T}=(0,c.Z)();(0,l.M1)((function(){b&&g()}),[b,g]);constA=t?i.Fragment:r.PanelBody,R=t?{}:{title:__("Share this post","jetpack")};returnReact.createElement(A,R,s,!y&&React.createElement(i.Fragment,null,!v&&React.createElement(r.ToggleControl,{label:k?__("Share when publishing","jetpack"):__("Sharing is disabled","jetpack",0),onChange:E,checked:k,disabled:!f}),React.createElement(d.Z,null),React.createElement(p.Z,{isPublicizeEnabled:k,isPublicizeDisabledBySitePlan:w,connectionsAdminUrl:S,numberOfSharesRemaining:_&&!j?C:null,isEnhancedPublishingEnabled:P,isSocialImageGeneratorAvailable:N,adminUrl:x,shouldShowAdvancedPlanNudge:L,jetpackSharingSettingsUrl:T}),n&&k&&React.createElement(h.Z,{prePublish:t}),React.createElement(m.o,null)))}},52403:function(e,t,n){"use strict";varr=n(6895),a=n(13419),o=n(86989),i=n.n(o),s=n(72067),c=n(69307),l=n(14085),u=n(86419),d=n(37568),p=n(19649);t.Z=()=>{const[e,t]=(0,c.useState)((0,a.Pb)()?.social?.reviewRequestDismissed??!0),[n,o]=(0,c.useState)(!1),{hasEnabledConnections:m}=(0,d.Z)(),{isPublicizeEnabled:h,isPostAlreadyShared:g}=(0,l.Z)();(0,u.e3)((()=>{o(!g&&h&&m)}),[g,m,h]);constf=(0,c.useCallback)((()=>{conste=(0,a.Pb)()?.social?.dismissReviewRequestPath??null;i()({path:e,method:"POST",data:{dismissed:!0}}).catch((e=>{throwe})),t(!0)}),[]);returne||!n?null:React.createElement(s.PluginPostPublishPanel,{id:"publicize-title"},React.createElement(p.Z,{href:(0,r.Z)("jetpack-social-plugin-reviews"),onClose:f}))}},19649:function(e,t,n){"use strict";varr=n(88275),a=n(90526),o=n(13419),i=n(65736),s=n(99196),c=n(2097);const__=i.__;t.Z=e=>{let{href:t,onClose:n}=e;const{recordEvent:l}=(0,o.z$)({pageViewEventName:"social_plugin_review_prompt",pageViewNamespace:"jetpack",pageViewSuffix:"view"}),u=(0,s.useCallback)((()=>{l("jetpack_social_plugin_review_prompt_new_review_click")}),[l]),d=(0,s.useCallback)((()=>{l("jetpack_social_plugin_review_prompt_dismiss_click"),n()}),[l,n]);returnReact.createElement(r.ZP,null,React.createElement("div",{className:c.Z.prompt},React.createElement("h2",{className:c.Z.header},/* translators: %s is the celebration emoji */
(0,i.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:c.Z.buttons},React.createElement(a.Z,{onClick:u,isExternalLink:!0,href:t,className:c.Z.button},__("Leave a Review","jetpack")),React.createElement(a.Z,{onClick:d,variant:"link",className:c.Z.button},__("Dismiss","jetpack")))))}},69709:function(e,t,n){"use strict";n.d(t,{Z:function(){returnu}});varr=n(65736),a=n(92819),o=n(90105),i=n(14085),s=n(37568),c=n(78619);const__=r.__,l=2e3;functionu(){const{refresh:e}=(0,s.Z)(),t=(0,a.debounce)((function(t){t&&e()}),l),{connectionsAdminUrl:n}=(0,i.Z)();returnReact.createElement(o.Z,{onChange:t},React.createElement("a",{className:c.Z["settings-link"],href:n,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"}))))}},91474:function(e,t,n){"use strict";n.d(t,{o:function(){returnh}});varr=n(55609),a=n(9818),o=n(12238),i=n(69307),s=n(65736),c=n(53961),l=n(14085),u=n(45579),d=n(37568);const__=s.__;functionp(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:__("Unable to share the Post","jetpack");const{createErrorNotice:t}=(0,a.dispatch)(c.store);t(e,{id:"publicize-post-share-message"})}functionm(){const{hasEnabledConnections:e}=(0,d.Z)(),{isPublicizeEnabled:t}=(0,l.Z)(),{isFetching:n,isError:s,isSuccess:m,doPublicize:h}=(0,u.Z)(),g=(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[]);(0,i.useEffect)((()=>{if(!n)returns?p():void(m&&function(){const{createSuccessNotice:e}=(0,a.dispatch)(c.store);e(__("Post shared","jetpack"),{id:"publicize-post-share-message",type:"snackbar"})}())}),[n,s,m]);constf=!t||!e||!g||n,b=(0,i.useCallback)((()=>{if(!g)returnp(__("You must publish your post before you can share it.","jetpack"));(0,a.dispatch)(c.store).removeNotice("publicize-post-share-message"),h()}),[h,g]);returnReact.createElement(r.Button,{variant:"secondary",onClick:b,disabled:f,isBusy:n},__("Share post","jetpack"))}functionh(){const{isRePublicizeUpgradableViaUpsell:e}=(0,l.Z)();return(0,a.useSelect)((e=>e(o.store).isCurrentPostPublished()),[])?e?null:React.createElement(r.PanelRow,null,React.createElement(m,null)):null}},54005:function(e,t,n){"use strict";varr=n(55609),a=n(69307),o=n(65736),i=n(75263),s=n(9888),c=n(81469);const__=o.__;t.Z=e=>{let{prePublish:t=!1}=e;constn=t?a.Fragment:r.PanelBody,o=t?{}:{title:__("Social Image Generator","jetpack")},{isEnabled:l,setIsEnabled:u}=(0,i.Z)(),[d,p]=(0,a.useState)(!1),m=(0,a.useCallback)((()=>p(!0)),[]),h=(0,a.useCallback)((()=>p(!1)),[]);returnReact.createElement(n,o,d&&React.createElement(c.Z,{onClose:h}),React.createElement(r.ToggleControl,{label:__("Enable Social Image","jetpack"),help:l?"":__("Social Image is disabled for this post.","jetpack"),checked:l,onChange:u}),l&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(s.ZP,{shouldDebounce:!1}),React.createElement("hr",null),React.createElement(r.Button,{variant:"secondary",onClick:m,label:__("Open the Social Image Generator settings","jetpack")},__("Settings","jetpack"))))}},81469:function(e,t,n){"use strict";varr=n(88275),a=n(55609),o=n(69307),i=n(65736),s=n(75263),c=n(98811),l=n(9888),u=n(88649),d=n(39356),p=n(40088);const__=i.__,m=["image/jpeg","image/png"],h=__("Choose Image","jetpack");t.Z=e=>{let{onClose:t}=e;cons
(0,a.sprintf)(__("Pick the %s template","jetpack"),e.label))))))}},57227:function(e,t,n){"use strict";varr=n(30253),a=n(91948),o=n(5353);consti=[{name:"highway",label:"Highway",image:n(27956)},{name:"dois",label:"Dois",image:r},{name:"edge",label:"Edge",image:a},{name:"fullscreen",label:"Fullscreen",image:o}];t.Z=i},76848:function(e,t,n){"use strict";n(9818),n(69307),n(99196),n(23177)},53513:function(e,t,n){"use strict";n.d(t,{Z:function(){returnd}});varr=n(88275),a=n(55609),o=n(69307),i=n(65736),s=n(88219),c=n(89696);const__=i.__,l=__("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");functiond(e){let{disabled:t=!1}=e;const{shouldUploadAttachedMedia:n,updateShouldUploadAttachedMedia:i}=(0,s.Z)(),d=(0,o.useCallback)((e=>{i(e)}),[i]),p=t?a.Disabled:o.Fragment,m=t?{className:c.Z.disabled}:{};returnReact.createElement(r.ZP,null,React.createElement(p,m,React.createElement(a.CheckboxControl,{className:c.Z.checkbox,checked:n,onChange:d,label:__("Share as a social post","jetpack"),help:t?l:u})))}},63855:function(e,t,n){"use strict";varr=n(82674),a=n.n(r),o=n(13477),i=n(9818),s=n(37568),c=n(48751);t.Z=(0,i.withSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor");return{excerpt:t("excerpt"),content:t("content").split("\x3c!--more")[0]}}))((e=>{const{connections:t}=(0,s.Z)(),{message:n}=(0,c.Z)(),{title:r,excerpt:i,content:l}=e,u=t?.find((e=>"facebook"===e.service_name));letd;returnu&&(d={displayName:u.display_name,avatarUrl:u.profile_picture}),React.createElement(o.S,a()({},e,{type:"article",user:d,customText:n||i||l||r}))}))},83704:function(e,t,n){"use strict";varr=n(82674),a=n.n(r),o=n(17915),i=n(9818),s=n(22629),c=n(99196),l=n.n(c);t.Z=function(e){constt=(0,i.useSelect)((e=>{const{getEntityRecord:t}=e("core");return(0,s.decodeEntities)(t("root","site").title)}));returnl().createElement(o.X,a()({},e,{siteTitle:t}))}},4124:function(e,t,n){"use strict";n.d(t,{m:function(){returnc}});varr=n(4049),a=n(99196),o=n.n(a),i=n(48751),s=n(34074);functionc(e){const{title:t,image:n,media:a}=e,{name:c,profileImage:l}=(0,s.getInstagramDetails)(),{message:u}=(0,i.Z)(),d=u||t;returno().createElement(r.V,{image:n,media:a,name:c,profileImage:l,caption:d})}},27725:function(e,t,n){"use strict";n.d(t,{y:function(){returnl}});varr=n(93453),a=n(65736),o=n(99196),i=n.n(o),s=n(48751),c=n(34074);const__=a.__;functionl(e){const{title:t,url:n,image:a,media:o}=e,{name:l,profileImage:u}=(0,c.getLinkedInDetails)(),{message:d}=(0,s.Z)(),p=`${d||t}${o.length?n:""}`.trim();returni().createElement(r.S,{jobTitle:__("Job Title (Company Name)","jetpack"),image:a,name:l,profileImage:u,title:t,description:p,url:n,media:o})}},28586:function(e,t,n){"use strict";varr=n(82674),a=n.n(r),o=n(60312),i=n(9818),s=n(22629),c=n(37568),l=n(48751),u=n(34074);t.Z=e=>{const{connections:t}=(0,c.Z)(),{message:n}=(0,l.Z)(),{content:r,siteName:d}=(0,i.useSelect)((e=>{const{getEditedPostAttribute:t}=e("core/editor"),{getSite:n}=e("core");return{content:t("content").split("\x3c!--more")[0],siteName:(0,s.decodeEntities)(n().title)}})),p=(0,u.shouldUploadAttachedMedia)(),m=t?.find((e=>"mastodon"===e.service_name));leth;m&&(h={displayName:m.display_name,avatarUrl:m.profile_picture,address:m.username});constg=e.media?.[0],f=g?.type.startsWith("image/")?g.url:null;returnReact.createElement(o.I,a()({},e,{siteName:d,user:h,description:r,customText:n,customImage:f,isSocialPost:p}))}},8454:function(e,t,n){"use strict";varr=n(55609),a=n(9818),o=n(65736),i=n(39517),s=n(34074),c=n(90785),l=n(81694),u=n(25399);const__=o.__;t.Z=(0,a.withSelect)((e=>{const{getMedia:t}=e("core"),{getEditedPostAttribute:n}=e("core/editor"),{isTweetStorm:r}=e("jetpack/publicize"),a=n("featured_media");leto=a?(0,u.i)(t(a)):"";consti=(0,s.getImageGeneratorPostSettings)(),l=i.enabled?(0,c.t)(i.token):"",d=(0,s.getAttachedMedia)();if(l)o=l;elseif(d?.[0]?.id){const[e]=d;!!e.id&&t(e.id)?.mime_ty
__("Please help me write a short piece of a blog post titled '%1$s'","jetpack"),e):__("Please help me write a short piece of a blog post","jetpack"),t&&(
/** translators: This will be the follow up of a prompt that will be sent to OpenAI based on comma-seperated category names. */
a+=(0,d.sprintf)(__(", published in categories '%1$s'","jetpack"),t)),n&&(
/** translators: This will be the follow up of a prompt that will be sent to OpenAI based on comma-seperated category names. */
a+=(0,d.sprintf)(__(" and tagged '%1$s'","jetpack"),n)),a+=__(". Please only output generated content ready for publishing.","jetpack"),r&&(
/** translators: This will be the end of a prompt that will be sent to OpenAI with the last MAXIMUM_NUMBER_OF_CHARACTERS_SENT_FROM_CONTENT characters of content.*/
a+=(0,d.sprintf)(__(" Please continue from here:\n\n … %s","jetpack"),r)),a.trim()};functionh(e){let{html:t,showAnimation:n,onAnimationDone:a}=e;const[o,i]=(0,u.useState)("");return(0,u.useEffect)((()=>{if(n){conste=t.split(" ");for(lett=1;t<e.length;t++){constn=e.slice(0,t).join(" ");setTimeout((()=>i(n)),50*t)}setTimeout((()=>{i(t),a()}),50*e.length)}elsei(t)}),[]),(0,r.createElement)("div",{className:"content"},(0,r.createElement)(u.RawHTML,null,o))}functiong(e){let{attributes:t,setAttributes:n,clientId:o}=e;const[d,g]=(0,u.useState)(!1),[f,b]=(0,u.useState)(!1),[v,k]=(0,u.useState)(!1),[y,w]=(0,u.useState)(!1),[E,_]=(0,u.useState)(!1),{tracks:C}=(0,a.z$)(),j=(0,l.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));letS=!1;constx=(0,l.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],P=(0,l.useSelect)((e=>x.map((t=>{constn=e("core").getEntityRecord("taxonomy","category",t);if(n)returnn;S=!0})).filter(Boolean)),[x]),N=(0,l.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],L=(0,l.useSelect)((e=>N.map((t=>{constn=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)returnn;S=!0})).filter(Boolean)),[N]);(0,u.useEffect)((()=>{b(S)}),[S]);constT=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId())),A=P.filter((e=>1!==e.id)).map((e=>{let{name:t}=e;returnt})).join(", "),R=L.map((e=>{let{name:t}=e;returnt})).join(", "),I=(0,l.useSelect)((e=>{constt=e("core/block-editor"),n=t.getBlockIndex(o);returnt.getBlocks().slice(0,n)??[]})),M=()=>{if(t.content||d)return;w(!1),_(!1),k(!1),g(!0);conste={content:m(j,I,A,R)};C.recordEvent("jetpack_ai_chat_completion",{post_id:T}),i()({path:"/wpcom/v2/jetpack-ai/completions",method:"POST",data:e}).then((e=>{constt=e.trim().replaceAll("\n","<br/>");n({content:t}),g(!1)})).catch((e=>{e.message?_(e.message):_(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),w(!0),g(!1)}))},Z=d||f,B=!!t.content,D=B||Z;return(0,l.useSelect)((()=>{if(!D){conste=m(j,I,A,R);(()=>{conste=p.name;returnI.filter((t=>t.name&&t.name===e&&!t.attributes.content)).length>0})()?_(/** translators: This will be an error message when multiple Open AI paragraph blocks are triggered on the same page. */
__("Ready to retry","jetpack")),w(!0),k(!1)):v||y||M():(_(/** translators: First placeholder is a number of more characters we need */
__("Please write a longer title or a few more words in the opening preceding the AI block. Our AI model needs some content.","jetpack")),k(!0))}}),[j,I,A,R,D,v,y]),(0,r.createElement)("div",(0,s.useBlockProps)(),!d&&!f&&E&&(0,r.createElement)(c.Placeholder,{label:__("AI Paragraph","jetpack"),instructions:E},y&&(0,r.createElement)(c.Button,{variant:"primary",onClick:()=>M()},__("Retry","jetpack"))),B&&(0,r.createElement)(h,{showAnimation:!t.animationDone,onAnimationDone:()=>{n({animationDone:!0})},html:t.content}),!t.content&&Z&&(0,r.createElement)("div",{style:{padding:"10px",textAlign:"center"}},(0,r.createElement)(c.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})))}},16042:function(e,t,n){"use strict";varr=n(51806),a=n(52175),o=n(4981),i=n(69307),s=n(31985),c=n(59958),l=n(55410);(0,s.S)(c,{edit:l.ZP,save:e=>{constt=a.useBlockProps.save();return(0,r.createElement)(i.RawHTML,t,e.attributes.content)},transforms:{to:[{type:"block",blocks:["core/paragraph"],transform:e=>{let{content:t}=e;return(0,o.createBlock)("core/paragraph",{content:t})}}]}})},14511:function(e,t){"use strict";t.Z={answersLink:{type:"string",source:"attribute",attribute:"href",selector:".jetpack-blogging-prompt__answers-link"},answersLinkText:{type:"string",source:"html",selector:".jetpack-blogging-prompt__answers-link"},gravatars:{type:"array",source:"query",selector:".jetpack-blogging-prompt__answers-gravatar",query:{url:{type:"string",source:"attribute",attribute:"src"}}},promptLabel:{type:"string",source:"html",selector:".jetpack-blogging-prompt__label"},promptText:{type:"string",source:"html",selector:".jetpack-blogging-prompt__text"},promptFetched:{type:"boolean",default:!1},promptId:{type:"number"},showResponses:{type:"boolean",default:!0},showLabel:{type:"boolean",default:!0},tagsAdded:{type:"boolean",default:!1}}},14303:function(e,t,n){"use strict";varr=n(51806),a=n(86989),o=n.n(a),i=n(52175),s=n(55609),c=n(9818),l=n(69307),u=n(65736),d=n(96483),p=n(44266);const__=u.__,_x=u._x;t.Z=(0,s.withNotices)((function(e){let{attributes:t,noticeOperations:n,noticeUI:a,setAttributes:m}=e;consth=(0,l.useRef)(!1),{answersLink:g,answersLinkText:f,gravatars:b,promptFetched:v,promptId:k,promptLabel:y,promptText:w,showLabel:E,showResponses:_,tagsAdded:C}=t,j=(0,i.useBlockProps)({className:"jetpack-blogging-prompt"});(0,p.n)(k,C,(e=>m({tagsAdded:e})));constS=(0,c.useSelect)((e=>{const{getEntityRecord:t,hasFinishedResolution:n}=e("core"),r=t("root","site")?.language||"en_US";returnn("getEntityRecord",["root","site"])?r:null}),[]);(0,l.useEffect)((()=>{if(!S||h.current||v)return;conste=()=>{m({promptFetched:!1,promptId:null,tagsAdded:!1}),h.current=!1,n.removeAllNotices()};lett="/wpcom/v3/blogging-prompts";if(k)t+="/"+encodeURIComponent(k);else{conste=newDate;t+=`?after=--${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}&order=desc`}t=(0,d.addQueryArgs)(t,{_locale:S}),h.current=!0,o()({path:t}).then((e=>{constt=k?e:e[0];m({answersLink:t.answered_link,answersLinkText:t.answered_link_text,gravatars:t.answered_users_sample.map((e=>{let{avatar:t}=e;return{url:t}})),promptFetched:!0,promptLabel:t.label,promptText:t.text,promptId:t.id})})).catch((t=>{m({promptFetched:!0});consta="rest_post_invalid_id"===t.code&&k?(o=k,(0,r.createElement)(r.Fragment,null,(0,u.sprintf)(/* translators: %d is the prompt id. */
__("Prompt with id %d not found.","jetpack"),o)," ",(0,r.createElement)(s.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)(s.Button,{variant:"link",onClick:e},__("Retry","jetpack"))))(t.message);varo;n.removeAllNotices(),n.createErrorNotice(a)}))}),[h,n,v,k,m,S]);constx=e=>{m({showLabel:e})},P=e=>{m({showResponses:e})};return(0,r.createElement)("div",j,a,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:_x("Settings","title of block settings sidebar section","jetpack")},(0,r.createElement)(s.ToggleControl,{label:__("Show daily prompt label","jetpack"),checked:E,onChange:x}),(0,r.createElement)(s.ToggleControl,{label:__("Show other responses","jetpack"),checked:_,onChange:P})))),v?(0,r.createElement)(r.Fragment,null,E&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__label"},y),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},w),_&&k&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},b&&b.slice(0,3).map((e=>{let{url:t}=e;returnt&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar",src:t,key:t})})),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:g,target:"_blank",rel:"external noreferrer noopener"},f))):(0,r.createElement)("div",{className:"jetpack-blogging-prompt__spinner"},(0,r.createElement)(s.Spinner,null)))}))},35681:function(e,t,n){"use strict";varr=n(4981),a=n(9818),o=n(31985),i=n(46185),s=n(50187);(0,o.Z)(s.u2,s.Xd),function(){conste=newURL(document.location.href);if(!e.pathname.endsWith("/wp-admin/post-new.php"))return;constt=e.searchParams.get("answer_prompt")??"0",n=parseInt(t);n&&asyncfunction(e){await(0,i.U)();const{insertBlocks:t}=(0,a.dispatch)("core/block-editor");t([(0,r.createBlock)(`jetpack/${s.u2}`,{promptFetched:!1,promptId:e,tagsAdded:!0}),(0,r.createBlock)("core/paragraph")],0,void0,!1)}(n)}()},50187:function(e,t,n){"use strict";n.d(t,{Xd:function(){returnh},u2:function(){returnm}});varr=n(65736),a=n(70355),o=n(5820),i=n(14511),s=n(14303),c=n(19597),l=n(65783),u=n(43807),d=n(45416),p=n(2275);const__=r.__,_x=r._x,m="blogging-prompt",h={apiVersion:2,title:__("Writing Prompt","jetpack"),description:__("Answer a new and inspiring writing prompt each day.","jetpack"),icon:{src:d.Z,foreground:(0,a.m)()},category:(0,o.Z)("text"),keywords:[_x("writing","block search term","jetpack"),_x("blogging","block search term","jetpack")],supports:{align:!1,alignWide:!1,anchor:!1,className:!0,color:{background:!0,gradients:!0,link:!0,text:!0},customClassName:!0,html:!1,inserter:!0,multiple:!1,reusable:!0,spacing:{margin:["top","bottom"],padding:!0,blockGap:!1}},edit:s.Z,save:p.Z,attributes:i.Z,styles:[{name:"block",label:__("Block","jetpack"),isDefault:!0},{name:"quote",label:__("Quote","jetpack")}],example:{attributes:{answersLink:"https://wordpress.com/tag/dailyprompt",answersLinkText:__("View all responses","jetpack"),gravatars:[{url:c},{url:l},{url:u}],promptLabel:__("Daily writing prompt","jetpack"),promptText:__("What's your favorite place to visit?","jetpack"),promptFetched:!0,promptId:1234,showResponses:!0,showLabel:!0,tagsAdded:!0}}}},2275:function(e,t,n){"use strict";varr=n(51806),a=n(52175);t.Z=function(e){let{attributes:t}=e;const{answersLink:n,answersLinkText:o,gravatars:i,promptId:s,promptLabel:c,promptText:l,showLabel:u,showResponses:d}=t,p=a.useBlockProps.save({className:"jetpack-blogging-prompt"});return(0,r.createElement)("div",p,u&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__label"},c),(0,r.createElement)("div",{className:"jetpack-blogging-prompt__text"},l),d&&s&&(0,r.createElement)("div",{className:"jetpack-blogging-prompt__answers"},i.map((e=>{let{url:t}=e;returnt&&(0,r.createElement)("img",{className:"jetpack-blogging-prompt__answers-gravatar","aria-hidden":"true",src:t,key:t})})),(0,r.createElement)("a",{className:"jetpack-blogging-prompt__answers-link",href:n,target:"_blank",rel:"external noreferrer noopener"},o)))}},44266:function(e,t,n){"use strict";n.d(t,{n:function(){returnl}});varr=n(86989),a=n.n(r),o=n(9818),i=n(69
__("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{constn=[...w];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>l({customAmountText:e})}),(0,r.createElement)(c.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,s.hj)(u),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:v("extraText"),onChange:e=>k("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:v("buttonText"),onChange:e=>{returnt=e,voidl({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...m,buttonText:t}});vart},allowedFormats:E})))}},72833:function(e,t,n){"use strict";varr=n(51806),a=n(69307),o=n(65736),i=n(65235),s=n.n(i),c=n(16367),l=n(82275),u=n(91757);const__=o.__;t.Z=e=>{const{attributes:t,className:n,products:o,setAttributes:i}=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===o["one-time"]&&p.planId===o["1 month"]&&m.planId===o["1 year"]||i({...o["one-time"]&&{oneTimeDonation:{...d,planId:o["one-time"]}},...o["1 month"]&&{monthlyDonation:{...p,planId:o["1 month"]}},...o["1 year"]&&{annualDonation:{...m,planId:o["1 year"]}}})}),[d,p,m,i,o]),(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)(c.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=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:s()("donations__nav-item",{"is-active":f(t)}),onClick:()=>g(t),onKeyDown:()=>g(t),key:`jetpack-donations-nav-item-${t}`},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(u.Z,{activeTab:h,attributes:t,setAttributes:i}))),(0,r.createElement)(l.Z,e))}},2785:function(e,t){"use strict";t.Z={url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},style:{type:"string",default:"inline"}}},6949:function(e,t,n){"use strict";n.d(t,{J:function(){returni}});varr=n(51806),a=n(55609),o=n(65736);const__=o.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},1344:function(e,t,n){"use strict";varr=n(24717);t.Z=[r.Z]},24717:function(e,t,n){"use strict";varr=n(51806),a=n(52175),o=n(4981),i=n(65736),s=n(65235),c=n.n(s),l=n(92819);const_x=i._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={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;letr=n;r||(r=e.useModal?"modal":"inline");consta={...(0,l.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},i=(0,l.pick)(e,u);return[a,[(0,o.createBlock)("jetpack/button",{element:"a",text:i.text||_x("Register",
_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("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"},e))})():null,(0,r.createElement)(a.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(a.RangeControl,{label:__("Number of Columns","jetpack"),value:p,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(a.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:f,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(a.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:g,onChange:()=>u({isStackedOnMobile:!g})})))}},36420:function(e,t,n){"use strict";varr=n(51806),a=n(13419),o=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(92819),p=n(4554),m=n(8979),h=n(696),g=n(64129),f=n(44961),b=n(79236),v=n(2681),k=n(75412);const__=c.__;t.Z=(0,i.withNotices)((e=>{const{attributes:t,className:n,isSelected:c,noticeOperations:l,noticeUI:y,setAttributes:w}=e,{accessToken:E,align:_,columns:C,count:j,isStackedOnMobile:S,spacing:x}=t;(0,s.useEffect)((()=>{conste=(0,p.S)(m.Z,t);(0,d.isEqual)(e,t)||w(e)}),[t,w]);const[P,N]=(0,s.useState)(E),{isRequestingWpcomConnectUrl:L,wpcomConnectUrl:T}=(0,v.Z)(),{images:A,isLoadingGallery:R,setImages:I}=(0,k.Z)({accessToken:E,noticeOperations:l,setAttributes:w,setSelectedAccount:N}),{connectToService:M,disconnectFromService:Z,isConnecting:B,isRequestingUserConnections:D,userConnections:F}=(0,b.Z)({accessToken:E,noticeOperations:l,selectedAccount:P,setAttributes:w,setImages:I,setSelectedAccount:N}),z=(0,a.Dp)(),O=j>A.length?A.length:j,U=!R&&(!E||(0,d.isEmpty)(A)),H=!U,V=E&&R&&(0,d.isEmpty)(A),G=!U&&!V,$=u()(n,{[`align${_}`]:_}),q=u()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${C}`,{"is-stacked-on-mobile":S}),W={gridGap:x,"--latest-instagram-posts-spacing":x?`${x}px`:void0},J={padding:x},K=()=>{P&&h.D!==P?w({accessToken:P,instagramUser:(0,d.find)(F,{token:P}).username}):M()};return(0,r.createElement)("div",{className:$},U&&(0,r.createElement)(i.Placeholder,{icon:"instagram",instructions:z?D||F.length?void0:__("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},z?(()=>{conste=F.length>0,t=[...(0,d.map)(F,(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)(i.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)(i.Button,{disabled:n,variant:"primary",onClick:K},B&&__("Connecting…","jetpack"),D&&__("Loading your connections…","jetpack"),!B&&!D&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(i.Button,{disabled:L||!T,href:T,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),V&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),G&&(0,r.createElement)("div",{className:q,style:W},(0,d.times)(c?j:O,(e=>(0,r.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:J},(e=>{if(A[e]){constn=A[e];return(0,r.createElement)(f.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:x})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMy
_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:o,completer:i}=this.props,{selectedIndex:s,filteredOptions:c}=this.state,{key:l=""}=c[s]||{},{className:p}=i,m=c.length>0,h=m?`components-autocomplete-listbox-${o}`:null,g=m?`components-autocomplete-item-${o}-${l}`: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)(c,((e,t)=>(0,r.createElement)(a.Button,{key:e.key,id:`components-autocomplete-item-${o}-${e.key}`,role:"option","aria-selected":t===s,disabled:e.isDisabled,className:u()("components-autocomplete__result",p,{"is-selected":t===s}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,o.compose)([a.withSpokenMessages,o.withInstanceId,a.withFocusOutside])(m)},90055:function(e,t,n){"use strict";functionr(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:function(){returnr}})},84634:function(e,t,n){"use strict";n.d(t,{YB:function(){returna},b2:function(){returnr},k:function(){returno},xt:function(){returns},zb:function(){returni}});constr=e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0};functiona(e,t){constn=newe.LngLatBounds;returnt.forEach((e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])})),n}functiono(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}functioni(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`}functions(e){returnnewe.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},96442:function(e,t,n){"use strict";n.d(t,{E0:function(){returnd},E_:function(){returns},F7:function(){returnc},eR:function(){returnl},ot:function(){returni},rZ:function(){returnu}});varr=n(85007);consta=6371e3;functiono(e){returnMath.abs(a*Math.cos(e*Math.PI/180)*2*Math.PI/256)}functioni(e,t){return512/Math.pow(2,e)*.5*o(t)}functions(e,t){constn=e/o(t);returnMath.log2(512/(n/.5))}functionc(e,t){if(0===t.length)returnnull;constn=newe.Coordinate(-90,180),r=newe.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)}));consta=newe.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),o=newe.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));returnnewe.CoordinateRegion(a,o)}functionl(e,t){return()=>{constn=e.createElement("div");returnn.classList.add("mapkit-popup-content"),t(n),n}}functionu(e,t){returnnewPromise((n=>{if(t.mapkitScriptIsLoading)(0,r.Dz)(t,"mapkit").then((e=>{n(e)}));else{t.mapkitScriptIsL
`${(0,c.sprintf)(__("Loading: %s","jetpack"),n)}${o}`,"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){constt=window.navigator.userAgent.match(/Trident\/7\./)?"IE11: Playing sounds in webpages setting is not checked":e;this.setState((()=>{thrownewError(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(){conste=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){constt=e=>e?.length?e.map((e=>e.guid)):[],n=t(this.props.tracks),r=newSet(t(e.tracks));n.length===r.size&&n.every((e=>r.has(e)))||this.loadTrack(0)}staticgetDerivedStateFromProps(e,t){returne.tracks.length<=t.currentTrack?{...t,currentTrack:0}:null}render(){const{playerId:e,title:t,link:n,cover:a,tracks:o,attributes:i,currentTime:s,playerState:l}=this.props,{itemsToShow:p,primaryColor:f,customPrimaryColor:b,hexPrimaryColor:v,secondaryColor:k,customSecondaryColor:y,hexSecondaryColor:w,backgroundColor:E,customBackgroundColor:_,hexBackgroundColor:C,showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x}=i,{currentTrack:P}=this.state,N=o.slice(0,p),L=this.getTrack(P),T=(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},R=u()("jetpack-podcast-player",l,T.secondary.classes,T.background.classes);return(0,r.createElement)("section",{className:R,style:A,"aria-labelledby":t||L&&L.title?`${e}__title`:void0,"aria-describedby":L&&L.description?`${e}__track-description`:void0,"data-jetpack-iframe-ignore":!0},(0,r.createElement)(h.Z,{playerId:e,title:t,link:n,cover:a,track:this.getTrack(P),showCoverArt:j,showEpisodeTitle:S,showEpisodeDescription:x,colors:T},(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:l,currentTime:s,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,c.sprintf)(
__("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:l,currentTrack:P,tracks:N,selectTrack:this.selectTrack,colors:T})))}}b.defaultProps={title:"",cover:"",link:"",attributes:{url:null,itemsToShow:5,showCoverArt:!0,showEpisodeTitle:!0,showEpisodeDescription:!0},tracks:[]},t.Z=(0,o.compose)([f.Z,(0,i.withSelect)(((e,t)=>{const{playerId:n}=t,{getMediaSourceCurrentTime:r,getMediaPlayerState:a}=e(p.tT);return{currentTime:r(n),playerState:a(n)}})),(0,i.withDispatch)((e=>{const{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:c,setMediaSourceCurrentTime:l}=e(p.tT);return{registerMediaSource:t,updateMediaSourceData:n,unregisterMediaSource:r,setDefaultMediaSource:a,playMediaSource:o,pauseMediaSource:i,toggleMediaSource:s,errorMediaSource:c,setMediaSourceCurrentTime:l}}))])(b)},46843:function(e,t,n){"use strict";varr=n(51806),a=n(69307),o=n(65736);const__=o.__,i=(0,a.memo)((e=>{let{link:t,title:n,colors:a}=e;return(0,r.createElement)("div",{className:"jetpack-podcast-player__track-error"},__("Episode unavailable. ","jetpack"),t&&(0,r.createElement)("span",{className:a.secondary.classes,style:{color:a.secondary.custom}},(0,r.createElement)("a",{className:"jetpack-podcast-player__link",href:t,rel:"noopener noreferrer nofollow",target:"_blank"},(0,r.createElement)("span",{className:"jetpack-podcast-player--visually-hidden"},`${(0,o.sprintf)(/* translators: %s is the title of the track. This text is visually hidden from the screen, but available to screen readers. */
__("%s:","jetpack"),n)}`),__("Open in a new tab","jetpack"))))}));t.Z=i},96817:function(e,t,n){"use strict";var r=n(51806),a=n(69307),o=n(65736),i=n(69650);const __=o.__,s=(0,a.memo)((e=>{let t,n,{isPlaying:a,isError:o,className:s}=e;o?(n="error",
b=n?__("track","jetpack"):void0;return(0,r.createElement)("li",{className:g,style:Object.keys(f).length?f:null},(0,r.createElement)("a",{className:"jetpack-podcast-player__link jetpack-podcast-player__track-link",href:t.link||t.src,role:"button","aria-current":b,onClick:e=>{e.shiftKey||e.metaKey||e.altKey||(e.preventDefault(),i(d))},onKeyDown:e=>{" "===event.key&&(e.preventDefault(),i(d))}},(0,r.createElement)(u.Z,{className:"jetpack-podcast-player__track-status-icon",isPlaying:a,isError:o}),(0,r.createElement)("span",{className:"jetpack-podcast-player__track-title"},t.title),t.duration&&(0,r.createElement)("time",{className:"jetpack-podcast-player__track-duration",dateTime:t.duration},t.duration)),n&&o&&(0,r.createElement)(l.Z,{link:t.link,title:t.title,colors:p}))}));t.Z=d},71540:function(e,t,n){"use strict";n.d(t,{Z:function(){returni}});varr=n(51806),a=n(69307),o=n(65736);const__=o.__;functioni(e){classtextendsa.Component{state={didError:!1,isIE11AudioIssue:!1};componentDidCatch=(e,t)=>{this.props.onError(e,t)};staticgetDerivedStateFromError=e=>({didError:!0,isIE11AudioIssue:!!e.message.match(/IE11/)});render(){const{didError:t,isIE11AudioIssue:n}=this.state;returnt?(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 browser’s "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)}}returnt.defaultProps={onError:()=>{}},t}},63226:function(e,t,n){"use strict";n.d(t,{b:function(){returna},u:function(){returnr}});constr="podcast-feed",a="embed-block"},16542:function(e,t,n){"use strict";varr=n(96483),a=n(24381);consto={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"}};t.Z={attributes:o,supports:{align:!1,alignWide:!0,anchor:!1,customClassName:!0,className:!0,html:!1,multiple:!0,reusable:!0},save:()=>null}},99800:function(e,t,n){"use strict";varr=n(51806),a=n(13419),o=n(52175),i=n(4981),s=n(55609),c=n(94333),l=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(30723),w=n(71600),E=n(63226),_=n(13331),C=n(93610),j=n(66085);const__=d.__,S=h()("jetpack:podcast-player:edit"),x=(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/";t.Z=(0,c.compose)([(0,l.withDispatch)(((e,t)=>{let{clientId:n,attributes:r}=t;return{replaceWithEmbedBlock(){e("core/block-editor").replaceBlock(n,(0,i.createBlock)("core/embed",{url:r.url}))}}})),(0,o.withColors)("backgroundColor",{primaryColor:"color"},{secondaryColor:"color"}),s.withNotices,c.withInstanceId,f.K])((e=>{let{instanceId:t,className:n,attributes:a,setAttributes:i,noticeOperations:{createErrorNotice:c,removeAllNotices:l},noticeUI:d,primaryColor:m,setPrimaryColor:h,secondaryColor:f,setSecondaryColor:P,fallbackTextColor:N,backgroundColor:L,setBackgroundColor:T,fallbackBackgroundColor:A,isSelected:R,replaceWithEmbedBlock:I}=e;constM=(0,v.S)(y.Z,a),{url:Z,selectedEpisodes:B,itemsToShow:D,sho
_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. */
_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:u()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,r.createElement)(o.Placeholder,{icon:p.qv,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:m,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)(a.InnerBlocks,null)))}}t.Z=(0,i.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(h)},48516:function(e,t,n){"use strict";varr=n(51806),a=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks.Content,null)))}},51100:function(e,t,n){"use strict";n.d(t,{Am:function(){returna},FV:function(){returnr},Kv:function(){returno}});constr="after-visits",a="before-visits",o=3},50323:function(e,t,n){"use strict";varr=n(31985),a=n(30314);(0,r.Z)(a.u2,a.Xd)},30314:function(e,t,n){"use strict";n.d(t,{Xd:function(){returng},qv:function(){returnh},u2:function(){returnm}});varr=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(70355),c=n(36598),l=n(4498),u=n(48516),d=n(51100);const__=i.__,_x=i._x,p={attributes:{criteria:{type:"string",default:d.FV},threshold:{type:"number",default:d.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks.Content,null))}},m="repeat-visitor",h=(0,c.Z)((0,r.createElement)(o.Path,{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),g={attributes:{criteria:{type:"string",default:d.FV},threshold:{type:"number",default:d.Kv}},category:"widgets",description:__("Control block visibility based on how often a visitor has viewed the page.","jetpack"),icon:{src:h,foreground:(0,s.m)()},keywords:[_x("return","block search term","jetpack"),_x("visitors","block search term","jetpack"),_x("visibility","block search term","jetpack")],supports:{align:["wide","full"],html:!1},title:__("Repeat Visitor","jetpack"),edit:l.Z,save:u.Z,example:{attributes:{criteria:d.FV,threshold:d.Kv},innerBlocks:[{name:"core/paragraph",attributes:{content:__("This block will only appear to a visitor who visited the page three or more times.","jetpack")}}]},deprecated:[p]}},26208:function(e,t,n){"use strict";n.d(t,{Z:function(){returno}});varr=n(51806),a=n(52175);functiono(e){let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.InnerBlocks,{template:[["jetpack/whatsapp-button",{}]],allowedBlocks:["jetpack/whatsapp-button"]}))}},23346:function(e,t,n){"use strict";varr=n(31985),a=n(71290),o=n(17458);(0,r.Z)(o.u2,o.Xd,[{name:a.u2,settings:a.Xd}])},17458:function(e,t,n){"use strict";n.d(t,{Xd:function(){returnp},u2:function(){returnd}});varr=n(51806),a=n(52175),o=n(55609),i=n(65736),s=n(70355),c=n(36598),l=n(26208),u=n(1645);const__=i.__,_x=i._x,d="send-a-message",p={title:__("Send A Message","jetpack"),description:__("Letyourvis
__("It's recommended to use less than %d characters in this field.","jetpack"),t);return(0,o.createElement)("div",{className:"jetpack-seo-message-box"},(0,o.createElement)(i.TextareaControl,a()({label:r,help:l,value:n},c)))}},74866:function(e,t,n){"use strict";varr=n(51806),a=n(69307),o=n(65736),i=n(4587),s=n(84638);const__=o.__;classcextendsa.Component{onMessageChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(i.J,{value:e,onChange:this.onMessageChange,label:__("SEO Description","jetpack"),placeholder:__("Write a description…","jetpack"),suggestedLimit:156,rows:4})}}t.Z=(0,s.M)("advanced_seo_description")(c)},86254:function(e,t,n){"use strict";varr=n(13419),a=n(8606);(0,r.o_)(a.u,a.X)},8606:function(e,t,n){"use strict";n.d(t,{X:function(){returnf},u:function(){returng}});varr=n(82674),a=n.n(r),o=n(51806),i=n(13419),s=n(55609),c=n(72067),l=n(69307),u=n(65736),d=n(34613),p=n(74866),m=n(95377),h=n(4773);const__=u.__,g="seo",f={render:()=>{conste={title:__("SEO","jetpack")},t={icon:(0,o.createElement)(i.Pm,null),title:__("SEO","jetpack")};return(0,o.createElement)(l.Fragment,null,(0,o.createElement)(d.Z,null,(0,o.createElement)(s.PanelBody,a()({className:"jetpack-seo-panel"},e),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(h.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(p.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(m.Z,null)))),(0,o.createElement)(c.PluginPrePublishPanel,t,(0,o.createElement)(l.Fragment,null,(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(h.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(p.Z,null)),(0,o.createElement)(s.PanelRow,null,(0,o.createElement)(m.Z,null)))))}}},95377:function(e,t,n){"use strict";varr=n(51806),a=n(55609),o=n(65736),i=(n(99196),n(84638));const__=o.__;t.Z=(0,i.M)("jetpack_seo_noindex")((e=>{let{metaValue:t,updateMetaValue:n}=e;return(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:!!t,onChange:e=>{n(e)}})}))},4773:function(e,t,n){"use strict";varr=n(51806),a=n(69307),o=n(65736),i=(n(99196),n(4587)),s=n(84638);const__=o.__;classcextendsa.Component{onTitleChange=e=>{this.props.updateMetaValue(e)};render(){const{metaValue:e}=this.props;return(0,r.createElement)(i.J,{value:e,onChange:this.onTitleChange,label:__("SEO Title","jetpack"),placeholder:__("Write a title…","jetpack"),suggestedLimit:70,rows:2})}}t.Z=(0,s.M)("jetpack_seo_html_title")(c)},84638:function(e,t,n){"use strict";n.d(t,{M:function(){returni}});varr=n(94333),a=n(9818),o=n(92819);consti=e=>(0,r.compose)([(0,a.withSelect)((t=>({metaValue:(0,o.get)(t("core/editor").getEditedPostAttribute("meta"),[e],"")}))),(0,a.withDispatch)((t=>({updateMetaValue(n){varr;"boolean"!=typeof(r=n)&&("string"!=typeofr||""!==r&&0===r.trim().length)||t("core/editor").editPost({meta:{[e]:n}})}})))])},14406:function(e,t,n){"use strict";varr=n(13419),a=n(44487);(0,r.o_)(a.u,a.X)},44487:function(e,t,n){"use strict";n.d(t,{X:function(){returnp},u:function(){returnd}});varr=n(51806),a=n(55609),o=n(9818),i=n(69307),s=n(65736),c=n(92819),l=n(26788),u=n(34613);const__=s.__,d="shortlinks",p={render:()=>(0,r.createElement)(h,null)};classmextendsi.Component{render(){const{shortlink:e}=this.props;returne?(0,r.createElement)(u.Z,null,(0,r.createElement)(a.PanelBody,{title:__("Shortlink","jetpack"),className:"jetpack-shortlinks__panel",initialOpen:!1},(0,r.createElement)(l.Z,{link:e}))):null}}consth=(0,o.withSelect)((e=>{constt=e("core/editor").getCurrentPost();return{shortlink:(0,c.get)(t,"jetpack_shortlink","")}}))(m)},36825:function(e,t,n){"use strict";n.d(t,{LC:function(){returnr},Rh:function(){returno},a7:function(){returna}});constr="jp_pay_product",a="USD",o=[a,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","
__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{conste=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();returne&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;returnf.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,a.X)(e);returnt&&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 can’t 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 you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)};validateEmail=()=>{const{email:e}=this.props.attributes;returne?m.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: placeholder is an email address. */
__("%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;returne?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re 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:void0}):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)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(i.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)(i.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:o,isSelected:s,setAttributes:c,simplePayment:l}=this.props,{content:u,currency:d,email:m,featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:j}=a,S=C&&(0,h.isEmpty)(l);if(!s&&S)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(v.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&m&&_&&j&&!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:j});constx=S?i.Disabled:"div";return(0,r.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(b.Z,{featuredMediaId:f,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:c}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-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:j}),(0,r.createElement)(g.Z,{id:`${o}-title-error`,isError:!0},n),(0,r.createElement)(i.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)(i.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-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:`${o}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.crea
__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{conste=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();returne&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;returnb.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,a.X)(e);returnt&&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 can’t 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 you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)};validateEmail=()=>{const{email:e}=this.props.attributes;returne?h.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: Placeholder is an email address. */
__("%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;returne?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re 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:void0}):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)(o.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:o,isSelected:s,setAttributes:c,simplePayment:l}=this.props,{content:u,currency:d,email:p,featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,multiple:E,price:_,productId:C,title:j}=a,S=C&&(0,g.isEmpty)(l);if(!s&&S)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(y.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&p&&_&&j&&!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:j});constx=S?i.Disabled:"div";return(0,r.createElement)(x,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(k.Z,{featuredMediaId:h,featuredMediaUrl:b,featuredMediaTitle:v,setAttributes:c}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-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:j}),(0,r.createElement)(f.Z,{id:`${o}-title-error`,isError:!0},n),(0,r.createElement)(i.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)(i.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:d}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-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:`${o}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(i.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,r.createElement)(i.TextControl,{"aria-describedby":`${o}-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>'}elsea+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;returna}},67240:function(e,t,n){"use strict";varr=n(51806),a=n(19486);t.Z=e=>{let{attributes:{align:t,autoplay:n,delay:o,effect:i,images:s},className:c}=e;return(0,r.createElement)(a.Z,{align:t,autoplay:n,className:c,delay:o,effect:i,images:s})}},19486:function(e,t,n){"use strict";varr=n(51806),a=n(11313),o=n(52175),i=n(55609),s=n(69307),c=n(65736),l=n(65235),u=n.n(l),d=n(92819),p=n(6209),m=n(30847),h=n(85575),g=n(17766);const__=c.__;classfextendss.Component{pendingRequestAnimationFrame=null;resizeObserver=null;staticdefaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,s.createRef)(),this.btnNextRef=(0,s.createRef)(),this.btnPrevRef=(0,s.createRef)(),this.paginationRef=(0,s.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:o,onError:i}=this.props;if(t===e.align&&(0,d.isEqual)(o,e.images)||this.swiperInstance&&this.swiperInstance.update(),a!==e.effect||n!==e.autoplay||r!==e.delay||o!==e.images){lett;t=this.swiperIndex?o.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((()=>{i(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=newp.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)returnnull;const{autoplay:e,className:t,delay:n,effect:s,images:c}=this.props;return(0,r.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":s},(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"},c.map((e=>{let{alt:t,caption:n,id:s,url:c}=e;return(0,r.createElement)("li",{className:u()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,a.isBlobURL)(c)&&"is-transient"),key:s||c},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:t,className:`wp-block-jetpack-slideshow_image wp-image-${s}`,"data-id":s,src:c}),(0,a.isBlobURL)(c)&&(0,r.createElement)(i.Spinner,null),n&&(0,r.createElement)(o.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:n})))}))),(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"!=typeofwindow&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(()=>{vare=this;returnfunction(){lett=arguments.length>0&&void0!==arguments[0]?arguments[0]:0;return(0,m.Z)(e.slideshowRef.current,{autoplay:!(!e.props.autoplay||e.prefersReducedMot
_n("<span>%s reader</span> issubscribed.","<span>%s readers</span> aresubscribed.",T,"jetpack"),(0,a.Z)(T)),{span:(0,r.createElement)("span",{style:{fontWeight:"bold"}})})),_&&(0,r.createElement)(s.__experimentalPanelColorGradientSettings,{title:__("Color","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",settings:[{colorValue:t.color,onColorChange:x,gradientValue:h.gradientValue,onGradientChange:h.setGradient,label:__("Button Background","jetpack")},{colorValue:A.color,onColorChange:P,label:__("Button Text","jetpack")},{colorValue:n.color,onColorChange:S,label:__("Border","jetpack")}],initialOpen:!0},(0,r.createElement)(s.ContrastChecker,{fontSize:w.size,textColor:A.color,backgroundColor:v.color,fallbackButtonBackgroundColor:k,fallbackTextColor:y})),!_&&(0,r.createElement)(s.PanelColorSettings,{title:__("Background Colors","jetpack"),className:"wp-block-jetpack-subscriptions__backgroundpanel",colorSettings:[{value:t.color,onChange:x,label:__("Button Background Color","jetpack")},{value:A.color,onChange:P,label:__("Button Text Color","jetpack")},{value:n.color,onColorChange:S,label:__("Border Color","jetpack")}],initialOpen:!1},(0,r.createElement)(s.ContrastChecker,{fontSize:w.size,textColor:A.color,backgroundColor:v.color,fallbackButtonBackgroundColor:k,fallbackTextColor:y})),(0,r.createElement)(c.PanelBody,{title:__("Typography","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__textpanel"},(0,r.createElement)(s.FontSizePicker,{withSlider:!0,value:w.size,onChange:e=>{constt=e||m.tm;j({fontSize:t,customFontSize:t})},__nextHasNoMarginBottom:!0})),(0,r.createElement)(c.PanelBody,{title:__("Border","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__borderpanel"},(0,r.createElement)(c.RangeControl,{value:g,label:__("Border Radius","jetpack"),min:m.G0,max:m.Gp,initialPosition:m.S9,allowReset:!0,onChange:e=>j({borderRadius:e})}),(0,r.createElement)(c.RangeControl,{value:f,label:__("Border Weight","jetpack"),min:m.VF,max:m.K3,initialPosition:m.XJ,allowReset:!0,onChange:e=>j({borderWeight:e})})),(0,r.createElement)(c.PanelBody,{title:__("Spacing","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__spacingpanel"},(0,r.createElement)(c.RangeControl,{value:C,label:__("Space Inside","jetpack"),min:m.xV,max:m.bK,initialPosition:m.HE,allowReset:!0,onChange:e=>j({padding:e})}),(0,r.createElement)(c.RangeControl,{value:L,label:__("Space Between","jetpack"),min:m.Tr,max:m.pC,initialPosition:m.FP,allowReset:!0,onChange:e=>j({spacing:e})}),(0,r.createElement)(p.g,{width:R,onChange:e=>j({buttonWidth:e})})),(0,r.createElement)(c.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1,className:"wp-block-jetpack-subscriptions__displaypanel"},(0,r.createElement)(c.ToggleControl,{label:__("Show subscriber count","jetpack"),checked:N,onChange:()=>{j({showSubscribersTotal:!N})},help:()=>{if(!T||T<1)return__("This will remain hidden until there is at least one subscriber.","jetpack")}}),N&&M?(0,r.createElement)(c.ToggleControl,{disabled:!N,label:__("Include social followers in count","jetpack"),checked:E,onChange:()=>{j({includeSocialFollowers:!E})}}):null,(0,r.createElement)(c.ToggleControl,{label:__("Place button on new line","jetpack"),checked:b,onChange:()=>{j({buttonOnNewLine:!b})}}),!(0,i.Wp)()&&(0,r.createElement)(c.TextareaControl,{value:I,label:__("Success message","jetpack"),help:__("Edit the message displayed when a user subscribes.","jetpack"),onChange:e=>j({successMessage:e})})))}},2916:function(e,t,n){"use strict";varr=n(75623),a=n(45097),o=n(20121),i=n(76609),s=n(11689),c=n(79024),l=n(68600),u=n(39583);t.Z=[u.Z,l.Z,c.Z,s.Z,i.Z,o.Z,a.Z,r.Z]},75623:function(e,t,n){"use strict";varr=n(51806),a=n(69307),o=n(65736),i=n(92819);const__=o.__;t.Z={attributes:{subscribeButton:{type:"string",default:__("Subscribe","jetpack")},showSubscribersTotal:{type:"boolean",default:!1}},migrate:e=>({submitButtonText:e.subscribeButton,showSubscribersTotal:e.showSubscribersTotal}),isEligible:e=>!(!e.hasOwnProperty("subscribeButton")||!(0,i.isEmpty)(e.subscribeButton)),save
_n("Join %s other subscriber","Join %s other subscribers",r,"jetpack"),r)}})),{data:te,enabled:ne}=(0,E.a)(),re=x?(0,i.__experimentalUseGradient)({gradientAttribute:"emailFieldGradient",customGradientAttribute:"customEmailFieldGradient"}):{},ae=x?(0,i.__experimentalUseGradient)({gradientAttribute:"buttonGradient",customGradientAttribute:"customButtonGradient"}):{},oe={"no-border-radius":0===U,[M.class]:M.class,"has-text-color":L.color,[L.class]:L.class},ie={...oe,"has-background":p.color||re.gradientValue,[p.class]:!re.gradientValue&&p.class,[re.gradientClass]:re.gradientClass},se={...oe,"has-background":S.color||ae.gradientValue,[S.class]:!ae.gradientValue&&S.class,[ae.gradientClass]:ae.gradientClass},ce=e=>e||y.FP,le={color:L.color,borderColor:R.color,borderRadius:U?U+"px":y.S9+"px",borderWidth:H?H+"px":y.XJ+"px",fontSize:M.size?M.size:y.tm,padding:(e=>{constt=e||y.HE;returnt+"px "+Math.round(1.5*t)+"px "+t+"px "+Math.round(1.5*t)+"px"})($)},ue={"--subscribe-block-border-radius":U?U+"px":y.S9+"px"},de={...le,...!p.color&&re.gradientValue?{background:re.gradientValue}:{backgroundColor:p.color}},pe={...le,...!S.color&&ae.gradientValue?{background:ae.gradientValue}:{backgroundColor:S.color},...X?{marginTop:ce(q)+"px"}:{marginLeft:ce(q)+"px"},width:V},me=(0,c.usePrevious)(S);return(0,u.useEffect)((()=>{F&&me?.color===R?.color&&R?.color!==S?.color&&I(S.color)}),[S,me,R,I,F]),B?(0,r.createElement)(C.Z,null):F?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(w.Z,{buttonBackgroundColor:S,borderColor:R,buttonGradient:ae,borderRadius:U,borderWeight:H,buttonOnNewLine:X,emailFieldBackgroundColor:p,fallbackButtonBackgroundColor:N,fallbackTextColor:T,fontSize:M,includeSocialFollowers:G,isGradientAvailable:x,padding:$,setAttributes:a,setBorderColor:I,setButtonBackgroundColor:P,setTextColor:A,showSubscribersTotal:K,spacing:q,subscriberCount:Q,textColor:L,buttonWidth:V,successMessage:Y})),(0,f.M)()&&(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.Toolbar,null,(0,r.createElement)(b.ZP,{context:"toolbar",hasNewsletterPlans:Z}))),(0,r.createElement)("div",{className:m()(t,"wp-block-jetpack-subscriptions__container","wp-block-jetpack-subscriptions__supports-newline",ne?"wp-block-jetpack-subscriptions__newsletter-categories-enabled":void0,X?"wp-block-jetpack-subscriptions__use-newline":void0,K?"wp-block-jetpack-subscriptions__show-subs":void0),style:ue},ne?(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__newsletter-categories"},te.map((e=>(0,r.createElement)("div",{key:`newsletter-category-${e.id}`,className:"wp-block-jetpack-subscriptions__newsletter-category"},(0,r.createElement)("div",null,e.name))))):null,(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__form",role:"form"},(0,r.createElement)(s.TextControl,{placeholder:J,disabled:!0,className:m()(ie,"wp-block-jetpack-subscriptions__textfield"),style:de}),(0,r.createElement)(i.RichText,{className:m()(se,"wp-block-jetpack-subscriptions__button","wp-block-button__link"),onChange:e=>a({submitButtonText:e}),style:pe,value:W,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/strikethrough"]})),K&&(0,r.createElement)("div",{className:"wp-block-jetpack-subscriptions__subscount"},ee))):(0,r.createElement)(_.f,{changeStatus:z,isModuleActive:F,isLoading:D})}))},57780:function(e,t,n){"use strict";varr=n(13419),a=n(31985),o=n(30217);(0,a.Z)(o.u2,o.Xd),(0,r.o_)(o.u2,o.eC)},18005:function(e,t,n){"use strict";n.d(t,{Z:function(){returnh}});varr=n(51806),a=n(32054),o=n(13419),i=n(86989),s=n.n(i),c=n(55609),l=n(9818),u=n(69307),d=n(65736),p=n(79201),m=n(92770);const__=d.__;functionh(e){let{isModalOpen:t,closeModal:n}=e;const[i,d]=(0,u.useState)(!1),[h,g]=(0,u.useState)(!1),[f,b]=(0,u.useState)(!1),v=(0,l.useSelect)((e=>e("core/editor").getCurrentPostId())),[k]=(0,a.Z)("sm"),{tracks:y}=(0,o.z$)();return(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(c.Modal,{className:"jetpack-email-preview",onRequestClose:()=>{n(),d(!1)}},(0,r.createElement)(c.__ex
__("<postPublishedLink>%1$s</postPublishedLink> was sent to <strong>%2$s %3$s</strong>.","jetpack"),f,_,C),S=(0,v.hc)(E,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(l.PluginPostPublishPanel,{initialOpen:!0,title:(0,r.createElement)(r.Fragment,null,__("Newsletter:","jetpack"),t&&(0,r.createElement)("span",{className:"jetpack-subscribe-post-publish-panel__heading"},g.S[t].panelHeading)),className:"jetpack-subscribe-newsletters-panel jetpack-subscribe-post-publish-panel",icon:(0,r.createElement)(o.Pm,null)},!S&&(0,r.createElement)(i.Notice,{className:"jetpack-subscribe-post-publish-panel__notice",isDismissible:!1},(0,d.createInterpolateElement)(j,{strong:(0,r.createElement)("strong",null),postPublishedLink:(0,r.createElement)(b.rU,{href:y})}))),!w&&(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)(o.Pm,null)},(0,r.createElement)(i.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)(i.Button,{target:"_blank",variant:"secondary",href:(0,a.Z)("wpcom-earn",{site:(0,o.lQ)()})},__("Turn on paid newsletters","jetpack"),(0,r.createElement)(m.Z,{icon:h.Z,className:"paid-newsletters-post-publish-panel__external_icon"})))))}functionP(){const{isModuleActive:e}=(0,o.el)(w.u2),t=(0,c.useSelect)((e=>e(u.store).getCurrentPostType()),[]),[,n]=(0,s.useEntityProp)("postType",t,"meta"),[a,i]=(0,d.useState)(!1),{tracks:l}=(0,o.z$)(),p=(0,f._)(t);return"post"!==t?null:(0,f.M)()?(0,o.M6)()||(0,o.aQ)()?(0,r.createElement)(j,null):(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(_,{accessLevel:p,setPostMeta:n}),(0,r.createElement)(S,{accessLevel:p,setPostMeta:n,isModuleActive:e,showPreviewModal:()=>{l.recordEvent("jetpack_send_email_preview_prepublish_preview_button"),i(!0)}}),e&&(0,r.createElement)(x,{accessLevel:p,setPostMeta:n}),(0,r.createElement)(y.Z,{isModalOpen:a,closeModal:()=>i(!1)})):null}},68269:function(e,t,n){"use strict";n.d(t,{f:function(){returnl}});varr=n(51806),a=n(13419),o=n(55609),i=n(69307),s=n(65736),c=n(30217);const__=s.__,l=e=>{let{changeStatus:t,isLoading:n,isModuleActive:s}=e;const{tracks:l}=(0,a.z$)();return(0,i.useEffect)((()=>{l.recordEvent("jetpack_editor_subscriptions_placeholder_view")}),[l]),(0,r.createElement)(o.Placeholder,{icon:c.qv,instructions:__("You'll need to activate the Subscriptions feature to use the Subcribe block.","jetpack"),label:c.Xd.title},(0,r.createElement)(o.Button,{disabled:s||n,isBusy:n,onClick:()=>(l.recordEvent("jetpack_editor_subscriptions_enable"),t(!0)),variant:"secondary"},n?__("Activating Subscriptions","jetpack"):__("Activate Subscriptions","jetpack",0)),(0,r.createElement)("div",{className:"membership-button__disclaimer"},(0,r.createElement)(o.ExternalLink,{href:"https://jetpack.com/support/subscriptions/"},__("Learn more about the Subscriptions feature.","jetpack"))))}},22750:function(e,t,n){"use strict";varr=n(51806),a=n(22636),o=n(55609);t.Z=function(){return(0,r.createElement)(o.Placeholder,null,(0,r.createElement)(o.Flex,{gap:2,direction:"column",style:{width:"100%"}},(0,r.createElement)(o.Flex,{gap:4},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(a.Z,{width:30,height:30})),(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{width:"90%",height:30}))),(0,r.createElement)(o.Flex,{style:{marginTop:12}},(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{height:30,width:"60%"}))),(0,r.createElement)(o.Flex,{style:{marginTop:12}},(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{width:150,height:50}))),(0,r.createElement)(o.Flex,{style:{marginTop:18}},(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(a.Z,{width:"90%",height:16})))))}},3740:function(e,t,n){"use strict";n.d(t,{EU:function(){returnu},GP:function(){returns},P0:function(
__("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":s,height:e.height,id:e.id,origUrl:e.url,isSelected:o===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:o,layoutStyle:i}=this.props,s=m(i)?d.Z:u.Z,c=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(s,{align:e,columns:a,images:o,layoutStyle:i,renderedImages:c}),t)}}functionm(e){return["circle","square"].includes(e)}functionh(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};constn={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(newURL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,a]ofObject.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,a);returnr.toString()}},30791:function(e,t,n){"use strict";n.d(t,{Z:function(){returnd}});varr=n(51806),a=n(69307),o=n(6209),i=n(52235),s=n(89754),c=n(36472),l=n(6817),u=n(6648);classdextendsa.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}ofe){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=newo.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:o}=this.props,u=(0,l.h9)(n),d="columns"===a?(0,l.sv)(u,t):(0,l.T9)(u,{isWide:["full","wide"].includes(e)});letp=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,t)=>{constn=o.slice(p,p+e);returnp+=e,(0,r.createElement)(i.Z,{key:t},n)}))))))}}},6817:function(e,t,n){"use strict";n.d(t,{T9:function(){returnj},h9:function(){returna},sv:function(){returni}});varr=n(92819);functiona(e){return(0,r.map)(e,o)}functiono(e){let{height:t,width:n}=e;returnt&&n?n/t:1}functioni(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];leto=e,i=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(o,(t=>{constr=i<=(e+1)*n;returnr&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}returna.push(o.length),[a]}consts=S([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=x([N,P,P,N]),p=S([1,2,1],5),m=x([N,P,P,P]),h=S([1,3],3),g=x([P,P,P,N]),f=S([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(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=x([(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(2)),T(1.6)]),_=S([2,1],3),C=x([function(e){returne>=2}]);functionj(e){let{isWide:t}=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};constn=(e,a)=>{if(!a.length)returne;leto;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(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){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.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);cons
__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:c});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":p,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:d===t,key:t,link:e.link,linkTo:s,origUrl:e.url,showMovers:i.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i,roundedCorners:l}=this.props,m=(0,u.v)(i)?p.Z:d.Z,h=this.props.images.map(this.renderImage,this),g=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${g}`]:g>0})},(0,r.createElement)(m,{align:e,columns:a,images:o,layoutStyle:i,renderedImages:h}),t)}}},84420:function(e,t,n){"use strict";n.d(t,{Z:function(){returnl}});varr=n(51806),a=n(69307),o=n(85407),i=n(40195),s=n(56243),c=n(12126);classlextendsa.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:l}=this.props,u=(0,c.h9)(n),d="columns"===a?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});letp=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,t)=>{constn=l.slice(p,p+e);returnp+=e,(0,r.createElement)(o.Z,{key:t},n)}))))))}}},12126:function(e,t,n){"use strict";n.d(t,{T9:function(){returnj},h9:function(){returna},sv:function(){returni}});varr=n(92819);functiona(e){return(0,r.map)(e,o)}functiono(e){let{height:t,width:n}=e;returnt&&n?n/t:1}functioni(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];leto=e,i=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(o,(t=>{constr=i<=(e+1)*n;returnr&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}returna.push(o.length),[a]}consts=S([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=x([N,P,P,N]),p=S([1,2,1],5),m=x([N,P,P,P]),h=S([1,3],3),g=x([P,P,P,N]),f=S([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(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=x([(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(2)),T(1.6)]),_=S([2,1],3),C=x([function(e){returne>=2}]);functionj(e){let{isWide:t}=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};constn=(e,a)=>{if(!a.length)returne;leto;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(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){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.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);consti=e.concat([o]),j=(0,r.sum)(o),S=a.slice(j);returnn(i,S)};returnn([],e)}functionS(e,t){returnn=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}functionx(e){returnt=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}functionP(e){returne>=1&&e<2}functionN(e){returne<1}functionL(e){returnt=>t>=e}functionT(e){returnt=>t<e}},56243:function(e,t,n){"use strict";n.d(t,{Z:function(){returni}});varr=n(51806),a=n(65235),o=n.n(a);functioni(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},87178:function(e,t,n){"use strict";n.d(t,{Z:function(){returnl}});varr=n(51806),a=n(92819),o=n(86738),i=n(85407),s=n(40195),c=n(56243);functionl(e){let{columns:t,renderedImages:n}=e;constl=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)((0,a.drop)(n,u),l)].map(((e,t)=>(0,r.createElement)(c.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},68405:function(e,t,n){"use strict";n.d(t,{Z:function(){returnc}});varr=n(51806),a=n(81
__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:f===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void0:p(t),onMoveForward:s?void0:m(t),onRemove:s?void0:h(t),onSelect:s?void0:g(t),origUrl:e.url,setAttributes:s?void0:b(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i,roundedCorners:l,onResize:m,isSave:h,columnWidths:g}=this.props,f=(0,u.v)(i)?p.Z:d.Z,b=this.props.images.map(this.renderImage,this),v=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${v}`]:v>0})},(0,r.createElement)(f,{align:e,columns:a,columnWidths:h?g:void0,images:o,layoutStyle:i,renderedImages:b,onResize:h?void0:m}),t)}}},47510:function(e,t,n){"use strict";n.d(t,{Z:function(){returnl}});varr=n(51806),a=n(69307),o=n(17410),i=n(46349),s=n(78922),c=n(3453);classlextendsa.Component{gallery=(0,a.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:l,columnWidths:u}=this.props,d=(0,c.h9)(n),p="columns"===a?(0,c.sv)(d,t):(0,c.T9)(d,{isWide:["full","wide"].includes(e)});letm=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,n)=>{consta=l.slice(m,m+e);returnm+=e,(0,r.createElement)(o.Z,{key:n,width:u?.[t]?.[n]},a)}))))))}}},3453:function(e,t,n){"use strict";n.d(t,{T9:function(){returnj},h9:function(){returna},sv:function(){returni}});varr=n(92819);functiona(e){return(0,r.map)(e,o)}functiono(e){let{height:t,width:n}=e;returnt&&n?n/t:1}functioni(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];leto=e,i=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(o,(t=>{constr=i<=(e+1)*n;returnr&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}returna.push(o.length),[a]}consts=S([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=x([N,P,P,N]),p=S([1,2,1],5),m=x([N,P,P,P]),h=S([1,3],3),g=x([P,P,P,N]),f=S([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(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=x([(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(2)),T(1.6)]),_=S([2,1],3),C=x([function(e){returne>=2}]);functionj(e){let{isWide:t}=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};constn=(e,a)=>{if(!a.length)returne;leto;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(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){constn=(0,r.sum)((0,r.take)(t,4));returny(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,a)?[1,1,1,1]:function(e,t,n){consta=(0,r.sum)((0,r.take)(t,3));returnt.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);consti=e.concat([o]),j=(0,r.sum)(o),S=a.slice(j);returnn(i,S)};returnn([],e)}functionS(e,t){returnn=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}functionx(e){returnt=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}functionP(e){returne>=1&&e<2}functionN(e){returne<1}functionL(e){returnt=>t>=e}functionT(e){returnt=>t<e}},78922:function(e,t,n){"use strict";n.d(t,{Z:function(){returni}});varr=n(51806),a=n(65235),o=n.n(a);functioni(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:o()("tiled-gallery__row",n)},t)}},65662:function(e,t,n){"use strict";n.d(t,{Z:function(){returnl}});varr=n(51806),a=n(92819),o=n(13993),i=n(17410),s=n(46349),c=n(78922);functionl(e){let{columns:t,renderedImages:n}=e;constl=Math.min(o.hI,t),u=n.length%l;return(0,r.createElement)(s.Z,null,[...u?[(0,a.take)(n,u)]:[],...(0,a.chunk)(
__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:d});return(0,r.createElement)(l.Z,{alt:e.alt,"aria-label":v,columns:n,height:e.height,id:e.id,imageFilter:a,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:f===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void0:p(t),onMoveForward:s?void0:m(t),onRemove:s?void0:h(t),onSelect:s?void0:g(t),origUrl:e.url,setAttributes:s?void0:b(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i,roundedCorners:l,onResize:m,style:h,isSave:g,columnWidths:f}=this.props,b=(0,u.v)(i)?p.Z:d.Z,v=this.props.images.map(this.renderImage,this),k=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{style:h,className:s()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:g?f:void0,images:o,layoutStyle:i,renderedImages:v,onResize:g?void0:m}),t)}}},82265:function(e,t,n){"use strict";n.d(t,{Z:function(){returnd}});varr=n(51806),a=n(69307),o=n(6209),i=n(63866),s=n(750),c=n(2911),l=n(76981),u=n(76187);classdextendsa.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}ofe){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void0!==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=newo.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){letr=0;returne.map((e=>e.map((e=>{constn=t.slice(r,r+e);returnr+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:u}=this.props,d=(0,l.h9)(n),p="columns"===o?(0,l.sv)(d,t):(0,l.T9)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();leth=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,n)=>{consta=u.slice(h,h+e);returnh+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},a)}))))))}}},76981:function(e,t,n){"use strict";n.d(t,{T9:function(){returnj},h9:function(){returna},sv:function(){returni}});varr=n(92819);functiona(e){return(0,r.map)(e,o)}functiono(e){let{height:t,width:n}=e;returnt&&n?n/t:1}functioni(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];leto=e,i=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(o,(t=>{constr=i<=(e+1)*n;returnr&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}returna.push(o.length),[a]}consts=S([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=x([N,P,P,N]),p=S([1,2,1],5),m=x([N,P,P,P]),h=S([1,3],3),g=x([P,P,P,N]),f=S([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(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=x([(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(2)),T(1.6)]),_=S([2,1],3),C=x([function(e){returne>=2}]);functionj(e){let{isWide:t}=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};constn=(e,a)=>{if(!a.length)returne;leto;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(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]:func
__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),y=s?u.Z:l.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===i.length,isSelected:b===t,key:t,link:e.link,linkTo:c,onMoveBackward:s?void0:m(t),onMoveForward:s?void0:h(t),onRemove:s?void0:g(t),onSelect:s?void0:f(t),origUrl:e.url,setAttributes:s?void0:v(t),showMovers:i.length>1,srcSet:E,url:w,width:e.width})}render(){const{align:e,children:t,className:n,columns:a,images:o,layoutStyle:i,roundedCorners:l,onResize:u,style:h,isSave:g,columnWidths:f}=this.props,b=(0,d.v)(i)?m.Z:p.Z,v=this.props.images.map(this.renderImage,this),k=i!==c.xJ?Math.min(l,c.Z5):0;return(0,r.createElement)("div",{style:h,className:s()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(b,{align:e,columns:a,columnWidths:g?f:void0,images:o,layoutStyle:i,renderedImages:v,onResize:g?void0:u}),t)}}},46438:function(e,t,n){"use strict";n.d(t,{Z:function(){returnd}});varr=n(51806),a=n(69307),o=n(6209),i=n(24639),s=n(75084),c=n(51309),l=n(96001),u=n(99856);classdextendsa.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}ofe){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void0!==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=newo.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){letr=0;returne.map((e=>e.map((e=>{constn=t.slice(r,r+e);returnr+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:u}=this.props,d=(0,l.h9)(n),p="columns"===o?(0,l.sv)(d,t):(0,l.T9)(d,{isWide:["full","wide"].includes(e)}),m=a.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,u,1e3)})();leth=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(c.Z,{key:t},e.map(((e,n)=>{consta=u.slice(h,h+e);returnh+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},a)}))))))}}},96001:function(e,t,n){"use strict";n.d(t,{T9:function(){returnj},h9:function(){returna},sv:function(){returni}});varr=n(92819);functiona(e){return(0,r.map)(e,o)}functiono(e){let{height:t,width:n}=e;returnt&&n?n/t:1}functioni(e,t){if(e.length<=t)return[Array(e.length).fill(1)];constn=(0,r.sum)(e)/t,a=[];leto=e,i=0;for(lete=0;e<t-1;e++){constt=(0,r.takeWhile)(o,(t=>{constr=i<=(e+1)*n;returnr&&(i+=t),r})).length;a.push(t),o=(0,r.drop)(o,t)}returna.push(o.length),[a]}consts=S([2,1,2],5),c=x([P,P,N,P,P]),l=x([P,P,P,N,P,P,P]),u=S([3,1,3],5),d=x([N,P,P,N]),p=S([1,2,1],5),m=x([N,P,P,P]),h=S([1,3],3),g=x([P,P,P,N]),f=S([3,1],3),b=x([T(1.6),(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(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=x([(0,r.overEvery)(L(.9),T(2)),(0,r.overEvery)(L(.9),T(2)),T(1.6)]),_=S([2,1],3),C=x([function(e){returne>=2}]);functionj(e){let{isWide:t}=arguments.length>1&&void0!==arguments[1]?arguments[1]:{};constn=(e,a)=>{if(!a.length)returne;leto;o=a.length>15&&c(a)&&s(e)?[2,1,2]:a.length>15&&l(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,
__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:Z,help:this.getAutoplayHelp}),(0,o.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:z}),(0,o.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:O}),(0,o.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,o.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,o.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,o.createElement)(l.MediaUploadCheck,null,(0,o.createElement)(u.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,o.createElement)(l.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:T,render:e=>{let{open:t}=e;return(0,o.createElement)(u.Button,{variant:"secondary",onClick:t,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}}),(0,o.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??M):__("There is no poster image currently selected","jetpack")),K&&(0,o.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,o.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,o.createElement)(S.Z,{attributes:t,setAttributes:p,useAverageColor:G,toggleAttribute:this.toggleAttribute}),(0,o.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,o.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,o.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:j,disabled:v||N}),(0,o.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||I})))),Y=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:void0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):p({src:void0,id:void0,poster:void0})},ee=()=>"videoPressUploadPoster"inwindow,te=(0,h.escapeHTML)(b?(0,L.K8)(b.name):""),ne=e=>{let{mediaId:t,guid:n,src:r}=e;this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!t,isEditingWhileUploading:!!t&&this.state.isEditingWhileUploading}),t&&n&&r&&p({id:t,guid:n,src:r})},re=e=>{this.setState({title:e})},ae=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},oe=()=>{conste=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},ie=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),se=()=>de({poster_attachment_id:this.state.videoPosterImageData.id}),ce=e=>{e.generating?le():ue(e.poster)},le=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(F):s()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>ce(e)))}),2e3)},ue=e=>{e&&p({poster:e})},de=e=>{if(ee())returnwindow.videoPressUploadPoster(F,e).then((e=>ce(e)));s()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&oe(),M?se():null!=t&&ie()},me=()=>{this.setState({isEditingWhileUploading:!1}),pe()};if(null!=b&&b.name||this.state.isEditingWhileUploading){conste=this.state.title??te;return(0,o.createElement)(A,{fileForUpload:b,filename:te,uploadFinished:ne,blockSettings:X,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:ae,onSave:pe})}consthe=v||r,ge=f||i||!F,fe=ge&&!i&&!he,be=(0,o.createElement)(m.Fragment,null,(0,o.createElement)("div",{className:i||he?"":"videopress-block-hide"},(0,o.createElement)(C.Z,{text:i?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,o.createElement)("div",{className:fe?"":"videopress-block-hide"},(0,o.createElement)(e,this.props)));if(ge)returnd?(0,o.createElement)(E.Z,{onFilesSelected:Y,onMediaItemSelected:Q},be):(0,o.createElement)(m.Fragment,null,be);const{html:ve,scripts:ke}=c||{html:null,scripts:null},ye=he||!c;return(0,o.createElement)(m.Fragment,null,X,ye&&(0,o.createElement)(C.Z,{text:__("Generating preview…","jetpack")}),!ye&&(0,o.createElement)(R,a()({},this.props,{hideOverlay:this.hideOverlay,html:ve,scripts:ke,interactive:y,caption:B})))}}]),"withVideoPressEdit")},37549:function(e,t,n){"use strict";varr=n(82674),a=n.n(r),o=n(51806),i=n(6975),s=n(13419),c=n(11313),l=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),j=n(30053),S=n(23096),x=n(77290),P=n(23062),N=n(84676),L=n(41194);const__=v.__,T=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,l.useBlockEditContext)();return"core/video"!==n?(0,o.createElement)(e,t):(0,o.createElement)(e,a()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,o.createElement)(p.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"second
__("Paused (%s%%)","jetpack"),E):(0,i.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */
__("Uploading (%s%%)","jetpack"),E)),(0,r.createElement)("div",{className:"resumable-upload__file-size"},C)),(0,r.createElement)("div",{className:"resumable-upload__actions"},(0,r.createElement)(a.Button,{variant:"link",onClick:()=>{m&&(d?m.start():m.abort(),p(!d))}},d?"Resume":"Pause"))))}},5482:function(e,t,n){"use strict";n.d(t,{J:function(){returni},v:function(){returna}});varr=n(99537);consta=function(e){returnnewPromise((function(t,n){constr=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)}))}))},o={},i=e=>{let{onUploadUuidRetrieved:t,onError:n,onProgress:i,onSuccess:s}=e;return(e,c)=>{constl=newr.gq(e,{onError:n,onProgress:i,endpoint:c.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:e.name,filetype:e.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(e,n){if(n.getStatus()>=400)return;constr=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)returnvoid(s&&s({mediaId:Number(a),guid:r,src:i}));constc={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},l={};Object.keys(c).forEach((function(e){constt=n.getHeader(e);t&&(l[c[e]]=t)})),l.key&&l.token&&(o[l.key]=l.token),l.key&&t(l.key)},onBeforeRequest:function(e){constt=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(!!!c.token)throw"should never happen";e.setHeader("x-videopress-upload-token",c.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){constn=newURL(e._url).pathname.split("/"),r=n[n.length-1];if(o[r])e.setHeader("x-videopress-upload-token",o[r]);elseif("HEAD"===t)returna(r).then((t=>(o[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}returnPromise.resolve(e)}});returnl.findPreviousUploads().then((function(e){e.length&&l.resumeFromPreviousUpload(e[0]),l.start()})),l}}},23096:function(e,t,n){"use strict";varr=n(51806),a=n(52175),o=n(94333),i=n(65235),s=n.n(i),c=n(90953);t.Z=(0,o.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:o,controls:i,guid:l,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:s()("wp-block-video",f,g,{[`align${b}`]:b})});if(!l)returne(t);constC=(0,c.p)(l,{autoplay:n,controls:i,loop:u,muted:d,playsinline:p,poster:m,preload:h,seekbarColor:v,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w});letj={};returnE&&E.length>0&&"100%"!==E&&(j={maxWidth:E,margin:"auto"}),(0,r.createElement)("figure",_,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:j},`\n${C}\n`),!a.RichText.isEmpty(o)&&(0,r.createElement)(a.RichText.Content,{tagName:"figcaption",value:o}))}),"withVideoPressSave")},75880:function(e,t,n){"use strict";varr=n(51806),a=n(52175),o=n(55609),i=n(69307),s=n(65736);n(99196);const__=s.__;classcextendsi.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
__("Delete %s","jetpack"),e.label),disabled:o===c},o===c?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(s.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},c)}functiony(e){let{track:t,guid:n,onChange:a,onClose:o,onCancel:d,trackExists:g}=e;const[f,v]=(0,l.useState)(),[k=!1,y]=(0,l.useState)(),{label:w="",srcLang:E="",kind:_=p}=t,C=t.tmpFile?t.tmpFile.name:"";if(!(0,c.useSelect)((e=>e(i.store).getSettings().mediaUpload),[]))returnnull;return(0,r.createElement)(s.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"),":"),""!==C&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,C)),(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(s.FormFileUpload,{onChange:e=>{constn=e.target.files;!n.length>0||(t.tmpFile=n[0],a(t))},accept:m,render:e=>{let{openFileDialog:t}=e;return(0,r.createElement)(s.Button,{variant:"link",onClick:()=>{t()}},""===C?__("Select track","jetpack"):__("Change track","jetpack",0))},disabled:k}))),(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)(s.TextControl,{onChange:e=>a({...t,label:e}),label:__("Label","jetpack"),value:w,help:__("Title of track","jetpack"),disabled:k}),(0,r.createElement)(s.TextControl,{onChange:e=>a({...t,srcLang:e}),label:__("Source language","jetpack"),value:E,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:k})),(0,r.createElement)(s.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:_,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */
__("Kind","jetpack"),onChange:e=>{a({...t,kind:e})},disabled:k}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},k?(0,r.createElement)(s.Spinner,null):(0,r.createElement)(s.Button,{variant:"secondary",disabled:!t.tmpFile,onClick:()=>{v(null),""===w&&(t.label=__("English","jetpack")),""===E&&(t.srcLang="en"),void0===t.kind&&(t.kind=p),g(t)?v(__("A track already exists for that language and kind.","jetpack")):(y(!0),b(t,n).then((()=>{a(t),v(null),o()})).catch((e=>{e.message&&v(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,r.createElement)(s.Button,{variant:"link",onClick:d},__("Close","jetpack"))),f&&(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." */
l=__("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"));t.ZP=e=>{let{onRedirect:t,align:n,className:d,title:p=c,description:m=null,buttonText:h=u,visible:g=!0,requiredPlan:f,context:b}=e;const[v,k,y]=(0,s.Z)(f,t),w=(0,a.useSelect)((e=>{if(m)returnm;constt=e("wordpress-com/plans"),n=t&&t.getPlan(f);returnn?(0,o.sprintf)(l,n.product_name_short):null}),[m]);returnw&&(0,r.createElement)(i.p,{align:n,buttonText:h,checkoutUrl:v,className:d,context:b,description:w,goToCheckoutPage:k,isRedirecting:y,title:p,visible:g})}},38140:function(e,t,n){"use strict";n.d(t,{W:function(){returna},v:function(){returnr}});constr=e=>{let{plan:t,blockName:n,context:r,tracks:a}=e;a.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:r})},a=e=>{let{plan:t,blockName:n,context:r,tracks:a}=e;a.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:r})}},27003:function(e,t,n){"use strict";varr=n(51806),a=n(13419),o=n(52175),i=n(94333),s=n(9818),c=n(69307),l=n(87950),u=n(66316),d=n(38140);t.Z=(0,i.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:i,isSelected:p,attributes:m,setAttributes:h}=t||{},{hasParentBanner:g}=(0,c.useContext)(l.x)||{},{tracks:f}=(0,a.z$)(),b=(0,a.Rl)(n);if(!b)return(0,r.createElement)(e,t);constv=(0,a.HD)(n),k=(0,a.m3)(n),[y,w]=(0,c.useState)(!v),[E,_]=(0,c.useState)(!1),C="editor-canvas",j=(0,s.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(i,!0)),[]),S=(p||j)&&y&&!g,x=(0,c.useMemo)((()=>({plan:b,blockName:n,context:C,tracks:f})),[b,n,f]);(0,c.useEffect)((()=>{S&&_(!0)}),[S,_]),(0,c.useEffect)((()=>{!E&&S&&(0,d.W)(x)}),[E,x,S]),(0,c.useEffect)((()=>w(!v)),[m,w,v]),(0,c.useEffect)((()=>{h({shouldDisplayFrontendBanner:!g})}),[h,g]);constP=(0,o.useBlockProps)();return(0,r.createElement)(l.L,{onBannerVisibilityChange:w,hasParentBanner:S},(0,r.createElement)("div",{ref:P.ref},(0,r.createElement)(u.ZP,{className:`is-${n.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:S,description:k?.description,requiredPlan:b,context:C,onRedirect:()=>(0,d.v)(x)}),(0,r.createElement)(e,t)))}),"withUpgradeBanner")},90607:function(e,t,n){"use strict";n.d(t,{Z:function(){returnh}});varr=n(51806),a=n(13419),o=n(55609),i=n(72067),s=n(69307),c=n(65736),l=n(63206),u=n(18135),d=n(34613),p=n(75317);const__=c.__,m=e=>{let{onClick:t,type:n}=e;const{tracks:i}=(0,a.z$)(),c=(0,s.useCallback)((e=>{i.recordEvent("jetpack_ai_get_feedback_upgrade_click"),t?.(e)}),[t,i]),l=(0,s.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)}),u=(0,s.createInterpolateElement)(__("You have reached the limit of 20 free requests. <button>Upgrade to continue generating feedback.</button>","jetpack"),{button:(0,r.createElement)(o.Button,{variant:"link",onClick:c})});return(0,r.createElement)("div",null,"vip"===n?l:u)};functionh(){const{requireUpgrade:e,upgradeType:t}=(0,u.ZP)(),{autosaveAndRedirect:n,isRedirecting:s}=(0,l.Z)(),c=__("AI Assistant","jetpack");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(d.Z,null,(0,r.createElement)(o.PanelBody,{title:c,initialOpen:!1},(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(p.Z,{busy:s,disabled:e})),e&&(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(m,{onClick:n,type:t})))),(0,r.createElement)(i.PluginPrePublishPanel,{title:c,icon:(0,r.createElement)(a.Pm,null),initialOpen:!1},(0,r.createElement)(p.Z,{busy:s,disabled:e}),e&&(0,r.createElement)(m,{onClick:n,type:t})))}},75317:function(e,t,n){"use strict";n.d(t,{Z:function(){returnf}});varr=n(51806),a=n(36222),o=n(13419),i=n(4981),s=n(55609),c=n(9818),l=n(69307),u=n(65736),d=n(39517),p=n(92213);const__=u.__,m=newp.Z,h=()=>{conste=(0,c.useSelect)((e=>e("core/block-editor").getBlocks()),[]);returne?.length?m.turndown((0,i.serialize)(e)):""},g=e=>{let{requestingState:t,onClose:n}=e;return(0,r.createElement)
__("To re-share a post, you need to upgrade to the %s plan","jetpack"),E)),(0,r.createElement)(i.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,l.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)(i.ExternalLink,{href:j},__("More information.","jetpack")))}},55802:function(e,t,n){"use strict";varr=n(13419),a=n(71259);(0,r.o_)(a.u,a.X)},71259:function(e,t,n){"use strict";n.d(t,{X:function(){returnh},u:function(){returnm}});varr=n(51806),a=n(74356),o=n(13419),i=n(72067),s=n(12238),c=n(65736),l=n(34613),u=n(2811),d=n(81142),p=n(18374);const__=c.__,m="publicize",h={render:()=>{const{hasEnabledConnections:e}=(0,a.oL)(),{isSocialImageGeneratorAvailable:t}=(0,a.Nh)(),{isLoadingModules:n,isChangingStatus:c,isModuleActive:h,changeStatus:g}=(0,o.el)(m);returnn?(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(l.Z,null,(0,r.createElement)(d.Z,null))):h?(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(a.iS,null),(0,r.createElement)(l.Z,null,(0,r.createElement)(a.$S,{enableTweetStorm:!0},(0,r.createElement)(p.Z,null)),t&&(0,r.createElement)(a.i$,null)),(0,r.createElement)(i.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)(o.Pm,null)},(0,r.createElement)(a.$S,{prePublish:!0,enableTweetStorm:!0},(0,r.createElement)(p.Z,null))),t&&(0,r.createElement)(i.PluginPrePublishPanel,{initialOpen:!0,title:__("Social Image Generator","jetpack"),icon:(0,r.createElement)(o.Pm,null)},(0,r.createElement)(a.i$,{prePublish:!0})),(0,r.createElement)(a.$R,null)):(0,r.createElement)(s.PostTypeSupportCheck,{supportKeys:"publicize"},(0,r.createElement)(l.Z,null,(0,r.createElement)(u.e,{changeStatus:g,isModuleActive:h,isLoading:c})))}}},14166:function(e,t,n){"use strict";n.d(t,{Z:function(){returnu}});varr=n(51806),a=n(55609),o=n(9818),i=n(12238),s=n(65736),c=n(8264);const__=s.__;functionl(e){let{checked:t,onChange:n}=e;return(0,r.createElement)(a.ToggleControl,{label:__("Show sharing buttons","jetpack"),checked:t,onChange:e=>{n({jetpack_sharing_enabled:e})}})}functionu(){conste=(0,o.useSelect)((e=>e(i.store).getEditedPostAttribute("jetpack_sharing_enabled")),[]),{editPost:t}=(0,o.useDispatch)(i.store);return(0,r.createElement)(i.PostTypeSupportCheck,{supportKeys:"jetpack-sharing-buttons"},(0,r.createElement)(c.Z,null,(0,r.createElement)(l,{checked:e,onChange:t})))}},27425:function(e,t,n){"use strict";varr=n(13419),a=n(3378);(0,r.o_)(a.u,a.X)},3378:function(e,t,n){"use strict";n.d(t,{X:function(){returno},u:function(){returna}});varr=n(14166);consta="sharing",o={render:r.Z}},21964:function(e,t,n){"use strict";varr=n(13419),a=n(9460);(0,r.o_)(a.u,a.X)},9460:function(e,t,n){"use strict";n.d(t,{X:function(){returns},u:function(){returni}});varr=n(9818),a=n(69307),o=n(65736);const__=o.__,i="site-editor-snackbars",s={render:()=>{const[e,t]=(0,a.useState)(),{createInfoNotice:n,removeNotice:i}=(0,r.useDispatch)("core/notices"),{entityTitle:s,entityType:c,isSiteEditor:l}=(0,r.useSelect)((e=>{if(!e("core/edit-site"))return{isSiteEditor:!1};const{getEditedPostType:t,getEditedPostId:n}=e("core/edit-site"),{getEntityRecord:r,getPostType:a}=e("core"),o=r("postType",t(),n()),i=a(t());return{isSiteEditor:!0,entityTitle:o?.title?.raw??"",entityType:i?.labels?.singular_name??""}}));return(0,a.useEffect)((()=>{if(!l)return;conste=(0,r.subscribe)((()=>{setTimeout((()=>{constn=newURLSearchParams(window.location.search);if(!n.has("canvas"))returne();t(n.get("canvas"))}),0)}),"core/edit-site");return()=>e()}),[l]),(0,a.useEffect)((()=>{constt="jetpack/site-editor/snackbars";if(i(t),!l||"edit"!==e||!s||!c)return;constr=(0,o.sprintf)(/* translators: %1$s and %2$s are the title and type, respectively, of the entity being edited (e.g. "Editing the Index template", or "Editing the Header template part").*/
__("Editing the %1$s %2$s","jetpack"),s,c.toLowerCase());n(r,{id:t,type:"snackbar"})}),[l,e,n,i,s,c]),null}}},43718:function(e,t,n){"use strict";n.d(t,{K:function(){returna}});varr=n(55609);consta=(0,r.withFallbackStyles)(((e,t)=>{const{textColor:n,backgroundColor:r}=t,a=r&&r.color,o=n&&n.color;return{fallbackBackgroundColor:a||!e?void0:getComputedStyle(e).backgroundColor,fallbackTextColor:o||!e?void0:getComputedStyle(e).color}}))},85921:function(e,t,n){"use strict";varr=n(51806),a=n(13419),o=n(4981),i=n(65736),s=n(81427);const__=i.__;(0,a.Wp)()||(0,a.Ug)()||(0,o.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"contact-form"!==t})),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,o.setCategories)([...(0,o.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},85007:function(e,t,n){"use strict";functionr(e){constt=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}functiona(e,t){letn=arguments.length>2&&void0!==arguments[2]&&arguments[2],a=[];if(!t||!e&&!e.length||!function(e){const{currentWindow:t}=r(e);return"editor-canvas"===t.name&&t.self!==t.top}(t))returna;const{currentDoc:o,currentWindow:i}=r(t);if(!function(e){try{return!!e?.parent?.location.href}catch(e){return!1}}(i))returna;consts=i?.parent?.document;returno&&s?(a=e.filter((e=>{constt=s.querySelector(e),r=!!o.querySelector(e);return!(!t||r)&&(o.head.appendChild(t.cloneNode()),n&&t.remove(),!0)})),a):a}functiono(e,t,n){consta=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:o}=r(n),i=o.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(o.getElementById(e.id))return;constt=o.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${a}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){consts=t[e.id]?t[e.id]:null;if(o.getElementById(e.id))returns();constc=o.createElement("script");c.id=e.id,c.type="text/javascript",c.src=`${a}/${n}-${e.version}.${r}`,c.onload=s,i.appendChild(c)}}))}functioni(e,t){returnnewPromise((n=>{constr=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{DT:function(){returna},Dz:function(){returni},Pp:function(){returno},bL:function(){returnr}})},70355:function(e,t,n){"use strict";n.d(t,{m:function(){returni}});varr=n(80550),a=n(13419);consto=r.O["Jetpack Green 40"];functioni(){return(0,a.Ug)()||(0,a.Wp)()?null:o}},81518:function(e,t,n){"use strict";n.d(t,{t:function(){returni}});varr=n(29512),a=n.n(r),o=n(92819);functioni(e,t){constn=function(e,t){for(constnofnew(a())(t).values()){if(-1===n.indexOf("is-style-"))continue;constt=n.substring(9),r=(0,o.find)(e,{name:t});if(r)returnr}return(0,o.find)(e,"isDefault")}(e,t);returnn?n.name:null}},26788:function(e,t,n){"use strict";varr=n(51806),a=n(55609),o=n(69307),i=n(65736);const__=i.__,_x=i._x;classsextendso.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}=this.state;returne?(0,r.createElement)("div",{className:"jetpack-clipboard-input"},(0,r.createElement)(a.TextControl,{readOnly:!0,onFocus:this.onFocus,value:e}),(0,r.createElement)(a.ClipboardButton,{variant:"secondary",onCopy:this.onCopy,onFinishCopy:this.onFinishCopy,text:e},t?__("Copied!","jetpack"):_x("Copy","verb","jetpack"))):null}}t.Z=s},24381:function(e,t,n){"use strict";n.d(t,{Z:function(){returna}});constr=/^#?[A-Fa-f0-9]{6}$/;functiona(e){returnr.test(e)}},72752:function(e,t,n){"use strict";varr=n(51806),a=n(25158),o=n(69307),i=n(65736),s=n(92819),c=n(97115);const__=i.__,l="undefined"!=typeof_wp
__("%1$s / %2$s","jetpack"),o,n)}functionv(e){let{onClose:t,product:n}=e;const{selectedProductId:a,setSelectedProductId:o}=(0,h.Q)(),{id:s,title:c}=n,u=a&&a===s,d=u?l.Z:void0,p=n?" "+b(n):null;return(0,r.createElement)(i.MenuItem,{icon:d,onClick:e=>{e.preventDefault(),o(s),t()},selected:u,value:s},c," : ",p)}functionk(e){let{onClose:t}=e;const{clientId:n,productType:a}=(0,h.Q)(),o=(0,s.useSelect)((e=>e(p.h).getSiteSlug())),c=(0,g.Z)(n);if(m.BM===(0,m.j3)())return(0,r.createElement)(i.MenuItem,null,o&&(0,r.createElement)(i.ExternalLink,{href:`https://wordpress.com/earn/payments-plans/${o}#add-new-payment-plan`},(0,f.l)("add a new product",a)));return(0,r.createElement)(i.MenuItem,{onClick:e=>{e.preventDefault(),c(),setTimeout((()=>{conste=document.getElementById("new-product-title");null!==e&&e.focus()}),100),t()}},(0,f.l)("add a new product",a))}functiony(){const{products:e,productType:t,selectedProductId:n}=(0,h.Q)(),{selectedProduct:a}=(0,s.useSelect)((e=>{const{getProduct:t}=e(p.h);return{selectedProduct:t(n)}}));letc=null,l=u.Z;returna&&(c=b(a)),n&&!a&&(c=(0,f.l)("product not found",t),l=d.Z),(0,r.createElement)(o.BlockControls,{__experimentalShareWithChildBlocks:!0,group:"block"},(0,r.createElement)(i.ToolbarDropdownMenu,{className:"product-management-control-toolbar__dropdown-button",icon:l,label:(0,f.l)("select a product",t),text:c},(t=>{let{onClose:n}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.MenuGroup,null,e.map((e=>(0,r.createElement)(v,{key:e.id,onClose:n,product:e})))),(0,r.createElement)(i.MenuGroup,null,(0,r.createElement)(k,{onClose:n})))})))}},60510:function(e,t,n){"use strict";n.d(t,{Z:function(){returns}});varr=n(52175),a=n(9818),o=n(72067),i=n(99307);functions(e){constt=(0,i.j3)(),{selectBlock:n}=(0,a.useDispatch)(r.store),{enableComplementaryArea:s}=(0,a.useDispatch)("core/interface"),{closePublishSidebar:c}=(0,a.useDispatch)(o.store);return()=>{switch(e&&n(e),t){casei.fH:returns("core/edit-site","edit-site/block-inspector");casei.CG:returns("core/edit-widgets","edit-widgets/block-inspector");default:c(),s("core/edit-post","edit-post/block")}}}},51585:function(e,t,n){"use strict";n.d(t,{_:function(){returnc},l:function(){returni}});varr=n(65736),a=n(14436);const__=r.__,o={"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 payment plan.","jetpack"),[a.DM]:__("Thesubscribebuttonw
__("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:c(),label:__("View my plan","jetpack")}]}})}}}})()},80425:function(e,t,n){"object"==typeofwindow&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},31985:function(e,t,n){"use strict";n.d(t,{S:function(){returnc},Z:function(){returns}});varr=n(13419),a=n(4981),o=n(92694);consti="jetpack/";functions(e,t){letn=arguments.length>2&&void0!==arguments[2]?arguments[2]:[],s=!(arguments.length>3&&void0!==arguments[3])||arguments[3];constc=e.startsWith(i),l=c?e.slice(i.length):e,{available:u,details:d,unavailableReason:p}=(0,r.OZ)(l),m=(0,r._D)(p,d),h=s||c?i:"";if(!u&&!m)return!1;constg=h+l,f=(0,a.registerBlockType)(g,t);returnm&&(0,o.addFilter)("editor.BlockListBlock",`${g}-with-has-warning-is-interactive-class-names`,(0,r.T)(g)),n.forEach((e=>(0,a.registerBlockType)(h+e.name,e.settings))),f}functionc(e,t,n,a){consto={...t,icon:(0,r.lt)(e)},{variations:i}=e;returnArray.isArray(i)&&i.length>0&&(o.variations=i.map((e=>({...e,icon:(0,r.lt)(e)})))),s(e.name,o,n,a)}},36598:function(e,t,n){"use strict";varr=n(51806),a=n(70444);t.Z=function(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void0!==arguments[2]?arguments[2]:24,o=arguments.length>3&&void0!==arguments[3]?arguments[3]:"0 0 24 24";return(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:o},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)}},66425:function(e,t,n){"use strict";varr=n(51806),a=n(52175);t.Z=(e,t,n,o,i)=>{const{isSelected:s}=t,c=t.attributes[e];return(0,r.createElement)("div",{className:s?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!s&&""!==c&&o(t),(s||""===c)&&(0,r.createElement)(a.PlainText,{value:c,placeholder:n,"aria-label":n,onChange:i}))}},92713:function(e,t,n){"use strict";varr=n(9818),a=n(65736);n(53961);const__=a.__;if("undefined"!=typeofwindow&&window.location){conste=newURLSearchParams(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:function(e,t,n){"use strict";n.d(t,{Z:function(){returni}});varr=n(86989),a=n.n(r),o=n(92819);functioni(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:o.noop;returnt(!0),newPromise(((n,r)=>{a()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((a=>{t(!1);consto=a.status?parseInt(a.status,10):null;o&&o>=400?r():n(a.url||e)}),(()=>{t(!1),r()}))}))}},46867:function(e,t,n){"use strict";n.d(t,{Z:function(){returni}});varr=n(9818),a=n(69307),o=n(92819);functioni(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:o.noop;const[n,i]=(0,a.useState)(!1),{isAutosaveablePost:s,isDirtyPost:c,currentPost:l}=(0,r.useSelect)((e=>{constt=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}}),[]),u=Object.keys(l).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=asynce=>{e.preventDefault(),u?c&&s&&awaitp(e):await(async()=>{for(lete=0;e<m.length;e++)await(0,r.dispatch)("core").saveEditedEntityRecord(m[e].kind,m[e].name,m[e].key)})()};return{autosave:h,autosaveAndRedirect:asyncr=>{r.preventDefault(),n||(i(!0),h(r).then((()=>{!function(e,t){letn=arguments.length>2&&void0!==arguments[2]&&arguments[2];t&&t(e),n?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)})))},isRedirecting:n}}},78798:function(e,t,n){"use strict";n.d(t,{Z:function()
__("Minimum allowed price is %s.","jetpack"),(0,r.ZP)(y,v)),g),voida(!1);if(!(0,l.vs)(v,k))return(0,d.q)((0,c.l)("product requires a valid price",t),g),voida(!1);try{constr=awaito()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),i={id:r.id,title:r.title,interval:r.interval,price:r.price,currency:r.currency},s=g.select(u.G4).getProducts();h(p(s.concat([i]))),n(i.id),m&&(0,d.w)((0,c.l)("successfully created product",t),g),a(!0)}catch(e){(0,d.q)((0,c.l)("there was an error when adding the product",t),g),a(!1)}}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e})},23267:function(e,t,n){"use strict";n.d(t,{G4:function(){returnr},P:function(){returni},cH:function(){returno},lp:function(){returna}});constr="jetpack/membership-products",a=0,o=1,i=2},7652:function(e,t,n){"use strict";n.d(t,{h:function(){returnl}});varr=n(9818),a=n(6247),o=n(23267),i=n(93100),s=n(20360),c=n(93245);constl=(0,r.createReduxStore)(o.G4,{actions:a,reducer:i.Z,resolvers:s,selectors:c,__experimentalUseThunks:!0});(0,r.register)(l)},93100:function(e,t,n){"use strict";n.d(t,{Z:function(){returna}});constr={products:[],apiState:n(23267).lp,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null}};functiona(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void0;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}}returne}},20360:function(e,t,n){"use strict";n.r(t),n.d(t,{getNewsletterProducts:function(){returnv},getProducts:function(){returnk},getSubscriberCounts:function(){returny}});varr=n(86989),a=n.n(r),o=n(12238),i=n(96483),s=n(14436),c=n(51585),l=n(73905),u=n(74251),d=n(6247),p=n(23267),m=n(46529);consth="membership-products-resolver-getProducts",g="membership-products-resolver-getSubscriberCounts";letf=!1;constb=(e,t,n)=>{if(e)return;constr=n.getProductsNoResolver()[0]?.id;r&&t(r)},v=function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:s.Bn;returnk(e,arguments.length>1&&void0!==arguments[1]?arguments[1]:0,arguments.length>2&&void0!==arguments[2]?arguments[2]:()=>{},!1)},k=function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:s.Bn,t=arguments.length>1&&void0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void0!==arguments[2]?arguments[2]:()=>{},r=!(arguments.length>3&&void0!==arguments[3])||arguments[3];returnasyncs=>{let{dispatch:g,registry:v,select:k}=s;if(awaitl.Z.blockExecution(h),f)returnvoidb(t,n,k);consty=l.Z.acquire(h);try{consts=await(async()=>{conste=(0,i.getQueryArg)(window.location.href,"origin"),t=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),n=awaita()({path:t,method:"GET"});if(!n&&"object"!=typeofn)thrownewError("Unexpected API response");constr=n?.errors&&Object.values(n.errors)?.[0]?.[0];if(r)thrownewError(r);returnn})();((e,t,n)=>{constr=t.select(o.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))})(s,v,g),(e=>!e.products.length&&e.connected_account_id)(s)&&await(async(e,t,n,r)=>{awaitn((0,d.saveProduct)({title:(0,c.l)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,(()=>{}),r))})(e,n,g,r),b(t,n,k),f=!0}catch(e){g((0,d.setConnectUrl)(null)),g((0,d.setApiState)(p.P)),(0,m.q)(e.message,v)}l.Z.release(y)}},y=()=>asynce=>{let{dispatch:t,registry:n}=e;awaitl.Z.blockExec
// translators: Default description for a Facebook post
__("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)(l.Z,{})]})}},34245:function(e,t,n){"use strict";n.d(t,{C:function(){returnl}});varr=n(30275),a=n(37580),o=n(52208),i=n(53251),s=n(3451),c=n(69133);n(59961);constl=e=>{let{url:t,user:n,customText:l,media:u,imageMode:d}=e;const[p]=(0,i.Z)({mode:d}),m="is-"+(p===a.Mf?"portrait":"landscape");return(0,r.jsxs)("div",{className:"facebook-preview__post",children:[(0,r.jsx)(c.Z,{user:n}),(0,r.jsxs)("div",{className:"facebook-preview__content",children:[l&&(0,r.jsx)(o.Z,{text:l,url:t,forceUrlDisplay:!0}),(0,r.jsx)("div",{className:"facebook-preview__body",children:u?(0,r.jsx)("div",{className:`facebook-preview__media ${m}`,children:u.map(((e,t)=>(0,r.jsx)("div",{className:`facebook-preview__media-item ${m}`,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)(s.Z,{})]})}},3451:function(e,t,n){"use strict";varr=n(30275),a=n(65736),o=n(69094);n(1488);const__=a.__;t.Z=()=>(0,r.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like",
// translators: refers to a social post on Facebook
__("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")}),d?(0,r.jsx)(l.C,{...u}):(0,r.jsx)(s.g,{...u})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section facebook-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children:
// translators: refers to a link to a Facebook 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 Facebook.","jetpack"),"",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),p?(0,r.jsx)(c.F,{...u}):(0,r.jsx)(s.g,{...u,compactDescription:!0,customText:"",user:void0})]})]})}},17915:function(e,t,n){"use strict";n.d(t,{X:function(){returnl}});varr=n(30275),a=n(21987);n(73443);consto=160,i=e=>{constt=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)},s=(0,a.SL)((0,a.hs)(63),(0,a.I$)(23,73),(0,a.KB)(63)),c=(0,a.SL)((0,a.hs)(o),(0,a.I$)(80,170),(0,a.KB)(o)),l=e=>{let{description:t="",siteTitle:n,title:o="",url:l=""}=e;constu=(0,a.wy)(l);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=${u}`,alt:""}),(0,r.jsxs)("div",{className:"search-preview__site",children:[(0,r.jsx)("div",{className:"search-preview__site--title",children:n||u}),(0,r.jsx)("div",{className:"search-preview__url",children:i(l)})]})]}),(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:s(o)}),(0,r.jsx)("div",{className:"search-preview__description",children:c((0,a.ju)(t))})]})})}},21987:function(e,t,n){"use strict";n.d(t,{I$:function(){returnc},KB:function(){returnl},SL:function(){returnu},YW:function(){returnm},ge:function(){returnp},hs:function(){returns},ju:function(){returnd},u_:function(){returng},wy:function(){returni}});varr=n(30275),a=n(69307),o=n(65736);consti=e=>e.replace(/^[^/]+[/]*/,"").replace(/\/.*$/,""),s=e=>t=>t.length<=e&&t,c=(e,t)=>n=>{constr=n.slice(0,t),a=r.lastIndexOf(" ");returna>e&&a<t&&r.slice(0,a).concat("…")},l=e=>t=>t.slice(0,e).concat("…"),u=function(){for(vare=arguments.length,t=newArray(e),n=0;n<e;n++)t[n]=arguments[n];returne=>t.find((t=>!1!==t(e)))?.(e)},d=function(e){constt=newRegExp(`(<([^${(arguments.length>1&&void0!==arguments[1]?arguments[1]:[]).join("")}>]+)>)`,"gi");returne?e.replace(t,""):""},p=(e,t)=>newRegExp(`<${t}[^>]*>`,"gi").test(e),m=newIntl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,h={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"};functiong(e,t){const{platform:n,maxChars:i,maxLines:s,hyperlinkHashtags:c=!0,hyperlinkUrls:l="instagram"!==n}=t;letu=d(e);if(u=u.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),i&&u.length>i&&(u=u.substring(0,i)),s){conste=u.split("\n");e.length>s&&(u=e.slice(0,s).join("\n"))}constp={};if(l){(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(c&&h[n]){conste=u.matchAll(/(^|\s)#(\w+)/g),a=h[n];[...e].forEach(((e,n)=>{let[i,s,c]=e;constl=(0,o.sprintf)(a,c,t.hashtagDomain);p[`Hashtag${n}`]=(0,r.jsx)("a",{href:l,rel:"noopener noreferrer",target:"_blank",children:`#${c}`}),u=u.replace(i,`${s}<Hashtag${n} />`)}))}returnu=u.replace(/\n/g,"<br />"),p.br=(0,r.jsx)("br",{}),(0,a.createInterpolateElement)(u,p)}},81683:function(e,t,n){"use strict";n.d(t,{A:function(){returnr},P:function(){returna}});constr=120,a=2},6828
// translators: refers to a social post on Instagram
__("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)(i.R,{...a})]})})}},24687:function(e,t,n){"use strict";n.d(t,{A:function(){returnr},P:function(){returna}});constr=212,a=3},52493:function(e,t,n){"use strict";n.d(t,{q:function(){returna}});varr=n(30275);consta=()=>(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:function(e,t,n){"use strict";n.d(t,{u:function(){returno}});varr=n(30275),a=n(98170);functiono(e){return(0,r.jsx)(a.w,{name:"",profileImage:"",...e,description:"",media:void0})}},98170:function(e,t,n){"use strict";n.d(t,{w:function(){returnc}});varr=n(30275),a=n(65736),o=n(21987),i=n(24687),s=n(52493);n(44046);const__=a.__;functionc(e){let{articleReadTime:t=5,image:n,jobTitle:c,name:l,profileImage:u,description:d,media:p,title:m,url:h}=e;constg=!!p?.length;return(0,r.jsx)("div",{className:"linkedin-preview__wrapper",children:(0,r.jsxs)("section",{className:"linkedin-preview__container "+(g?"has-media":""),children:[(0,r.jsxs)("div",{className:"linkedin-preview__header",children:[(0,r.jsx)("div",{className:"linkedin-preview__header--avatar",children:u?(0,r.jsx)("img",{src:u,alt:""}):(0,r.jsx)(s.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:
// translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc.
// translators: %d is the number of minutes it takes to read the article
__("%d min read","jetpack"),t)})]})]}):null]})]})]})})}},93453:function(e,t,n){"use strict";n.d(t,{S:function(){returnl}});varr=n(30275),a=n(55609),o=n(65736),i=n(10263),s=n(23736),c=n(98170);const__=o.__,l=e=>{let{headingLevel:t,hideLinkPreview:n,hidePostPreview:o,...l}=e;return(0,r.jsxs)("div",{className:"social-preview linkedin-preview",children:[!o&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children:
// translators: refers to a social post on LinkedIn
__("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)(c.w,{...l})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section linkedin-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children:
// translators: refers to a link to a LinkedIn 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 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)(s.u,{...l,name:"",profileImage:""})]})]})}},64011:function(e,t,n){"use strict";n.d(t,{q:function(){returnr}});constr="mastodon.social"},82335:function(e,t,n){"use strict";n.d(t,{Eu:function(){returns},WV:function(){returnc},eP:function(){returnl},tZ:function(){returni}});varr=n(21987),a=n(64011);consto=/^@([^@]*)@([^@]*)$/i,i=e=>(0,r.SL)((0,r.hs)(200),(0,r.KB)(200))((0,r.ju)(e))||"",s=(e,t)=>{const{instance:n,offset:a}=t;return(0,r.u_)(e,{platform:"mastodon",maxChars:470-a,hashtagDomain:n})},c=e=>(0,r.SL)((0,r.hs)(30),(0,r.KB)(30))((0,r.ju)(e))||"",l=e=>{constt=e.match(o);return{username:t?.[1]||"",instance:t?.[2]||a.q}}},16534:function(e,t,n){"use strict";n.d(t,{W:function(){returnc}});varr=n(30275),a=n(93397),o=n(3440),i=n(37951),s=n(52664);n(46154);constc=e=>{const{user:t}=e;return(0,r.jsxs)("div",{className:"mastodon-preview__post",children:[(0,r.jsx)(s.Z,{user:t}),(0,r.jsx)(o.Z,{...e}),(0,r.jsx)(i.Z,{...e}),(0,r.jsx)(a.Z,{})]})}},67686:function(e,t,n){"use strict";n.d(t,{h:function(){returnc}});varr=n(30275),a=n(65736),o=n(93397),i=n(3440),s=n(52664);n(46154);const__=a.__,c=e=>{const{user:t,customImage:n,image:a}=e,c=n||a;return(0,r.jsxs)("div",{className:"mastodon-preview__post",children:[(0,r.jsx)(s.Z,{user:t}),(0,r.jsx)(i.Z,{...e,children:c&&(0,r.jsx)("img",{className:"mastodon-preview__img",src:c,alt:__("Mastodon preview thumbnail","jetpack")})}),(0,r.jsx)(o.Z,{})]})}},93397:function(e,t,n){"use strict";varr=n(30275),a=n(65736),o=n(34525);n(7679);const__=a.__;t.Z=()=>(0,r.jsx)("div",{className:"mastodon-preview__post-actions",children:(0,r.jsx)("ul",{children:[{icon:"reply",
// translators: refers to a social post on Mastodon
__("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)(c.h,{...l})]}),!o&&(0,r.jsxs)("section",{className:"social-preview__section mastodon-preview__section",children:[(0,r.jsx)(i.O,{level:t,children:
// translators: refers to a link to a Mastodon 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 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)(s.W,{...l,user:void0})]})]})}},10263:function(e,t,n){"use strict";n.d(t,{O:function(){returno}});varr=n(30275);consta=[2,3,4,5,6],o=e=>{let{className:t,level:n,children:o}=e;consti=`h${n&&a.includes(n)?n:3}`;return(0,r.jsx)(i,{className:`social-preview__section-heading ${t??""}`,children:o})};t.Z=o},80748:function(e,t,n){"use strict";n.d(t,{G:function(){returno},M:function(){returna}});varr=n(21987);consta=e=>(0,r.SL)((0,r.hs)(1e3),(0,r.KB)(1e3))((0,r.ju)(e))||"",o=e=>(0,r.SL)((0,r.hs)(400),(0,r.KB)(400))((0,r.ju)(e))||""},96492:function(e,t,n){"use strict";n.d(t,{H:function(){returnl}});varr=n(30275),a=n(65736),o=n(21987),i=n(80748),s=n(91100),c=n(5536);n(5609);const__=a.__,l=e=>{let{title:t,description:n,image:a,user:l,url:u}=e;constd=l?.avatarUrl;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)(c.Z,{user:l}),(0,r.jsxs)("div",{className:"tumblr-preview__window",children:[a&&(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,i.M)(t)})}),(0,r.jsx)("img",{className:"tumblr-preview__image",src:a,alt:__("Tumblr preview thumbnail","jetpack")})]}),(0,r.jsxs)("div",{className:"tumblr-preview__window-bottom "+(a?"":"is-full"),children:[!a&&(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,i.M)(t)}),n&&a&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,i.G)(n)}),u&&(0,r.jsx)("div",{className:"tumblr-preview__site-name",children:(0,o.wy)(u)})]})]}),(0,r.jsx)(s.Z,{})]})]})}},97450:function(e,t,n){"use strict";n.d(t,{x:function(){returnc}});varr=n(30275),a=n(65736),o=n(80748),i=n(91100),s=n(5536);n(5609);const__=a.__,c=e=>{let{title:t,description:n,image:a,user:c,url:l,customText:u,media:d}=e;constp=c?.avatarUrl,m=d?.[0];return(0,r.jsxs)("div",{className:"tumblr-preview__post",children:[p&&(0,r.jsx)("img",{className:"tumblr-preview__avatar",src:p,alt:""}),(0,r.jsxs)("div",{className:"tumblr-preview__card",children:[(0,r.jsx)(s.Z,{user:c}),(0,r.jsxs)("div",{className:"tumblr-preview__body",children:[(0,r.jsx)("div",{className:"tumblr-preview__title",children:(0,o.M)(t)}),u&&(0,r.jsx)("div",{className:"tumblr-preview__custom-text",children:u}),n&&(0,r.jsx)("div",{className:"tumblr-preview__description",children:(0,o.G)(n)}),m?(0,r.jsx)("div",{className:"tumblr-preview__media-item",children:m.type.startsWith("video/")?(0,r.jsx)("video",{controls:!0,className:"tumblr-preview__media--video",children:(0,r.jsx)("source",{src:m.url,type:m.type})}):(0,r.jsx)("img",{className:"tumblr-preview__image",src:a,alt:""})}):a&&(0,r.jsx)("img",{className:"tumblr-preview__image",src:a,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)(i.Z,{})]})]})}},91100:function(e,t,n){"use strict";varr=n(30275),a=n(65736),o=n(22313);n(91680);const__=a.__;t.Z=()=>(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)(o.Z,{name:"blaze"}),"Blaze"]}),(0,r.jsx)("ul",{children:[{icon:"delete",
__("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)(c.x,{...l})]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section tumblr-preview__section",children:[(0,r.jsx)(i.O,{level:t,children:
// translators: refers to a social post on Twitter
__("Your post","jetpack")}),(0,r.jsx)("p",{className:"social-preview__section-desc",children:__("This is what your social post will look like on Twitter:","jetpack")}),l.map(((e,t)=>{constn=t+1===l.length;return(0,r.jsx)(c.g,{...e,showThreadConnector:!n},`twitter-preview__tweet-${t}`)}))]}),!n&&(0,r.jsxs)("section",{className:"social-preview__section twitter-preview__section",children:[(0,r.jsx)(i.Z,{level:t,children:
// translators: refers to a link to a Twitter 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 Twitter.","jetpack"),"",(0,r.jsx)(a.ExternalLink,{href:"https://jetpack.com/support/jetpack-social-image-generator",children:__("Learn more about links","jetpack")})]}),(0,r.jsx)(s.m,{...l[0],name:"",profileImage:"",screenName:""})]})]}):null}},15850:function(e,t,n){"use strict";n.d(t,{P:function(){returno}});varr=n(30275),a=n(55609);consto=e=>{let{tweet:t}=e;returnt?(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="${t}"></a></blockquote>`,scripts:["https://platform.twitter.com/widgets.js"],title:"Embedded tweet"}),(0,r.jsx)("div",{className:"twitter-preview__quote-tweet-overlay"})]}):null}},94615:function(e,t,n){"use strict";n.d(t,{Y:function(){returni}});varr=n(30275),a=n(65736),o=n(42029);const__=a.__,i=e=>{let{profileImage:t,showThreadConnector:n}=e;return(0,r.jsxs)("div",{className:"twitter-preview__sidebar",children:[(0,r.jsx)("div",{className:"twitter-preview__profile-image",children:t?(0,r.jsx)("img",{alt:__("Twitter profile image","jetpack"),src:t}):(0,r.jsx)(o.q,{})}),n&&(0,r.jsx)("div",{className:"twitter-preview__connector"})]})}},98969:function(e,t,n){"use strict";n.d(t,{x:function(){returno}});varr=n(30275),a=n(21987);consto=e=>{let{text:t,url:n,retainUrl:o}=e;if(!t)returnnull;consti=n&&!o&&t.endsWith(n)?t.substring(0,t.lastIndexOf(n)):t;return(0,r.jsx)("div",{className:"twitter-preview__text",children:(0,a.u_)(i,{platform:"twitter"})})}},51128:function(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;constn="color: "+this.color;t.splice(1,0,n,"color: inherit");letr=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(){lete;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeofprocess&&"env"inprocess&&(e=process.env.DEBUG);returne},t.useColors=function(){if("undefined"!=typeofwindow&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeofdocument&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeofwindow&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{returnlocalStorage}catch(e){}}(),t.destroy=(()=>{lete=!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","#