OwlCyberSecurity - MANAGER
Edit File: extendify-shared-634d6edc7be3cc539a37.js
"use strict";(globalThis.webpackChunkextendify=globalThis.webpackChunkextendify||[]).push([[123],{9441:(e,t,n)=>{var o=n(9196),a=n(9818),r=n(5736),i=n(5609),s=n(9307),l=n(5202),c=n(7918);const d=({children:e,title:t,onClose:n,anchor:a})=>{const[d,p]=(0,s.useState)(!1),[m,w]=(0,s.useState)(0),[u,h]=(0,s.useState)(0),f=()=>{p(!1),n()};if((0,s.useLayoutEffect)((()=>{if(!a||!d)return;const e=a.style.outline;a.style.outline="99999px solid rgba(0, 0, 0, 0.4)";const t=a.getBoundingClientRect(),n=t.left+t.width/2,o=t.top+t.height;return w(n),h(o),()=>{a.style.outline=e}}),[a,d]),(0,s.useEffect)((()=>{p(!0)}),[m,u]),d)return(0,o.createElement)(c.Vq,{static:!0,className:"extendify-shared",open:d,onClose:f},(0,o.createElement)("div",{className:"relative z-max"},(0,o.createElement)("div",{onClick:f,"aria-hidden":!0,role:"presentation",className:"fixed inset-0 z-10 h-screen w-screen bg-transparent"}),(0,o.createElement)("div",{className:"fixed z-20 flex min-w-80 max-w-xs flex-col bg-transparent shadow-2xl",style:{top:`${u+12}px`,left:`${m}px`,transform:"translate(-50%, 0)"}},(0,o.createElement)("div",{className:"absolute left-1/2 top-[-12px] h-0 w-0 -translate-x-1/2 transform border-b-[12px] border-l-[8px] border-r-[8px] border-transparent border-b-white"}),(0,o.createElement)("button",{"data-test":"close-tooltip",className:"absolute right-0 top-0 z-20 m-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-white p-0 leading-none outline-none ring-1 ring-gray-200 focus:shadow-none focus:ring-wp focus:ring-design-main rtl:left-0 rtl:right-auto",onClick:f,"aria-label":(0,r.__)("Close ToolTip","extendify-local")},(0,o.createElement)(i.Icon,{icon:l.Z,className:"h-4 w-4 fill-current"})),(0,o.createElement)(c.$N,{className:"sr-only"},t),(0,o.createElement)("div",{className:"text-md relative m-0 bg-white p-6 pt-8 text-left font-sans leading-7 text-gray-900 rtl:text-right"},e))))},p=()=>(0,o.createElement)(d,{title:(0,r.__)("Tooltip pointing to the edit page button","extendify-local"),anchor:document.querySelector("#wp-admin-bar-edit")},(0,r.__)("Welcome to your new site! When you're ready, press here to edit this page.","extendify-local"));var m=n(5829),w=n(9272);(e=>{const t=`WP_PREFERENCES_USER_${window.extSharedData.userId}`,n=window.localStorage.getItem(t)||"{}";if(window.localStorage.setItem(t,JSON.stringify({...JSON.parse(n),"core/edit-post":{...null!==(e=JSON.parse(n)?.["core/edit-post"])&&void 0!==e?e:{},welcomeGuide:!1}})),"extendify-launch"===new URLSearchParams(window.location.search).get("page"))return;(0,w.p)();const r=document.createElement("style");r.innerHTML=".components-modal__screen-overlay { display: none!important }",document.head.appendChild(r);const i=(0,a.subscribe)((()=>{const e=document.querySelector(".editor-start-page-options__modal-content");e&&(e.style.display="",document.querySelector(".components-modal__header > .components-button")?.click())}));setTimeout((()=>{document.head.removeChild(r),i()}),3e3);const s=new URLSearchParams(window.location.search);if(s.has("extendify-launch-success")){if(!document.querySelector("#wp-admin-bar-edit"))return;const e=new URL(window.location.href),t=new URL(window.extSharedData.homeUrl),n=e.origin===t.origin&&e.pathname===t.pathname;s.delete("extendify-launch-success");const a=`${e.origin}${e.pathname}`;if(window.history.replaceState({},"",a),n){const e=Object.assign(document.createElement("div"),{id:"extendify-edit-page-modal-tooltip"});document.body.appendChild(e),(0,m.s)((0,o.createElement)(p,null),e)}}})()},9196:e=>{e.exports=window.React},1850:e=>{e.exports=window.ReactDOM},6989:e=>{e.exports=window.wp.apiFetch},5609:e=>{e.exports=window.wp.components},9818:e=>{e.exports=window.wp.data},9307:e=>{e.exports=window.wp.element},5736:e=>{e.exports=window.wp.i18n},444:e=>{e.exports=window.wp.primitives}},e=>{e.O(0,[746,857],(()=>(9441,e(e.s=9441)))),e.O()}]);