← Back
Editing: index.js
/*! For license information please see index.js.LICENSE.txt */ (()=>{"use strict";var e,t,o={11789:(e,t,o)=>{o.d(t,{A:()=>r});var n=o(86087),r=(0,n.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,n.cloneElement)(e,{width:t,height:t,...o,ref:r}))},71881:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(39793),r=o(5573),i=(0,n.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(r.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})})},36777:(e,t,o)=>{o.d(t,{x:()=>f});var n=o(56427),r=o(27723),i=o(86087),a=o(47143),s=o(39793);const l=({groupedTags:e,activeCategory:t,onCategorySelect:o})=>{const a=e=>e===t?"woocommerce-personalization-tags-modal-menu-item-active":"";return(0,s.jsxs)(n.MenuGroup,{className:"woocommerce-personalization-tags-modal-menu",children:[(0,s.jsx)(n.MenuItem,{onClick:()=>o(null),className:a(null),children:(0,r.__)("All","woocommerce")}),(0,s.jsx)("div",{className:"woocommerce-personalization-tags-modal-menu-separator","aria-hidden":"true",role:"presentation","data-testid":"woocommerce-personalization-tags-modal-menu-separator"}),Object.keys(e).map((e,t,r)=>(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(n.MenuItem,{onClick:()=>o(e),className:a(e),children:e}),t<r.length-1&&(0,s.jsx)("div",{className:"woocommerce-personalization-tags-modal-menu-separator","aria-hidden":"true",role:"presentation","data-testid":"woocommerce-personalization-tags-modal-menu-separator"})]},e))]})};var c=o(94715);const d=({groupedTags:e,activeCategory:t,onInsert:o,canInsertLink:i,closeCallback:l,openLinkModal:d})=>{const{updateBlockAttributes:u}=(0,a.useDispatch)(c.store),p=(0,a.useSelect)(e=>e(c.store).getSelectedBlockClientId()),m=(0,a.useSelect)(e=>e(c.store).getBlock(p)),f=["core/button"].includes(m?.name),g=null===t?Object.entries(e):[[t,e[t]||[]]];return(0,s.jsx)(s.Fragment,{children:g.map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"woocommerce-personalization-tags-modal-category",children:e}),(0,s.jsx)("div",{className:"woocommerce-personalization-tags-modal-category-group",children:t.map(t=>{const a=/\burl\b/.test(t.token);return(0,s.jsxs)("div",{className:"woocommerce-personalization-tags-modal-category-group-item",children:[(0,s.jsxs)("div",{className:"woocommerce-personalization-tags-modal-item-text",children:[(0,s.jsx)("strong",{children:t.name}),t.valueToInsert]}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"},children:[(0,s.jsx)(n.Button,{variant:"link",onClick:()=>{o&&o(t.valueToInsert,!1)},children:(0,r.__)("Insert","woocommerce")}),f&&a&&(0,s.jsx)(n.Button,{variant:"link",onClick:()=>{u(p,{url:t.valueToInsert}),l()},children:(0,r.__)("Set as URL","woocommerce")}),e===(0,r.__)("Link","woocommerce")&&i&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(n.Button,{variant:"link",onClick:()=>{l(),d(t)},children:(0,r.__)("Insert as link","woocommerce")})})]})]},t.token)})})]},e))})},u=({onInsert:e,isOpened:t,closeCallback:o,tag:a})=>{const[l,c]=(0,i.useState)((0,r.__)("Link","woocommerce"));return t?(0,s.jsxs)(n.Modal,{size:"small",title:(0,r.__)("Insert Link","woocommerce"),onRequestClose:o,className:"woocommerce-personalization-tags-modal",children:[(0,s.jsx)(n.TextControl,{label:(0,r.__)("Link Text","woocommerce"),value:l,onChange:e=>c(e)}),(0,s.jsx)(n.Button,{isPrimary:!0,onClick:()=>{e&&e(a.token,l)},children:(0,r.__)("Insert","woocommerce")})]}):null};var p=o(76765),m=o(3597);const f=({onInsert:e,isOpened:t,closeCallback:o,canInsertLink:c=!1,openedBy:f=""})=>{const[g,h]=(0,i.useState)(null),[_,y]=(0,i.useState)(""),[b,w]=(0,i.useState)(null),[v,x]=(0,i.useState)(!1),k=(0,a.useSelect)(e=>e(m.H).getPersonalizationTagsList(),[]);if(v)return(0,s.jsx)(u,{onInsert:(t,o)=>{e(t,o),x(!1)},isOpened:v,closeCallback:()=>x(!1),tag:b});if(!t)return null;(0,p.xW)("personalization_tags_modal_opened",{openedBy:f});const S=k.reduce((e,t)=>{const{category:o,name:n,token:r}=t;return(!_||n.toLowerCase().includes(_.toLowerCase())||r.toLowerCase().includes(_.toLowerCase()))&&(e[o]||(e[o]=[]),e[o].push(t)),e},{});return(0,s.jsxs)(n.Modal,{size:"medium",title:(0,r.__)("Personalization Tags","woocommerce"),onRequestClose:()=>{o(),(0,p.yM)("personalization_tags_modal_closed",{openedBy:f})},className:"woocommerce-personalization-tags-modal",children:[(0,s.jsxs)("p",{children:[(0,r.__)("Insert personalization tags to dynamically fill in information and personalize your emails.","woocommerce")," ",(0,s.jsx)(n.ExternalLink,{href:"https://kb.mailpoet.com/article/435-a-guide-to-personalisation-tags-for-tailored-newsletters#list",onClick:()=>(0,p.yM)("personalization_tags_modal_learn_more_link_clicked",{openedBy:f}),children:(0,r.__)("Learn more","woocommerce")})]}),(0,s.jsx)(n.SearchControl,{onChange:e=>{y(e),(0,p.xW)("personalization_tags_modal_search_control_input_updated",{openedBy:f})},value:_}),(0,s.jsx)(l,{groupedTags:S,activeCategory:g,onCategorySelect:e=>{h(e),(0,p.yM)("personalization_tags_modal_category_menu_clicked",{category:e,openedBy:f})}}),(0,s.jsx)(d,{groupedTags:S,activeCategory:g,onInsert:t=>{e(t),(0,p.yM)("personalization_tags_modal_tag_insert_button_clicked",{insertedTag:t,activeCategory:g,openedBy:f})},closeCallback:o,canInsertLink:c,openLinkModal:e=>{w(e),x(!0)}})]})}},6406:(e,t,o)=>{o.d(t,{t:()=>s});var n=o(86087),r=o(56427),i=o(27723),a=o(39793);const s=({contentRef:e,onUpdate:t})=>{const[o,s]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null),[d,u]=(0,n.useState)(""),[p,m]=(0,n.useState)("");return(0,n.useEffect)(()=>{if(!e||!e.current)return;const t=e.current,o=e=>{const t=e.target.closest("span[data-rich-text-comment]");if(t){const e=t.innerText.replace(/^\[|\]$/g,"");m(e),u(e),c(t),s(!0)}};return t.addEventListener("click",o),()=>{t.removeEventListener("click",o)}},[e]),(0,a.jsx)(a.Fragment,{children:o&&l&&(0,a.jsx)(r.Popover,{position:"bottom right",onClose:()=>s(!1),anchor:l,className:"woocommerce-personalization-tag-popover",children:(0,a.jsxs)("div",{className:"woocommerce-personalization-tag-popover-content",children:[(0,a.jsx)(r.TextControl,{label:(0,i.__)("Personalization Tag","woocommerce"),value:d,onChange:e=>u(e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsxs)("div",{className:"woocommerce-personalization-tag-popover-content-buttons",children:[(0,a.jsx)(r.Button,{isTertiary:!0,onClick:()=>{s(!1)},children:(0,i.__)("Cancel","woocommerce")}),(0,a.jsx)(r.Button,{isPrimary:!0,onClick:()=>{t(p,d),s(!1)},children:(0,i.__)("Update","woocommerce")})]})]})})})}},91068:(e,t,o)=>{o.d(t,{D:()=>i,E:()=>r});var n=o(50876);const r=(e,t)=>{const o=e.current.ownerDocument.defaultView.getSelection();if(!o.rangeCount)return{start:0,end:0};const r=o.getRangeAt(0);if(null===o.anchorNode.previousSibling)return{start:o.anchorOffset,end:o.anchorOffset+r.toString().length};const i=(0,n.create)({html:t});let a=o.anchorNode.previousSibling;a=function(e){let t=e;for(;t&&t?.children?.length>0;)t=t.children[0];return t}(a);const s=function(e,t){let o=null;for(const[n,r]of t.entries())if(r)for(const t of r)t?.attributes&&e.tagName.toLowerCase()===t.tagName?.toLowerCase()&&e.getAttribute("data-link-href")===t?.attributes["data-link-href"]&&(o=n);return o}(a,i.formats);if(null!==s)return{start:s+o.anchorOffset+1,end:s+o.anchorOffset+r.toString().length};const l=function(e,t){for(const[o,n]of t.entries()){if(!n)continue;const{attributes:t}=n;if(e.getAttribute("data-rich-text-comment")===t["data-rich-text-comment"])return o}return null}(a,i.replacements);return null!==l?{start:l+o.anchorOffset+1,end:l+o.anchorOffset+r.toString().length}:{start:i.text.length,end:i.text.length+r.toString().length}},i=(e,t)=>(t.forEach(t=>{if(!e.includes(t.token.slice(0,t.token.length-1)))return;const o=t.token.substring(1,t.token.length-1).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`(?<!\x3c!--)(?<!["'])\\[(${o}(\\s[^\\]]*)?)\\](?!--\x3e)`,"g");e=e.replace(n,e=>`\x3c!--${e}--\x3e`)}),e)},68882:(e,t,o)=>{o.d(t,{O:()=>g});var n=o(56427),r=o(47143),i=o(86087),a=o(50876),s=o(94715),l=o(27723),c=o(36777),d=o(91068),u=o(3597),p=o(6406),m=o(76765),f=o(39793);function g({label:e,labelSuffix:t,help:o,placeholder:g,attributeName:h,attributeValue:_,updateProperty:y=()=>{}}){const[b,w]=(0,i.useState)(null),[v,x]=(0,i.useState)(!1),k=(0,r.useSelect)(e=>e(u.H).getPersonalizationTagsList(),[]),S=(0,i.useRef)(null),j=(0,i.useCallback)((e,t,o)=>{const n=o?.start??t.length,r=o?.end??t.length;let i=(0,a.create)({html:t});i=(0,a.insert)(i,(0,a.create)({html:`\x3c!--${e}--\x3e`}),n,r);const s=(0,a.toHTMLString)({value:i});y(h,s),w(null)},[h,y]),E=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{children:e}),(0,f.jsx)(n.Button,{className:"woocommerce-settings-panel-personalization-tags-button",icon:"shortcode",title:(0,l.__)("Personalization Tags","woocommerce"),onClick:()=>{x(!0),(0,m.yM)("rich_text_with_button_personalization_tags_shortcode_icon_clicked",{attributeName:h,label:e})}}),t]});return h?(0,f.jsxs)(n.BaseControl,{id:"",label:E,className:`woocommerce-settings-panel-${h}-text`,help:o,__nextHasNoMarginBottom:!0,children:[(0,f.jsx)(c.x,{isOpened:v,onInsert:e=>{j(e,_??"",b),x(!1),(0,m.yM)("rich_text_with_button_personalization_tags_inserted",{attributeName:h,value:e})},closeCallback:()=>x(!1),openedBy:"RichTextWithButton-BaseControl"}),(0,f.jsx)(p.t,{contentRef:S,onUpdate:(e,t)=>{const o=(_??"").replace(`\x3c!--[${e}]--\x3e`,`\x3c!--[${t}]--\x3e`);y(h,o)}}),(0,f.jsx)(s.RichText,{ref:S,className:"woocommerce-settings-panel-richtext",placeholder:g,onFocus:()=>{w((0,d.E)(S,_??""))},onKeyUp:()=>{w((0,d.E)(S,_??""))},onClick:()=>{w((0,d.E)(S,_??""))},onChange:e=>{e=(0,d.D)(e??"",k),y(h,e),(0,m.xW)("rich_text_with_button_input_field_updated",{attributeName:h})},value:_??"","data-automation-id":`email_${h}`})]}):null}},48218:(e,t,o)=>{o.d(t,{P:()=>_});var n=o(56427),r=o(47143),i=o(11789),a=o(39793),s=o(5573),l=(0,a.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(s.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),c=o(27723),d=o(86087),u=o(48558);const p=window.wp.url;var m=o(52619),f=o(3597),g=o(9193),h=o(76765);const _=(0,d.memo)(function(){const e=(0,d.useRef)(null),{requestSendingNewsletterPreview:t,togglePreviewModal:o,updateSendPreviewEmail:s}=(0,r.useDispatch)(f.H),{toEmail:_,isSendingPreviewEmail:y,sendingPreviewStatus:b,isModalOpened:w,errorMessage:v,postType:x}=(0,r.useSelect)(e=>({...e(f.H).getPreviewState(),postType:e(f.H).getEmailPostType()}),[]),k=()=>{t(_)},S=(0,d.useMemo)(()=>(0,m.applyFilters)("woocommerce_email_editor_check_sending_method_configuration_link",`https://www.mailpoet.com/blog/mailpoet-smtp-plugin/?utm_source=woocommerce_email_editor&utm_medium=plugin&utm_source_platform=${x}`),[x]),j=()=>{(0,h.yM)("send_preview_email_modal_closed"),o(!1)};return(0,d.useEffect)(()=>{w&&(e.current?.focus(),(0,h.yM)("send_preview_email_modal_opened"))},[w]),w?(0,a.jsxs)(n.Modal,{className:"woocommerce-send-preview-email",title:(0,c.__)("Send a test email","woocommerce"),onRequestClose:j,focusOnMount:!1,children:[b===g.T.ERROR?(0,a.jsxs)("div",{className:"woocommerce-send-preview-modal-notice-error",children:[(0,a.jsx)("p",{children:(0,c.__)("Sorry, we were unable to send this email.","woocommerce")}),(0,a.jsx)("strong",{children:v&&(0,c.sprintf)((0,c.__)("Error: %s","woocommerce"),v)}),(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:S&&(0,d.createInterpolateElement)((0,c.__)("Please check your <link>sending method configuration</link> with your hosting provider.","woocommerce"),{link:(0,a.jsx)("a",{href:S,target:"_blank",rel:"noopener noreferrer",onClick:()=>(0,h.yM)("send_preview_email_modal_check_sending_method_configuration_link_clicked")})})}),(0,a.jsx)("li",{children:(0,d.createInterpolateElement)((0,c.__)("Or, sign up for MailPoet Sending Service to easily send emails. <link>Sign up for free</link>","woocommerce"),{link:(0,a.jsx)("a",{href:`https://account.mailpoet.com/?s=1&g=1&utm_source=woocommerce_email_editor&utm_medium=plugin&utm_source_platform=${x}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>(0,h.yM)("send_preview_email_modal_sign_up_for_mailpoet_sending_service_link_clicked")},"sign-up-for-free")})})]})]}):null,(0,a.jsx)("p",{children:(0,c.__)("Send yourself a test email to test how your email would look like in different email apps.","woocommerce")}),(0,a.jsx)(n.TextControl,{label:(0,c.__)("Send to","woocommerce"),onChange:e=>{s(e),(0,h.xW)("send_preview_email_modal_send_to_field_updated")},onKeyDown:e=>{const{keyCode:t}=e;t===u.ENTER&&(e.preventDefault(),k(),(0,h.yM)("send_preview_email_modal_send_to_field_key_code_enter"))},className:"woocommerce-send-preview-email__send-to-field",value:_,type:"email",ref:e,required:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),b===g.T.SUCCESS?(0,a.jsxs)("p",{className:"woocommerce-send-preview-modal-notice-success",children:[(0,a.jsx)(i.A,{icon:l,style:{fill:"#4AB866"}}),(0,c.__)("Test email sent successfully!","woocommerce")]}):null,(0,a.jsxs)("div",{className:"woocommerce-send-preview-modal-footer",children:[(0,a.jsx)(n.Button,{variant:"tertiary",onClick:()=>{(0,h.yM)("send_preview_email_modal_close_button_clicked"),j()},children:(0,c.__)("Cancel","woocommerce")}),(0,a.jsx)(n.Button,{variant:"primary",onClick:()=>{k(),(0,h.yM)("send_preview_email_modal_send_test_email_button_clicked")},disabled:y||!(0,p.isEmail)(_),children:y?(0,c.__)("Sending…","woocommerce"):(0,c.__)("Send test email","woocommerce")})]})]}):null})},27523:(e,t,o)=>{o.d(t,{i:()=>d});var n=o(27723),r=o(56427),i=o(47143),a=o(43656),s=o(3597),l=o(76765),c=o(39793);function d({close:e}){(0,l.xW)("edit_template_modal_opened");const{onNavigateToEntityRecord:t,template:o}=(0,i.useSelect)(e=>{const{getEditorSettings:t}=e(a.store),o=t();return{onNavigateToEntityRecord:o?.onNavigateToEntityRecord,template:e(s.H).getCurrentTemplate()}},[]);return(0,c.jsxs)(r.Modal,{size:"medium",onRequestClose:e,__experimentalHideHeader:!0,children:[(0,c.jsx)("p",{children:(0,n.__)("This template is used by multiple emails. Any changes made would affect other emails on the site. Are you sure you want to edit the template?","woocommerce")}),(0,c.jsxs)(r.Flex,{justify:"end",children:[(0,c.jsx)(r.FlexItem,{children:(0,c.jsx)(r.Button,{variant:"tertiary",onClick:()=>{(0,l.yM)("edit_template_modal_cancel_button_clicked"),e()},children:(0,n.__)("Cancel","woocommerce")})}),(0,c.jsx)(r.FlexItem,{children:(0,c.jsx)(r.Button,{variant:"primary",onClick:()=>{(0,l.yM)("edit_template_modal_continue_button_clicked",{templateId:o.id}),t?.({postId:o.id,postType:"wp_template"})},disabled:!o.id||!t,children:(0,n.__)("Edit template","woocommerce")})})]})]})}},70440:(e,t,o)=>{o.d(t,{L:()=>p,O:()=>f});var n=o(27723),r=o(52619),i=o(86087),a=o(56427),s=o(43656),l=o(68882),c=o(76765),d=o(39793);const u={recordEvent:c.yM,recordEventOnce:c.xW,debouncedRecordEvent:c.T7},{Fill:p,Slot:m}=(0,a.createSlotFill)("WooCommerceEmailEditorPostSummarySection");function f(){const e=(0,i.useMemo)(()=>(0,r.applyFilters)("woocommerce_email_editor_setting_sidebar_extension_component",l.O,u),[]);return(0,d.jsxs)(s.PluginDocumentSettingPanel,{name:"email-settings-panel",title:(0,n.__)("Settings","woocommerce"),className:"woocommerce-email-editor__settings-panel",children:[(0,d.jsx)(m,{}),(0,d.jsx)(s.ErrorBoundary,{canCopyContent:!0,children:(0,d.jsx)(e,{})})]})}},47041:(e,t,o)=>{o.d(t,{x:()=>m});var n=o(56427),r=o(27723),i=o(47143),a=o(86087),s=o(3597),l=o(27523),c=o(78147),d=o(76765),u=o(24737),p=o(39793);function m(){const{template:e,currentEmailContent:t,canUpdateTemplates:o,postType:m}=(0,i.useSelect)(e=>({template:e(s.H).getCurrentTemplate(),currentEmailContent:e(s.H).getEditedEmailContent(),canUpdateTemplates:e(s.H).canUserEditTemplates(),postType:e(s.H).getEmailPostType()}),[]),[f]=(0,u.p)("swap"),[g,h]=(0,a.useState)(!1),[_,y]=(0,a.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[e&&(0,p.jsx)(n.PanelRow,{children:(0,p.jsxs)(n.Flex,{justify:"start",children:[(0,p.jsx)(n.FlexItem,{className:"editor-post-panel__row-label",children:(0,r.__)("Template","woocommerce")}),(0,p.jsxs)(n.FlexItem,{children:[!(f?.length>1||o)&&(0,p.jsx)("b",{children:e?.title}),(f?.length>1||o)&&(0,p.jsx)(n.DropdownMenu,{icon:null,text:e?.title,toggleProps:{variant:"tertiary"},label:(0,r.__)("Template actions","woocommerce"),onToggle:t=>(0,d.yM)("sidebar_template_actions_clicked",{currentTemplate:e?.title,isOpen:t}),children:({onClose:e})=>(0,p.jsxs)(p.Fragment,{children:[o&&(0,p.jsx)(n.MenuItem,{onClick:()=>{(0,d.yM)("sidebar_template_actions_edit_template_clicked"),h(!0),e()},children:(0,r.__)("Edit template","woocommerce")}),f?.length>1&&(0,p.jsx)(n.MenuItem,{onClick:()=>{(0,d.yM)("sidebar_template_actions_swap_template_clicked"),y(!0),e()},children:(0,r.__)("Swap template","woocommerce")})]})})]})]})}),g&&(0,p.jsx)(l.i,{close:()=>((0,d.yM)("edit_template_modal_closed"),h(!1))}),_&&(0,p.jsx)(c.i,{onSelectCallback:()=>y(!1),closeCallback:()=>y(!1),previewContent:t,postType:m})]})}},78147:(e,t,o)=>{o.d(t,{i:()=>cn});var n=o(86087),r=o(43656),i=o(3582),a=o(47143),s=o(56427),l=o(27723),c=o(51609),d=o.t(c,2);const u="undefined"!=typeof document?c.useLayoutEffect:()=>{},p={...d},m={};function f(e,t){const o=c.useRef(m);return o.current===m&&(o.current=e(t)),o}const g=p.useInsertionEffect,h=g&&g!==p.useLayoutEffect?g:e=>e();function _(e){const t=f(y).current;return t.next=e,h(t.effect),t.trampoline}function y(){const e={next:void 0,callback:b,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function b(){}const w=function(e,...t){const o=new URL("https://base-ui.com/production-error");return o.searchParams.set("code",e.toString()),t.forEach(e=>o.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${o} for the full message.`};function v(e,t,o,n){const r=f(x).current;return function(e,t,o,n,r){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==n||e.refs[3]!==r}(r,e,t,o,n)&&k(r,[e,t,o,n]),r.callback}function x(){return{callback:null,cleanup:null,refs:[]}}function k(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=o){const n=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const r=t[e];if(null!=r)switch(typeof r){case"function":{const t=r(o);"function"==typeof t&&(n[e]=t);break}case"object":r.current=o}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const o=t[e];if(null!=o)switch(typeof o){case"function":{const t=n[e];"function"==typeof t?t():o(null);break}case"object":o.current=null}}}}}}const S=parseInt(c.version,10);function j(e){return S>=e}function E(e){if(!c.isValidElement(e))return null;const t=e,o=t.props;return(j(19)?o?.ref:t.ref)??null}function C(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}function T(){}const M=Object.freeze([]),P=Object.freeze({}),N={};function z(e,t,o,n,r){if(!(o||n||r||e))return R(t);let i=R(e);return t&&(i=I(i,t)),o&&(i=I(i,o)),n&&(i=I(i,n)),r&&(i=I(i,r)),i}function R(e){return B(e)?{...L(e,N)}:function(e){const t={...e};for(const e in t){const o=t[e];A(e,o)&&(t[e]=$(o))}return t}(e)}function I(e,t){return B(t)?L(t,e):function(e,t){if(!t)return e;for(const o in t){const n=t[o];switch(o){case"style":e[o]=C(e.style,n);break;case"className":e[o]=O(e.className,n);break;default:A(o,n)?e[o]=H(e[o],n):e[o]=n}}return e}(e,t)}function A(e,t){const o=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2);return 111===o&&110===n&&r>=65&&r<=90&&("function"==typeof t||void 0===t)}function B(e){return"function"==typeof e}function L(e,t){return B(e)?e(t):e??N}function H(e,t){return t?e?(...o)=>{const n=o[0];if(V(n)){const r=n;F(r);const i=t(...o);return r.baseUIHandlerPrevented||e?.(...o),i}const r=t(...o);return e?.(...o),r}:$(t):e}function $(e){return e?(...t)=>{const o=t[0];return V(o)&&F(o),e(...t)}:e}function F(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function O(e,t){return t?e?t+" "+e:t:e}function V(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}function D(e,t,o={}){let n=t.render;!1!==o.enabled&&(n=function(e){if(e?.$$typeof!==W)return e;const t=c.Children.toArray(e)[0];return c.isValidElement(t)?t:e}(n));const r=function(e,t,o){const{className:n,style:r}=e,{state:i=P,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,d=c?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,u=c?function(e,t){return"function"==typeof e?e(t):e}(r,i):void 0,p=c?function(e,t){const o={};for(const n in e){const r=e[n];if(t?.hasOwnProperty(n)){const e=t[n](r);null!=e&&Object.assign(o,e);continue}!0===r?o[`data-${n.toLowerCase()}`]="":r&&(o[`data-${n.toLowerCase()}`]=r.toString())}return o}(i,l):P,m=c&&s?function(e){return Array.isArray(e)?function(e){if(0===e.length)return N;if(1===e.length)return R(e[0]);let t=R(e[0]);for(let o=1;o<e.length;o+=1)t=I(t,e[o]);return t}(e):z(void 0,e)}(s):void 0,g=c?C(p,m)??{}:P;return"undefined"!=typeof document&&(c?Array.isArray(a)?g.ref=function(e){const t=f(x).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,o)=>e!==t[o])}(t,e)&&k(t,e),t.callback}([g.ref,E(o),...a]):g.ref=v(g.ref,E(o),a):v(null,null)),c?(void 0!==d&&(g.className=O(g.className,d)),void 0!==u&&(g.style=C(g.style,u)),g):P}(t,o,n);return!1===o.enabled?null:function(e,t,o,n){if(t){if("function"==typeof t)return t(o,n);const e=z(o,t.props);return e.ref=o.ref,c.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?(0,c.createElement)("button",{type:"button",...t,key:t.key}):"img"===e?(0,c.createElement)("img",{alt:"",...t,key:t.key}):c.createElement(e,t)}(e,o);throw new Error(w(8))}(e,n,r,o.state??P)}const W=Symbol.for("react.lazy"),G=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});var U=o(39793);function q(e){const{children:t,elementsRef:o,labelsRef:n,onMapChange:r}=e,i=_(r),[,a]=c.useState(!1),s=f(Z).current,l=f(K).current,d=c.useRef(0),p=c.useRef(!0),m=c.useRef(null),g=c.useRef(null),h=_(()=>{p.current||(p.current=!0,a(e=>!e))}),y=_((e,t)=>{l.set(e,t),h()}),b=_(e=>{l.delete(e),h()}),w=_(e=>{const t=new Map;return o.current.length=0,n&&(n.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),o.current[e.index]=e.element,n&&(n.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),d.current=o.current.length,t}),v=_(()=>{const[e,t]=function(e){const t=new Set,o=[],n=[];e.forEach((e,r)=>{if(!r.isConnected)return;const i=e.index,a={index:i??-1,element:r,registration:e};null===i?n.push(a):i>=0&&(t.add(i),o.push(a))});let r=0;return n.sort((e,t)=>J(e.element,t.element)),n.forEach(e=>{for(;t.has(r);)r+=1;e.index=r,o.push(e),r+=1}),t.size>0&&o.sort((e,t)=>e.index-t.index),[o,n.map(e=>e.element)]}(l),o=w(e),n=m.current,r=!n||n.length!==e.length||e.some((e,t)=>{const o=n[t];return e.index!==o.index||e.element!==o.element||e.registration.index!==o.registration.index||e.registration.metadata!==o.registration.metadata});!function(e){if(g.current?.disconnect(),g.current=null,"function"!=typeof MutationObserver||e.length<2)return;const t=new MutationObserver(o=>{if(!function(e){for(const t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(o))return;let n=null;for(const o of e)if(o.isConnected){if(n&&J(n,o)>0)return t.disconnect(),void h();n=o}});g.current=t;const o=new Set;for(let t=1;t<e.length;t+=1){const n=Y(e[t-1],e[t]);n&&o.add(n)}o.forEach(e=>t.observe(e,{childList:!0}))}(t),m.current=e,p.current=!1,r&&(s.forEach(e=>e(o)),i(o))});u(()=>(!p.current&&m.current&&w(m.current),()=>{o.current=[],n&&(n.current=[])}),[o,n,w]),u(()=>{p.current&&v()}),u(()=>()=>{g.current?.disconnect(),p.current=!0},[]);const x=_(e=>(s.add(e),()=>{s.delete(e)})),k=c.useMemo(()=>({register:y,unregister:b,subscribeMapChange:x,nextIndexRef:d}),[y,b,x,d]);return(0,U.jsx)(G.Provider,{value:k,children:t})}function K(){return new Map}function Z(){return new Set}function Y(e,t){let o=e.parentElement;for(;o&&!o.contains(t);)o=o.parentElement;return o}function J(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const X=c.createContext(void 0);function Q(){const e=c.useContext(X);if(void 0===e)throw new Error(w(64));return e}const ee="data-activation-direction",te={tabActivationDirection:e=>({[ee]:e})};function oe(e,t,o,n){let r=!1,i=!1;const a=n??P;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:o,...a}}const ne="missing",re="initial",ie=c.forwardRef(function(e,t){const{className:o,defaultValue:n=0,onValueChange:r,orientation:i="horizontal",render:a,value:s,style:l,...d}=e,p=void 0!==e.defaultValue,m=c.useRef([]),[f,g]=c.useState(()=>new Map),[h,y]=function({controlled:e,default:t,name:o,state:n="value"}){const{current:r}=c.useRef(void 0!==e),[i,a]=c.useState(t);return[r&&void 0!==e?e:i,c.useCallback(e=>{r||a(e)},[])]}({controlled:s,default:n,name:"Tabs",state:"value"}),b=void 0!==s,[w,v]=c.useState(()=>new Map),x=c.useRef(void 0),k=c.useCallback(e=>ae(w,e),[w]),[S,j]=c.useState(()=>({previousValue:h,tabActivationDirection:"none"})),{previousValue:E,tabActivationDirection:C}=S;let T=C,M=!1;E!==h&&(T=se(E,h,i,w),M=null!=E&&null!=h&&null==k(h));const P=M?E:h,N=E!==P||C!==T;u(()=>{N&&j({previousValue:P,tabActivationDirection:T})},[P,N,T]);const z=_((e,t)=>{const o=se(h,e,i,w);t.activationDirection=o,r?.(e,t),t.isCanceled||y(e)}),R=_((e,t)=>{r?.(e,oe(t,void 0,void 0,{activationDirection:"none"}))}),I=_((e,t)=>(g(o=>{const n=new Map(o);return n.set(e,t),n}),()=>{g(o=>{if(o.get(e)!==t)return o;const n=new Map(o);return n.delete(e),n})})),A=c.useCallback(e=>f.get(e),[f]),B=c.useCallback(e=>{for(const t of w.values())if(e===t.value)return t.id},[w]),L=c.useMemo(()=>({getTabElementBySelectedValue:k,getTabIdByPanelValue:B,getTabPanelIdByValue:A,onValueChange:z,orientation:i,registerMountedTabPanel:I,setTabMap:v,tabActivationDirection:T,value:h}),[k,B,A,z,i,I,v,T,h]),H=c.useMemo(()=>{for(const e of w.values())if(e.value===h)return e},[w,h]),$=c.useMemo(()=>{for(const e of w.values())if(!e.disabled)return e.value},[w]),F=c.useRef(!p),O=c.useRef(n),V=c.useRef(p),W=c.useRef(!1);u(()=>{if(b)return;function e(e,t){y(e),j({previousValue:e,tabActivationDirection:"none"}),R(e,t),F.current=!1}if(0===w.size)return void(W.current&&null!==h&&!x.current?.isConnected&&e(null,ne));W.current=!0,x.current=w.keys().next().value;const t=H?.disabled,o=null==H&&null!==h;if(t||h!==O.current||(V.current=!1),V.current&&t&&h===O.current)return;const n=F.current;if(t||o){const o=$??null;if(h===o)return void(F.current=!1);let r=ne;return n?r=re:t&&(r="disabled"),void e(o,r)}n&&null!=H&&(R(h,re),F.current=!1)},[$,b,R,H,y,w,h]);const G=D("div",e,{state:{orientation:i,tabActivationDirection:T},ref:t,props:d,stateAttributesMapping:te});return(0,U.jsx)(X.Provider,{value:L,children:(0,U.jsx)(q,{elementsRef:m,children:G})})});function ae(e,t){for(const[o,n]of e.entries())if(t===n.value)return o;return null}function se(e,t,o,n){if(null==e||null==t)return"none";const[r,i,a]="horizontal"===o?["left","left","right"]:["top","up","down"],s=ae(n,e),l=ae(n,t);if(null==s||null==l)return s===l||"number"!=typeof e&&"string"!=typeof e||typeof e!=typeof t?"none":t>e?a:i;const c=s.getBoundingClientRect()[r],d=l.getBoundingClientRect()[r];return d<c?i:d>c?a:"none"}var le=function({children:e}){return(0,U.jsx)(U.Fragment,{children:e})},ce=(0,n.forwardRef)(function({...e},t){return(0,U.jsx)(le,{children:(0,U.jsx)(ie,{ref:t,...e})})}),de=o(4921);function ue(e){return j(19)?e:e?"true":void 0}let pe=0;const me=p.useId;function fe(e){return function(e,t){if(void 0!==me){const o=me();return e??(t?`${t}-${o}`:o)}return function(e,t="mui"){const[o,n]=c.useState(e),r=e||o;return c.useEffect(()=>{null==o&&(pe+=1,n(`${t}-${pe}`))},[o,t]),r}(e,t)}(e,"base-ui")}const ge="data-starting-style",he="data-ending-style",_e={[ge]:""},ye={[he]:""},be={transitionStatus:e=>"starting"===e?_e:"ending"===e?ye:null},we=window.ReactDOM,ve=null;globalThis.requestAnimationFrame;let xe=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let o=0;o<t.length;o+=1)t[o]?.(e)};request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class ke{static create(){return new ke}static request(e){return xe.request(e)}static cancel(e){return xe.cancel(e)}currentId=ve;request(e){this.cancel(),this.currentId=xe.request(()=>{this.currentId=ve,e()})}cancel=()=>{this.currentId!==ve&&(xe.cancel(this.currentId),this.currentId=ve)};disposeEffect=()=>this.cancel}let Se=null;function je(e,t=!1,o=!1){const n=function(){const e=f(ke.create).current;var t;return t=e.disposeEffect,c.useEffect(t,M),e}();return _((r,i=null)=>{n.cancel();const a=null==(s=e)?s:"current"in s?s.current:s;var s;if(null==a)return;const l=a,c=()=>{o?function(){if(!Se){const e=[];Se=e,queueMicrotask(()=>{Se=null,we.flushSync(()=>{for(const t of e)t()})})}Se.push(()=>{i?.aborted||r()})}():we.flushSync(r)};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{if(t){const e=ge;if(!l.hasAttribute(e))return void n.request(d);const t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),d())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}n.request(d)}function d(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||c()},()=>{i?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?d():c())})}})}function Ee(e={}){const{guess:t,label:o,metadata:n,textRef:r,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,nextIndexRef:d}=c.useContext(G),p=c.useRef(-1),[m,f]=c.useState(null==i&&t?()=>{if(-1===p.current){const e=d.current;d.current+=1,p.current=e}return p.current}:-1),g=i??m,h=c.useRef(null),_=c.useCallback(e=>{const t=h.current;t&&s(t),h.current=e,e&&a(e,{metadata:n??null,index:i??null,label:o,textRef:r})},[i,a,s,n,o,r]);return u(()=>{if(null==i)return l(e=>{const t=h.current?e.get(h.current)?.index:null;null!=t&&f(t)})},[i,l]),{ref:_,index:g}}const Ce="data-index",Te={...te,...be},Me=c.forwardRef(function(e,t){const{className:o,value:n,render:r,keepMounted:i=!1,style:a,...s}=e,{value:l,getTabIdByPanelValue:d,orientation:p,tabActivationDirection:m,registerMountedTabPanel:f}=Q(),g=fe(),{ref:h,index:y}=Ee(),b=n===l,{mounted:w,transitionStatus:v,setMounted:x}=function(e,t=!1,o=!1,n=!1){const[r,i]=c.useState(e&&t?"idle":void 0),[a,s]=c.useState(e&&!n);return e&&!a&&(s(!0),i("starting")),e||!a||"ending"===r||o||i("ending"),e||a||"ending"!==r||i(void 0),u(()=>{if(!e&&a&&"ending"!==r&&o){const e=ke.request(()=>{i("ending")});return()=>{ke.cancel(e)}}},[e,a,r,o]),u(()=>{if(!e||t)return;const o=ke.request(()=>{i(void 0)});return()=>{ke.cancel(o)}},[t,e]),u(()=>{if(!e||!t)return;e&&a&&"idle"!==r&&i("starting");const o=ke.request(()=>{i("idle")});return()=>{ke.cancel(o)}},[t,e,a,r]),{mounted:a,setMounted:s,transitionStatus:r}}(b),k=!w,S=d(n),j={hidden:k,orientation:p,tabActivationDirection:m,transitionStatus:v},E=c.useRef(null),C=D("div",e,{state:j,ref:[t,h,E],props:[{"aria-labelledby":S,hidden:k,id:g,role:"tabpanel",tabIndex:b?0:-1,inert:ue(!b),[Ce]:y},s],stateAttributesMapping:Te});return function(e){const{enabled:t=!0,open:o,ref:n,batch:r=!1,onComplete:i}=e,a=_(i),s=je(n,o,r);c.useEffect(()=>{if(!t)return;const e=new AbortController;return s(a,e.signal),()=>{e.abort()}},[t,o,a,s])}({open:b,ref:E,onComplete(){b||x(!1)}}),u(()=>{if(null!=g&&(!k||i))return f(n,g)},[k,i,n,g,f]),i||w?C:null});var Pe="data-wp-hash";function Ne(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ne();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)ze(e,o,n)}(document)),e.__wpStyleRuntime}function ze(e,t,o){if(!e.head)return;const n=Ne();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Pe}]`))if(o.getAttribute(Pe)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Pe,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Re(e,t){const o=Ne();o.styles.set(e,t);for(const n of o.documents.keys())ze(n,e,t)}Re("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");Re("5f8e7aa0bc","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var Ie=(0,n.forwardRef)(function({className:e,...t},o){return(0,U.jsx)(Me,{ref:o,className:(0,de.A)("_8c15fd0ed9f28ba4__div","d0541bc9dd9dc7b6__outset-ring--focus-visible",e),...t})}),Ae=o(24737),Be=o(3597),Le=o(5573),He=(0,U.jsx)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,U.jsx)(Le.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});function $e(e){return D(e.defaultTagName??"div",e,e)}var Fe="data-wp-hash";function Oe(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Oe();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)Ve(e,o,n)}(document)),e.__wpStyleRuntime}function Ve(e,t,o){if(!e.head)return;const n=Oe();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Fe}]`))if(o.getAttribute(Fe)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Fe,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=Oe();o.styles.set(e,t);for(const n of o.documents.keys())Ve(n,e,t)}("7b60a246cc",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}}');var De=(0,n.forwardRef)(function({render:e,...t},o){return $e({defaultTagName:"div",render:e,ref:o,props:z({className:(0,de.A)("a23e08e65c8e62e5__root")},t)})}),We=(0,n.forwardRef)(function({icon:e,size:t=24,...o},n){return(0,U.jsx)(Le.SVG,{ref:n,...e.props,...o,width:t,height:t})}),Ge="data-wp-hash";function Ue(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ue();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)qe(e,o,n)}(document)),e.__wpStyleRuntime}function qe(e,t,o){if(!e.head)return;const n=Ue();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Ge}]`))if(o.getAttribute(Ge)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Ge,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=Ue();o.styles.set(e,t);for(const n of o.documents.keys())qe(n,e,t)}("7b60a246cc",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}}');var Ke=(0,n.forwardRef)(function({render:e,...t},o){return $e({defaultTagName:"div",render:e,ref:o,props:z({className:(0,de.A)("_01303b3680eaa216__visual")},t)})}),Ze="data-wp-hash";function Ye(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Ye();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)Je(e,o,n)}(document)),e.__wpStyleRuntime}function Je(e,t,o){if(!e.head)return;const n=Ye();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Ze}]`))if(o.getAttribute(Ze)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Ze,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=Ye();o.styles.set(e,t);for(const n of o.documents.keys())Je(n,e,t)}("7b60a246cc",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}}');var Xe=(0,n.forwardRef)(function({icon:e,className:t,...o},n){return(0,U.jsx)(Ke,{ref:n,className:(0,de.A)("_58c8e351db225608__icon",t),...o,children:(0,U.jsx)(We,{icon:e})})}),Qe="data-wp-hash";function et(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=et();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)tt(e,o,n)}(document)),e.__wpStyleRuntime}function tt(e,t,o){if(!e.head)return;const n=et();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Qe}]`))if(o.getAttribute(Qe)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Qe,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function ot(e,t){const o=et();o.styles.set(e,t);for(const n of o.documents.keys())tt(n,e,t)}ot("0c5702ddca",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-medium,499);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-regular,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');var nt={text:"_83ed8a8da5dd50ea__text","heading-2xl":"_14437cfb77831647__heading-2xl","heading-xl":"_3c78b7fa9b4072dd__heading-xl","heading-lg":"aa58f227716bcde2__heading-lg","heading-md":"fc4da56d8dfe52c4__heading-md","heading-sm":"a9b78c7c82e8dff7__heading-sm","body-xl":"_305ff559e52180d5__body-xl","body-lg":"ca1aa3fc2029e958__body-lg","body-md":"_131101940be12424__body-md","body-sm":"_0e8d87a42c1f75fa__body-sm"};ot("d390e935a7","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}");var rt=(0,n.forwardRef)(function({variant:e="body-md",render:t,className:o,...n},r){return $e({render:t,defaultTagName:"span",ref:r,props:z(n,{className:(0,de.A)(nt.text,"e97669c6d9a38497__heading","_43cec3e1eec1066d__p",nt[e],o)})})}),it="data-wp-hash";function at(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=at();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)st(e,o,n)}(document)),e.__wpStyleRuntime}function st(e,t,o){if(!e.head)return;const n=at();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${it}]`))if(o.getAttribute(it)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(it,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=at();o.styles.set(e,t);for(const n of o.documents.keys())st(n,e,t)}("7b60a246cc",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}}');var lt=(0,U.jsx)("h2",{}),ct=(0,n.forwardRef)(function({render:e=lt,className:t,children:o,...n},r){return(0,U.jsx)(rt,{ref:r,variant:"heading-lg",render:e,className:(0,de.A)("b8b96f70820333a1__title",t),...n,children:o})}),dt="data-wp-hash";function ut(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=ut();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)pt(e,o,n)}(document)),e.__wpStyleRuntime}function pt(e,t,o){if(!e.head)return;const n=ut();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${dt}]`))if(o.getAttribute(dt)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(dt,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=ut();o.styles.set(e,t);for(const n of o.documents.keys())pt(n,e,t)}("7b60a246cc",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a23e08e65c8e62e5__root{text-wrap:balance;align-items:center;color:var(--wpds-color-foreground-content-neutral,#1e1e1e);display:flex;flex-direction:column;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);gap:var(--wpds-dimension-gap-xs,4px);max-width:var(--wpds-dimension-surface-width-sm,320px);text-align:center}._01303b3680eaa216__visual{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;justify-content:center;line-height:1;margin-block-end:var(--wpds-dimension-gap-xs,4px)}._58c8e351db225608__icon{background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);border-radius:50%;padding:var(--wpds-dimension-padding-xs,4px)}.b8b96f70820333a1__title{margin:0}._70f1dd22bad55b18__description{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin:0}._89ac025fd8e2bc52__actions{align-items:center;display:flex;flex-direction:column;gap:var(--wpds-dimension-gap-xs,4px);margin-block-start:var(--wpds-dimension-gap-md,12px);@media (min-width:480px){flex-direction:row;justify-content:center}}}}');var mt=(0,U.jsx)("p",{}),ft=(0,n.forwardRef)(function({render:e=mt,className:t,children:o,...n},r){return(0,U.jsx)(rt,{ref:r,variant:"body-md",render:e,className:(0,de.A)("_70f1dd22bad55b18__description",t),...n,children:o})}),gt="data-wp-hash";function ht(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=ht();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)_t(e,o,n)}(document)),e.__wpStyleRuntime}function _t(e,t,o){if(!e.head)return;const n=ht();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${gt}]`))if(o.getAttribute(gt)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(gt,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=ht();o.styles.set(e,t);for(const n of o.documents.keys())_t(n,e,t)}("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var yt={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},bt=(0,n.forwardRef)(function({direction:e,gap:t,align:o,justify:n,wrap:r,render:i,...a},s){return $e({render:i,ref:s,props:z(a,{style:{gap:t&&yt[t],alignItems:o,justifyContent:n,flexDirection:e,flexWrap:r},className:"_19ce0419607e1896__stack"})})});const wt=window.wp.a11y;var vt=(0,U.jsx)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)(Le.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),xt=(0,U.jsx)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)(Le.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-.75 12v-1.5h1.5V16h-1.5Zm0-8v5h1.5V8h-1.5Z"})}),kt=(0,U.jsx)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)(Le.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})}),St=(0,U.jsx)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)(Le.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})}),jt="data-wp-hash";function Et(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Et();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)Ct(e,o,n)}(document)),e.__wpStyleRuntime}function Ct(e,t,o){if(!e.head)return;const n=Et();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${jt}]`))if(o.getAttribute(jt)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(jt,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}function Tt(e,t){const o=Et();o.styles.set(e,t);for(const n of o.documents.keys())Ct(n,e,t)}Tt("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");Tt("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Mt={notice:"_4145abab73d17514__notice",icon:"d0a25570cb528528__icon",title:"b5397fb9d05389e3__title",description:"_1904b570a89bb815__description",actions:"_0a1270dcdd79c031__actions","action-button":"_983740ab855c4e09__action-button","action-link":"d329e7416d368d31__action-link","close-icon":"_487e6a5c1375f7dc__close-icon","is-info":"_531c140826094795__is-info","is-warning":"ae2e1004697cce95__is-warning","is-success":"_2e614a76af494837__is-success","is-error":"af00331ae17a0065__is-error","is-action-button-outline":"_8ddb8fb33fbf3d38__is-action-button-outline","is-action-button-minimal":"_77bbde495a8a0af3__is-action-button-minimal"},Pt={neutral:null,info:vt,warning:xt,success:kt,error:St};function Nt(e){return"error"===e?"assertive":"polite"}var zt=(0,n.forwardRef)(function({intent:e="neutral",children:t,icon:o,spokenMessage:r=t,politeness:i=Nt(e),render:a,...s},l){!function(e,t){const o=function(e){if(e){if("string"==typeof e)return e;try{return(0,n.renderToString)(e)}catch{return}}}(e);(0,n.useEffect)(()=>{o&&(0,wt.speak)(o,t)},[o,t])}(r,i);const c=null===o?null:o??Pt[e];return $e({defaultTagName:"div",render:a,ref:l,props:z({className:(0,de.A)(Mt.notice,Mt[`is-${e}`],"_336cd3e4e743482f__box-sizing"),children:(0,U.jsxs)(U.Fragment,{children:[t,c&&(0,U.jsx)(We,{className:Mt.icon,icon:c})]})},s)})}),Rt="data-wp-hash";function It(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=It();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)At(e,o,n)}(document)),e.__wpStyleRuntime}function At(e,t,o){if(!e.head)return;const n=It();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Rt}]`))if(o.getAttribute(Rt)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Rt,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=It();o.styles.set(e,t);for(const n of o.documents.keys())At(n,e,t)}("726c480820","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description,.b5397fb9d05389e3__title{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._1904b570a89bb815__description{text-wrap:pretty}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#a9c6e7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bc7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#926300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#94d29e);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#dab1aa);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button:is(._8ddb8fb33fbf3d38__is-action-button-outline,._77bbde495a8a0af3__is-action-button-minimal){--wp-ui-button-background-color-active:color-mix(in srgb,transparent 50%,var(--wpds-color-background-interactive-neutral-weak-active,#ededed))}}}");var Bt=(0,n.forwardRef)(function({className:e,...t},o){return(0,U.jsx)(rt,{ref:o,variant:"body-md",className:(0,de.A)("_1904b570a89bb815__description",e),...t})}),Lt=o(94715);const Ht=(0,window.wp.priorityQueue.createQueue)();function $t({children:e,placeholder:t}){const[o,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{const e={};return Ht.add(e,()=>{(0,n.flushSync)(()=>{r(!0)})}),()=>{Ht.cancel(e)}},[]),o?e:t}var Ft=o(42362);function Ot(){return(0,U.jsxs)(De,{className:"email-editor-template-select__no-results",children:[(0,U.jsx)(Xe,{icon:He}),(0,U.jsx)(ct,{children:(0,l.__)("No recent templates.","woocommerce")}),(0,U.jsx)(ft,{children:(0,l.__)("Your recent creations will appear here as soon as you begin.","woocommerce")})]})}const Vt=(0,n.memo)(function({templates:e,onTemplateSelection:t,selectedCategory:o}){const{layout:n}=(0,a.useSelect)(e=>{const{getEditorSettings:t}=e(r.store),o=t();return{layout:o?.__experimentalFeatures?.layout}}),[i]=(0,Ft.b)(),s=i.reduce((e,t)=>e+(t.css??""),"")+`.is-root-container { width: ${n?.contentSize||"660px"}; margin: 0 auto; }`;return"recent"===o&&0===e.length?(0,U.jsx)(Ot,{}):(0,U.jsx)("div",{className:"email-editor-template-select__templates",role:"listbox",children:e.map(e=>(0,U.jsx)("div",{className:"email-editor-template-select__template",children:(0,U.jsx)("div",{className:"email-editor-template-select__template-button",role:"button",tabIndex:0,onClick:()=>{t(e)},onKeyPress:o=>{"Enter"!==o.key&&" "!==o.key||t(e)},children:(0,U.jsxs)($t,{placeholder:(0,U.jsx)("p",{children:(0,l.__)("rendering template","woocommerce")}),children:[(0,U.jsx)(Lt.BlockPreview,{blocks:e.previewContentParsed,viewportWidth:900,minHeight:300,additionalStyles:[{css:s}]}),(0,U.jsx)(bt,{direction:"row",align:"center",className:"email-editor-template-select__template-details",children:(0,U.jsx)("h4",{className:"email-editor-template-select__template-title",children:e.displayName})})]})})},`${e.slug}_${e.displayName}_${e.id}`))})},(e,t)=>e.templates.length===t.templates.length&&e.selectedCategory===t.selectedCategory);function Dt({templates:e,onTemplateSelection:t,selectedCategory:o}){const r=(0,n.useMemo)(()=>null!=o?e.filter(e=>e.category===o):e,[o,e]);return(0,U.jsxs)(bt,{direction:"column",gap:"xl",className:"email-editor-template-select__list",children:["recent"===o&&(0,U.jsx)(zt,{intent:"info",children:(0,U.jsx)(Bt,{children:(0,l.__)("Templates created on the legacy editor will not appear here.","woocommerce")})}),(0,U.jsx)(Vt,{templates:r,onTemplateSelection:t,selectedCategory:o})]})}function Wt(){return"undefined"!=typeof window}function Gt(e){return qt(e)?(e.nodeName||"").toLowerCase():"#document"}function Ut(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qt(e){return!!Wt()&&(e instanceof Node||e instanceof Ut(e).Node)}function Kt(e){return!!Wt()&&(e instanceof HTMLElement||e instanceof Ut(e).HTMLElement)}function Zt(e){return!(!Wt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ut(e).ShadowRoot)}function Yt(e){return/^(html|body|#document)$/.test(Gt(e))}function Jt(e){return Ut(e).getComputedStyle(e)}function Xt(e){if("html"===Gt(e))return e;const t=e.assignedSlot||e.parentNode||Zt(e)&&e.host||function(e){var t;return null==(t=(qt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}(e);return Zt(t)?t.host:t}const Qt="ArrowUp",eo="ArrowDown",to="ArrowLeft",oo="ArrowRight",no="Home",ro="End",io=new Set([Qt,eo,to,oo,no,ro]),ao=["Shift","Control","Alt","Meta"];function so(e){return!(!function(e){return Kt(e)&&"INPUT"===e.tagName}(e)||null==e.selectionStart)||!(!Kt(e)||"TEXTAREA"!==e.tagName)}function lo(e,t,o,n){if(!e||!t||!t.scrollTo)return;let r=e.scrollLeft,i=e.scrollTop;const a=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(a&&"vertical"!==n){const n=co(e,t,"left"),i=uo(e),a=uo(t);"ltr"===o&&(n+t.offsetWidth+a.scrollMarginRight>e.scrollLeft+e.clientWidth-i.scrollPaddingRight?r=n+t.offsetWidth+a.scrollMarginRight-e.clientWidth+i.scrollPaddingRight:n-a.scrollMarginLeft<e.scrollLeft+i.scrollPaddingLeft&&(r=n-a.scrollMarginLeft-i.scrollPaddingLeft)),"rtl"===o&&(n-a.scrollMarginLeft<e.scrollLeft+i.scrollPaddingLeft?r=n-a.scrollMarginLeft-i.scrollPaddingLeft:n+t.offsetWidth+a.scrollMarginRight>e.scrollLeft+e.clientWidth-i.scrollPaddingRight&&(r=n+t.offsetWidth+a.scrollMarginRight-e.clientWidth+i.scrollPaddingRight))}if(s&&"horizontal"!==n){const o=co(e,t,"top"),n=uo(e),r=uo(t);o-r.scrollMarginTop<e.scrollTop+n.scrollPaddingTop?i=o-r.scrollMarginTop-n.scrollPaddingTop:o+t.offsetHeight+r.scrollMarginBottom>e.scrollTop+e.clientHeight-n.scrollPaddingBottom&&(i=o+t.offsetHeight+r.scrollMarginBottom-e.clientHeight+n.scrollPaddingBottom)}e.scrollTo({left:r,top:i,behavior:"auto"})}function co(e,t,o){const n="left"===o?"offsetLeft":"offsetTop";let r=0;for(;t.offsetParent&&(r+=t[n],t.offsetParent!==e);)t=t.offsetParent;return r}function uo(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function po(e,t){return t<0||t>=e.length}function mo(e,{startingIndex:t=-1,decrement:o=!1,disabledIndices:n,amount:r=1}={}){let i=t;do{i+=o?-r:r}while(i>=0&&i<=e.length-1&&fo(e,i,n));return i}function fo(e,t,o){if("function"==typeof o?o(t):o?.includes(t))return!0;const n=e[t];return!!n&&(!function(e,t=(e?Jt(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}(n)||!!n.matches(":disabled")||!o&&(n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled")))}const go="data-composite-item-active";function ho(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const _o=c.createContext(void 0);function yo(e=!1){const t=c.useContext(_o);if(void 0===t&&!e)throw new Error(w(16));return t}const bo=c.createContext(void 0);function wo(e){const{render:t,className:o,style:n,refs:r=M,props:i=M,state:a=P,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:d,orientation:p,grid:m,loopFocus:f,onLoop:g,enableHomeAndEndKeys:h,onMapChange:y,stopEventPropagation:b=!0,rootRef:w,disabledIndices:x,modifierKeys:k,highlightItemOnHover:S=!1,tag:j="div",...E}=e,C=function(){const e=c.useContext(bo);return e?.direction??"ltr"}(),{props:T,highlightedIndex:N,onHighlightedIndexChange:z,elementsRef:R,onMapChange:I,relayKeyboardEvent:A}=function(e){const{loopFocus:t=!0,orientation:o="both",grid:n,onLoop:r,direction:i,highlightedIndex:a,onHighlightedIndexChange:s,rootRef:l,enableHomeAndEndKeys:d=!1,stopEventPropagation:p,disabledIndices:m,modifierKeys:f=M}=e,[g,h]=c.useState(0),y=null!=n,b=c.useRef(null),w=v(b,l),x=c.useRef([]),k=c.useRef(!1),S=c.useRef(null),j=a??g,E=_((e,t=!1)=>{if(S.current=x.current[e]??null,(s??h)(e),t){const t=x.current[e];lo(b.current,t,i,o)}}),C=_(e=>{if(0===e.size)return;if(k.current){const e=x.current,t=e.indexOf(S.current);if(-1===t){const t=e[j];!t||fo(e,j,m)?E(function(e,t){let o=-1;for(let n=0;n<e.length;n+=1){const r=e[n];if(r&&!fo(e,n,t)){if(r.hasAttribute(go))return n;-1===o&&(o=n)}}return Math.max(o,0)}(e,m)):S.current=t}else t!==j&&E(t);return}k.current=!0;const t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(go))??null,r=n?e.get(n)?.index??-1:-1;if(-1!==r)E(r);else if(fo(t,j,m)){const e=mo(t,{disabledIndices:m});po(t,e)||E(e)}lo(b.current,n,i,o)});u(()=>{if(null==m||null!=a||!k.current)return;const e=x.current;if(fo(e,j,m)){const t=mo(e,{disabledIndices:m});po(e,t)||E(t)}},[m,a,j,x,E]);const T=_((e,t,o)=>r?r(e,t,o,x):o),P=_(e=>{const a=e.key===no||e.key===ro;if(!io.has(e.key)||!d&&a)return;if(function(e,t){for(const o of ao)if(!t.includes(o)&&e.getModifierState(o))return!0;return!1}(e,f))return;if(!b.current)return;const s="rtl"===i,l=s?to:oo,c=s?oo:to,u="vertical"===o?eo:l,g="vertical"===o?Qt:c,h=ho(e.nativeEvent);if(null!=h&&so(h)&&null!=(_=h)&&!_.hasAttribute("disabled")&&"true"!==_.getAttribute("aria-disabled")){const t=h.selectionStart,o=h.selectionEnd,n=h.value;if(null==t||e.shiftKey||t!==o)return;if(e.key!==g&&t<n.length)return;if(e.key!==u&&t>0)return}var _;let w=j;const v=function(e,t){return mo(e.current,{disabledIndices:t})}(x,m),k=function(e,t){return mo(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}(x,m);null!=n&&(w=n({disabledIndices:m,elementsRef:x,event:e,highlightedIndex:j,loopFocus:t,maxIndex:k,minIndex:v,onLoop:T,orientation:o,rtl:s}));const S="vertical"!==o&&e.key===l||"horizontal"!==o&&e.key===eo,C="vertical"!==o&&e.key===c||"horizontal"!==o&&e.key===Qt;d&&(e.key===no?w=v:e.key===ro&&(w=k)),w===j&&(S||C)&&(t&&w===k&&S?(w=v,r&&(w=r(e,j,w,x))):t&&w===v&&C?(w=k,r&&(w=r(e,j,w,x))):w=mo(x.current,{startingIndex:w,decrement:C,disabledIndices:m})),w===j||po(x.current,w)||(p&&e.stopPropagation(),(y||a||S||C)&&e.preventDefault(),E(w,!0),queueMicrotask(()=>{x.current[w]?.focus()}))});return{props:{ref:w,onFocus(e){const t=b.current,o=ho(e.nativeEvent);t&&null!=o&&so(o)&&o.setSelectionRange(0,o.value.length)},onKeyDown:P},highlightedIndex:j,onHighlightedIndexChange:E,elementsRef:x,onMapChange:C,relayKeyboardEvent:P}}({grid:m,loopFocus:f,onLoop:g,orientation:p,highlightedIndex:l,onHighlightedIndexChange:d,rootRef:w,stopEventPropagation:b,enableHomeAndEndKeys:h,direction:C,disabledIndices:x,modifierKeys:k}),B=D(j,e,{state:a,ref:r,props:[T,...i,E],stateAttributesMapping:s}),L=c.useMemo(()=>({highlightedIndex:N,onHighlightedIndexChange:z,highlightItemOnHover:S,relayKeyboardEvent:A}),[N,z,S,A]);return(0,U.jsx)(_o.Provider,{value:L,children:(0,U.jsx)(q,{elementsRef:R,onMapChange:e=>{y?.(e),I(e)},children:B})})}const vo=c.createContext(void 0);function xo(){const e=c.useContext(vo);if(void 0===e)throw new Error(w(65));return e}const ko=c.forwardRef(function(e,t){const{activateOnFocus:o=!1,className:n,loopFocus:r=!0,render:i,style:a,...s}=e,{orientation:l,setTabMap:d,tabActivationDirection:p}=Q(),[m,f]=c.useState(0),[g,h]=c.useState(null),y=c.useRef(new Set),b=c.useRef(new Set),w=c.useRef(null);u(()=>{if("undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(()=>{y.current.forEach(e=>{e()})});return w.current=e,g&&e.observe(g),b.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),w.current=null}},[g]);const v=_(e=>(y.current.add(e),()=>{y.current.delete(e)})),x=_(e=>(b.current.add(e),w.current?.observe(e),()=>{b.current.delete(e),w.current?.unobserve(e)})),k={orientation:l,tabActivationDirection:p},S={"aria-orientation":"vertical"===l?"vertical":void 0,role:"tablist"},j=c.useMemo(()=>({activateOnFocus:o,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:x,tabsListElement:g}),[o,v,x,g]);return(0,U.jsx)(vo.Provider,{value:j,children:(0,U.jsx)(wo,{render:i,className:n,style:a,state:k,refs:[t,h],props:[S,s],stateAttributesMapping:te,highlightedIndex:m,enableHomeAndEndKeys:!0,loopFocus:r,orientation:l,onHighlightedIndexChange:f,onMapChange:d,disabledIndices:M})})});var So=o(89104);function jo(){return T}function Eo(){return!1}function Co(){return!0}const To=c.createContext(void 0),Mo={disableStyleElements:!1};function Po(e){const{script:t}=e,{nonce:o}=c.useContext(To)??Mo;return(0,So.useSyncExternalStore)(jo,Eo,Co)?(0,U.jsx)("script",{nonce:o,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}Math.min,Math.max;const No=Math.round;function zo(e){const t=Jt(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Kt(e),i=r?e.offsetWidth:o,a=r?e.offsetHeight:n;return(No(o)!==i||No(n)!==a)&&(o=i,n=a),{width:o,height:n}}Math.floor;const Ro="--active-tab-left",Io="--active-tab-right",Ao="--active-tab-top",Bo="--active-tab-bottom",Lo="--active-tab-width",Ho="--active-tab-height";var $o;const Fo={...te,activeTabPosition:()=>null,activeTabSize:()=>null},Oo=c.forwardRef(function(e,t){const{className:o,render:n,renderBeforeHydration:r=!1,style:i,...a}=e,{getTabElementBySelectedValue:s,orientation:l,tabActivationDirection:d,value:u}=Q(),{tabsListElement:p,registerIndicatorUpdateListener:m}=xo(),f=function(){const[,e]=c.useState({});return c.useCallback(()=>{e({})},[])}();c.useEffect(()=>m(f),[m,f]);let g=0,h=0,_=0,y=0,b=0,w=0,v=!1;if(null!=u&&null!=p){const e=s(u);if(null!=e){v=!0;const{width:t,height:o}=zo(e),{width:n,height:r}=zo(p),i=e.getBoundingClientRect(),a=p.getBoundingClientRect(),s=n>0?a.width/n:1,l=r>0?a.height/r:1,c=function(e,t){const o=Vo(e),n=Vo(t);let r=o.left-n.left-t.clientLeft,i=o.top-n.top-t.clientTop,a=Xt(e);for(;Kt(a)&&a!==t&&!Yt(a);)r-=a.scrollLeft,i-=a.scrollTop,a=Xt(a);return{left:r,top:i}}(e,p);g=c.left,_=c.top;const d=(i.left-a.left)/s+p.scrollLeft-p.clientLeft,u=(i.top-a.top)/l+p.scrollTop-p.clientTop,m=function(e){const t=Ut(e).getComputedStyle(e),{x:o,y:n}=function(e,t){const o=(t??Ut(e).getComputedStyle(e)).transform;let n=0,r=0,i=1;if(o&&"none"!==o){const e=o.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){const t=e[1].split(", ").map(parseFloat);6===t.length?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):16===t.length&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}(e,t);let r=o,i=n;const{translate:a}=t;if(a&&"none"!==a){const t=a.split(" ");r+=Do(t[0],e.offsetWidth),i+=Do(t[1],e.offsetHeight)}return{x:r,y:i}}(e);Math.abs(d-m.x-g)<=2&&Math.abs(u-m.y-_)<=2&&(g=d,_=u),b=t,w=o,h=p.scrollWidth-g-b,y=p.scrollHeight-_-w}}const x=D("span",e,{state:{orientation:l,activeTabPosition:v?{left:g,right:h,top:_,bottom:y}:null,activeTabSize:v?{width:b,height:w}:null,tabActivationDirection:d},ref:t,props:[{role:"presentation",style:v?{[Ro]:`${g}px`,[Io]:`${h}px`,[Ao]:`${_}px`,[Bo]:`${y}px`,[Lo]:`${b}px`,[Ho]:`${w}px`}:void 0,hidden:!(v&&b>0&&w>0)},a,{suppressHydrationWarning:!0}],stateAttributesMapping:Fo});return null==u?null:(0,U.jsxs)(c.Fragment,{children:[x,r&&($o||($o=(0,U.jsx)(Po,{script:""})))]})});function Vo(e){let t=0,o=0,n=e;for(;null!=n;){t+=n.offsetLeft,o+=n.offsetTop;const e=n.offsetParent;null!=e&&(t+=e.clientLeft,o+=e.clientTop),n=e}return{left:t,top:o}}function Do(e,t){if(!e)return 0;const o=parseFloat(e);return Number.isFinite(o)?e.endsWith("%")?o/100*t:o:0}var Wo=o(29491),Go="data-wp-hash";function Uo(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=Uo();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)qo(e,o,n)}(document)),e.__wpStyleRuntime}function qo(e,t,o){if(!e.head)return;const n=Uo();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${Go}]`))if(o.getAttribute(Go)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(Go,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=Uo();o.styles.set(e,t);for(const n of o.documents.keys())qo(n,e,t)}("bb8cbb8f31",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n\t\t\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n\t\t\t\t[role=tab]:is([aria-selected=true])\n\t\t\t\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');var Ko={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},Zo=(0,n.forwardRef)(function({children:e,variant:t="default",className:o,activateOnFocus:r,...i},a){const[s,l]=(0,n.useState)(null),[c,d]=(0,n.useState)({first:!1,last:!1,isScrolling:!1});(0,n.useEffect)(()=>{if(!s)return;const e=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:o}=s,n=Math.max(e-t,0),r="rtl"===(s.dir||("undefined"!=typeof window?window.getComputedStyle(s).direction:"ltr"))&&o<0?-o:o;d({first:r>1,last:r<n-1,isScrolling:e>t})},t=new ResizeObserver(e);t.observe(s);let o=!1;const n=()=>{o||(requestAnimationFrame(()=>{e(),o=!1}),o=!0)};return s.addEventListener("scroll",n,{passive:!0}),e(),()=>{s.removeEventListener("scroll",n),t.disconnect()}},[s]);const u=(0,Wo.useMergeRefs)([a,e=>l(e)]);return(0,U.jsxs)(ko,{ref:u,activateOnFocus:r,"data-select-on-move":r?"true":"false",className:(0,de.A)(Ko.tablist,c.first&&Ko["is-overflowing-first"],c.last&&Ko["is-overflowing-last"],Ko[`is-${t}-variant`],o),...i,tabIndex:i.tabIndex??(c.isScrolling?-1:void 0),children:[e,(0,U.jsx)(Oo,{className:Ko.indicator})]})});function Yo(e){return e?.ownerDocument||document}function Jo(e,t,{detail:o=0}={}){e.dispatchEvent(new(Ut(e).PointerEvent)("click",{bubbles:!0,cancelable:!0,composed:!0,detail:o,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Xo(e){return Kt(e)&&"BUTTON"===e.tagName}const Qo=c.forwardRef(function(e,t){const{className:o,disabled:n=!1,render:r,value:i,id:a,nativeButton:s=!0,style:l,...d}=e,{value:p,getTabPanelIdByValue:m,onValueChange:f,orientation:g,tabActivationDirection:h}=Q(),{activateOnFocus:y,registerTabResizeObserverElement:b,tabsListElement:w}=xo(),{highlightedIndex:x,onHighlightedIndexChange:k}=yo(),S=fe(a),j=c.useMemo(()=>({disabled:n,id:S,value:i}),[n,S,i]),{compositeProps:E,compositeRef:C,index:T}=function(e={}){const{highlightItemOnHover:t,highlightedIndex:o,onHighlightedIndexChange:n}=yo(),{ref:r,index:i}=Ee(e),a=o===i,s=c.useRef(null),l=v(r,s),d={tabIndex:a?0:-1,onFocus(){n(i)},onMouseMove(){const e=s.current;if(!t||!e)return;const o=e.hasAttribute("disabled")||"true"===e.ariaDisabled;a||o||e.focus()}};return{compositeProps:d,compositeRef:l,index:i}}({metadata:j}),M=i===p,P=c.useRef(!1),N=c.useRef(null),R=_(e=>{N.current?.(),N.current=e?b(e):null});u(()=>{if(P.current)return void(P.current=!1);if(!(M&&T>-1&&x!==T))return;const e=w;if(null!=e){const t=function(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}(Yo(e));if(t&&function(e,t){if(!e||!t)return!1;const o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&Zt(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(e,t))return}n||k(T)},[M,T,x,k,n,w]);const{getButtonProps:I,buttonRef:A}=function(e={}){const{disabled:t=!1,focusableWhenDisabled:o,tabIndex:n=0,native:r=!0,composite:i}=e,a=c.useRef(null),s=yo(!0),l=i??void 0!==s,{props:d}=function(e){const{focusableWhenDisabled:t,disabled:o,composite:n=!1,tabIndex:r=0,isNativeButton:i}=e,a=n&&!1!==t,s=n&&!1===t;return{props:c.useMemo(()=>{const e={onKeyDown(e){o&&t&&"Tab"!==e.key&&e.preventDefault()}};return n||(e.tabIndex=r,!i&&o&&(e.tabIndex=t?r:-1)),(i&&(t||a)||!i&&o)&&(e["aria-disabled"]=o),!i||t&&!s||(e.disabled=o),e},[n,o,t,a,s,i,r])}}({focusableWhenDisabled:o,disabled:t,composite:l,tabIndex:n,isNativeButton:r}),p=c.useCallback(()=>{const e=a.current;Xo(e)&&l&&t&&void 0===d.disabled&&e.disabled&&(e.disabled=!1)},[t,d.disabled,l]);return u(p,[p]),{getButtonProps:c.useCallback((e={})=>{const{onClick:o,onMouseDown:n,onKeyUp:i,onKeyDown:a,onPointerDown:s,...c}=e;return z({onClick(e){t?e.preventDefault():o?.(e)},onMouseDown(e){t||n?.(e)},onKeyDown(e){if(t)return;if(F(e),a?.(e),e.baseUIHandlerPrevented)return;const o=e.target===e.currentTarget,n=e.currentTarget,i=Xo(n),s=!r&&Kt(c=n)&&"A"===c.tagName&&Boolean(c.href);var c;const d=o&&(r?i:!s),u="Enter"===e.key,p=" "===e.key,m=n.getAttribute("role"),f=m?.startsWith("menuitem")||"option"===m||"gridcell"===m;if(o&&l&&p){if(e.defaultPrevented&&f)return;return e.preventDefault(),void(r&&!i||(e.preventBaseUIHandler(),Jo(n,e)))}d&&!r&&(p||u)?e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Jo(n,e))):o&&s&&p&&e.preventDefault()},onKeyUp(e){t||(F(e),i?.(e),e.target===e.currentTarget&&r&&l&&Xo(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||r||l||e.defaultPrevented||" "!==e.key||(e.preventBaseUIHandler(),Jo(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},r?{type:"button"}:{role:"button"},d,c)},[t,d,l,r]),buttonRef:_(e=>{a.current=e,p()})}}({disabled:n,native:s,focusableWhenDisabled:!0}),B=m(i),L=c.useRef(!1),H=c.useRef(!1);function $(e){f(i,oe("none",e.nativeEvent,void 0,{activationDirection:"none"}))}return D("button",e,{state:{disabled:n,active:M,orientation:g,tabActivationDirection:h},ref:[t,A,C,R],props:[E,{role:"tab","aria-controls":B,"aria-selected":M,id:S,onClick:function(e){M||n||$(e)},onFocus:function(e){M||n||!y||L.current&&!H.current||$(e)},onPointerDown:function(e){if(M||n)return;L.current=!0,H.current=0===e.button;const t=Yo(e.currentTarget);function o(){L.current=!1,H.current=!1,t.removeEventListener("pointerup",o),t.removeEventListener("pointercancel",o)}t.addEventListener("pointerup",o),t.addEventListener("pointercancel",o)},[go]:M?"":void 0,onKeyDownCapture(){P.current=!0}},d,I],stateAttributesMapping:te})});var en=(0,U.jsx)(Le.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)(Le.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),tn="data-wp-hash";function on(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=on();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[o,n]of t.styles)nn(e,o,n)}(document)),e.__wpStyleRuntime}function nn(e,t,o){if(!e.head)return;const n=on();let r=n.injectedStyles.get(e);if(r||(r=new Set,n.injectedStyles.set(e,r)),r.has(t))return;if(function(e,t){if(!e.head)return!1;for(const o of e.head.querySelectorAll(`style[${tn}]`))if(o.getAttribute(tn)===t)return!0;return!1}(e,t))return void r.add(t);const i=e.createElement("style");i.setAttribute(tn,t),i.appendChild(e.createTextNode(o)),e.head.appendChild(i),r.add(t)}!function(e,t){const o=on();o.styles.set(e,t);for(const n of o.documents.keys())nn(n,e,t)}("bb8cbb8f31",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n\t\t\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n\t\t\t\t[role=tab]:is([aria-selected=true])\n\t\t\t\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');var rn=(0,n.forwardRef)(function({className:e,children:t,...o},n){return(0,U.jsxs)(Qo,{ref:n,className:(0,de.A)("a5fd8814f195aa5e__tab",e),...o,children:[(0,U.jsx)("span",{className:"_5dfc77e6edd345d4__tab-children",children:t}),(0,U.jsx)(We,{icon:en,className:"_4a20e969d15e5ac1__tab-chevron"})]})});function an({templateCategories:e}){return(0,U.jsx)("div",{className:"email-editor-template-select__sidebar",children:(0,U.jsx)(Zo,{children:e.map(({name:e,label:t})=>(0,U.jsx)(rn,{value:e,children:t},e))})})}var sn=o(76765);const ln=(0,n.memo)(function({templates:e,handleTemplateSelection:t,templateSelectMode:o}){const r=(0,a.useSelect)(e=>e(i.store).getBlockPatternCategories(),[]),s="swap"===o,c=(0,n.useMemo)(()=>{const t=function(e,t){const o=new Map(t.map(e=>[e.name,e.label]));o.set("recent",(0,l.__)("Recent","woocommerce"));const n=new Set;for(const t of e)t.category&&n.add(t.category);return[...n].map(e=>({name:e,label:o.get(e)??e}))}(e,r??[]);return s?t.filter(e=>"recent"!==e.name):t.sort((e,t)=>"recent"===e.name?-1:"recent"===t.name?1:0)},[e,r,s]),[d,u]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(null!==d||0===c.length)return;const e=setTimeout(()=>{const e=c.find(e=>"recent"!==e.name)?.name??c[0]?.name;u(e)},1e3);return()=>clearTimeout(e)},[c,d]),0===c.length?(0,U.jsx)("div",{className:"email-editor-template-select",children:(0,U.jsx)(Dt,{templates:e,onTemplateSelection:t,selectedCategory:d})}):(0,U.jsxs)(ce,{className:"email-editor-template-select",orientation:"vertical",value:d,onValueChange:e=>{(0,sn.yM)("template_select_modal_category_change",{category:e}),u(e)},children:[(0,U.jsx)(an,{templateCategories:c}),c.map(({name:o})=>(0,U.jsx)(Ie,{value:o,tabIndex:-1,className:"email-editor-template-select__panel",children:(0,U.jsx)(Dt,{templates:e,onTemplateSelection:t,selectedCategory:o})},o))]})});function cn({onSelectCallback:e,closeCallback:t=null,previewContent:o="",postType:n}){const i=o?"swap":"new";(0,sn.xW)("template_select_modal_opened",{templateSelectMode:i});const[c,d]=(0,Ae.p)(o),u=c?.length>0,p=t=>{const s=t.type===n,l=t.template;(0,sn.yM)("template_select_modal_template_selected",{templateSlug:t.slug,templateSelectMode:i,templateType:t.type}),o||(0,a.dispatch)(r.store).resetEditorBlocks(t.emailParsed),(0,a.dispatch)(Be.H).setTemplateToPost(s?l.template:t.slug),e()},m=()=>{const e=c[0]??null;e&&((0,sn.yM)("template_select_modal_handle_close_without_template_selected"),p(e))};return(0,U.jsxs)(s.Modal,{title:"new"===i?(0,l.__)("Start with an email preset","woocommerce"):(0,l.__)("Select a template","woocommerce"),onRequestClose:()=>((0,sn.yM)("template_select_modal_closed",{templateSelectMode:i}),t?t():m()),isFullScreen:!0,children:[(0,U.jsx)(ln,{templates:[...c,...d],handleTemplateSelection:p,templateSelectMode:i}),(0,U.jsx)(s.Flex,{className:"email-editor-modal-footer",justify:"flex-end",children:(0,U.jsx)(s.FlexItem,{children:(0,U.jsx)(s.Button,{variant:"tertiary",className:"email-editor-start_from_scratch_button",onClick:()=>((0,sn.yM)("template_select_modal_start_from_scratch_clicked"),m()),isBusy:!u,children:(0,l.__)("Start from scratch","woocommerce")})})})]})}},897:(e,t,o)=>{o.d(t,{G:()=>i,h:()=>a});var n=o(74997);const r=new Map;function i(e,t){const o=(0,n.getBlockType)(e);if(!o)return!1;const{name:i,...a}=o;try{r.has(i)||r.set(i,{...a});const e=t(a),o={...a,...e};return(0,n.unregisterBlockType)(i),(0,n.registerBlockType)(i,o),!0}catch(t){return console.error("Failed to update block settings for",e,t),!1}}function a(){const e=[];for(const[t,o]of r.entries())try{(0,n.unregisterBlockType)(t),(0,n.registerBlockType)(t,o),e.push(t),r.delete(t)}catch(e){console.error("Failed to restore block settings for",t,e)}return e}},71138:(e,t,o)=>{o.d(t,{oj:()=>s,r8:()=>l});var n=o(74997),r=o(47143);const i=new Set,a=new Map;function s(e,t){const o=((0,r.select)("core/blocks").getBlockStyles(e)||[]).find(e=>e.name===t);if(o){const n=a.get(e)||[];n.find(e=>e.name===t)||(n.push(o),a.set(e,n))}(0,n.unregisterBlockStyle)(e,t)}function l(){for(const e of i){const[t,o]=e.split("||");(0,n.unregisterBlockStyle)(t,o)}i.clear();for(const[e,t]of a.entries())t.forEach(t=>(0,n.registerBlockStyle)(e,t)),a.delete(e)}},76917:(e,t,o)=>{o.d(t,{$:()=>a,z:()=>i});var n=o(74997);const r=new Set;function i(e,t){(0,n.registerBlockVariation)(e,t),r.add(function(e,t){return`${e}||${t}`}(e,t.name))}function a(){for(const e of r){const[t,o]=e.split("||");(0,n.unregisterBlockVariation)(t,o)}r.clear()}},52716:(e,t,o)=>{o.d(t,{HY:()=>s,hC:()=>c,tN:()=>l});var n=o(52619);const r=new Set,i=new Set;function a(e,t){return`${e}||${t}`}function s(e,t,o,i){(0,n.addFilter)(e,t,o,i),r.add(a(e,t))}function l(e,t,o,r){(0,n.addAction)(e,t,o,r),i.add(a(e,t))}function c(){!function(){for(const e of r){const[t,o]=e.split("||");(0,n.removeFilter)(t,o),r.delete(e)}}(),function(){for(const e of i){const[t,o]=e.split("||");(0,n.removeAction)(t,o),i.delete(e)}}()}},23:(e,t,o)=>{o.d(t,{aW:()=>l,gG:()=>a,le:()=>s});var n=o(50876);const r=new Set,i=new Map;function a(e,t){(0,n.registerFormatType)(e,{object:!1,...t}),r.add(e)}function s(e){const t=(0,n.unregisterFormatType)(e);t&&i.set(e,t)}function l(){for(const e of r)(0,n.unregisterFormatType)(e);r.clear();for(const[e,t]of i.entries())(0,n.registerFormatType)(e,{object:!1,...t}),i.delete(e)}},21383:(e,t,o)=>{o.d(t,{IF:()=>l});var n=o(71138),r=o(76917),i=o(23),a=o(52716),s=o(897);function l(){(0,s.h)(),(0,n.r8)(),(0,r.$)(),(0,i.aW)(),(0,a.hC)()}},76765:(e,t,o)=>{o.d(t,{T7:()=>d,V1:()=>i,oh:()=>s,vD:()=>a,xW:()=>c,yM:()=>l});var n=o(66087),r=o(52619);const i=()=>(0,r.applyFilters)("woocommerce_email_editor_events_tracking_enabled",!1),a="email_editor_events",s=new EventTarget,l=(e,t={})=>{if(!i())return;const o={name:`${a}_${e}`,..."object"!=typeof t?{data:t}:t};s.dispatchEvent(new CustomEvent(a,{detail:o}))},c=function(){const e={};return(t,o={})=>{if(!i())return;const n=`${t}_${JSON.stringify(o).length}`;e[n]||(l(t,o),e[n]=!0)}}(),d=(0,n.debounce)(l,700)},42362:(e,t,o)=>{o.d(t,{b:()=>ge});var n=o(86087),r=o(47143),i=o(43656),a=o(76597),s=o.n(a),l=o(3597),c=o(31592),d=o(74997),u=o(49786),p=o(90314),m=o(12024);function f(e,t="root",o={}){if(!t)return null;const{fallback:n=!1}=o,{name:r,selectors:i,supports:a}=e,s=i&&Object.keys(i).length>0,l=Array.isArray(t)?t.join("."):t;let c=null;if(c=s&&i.root?i?.root:a?.__experimentalSelector?a.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===l)return c;const d=Array.isArray(t)?t:t.split(".");if(1===d.length){const e=n?c:null;if(s)return(0,m.K)(i,`${l}.root`,null)||(0,m.K)(i,l,null)||e;const t=a?(0,m.K)(a,`${l}.__experimentalSelector`,null):void 0;return t?(0,p.q1)(c,t):e}let u;return s&&(u=(0,m.K)(i,l,null)),u||(n?f(e,d[0],o):null)}var g=o(40166),h={grad:.9,turn:360,rad:360/(2*Math.PI)},_=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},y=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},b=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),e>o?o:e>t?e:t},w=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},v=function(e){return{r:b(e.r,0,255),g:b(e.g,0,255),b:b(e.b,0,255),a:b(e.a)}},x=function(e){return{r:y(e.r),g:y(e.g),b:y(e.b),a:y(e.a,3)}},k=/^#([0-9a-f]{3,8})$/i,S=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},j=function(e){var t=e.r,o=e.g,n=e.b,r=e.a,i=Math.max(t,o,n),a=i-Math.min(t,o,n),s=a?i===t?(o-n)/a:i===o?2+(n-t)/a:4+(t-o)/a:0;return{h:60*(s<0?s+6:s),s:i?a/i*100:0,v:i/255*100,a:r}},E=function(e){var t=e.h,o=e.s,n=e.v,r=e.a;t=t/360*6,o/=100,n/=100;var i=Math.floor(t),a=n*(1-o),s=n*(1-(t-i)*o),l=n*(1-(1-t+i)*o),c=i%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c],a:r}},C=function(e){return{h:w(e.h),s:b(e.s,0,100),l:b(e.l,0,100),a:b(e.a)}},T=function(e){return{h:y(e.h),s:y(e.s),l:y(e.l),a:y(e.a,3)}},M=function(e){return E((o=(t=e).s,{h:t.h,s:(o*=((n=t.l)<50?n:100-n)/100)>0?2*o/(n+o)*100:0,v:n+o,a:t.a}));var t,o,n},P=function(e){return{h:(t=j(e)).h,s:(r=(200-(o=t.s))*(n=t.v)/100)>0&&r<200?o*n/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,o,n,r},N=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,R=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,I=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,A={string:[[function(e){var t=k.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?y(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?y(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=R.exec(e)||I.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:v({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=N.exec(e)||z.exec(e);if(!t)return null;var o,n,r=C({h:(o=t[1],n=t[2],void 0===n&&(n="deg"),Number(o)*(h[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return M(r)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,n=e.b,r=e.a,i=void 0===r?1:r;return _(t)&&_(o)&&_(n)?v({r:Number(t),g:Number(o),b:Number(n),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,o=e.s,n=e.l,r=e.a,i=void 0===r?1:r;if(!_(t)||!_(o)||!_(n))return null;var a=C({h:Number(t),s:Number(o),l:Number(n),a:Number(i)});return M(a)},"hsl"],[function(e){var t=e.h,o=e.s,n=e.v,r=e.a,i=void 0===r?1:r;if(!_(t)||!_(o)||!_(n))return null;var a=function(e){return{h:w(e.h),s:b(e.s,0,100),v:b(e.v,0,100),a:b(e.a)}}({h:Number(t),s:Number(o),v:Number(n),a:Number(i)});return E(a)},"hsv"]]},B=function(e,t){for(var o=0;o<t.length;o++){var n=t[o][0](e);if(n)return[n,t[o][1]]}return[null,void 0]},L=function(e,t){var o=P(e);return{h:o.h,s:b(o.s+100*t,0,100),l:o.l,a:o.a}},H=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},$=function(e,t){var o=P(e);return{h:o.h,s:o.s,l:b(o.l+100*t,0,100),a:o.a}},F=function(){function e(e){this.parsed=function(e){return"string"==typeof e?B(e.trim(),A.string):"object"==typeof e&&null!==e?B(e,A.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return y(H(this.rgba),2)},e.prototype.isDark=function(){return H(this.rgba)<.5},e.prototype.isLight=function(){return H(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=x(this.rgba)).r,o=e.g,n=e.b,i=(r=e.a)<1?S(y(255*r)):"","#"+S(t)+S(o)+S(n)+i;var e,t,o,n,r,i},e.prototype.toRgb=function(){return x(this.rgba)},e.prototype.toRgbString=function(){return t=(e=x(this.rgba)).r,o=e.g,n=e.b,(r=e.a)<1?"rgba("+t+", "+o+", "+n+", "+r+")":"rgb("+t+", "+o+", "+n+")";var e,t,o,n,r},e.prototype.toHsl=function(){return T(P(this.rgba))},e.prototype.toHslString=function(){return t=(e=T(P(this.rgba))).h,o=e.s,n=e.l,(r=e.a)<1?"hsla("+t+", "+o+"%, "+n+"%, "+r+")":"hsl("+t+", "+o+"%, "+n+"%)";var e,t,o,n,r},e.prototype.toHsv=function(){return e=j(this.rgba),{h:y(e.h),s:y(e.s),v:y(e.v),a:y(e.a,3)};var e},e.prototype.invert=function(){return O({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),O(L(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),O(L(this.rgba,-e))},e.prototype.grayscale=function(){return O(L(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),O($(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),O($(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?O({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):y(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=P(this.rgba);return"number"==typeof e?O({h:e,s:t.s,l:t.l,a:t.a}):y(t.h)},e.prototype.isEqual=function(e){return this.toHex()===O(e).toHex()},e}(),O=function(e){return e instanceof F?e:new F(e)};function V(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function D(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function W(e,t="0"){const o=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!o)return null;const n=D(o?.top)||t,r=D(o?.left)||t;return n===r?n:`${n} ${r}`}function G(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:"cover"}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:"50% 50%"}),t}var U={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}},q=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","background.gradient","border.color","border.radius","border.radiusSizes","border.style","border.width","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.height","dimensions.minHeight","dimensions.width","dimensions.dimensionSizes","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textIndent","typography.textTransform","typography.writingMode"],K={button:"wp-element-button",caption:"wp-element-caption"},Z={__experimentalBorder:"border",color:"color",dimensions:"dimensions",spacing:"spacing",typography:"typography"};function Y(e={},t,o){let n=[];return Object.keys(e).forEach(r=>{const i=t+V(r.replace("/","-")),a=e[r];if(a instanceof Object){const e=i+o;n=[...n,...Y(a,e,o)]}else n.push(`${i}: ${a}`)}),n}var J=(e,t,o)=>{if("core/paragraph"!==o)return e;const n=t?.blocks?.["core/paragraph"];if("all"!==(n?.typography?.textIndent??t?.typography?.textIndent??"subsequent"))return e;const r=".wp-block-paragraph + .wp-block-paragraph";if(r in e){const t=e[r],o={...e};return delete o[r],o[".wp-block-paragraph"]=t,o}return e},X=(e,t)=>{const o=".wp-block-button";if(!(o in e))return e;const n={...e};return n[o]=n[o].map(e=>{const o=e.match(/^width:\s*(.+)$/);if(!o)return e;const n=o[1];let r=null;n.endsWith("%")&&(r=parseFloat(n));if(null===r&&n.startsWith("var(--wp--preset--dimension--")&&n.endsWith(")")){const e=n.slice(29,-1),o={...t?.dimensions?.dimensionSizes??{},...t?.blocks?.["core/button"]?.dimensions?.dimensionSizes??{}};for(const t of Object.values(o))if(Array.isArray(t)){for(const o of t)if(o.slug===e&&"string"==typeof o.size&&o.size.endsWith("%")){r=parseFloat(o.size);break}if(null!==r)break}}return null===r||isNaN(r)?e:`width: calc(${r} * 1% - (var(--wp--style--block-gap, 0.5em) * (1 - ${r} / 100)))`}),n},Q=(e,t)=>{const o={};return Object.entries(e).forEach(([e,n])=>{if("root"===e||!t?.[e])return;const r="string"==typeof n;if(r||"object"!=typeof n||null===n||Object.entries(n).forEach(([n,r])=>{if("root"===n||!t?.[e][n])return;const i=ee({[e]:{[n]:t[e][n]}});o[r]=[...o[r]||[],...i],delete t[e][n]}),r||"object"==typeof n&&null!==n&&"root"in n){const i=r?n:n.root,a=ee({[e]:t[e]});o[i]=[...o[i]||[],...a],delete t[e]}}),o};function ee(e={},t="",o,n={},r=!1){const i=p.B4===t,a=Object.entries(d.__EXPERIMENTAL_STYLE_PROPERTY).reduce((t,[n,{value:r,properties:a,useEngine:s,rootOnly:l}])=>{if(l&&!i)return t;const c=r;if("elements"===c[0]||s)return t;const d=(0,m.K)(e,c);if("--wp--style--root--padding"===n&&("string"==typeof d||!o))return t;if(a&&"string"!=typeof d)Object.entries(a).forEach(e=>{const[o,n]=e;if(!(0,m.K)(d,[n],!1))return;const r=o.startsWith("--")?o:V(o);t.push(`${r}: ${(0,u.getCSSValueFromRawStyle)((0,m.K)(d,[n]))}`)});else if((0,m.K)(e,c,!1)){const o=n.startsWith("--")?n:V(n);t.push(`${o}: ${(0,u.getCSSValueFromRawStyle)((0,m.K)(e,c))}`)}return t},[]);return e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=(0,p.y_)(e.background.backgroundImage,n)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...G(e.background)}})),(0,u.getCSSRules)(e).forEach(e=>{if(i&&(o||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:V(e.key);let s=(0,p.y_)(e.value,n);"font-size"===t&&(s=(0,g.j)({name:"",slug:"",size:s},n?.settings)),"aspect-ratio"===t&&a.push("min-height: unset"),a.push(`${t}: ${s}`)}),a}function te({layoutDefinitions:e=U,style:t,selector:o,hasBlockGapSupport:n,hasFallbackGapSupport:r,fallbackGapValue:i}){let a="",s=n?W(t?.spacing?.blockGap):"";if(r&&(o===p.B4?s=s||"0.5em":!n&&i&&(s=i)),s&&e&&(Object.values(e).forEach(({className:e,name:t,spacingStyles:r})=>{(n||"flex"===t||"grid"===t)&&r?.length&&r.forEach(t=>{const r=[];if(t.rules&&Object.entries(t.rules).forEach(([e,t])=>{r.push(`${e}: ${t||s}`)}),r.length){let i="";i=n?o===p.B4?`:root :where(.${e})${t?.selector||""}`:`:root :where(${o}-${e})${t?.selector||""}`:o===p.B4?`:where(.${e}${t?.selector||""})`:`:where(${o}.${e}${t?.selector||""})`,a+=`${i} { ${r.join("; ")}; }`}})}),o===p.B4&&n&&(a+=`${p.bB} { --wp--style--block-gap: ${s}; }`)),o===p.B4&&e){const t=["block","flex","grid"];Object.values(e).forEach(({className:e,displayMode:n,baseStyles:r})=>{n&&t.includes(n)&&(a+=`${o} .${e} { display:${n}; }`),r?.length&&r.forEach(t=>{const o=[];t.rules&&Object.entries(t.rules).forEach(([e,t])=>{o.push(`${e}: ${t}`)}),o.length&&(a+=`.${e}${t?.selector||""} { ${o.join("; ")}; }`)})})}return a}var oe=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function ne(e){if(!e)return{};const t=Object.entries(e).filter(([e])=>oe.includes(e)).map(([e,t])=>[e,JSON.parse(JSON.stringify(t))]);return Object.fromEntries(t)}var re=(e,t)=>{const o=[];if(!e?.settings)return o;const n=e=>{let t={};return p.EA.forEach(({path:o})=>{const n=(0,m.K)(e,o,!1);!1!==n&&(t=(0,m.n)(t,o,n))}),t},r=n(e.settings),i=e.settings?.custom;return(Object.keys(r).length>0||i)&&o.push({presets:r,custom:i,selector:p.bB}),Object.entries(e.settings?.blocks??{}).forEach(([e,r])=>{const i=r.custom;if("string"==typeof t||!t[e])return;const a=n(r);(Object.keys(a).length>0||i)&&o.push({presets:a,custom:i,selector:t[e]?.selector,featureSelectors:t[e]?.featureSelectors})}),o};function ie(e,t,o){if(!e||"string"==typeof e)return o;const n=e[t];return"string"==typeof n?n:"object"==typeof n&&n.root?n.root:o}function ae(e,t,{path:o,valueKey:n,valueFunc:r,cssVarInfix:i}){const a=(0,m.K)(e,o,[]),s=[];for(const e of["default","theme","custom"])if(a[e])for(const o of a[e]){const e=V(o.slug);n&&!r?s.push(`--wp--preset--${i}--${e}: ${o[n]}`):r&&"function"==typeof r&&s.push(`--wp--preset--${i}--${e}: ${r(o,t)}`)}return s}function se(e,t){return re(e,t).flatMap(({presets:e})=>function(e={}){return p.EA.filter(e=>"duotone"===e.path.at(-1)).flatMap(t=>{const o=(0,m.K)(e,t.path,{});return["default","theme"].filter(e=>o[e]).flatMap(e=>o[e].map(e=>function(e,t){const o=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach(e=>{const o=O(e).toRgb();t.r.push(o.r/255),t.g.push(o.g/255),t.b.push(o.b/255),t.a.push(o.a)}),t}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${o.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${o.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${o.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${o.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}(`wp-duotone-${e.slug}`,e.colors))).join("")})}(e))}function le(e,t){let o="";return e&&""!==e.trim()?(e.split("&").forEach(e=>{if(e&&""!==e.trim())if(e.includes("{")){const n=e.replace("}","").split("{");if(2!==n.length)return;const[r,i]=n,a=r.match(/([>+~\s]*::[a-zA-Z-]+)/),s=a?a[1]:"",l=a?r.replace(s,"").trim():r.trim();let c;c=""===l?t:r.startsWith(" ")?(0,p.q1)(t,l):(0,p.fx)(t,l),o+=`:root :where(${c})${s}{${i.trim()}}`}else o+=`:root :where(${t}){${e.trim()}}`}),o):o}function ce(e={},t=[],o={}){const{hasBlockGapSupport:n,hasFallbackGapSupport:i,disableLayoutStyles:a=!1,disableRootPadding:s=!1,styleOptions:l={}}=o,c=t.length>0?t:(0,d.getBlockTypes)(),u=function(e,t){const o=t?"."+t:"",n=`settings${o}`,r=`settings${o}`;if(t)return(0,m.K)(e,n)??(0,m.K)(e,r);let i={};return q.forEach(t=>{const o=(0,m.K)(e,`settings.${t}`)??(0,m.K)(e,`settings.${t}`);void 0!==o&&(i=(0,m.n)(i,t.split("."),o))}),i}(e,"spacing.blockGap"),g=n??null!==u,h=i??!g;if(!e?.styles||!e?.settings)return[[],{}];const _=function(e){const t=e.styles?.blocks,o=t?.["core/separator"];return o&&o.color?.background&&!o.color?.text&&!o.border?.color?{...e,styles:{...e.styles,blocks:{...t,"core/separator":{...o,color:{...o.color,text:o.color?.background}}}}}:e}(e),y=((e,t)=>{const{getBlockStyles:o}=(0,r.select)(d.store),n={};return e.forEach(e=>{const r=e.name,i=f(e);if(!i)return;let a=f(e,"filter.duotone");if(!a){const t=f(e),o=(0,d.getBlockSupport)(e,"color.__experimentalDuotone",!1);"string"==typeof o&&t&&(a=(0,p.q1)(t,o))}const s=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,l=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=o(r),u={};c?.forEach(e=>{const o=t?`-${t}`:"",n=`${e.name}${o}`,r=(0,p.NJ)(n,i);u[n]=r});const m=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const o={root:t};return Object.entries(Z).forEach(([t,n])=>{const r=f(e,t);r&&(o[n]=r)}),o})(e,i);n[r]={duotoneSelector:a??void 0,fallbackGapValue:l,featureSelectors:Object.keys(m).length?m:void 0,hasLayoutSupport:s,name:r,selector:i,styleVariationSelectors:c?.length?u:void 0}}),n})(c),b=((e,t)=>{const o=re(e,t);let n="";for(const{presets:t,custom:r,selector:i,featureSelectors:a}of o){const o=i,s={[o]:[]};if(e?.settings)for(const n of p.EA){const r=ae(t,e.settings,n);if(0===r.length)continue;const i=ie(a,n.path[0],o);s[i]||(s[i]=[]),s[i].push(...r)}const l=Y(r,"--wp--custom--","--");l.length>0&&s[o].push(...l);for(const[e,t]of Object.entries(s))t.length>0&&(n+=`${e}{${t.join(";")};}`)}return n})(_,y),w=((e,t,o,n,r=!1,i=!1,a={})=>{const s={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...a},l=((e,t)=>{const o=[];if(!e?.styles)return o;const n=ne(e.styles);return n&&o.push({styles:n,selector:p.B4,skipSelectorWrapper:!0}),Object.entries(d.__EXPERIMENTAL_ELEMENTS).forEach(([t,n])=>{e.styles?.elements?.[t]&&o.push({styles:e.styles?.elements?.[t]??{},selector:n,skipSelectorWrapper:!K[t]})}),Object.entries(e.styles?.blocks??{}).forEach(([e,n])=>{const r=ne(n),i=n,a=[];if(i?.variations){const o={};Object.entries(i.variations).forEach(([n,r])=>{const i=r;o[n]=ne(i),i?.css&&(o[n].css=i.css);const s="string"!=typeof t?t[e]?.styleVariationSelectors?.[n]:void 0;Object.entries(i?.elements??{}).forEach(([e,t])=>{t&&d.__EXPERIMENTAL_ELEMENTS[e]&&a.push({styles:t,selector:(0,p.q1)(s,d.__EXPERIMENTAL_ELEMENTS[e])})}),Object.entries(i?.blocks??{}).forEach(([e,o])=>{const n="string"!=typeof t?(0,p.q1)(s,t[e]?.selector):void 0,r="string"!=typeof t?(0,p.q1)(s,t[e]?.duotoneSelector):void 0,i="string"!=typeof t?(0,p.hX)(s,t[e]?.featureSelectors??{}):void 0,l=ne(o);o?.css&&(l.css=o.css),n&&"string"!=typeof t&&(a.push({selector:n,duotoneSelector:r,featureSelectors:i,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:l}),Object.entries(o.elements??{}).forEach(([e,t])=>{t&&d.__EXPERIMENTAL_ELEMENTS[e]&&a.push({styles:t,selector:(0,p.q1)(n,d.__EXPERIMENTAL_ELEMENTS[e])})}))})}),r.variations=o}"string"!=typeof t&&t?.[e]?.selector&&o.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:r,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors,name:e}),Object.entries(i?.elements??{}).forEach(([n,r])=>{"string"!=typeof t&&r&&t?.[e]&&d.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[e]?.selector.split(",").map(e=>d.__EXPERIMENTAL_ELEMENTS[n].split(",").map(t=>e+" "+t)).join(",")})}),o.push(...a)}),o})(e,t),c=re(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:f,wideSize:g}=e?.settings?.layout||{},h=s.marginReset||s.rootPadding||s.layoutStyles;let _="";if(s.presets&&(f||g)&&(_+=`${p.bB} {`,_=f?_+` --wp--style--global--content-size: ${f};`:_,_=g?_+` --wp--style--global--wide-size: ${g};`:_,_+="}"),h&&(_+=":where(body) {margin: 0;",s.rootPadding&&u&&(_+="padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),_+="}"),s.blockStyles&&l.forEach(({selector:t,duotoneSelector:a,styles:l,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:m,styleVariationSelectors:f,skipSelectorWrapper:g,name:h})=>{if(m){let t=Q(m,l);t=J(t,e.settings,h),t=X(t,e.settings),Object.entries(t).forEach(([e,t])=>{if(t.length){const o=t.join(";");_+=`:root :where(${e}){${o};}`}})}if(a){const e={};l?.filter&&(e.filter=l.filter,delete l.filter);const t=ee(e);t.length&&(_+=`${a}{${t.join(";")};}`)}r||p.B4!==t&&!d||(_+=te({style:l,selector:t,hasBlockGapSupport:o,hasFallbackGapSupport:n,fallbackGapValue:c}));const y=ee(l,t,u,e,i);y?.length&&(_+=`${g?t:`:root :where(${t})`}{${y.join(";")};}`),l?.css&&(_+=le(l.css,`:root :where(${t})`)),s.variationStyles&&f&&Object.entries(f).forEach(([o,r])=>{const i=l?.variations?.[o];if(i){if(m){let t=Q(m,i);t=J(t,e.settings,h),t=X(t,e.settings),Object.entries(t).forEach(([e,t])=>{if(t.length){const o=function(e,t){const o=e.split(","),n=[];return o.forEach(e=>{n.push(`${t.trim()}${e.trim()}`)}),n.join(", ")}(e,r),n=t.join(";");_+=`:root :where(${o}){${n};}`}})}const o=ee(i,r,u,e);o.length&&(_+=`:root :where(${r}){${o.join(";")};}`),i?.css&&(_+=le(i.css,`:root :where(${r})`)),d&&i?.spacing?.blockGap&&(_+=te({style:i,selector:r+t,hasBlockGapSupport:!0,hasFallbackGapSupport:n,fallbackGapValue:c}))}});const b=Object.entries(l).filter(([e])=>e.startsWith(":"));b?.length&&b.forEach(([e,o])=>{const n=ee(o);if(!n?.length)return;const r=`:root :where(${t.split(",").map(t=>t+e).join(",")}){${n.join(";")};}`;_+=r})}),s.layoutStyles&&(_+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",_+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",_+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),s.blockGap&&o){const t=W(e?.styles?.spacing?.blockGap)||"0.5em";_+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,_+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",_+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return s.presets&&c.forEach(({selector:e,presets:t})=>{p.B4!==e&&p.bB!==e||(e="");const o=function(e="*",t={}){return p.EA.reduce((o,{path:n,cssVarInfix:r,classes:i})=>{if(!i)return o;const a=(0,m.K)(t,n,[]);return["default","theme","custom"].forEach(t=>{a[t]&&a[t].forEach(({slug:t})=>{i.forEach(({classSuffix:n,propertyName:i})=>{const a=`.has-${V(t)}-${n}`,s=e.split(",").map(e=>`${e}${a}`).join(","),l=`var(--wp--preset--${r}--${V(t)})`;o+=`${s}{${i}: ${l} !important;}`})})}),o},"")}(e,t);o.length>0&&(_+=o)}),_})(_,y,g,h,a,s,l),v=se(_,y),x=[{css:b,isGlobalStyles:!0},{css:w,isGlobalStyles:!0},{css:_?.styles?.css??"",isGlobalStyles:!0},{assets:v,__unstableType:"svgs",isGlobalStyles:!0}];return c.forEach(e=>{const t=_?.styles?.blocks?.[e.name];if(t?.css){const{featureSelectors:o}=y[e.name],n="object"==typeof o?o?.css:void 0;let r;"string"==typeof n?r=n:"object"==typeof n&&(r=n?.root);const i=r??y[e.name].selector;x.push({css:le(t.css,i),isGlobalStyles:!0})}}),[x,_.settings]}const de={},ue=[],pe=(e={})=>(0,n.useMemo)(()=>e?.styles&&e?.settings?ce(e,[],{hasBlockGapSupport:!0,hasFallbackGapSupport:!1,disableLayoutStyles:!1,disableRootPadding:!1}):[ue,de],[e]);var me=o(61863);const fe=[];function ge(){const{userTheme:e}=(0,c.u)(),{editorTheme:t,layout:o,deviceType:a,initialEditorSettingsStyles:d}=(0,r.useSelect)(e=>{const{getEditorSettings:t,getDeviceType:o}=e(i.store),n=t(),r=e(l.H).getInitialEditorSettings();return{editorTheme:e(l.H).getTheme(),layout:n?.__experimentalFeatures?.layout,deviceType:o(),initialEditorSettingsStyles:r?.styles}},[]),u=(0,n.useMemo)(()=>s().all([{},t||{},e||{}]),[t,e]),[p]=pe(u);let m="";o&&"Mobile"!==a&&(m=`display:flow-root; width:${o?.contentSize||"660px"}; margin: 0 auto;box-sizing: border-box;max-width: 100%;`);const f=u.styles?.spacing?.padding;return f&&(m+=`padding-left:${(0,me.DJ)(f.left)};`,m+=`padding-right:${(0,me.DJ)(f.right)};`),[(0,n.useMemo)(()=>[...p??[],{css:`.is-root-container{ ${m} }`},...d??[]],[p,d,m])||fe]}},7582:(e,t,o)=>{o.d(t,{L:()=>a});var n=o(47143),r=o(3597);const i="core/editor";function a(){return(0,n.useSelect)(e=>{const t=e(r.H);if(!t)return!1;const o=e(i);if(!o)return!1;const n=o.getCurrentPostId(),a=o.getCurrentPostType(),s=t.getEmailPostId(),l=t.getEmailPostType();if(String(n)===String(s)&&String(a)===String(l))return!0;if("wp_template"===a){const e=t.getCurrentTemplate();if(!e)return!1;const o=t.getEmailTemplates();return!!o&&o.some(t=>t.id===e.id&&t.post_types?.includes(l))}return!1},[])}},24737:(e,t,o)=>{o.d(t,{p:()=>u});var n=o(86087),r=o(74997),i=o(47143),a=o(52619),s=o(3597);const l=[];function c(e,t){return e.map(e=>"core/post-content"===e.name?{...e,name:"core/group",innerBlocks:t}:e.innerBlocks?.length?{...e,innerBlocks:c(e.innerBlocks,t)}:e)}const d={};function u(e="",t=!0){const{templates:o,patterns:u,emailPosts:p,hasEmailPosts:m}=(0,i.useSelect)(o=>{const n=t&&"swap"!==e?o(s.H).getSentEmailEditorPosts():void 0;return{templates:o(s.H).getEmailTemplates(),patterns:o(s.H).getBlockPatternsForEmailTemplate(),emailPosts:n,hasEmailPosts:!(!n||!n?.length)}},[e,t]),f=(0,n.useMemo)(()=>{let t=[];const n=e&&(0,r.parse)(e);if(t=n?[{blocks:n}]:u,!t||!o)return l;const i=[];return o?.filter(e=>"email-general"!==e.slug)?.forEach(e=>{t?.forEach(t=>{let o=(0,r.parse)(e.content?.raw);o=c(o,t.blocks),i.push({id:e.id,slug:e.slug,previewContentParsed:o,emailParsed:t.emailBlocks??t.blocks,template:e,category:t.categories?.[0],type:e.type,displayName:t.title?`${e.title.rendered} - ${t.title}`:e.title.rendered})})}),i},[o,u,e]),g=(0,n.useMemo)(()=>p?.map(e=>{const t=(0,a.applyFilters)("woocommerce_email_editor_preferred_template_title","",e),{postTemplateContent:o}=function(e,t=[]){const o=e.template,n={postTemplateContent:null};if(!o)return n;if(d[o])return d[o];const r=t.find(e=>e.slug===o);if(!r)return n;const i={postTemplateContent:r?.template};return d[o]=i,i}(e,f),n=(0,r.parse)(e.content?.raw);let i=n;o?.content?.raw&&(i=c((0,r.parse)(o?.content?.raw),n));const s={...e,title:{raw:e.title.raw,rendered:t||e.title.rendered}};return{id:e.id,slug:e.slug,previewContentParsed:i,emailParsed:n,category:"recent",type:e.type,displayName:s.title.rendered,template:s}}),[p,f]);return[f||l,g||l,m]}},31592:(e,t,o)=>{o.d(t,{u:()=>s});var n=o(86087),r=o(47143),i=o(3582),a=o(3597);function s(){const{globalStylePost:e}=(0,r.useSelect)(e=>({globalStylePost:e(a.H).getGlobalEmailStylesPost()||null}),[]);return{userTheme:(0,n.useMemo)(()=>({settings:e?.settings,styles:e?.styles}),[e?.settings,e?.styles]),updateUserTheme:(0,n.useCallback)(t=>{e&&(0,r.dispatch)(i.store).editEntityRecord("root","globalStyles",e.id,{styles:t.styles,settings:t.settings})},[e])}}},45597:(e,t,o)=>{o.d(t,{oq:()=>y,KE:()=>g,fA:()=>h,D_:()=>p,oz:()=>l,Lf:()=>_,Bi:()=>b,yd:()=>w,sV:()=>f,H7:()=>m});var n=o(47143);const r=window.wp.privateApis;var i=o(43656),a=o(94715);const{unlock:s}=(0,r.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-site"),{ColorPanel:l,BackgroundPanel:c,useHasColorPanel:d,useHasBackgroundPanel:u}=s(a.privateApis),p=c??(()=>null),m=d??(()=>!0),f=u??(()=>!1),{Editor:g,FullscreenMode:h,ViewMoreMenuGroup:_,BackButton:y}=s(i.privateApis),{registerEntityAction:b,unregisterEntityAction:w}=s((0,n.dispatch)(i.store))},3597:(e,t,o)=>{o.d(t,{H:()=>n,q:()=>r});const n="email-editor/editor",r={name:"personalization_tag",kind:"root",baseURL:"/woocommerce-email-editor/v1/personalization_tags",key:"token"}},78982:(e,t,o)=>{o.d(t,{y$:()=>ue});var n={};o.r(n),o.d(n,{invalidatePersonalizationTagsCache:()=>h,requestSendingNewsletterPreview:()=>w,setContentValidation:()=>v,setEditorConfig:()=>j,setEditorSettings:()=>x,setEditorTheme:()=>k,setEditorUrls:()=>S,setEmailPost:()=>g,setEmailPostType:()=>_,setTemplateSelected:()=>b,setTemplateToPost:()=>y,togglePreviewModal:()=>m,updateSendPreviewEmail:()=>f});var r={};o.r(r),o.d(r,{canUserEditGlobalEmailStyles:()=>Z,canUserEditTemplates:()=>W,getBlockPatternsForEmailTemplate:()=>D,getContentValidation:()=>ce,getCurrentTemplate:()=>q,getCurrentTemplateContent:()=>K,getEditedEmailContent:()=>F,getEditedPostTemplate:()=>U,getEmailPostId:()=>X,getEmailPostType:()=>Q,getEmailTemplates:()=>J,getGlobalEmailStylesPost:()=>Y,getGlobalStylesPostId:()=>se,getInitialEditorSettings:()=>ee,getPaletteColors:()=>te,getPersonalizationTagsList:()=>re,getPreviewState:()=>oe,getSentEmailEditorPosts:()=>V,getStyles:()=>ie,getTheme:()=>ae,getUrls:()=>le,hasEdits:()=>L,hasEmptyContent:()=>H,isEmailSent:()=>$,isFeatureActive:()=>B,isTemplateSelected:()=>de});var i=o(47143),a=o(3582);const s=window.wp.dataControls;var l=o(3597);const c=new Map;function d(e){let t=c.get(e);return t||(t={context:"view",per_page:-1,...e?{post_id:e}:{}},c.set(e,t)),t}var u=o(9193),p=o(76765);function m(e){return{type:"CHANGE_PREVIEW_STATE",state:{isModalOpened:e}}}function f(e){return{type:"CHANGE_PREVIEW_STATE",state:{toEmail:e}}}const g=(e,t)=>async({dispatch:o})=>{if(!e||!t)throw new Error("setEmailPost requires valid postId and postType parameters");o({type:"SET_EMAIL_POST",state:{postId:e,postType:t}})},h=()=>async({registry:e})=>{const t=e.select(l.H).getEmailPostId();e.dispatch(a.store).invalidateResolution("getEntityRecords",[l.q.kind,l.q.name,d(t)])};function _(e){if(!e)throw new Error("setEmailPostType requires a valid postType parameter");return{type:"SET_EMAIL_POST",state:{postType:e}}}const y=e=>async({registry:t})=>{const o=t.select(l.H).getEmailPostId(),n=t.select(l.H).getEmailPostType();t.dispatch(a.store).editEntityRecord("postType",n,o,{template:e})};function b(){return{type:"SET_TEMPLATE_SELECTED"}}function*w(e){if(!(0,i.select)(l.H).getPreviewState().isSendingPreviewEmail){yield{type:"CHANGE_PREVIEW_STATE",state:{sendingPreviewStatus:null,isSendingPreviewEmail:!0}};try{const t=(0,i.select)(l.H).getEmailPostId();yield(0,s.apiFetch)({path:"/woocommerce-email-editor/v1/send_preview_email",method:"POST",data:{email:e,postId:t}}),yield{type:"CHANGE_PREVIEW_STATE",state:{sendingPreviewStatus:u.T.SUCCESS,isSendingPreviewEmail:!1}},(0,p.yM)("sent_preview_email",{postId:t,email:e})}catch(t){(0,p.yM)("sent_preview_email_error",{email:e}),yield{type:"CHANGE_PREVIEW_STATE",state:{sendingPreviewStatus:u.T.ERROR,isSendingPreviewEmail:!1,errorMessage:JSON.stringify(t?.error)}}}}}function v(e){return{type:"SET_CONTENT_VALIDATION",validation:e}}function x(e){return{type:"SET_EDITOR_SETTINGS",editorSettings:e}}function k(e){return{type:"SET_EDITOR_THEME",theme:e}}function S(e){return{type:"SET_EDITOR_URLS",urls:e}}function j(e){return{type:"SET_EDITOR_CONFIG",config:e}}function E(e,t){switch(t.type){case"CHANGE_PREVIEW_STATE":return{...e,preview:{...e.preview,...t.state}};case"SET_EMAIL_POST":return{...e,...t.state};case"SET_CONTENT_VALIDATION":return{...e,contentValidation:t.validation};case"SET_TEMPLATE_SELECTED":return{...e,templateSelected:!0};case"SET_EDITOR_SETTINGS":return{...e,editorSettings:t.editorSettings};case"SET_EDITOR_THEME":return{...e,theme:t.theme};case"SET_EDITOR_URLS":return{...e,urls:{...e.urls,...t.urls}};case"SET_EDITOR_CONFIG":return{...e,editorSettings:t.config.editorSettings,theme:t.config.theme,urls:t.config.urls,preview:{...e.preview,toEmail:t.config.userEmail},styles:{...e.styles,globalStylesPostId:t.config.globalStylesPostId??null}};default:return e}}var C=o(43656),T=o(41233),M=o(74997),P=o(52619);function N(e){return e?.content&&"function"==typeof e.content?e.content(e):e?.blocks?(0,M.serialize)(e.blocks):e?.content?e.content:""}const z=new WeakMap;function R(e){let t=z.get(e);return t||(t={...e,get blocks(){return(0,M.parse)(e.content)},get emailBlocks(){return e.emailContent?(0,M.parse)(e.emailContent):null}},z.set(e,t)),t}const I=new WeakMap;function A(e){if(!e)return null;const t=I.get(e);if(t)return t;const o={...e,title:e?.title?.raw||e?.title||"",content:e?.content?.raw||e?.content||""};return I.set(e,o),o}const B=(0,i.createRegistrySelector)(e=>(t,o)=>!!e(T.store).get(l.H,o)),L=(0,i.createRegistrySelector)(e=>()=>{const t=e(l.H).getEmailPostId(),o=e(l.H).getEmailPostType();return!!e(a.store).hasEditsForEntityRecord("postType",o,t)}),H=(0,i.createRegistrySelector)(e=>()=>{const t=e(l.H).getEmailPostId(),o=e(l.H).getEmailPostType(),n=e(a.store).getEntityRecord("postType",o,t);if(!n)return!0;const{content:r}=n;return!r.raw}),$=(0,i.createRegistrySelector)(e=>()=>{const t=e(l.H).getEmailPostId(),o=e(l.H).getEmailPostType(),n=e(a.store).getEntityRecord("postType",o,t);return!!n&&"sent"===n.status}),F=(0,i.createRegistrySelector)(e=>()=>{const t=e(l.H).getEmailPostId(),o=e(l.H).getEmailPostType(),n=e(a.store).getEditedEntityRecord("postType",o,t);return n?N(n):""}),O={per_page:30,status:"publish,sent"},V=(0,i.createRegistrySelector)(e=>()=>{const t=e(l.H).getEmailPostType(),o=(0,P.applyFilters)("woocommerce_email_editor_recent_emails_query",{...O},t),n=(r=o)&&"object"==typeof r&&!Array.isArray(r)?o:O;var r;return e(a.store).getEntityRecords("postType",t,n)?.filter(e=>""!==e?.content?.raw)||[]}),D=(0,i.createRegistrySelector)(e=>{const t=e(l.H).getEmailPostType();return(0,i.createSelector)(()=>t?e(a.store).getBlockPatterns().filter(({templateTypes:e,postTypes:o})=>Array.isArray(e)&&e.includes("email-template")&&(void 0===o||0===o.length||o.includes(t))).map(R):[],()=>[e(a.store).getBlockPatterns(),t])}),W=(0,i.createRegistrySelector)(e=>()=>e(a.store).canUser("create",{kind:"postType",name:"wp_template"}));function G(e,t){return W()?e(a.store).getEditedEntityRecord("postType","wp_template",t):A(e(a.store).getEntityRecord("postType","wp_template",t,{context:"view"}))}const U=(0,i.createRegistrySelector)(e=>(t,o)=>{const n=o||e(C.store).getEditedPostAttribute("template");if(n){const t={context:"view",per_page:-1,_woocommerce_email_editor:"fetch-all-templates"},o=e(a.store).getEntityRecords("postType","wp_template",t)?.find(e=>e.slug===n);return o?G(e,o.id):null}const r=e(a.store).getDefaultTemplateId({slug:"email-general"});return G(e,r)}),q=(0,i.createRegistrySelector)(e=>()=>{if("wp_template"===e(C.store).getCurrentPostType()){const t=e(C.store).getCurrentPostId();return e(a.store).getEditedEntityRecord("postType","wp_template",t)}return e(l.H).getEditedPostTemplate()}),K=()=>{const e=q();return e?N(e):""},Z=(0,i.createRegistrySelector)(e=>()=>{const t=e(l.H).getGlobalStylesPostId();return{postId:t,canEdit:e(a.store).canUser("update",{kind:"root",name:"globalStyles",id:t})}}),Y=(0,i.createRegistrySelector)(e=>()=>{const{postId:t,canEdit:o}=Z();return t&&void 0!==o&&t?o?e(a.store).getEditedEntityRecord("root","globalStyles",t):A(e(a.store).getEntityRecord("root","globalStyles",t,{context:"view"})):null}),J=(0,i.createRegistrySelector)(e=>{const t=e(l.H).getEmailPostType();return(0,i.createSelector)(()=>e(a.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:t,context:"view"})?.filter(e=>e.post_types.includes(t)),()=>[e(a.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:t,context:"view"})])});function X(e){return e.postId}function Q(e){return e.postType}function ee(e){return e.editorSettings}function te(e){return e.editorSettings?.__experimentalFeatures?.color?.palette}function oe(e){return e.preview}const ne=[],re=(0,i.createRegistrySelector)(e=>{let t=null;return()=>{const o=e(l.H).getEmailPostId(),n=e(a.store).getEntityRecords(l.q.kind,l.q.name,d(o))||ne,r=e(l.H).getEmailPostType();if(!r)return n;const i="wp_template"===r?e(l.H).getCurrentTemplate()?.post_types:void 0;if(t&&t.tags===n&&t.postType===r&&t.templatePostTypes===i)return t.result;const s=n.filter(e=>void 0===e.postTypes||0===e.postTypes.length||("wp_template"===r?Array.isArray(i)&&i.some(t=>e.postTypes.includes(t)):e.postTypes.includes(r)));return t={tags:n,postType:r,templatePostTypes:i,result:s},s}});function ie(e){return e.theme?.styles}function ae(e){return e.theme}function se(e){return e.styles.globalStylesPostId}function le(e){return e.urls}function ce(e){return e.contentValidation}function de(e){return e.templateSelected}const ue=()=>{if(void 0!==(0,i.select)(l.H))return(0,i.select)(l.H);const e=(0,i.createReduxStore)(l.H,{actions:n,controls:s.controls,selectors:r,resolvers:{},reducer:E,initialState:{editorSettings:void 0,theme:void 0,styles:{globalStylesPostId:null},urls:{back:"",listings:""},preview:{toEmail:"",isModalOpened:!1,isSendingPreviewEmail:!1,sendingPreviewStatus:null},contentValidation:void 0,templateSelected:!1}});return(0,i.register)(e),(0,i.dispatch)(a.store).addEntities([l.q]),e}},9193:(e,t,o)=>{o.d(t,{T:()=>n});let n=function(e){return e.SUCCESS="success",e.ERROR="error",e}({})},61863:(e,t,o)=>{function n(e){if("string"!=typeof e)return null;const t=e.match(/^var:preset\|([a-zA-Z0-9-]+)\|([a-zA-Z0-9-]+)$/);return t?`--wp--preset--${t[1]}--${t[2]}`:null}function r(e){const t=n(e);return t?`var(${t})`:e}function i(e){const t=n(e);if(!t)return e;const o=document.querySelector(":root");return o&&getComputedStyle(o).getPropertyValue(t).trim()||e}o.d(t,{DJ:()=>r,pr:()=>i})},76597:e=>{var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((o=e,Array.isArray(o)?[]:{}),e,t):e;var o}function r(e,t,o){return e.concat(t).map(function(e){return n(e,o)})}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,o,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(o);return c===Array.isArray(e)?c?l.arrayMerge(e,o,l):function(e,t,o){var r={};return o.isMergeableObject(e)&&i(e).forEach(function(t){r[t]=n(e[t],o)}),i(t).forEach(function(i){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(a(e,i)&&o.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return s;var o=t.customMerge(e);return"function"==typeof o?o:s}(i,o)(e[i],t[i],o):r[i]=n(t[i],o))}),r}(e,o,l):n(o,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,o){return s(e,o,t)},{})};var l=s;e.exports=l},94931:(e,t,o)=>{var n=o(51609),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,o){var n,i={},c=null,d=null;for(n in void 0!==o&&(c=""+o),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:r,type:e,key:c,ref:d,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},39793:(e,t,o)=>{e.exports=o(94931)},63133:(e,t,o)=>{var n=o(51609),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!r(e,o)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var o=t(),n=i({inst:{value:o,getSnapshot:t}}),r=n[0].inst,d=n[1];return s(function(){r.value=o,r.getSnapshot=t,c(r)&&d({inst:r})},[e,o,t]),a(function(){return c(r)&&d({inst:r}),e(function(){c(r)&&d({inst:r})})},[e]),l(o),o};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:d},89104:(e,t,o)=>{e.exports=o(63133)},51609:e=>{e.exports=window.React},66087:e=>{e.exports=window.lodash},1455:e=>{e.exports=window.wp.apiFetch},94715:e=>{e.exports=window.wp.blockEditor},74997:e=>{e.exports=window.wp.blocks},56427:e=>{e.exports=window.wp.components},29491:e=>{e.exports=window.wp.compose},3582:e=>{e.exports=window.wp.coreData},47143:e=>{e.exports=window.wp.data},43656:e=>{e.exports=window.wp.editor},86087:e=>{e.exports=window.wp.element},52619:e=>{e.exports=window.wp.hooks},18537:e=>{e.exports=window.wp.htmlEntities},27723:e=>{e.exports=window.wp.i18n},48558:e=>{e.exports=window.wp.keycodes},692:e=>{e.exports=window.wp.notices},92279:e=>{e.exports=window.wp.plugins},41233:e=>{e.exports=window.wp.preferences},5573:e=>{e.exports=window.wp.primitives},50876:e=>{e.exports=window.wp.richText},49786:e=>{e.exports=window.wp.styleEngine},90314:(e,t,o)=>{o.d(t,{B4:()=>a,EA:()=>l,NJ:()=>m,Px:()=>_,bB:()=>s,fx:()=>p,hX:()=>u,q1:()=>d,yQ:()=>h,y_:()=>f});var n=o(49786),r=o(40166),i=o(12024),a="body",s=":root",l=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>(0,r.j)(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]},{path:["dimensions","dimensionSizes"],valueKey:"size",cssVarInfix:"dimension",classes:[]}],c={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function d(e,t){if(!e||!t)return t;const o=e.split(","),n=t.split(","),r=[];return o.forEach(e=>{n.forEach(t=>{r.push(`${e.trim()} ${t.trim()}`)})}),r.join(", ")}function u(e,t){if(!e||!t)return;const o={};return Object.entries(t).forEach(([t,n])=>{"string"==typeof n&&(o[t]=d(e,n)),"object"==typeof n&&(o[t]={},Object.entries(n).forEach(([n,r])=>{o[t][n]=d(e,r)}))}),o}function p(e,t){return e.includes(",")?e.split(",").map(e=>e+t).join(","):e+t}function m(e,t){const o=`.is-style-${e}`;if(!t)return o;const n=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,n)=>t+n+o;return t.split(",").map(e=>e.replace(n,r)).join(",")}function f(e,t){if(!e||!t)return e;const o=function(e,t){if(!e||!t)return e;if("object"==typeof e&&"ref"in e&&e?.ref){const o=(0,n.getCSSValueFromRawStyle)((0,i.K)(t,e.ref));if("object"==typeof o&&null!==o&&"ref"in o&&o?.ref)return;return void 0===o?e:o}return e}(e,t);return"object"==typeof o&&null!==o&&"url"in o&&o?.url&&(o.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const o=t.find(t=>t?.name===e);return o?.href?o?.href:e}(o.url,t?._links?.["wp:theme-file"])),o}function g(e,t,o=[],n="slug",r){const a=[t?(0,i.K)(e,["blocks",t,...o]):void 0,(0,i.K)(e,o)].filter(Boolean);for(const i of a)if(i){const a=["custom","theme","default"];for(const s of a){const a=i[s];if(a){const i=a.find(e=>e[n]===r);if(i)return"slug"===n||g(e,t,o,"slug",i.slug)[n]===i[n]?i:void 0}}}}function h(e,t,o){if(!o||"string"!=typeof o){if("object"!=typeof o||null===o||!("ref"in o)||"string"!=typeof o.ref)return o;{const t=(0,i.K)(e,o.ref);if(!t||"object"==typeof t&&"ref"in t)return t;o=t}}let n;if(o.startsWith("var:"))n=o.slice(4).split("|");else{if(!o.startsWith("var(--wp--")||!o.endsWith(")"))return o;n=o.slice(10,-1).split("--")}const[r,...a]=n;return"preset"===r?function(e,t,o,[n,r]=[]){const i=l.find(e=>e.cssVarInfix===n);if(!i||!e.settings)return o;const a=g(e.settings,t,i.path,"slug",r);if(a){const{valueKey:o}=i;return h(e,t,a[o])}return o}(e,t,o,a):"custom"===r?function(e,t,o,n=[]){const r=(t?(0,i.K)(e?.settings??{},["blocks",t,"custom",...n]):void 0)??(0,i.K)(e?.settings??{},["custom",...n]);return r?h(e,t,r):o}(e,t,o,a):o}function _(e,t,o,n){if(!n)return n;const r=c[o],i=l.find(e=>e.cssVarInfix===r);if(!i)return n;const{valueKey:a,path:s}=i,d=g(e,t,s,a,n);return d?`var:preset|${r}|${d.slug}`:n}},12024:(e,t,o)=>{function n(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const n=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[n]=o,e}o.d(t,{K:()=>r,n:()=>n});var r=(e,t,o)=>{const n=Array.isArray(t)?t:t.split(".");let r=e;return n.forEach(e=>{r=r?.[e]}),r??o}},40166:(e,t,o)=>{o.d(t,{j:()=>p});var n="1600px",r="320px",i=1,a=.25,s=.75,l="14px";function c(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:o,rootSizeValue:n,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=r?.join("|"),a=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),s=e.toString().match(a);if(!s||s.length<3)return null;let[,l,c]=s,u=parseFloat(l);return"px"!==o||"em"!==c&&"rem"!==c||(u*=n,c=o),"px"!==c||"em"!==o&&"rem"!==o||(u/=n,c=o),"em"!==o&&"rem"!==o||"em"!==c&&"rem"!==c||(c=o),c?{value:d(u,3),unit:c}:null}function d(e,t=3){const o=Math.pow(10,t);return Math.round(e*o)/o}function u(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function p(e,t){const{size:o}=e;if(!o||"0"===o||!1===e?.fluid)return o;if(!u(t?.typography)&&!u(e))return o;const p=function(e){const t=e?.typography??{},o=e?.layout,n=c(o?.wideSize)?o?.wideSize:null;return u(t)&&n?{fluid:{maxViewportWidth:n,..."object"==typeof t.fluid?t.fluid:{}}}:{fluid:t?.fluid}}(t)?.fluid??{};return function({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:u=r,maximumViewportWidth:p=n,scaleFactor:m=i,minimumFontSizeLimit:f}){if(f=c(f)?f:l,o){const n=c(o);if(!n?.unit||!n?.value)return null;const r=c(f,{coerceTo:n.unit});if(r?.value&&!e&&!t&&n?.value<=r?.value)return null;if(t||(t=`${n.value}${n.unit}`),!e){const t="px"===n.unit?n.value:16*n.value,o=Math.min(Math.max(1-.075*Math.log2(t),a),s),i=d(n.value*o,3);e=r?.value&&i<r?.value?`${r.value}${r.unit}`:`${i}${n.unit}`}}const g=c(e),h=g?.unit||"rem",_=c(t,{coerceTo:h});if(!g||!_)return null;const y=c(e,{coerceTo:"rem"}),b=c(p,{coerceTo:h}),w=c(u,{coerceTo:h});if(!b||!w||!y)return null;const v=b.value-w.value;if(!v)return null;const x=d(w.value/100,3),k=d(x,3)+h,S=d(((_.value-g.value)/v*100||1)*m,3);return`clamp(${e}, ${y.value}${y.unit} + ((1vw - ${k}) * ${S}), ${t})`}({minimumFontSize:"boolean"==typeof e?.fluid?void 0:e?.fluid?.min,maximumFontSize:"boolean"==typeof e?.fluid?void 0:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:"object"==typeof p?p?.minFontSize:void 0,maximumViewportWidth:"object"==typeof p?p?.maxViewportWidth:void 0,minimumViewportWidth:"object"==typeof p?p?.minViewportWidth:void 0})||o}},4921:(e,t,o)=>{function n(e){var t,o,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(o=n(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}o.d(t,{A:()=>r});const r=function(){for(var e,t,o=0,r="",i=arguments.length;o<i;o++)(e=arguments[o])&&(t=n(e))&&(r&&(r+=" "),r+=t);return r}}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var i=Object.create(null);r.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>o[e]);return a.default=()=>o,r.d(i,a),i},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{EditTemplateModal:()=>Oo.i,EmailActionsFill:()=>mt.L,ExperimentalEmailEditor:()=>Bo,RichTextWithButton:()=>$o.O,SelectTemplateModal:()=>fe.i,SendPreviewEmail:()=>lt.P,TemplateSelection:()=>Fo.x,createStore:()=>Ut.y$,debouncedRecordEvent:()=>E.T7,initializeEditor:()=>Vo,isEventTrackingEnabled:()=>E.V1,recordEvent:()=>E.yM,recordEventOnce:()=>E.xW,registerEntityAction:()=>de.Bi,storeName:()=>k.H,unregisterEntityAction:()=>de.yd,useEmailCss:()=>ue.b,useIsEmailEditor:()=>Lo.L,usePreviewTemplates:()=>Ho.p});var e=r(47143),t=r(86087),o=r(52619),n=r(43656),a=r(29491);window.wp.formatLibrary;var s=r(74997);function l(){try{return(0,s.getBlockTypes)().filter(e=>!0===e.supports?.email).map(e=>e.name)}catch(e){return console.error("Failed to get allowed block names:",e),[]}}const c=window.wp.blockLibrary;var d=r(94715),u=r(897),p=r(52716),m=r(39793);const f=(0,a.createHigherOrderComponent)(e=>function(t){return"core/columns"!==t.name?(0,m.jsx)(e,{...t}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(e,{...t}),(0,m.jsx)(d.InspectorControls,{children:(0,m.jsx)("style",{children:"\n .components-panel__body .components-toggle-control .components-form-toggle { opacity: 0.3; }\n .components-panel__body .components-toggle-control .components-form-toggle__input { pointer-events: none; }\n .components-panel__body .components-toggle-control label { pointer-events: none; }\n "})})]})},"columnsEditCallback"),g=["core/column","core/columns"];var h=r(27723);function _({layoutClassNames:e}){const t=(0,d.useBlockProps)({className:e});return(0,m.jsxs)("div",{...t,children:[(0,m.jsx)("p",{children:(0,h.__)("This is the Content block.","woocommerce")}),(0,m.jsx)("p",{children:(0,h.__)("It will display all the blocks in the email content, which might be only simple text paragraphs. You can enrich your message with images, incorporate data through tables, explore different layout designs with columns, or use any other block type.","woocommerce")})]})}const y=(0,a.createHigherOrderComponent)(e=>function(t){return"core/image"!==t.name?(0,m.jsx)(e,{...t}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(e,{...t}),(0,m.jsx)(d.InspectorControls,{children:(0,m.jsx)("style",{children:"\n .components-tools-panel .components-toggle-control { display: none; }\n "})})]})},"imageEditCallback");var b=r(50876),w=r(56427),v=r(91068),x=r(36777),k=r(3597),S=r(6406);const j=({contentRef:o,onUpdate:n})=>{const[r,i]=(0,t.useState)(!1),[a,s]=(0,t.useState)(null),[l,c]=(0,t.useState)(""),[d,u]=(0,t.useState)(""),p=(0,e.useSelect)(e=>e(k.H).getPersonalizationTagsList(),[]);return(0,t.useEffect)(()=>{if(!o||!o.current)return;const e=o.current,t=e=>{const t=e.target.closest("a[data-link-href]");t&&(s(t),u(t.getAttribute("data-link-href")||""),c(t.textContent||""),i(!0))};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}},[o]),(0,m.jsx)(m.Fragment,{children:r&&a&&(0,m.jsx)(w.Popover,{position:"bottom left",onClose:()=>i(!1),anchor:a,className:"woocommerce-personalization-tag-popover",children:(0,m.jsxs)("div",{className:"woocommerce-personalization-tag-popover-content",children:[(0,m.jsx)(w.TextControl,{label:(0,h.__)("Link Text","woocommerce"),value:l,onChange:e=>c(e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off"}),(0,m.jsx)(w.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,h.__)("Link tag","woocommerce"),value:d,onChange:e=>{u(e)},options:p.filter(e=>e.category===(0,h.__)("Link","woocommerce")).map(e=>({label:e.name,value:e.token}))}),(0,m.jsxs)("div",{className:"woocommerce-personalization-tag-popover-content-buttons",children:[(0,m.jsx)(w.Button,{isTertiary:!0,onClick:()=>{i(!1)},children:(0,h.__)("Cancel","woocommerce")}),(0,m.jsx)(w.Button,{isPrimary:!0,onClick:()=>{i(!1),n(a,d,l)},children:(0,h.__)("Update link","woocommerce")})]})]})})})};var E=r(76765),C=r(23);function T({contentRef:o}){const[n,r]=(0,t.useState)(!1),i=(0,e.useSelect)(e=>e("core/block-editor").getSelectedBlockClientId()),{updateBlockAttributes:a}=(0,e.useDispatch)("core/block-editor"),s=(0,e.useSelect)(e=>e("core/block-editor").getBlockAttributes(i)),l="text"in s?"text":"content",c=s?.[l]?.originalHTML||s?.[l]||"",u=(0,t.useCallback)((e,t)=>{let{start:n,end:r}=(0,v.E)(o,c),s="";if(t){let o=(0,b.create)({html:c});o=(0,b.insert)(o,t,n,r),r=n+t.length,o=(0,b.applyFormat)(o,{type:"woocommerce-email-editor/link-shortcode",attributes:{"data-link-href":e,contenteditable:"false",style:"text-decoration: underline;"}},n,r),s=(0,b.toHTMLString)({value:o})}else{let t=(0,b.create)({html:c});t=(0,b.insert)(t,(0,b.create)({html:`\x3c!--${e}--\x3e `}),n,r),s=(0,b.toHTMLString)({value:t})}a(i,{[l]:s})},[c,l,o,i,a]);return(0,m.jsx)(d.BlockControls,{children:(0,m.jsxs)(w.ToolbarGroup,{children:[(0,m.jsx)(w.ToolbarButton,{icon:"shortcode",title:(0,h.__)("Personalization Tags","woocommerce"),onClick:()=>{r(!0),(0,E.yM)("block_controls_personalization_tags_button_clicked")}}),(0,m.jsx)(S.t,{contentRef:o,onUpdate:(e,t)=>{const o=c.replace(`\x3c!--[${e}]--\x3e`,`\x3c!--[${t}]--\x3e`);a(i,{[l]:o})}}),(0,m.jsx)(j,{contentRef:o,onUpdate:(e,t,o)=>{const n=e.getAttribute("data-link-href").replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`<a([^>]*?)data-link-href="${n}"([^>]*?)>${e.textContent}</a>`,"gi"),s=c.replace(r,(e,n,r)=>`<a${n}data-link-href="${t}"${r}>${o}</a>`);a(i,{content:s})}}),(0,m.jsx)(x.x,{isOpened:n,onInsert:(e,t)=>{u(e,t),r(!1)},closeCallback:()=>r(!1),canInsertLink:!0,openedBy:"block-controls"})]})})}const M=(0,a.createHigherOrderComponent)(o=>n=>{const{attributes:r,setAttributes:i,name:a}=n,{content:s}=r,l=(0,e.useSelect)(e=>e(k.H).getPersonalizationTagsList(),[]),c=(0,t.useCallback)(()=>s?(0,v.D)(s,l):"",[s,l]),d=(0,t.useCallback)(e=>{if(void 0!==e.content){const t=(0,v.D)(e.content,l);i({...e,content:t})}else i(e)},[l,i]);return"core/paragraph"===a||"core/heading"===a||"core/list-item"===a?(0,m.jsx)(o,{...n,attributes:{...r,content:c()},setAttributes:d}):(0,m.jsx)(o,{...n})},"personalizationTagsLiveContentUpdate"),P={youtube:["youtube.com","youtu.be"],videopress:["videopress.com","video.wordpress.com"],vimeo:["vimeo.com","player.vimeo.com"],tiktok:["tiktok.com"],dailymotion:["dailymotion.com","dai.ly"]},N=(0,a.createHigherOrderComponent)(o=>function(n){const r="core/embed"===n.name,{responsive:i}=n.attributes,{setAttributes:a}=n,s=(0,e.useDispatch)("core/block-editor");if((0,t.useEffect)(()=>{r&&i&&(s.__unstableMarkNextChangeAsNotPersistent(),a({responsive:!1}))},[r,i,a,s]),!r)return(0,m.jsx)(o,{...n});const{url:l,type:c}=n.attributes;return!l||"wp-embed"===c||function(e){let t="";try{t=new URL(e).hostname}catch{return!1}return Object.values(P).some(e=>e.some(e=>t===e||t.endsWith(`.${e}`)))}(l)?(0,m.jsx)(o,{...n}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(w.Notice,{status:"warning",isDismissible:!1,children:(0,h.__)("This embed is not supported in emails. It will be sent as a link.","woocommerce")}),(0,m.jsx)(o,{...n})]})},"withEmailEmbedAdjustments"),z=[...Object.keys(P),"wordpress"];const R=window.wp.domReady;var I=r.n(R),A=r(71138);const B=["core/social-links"];function L(){(0,s.getBlockTypes)().forEach(t=>{const o=t.name;if(B.includes(o))return;const n=(0,e.select)("core/blocks").getBlockStyles(o);Array.isArray(n)&&0!==n?.length&&n.forEach(e=>{(0,A.oj)(o,e.name)})})}const H=e=>o=>{const{setAttributes:n}=o,r=(0,t.useCallback)(e=>{e?.url&&e.url?.startsWith("http://[")&&(e.url=e.url.replace("http://[","[")),n(e)},[n]);return(0,m.jsx)(e,{...o,setAttributes:r})};var $=r(76917);const F=["behance","bluesky","chain","discord","facebook","feed","github","gravatar","instagram","linkedin","mail","mastodon","medium","patreon","pinterest","reddit","spotify","telegram","threads","tiktok","tumblr","twitch","twitter","vimeo","wordpress","whatsapp","x","youtube"],O=e=>t=>{if("core/social-links"!==t.name)return(0,m.jsx)(e,{...t});const o=`\n\t\t.block-editor-tools-panel-color-gradient-settings__item:has([title="${(0,h.__)("Icon color")}"]) {\n\t\t\tdisplay: none !important;\n\t\t}\n\t\t.block-editor-tools-panel-color-gradient-settings__item:nth-child(2 of .block-editor-tools-panel-color-gradient-settings__item){\n\t\t\tborder-top:1px solid #ddd;\n\t\t\tborder-top-left-radius:2px;\n\t\t\tborder-top-right-radius:2px;\n\t\t}\n\t\t`;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(e,{...t}),(0,m.jsx)(d.InspectorControls,{group:"color",children:(0,m.jsx)("style",{children:o})})]})};var V=r(4921),D=r(61863);const W=["core/column","core/columns"],G=["core/post-content","woocommerce/email-content"];function U(e){const t=e=>null==e||function(e){return null!=e&&0===parseFloat(String(e))}(e)?null:(0,D.DJ)(String(e));if(!e)return{left:null,right:null};if("string"==typeof e){const o=t(e);return{left:o,right:o}}return{left:t(e.left),right:t(e.right)}}function q({block:t,props:o}){const n="full"===o.attributes?.align,r=(i=o.clientId,a=n,(0,e.useSelect)(e=>{if(!a)return{left:null,right:null};const{getBlockParents:t,getBlockName:o,getBlockAttributes:n}=e(d.store),r=t(i);let s=!1;for(let e=r.length-1;e>=0;e--){const t=r[e],i=o(t);if(W.includes(i))return!1;if(G.includes(i)){s=!0;continue}const a=U(n(t)?.style?.spacing?.padding);if(a.left||a.right)return a;if(!s)return{left:null,right:null}}return{left:null,right:null}},[i,a]));var i,a;if(!n||!1===r)return(0,m.jsx)(t,{...o});const s={...o.wrapperProps?.style||{}};return r.left&&(s.marginLeft=`calc(-1 * ${r.left})`),r.right&&(s.marginRight=`calc(-1 * ${r.right})`),(0,m.jsx)(t,{...o,className:(0,V.A)(o.className,"is-email-full-width"),wrapperProps:{...o.wrapperProps,style:s}})}const K=(0,a.createHigherOrderComponent)(e=>function(t){return(0,m.jsx)(q,{block:e,props:t})},"withFullWidthClassName");function Z(){(0,s.getBlockType)("core/paragraph")||(0,c.registerCoreBlocks)(),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/filter-set-url-attribute",H),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/deactivate-stack-on-mobile",f),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/hide-expand-on-click",y),(0,u.G)("core/image",e=>({...e,supports:{...e.supports||{},filter:{...e.supports?.filter||{},duetone:!1}}})),["core/image","core/code","core/language"].forEach(e=>{(0,C.le)(e)}),g.forEach(e=>{(0,u.G)(e,e=>({...e,supports:{...e.supports||{},layout:!1,background:{...e.support?.background||{},backgroundImage:!0}}}))}),(0,u.G)("core/group",e=>{const t=e.variations??[];return{...e,variations:t.filter(e=>"group"===e.name),supports:{...e.supports||{},layout:!1}}}),(0,u.G)("core/buttons",e=>({...e,supports:{...e.supports??{},layout:!1,__experimentalEmailFlexLayout:!0}})),(0,u.G)("core/embed",e=>({...e,variations:(e.variations||[]).filter(e=>z.includes(e.name)).map(e=>{const{responsive:t,...o}=e.attributes||{};return{...e,attributes:o}})})),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/embed-adjustments",N),(0,u.G)("core/post-content",e=>{return{...e,edit:(t=e.edit,function(e){const{postId:o,postType:n}=e.context,{__unstableLayoutClassNames:r}=e;return o&&n?(0,m.jsx)(t,{...e}):(0,m.jsx)(_,{layoutClassNames:r})})};var t}),(0,u.G)("core/quote",e=>({...e,styles:[],supports:{...e.supports,align:[]}})),(0,C.gG)("woocommerce-email-editor/shortcode",{name:"woocommerce-email-editor/shortcode",title:(0,h.__)("Personalization Tags","woocommerce"),className:"woocommerce-email-editor-personalization-tags",tagName:"span",attributes:{},interactive:!1,edit:T}),(0,C.gG)("woocommerce-email-editor/link-shortcode",{name:"woocommerce-email-editor/link-shortcode",title:(0,h.__)("Personalization Tags Link","woocommerce"),className:"woocommerce-email-editor-personalization-tags-link",tagName:"a",attributes:{"data-link-href":"data-link-href",contenteditable:"contenteditable",style:"style"},interactive:!0,edit:null}),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/with-live-content-update",M),(0,s.getBlockTypes)().forEach(e=>{e.supports?.shadow&&(0,u.G)(e.name,e=>({...e,supports:{...e.supports,shadow:!1}}))}),(0,u.G)("core/social-link",e=>({...e,variations:(e.variations||[]).filter(e=>F.includes(e.name)),supports:{...e.supports,layout:!1}})),(0,$.z)("core/social-links",{name:"social-links-default",title:"Social Icons",attributes:{openInNewTab:!0,showLabels:!1,align:"center",className:"is-style-logos-only"},isDefault:!0,innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"x",url:"https://x.com/WordPress"}}]}),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/disable-social-links-icon-color",O),(0,$.z)("core/site-logo",{name:"site-logo-default",title:"Site Logo",attributes:{align:"center",width:120},isDefault:!0}),(0,p.HY)("editor.BlockListBlock","woocommerce-email-editor/full-width-blocks",K),(0,u.G)("woocommerce/product-image",e=>({...e,supports:{...e.supports||{},align:["full"]}})),I()(L)}var Y=r(5573),J=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),X=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Q=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})});const ee="__experimentalEmailFlexLayout";function te(e){return(0,s.hasBlockSupport)(e,ee)}function oe({justificationValue:e,onChange:t,isToolbar:o=!1}){const n=[{value:"left",icon:J,label:(0,h.__)("Justify items left","woocommerce")},{value:"center",icon:X,label:(0,h.__)("Justify items center","woocommerce")},{value:"right",icon:Q,label:(0,h.__)("Justify items right","woocommerce")}];if(o){const o=n.map(e=>e.value);return(0,m.jsx)(d.JustifyContentControl,{value:e,onChange:t,allowedControls:o,popoverProps:{placement:"bottom-start"}})}return(0,m.jsx)(w.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,h.__)("Justification","woocommerce"),value:e,onChange:t,className:"block-editor-hooks__flex-layout-justification-controls",children:n.map(({value:e,icon:t,label:o})=>(0,m.jsx)(w.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:o},e))})}function ne({setAttributes:e,attributes:t,name:o}){if(!(0,s.getBlockSupport)(o,ee,{}))return null;const{justifyContent:n="left"}=t.layout||{},r=o=>{e({layout:{...t.layout,justifyContent:o}})},i=()=>{const{justifyContent:o,...n}=t.layout||{};e({layout:n})};return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(d.InspectorControls,{children:(0,m.jsx)(w.__experimentalToolsPanel,{label:(0,h.__)("Layout","woocommerce"),resetAll:i,children:(0,m.jsx)(w.__experimentalToolsPanelItem,{isShownByDefault:!0,onDeselect:i,hasValue:()=>t.layout?.justifyContent||!1,label:(0,h.__)("Justification","woocommerce"),children:(0,m.jsx)(w.Flex,{children:(0,m.jsx)(w.FlexItem,{children:(0,m.jsx)(oe,{justificationValue:n,onChange:r})})})})})}),(0,m.jsx)(d.BlockControls,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,m.jsx)(oe,{justificationValue:n,onChange:r,isToolbar:!0})})]})}const re=(0,a.createHigherOrderComponent)(e=>t=>[te(t.name)&&(0,m.jsx)(ne,{...t},"layout"),(0,m.jsx)(e,{...t},"edit")],"withLayoutControls");function ie({block:e,props:t}){const{attributes:o}=t,{layout:n}=o,r=`is-content-justification-${n?.justifyContent||"left"}`,i=(0,V.A)(r,"is-layout-email-flex is-layout-flex");return(0,m.jsx)(e,{...t,className:i})}const ae=(0,a.createHigherOrderComponent)(e=>function(t){return te(t.name)?(0,m.jsx)(ie,{block:e,props:t}):(0,m.jsx)(e,{...t})},"withLayoutStyles");var se=r(3582);const le=window.wp.commands;var ce=r(92279),de=r(45597),ue=r(42362),pe=r(692);const me=()=>{const o='.editor-preview-dropdown__button-external, a[role="menuitem"][target^="wp-preview-"]',r=async t=>{const r=t.target,i=r?.closest(o);if(!i)return;const a=(0,e.select)(n.store),s=a?.isEditedPostDirty();s&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),(0,e.dispatch)(pe.store).createNotice("warning",(0,h.__)("You have unsaved changes. Please save the post before previewing.","woocommerce"),{context:"email-editor",isDismissible:!0}))},i=(0,t.useCallback)(e=>{try{const t=e.target;"Enter"!==e.key&&" "!==e.key||!t?.closest(o)||r(e)}catch(e){console.warn("Preview save message guard error:",e)}},[o]);return(0,t.useEffect)(()=>(document.addEventListener("click",r,!0),document.addEventListener("auxclick",r,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("click",r,!0),document.removeEventListener("auxclick",r,!0),document.removeEventListener("keydown",i,!0)}),[i]),null};var fe=r(78147);function ge(){const{emailContentIsEmpty:t,templateSelected:o,postType:n}=(0,e.useSelect)(e=>({emailContentIsEmpty:e(k.H).hasEmptyContent(),templateSelected:e(k.H).isTemplateSelected(),postType:e(k.H).getEmailPostType()}),[]),{setTemplateSelected:r}=(0,e.useDispatch)(k.H);return!t||o?null:(0,m.jsx)(fe.i,{onSelectCallback:()=>{r()},postType:n})}var he=(0,m.jsx)(Y.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(Y.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),_e=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})}),ye=(0,m.jsx)(Y.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(Y.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})}),be=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})}),we=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),ve=r(76597),xe=r.n(ve),ke=r(31592);const Se={};function je(e){return!Object.keys(e).some(t=>Object.keys(e[t]).length>0)}function Ee(e,t,o){const n=Array.isArray(t)?[...t]:[t],r=Array.isArray(e)?[...e]:{...e},i=n.pop();let a=r;return n.forEach(e=>{const t=a[e];a[e]=Array.isArray(t)?[...t]:{...t},a=a[e]}),a[i]=o,r}function Ce(e){const t=e=>{if("object"==typeof e&&null!==e||void 0===e){if(Array.isArray(e)&&0===e.length)return;for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const n=t(e[o]);void 0===n||je(n)?delete e[o]:e[o]=n}}return e};return t(e)}const Te=()=>{const{userTheme:o,updateUserTheme:n}=(0,ke.u)(),r=(0,t.useMemo)(()=>o?Ce(function(e){const t=e=>{if("object"==typeof e&&null!==e)for(const o in e)e.hasOwnProperty(o)&&(e[o]=t(e[o]));else if("string"==typeof e)return e.replace(/var\(--([a-z]+)--([a-z]+(?:--[a-z0-9]+(?:-[a-z0-9]+)*)*)--([a-z0-9-]+)\)/g,(e,t,o,n)=>`var:${o.split("--").concat(n).join("|")}`);return e};return t(e)}(o?.styles)):Se,[o]),{styles:i}=(0,e.useSelect)(e=>({styles:e(k.H).getStyles()})),a=(0,t.useCallback)(e=>{const t={...o,styles:Ce(e)};n(t)},[n,o]),s=(0,t.useCallback)((e,t)=>{const r=Ee(o,["styles",...e],t);n(r)},[n,o]);return{styles:(0,t.useMemo)(()=>i?r?xe().all([i,r]):i:Se,[i,r]),userStyles:o?.styles,defaultStyles:i,updateStyleProp:s,updateStyles:a}},Me=[],Pe={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},Ne={hover:{opacity:1},start:{opacity:.5}},ze={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};function Re({label:o,isFocused:n,withHoverView:r}){const{colors:i}=(0,e.useSelect)(e=>({colors:e(k.H).getPaletteColors()}),[]),a=(0,t.useMemo)(()=>(i?.theme||Me).concat(i?.default||Me),[i]),{styles:s}=Te(),{backgroundColor:l,headingColor:c,highlightedColors:d}=(0,t.useMemo)(()=>{const e=(0,D.pr)(s?.color?.background)||"white",t=(0,D.pr)(s?.color?.text)||"black",o=(0,D.pr)(s?.elements?.h1?.color?.text)||t,n=(0,D.pr)(s?.elements?.link?.color?.text)||o,r=(0,D.pr)(s?.elements?.button?.color?.background)||n,i=a.find(({color:e})=>e.toLowerCase()===t.toLowerCase()),l=a.find(({color:e})=>e.toLowerCase()===r.toLowerCase()),c=[...i?[i]:Me,...l?[l]:Me,...a].filter(({color:t},o,n)=>t.toLowerCase()!==e.toLowerCase()&&o===n.findIndex(e=>e.color.toLowerCase()===t.toLowerCase())).slice(0,2);return{backgroundColor:e,headingColor:o,highlightedColors:c}},[s,a]),u=s?.elements?.heading?.typography?.fontWeight||"inherit",p=s?.elements?.heading?.typography?.fontFamily||"inherit",[f,g]=(0,t.useState)(!1);return(0,m.jsx)("div",{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:(0,m.jsxs)(w.__unstableMotion.div,{style:{height:152,width:"100%",background:l,cursor:r?"pointer":void 0},initial:"start",animate:(f||n)&&o?"hover":"start",children:[(0,m.jsx)(w.__unstableMotion.div,{variants:Pe,style:{height:"100%",overflow:"hidden"},children:(0,m.jsxs)(w.__experimentalHStack,{spacing:10,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,m.jsx)(w.__unstableMotion.div,{style:{fontFamily:p,fontSize:65,color:c,fontWeight:u},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},children:"Aa"}),(0,m.jsx)(w.__experimentalVStack,{spacing:4,children:d.map(({slug:e,color:t},o)=>(0,m.jsx)(w.__unstableMotion.div,{style:{height:32,width:32,background:t,borderRadius:16},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===o?.2:.1}},e))})]})}),(0,m.jsx)(w.__unstableMotion.div,{variants:r&&Ne,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,m.jsx)(w.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:a.slice(0,4).map(({color:e})=>(0,m.jsx)("div",{style:{height:"100%",background:e,flexGrow:1}},e))})}),(0,m.jsx)(w.__unstableMotion.div,{variants:ze,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,m.jsx)(w.__experimentalVStack,{spacing:3,justify:"center",style:{height:"100%",overflow:"hidden",padding:10,boxSizing:"border-box"},children:o&&(0,m.jsx)("div",{style:{fontSize:40,fontFamily:p,color:c,fontWeight:u,lineHeight:"1em",textAlign:"center"},children:o})})})]})})}const Ie={color:{text:!0,background:!0,custom:!0}};function Ae(){const o=(0,e.useSelect)(e=>e(k.H).getTheme(),[]);return(0,t.useMemo)(()=>({...o?.settings,background:{backgroundImage:!1,backgroundSize:!1,gradient:!1}}),[o?.settings])}function Be(){const e=(0,de.sV)(Ae());return(0,m.jsx)(w.Card,{size:"small",className:"edit-site-global-styles-screen-root",variant:"primary",children:(0,m.jsx)(w.CardBody,{children:(0,m.jsxs)(w.__experimentalVStack,{spacing:4,children:[(0,m.jsx)(w.Card,{children:(0,m.jsx)(w.CardMedia,{children:(0,m.jsx)(Re,{})})}),(0,m.jsxs)(w.__experimentalItemGroup,{children:[(0,m.jsx)(w.__experimentalNavigatorButton,{path:"/typography",onClick:()=>(0,E.yM)("styles_sidebar_navigation_click",{path:"typography"}),children:(0,m.jsx)(w.__experimentalItem,{children:(0,m.jsxs)(w.__experimentalHStack,{justify:"flex-start",children:[(0,m.jsx)(w.Icon,{icon:_e,size:24}),(0,m.jsx)(w.FlexItem,{children:(0,h.__)("Typography","woocommerce")})]})})}),(0,m.jsx)(w.__experimentalNavigatorButton,{path:"/colors",onClick:()=>(0,E.yM)("styles_sidebar_navigation_click",{path:"colors"}),children:(0,m.jsx)(w.__experimentalItem,{children:(0,m.jsxs)(w.__experimentalHStack,{justify:"flex-start",children:[(0,m.jsx)(w.Icon,{icon:ye,size:24}),(0,m.jsx)(w.FlexItem,{children:(0,h.__)("Colors","woocommerce")})]})})}),e&&(0,m.jsx)(w.__experimentalNavigatorButton,{path:"/background",onClick:()=>(0,E.yM)("styles_sidebar_navigation_click",{path:"background"}),children:(0,m.jsx)(w.__experimentalItem,{children:(0,m.jsxs)(w.__experimentalHStack,{justify:"flex-start",children:[(0,m.jsx)(w.Icon,{icon:be,size:24}),(0,m.jsx)(w.FlexItem,{children:(0,h.__)("Background","woocommerce")})]})})}),(0,m.jsx)(w.__experimentalNavigatorButton,{path:"/layout",onClick:()=>(0,E.yM)("styles_sidebar_navigation_click",{path:"layout"}),children:(0,m.jsx)(w.__experimentalItem,{children:(0,m.jsxs)(w.__experimentalHStack,{justify:"flex-start",children:[(0,m.jsx)(w.Icon,{icon:we,size:24}),(0,m.jsx)(w.FlexItem,{children:(0,h.__)("Layout","woocommerce")})]})})})]})]})})})}const Le={typography:{},color:{}},He=(e,t,o="heading",n=!1)=>{let r;switch(t){case"text":r={typography:e.typography,color:e.color};break;case"heading":r=((e,t="heading",o=!1)=>o?xe().all([Le,e.elements?.heading||{},e.elements?.[t]||{}]):{...Le,...e.elements?.heading||{},...e.elements?.[t]||{}})(e,o??"heading",n);break;default:r=e.elements?.[t]||Le}return{...r,typography:r.typography??{},color:r.color??{}}};function $e({element:e,label:t}){const{styles:o}=Te(),n=He(o,e,null,!0),{fontFamily:r,fontStyle:i,fontWeight:a,letterSpacing:s,textDecoration:l,textTransform:c}=n.typography,d=n.color?.text||"inherit",u=n.color?.background||"#f0f0f0",p=(0,h.sprintf)((0,h.__)("Typography %s styles","woocommerce"),t);return(0,m.jsx)(w.__experimentalItem,{children:(0,m.jsx)(w.__experimentalNavigatorButton,{path:`/typography/${e}`,"aria-label":p,onClick:()=>(0,E.yM)("styles_sidebar_screen_typography_button_click",{element:e,label:t,path:`typography/${e}`}),children:(0,m.jsxs)(w.__experimentalHStack,{justify:"flex-start",children:[(0,m.jsx)(w.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:r??"serif",background:u,color:d,fontStyle:i??"normal",fontWeight:a??"normal",letterSpacing:s??"normal",textDecoration:l??("link"===e?"underline":"none"),textTransform:c??"none"},children:"Aa"}),(0,m.jsx)(w.FlexItem,{children:t})]})})})}const Fe=function(){return(0,m.jsx)(w.Card,{size:"small",variant:"primary",isBorderless:!0,children:(0,m.jsx)(w.CardBody,{children:(0,m.jsxs)(w.__experimentalVStack,{spacing:3,children:[(0,m.jsx)(w.__experimentalHeading,{level:3,className:"edit-site-global-styles-subtitle",children:(0,h.__)("Elements","woocommerce")}),(0,m.jsxs)(w.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,size:"small",children:[(0,m.jsx)($e,{element:"text",label:(0,h.__)("Text","woocommerce")}),(0,m.jsx)($e,{element:"link",label:(0,h.__)("Links","woocommerce")}),(0,m.jsx)($e,{element:"heading",label:(0,h.__)("Headings","woocommerce")}),(0,m.jsx)($e,{element:"button",label:(0,h.__)("Buttons","woocommerce")})]})]})})})};var Oe=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const Ve=w.Navigator||w.__experimentalNavigatorProvider;function De({title:e,description:t,onBack:o}){return(0,m.jsxs)(w.__experimentalVStack,{spacing:0,children:[(0,m.jsx)(w.__experimentalView,{children:(0,m.jsx)(w.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,m.jsxs)(w.__experimentalHStack,{spacing:2,children:[(0,m.jsx)(Ve.BackButton,{style:{minWidth:24,padding:0},icon:Oe,size:"small","aria-label":(0,h.__)("Navigate to the previous view","woocommerce"),onClick:o}),(0,m.jsx)(w.__experimentalSpacer,{children:(0,m.jsx)(w.__experimentalHeading,{className:"woocommerce-email-editor-styles-header",level:2,size:13,children:e})})]})})}),t&&(0,m.jsx)("p",{className:"woocommerce-email-editor-styles-header-description",children:t})]})}w.Navigator||(Ve.Screen=w.__experimentalNavigatorScreen,Ve.BackButton=w.__experimentalNavigatorBackButton);const We=De;function Ge(){return(0,E.xW)("styles_sidebar_screen_typography_opened"),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(We,{title:(0,h.__)("Typography","woocommerce"),description:(0,h.__)("Manage the typography settings for different elements.","woocommerce")}),(0,m.jsx)(Fe,{})]})}var Ue=r(90314),qe=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M7 11.5h10V13H7z"})});const Ke={placement:"left-start",offset:36,shift:!0};function Ze({label:e,hasValue:o,resetValue:n,isShownByDefault:r,inheritedValue:i,userValue:a,setValue:s,colorGradientControlSettings:l}){const c=(0,t.useRef)(null);return(0,m.jsx)(w.__experimentalToolsPanelItem,{className:"block-editor-color-gradient-item block-editor-tools-panel-color-gradient-settings__item",hasValue:o,label:e,onDeselect:n,isShownByDefault:r,children:(0,m.jsx)(w.Dropdown,{popoverProps:Ke,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:t,isOpen:r})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(w.Button,{onClick:t,className:(0,V.A)("block-editor-panel-color-gradient-settings__dropdown",{"is-open":r}),"aria-expanded":r,ref:c,__next40pxDefaultSize:!0,children:(0,m.jsxs)(w.__experimentalHStack,{justify:"flex-start",children:[(0,m.jsx)(w.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:i}),(0,m.jsx)(w.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:e,children:e})]})}),o()&&(0,m.jsx)(w.Button,{__next40pxDefaultSize:!0,label:(0,h.__)("Reset","woocommerce"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:qe,onClick:()=>{n(),r&&t(),c.current?.focus()}})]}),renderContent:()=>(0,m.jsx)(w.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,m.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,m.jsx)(d.__experimentalColorGradientControl,{...l,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:i,onColorChange:s,clearable:i===a,headingLevel:3})})})})})}const Ye={textColor:!0,fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!1,textTransform:!1,textDecoration:!1,writingMode:!0,textColumns:!0},Je=function({element:o,headingLevel:n,defaultControls:r=Ye}){const[i,a]=(0,d.useSettings)("typography.fontSizes","typography.fontFamilies"),[s]=(0,d.useSettings)("spacing.units"),l=a?.default||[],c=(0,e.useSelect)(e=>e(k.H).getTheme(),[]),u=(0,d.__experimentalUseMultipleOriginColorsAndGradients)(),p=!(0,de.H7)(Ie)&&"text"===o,{styles:f,defaultStyles:g,userStyles:_,updateStyleProp:y,updateStyles:b}=Te(),v=He(f,o,n),x=He(g,o,n),{fontFamily:S,fontSize:j,fontStyle:C,fontWeight:T,lineHeight:M,letterSpacing:P,textDecoration:N,textTransform:z}=v.typography,{fontFamily:R,fontSize:I,fontStyle:A,fontWeight:B,lineHeight:L,letterSpacing:H,textDecoration:$,textTransform:F}=x.typography,O=_?.color?.text,V=x.color?.text,D=(0,Ue.yQ)({settings:c?.settings},"",v.color?.text),W=O?(0,Ue.yQ)({settings:c?.settings},"",O):void 0,G="heading"!==o||"heading"!==n,U=(0,t.useCallback)((e,t)=>{y("heading"===o?["elements",n,...e]:"text"===o?[...e]:["elements",o,...e],t)},[o,y,n]),q=e=>{const t=void 0===e?void 0:(0,Ue.Px)(c?.settings,void 0,"color.text",e);U(["color","text"],t),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_text_color",{element:o,newValue:e,selectedDefaultTextColor:t===V})},K=e=>{U(["typography","letterSpacing"],e),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_letter_spacing",{element:o,newValue:e,selectedDefaultLetterSpacing:e===H})},Z=e=>{U(["typography","lineHeight"],e),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_line_height",{element:o,newValue:e,selectedDefaultLineHeight:e===L})},Y=e=>{U(["typography","fontSize"],e),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_font_size",{element:o,headingLevel:n,newValue:e,selectedDefaultFontSize:e===I})},J=e=>{U(["typography","fontFamily"],e),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_font_family",{element:o,newValue:e,selectedDefaultFontFamily:e===R})},X=e=>{U(["typography","textDecoration"],e),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_text_decoration",{element:o,newValue:e,selectedDefaultTextDecoration:e===$})},Q=e=>{U(["typography","textTransform"],e),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_text_transform",{element:o,newValue:e,selectedDefaultTextTransform:e===F})},ee=({fontStyle:e,fontWeight:t})=>{U(["typography","fontStyle"],e),U(["typography","fontWeight"],t),(0,E.T7)("styles_sidebar_screen_typography_element_panel_set_font_appearance",{element:o,newFontStyle:e,newFontWeight:t,selectedDefaultFontStyle:e===A,selectedDefaultFontWeight:t===B})};return(0,m.jsxs)(w.__experimentalToolsPanel,{label:(0,h.__)("Typography","woocommerce"),resetAll:()=>{p?b(Ee(Ee(_??{},["color","text"],void 0),["typography"],{})):U(["typography"],{}),(0,E.yM)("styles_sidebar_screen_typography_element_panel_reset_all_styles_selected",{element:o,headingLevel:n})},children:[p&&(0,m.jsx)(Ze,{label:(0,h.__)("Color","woocommerce"),hasValue:()=>!!O,resetValue:()=>q(void 0),isShownByDefault:r.textColor,inheritedValue:D,userValue:W,setValue:q,colorGradientControlSettings:u}),(0,m.jsx)(w.__experimentalToolsPanelItem,{label:(0,h.__)("Font family","woocommerce"),hasValue:()=>S!==R,onDeselect:()=>J(void 0),isShownByDefault:r.fontFamily,children:(0,m.jsx)(d.__experimentalFontFamilyControl,{value:S,onChange:J,size:"__unstable-large",fontFamilies:l,__nextHasNoMarginBottom:!0})}),G&&(0,m.jsx)(w.__experimentalToolsPanelItem,{label:(0,h.__)("Font size","woocommerce"),hasValue:()=>j!==I,onDeselect:()=>Y(void 0),isShownByDefault:r.fontSize,children:(0,m.jsx)(w.FontSizePicker,{value:j,onChange:Y,fontSizes:i,units:s,disableCustomFontSizes:!1,withReset:!1,withSlider:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),(0,m.jsx)(w.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Appearance","woocommerce"),hasValue:()=>T!==B||C!==A,onDeselect:()=>{ee({fontStyle:void 0,fontWeight:void 0})},isShownByDefault:r.fontAppearance,children:(0,m.jsx)(d.__experimentalFontAppearanceControl,{value:{fontStyle:C,fontWeight:T},onChange:ee,hasFontStyles:!0,hasFontWeights:!0,size:"__unstable-large"})}),(0,m.jsx)(w.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Line height","woocommerce"),hasValue:()=>M!==L,onDeselect:()=>Z(void 0),isShownByDefault:r.lineHeight,children:(0,m.jsx)(d.LineHeightControl,{__nextHasNoMarginBottom:!0,__unstableInputWidth:"auto",value:M,onChange:Z,size:"__unstable-large"})}),(0,m.jsx)(w.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Letter spacing","woocommerce"),hasValue:()=>P!==H,onDeselect:()=>K(void 0),isShownByDefault:r.letterSpacing,children:(0,m.jsx)(d.__experimentalLetterSpacingControl,{value:P,onChange:K,size:"__unstable-large",__unstableInputWidth:"auto"})}),(0,m.jsx)(w.__experimentalToolsPanelItem,{className:"single-column",label:(0,h.__)("Text decoration","woocommerce"),hasValue:()=>N!==$,onDeselect:()=>X(void 0),isShownByDefault:r.textDecoration,children:(0,m.jsx)(d.__experimentalTextDecorationControl,{value:N,onChange:X,size:"__unstable-large",__unstableInputWidth:"auto"})}),(0,m.jsx)(w.__experimentalToolsPanelItem,{label:(0,h.__)("Letter case","woocommerce"),hasValue:()=>z!==F,onDeselect:()=>Q(F),isShownByDefault:r.textTransform,children:(0,m.jsx)(d.__experimentalTextTransformControl,{value:z,onChange:Q,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})};function Xe({element:e,headingLevel:t}){const{styles:o}=Te(),n=He(o,e,t,!0),{fontFamily:r,fontSize:i,fontStyle:a,fontWeight:s,lineHeight:l,letterSpacing:c,textDecoration:d,textTransform:u}=n.typography,p=n.color?.text||"inherit",f=n.color?.background||"#f0f0f0",g="link"===e?{textDecoration:d??"underline"}:{};return(0,m.jsx)("div",{className:"edit-site-typography-preview",style:{fontFamily:r??"serif",background:f,color:p,lineHeight:l,fontSize:i,fontStyle:a,fontWeight:s,letterSpacing:c,textDecoration:d,textTransform:u,...g},children:"Aa"})}const Qe={text:{title:(0,h.__)("Text","woocommerce"),description:(0,h.__)("Manage the fonts and typography used on text.","woocommerce"),defaultControls:Ye},link:{title:(0,h.__)("Links","woocommerce"),description:(0,h.__)("Manage the fonts and typography used on links.","woocommerce"),defaultControls:{...Ye,textDecoration:!0}},heading:{title:(0,h.__)("Headings","woocommerce"),description:(0,h.__)("Manage the fonts and typography used on headings.","woocommerce"),defaultControls:{...Ye,textTransform:!0}},button:{title:(0,h.__)("Buttons","woocommerce"),description:(0,h.__)("Manage the fonts and typography used on buttons.","woocommerce"),defaultControls:Ye}};function et({element:e}){(0,E.xW)("styles_sidebar_screen_typography_element_opened",{element:e});const[o,n]=(0,t.useState)("heading");return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(We,{title:Qe[e].title,description:Qe[e].description}),(0,m.jsx)(w.__experimentalSpacer,{marginX:4,children:(0,m.jsx)(Xe,{element:e,headingLevel:o})}),"heading"===e&&(0,m.jsx)(w.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,m.jsxs)(w.__experimentalToggleGroupControl,{label:(0,h.__)("Select heading level","woocommerce"),hideLabelFromVision:!0,value:o,onChange:e=>{n(e.toString()),(0,E.yM)("styles_sidebar_screen_typography_element_heading_level_selected",{value:e})},isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0,children:[(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"heading",label:(0,h._x)("All","heading levels","woocommerce")}),(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"h1",label:(0,h._x)("H1","Heading Level","woocommerce")}),(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"h2",label:(0,h._x)("H2","Heading Level","woocommerce")}),(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"h3",label:(0,h._x)("H3","Heading Level","woocommerce")}),(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"h4",label:(0,h._x)("H4","Heading Level","woocommerce")}),(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"h5",label:(0,h._x)("H5","Heading Level","woocommerce")}),(0,m.jsx)(w.__experimentalToggleGroupControlOption,{value:"h6",label:(0,h._x)("H6","Heading Level","woocommerce")})]})}),(0,m.jsx)(Je,{element:e,headingLevel:o,defaultControls:Qe[e].defaultControls})]})}function tt(){(0,E.xW)("styles_sidebar_screen_colors_opened");const{userStyles:t,styles:o,updateStyles:n}=Te(),r=(0,e.useSelect)(e=>e(k.H).getTheme(),[]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(We,{title:(0,h.__)("Colors","woocommerce"),description:(0,h.__)("Manage palettes and the default color of different global elements.","woocommerce")}),(0,m.jsx)(de.oz,{value:t,inheritedValue:o,onChange:e=>{n(e),(0,E.yM)("styles_sidebar_screen_colors_styles_updated")},settings:r?.settings,panelId:"colors"})]})}function ot(){(0,E.xW)("styles_sidebar_screen_background_opened");const{userStyles:e,styles:t,updateStyles:o}=Te(),n=Ae();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(We,{title:(0,h.__)("Background","woocommerce"),description:(0,h.__)("Manage the background color of the email.","woocommerce")}),(0,m.jsx)(de.D_,{value:e,inheritedValue:t,onChange:e=>{o(e),(0,E.yM)("styles_sidebar_screen_background_styles_updated")},settings:n,panelId:"background"})]})}var nt=r(66087);function rt(){const[e]=(0,d.useSettings)("spacing.units"),t=(0,w.__experimentalUseCustomUnits)({availableUnits:e}),{styles:o,defaultStyles:n,updateStyleProp:r}=Te();return(0,m.jsxs)(w.__experimentalToolsPanel,{label:(0,h.__)("Dimensions","woocommerce"),resetAll:()=>{r(["spacing"],n.spacing),(0,E.yM)("styles_sidebar_screen_layout_dimensions_reset_all_selected")},children:[(0,m.jsx)(w.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!(0,nt.isEqual)(o.spacing.padding,n.spacing.padding),label:(0,h.__)("Padding","woocommerce"),onDeselect:()=>{r(["spacing","padding"],n.spacing.padding),(0,E.yM)("styles_sidebar_screen_layout_dimensions_padding_reset_clicked")},className:"tools-panel-item-spacing",children:(0,m.jsx)(d.__experimentalSpacingSizesControl,{allowReset:!0,values:o.spacing.padding,onChange:e=>{r(["spacing","padding"],e),(0,E.T7)("styles_sidebar_screen_layout_dimensions_padding_updated",{value:e})},label:(0,h.__)("Padding","woocommerce"),sides:["horizontal","vertical","top","left","right","bottom"],units:t})}),(0,m.jsx)(w.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,h.__)("Block spacing","woocommerce"),hasValue:()=>o.spacing.blockGap!==n.spacing.blockGap,onDeselect:()=>{r(["spacing","blockGap"],n.spacing.blockGap),(0,E.yM)("styles_sidebar_screen_layout_dimensions_block_spacing_reset_clicked")},className:"tools-panel-item-spacing",children:(0,m.jsx)(d.__experimentalSpacingSizesControl,{label:(0,h.__)("Block spacing","woocommerce"),min:0,onChange:e=>{r(["spacing","blockGap"],e.top),(0,E.T7)("styles_sidebar_screen_layout_dimensions_block_spacing_updated",{value:e})},showSideInLabel:!1,sides:["top"],values:{top:o.spacing.blockGap},allowReset:!0})})]})}function it(){return(0,E.xW)("styles_sidebar_screen_layout_opened"),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(De,{title:(0,h.__)("Layout","woocommerce")}),(0,m.jsx)(rt,{})]})}const at=(0,t.memo)(function(){const{userCanEditGlobalStyles:t}=(0,e.useSelect)(e=>{const{canEdit:t}=e(k.H).canUserEditGlobalEmailStyles();return{userCanEditGlobalStyles:t}},[]);return t&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(n.PluginSidebarMoreMenuItem,{target:"email-styles-sidebar",icon:he,children:(0,h.__)("Email styles","woocommerce")}),(0,m.jsx)(n.PluginSidebar,{name:"email-styles-sidebar",icon:he,title:(0,h.__)("Styles","woocommerce"),className:"woocommerce-email-editor-styles-panel",children:(0,m.jsxs)(Ve,{initialPath:"/",children:[(0,m.jsx)(Ve.Screen,{path:"/",children:(0,m.jsx)(Be,{})}),(0,m.jsx)(Ve.Screen,{path:"/typography",children:(0,m.jsx)(Ge,{})}),(0,m.jsx)(Ve.Screen,{path:"/typography/text",children:(0,m.jsx)(et,{element:"text"})}),(0,m.jsx)(Ve.Screen,{path:"/typography/link",children:(0,m.jsx)(et,{element:"link"})}),(0,m.jsx)(Ve.Screen,{path:"/typography/heading",children:(0,m.jsx)(et,{element:"heading"})}),(0,m.jsx)(Ve.Screen,{path:"/typography/button",children:(0,m.jsx)(et,{element:"button"})}),(0,m.jsx)(Ve.Screen,{path:"/colors",children:(0,m.jsx)(tt,{})}),(0,m.jsx)(Ve.Screen,{path:"/background",children:(0,m.jsx)(ot,{})}),(0,m.jsx)(Ve.Screen,{path:"/layout",children:(0,m.jsx)(it,{})})]})})]})});var st=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),lt=r(48218);function ct(){const{togglePreviewModal:t}=(0,e.useDispatch)(k.H);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(n.PluginPreviewMenuItem,{icon:st,onClick:()=>{(0,E.yM)("header_preview_dropdown_send_test_email_selected"),t(!0)},children:(0,h.__)("Send a test email","woocommerce")}),(0,m.jsx)(lt.P,{})]})}var dt=r(48558),ut=r(41233);const pt=()=>{const e=(0,a.useViewportMatch)("large");return(0,m.jsx)(m.Fragment,{children:e&&(0,m.jsx)(de.Lf,{children:(0,m.jsx)(ut.PreferenceToggleMenuItem,{scope:k.H,name:"fullscreenMode",label:(0,h.__)("Fullscreen mode","woocommerce"),info:(0,h.__)("Show and hide the admin user interface","woocommerce"),messageActivated:(0,h.__)("Fullscreen mode activated.","woocommerce"),messageDeactivated:(0,h.__)("Fullscreen mode deactivated.","woocommerce"),shortcut:dt.displayShortcut.secondary("f")})})})};var mt=r(70440);const ft={recordEvent:E.yM,recordEventOnce:E.xW,debouncedRecordEvent:E.T7};function gt(){const e=(0,o.applyFilters)("woocommerce_email_editor_template_sections",[],ft);return 0===e.length?null:(0,m.jsx)(n.PluginDocumentSettingPanel,{name:"template-settings-panel",title:(0,h.__)("Settings","woocommerce"),className:"woocommerce-email-editor__settings-panel",children:e.map(e=>(0,m.jsx)(n.ErrorBoundary,{children:(0,m.jsx)("div",{children:e.render()},e.id)},`error-boundary-${e.id}`))})}function ht(){const{isDirty:t}=(0,n.useEntitiesSavedStatesIsDirty)(),{hasEmptyContent:r,isEmailSent:i,urls:a}=(0,e.useSelect)(e=>({hasEmptyContent:e(k.H).hasEmptyContent(),isEmailSent:e(k.H).isEmailSent(),urls:e(k.H).getUrls()}),[]);function s(){a.send&&(window.location.href=a.send)}const l=r||i||t,c=(0,o.applyFilters)("woocommerce_email_editor_send_button_disabled",l,{hasEmptyContent:r,isEmailSent:i,isDirty:t}),d="boolean"==typeof c?c:l,u=(0,o.applyFilters)("woocommerce_email_editor_send_button_label",(0,h.__)("Send","woocommerce"));return(0,m.jsx)(w.Button,{variant:"primary",size:"compact",onClick:()=>{(0,E.yM)("header_send_button_clicked"),(0,o.applyFilters)("woocommerce_email_editor_send_action_callback",s)()},disabled:d,"data-automation-id":"email_editor_send_button",children:u})}function _t({children:e}){const o=(0,t.useRef)(document.createElement("div"));return(0,t.useEffect)(()=>{const e=document.getElementsByClassName("editor-post-publish-button__button")[0];e&&e.parentNode?.insertBefore(o.current,e.nextSibling)},[o]),(0,t.createPortal)((0,m.jsx)(m.Fragment,{children:e}),o.current)}function yt(){const o=(0,t.useRef)(null),{hasNonPostEntityChanges:r,isEditedPostDirty:i,isEditingTemplate:a}=(0,e.useSelect)(e=>({hasNonPostEntityChanges:e(n.store).hasNonPostEntityChanges(),isEditedPostDirty:e(n.store).isEditedPostDirty(),isEditingTemplate:"wp_template"===e(n.store).getCurrentPostType()}),[]),s=a||r||i&&r,l=(0,t.useCallback)((e,t)=>{t&&e.classList.contains("force-hidden")&&e.classList.remove("force-hidden"),t||e.classList.contains("force-hidden")||e.classList.add("force-hidden")},[]);return(0,t.useEffect)(()=>{const e=document.getElementsByClassName("editor-post-publish-button__button")[0];return l(e,s),e?(o.current&&o.current.disconnect(),o.current=new MutationObserver(()=>{l(e,s)}),o.current.observe(e,{attributes:!0,childList:!0,subtree:!1}),()=>o.current?.disconnect()):()=>o.current?.disconnect()},[s,l]),(0,m.jsx)(_t,{children:!s&&(0,m.jsx)(ht,{})})}const bt=()=>{const o="email-validation",n=(0,e.useSelect)(e=>e(pe.store).getNotices(o),[]);return{notices:n,hasValidationNotice:(0,t.useCallback)(e=>e?void 0!==n.find(t=>t.id===e):n?.length>0,[n]),addValidationNotice:(0,t.useCallback)((t,n,r=[])=>{const i=r;(0,e.dispatch)(pe.store).createNotice("error",n,{id:t,isDismissible:!1,actions:i,context:o})},[o]),removeValidationNotice:(0,t.useCallback)(t=>{(0,e.dispatch)(pe.store).removeNotice(t,o)},[o])}};function wt(){const{notices:e}=bt();return 0===e.length?null:(0,m.jsx)(w.Notice,{status:"error",className:"woocommerce-email-editor-validation-errors components-editor-notices__pinned",isDismissible:!1,children:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("strong",{children:(0,h.__)("Fix errors to continue:","woocommerce")}),(0,m.jsx)("ul",{children:e.map(({id:e,content:t,actions:o})=>(0,m.jsxs)("li",{children:[t,o.length>0?o.map(({label:e,onClick:t})=>(0,m.jsx)(w.Button,{onClick:t,variant:"link",children:e},e)):null]},e))})]})})}const vt=-3;function xt(){const t=(0,e.useSelect)(e=>e(pe.store).getNotices(),[]),{removeNotice:o}=(0,e.useDispatch)(pe.store),n=t.filter(({type:e})=>"snackbar"===e).slice(vt);return(0,m.jsx)(w.SnackbarList,{notices:n,className:"components-editor-notices__snackbar edit-post-layout__snackbar",onRemove:o})}function kt({children:e}){const[o]=(0,t.useState)(document.createElement("div"));return(0,t.useEffect)(()=>{const e=document.getElementsByClassName("editor-visual-editor ")[0];e&&e.parentNode?.insertBefore(o,e)},[o]),(0,t.createPortal)((0,m.jsx)(m.Fragment,{children:e}),o)}function St({disableSnackbarNotices:t=!1}={}){const{notices:o}=(0,e.useSelect)(e=>({notices:e(pe.store).getNotices("email-editor")}),[]),{removeNotice:n}=(0,e.useDispatch)(pe.store),r=o.filter(({isDismissible:e,type:t})=>e&&"default"===t),i=o.filter(({isDismissible:e,type:t})=>!e&&"default"===t);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(kt,{children:[(0,m.jsx)(w.NoticeList,{notices:i,className:"components-editor-notices__pinned"}),(0,m.jsx)(w.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:e=>n(e,"email-editor")}),(0,m.jsx)(wt,{})]}),!t&&(0,m.jsx)(xt,{})]})}const jt=e=>{const t=(0,s.getBlockSupport)(e,"background");return t&&!1!==t?.backgroundImage};function Et(){const t=(0,e.useSelect)(e=>e("core/block-editor").getSelectedBlock(),[]),o=(0,s.hasBlockSupport)(t?.name,"border",!1)||(0,s.hasBlockSupport)(t?.name,"__experimentalBorder",!1);return(0,m.jsxs)(m.Fragment,{children:[o&&(0,m.jsx)(w.Fill,{name:"InspectorControlsBorder",children:(0,m.jsxs)(w.Notice,{className:"woocommerce-grid-full-width",status:"warning",isDismissible:!1,children:[(0,h.__)("Border display may vary or be unsupported in some email clients.","woocommerce"),(0,m.jsx)("br",{}),(0,h.__)("Units other than pixels (px) lack support in old email clients.","woocommerce")]})}),jt(t?.name)&&(0,m.jsx)(w.Fill,{name:"InspectorControlsBackground",children:(0,m.jsx)(w.Notice,{className:"woocommerce-grid-full-width",status:"warning",isDismissible:!1,children:(0,h.__)("Select a background color for email clients that do not support background images.","woocommerce")})})]})}var Ct=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Tt=r(11789),Mt=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,m.jsx)(Y.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})}),Pt=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});const Nt={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}},zt={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}};function Rt(){const{urls:t}=(0,e.useSelect)(e=>({urls:e(k.H).getUrls()}),[]);return()=>{(0,E.yM)("header_close_button_clicked");const e=()=>{if(t.back)try{const e=new URL(t.back,window.location.href);["http:","https:"].includes(e.protocol)&&(window.location.href=e.href)}catch{}},n=(0,o.applyFilters)("woocommerce_email_editor_close_action_callback",e);("function"==typeof n?n:e)()}}const It=()=>{const e=Rt();return(0,m.jsx)(w.Button,{size:"compact",icon:(0,h.isRTL)()?Ct:Oe,label:(0,h.__)("Close editor","woocommerce"),showTooltip:!0,tooltipPosition:"middle right",onClick:e})},At=()=>{const e=Rt();return(0,m.jsxs)(w.__unstableMotion.div,{className:"woocommerce-email-editor__view-mode-toggle",transition:{duration:.2},animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",children:[(0,m.jsx)(w.Button,{label:(0,h.__)("Close editor","woocommerce"),showTooltip:!0,tooltipPosition:"middle right",onClick:e,children:(0,m.jsx)(w.__unstableMotion.div,{variants:zt,children:(0,m.jsx)("div",{className:"woocommerce-email-editor__view-mode-toggle-icon",children:(0,m.jsx)(Tt.A,{className:"woocommerce-email-editor-icon__icon",icon:Mt,size:48})})})}),(0,m.jsx)(w.__unstableMotion.div,{className:"woocommerce-email-editor-icon",variants:Nt,children:(0,m.jsx)(Tt.A,{icon:Pt})})]})},Bt=()=>{const e=(0,t.useRef)(null),[o,n]=(0,t.useState)(null);return(0,t.useLayoutEffect)(()=>{const t=e.current?.closest(".editor-header__back-button"),o=t?.getBoundingClientRect().width;n(void 0!==o&&o<=48)},[]),null===o?(0,m.jsx)("div",{ref:e}):o?(0,m.jsx)(It,{}):(0,m.jsx)(At,{})},Lt=()=>{const e=(0,o.applyFilters)("woocommerce_email_editor_close_content",Bt);return(0,m.jsx)(de.oq,{children:({length:t})=>t<=1&&(0,m.jsx)(e,{})})},Ht="woocommerce-email-editor-template-area-affordance-slot",$t="woocommerce-email-editor-template-area-affordance-style",Ft="[data-block], .block-editor-block-list__block",Ot='\n.woocommerce-email-editor-template-area-affordance-slot {\n\tbox-sizing: border-box;\n\tinset: 0 auto auto 0;\n\tpointer-events: none;\n\tposition: absolute;\n\tz-index: 29;\n}\n.woocommerce-email-editor-template-area-affordance {\n\talign-items: stretch;\n\tbackground: #fff;\n\tborder: 1px solid #1e1e1e;\n\tborder-radius: 2px;\n\tbox-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n\tdisplay: inline-flex;\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n\tfont-size: 13px;\n\tline-height: 1;\n\tpointer-events: auto;\n\tposition: absolute;\n\tz-index: 30;\n}\n.woocommerce-email-editor-template-area-affordance__frame {\n\tappearance: none;\n\tbackground: transparent;\n\tborder: 1.5px solid transparent;\n\tbox-sizing: border-box;\n\tcursor: pointer;\n\tfont: inherit;\n\tmargin: 0;\n\tpadding: 0;\n\tpointer-events: auto;\n\tposition: absolute;\n\tz-index: 29;\n}\n.woocommerce-email-editor-template-area-affordance__frame:hover,\n.woocommerce-email-editor-template-area-affordance__frame:focus-visible,\n.woocommerce-email-editor-template-area-affordance__frame.is-active {\n\tborder-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n\toutline: none;\n}\n.woocommerce-email-editor-template-area-affordance__label {\n\talign-items: center;\n\tborder-inline-end: 1px solid #ddd;\n\tdisplay: inline-flex;\n\tfont-weight: 500;\n\tgap: 8px;\n\theight: 48px;\n\tpadding: 0 16px;\n\twhite-space: nowrap;\n}\n.woocommerce-email-editor-template-area-affordance__label svg {\n\tfill: currentColor;\n}\n.woocommerce-email-editor-template-area-affordance__button.components-button {\n\tborder-radius: 0;\n\tbox-shadow: none;\n\tcolor: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n\theight: 48px;\n\tpadding: 0 18px;\n\twhite-space: nowrap;\n}\n.woocommerce-email-editor-template-area-affordance__button.components-button:hover:not(:disabled) {\n\tcolor: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n}\n.woocommerce-email-editor-template-area-affordance__button.components-button:focus-visible {\n\tbox-shadow: inset 0 0 0 1.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));\n}\n';function Vt(){const[o,r]=(0,t.useState)(!1),[i,a]=(0,t.useState)(null),[s,l]=(0,t.useState)(null),c=(0,t.useRef)(null),{canEditTemplates:d,currentPostType:u,onNavigateToEntityRecord:p,template:f}=(0,e.useSelect)(e=>{const t=e(n.store).getEditorSettings();return{canEditTemplates:e(k.H).canUserEditTemplates(),currentPostType:e(n.store).getCurrentPostType(),onNavigateToEntityRecord:t?.onNavigateToEntityRecord,template:e(k.H).getCurrentTemplate()}},[]),g="wp_template"!==u&&d&&!!f?.id&&!!p,_=(0,t.useCallback)(()=>{const e=c.current,t=e?.ownerDocument,o=t?.defaultView;if(!e||!t||!o)return void l(null);const n=e.getBoundingClientRect();if(!n.width||!n.height)return void l(null);const r=o.scrollX,i=o.scrollY,a=n.top>54?n.top+i-50-4:n.bottom+i+4;l({frame:{height:n.height+2,left:n.left+r-1,top:n.top+i-1,width:n.width+2},toolbar:{left:n.left+r-1,top:a}})},[]);(0,t.useEffect)(()=>{if(!g)return r(!1),a(null),l(null),void(c.current=null);let e=0,t=null,o=120;const n=()=>{const r=function(){const e=Array.from(document.querySelectorAll("iframe"));for(const t of e)try{const e=t.contentDocument;if(e?.querySelector(".block-editor-block-list__layout.is-root-container, .is-root-container"))return e}catch(e){}return null}(),i=r&&function(e){const t=e.querySelector('[data-type="core/site-logo"], [data-type="core/site-title"], .wp-block-site-logo, .wp-block-site-title');return t?(o=t).closest(Ft)||o.closest("[data-type]")||o:null;var o}(r);r&&i?(function(e){if(e.getElementById($t))return;const t=e.createElement("style");t.id=$t,t.textContent=Ot,e.head.appendChild(t)}(r),t=function(e){let t=e.getElementById(Ht);return t||(t=e.createElement("div"),t.id=Ht,t.className="woocommerce-email-editor-template-area-affordance-slot",e.body.appendChild(t)),t}(r),c.current=i,a(t),_()):o>0&&(o--,e=window.requestAnimationFrame(n))};return n(),()=>{e&&window.cancelAnimationFrame(e);const o=t?.ownerDocument;t?.remove(),o?.getElementById($t)?.remove(),r(!1),a(null),l(null),c.current=null}},[g,_]),(0,t.useEffect)(()=>{const e=i?.ownerDocument,t=e?.defaultView;if(!i||!e||!t)return;const o=e=>{e.target instanceof Node&&i.contains(e.target)||r(!1)};return e.addEventListener("mousedown",o),e.addEventListener("scroll",_,!0),t.addEventListener("resize",_),window.addEventListener("resize",_),_(),()=>{e.removeEventListener("mousedown",o),e.removeEventListener("scroll",_,!0),t.removeEventListener("resize",_),window.removeEventListener("resize",_)}},[i,_]);const y=(0,t.useRef)(null),b=(0,t.useRef)(null),v=(0,t.useCallback)(()=>r(!0),[]),x=(0,t.useCallback)(()=>{f?.id&&p&&((0,E.yM)("template_canvas_affordance_edit_template_clicked",{templateId:f.id}),p({postId:f.id,postType:"wp_template"}))},[p,f?.id]),S=(0,t.useCallback)(e=>{e.stopPropagation()},[]);if((0,t.useEffect)(()=>{const e=y.current;if(e)return e.addEventListener("mousedown",S),e.addEventListener("pointerdown",S),e.addEventListener("click",v),()=>{e.removeEventListener("mousedown",S),e.removeEventListener("pointerdown",S),e.removeEventListener("click",v)}},[i,v,S]),(0,t.useEffect)(()=>{const e=b.current;if(e)return e.addEventListener("mousedown",S),e.addEventListener("pointerdown",S),e.addEventListener("click",x),()=>{e.removeEventListener("mousedown",S),e.removeEventListener("pointerdown",S),e.removeEventListener("click",x)}},[o,x,S]),!g||!i||!s)return null;const j=`${Ht}-toolbar`;return(0,t.createPortal)((0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("button",{ref:y,type:"button",className:o?"woocommerce-email-editor-template-area-affordance__frame is-active":"woocommerce-email-editor-template-area-affordance__frame","aria-label":(0,h.__)("Template area","woocommerce"),"aria-expanded":o,"aria-controls":o?j:void 0,style:s.frame}),o&&(0,m.jsxs)("div",{id:j,className:"woocommerce-email-editor-template-area-affordance",style:s.toolbar,children:[(0,m.jsxs)("span",{className:"woocommerce-email-editor-template-area-affordance__label",children:[(0,m.jsx)(Tt.A,{icon:we,size:24}),(0,m.jsx)("span",{children:(0,h.__)("Template","woocommerce")})]}),(0,m.jsx)(w.Button,{ref:b,className:"woocommerce-email-editor-template-area-affordance__button",variant:"tertiary",children:(0,h.__)("Edit template","woocommerce")})]})]}),i)}const Dt=n.AutosaveMonitor,Wt=n.EditorKeyboardShortcutsRegister;function Gt({postId:o,postType:r,settings:i,contentRef:a,customSavePanel:s,customSaveButton:l}){const{currentPost:c,onNavigateToEntityRecord:d,onNavigateToPreviousEntityRecord:u}=function(o,r,i){const[a,s]=(0,t.useReducer)((e,{type:t,post:o,previousRenderingMode:n})=>"push"===t?[...e,{post:o,previousRenderingMode:n}]:"pop"===t&&e.length>1?e.slice(0,-1):e,[{post:{postId:o,postType:r}}]),{post:l,previousRenderingMode:c}=a[a.length-1],{getRenderingMode:d}=(0,e.useSelect)(n.store),{setRenderingMode:u}=(0,e.useDispatch)(n.store),p=(0,t.useCallback)(e=>{s({type:"push",post:{postId:e.postId,postType:e.postType},previousRenderingMode:d()}),u(i)},[d,u,i]),m=(0,t.useCallback)(()=>{s({type:"pop"}),c&&u(c)},[u,c]);return{currentPost:l,onNavigateToEntityRecord:p,onNavigateToPreviousEntityRecord:a.length>1?m:void 0}}(o,r,"post-only"),{post:p,template:f}=(0,e.useSelect)(e=>{const{getEditedEntityRecord:t}=e(se.store),o=t("postType",c.postType,c.postId);if(!o||"boolean"==typeof o)return{post:null,template:null};const n=o;if("wp_template"===c.postType)return{post:n,template:null};const{getEditedPostTemplate:r}=e(k.H);return{post:n,template:r(n.template)}},[c.postType,c.postId]),{isFullscreenEnabled:g,allCommands:h,listingsUrl:_}=(0,e.useSelect)(e=>({isFullscreenEnabled:e(k.H).isFeatureActive("fullscreenMode"),allCommands:e(le.store).getCommands(),listingsUrl:e(k.H).getUrls()?.listings}),[]),y=(0,t.useCallback)(e=>{_&&["move-to-trash","permanently-delete"].includes(e)&&(window.location.href=_)},[_]),{isFullScreenForced:b,displaySendEmailButton:v,disableSnackbarNotices:x}=i,{removeEditorPanel:S}=(0,e.useDispatch)(n.store);(0,t.useEffect)(()=>{S("post-status")},[S]);const[j]=(0,ue.b)(),C=(0,t.useMemo)(()=>({...i,onNavigateToEntityRecord:d,onNavigateToPreviousEntityRecord:u,defaultRenderingMode:"wp_template"===c.postType?"post-only":"template-locked",supportsTemplateMode:!0,styles:j}),[i,d,u,c.postType,j]);if(!p||"wp_template"!==c.postType&&p.template!==f?.slug&&(p.template||!f))return(0,m.jsx)("div",{className:"spinner-container",children:(0,m.jsx)(w.ProgressBar,{})});const T=h.every(({name:e})=>e.includes("woocommerce"));return(0,E.xW)("editor_layout_loaded"),(0,m.jsx)(w.SlotFillProvider,{children:(0,m.jsxs)(n.ErrorBoundary,{canCopyContent:!0,children:[T&&(0,m.jsx)(le.CommandMenu,{}),(0,m.jsxs)(de.KE,{postId:c.postId,postType:c.postType,settings:C,templateId:f&&f.id,onActionPerformed:y,contentRef:a,styles:j,customSavePanel:s,customSaveButton:"wp_template"===c.postType?void 0:l,children:[(0,m.jsx)(Dt,{}),(0,m.jsx)(n.LocalAutosaveMonitor,{}),(0,m.jsx)(n.UnsavedChangesWarning,{}),(0,m.jsx)(Wt,{}),(0,m.jsx)(n.PostLockedModal,{}),(0,m.jsx)(ge,{}),(0,m.jsx)(Vt,{}),(0,m.jsx)(at,{}),(0,m.jsx)(ct,{}),(0,m.jsx)(me,{}),(0,m.jsx)(de.fA,{isActive:b||g}),(b||g)&&(0,m.jsx)(Lt,{}),!b&&(0,m.jsx)(pt,{}),"wp_template"===c.postType?(0,m.jsx)(gt,{}):(0,m.jsx)(mt.O,{}),v&&(0,m.jsx)(yt,{}),(0,m.jsx)(St,{disableSnackbarNotices:x}),(0,m.jsx)(Et,{}),(0,m.jsx)(ce.PluginArea,{scope:"woocommerce-email-editor"})]})]})})}var Ut=r(78982);const qt=()=>{const e={"You’ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?":{domain:"default",replacementText:(0,h.__)("You’ve tried to select a block that is part of a template that may be used in other emails. Would you like to edit the template?","woocommerce")}};(0,p.HY)("i18n.gettext","woocommerce/email-editor/override-text",(t,o,n)=>e[o]&&e[o].domain===(n||"default")?e[o].replacementText:t)},Kt=e=>{(0,o.doAction)("woocommerce_email_editor_events",e.detail)},Zt=()=>{(0,E.V1)()&&E.oh.addEventListener(E.vD,Kt)};window.addEventListener("unload",function(){(0,E.V1)()&&E.oh.removeEventListener(E.vD,Kt)});const Yt=(...t)=>{const o=(0,e.select)(n.store).isInserterOpened(),r=!!document.getElementsByClassName("block-editor-inserter__quick-inserter").length;let i="other_inserter";o?i="inserter_sidebar":r&&(i="quick_inserter");const a=t[0],s=t[5];!1===Array.isArray(a)&&"object"==typeof a&&(0,E.yM)(`${i}_library_block_selected`,{blockName:a.name}),Array.isArray(a)&&s&&s.patternName&&(0,E.yM)(`${i}_library_pattern_selected`,{patternName:s.patternName})},Jt={"core/editor":{autosave:"editor_content_auto_saved",setDeviceType:e=>{(0,E.yM)(`header_preview_dropdown_${e.toLowerCase()}_selected`)},setRenderingMode:t=>{(0,e.select)(n.store).getRenderingMode()!==t&&document.querySelector(`[aria-label="${(0,h.__)("View options")}"]`)&&(0,E.yM)("preview_dropdown_rendering_mode_changed",{renderingMode:t})}},"core/block-editor":{insertBlock:Yt,insertBlocks:Yt},"core/preferences":{set:(t,o,n)=>{if((0,e.select)(ut.store).get(t,o)===n)return;const r={focusMode:"focus_mode_toggle",fullscreenMode:"full_screen_mode_toggle",distractionFree:"distraction_free_toggle",fixedToolbar:"fixed_toolbar_toggle"};r[o]&&(0,E.yM)(r[o],{isEnabled:n})}},"core/commands":{open:"command_menu_opened",close:"command_menu_closed"}},Xt={},Qt={},eo=()=>{(0,E.V1)()&&(0,e.use)(e=>({dispatch:t=>{const o="object"==typeof t?t.name:t,n=e.dispatch(o),r=Jt[o];if(!r)return n;Xt[o]||(Xt[o]={}),Qt[o]||(Qt[o]={});for(const[e,t]of Object.entries(r))Qt[o][e]||(Qt[o][e]=n[e],Xt[o][e]=(...n)=>{try{"function"==typeof t?t(...n):"string"==typeof t&&(0,E.yM)(t)}catch(e){console.error("Error tracking event",e)}return Qt[o][e](...n)}),n[e]=Xt[o][e];return n}}))};let to=[];const oo={"edit-post/document":"document","edit-post/block":"block"};function no(e,t){setTimeout(()=>{(0,E.yM)(e,{isOpened:t.classList.contains("is-opened")||"true"===t.getAttribute("aria-expanded")})})}function ro(e){to.forEach(t=>{const o=e.target?.matches?.(t.selector)?e.target:e.target?.closest?.(t.selector);o&&("function"==typeof t.track?t.track(o,e):(0,E.yM)(t.track))})}const io=new WeakMap,ao={core:["saveEditedEntityRecord","saveEntityRecord"]},so=()=>{Object.keys(io).length>0||(0,e.use)(e=>({dispatch:t=>{const o="object"==typeof t?t.name:t;if(!ao[o])return e.dispatch(o);const n=e.dispatch(o);io[o]||(io[o]={});const r=ao[o].filter(e=>!io[o][e]);if(r.length>0)for(const t of r)io[o][t]=n[t],n[t]=async(...n)=>{const r=e.select(k.H).getContentValidation(),i=r?.validateContent;if(i){let e;try{e=i()}catch(t){e=!1}if(!e)return Promise.reject(new Error((0,h.__)("Content validation failed.","woocommerce")))}return await io[o][t](...n)};return n}}))};var lo=r(71881),co=r(18537),uo=r(1455),po=r.n(uo);function mo(e){return"string"==typeof e.title?(0,co.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,co.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,co.decodeEntities)(e.title.raw):""}const fo=o=>{"wp_template"===o&&((0,de.yd)("postType",o,"duplicate-post"),(0,de.yd)("postType",o,"reset-post"),(0,de.Bi)("postType",o,{id:"reset-email-template",label:(0,h.__)("Reset","woocommerce"),supportsBulk:!1,icon:lo.A,isEligible(e){if("wp_template"!==e.type)return!1;if("custom"!==e.source)return!1;if(!Boolean(e.plugin)&&!Boolean(e.has_theme_file))return!1;const{permissions:t}=e;return t?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:o,closeModal:n,onActionPerformed:r})=>{const[i,a]=(0,t.useState)(!1),{createSuccessNotice:l,createErrorNotice:c}=(0,e.useDispatch)(pe.store),{invalidateResolution:d,editEntityRecord:u,saveEditedEntityRecord:p}=(0,e.useDispatch)(se.store),f=o[0],g=(0,h.sprintf)((0,h.__)('Are you sure you want to reset "%s" to default?',"woocommerce"),mo(f));return(0,m.jsxs)(w.__experimentalVStack,{spacing:"5",children:[(0,m.jsx)(w.__experimentalText,{children:g}),(0,m.jsxs)(w.__experimentalHStack,{justify:"right",children:[(0,m.jsx)(w.Button,{variant:"tertiary",onClick:()=>{n?.(),(0,E.yM)("reset_modal_cancel_button_clicked")},disabled:i,__next40pxDefaultSize:!0,children:(0,h.__)("Cancel","woocommerce")}),(0,m.jsx)(w.Button,{variant:"primary",onClick:async()=>{(0,E.yM)("reset_modal_confirm_button_clicked"),a(!0);try{const e=await po()({path:`/wp/v2/templates/${f.id}?context=edit&source=${f.origin}`}),t=(0,s.parse)(e.content?.raw||"");u("postType",f.type,f.id,{blocks:t,content:(0,s.serialize)(t),source:f.origin}),await p("postType",f.type,f.id,{}),await po()({path:`/wp/v2/templates/${f.id}`,method:"DELETE"}),d("getEntityRecord",["postType",f.type,f.id]);const i=(0,h.sprintf)((0,h.__)('"%s" reset to default.',"woocommerce"),mo(f));l(i,{type:"snackbar",id:"reset-email-template-action"}),r?.(o),a(!1),n?.()}catch(e){let t=(0,h.__)("An error occurred while resetting the template.","woocommerce");e&&"object"==typeof e&&"message"in e&&(t=e.message),(0,E.yM)("reset_modal_error",{errorMessage:t}),c(t,{type:"snackbar"}),a(!1),n?.()}},isBusy:i,disabled:i,__next40pxDefaultSize:!0,children:(0,h.__)("Reset","woocommerce")})]})]})}}))};var go=(0,m.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(Y.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});function ho(e){return"string"==typeof e.title?(0,co.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,co.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,co.decodeEntities)(e.title.raw):""}function _o(e,t){return t?e.length>1?(0,h.sprintf)((0,h._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length,"woocommerce"),e.length):(0,h.sprintf)((0,h.__)('Are you sure you want to permanently delete "%s"?',"woocommerce"),(0,co.decodeEntities)(ho(e[0]))):e.length>1?(0,h.sprintf)((0,h._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length,"woocommerce"),e.length):(0,h.sprintf)((0,h.__)('Are you sure you want to move "%s" to the trash?',"woocommerce"),ho(e[0]))}const yo=n=>{(0,de.yd)("postType",n,"move-to-trash"),(0,de.Bi)("postType",n,(()=>{const n=(0,o.applyFilters)("woocommerce_email_editor_trash_modal_should_permanently_delete",!1);return{id:"trash-email-post",label:n?(0,h.__)("Permanently delete","woocommerce"):(0,h.__)("Move to trash","woocommerce"),supportsBulk:!0,icon:go,isEligible(e){if("wp_template"===e.type||"wp_template_part"===e.type||"wp_block"===e.type)return!1;const{permissions:t}=e;return t?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:o,closeModal:r,onActionPerformed:i})=>{const[a,s]=(0,t.useState)(!1),{createSuccessNotice:l,createErrorNotice:c}=(0,e.useDispatch)(pe.store),{deleteEntityRecord:d}=(0,e.useDispatch)(se.store),{urls:u}=(0,e.useSelect)(e=>({urls:e(k.H).getUrls()}),[]);return(0,m.jsxs)(w.__experimentalVStack,{spacing:"5",children:[(0,m.jsx)(w.__experimentalText,{children:_o(o,n)}),(0,m.jsxs)(w.__experimentalHStack,{justify:"right",children:[(0,m.jsx)(w.Button,{variant:"tertiary",onClick:()=>{r?.(),(0,E.yM)("trash_modal_cancel_button_clicked")},disabled:a,__next40pxDefaultSize:!0,children:(0,h.__)("Cancel","woocommerce")}),(0,m.jsx)(w.Button,{variant:"primary",onClick:async()=>{(0,E.yM)("trash_modal_move_to_trash_button_clicked"),s(!0);const e=await Promise.allSettled(o.map(e=>d("postType",e.type,e.id,{force:n},{throwOnError:!0})));if(e.every(({status:e})=>"fulfilled"===e)){let t;t=1===e.length?n?(0,h.sprintf)((0,h.__)('"%s" permanently deleted.',"woocommerce"),ho(o[0])):(0,h.sprintf)((0,h.__)('"%s" moved to the trash.',"woocommerce"),ho(o[0])):n?(0,h.__)("The items were permanently deleted.","woocommerce"):(0,h.sprintf)((0,h._n)("%s item moved to the trash.","%s items moved to the trash.",o.length,"woocommerce"),o.length),l(t,{type:"snackbar",id:"trash-email-post-action"}),i?.(o),u?.listings&&(window.location.href=u.listings)}else{let t;if(1===e.length){const o=e[0];t=o.reason?.message?o.reason.message:(0,h.__)("An error occurred while performing the action.","woocommerce")}else{const o=new Set,n=e.filter(({status:e})=>"rejected"===e);for(const e of n){const t=e;t.reason?.message&&o.add(t.reason.message)}t=0===o.size?(0,h.__)("An error occurred while performing the action.","woocommerce"):1===o.size?(0,h.sprintf)((0,h.__)("An error occurred while performing the action: %s","woocommerce"),[...o][0]):(0,h.sprintf)((0,h.__)("Some errors occurred while performing the action: %s","woocommerce"),[...o].join(","))}(0,E.yM)("trash_modal_move_to_trash_error",{errorMessage:t}),c(t,{type:"snackbar"})}s(!1),r?.()},isBusy:a,disabled:a,__next40pxDefaultSize:!0,children:n?(0,h.__)("Delete permanently","woocommerce"):(0,h.__)("Move to trash","woocommerce")})]})]})}}})())};const bo=window.wp.isShallowEqual;var wo=r.n(bo);function vo(e){const o=(0,t.useRef)(e);return wo()(e,o.current)||(o.current=e),o.current}const xo=[],ko=()=>{const{addValidationNotice:n,hasValidationNotice:r,removeValidationNotice:i}=bt(),{editedContent:a,editedTemplateContent:s}=(0,e.useSelect)(e=>({editedContent:e(k.H).getEditedEmailContent(),editedTemplateContent:e(k.H).getCurrentTemplateContent()})),l=vo(a),c=vo(s),d=(0,t.useCallback)(()=>((e,t,{addValidationNotice:n,hasValidationNotice:r,removeValidationNotice:i})=>{const a=(0,o.applyFilters)("woocommerce_email_editor_content_validation_rules",xo);let s=!0;return a.forEach(({id:o,testContent:a,message:l,actions:c})=>{a(e+t)?(n(o,l,c),s=!1):r(o)&&i(o)}),s})(l,c,{addValidationNotice:n,hasValidationNotice:r,removeValidationNotice:i}),[l,c,n,i,r]);return(0,t.useEffect)(()=>((0,e.dispatch)(k.H).setContentValidation({validateContent:d}),()=>{(0,e.dispatch)(k.H).setContentValidation(void 0)}),[d]),(0,t.useEffect)(()=>{const t=(0,e.subscribe)(()=>{r()&&d()},se.store);return()=>t()},[r,d]),{validateContent:d}},So=()=>{const o=(0,t.useMemo)(()=>{const e=(0,h.__)("Saving failed.");return new RegExp("^"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))},[]);(0,t.useEffect)(()=>{const t=(0,e.subscribe)(()=>{(0,e.select)(pe.store).getNotices().forEach(t=>{"string"==typeof t.content&&o.test(t.content)&&(0,e.dispatch)(pe.store).removeNotice(t.id)})});return()=>{t()}},[o])},jo="core/editor",Eo=(0,h.__)("Email design updated.","woocommerce");function Co(){return{"site-editor-save-success":{content:Eo,removeActions:!0},"editor-save":{content:(0,h.__)("Email saved.","woocommerce"),removeActions:!0,labelKeys:["item_updated","item_published"]}}}const To=["wp_template","wp_template_part"];const Mo=(0,e.createSelector)((e,t,o,n,r,i)=>{const a=[{postType:t,labels:o}];return i||a.push({postType:n,labels:r}),function(e,t){return e.map(e=>function(e,t){const o=Co();if(!Object.prototype.hasOwnProperty.call(o,e.id))return e;const n=o[e.id],r=n.labelKeys?function(e,t,o){return e.find(e=>t.some(t=>e.labels?.[t]&&e.labels[t]===o))}(t,n.labelKeys,e.content):void 0,i=!n.labelKeys||!!r,a="editor-save"===e.id&&(s=r?.postType,s&&To.includes(s))?Eo:n.content;var s;return{...e,...i?{content:a,spokenMessage:a}:{},actions:n.removeActions?[]:e.actions}}(e,t))}(e,a)},(e,t,o,n,r,i)=>[e,t,o,n,r,i]),Po=()=>{const r=(0,t.useRef)(null),[i,a]=(0,t.useState)(0),s=(0,t.useCallback)(e=>{r.current=e,a(e=>++e)},[r,a]),l=(0,e.useSelect)(e=>{const{getEditorSettings:t}=e(n.store);return t()?.allowedIframeStyleHandles??[]});return(0,t.useEffect)(()=>{if(!r.current)return;const{ownerDocument:e}=r.current;Array.from(document.styleSheets).filter(e=>{if(!(e?.ownerNode instanceof Element))return!1;const t=e.ownerNode.getAttribute("id"),n=t&&!l.includes(t);return(0,o.applyFilters)("woocommerce_email_editor_iframe_stylesheet_should_remove",n,e)}).map(e=>e.ownerNode.getAttribute("id")).forEach(t=>{const o=e.getElementById(t);o&&o.remove();const n=e.createElement("style");n.id=t,e.head.appendChild(n)})},[l,i]),s};var No=r(21383);function zo(){if(!window.WooCommerceEmailEditor)throw new Error("WooCommerceEmailEditor global object is not available. This is required for the email editor to work.");const e=window.WooCommerceEmailEditor.editor_settings,t=window.WooCommerceEmailEditor.editor_theme,o=window.WooCommerceEmailEditor.urls,n=window.WooCommerceEmailEditor.current_wp_user_email,r=window.WooCommerceEmailEditor.user_theme_post_id;if(!e)throw new Error("window.WooCommerceEmailEditor.editor_settings is required.");if(!t)throw new Error("window.WooCommerceEmailEditor.editor_theme is required.");if(!o||"string"!=typeof o.back||"string"!=typeof o.listings)throw new Error("window.WooCommerceEmailEditor.urls.back and .listings are required strings.");return{editorSettings:e,theme:t,urls:o,userEmail:n,globalStylesPostId:r??null}}function Ro({postId:o,postType:n,isPreview:r=!1,contentRef:i=null,customSavePanel:s,customSaveButton:c}){const[d,u]=(0,t.useState)(!1),{settings:p}=(0,e.useSelect)(e=>({settings:e(k.H).getInitialEditorSettings()}),[]);ko(),So(),(0,t.useEffect)(()=>{let t;return(0,e.use)(e=>(t=e.select,{select:e=>{if(function(e){return"object"==typeof e?e.name:e}(e)!==pe.store.name)return t(e);const o=t(e),n=o.getNotices;return n?{...o,getNotices:e=>{const o=n(e),r=Co();if(!o.some(e=>Object.prototype.hasOwnProperty.call(r,e.id)))return Mo(o,void 0,void 0,void 0,void 0,!0);const i=e=>e?t(se.store)?.getPostType(e)?.labels:void 0,a=t(jo)?.getCurrentPostType?.(),s=i(a),l=t(k.H)?.getEmailPostType?.(),c=l===a,d=c?s:i(l);return Mo(o,a,s,l,d,c)}}:o}})),()=>{(0,e.use)(()=>({select:t}))}},[]);const{setEmailPost:f}=(0,e.useDispatch)(k.H);(0,t.useEffect)(()=>{f(o,n),u(!0)},[o,n,f]);const g=Po(),h=(0,a.useMergeRefs)([g,i]),_=(0,t.useMemo)(()=>({...p,allowedBlockTypes:l(),isPreviewMode:r,responsiveEditingEnabled:!1}),[p,r]);return d?(0,m.jsx)(t.StrictMode,{children:(0,m.jsx)(Gt,{postId:o,postType:n,settings:_,contentRef:h,customSavePanel:s,customSaveButton:c})}):null}function Io(){(0,o.hasFilter)("sync.providers","woocommerce/email-editor/disable-collab")||(window._wpCollaborationEnabled&&(window._wpCollaborationEnabled=!1),(0,o.addFilter)("sync.providers","woocommerce/email-editor/disable-collab",()=>[],1e3)),Zt(),eo(),(0,E.V1)()&&(to=[{track:"header_preview_dropdown_preview_in_new_tab_selected",selector:'.editor-preview-dropdown__button-external, a[role="menuitem"][target^="wp-preview-"]'},{track:()=>{const e=document.getElementsByClassName("is-collapsed editor-collapsible-block-toolbar").length;(0,E.yM)("header_blocks_tool_button_clicked",{isBlockToolsCollapsed:e})},selector:".editor-collapsible-block-toolbar__toggle"},{track:e=>no("header_more_menu_dropdown_toggle",e),selector:`.editor-header__settings button[aria-label="${(0,h.__)("Options")}"]`},{track:e=>{(e.textContent===(0,h.__)("Save")&&"false"===e.getAttribute("aria-disabled")||e.textContent===(0,h.__)("Saving…"))&&(0,E.yM)("header_save_button_clicked")},selector:".editor-post-publish-button"},{track:"header_save_email_button_clicked",selector:".editor-post-saved-state.is-saving"},{track:"inserter_sidebar_library_close_icon_clicked",selector:".block-editor-inserter__menu .block-editor-tabbed-sidebar__close-button"},{track:e=>no("header_preview_dropdown_clicked",e),selector:".editor-preview-dropdown__toggle"},{track:()=>{const t=oo[(0,e.select)("core/interface").getActiveComplementaryArea("core")];t&&(0,E.yM)("sidebar_tab_selected",{tab:t})},selector:'.editor-sidebar__panel-tabs [data-tab-id], .editor-sidebar__panel-tabs [role="tab"]'},{track:e=>{const t=e.classList.contains("is-pressed");(0,E.yM)("header_inserter_sidebar_clicked",{isOpened:t})},selector:".editor-document-tools__inserter-toggle"},{track:e=>{const t=e.classList.contains("is-pressed");(0,E.yM)("header_listview_sidebar_clicked",{isOpened:t})},selector:".editor-document-tools__document-overview-toggle"},{track:e=>{(0,E.yM)("command_bar_command_clicked",{command:e.dataset?.value})},selector:'.commands-command-menu__container [role="option"]'}],document.addEventListener("click",ro)),(0,Ut.y$)(),so(),Z(),(0,p.tN)("core.registerPostTypeSchema","woocommerce-email-editor/modify-move-to-trash-action",e=>{yo(e)}),(0,p.tN)("core.registerPostTypeActions","woocommerce-email-editor/modify-move-to-trash-action",e=>{yo(e)}),(0,p.tN)("core.registerPostTypeSchema","woocommerce-email-editor/modify-template-actions",e=>{fo(e)}),(0,p.tN)("core.registerPostTypeActions","woocommerce-email-editor/modify-template-actions",e=>{fo(e)}),qt(),(0,s.getBlockTypes)().forEach(e=>{te(e.name)&&(0,u.G)(e.name,e=>({...e,attributes:{...e.attributes,layout:{type:"object"}}}))}),(0,p.HY)("editor.BlockListBlock","woocommerce-email-editor/with-layout-styles",ae),(0,p.HY)("editor.BlockEdit","woocommerce-email-editor/with-inspector-controls",re)}function Ao(n){const r=document.getElementById(n);if(!r)return;const{current_post_id:i,current_post_type:a}=window.WooCommerceEmailEditor;if(null==i)throw new Error("current_post_id is required but not provided.");if(!a)throw new Error("current_post_type is required but not provided.");const s=(0,o.applyFilters)("woocommerce_email_editor_wrap_editor_component",Ro);Io();const l=zo();(0,e.dispatch)(k.H).setEditorConfig(l),(0,t.createRoot)(r).render((0,m.jsx)(s,{postId:i,postType:a}))}function Bo({postId:r,postType:i,isPreview:a=!1,contentRef:s=null,config:l,customSavePanel:c,customSaveButton:d}){const[u,p]=(0,t.useState)(!1);(0,t.useEffect)(()=>{const t=(0,e.select)(n.store).getEditorSettings(),o=l||zo();return Io(),(0,e.dispatch)(k.H).setEditorConfig(o),p(!0),()=>{try{(0,No.IF)()}finally{(0,e.dispatch)(n.store).updateEditorSettings(t)}}},[l]);const f=(0,o.applyFilters)("woocommerce_email_editor_wrap_editor_component",Ro);return u?(0,m.jsx)(f,{postId:r,postType:i,isPreview:a,contentRef:s,customSavePanel:c,customSaveButton:d}):null}var Lo=r(7582),Ho=r(24737),$o=r(68882),Fo=r(47041),Oo=r(27523);function Vo(e){"loading"===document.readyState?window.addEventListener("DOMContentLoaded",()=>{Ao(e)},{once:!0}):Ao(e)}})(),(window.wc=window.wc||{}).emailEditor=i})();
Save File
Cancel