System.register(["./state-legacy.BfeTROjz.js"],(function(t,e){"use strict";var n;return{setters:[t=>{n=t.b}],execute:function(){function e(t){const e=document.createElement("div");e.innerHTML=t;let n=(e.textContent||e.innerText||"").trim();return n.length>500&&(n=n.substring(0,500)+"..."),n}t("e",(function(){if(null!==n.postContextCache)return n.postContextCache;jQuery;try{const t={};if(t.title=function(){const t=jQuery,e=t("#title");if(e.length>0&&e.val())return e.val().trim();try{const t=window.wp;if(t&&t.data&&t.data.select){var n;const e=null===(n=t.data.select("core/editor"))||void 0===n?void 0:n.getEditedPostAttribute("title");if(e)return e.trim()}}catch(r){}const i=t(".wp-heading-inline, h1.wp-heading-inline");if(i.length>0){const t=i.text().trim();if(t&&!t.match(/^(Edit|Add New)/i))return t}}(),t.description=function(){const t=jQuery,n=t("#content");if(n.length>0&&n.val())return e(n.val());try{const t=window.wp;if(t&&t.data&&t.data.select){var i;const n=null===(i=t.data.select("core/block-editor"))||void 0===i?void 0:i.getBlocks();if(n&&n.length>0){let t="";for(const e of n)e.attributes&&e.attributes.content&&(t+=e.attributes.content+" ");if(t)return e(t)}}}catch(o){}const r=t("#excerpt");return r.length>0&&r.val()?e(r.val()):void 0}(),t.title||t.description)return n.postContextCache=JSON.stringify(t),n.postContextCache}catch(t){}return n.postContextCache="",""}))}}}));
