PageSourceSearch

https://www.jynarque.com/modules/custom/otsuka_facebook_api/assets/build/js/facebook-api.js

js jynarque.com collected 2026-10-08 00:24:52 UTC 4,765 bytes, 105 lines download raw bytes

vendor: 4,765 bytes, lines 1-105
1"use strict";
2
3function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
5function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
7function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
9function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
10
11function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12
13function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
15// (function ($, Drupal) {
16//   'use strict';
17
18//   Drupal.behaviors.otsukaFacebookSdkApi = {
19//     attach: function attach(context, drupalSettings) {
20//       if (context !== document) {
21//         return;
22//       }
23//     }
24//   };
25//   Drupal.otsukaFacebookSdkApi = {
26//     getID: function getID() {
27//       return Math.random().toString(16).slice(2);
28//     },
29//     getEventID: function getEventID(eventName, eventId) {
30//       return eventName + '_uid_' + eventId;
31//     },
32//     addEventToDataLayer: function addEventToDataLayer(eventName, eventId) {
33//       var eventObj = {
34//         event: 'fb_eventId',
35//         fb_eventId_value: this.getEventID(eventName, eventId)
36//       };
37//       DTM_DATA.push(eventObj);
38
39//       _satellite.track('fb_eventId');
40
41//       window.dataLayer.push(eventObj);
42//     },
43//     getOneTrustCookie: function getOneTrustCookie() {
44//       var _decodeURIComponent$s;
45
46//       var activeGroup = [];
47//       var cookieValues = ((_decodeURIComponent$s = decodeURIComponent(document.cookie).split("; ").find(function (row) {
48//         return row.startsWith("OptanonConsent=");
49//       })) === null || _decodeURIComponent$s === void 0 ? void 0 : _decodeURIComponent$s.replace("OptanonConsent=", "")) || false;
50
51//       if (cookieValues) {
52//         var _cookieValues$split$f;
53
54//         cookieValues = ((_cookieValues$split$f = cookieValues.split("&").find(function (row) {
55//           return row.startsWith("groups=");
56//         })) === null || _cookieValues$split$f === void 0 ? void 0 : _cookieValues$split$f.split("=")[1]) || '';
57//         activeGroup = cookieValues.split(",").map(function (item) {
58//           var _item$split = item.split(':'),
59//               _item$split2 = _slicedToArray(_item$split, 2),
60//               group = _item$split2[0],
61//               active = _item$split2[1];
62
63//           return parseInt(active) ? group : null;
64//         }).filter(function (item) {
65//           return !!item;
66//         });
67//       }
68
69//       return activeGroup;
70//     },
71//     validateFireEvent: function validateFireEvent() {
72//       if (!!drupalSettings.otsuka_facebook_api_onetrust_ag) {
73//         var requiredGroup = drupalSettings.otsuka_facebook_api_onetrust_ag.split(',');
74//         var activeGroups = this.getOneTrustCookie();
75//         return requiredGroup.every(function (item) {
76//           return activeGroups.includes(item);
77//         });
78//       }
79
80//       return true;
81//     },
82//     fireEvent: function fireEvent(eventType, eventName) {
83//       if (!this.validateFireEvent()) {
84//         return;
85//       }
86
87//       var currentEventId = this.getID();
88//       var arr = {
89//         "event": eventType,
90//         "eventName": eventName,
91//         "eventId": this.getEventID(eventName, currentEventId),
92//         "eventUri": window.location.href
93//       };
94//       $.ajax({
95//         url: '/otsuka_facebook_api/backend/event',
96//         type: 'POST',
97//         data: JSON.stringify(arr),
98//         contentType: 'application/json; charset=utf-8',
99//         dataType: 'json',
100//         async: false
101//       });
102//       this.addEventToDataLayer(eventName, currentEventId);
103//     }
104//   };
105// })(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.