AlkantarClanX12

Your IP : 216.73.216.59


Current Path : /www/capitalgmcbuickregina_830/public/wp-content/plugins/popup-maker/dist/packages/
Upload File :
Current File : /www/capitalgmcbuickregina_830/public/wp-content/plugins/popup-maker/dist/packages/block-editor.js

(()=>{"use strict";var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var o in a)t.o(a,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:a[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function a(t){var e,o,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var p=t.length;for(e=0;e<p;e++)t[e]&&(o=a(t[e]))&&(r&&(r+=" "),r+=o)}else for(o in t)t[o]&&(r&&(r+=" "),r+=o);return r}t.r(e),t.d(e,{TriggerEdit:()=>A,name:()=>N,settings:()=>M});const o=function(){for(var t,e,o=0,r="",p=arguments.length;o<p;o++)(t=arguments[o])&&(e=a(t))&&(r&&(r+=" "),r+=e);return r},r=window.popupMaker.i18n,p=window.wp.hooks,n=window.wp.blockEditor,i=window.wp.components,h=window.wp.compose,s=window.popupMaker.components,P=window.popupMaker.icons,S=window.ReactJSXRuntime,{popupTriggerExcludedBlocks:c}=window.popupMakerBlockEditor,u=[],l=c||["core/nextpage","popup-maker/call-to-action","popup-maker/call-to-actions"];function G(t){return!u.length&&!l.length||(u.length?u.includes(t):!l.length||!l.includes(t))}const V=(0,h.createHigherOrderComponent)(t=>e=>{const{name:a,attributes:o,setAttributes:p,isSelected:h}=e,{openPopupId:c}=o;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{...e}),h&&G(a)&&(0,S.jsx)(n.InspectorControls,{children:(0,S.jsx)(i.Panel,{className:"pum-block-inspector-popup-controls",children:(0,S.jsxs)(i.PanelBody,{title:(0,r.__)("Popup Controls","popup-maker"),icon:P.Mark,initialOpen:!1,children:[(0,S.jsx)(i.PanelRow,{children:(0,r.__)("These settings allow you to control popups with this block.","popup-maker")}),(0,S.jsx)(i.PanelRow,{children:(0,S.jsx)(s.PopupSelectControl,{label:(0,S.jsxs)(S.Fragment,{children:[(0,r.__)("Open Popup","popup-maker"),(0,S.jsx)(i.Tooltip,{placement:"top",text:(0,r.__)("This method does not work well with all block types.","popup-maker"),children:(0,S.jsx)("a",{href:"https://wppopupmaker.com/docs/triggering-popups/trigger-click-open-overview-methods/",target:"_blank",rel:"noopener noreferrer",children:(0,S.jsx)(i.Icon,{size:16,icon:"editor-help",title:(0,r.__)("Open documentation","popup-maker"),style:{verticalAlign:"middle"}})})})]}),value:c,onChange:t=>p({openPopupId:t}),help:(0,r.__)("Open a popup when clicking this block","popup-maker")})})]})})})]})},"withAdvancedControls");(0,p.addFilter)("blocks.registerBlockType","popup-maker/popup-trigger-attributes",function(t){return void 0!==t.attributes&&G(t.name)&&(t.attributes=Object.assign(t.attributes,{openPopupId:{type:"string",default:""}})),t}),(0,p.addFilter)("editor.BlockEdit","popup-maker/popup-trigger-advanced-control",V),(0,p.addFilter)("blocks.getSaveContent.extraProps","popup-maker/applyTriggerClass",function(t,e,a){const{openPopupId:r}=a;return void 0!==r&&r>0&&G(e.name)&&(t.className=o(t.className,"popmake-"+r)),t});const d=window.wp.richText,g=window.wp.a11y,m=window.wp.element,w=window.wp.data,k=window.wp.keycodes,v=({className:t,onChangeInputValue:e,value:a,...p})=>(0,S.jsx)("form",{className:o("block-editor-popup-trigger-popover__popup-editor",t),role:"dialog","aria-label":(0,r.__)("Popup Trigger Editor","popup-maker"),...p,children:(0,S.jsxs)("div",{className:"block-editor-popup-select-input",role:"group","aria-label":(0,r.__)("Popup Selection Controls","popup-maker"),children:[(0,S.jsx)(s.PopupSelectControl,{emptyValueLabel:(0,r.__)("Which popup should open?","popup-maker"),hideLabelFromVision:!0,value:String(a),onChange:e,required:!0}),(0,S.jsx)(i.Button,{icon:"editor-break",label:(0,r.__)("Apply","popup-maker"),type:"submit"})]})}),_=window.wp.htmlEntities,{popups:f=[]}=window.popupMakerBlockEditor;function b({popupId:t,className:e}){const a=o(e,"block-editor-popup-trigger-popover__popup-viewer-text"),p=((t=0)=>{t=parseInt(String(t))||0;const e=f.filter(({id:e})=>t===e);return 1===e.length&&e[0]})(t);let n="";return p&&(n=(0,r.sprintf)(/* translators: %s: popup title. */ /* translators: %s: popup title. */
(0,r.__)('Open "%s" popup',"popup-maker"),(0,_.decodeEntities)(p.title.rendered))),(0,S.jsx)("span",{className:a,role:"button","aria-label":n,children:n})}function C({className:t="",spanClassName:e="",onEditTriggerClick:a,popupId:p,...n}){return(0,S.jsxs)("div",{className:o("block-editor-popup-trigger-popover__popup-viewer",t),role:"region","aria-label":(0,r.__)("Popup Trigger Preview","popup-maker"),...n,children:[(0,S.jsx)(b,{popupId:p,className:e}),a&&(0,S.jsx)(i.Button,{icon:"edit",label:(0,r.__)("Edit","popup-maker"),onClick:a})]})}function x(t,e,a,o,r){let p=e;const n={forwards:1,backwards:-1}[r]||1,i=-1*n;for(;t[p]&&t[p][o]===a;)p+=n;return p+=i,p}const y=(t,...e)=>(...a)=>t(...a,...e),T=(y(x,"backwards"),y(x,"forwards"),t=>t.stopPropagation()),j=t=>{[k.LEFT,k.DOWN,k.RIGHT,k.UP,k.BACKSPACE,k.ENTER].indexOf(parseInt(t.key))>-1&&t.stopPropagation()},I=({isActive:t,activeAttributes:e,value:a,onChange:o,onFocusOutside:p,stopAddingTrigger:h,contentRef:s,focusOnMount:P})=>{const{selectionChange:c}=(0,w.useDispatch)(n.store),{selectionStart:u}=(0,w.useSelect)(t=>{const{getSelectionStart:e}=t(n.store);return{selectionStart:e()}},[]),l=(0,m.useMemo)(()=>{return t=e,{popupId:parseInt(t.popupId??"0"),doDefault:"1"===t.doDefault};var t},[e]),[G,V]=(0,m.useState)(!e||!e.popupId),k=(0,d.useAnchor)({editableContentElement:s.current,settings:{...M,isActive:t}}),_=(0,m.useCallback)(()=>{const t=(0,d.removeFormat)(a,N);o(t),h(),(0,g.speak)((0,r.__)("Trigger removed.","popup-maker"),"assertive")},[o,h,a]),[f,b]=(0,m.useState)(!1),x=(0,m.useCallback)(()=>{b(t=>!t)},[]),y=(0,m.useCallback)(e=>{const p=l?.popupId,n=!p,i={...l,...e};if(!n&&!i?.popupId)return void _();const h=(({popupId:t=0,doDefault:e=!1})=>({type:N,attributes:{class:`popmake-${t} ${e?"pum-do-default":""}`,popupId:t.toString(),doDefault:e?"1":"0"}}))(i),s=(0,r.__)("Open Popup","popup-maker");let P;(0,d.isCollapsed)(a)&&!t?(P=function(t,e,a,o){const r=(0,d.insert)(t,e,o);return(0,d.applyFormat)(r,a,o,o+e.length)}(a,s,h,a.start),o(P),c({clientId:u.clientId,identifier:u.attributeKey,start:a.start+s.length+1})):(P=(0,d.applyFormat)(a,h),o(P)),t?(0,g.speak)((0,r.__)("Trigger edited.","popup-maker"),"assertive"):(0,g.speak)((0,r.__)("Trigger inserted.","popup-maker"),"assertive")},[l,a,t,o,_,c,u]),I=G||!l.popupId,{popupId:E,doDefault:A}=l,O=(0,m.useRef)(null);return(0,m.useEffect)(()=>{const e=s.current;O.current=t&&e?.ownerDocument?.activeElement!==e?.ownerDocument?.body?e?.ownerDocument?.activeElement:e;const a=t=>{"Escape"===t.key&&h()};return document.addEventListener("keydown",a),()=>{O.current&&"focus"in O.current&&O.current.focus(),document.removeEventListener("keydown",a)}},[s,t,h]),(0,m.useEffect)(()=>()=>{},[]),(0,S.jsx)(S.Fragment,{children:(0,S.jsx)(i.Popover,{className:"block-editor-popup-trigger__inline-popover  editor-popup-trigger-popover block-editor-popup-trigger-popover",anchor:k,animate:!1,onClose:()=>{t||h()},onFocusOutside:p,position:"bottom center",offset:8,shift:!0,focusOnMount:P,constrainTabbing:!0,children:(0,S.jsxs)("div",{className:"block-editor-popup-trigger-popover__input-container",children:[(0,S.jsxs)("div",{className:"editor-popup-trigger-popover__row block-editor-popup-trigger-popover__row",children:[I?(0,S.jsx)(v,{className:"editor-format-toolbar__trigger-container-content block-editor-format-toolbar__trigger-container-content",value:E??"",onChangeInputValue:t=>{y({popupId:Number(t)})},onKeyDown:j,onKeyPress:T,onSubmit:h}):(0,S.jsx)(C,{className:"editor-format-toolbar__trigger-container-content block-editor-format-toolbar__trigger-container-content",onKeyPress:T,popupId:E??0,onEditTriggerClick:t=>{V(!0),t.preventDefault()}}),(0,S.jsx)(i.Button,{className:"editor-popup-trigger-popover__settings-toggle block-editor-popup-trigger-popover__settings-toggle",icon:f?"arrow-up-alt2":"arrow-down-alt2",label:(0,r.__)("Trigger settings","popup-maker"),onClick:x,"aria-expanded":f})]}),f&&(0,S.jsx)("div",{className:"editor-popup-trigger-popover__row block-editor-popup-trigger-popover__row editor-popup-trigger-popover__settings block-editor-popup-trigger-popover__settings",children:(0,S.jsx)(i.ToggleControl,{label:(0,r.__)("Do not prevent default click behavior","popup-maker"),checked:!!A,onChange:t=>y({doDefault:t}),__nextHasNoMarginBottom:!0})})]})})})},E=(0,r.__)("Popup Trigger","popup-maker"),N="popup-maker/popup-trigger",A=(0,i.withSpokenMessages)(({isActive:t,activeAttributes:e,value:a,onChange:o,onFocus:p,contentRef:i})=>{const[h,s]=(0,m.useState)(!1),[c,u]=(0,m.useState)(null);(0,m.useEffect)(()=>{t||s(!1)},[t]),(0,m.useLayoutEffect)(()=>{const e=i?.current;if(e)return e.addEventListener("click",a),()=>{e.removeEventListener("click",a)};function a(e){const a=e.target,o=a?.closest("[contenteditable] span.popup-trigger");o&&t&&(s(!0),u({el:o,action:"click"}))}},[i,t]);const l=()=>{s(!0)},G=()=>{o((0,d.removeFormat)(a,N)),(0,g.speak)((0,r.__)("Trigger removed.","popup-maker"),"assertive")},V=!("SPAN"===c?.el?.tagName&&"click"===c?.action),w=!(0,d.isCollapsed)(a);return(0,S.jsxs)(S.Fragment,{children:[w&&(0,S.jsx)(n.RichTextShortcut,{type:"primary",character:"p",onUse:l}),(0,S.jsx)(n.RichTextShortcut,{type:"primaryShift",character:"p",onUse:G}),t?(0,S.jsx)(n.RichTextToolbarButton,{icon:P.MarkWhite,iconSize:16,title:(0,r.__)("Remove Trigger","popup-maker"),onClick:G,isActive:t,shortcutType:"primaryShift",shortcutCharacter:"p","aria-haspopup":"true","aria-expanded":h}):(0,S.jsx)(n.RichTextToolbarButton,{icon:P.Mark,iconSize:16,title:E,onClick:l,isActive:t,shortcutType:"primary",shortcutCharacter:"p","aria-haspopup":"true","aria-expanded":h}),h&&(0,S.jsx)(I,{stopAddingTrigger:()=>{s(!1),c?.el?c.el.focus():p(),u(null)},onFocusOutside:()=>{s(!1),u(null)},isActive:t,activeAttributes:e,value:a,onChange:o,contentRef:i,focusOnMount:!!V&&"firstElement"})]})}),M={name:N,title:E,tagName:"span",className:"popup-trigger",object:!1,attributes:{popupId:"data-popup-id",doDefault:"data-do-default"},interactive:!1,edit:A};[e].forEach(({name:t,settings:e})=>(0,d.registerFormatType)(t,e));const O=window.wp.i18n,D=window.wp.editPost,F=window.wp.plugins,R=window.wp.apiFetch;var L=t.n(R);const B={postId:null,title:"",hasChanges:!1};let K=!1;(0,F.registerPlugin)("popup-maker-title-panel",{render:()=>{const[t,e]=(0,m.useState)(""),[a,o]=(0,m.useState)(!1),{postType:r,postId:p,popupTitle:n}=(0,w.useSelect)(t=>{const e=t("core/editor");return{postType:e.getCurrentPostType(),postId:e.getCurrentPostId(),popupTitle:e.getEditedPostAttribute("popup_title")??""}},[]);return(0,m.useEffect)(()=>{if("popup"===r&&!a&&p){const t=n||"";e(t),o(!0),B.postId=p,B.title=t,B.hasChanges=!1,function(){if(K)return;K=!0;let t=!1;(0,w.subscribe)(()=>{const e=(0,w.select)("core/editor"),a=e.isSavingPost(),o=e.isAutosavingPost(),r=e.didPostSaveRequestSucceed(),p=t&&!a&&!o;t=a&&!o,p&&r&&B.hasChanges&&B.postId&&L()({path:`/popup-maker/v2/popups/${B.postId}`,method:"POST",data:{popup_title:B.title}}).then(()=>{B.hasChanges=!1}).catch(t=>{console.error("Failed to save popup title:",t),(0,w.dispatch)("core/notices").createErrorNotice((0,O.__)("Failed to save popup title.","popup-maker"),{type:"snackbar"})})})}()}},[r,p,n,a]),"popup"!==r?null:(0,S.jsx)(D.PluginDocumentSettingPanel,{name:"popup-title-panel",title:(0,O.__)("Popup Title","popup-maker"),className:"popup-maker-title-panel",children:(0,S.jsx)(i.TextControl,{label:(0,O.__)("Title","popup-maker"),value:t,onChange:t=>{e(t),B.title=t,B.hasChanges=!0,(0,w.dispatch)("core/editor").editPost({popup_title:t})},help:(0,O.__)("Shown as headline inside the popup.","popup-maker")})})}});const U=window.wp.editor,z=((0,m.forwardRef)(({icon:t,size:e=24,...a},o)=>(0,m.cloneElement)(t,{width:e,height:e,...a,ref:o})),window.wp.primitives);z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Circle,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.Circle,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.G,z.Path,z.Path,z.SVG,z.G,z.Path,z.Path,z.SVG,z.G,z.Path,z.Path,z.SVG,z.G,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path;const $=(0,S.jsx)(z.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,S.jsx)(z.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),q=(z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.Path,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.Path,z.SVG,z.Path,z.Path,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,z.SVG,z.Path,t=>{const{homeUrl:e,previewNonce:a}=window.popupMakerBlockEditor||{};if(!e||!a||!t)return null;const o=new URL(e);return o.searchParams.set("popup_preview",a),o.searchParams.set("popup",String(t)),o.href});(0,F.registerPlugin)("popup-maker-preview-button",{render:()=>{const t=(0,m.useRef)(null),{postType:e,postId:a,isNew:o,isDirty:r,isSaving:p,didSaveSucceed:n}=(0,w.useSelect)(t=>{const e=t("core/editor");return{postType:e.getCurrentPostType(),postId:e.getCurrentPostId(),isNew:e.isEditedPostNew(),isDirty:e.isEditedPostDirty(),isSaving:e.isSavingPost()&&!e.isAutosavingPost(),didSaveSucceed:e.didPostSaveRequestSucceed()}},[]),{savePost:i}=(0,w.useDispatch)("core/editor"),h=(0,m.useRef)(!1);return(0,m.useEffect)(()=>{const e=h.current&&!p&&n;h.current=p;const o=t.current;if(e&&o&&!o.closed){const t=q(a);t&&o.location.replace(t)}},[p,n,a]),"popup"!==e||o||!q(a)?null:(0,S.jsx)(U.PluginPreviewMenuItem,{icon:$,onClick:()=>{(()=>{const e=q(a);e&&(t.current=window.open(e,`pum-preview-${a}`),t.current?.focus())})(),r&&i()},children:(0,O.__)("Preview Popup","popup-maker")})}});const H=window.popupMaker.coreData;(0,w.register)(H.callToActionStore),(0,w.register)(H.licenseStore),(0,w.register)(H.settingsStore),(0,w.register)(H.popupStore),(0,w.register)(H.urlSearchStore),(window.popupMaker=window.popupMaker||{}).blockEditor={}})();