CoreFiles by mySites.guru
index.min.js1 lines, 4,141 bytes, from wordpress-6.7.12.zip
Raw History Compare with 6.7.11
md5
b2f44684298e34c5c0822c5994d27339
sha1
9db1c8cbe27ad466689e38b11f41e01d1f007bf7
sha256
c10279211997fb7e25c827988170754c6ace7555619aeedf962b7da123470188
import*as e from"@wordpress/interactivity";var t={317:e=>{e.exports=import("@wordpress/a11y")}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};(()=>{i.d(n,{o:()=>O,w:()=>P});const t=(e=>{var t={};return i.d(t,e),t})({getConfig:()=>e.getConfig,privateApis:()=>e.privateApis,store:()=>e.store});var o;const{directivePrefix:r,getRegionRootFragment:a,initialVdom:s,toVdom:c,render:d,parseServerData:l,populateServerData:g,batch:u}=(0,t.privateApis)("I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress."),w=null!==(o=(0,t.getConfig)("core/router").navigationMode)&&void 0!==o?o:"regionBased",p=new Map,h=(new Map,e=>{const t=new URL(e,window.location.href);return t.pathname+t.search}),f=async(e,{html:t})=>{try{if(!t){const o=new URL(e,window.location.href);if(o.origin!==window.location.origin)return!1;const i=await window.fetch(o.href);if(!(e=>{var t;if(200!==e.status)return!1;try{if(new URL(e.url).origin!==window.location.origin)return!1}catch{return!1}const o=null!==(t=e.headers.get("content-type"))&&void 0!==t?t:"";return!o.includes(",")&&"text/html"===o.split(";")[0].trim().toLowerCase()})(i))return!1;t=await i.text()}const o=(new window.DOMParser).parseFromString(t,"text/html");return v(o)}catch(e){return!1}},v=async(e,{vdom:t}={})=>{const o=Object.assign(Object.create(null),{body:void 0});if("regionBased"===w){const i=`data-${r}-router-region`;e.querySelectorAll(`[${i}]`).forEach((e=>{const n=e.getAttribute(i);o[n]=t?.has(e)?t.get(e):c(e)}))}const i=e.querySelector("title")?.innerText,n=l(e);return{regions:o,head:undefined,title:i,initialData:n}},m=e=>{u((()=>{if("regionBased"===w){g(e.initialData);const t=`data-${r}-router-region`;document.querySelectorAll(`[${t}]`).forEach((o=>{const i=o.getAttribute(t),n=a(o);d(e.regions[i],n)}))}e.title&&(document.title=e.title)}))},y=e=>(window.location.assign(e),new Promise((()=>{})));window.addEventListener("popstate",(async()=>{const e=h(window.location.href),t=p.has(e)&&await p.get(e);t?(m(t),P.url=window.location.href):window.location.reload()})),p.set(h(window.location.href),Promise.resolve(v(document,{vdom:s})));let b="",x=!1;const S={loading:"Loading page, please wait.",loaded:"Page Loaded."},{state:P,actions:O}=(0,t.store)("core/router",{state:{url:window.location.href,navigation:{hasStarted:!1,hasFinished:!1}},actions:{*navigate(e,o={}){o=Object.assign(Object.create(null),o);const{clientNavigationDisabled:i}=(0,t.getConfig)();i&&(yield y(e));const n=h(e),{navigation:r}=P,{loadingAnimation:a=!0,screenReaderAnnouncement:s=!0,timeout:c=1e4}=o;b=e,O.prefetch(n,o);const d=new Promise((e=>setTimeout(e,c))),l=setTimeout((()=>{b===e&&(a&&(r.hasStarted=!0,r.hasFinished=!1),s&&A("loading"))}),400),g=yield Promise.race([p.get(n),d]);if(clearTimeout(l),b===e)if(g&&!g.initialData?.config?.["core/router"]?.clientNavigationDisabled){yield m(g),window.history[o.replace?"replaceState":"pushState"]({},"",e),P.url=e,a&&(r.hasStarted=!1,r.hasFinished=!0),s&&A("loaded");const{hash:t}=new URL(e,window.location.href);t&&document.querySelector(t)?.scrollIntoView()}else yield y(e)},prefetch(e,o={}){o=Object.assign(Object.create(null),o);const{clientNavigationDisabled:i}=(0,t.getConfig)();if(i)return;const n=h(e);!o.force&&p.has(n)||p.set(n,f(n,{html:o.html}))}}});function A(e){if(!x){x=!0;const e=document.querySelector('script[id="wp-script-module-data-@wordpress/interactivity-router"]');if(e instanceof HTMLScriptElement)try{const t=JSON.parse(e.text);"string"==typeof t?.i18n?.loading&&(S.loading=t.i18n.loading),"string"==typeof t?.i18n?.loaded&&(S.loaded=t.i18n.loaded)}catch{}else P.navigation.texts?.loading&&(S.loading=P.navigation.texts.loading),P.navigation.texts?.loaded&&(S.loaded=P.navigation.texts.loaded)}const t=S[e];Promise.resolve().then(i.bind(i,317)).then((({speak:e})=>e(t)),(()=>{}))}})();var r=n.o,a=n.w;export{r as actions,a as state};

The same content is in 2 releases, WordPress 6.7.11 to 6.7.12. See them all, or every version of this file.