PageSourceSearch

https://app.inventapalabras.com/assets/InventaPalabrasApp/src/API-7de6295e79e8440483a6932b4d36750f.js

js inventapalabras.com collected 2026-10-04 12:29:24 UTC 4,505 bytes, 128 lines download raw bytes

1function _class_call_check(instance, Constructor) {
2    if (!(instance instanceof Constructor)) {
3        throw new TypeError("Cannot call a class as a function");
4    }
5}
6function _defineProperties(target, props) {
7    for(var i = 0; i < props.length; i++){
8        var descriptor = props[i];
9        descriptor.enumerable = descriptor.enumerable || false;
10        descriptor.configurable = true;
11        if ("value" in descriptor) descriptor.writable = true;
12        Object.defineProperty(target, descriptor.key, descriptor);
13    }
14}
15function _create_class(Constructor, protoProps, staticProps) {
16    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17    if (staticProps) _defineProperties(Constructor, staticProps);
18    return Constructor;
19}
20function _define_property(obj, key, value) {
21    if (key in obj) {
22        Object.defineProperty(obj, key, {
23            value: value,
24            enumerable: true,
25            configurable: true,
26            writable: true
27        });
28    } else {
29        obj[key] = value;
30    }
31    return obj;
32}
33import $ from "jquery";
34import Swal from "sweetalert2";
35var API = /*#__PURE__*/ function() {
36    "use strict";
37    function API() {
38        _class_call_check(this, API);
39        _define_property(this, "url", void 0);
40        this.url = "/inventapi/v1";
41    }
42    _create_class(API, [
43        {
44            key: "apiPostCall",
45            value: function apiPostCall(endpoint) {
46                var payload = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", contentType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "application/json";
47                return $.post({
48                    headers: {
49                        "content-type": contentType
50                    },
51                    url: this.url + endpoint,
52                    data: payload
53                }).catch(function(err) {
54                    console.error(err);
55                    var code = btoa(JSON.stringify(err));
56                    Swal.fire({
57                        icon: "error",
58                        title: "Error",
59                        text: "No se ha podido cargar los datos. Error: " + err.statusText,
60                        footer: '<a href="/app/error?code=' + code + '" target="_blank">\xbfPor qu\xe9 tengo este problema?</a>'
61                    });
62                });
63            }
64        },
65        {
66            key: "buscarDiccionario",
67            value: function buscarDiccionario(datos) {
68                return this.apiPostCall("/diccionario", datos, "application/x-www-form-urlencoded");
69            }
70        },
71        {
72            key: "explorar",
73            value: function explorar() {
74                return this.apiPostCall("/explorar").then(function(res) {
75                    return JSON.parse(res);
76                });
77            }
78        },
79        {
80            key: "tarea",
81            value: function tarea(id) {
82                return this.apiPostCall("/tarea/" + id).then(function(res) {
83                    return JSON.parse(res);
84                });
85            }
86        },
87        {
88            key: "tareaPorDefecto",
89            value: function tareaPorDefecto() {
90                return this.apiPostCall("/tareaPorDefecto").then(function(res) {
91                    return JSON.parse(res);
92                });
93            }
94        },
95        {
96            key: "postTarea",
97            value: function postTarea(nombreTarea, descripcion, directorioId, porDefecto, datos, id) {
98                return this.apiPostCall("/usuario/tarea" + (id ? "/" + id : ""), JSON.stringify({
99                    nombre: nombreTarea,
100                    descripcion: descripcion,
101                    porDefecto: porDefecto,
102                    directorioId: directorioId,
103                    id: id,
104                    datos: datos
105                })).then(function(res) {
106                    return JSON.parse(res);
107                });
108            }
109        }
110    ], [
111        {
112            key: "getInstance",
113            value: function getInstance() {
114                return API.api;
115            }
116        },
117        {
118            key: "getTareaURL",
119            value: function getTareaURL(tareaId) {
120                return API.InventaPalabrasAppUrl + "?tarea=" + tareaId;
121            }
122        }
123    ]);
124    return API;
125}();
126_define_property(API, "api", new API());
127_define_property(API, "InventaPalabrasAppUrl", window["InventaPalabrasAppUrl"]);
128export { API as default };

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.