wp_back/wp-includes/js/dist/vendor/wp-polyfill-importmap.min.js

1 line
26 KiB
JavaScript
Raw Normal View History

2024-05-20 15:37:46 +03:00
!function(){const A="undefined"!=typeof window,Q="undefined"!=typeof document,e=()=>{};var t=Q?document.querySelector("script[type=esms-options]"):void 0;const C=t?JSON.parse(t.innerHTML):{};Object.assign(C,self.esmsInitOptions||{});let B=!Q||!!C.shimMode;const E=p(B&&C.onimport),o=p(B&&C.resolve);let i=C.fetch?p(C.fetch):fetch;const g=C.meta?p(B&&C.meta):e,n=C.mapOverrides;let s=C.nonce;!s&&Q&&(t=document.querySelector("script[nonce]"))&&(s=t.nonce||t.getAttribute("nonce"));const r=p(C.onerror||e),a=C.onpolyfill?p(C.onpolyfill):()=>{console.log("%c^^ Module TypeError above is polyfilled and can be ignored ^^","font-weight:900;color:#391")},{revokeBlobURLs:I,noLoadEventRetriggers:c,enforceIntegrity:l}=C;function p(A){return"string"==typeof A?self[A]:A}const f=(t=Array.isArray(C.polyfillEnable)?C.polyfillEnable:[]).includes("css-modules"),k=t.includes("json-modules"),w=!navigator.userAgentData&&!!navigator.userAgent.match(/Edge\/\d+\.\d+/),m=Q?document.baseURI:location.protocol+"//"+location.host+(location.pathname.includes("/")?location.pathname.slice(0,location.pathname.lastIndexOf("/")+1):location.pathname),K=(A,Q="text/javascript")=>URL.createObjectURL(new Blob([A],{type:Q}));let d=C.skip;if(Array.isArray(d)){const A=d.map((A=>new URL(A,m).href));d=Q=>A.some((A=>"/"===A[A.length-1]&&Q.startsWith(A)||Q===A))}else if("string"==typeof d){const A=new RegExp(d);d=Q=>A.test(Q)}else d instanceof RegExp&&(d=A=>d.test(A));const u=A=>setTimeout((()=>{throw A})),D=Q=>{(self.reportError||A&&window.safari&&console.error||u)(Q),r(Q)};function h(A){return A?" imported from "+A:""}let J=!1;if(!B)if(document.querySelectorAll("script[type=module-shim],script[type=importmap-shim],link[rel=modulepreload-shim]").length)B=!0;else{let A=!1;for(const Q of document.querySelectorAll("script[type=module],script[type=importmap]"))if(A){if("importmap"===Q.type&&A){J=!0;break}}else"module"!==Q.type||Q.ep||(A=!0)}const L=/\\/g;function N(A){try{if(-1!==A.indexOf(":"))return new URL(A).href}catch(A){}}function y(A,Q){return F(A,Q)||N(A)||F("./"+A,Q)}function F(A,Q){var e=Q.indexOf("#"),t=Q.indexOf("?");if(-2<e+t&&(Q=Q.slice(0,-1!==e&&(-1===t||e<t)?e:t)),"/"===(A=-1!==A.indexOf("\\")?A.replace(L,"/"):A)[0]&&"/"===A[1])return Q.slice(0,Q.indexOf(":")+1)+A;if("."===A[0]&&("/"===A[1]||"."===A[1]&&("/"===A[2]||2===A.length&&(A+="/"))||1===A.length&&(A+="/"))||"/"===A[0]){if("blob:"===(e=Q.slice(0,Q.indexOf(":")+1)))throw new TypeError(`Failed to resolve module specifier "${A}". Invalid relative url or base scheme isn't hierarchical.`);let t;if(t="/"===Q[e.length+1]?"file:"!==e?(t=Q.slice(e.length+2)).slice(t.indexOf("/")+1):Q.slice(8):Q.slice(e.length+("/"===Q[e.length])),"/"===A[0])return Q.slice(0,Q.length-t.length-1)+A;var C=t.slice(0,t.lastIndexOf("/")+1)+A,B=[];let E=-1;for(let A=0;A<C.length;A++)if(-1!==E)"/"===C[A]&&(B.push(C.slice(E,A+1)),E=-1);else{if("."===C[A]){if("."===C[A+1]&&("/"===C[A+2]||A+2===C.length)){B.pop(),A+=2;continue}if("/"===C[A+1]||A+1===C.length){A+=1;continue}}for(;"/"===C[A];)A++;E=A}return-1!==E&&B.push(C.slice(E)),Q.slice(0,Q.length-t.length)+B.join("")}}function U(A,Q,e){var t={imports:Object.assign({},e.imports),scopes:Object.assign({},e.scopes)};if(A.imports&&Y(A.imports,t.imports,Q,e),A.scopes)for(var C in A.scopes){var B=y(C,Q);Y(A.scopes[C],t.scopes[B]||(t.scopes[B]={}),Q,e)}return t}function q(A,Q){if(Q[A])return A;let e=A.length;do{var t=A.slice(0,e+1);if(t in Q)return t}while(-1!==(e=A.lastIndexOf("/",e-1)))}function v(A,Q){var e=q(A,Q);if(e&&null!==(Q=Q[e]))return Q+A.slice(e.length)}function R(A,Q,e){let t=e&&q(e,A.scopes);for(;t;){var C=v(Q,A.scopes[t]);if(C)return C;t=q(t.slice(0,t.lastIndexOf("/")),A.scopes)}return v(Q,A.imports)||-1!==Q.indexOf(":")&&Q}function Y(A,Q,e,t){for(var C in A){var E=F(C,e)||C;if((!B||!n)&&Q[E]&&Q[E]!==A[E])throw Error(`Rejected map override "${E}" from ${Q[E]} to ${A[E]}.`);var o=A[C];"string"==typeof o&&((o=R(t,F(o,e)||o,e))?Q[E]=o:console.warn(`Mapping "${C}" -> "${A[C]}" does not resolve`))}}let M,S=!Q&&(0,eval)("u=>import(u)");t=Q&&new Promise((A=>{const Q=Object.assign(docum