PageSourceSearch

https://www.cusquena.com/sites/g/files/seuoyk771/themes/site/pe_cusquena/js/messages.js?v=1.1.0

js cusquena.com collected 2026-09-26 10:04:29 UTC 1,998 bytes, 78 lines download raw bytes

1/**
2 * @file
3 * Global utilities.
4 *
5 */
6
7Drupal.tailwindcssMessages = Drupal.tailwindcssMessages || {};
8window.dataLayer = window.dataLayer || [];
9
10/**
11 * Push a dataLayer
12 * @param category
13 * @param action
14 * @param label
15 * @param callback
16 */
17function pushDatalayer(category, action, label, callback) {
18  dataLayer.push({
19    'event': 'trackEvent',
20    'eventCategory': category,
21    'eventAction': action,
22    'eventLabel': label,
23    'eventTimeout': 2000
24  });
25  if (callback) {
26    setTimeout(function () {
27      callback();
28    }, 300);
29  }
30}
31
32(function ($, Drupal) {
33  "use strict";
34
35  Drupal.tailwindcssMessages.showMessages = function () {
36    // check for messages
37    if (drupalSettings.ABMessages) {
38      if (drupalSettings.ABMessages.messages) {
39        var body = '';
40        if (drupalSettings.ABMessages.messages.items) {
41          for (var i in drupalSettings.ABMessages.messages.items) {
42            body = body + drupalSettings.ABMessages.messages.items[i].content + "<br>";
43          }
44          if (body) {
45            const modal = new tingle.modal({
46              footer: false,
47            });
48            modal.setContent(`<div class="b-status-messages-content">${body}</div>`);
49            // modal.addFooterBtn('Continuar', 'classes here', function () {
50            //   modal.close();
51            // });
52            modal.open();
53          }
54          delete drupalSettings.ABMessages.messages;
55        }
56      }
57    }
58  };
59
60  /**
61   * Process dataLayers
62   */
63  Drupal.tailwindcssMessages.processDataLayers = function () {
64    if (drupalSettings.ABDataLayers !== undefined && drupalSettings.ABDataLayers) {
65      drupalSettings.ABDataLayers.forEach(function (item) {
66        dataLayer.push(item);
67      });
68      delete drupalSettings.ABDataLayers;
69    }
70  };
71
72  Drupal.behaviors.tailwindcssMessages = {
73    attach: function () {
74      Drupal.tailwindcssMessages.showMessages();
75      Drupal.tailwindcssMessages.processDataLayers();
76    },
77  };
78})(jQuery, Drupal);

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.