!function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:function(){return b},injectSpeculationRules:function(){return l}});const r=[],n=new Set,o="immediate",i=e=>{const t=e?r.filter((t=>t.hasAttribute(e))):[...r],o=new Set;t.forEach((e=>{try{const t=JSON.parse(e.textContent||"{}");(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return!t.prerender||Array.isArray(t.prerender)&&t.prerender.every((e=>"object"==typeof e&&null!==e&&(!("urls"in e)||Array.isArray(e.urls))))})(t)&&t.prerender&&t.prerender.forEach((e=>{e.urls&&e.urls.forEach((e=>o.add(e)))}))}catch{}e.remove();const t=r.indexOf(e);-1!==t&&r.splice(t,1)})),o.forEach((e=>n.delete(e)))},l=e=>{if(!HTMLScriptElement.supports||!HTMLScriptElement.supports("speculationrules"))return;if(!e.urls||0===e.urls.length)return;const t=e.urls.filter((e=>!n.has(e)));if(0===t.length)return;const i=document.createElement("script");i.type="speculationrules",e.dataAttribute&&i.setAttribute(e.dataAttribute,"true");const l={[e.speculationType||"prerender"]:[{source:"list",urls:t,eagerness:e.eagerness||o}]};i.textContent=JSON.stringify(l),document.head.appendChild(i),r.push(i),t.forEach((e=>n.add(e)))};let u=null;const s=()=>{const e=Reflect.get(window,"wp");if(!e||"object"!=typeof e)return null;const t=Reflect.get(e,"data");return(r=t)&&"object"==typeof r&&"function"==typeof Reflect.get(r,"subscribe")&&"function"==typeof Reflect.get(r,"select")?t:null;var r},c=e=>"function"!=typeof e?null:e();let a=null;const d=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){const t=Number(e);if(Number.isFinite(t))return t}return null},f=(e,t)=>!n.has(e)&&(t.dataAttribute&&i(t.dataAttribute),l({urls:[e],eagerness:t.eagerness||o,dataAttribute:t.dataAttribute}),!0),p=(e,t)=>{a&&(a(),a=null);const r=d(t.proximityThreshold),n=null!==r?r:100,o=d(t.hoverDelayMs),i=Math.max(0,null!==o?o:0),l=d(t.maxTotalPrerenders),u=null!==l?Math.max(0,Math.floor(l)):null,s=n*n;let c=null,p=null,m=null,b=0,v=0,y=0,h=!1;const g=()=>{null!==m&&(window.clearTimeout(m),m=null),p=null},S=()=>{if(h=!1,null!==u&&b>=u)return void g();const r=document.querySelectorAll(e);if(0===r.length)return;let n=null,o=1/0;if(r.forEach((e=>{const t=e.getBoundingClientRect(),r=((e,t,r)=>{const n=Math.max(r.left-e,0,e-r.right),o=Math.max(r.top-t,0,t-r.bottom);return n*n+o*o})(v,y,t);r<o&&(o=r,n=e)})),!n||o>s)return c=null,void g();if(n===c||n===p)return;const l=n.getAttribute("href");if(l){if(t.requirePostStateDivi&&!(e=>{const t=e.closest("tr");if(!t)return!1;const r=t.querySelector(".post-state");return!!r&&"Divi"===r.textContent?.trim()})(n))return c=n,void g();if(0===i){if(null!==u&&b>=u)return;return c=n,void(f(l,t)&&(b+=1))}g(),p=n,m=window.setTimeout((()=>{m=null,p=null,null!==u&&b>=u||(c=n,f(l,t)&&(b+=1))}),i)}else g()},w=e=>{v=e.clientX,y=e.clientY,h||(h=!0,requestAnimationFrame(S))};return document.addEventListener("mousemove",w,{passive:!0}),a=()=>{document.removeEventListener("mousemove",w),g()},a};let m=null;(()=>{if(!window.diviSpeculationRules)return;const e=window.diviSpeculationRules;if(e.hoverSelector){m&&(m(),m=null);const t=()=>{e.hoverSelector&&(m=p(e.hoverSelector,e))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{t()})):t()}else e.urls&&e.urls.length>0&&(l(e),e.gutenbergEditorContext&&e.clearOnSave&&(e=>{u&&(u(),u=null);const t=s();if(!t)return;let r=!1,n=!1;const o=t.subscribe((()=>{const o=t.select("core/editor"),u=c(o?.isSavingPost);if(null!==u)if(c(o?.isAutosavingPost))r=!1;else{if(!r&&u&&(n=!0,e.dataAttribute&&i(e.dataAttribute)),r&&!u&&n){const t=c(o?.didPostSaveRequestSucceed);if(n=!1,null!==t&&!t)return void(r=u);e.urls&&l(e)}r=u}}));u=o})(e))})();var b={injectSpeculationRules:l};((window.divi=window.divi||{}).scriptLibrary=window.divi.scriptLibrary||{}).scriptLibrarySpeculationRules=t}();