PageSourceSearch

https://chess-enigma-app.web.app/chunk-4YRI5E2Y.js

js chess-enigma-app.web.app collected 2026-10-03 12:19:48 UTC 3,054 bytes, 1 lines download raw bytes

1import{a as t}from"./chunk-GMYZCGXV.js";import{o as u}from"./chunk-VOSR76PC.js";import{na as c,s as n,sa as l}from"./chunk-X6INATCZ.js";import{i as s}from"./chunk-U3SD5ENI.js";var f=(()=>{class r{constructor(){this.httpClient=l(u)}setCookies(){return s(this,null,function*(){let e=yield n(this.httpClient.get("set-wordpress-cookies",{withCredentials:!0}));t.production||console.log("WordPress cookies establecidas:",e.data)})}removeCookies(){return s(this,null,function*(){let e=yield n(this.httpClient.get("delete-wordpress-cookies",{withCredentials:!0}));t.production||console.log("WordPress cookies eliminadas:",e.data)})}getAllCookies(){let e={};return document.cookie.split(";").forEach(o=>{let[i,a]=o.trim().split("=");i&&a&&(e[i]=decodeURIComponent(a))}),e}cookieExists(e){let o=this.getAllCookies();return Object.prototype.hasOwnProperty.call(o,e)}cookieStartsWith(e){let o=this.getAllCookies();return Object.keys(o).some(i=>i.startsWith(e))}areWordPressCookiesPresent(){return[{type:"exact",name:"mbr_login"},{type:"prefix",name:"wordpress_logged_in_"},{type:"prefix",name:"wordpress_sec_"},{type:"prefix",name:"wp_api_auth_"}].every(o=>o.type==="exact"?this.cookieExists(o.name):this.cookieStartsWith(o.name))}isAuthenticated(){return this.areWordPressCookiesPresent()}ensureAuthentication(){return s(this,null,function*(){try{return this.areWordPressCookiesPresent()?(t.production||console.log("\u2705 Todas las cookies de autenticaci\xF3n est\xE1n presentes"),!0):(t.production||console.log("\u26A0\uFE0F Faltan cookies de autenticaci\xF3n, configurando..."),yield this.setCookies(),yield new Promise(e=>setTimeout(e,100)),this.areWordPressCookiesPresent()?(t.production||console.log("\u2705 Cookies de autenticaci\xF3n configuradas correctamente"),!0):(console.error("\u274C Error: No se pudieron configurar las cookies de autenticaci\xF3n"),!1))}catch(e){return console.error("\u274C Error al configurar la autenticaci\xF3n:",e),!1}})}executeWithAuth(e){return s(this,null,function*(){if(!(yield this.ensureAuthentication()))throw new Error("No se pudo establecer la autenticaci\xF3n con WordPress");return yield e()})}logout(){return s(this,null,function*(){try{yield this.removeCookies(),t.production||console.log("\u2705 Cookies de autenticaci\xF3n eliminadas")}catch(e){throw console.error("\u274C Error al eliminar cookies de autenticaci\xF3n:",e),e}})}
1debugCookies(){if(t.production)return;let e=this.getAllCookies();console.log("\u{1F36A} Cookies actuales:",e),console.log("\u{1F4CA} Estado de cookies requeridas:"),console.log("- mbr_login:",this.cookieExists("mbr_login")?"\u2705":"\u274C"),console.log("- wordpress_logged_in_*:",this.cookieStartsWith("wordpress_logged_in_")?"\u2705":"\u274C"),console.log("- wordpress_sec_*:",this.cookieStartsWith("wordpress_sec_")?"\u2705":"\u274C"),console.log("- wp_api_auth_*:",this.cookieStartsWith("wp_api_auth_")?"\u2705":"\u274C")}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{f as a};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.