PageSourceSearch

https://www.linforme.com/bucket/9c498bb8ad0829f81b1635357e7261da65225d21/js/smartTag.bundle.js

js linforme.com collected 2026-09-24 18:06:41 UTC 3,740 bytes, 111 lines download raw bytes

1/******/ (() => { // webpackBootstrap
2/******/ 	"use strict";
3var __webpack_exports__ = {};
4
5;// CONCATENATED MODULE: ./assets/js/shared/utils/load-script.js
6var loadedScript = [];
7
8var loadScript = function loadScript(src, callback) {
9  var async = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
10  var defer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
11  var id = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
12
13  if (loadedScript.indexOf(src) >= 0) {
14    var _script = document.querySelector("script[src~=\"".concat(src, "\"]"));
15
16    if (_script) {
17      callback(_script);
18      return;
19    }
20  }
21
22  var script = document.createElement('script');
23
24  if (id !== null) {
25    script.id = id;
26  }
27
28  script.async = async;
29  script.src = src;
30  script.defer = defer;
31
32  script.onload = function () {
33    loadedScript.push(src);
34
35    if (callback) {
36      callback(script);
37    }
38  };
39
40  var firstScriptTag = document.getElementsByTagName('script')[0];
41  firstScriptTag.parentNode.insertBefore(script, firstScriptTag);
42};
43
44
45;// CONCATENATED MODULE: ./assets/js/analytics/smart-tag/index.js
46 // Legacy code Parsely - to be removed in the future
47
48var siteId = window.linforme.env === 'prd' ? 'linforme.com' : 'sandbox.linforme.com';
49var parselyPath = "//cdn.parsely.com/keys/".concat(siteId, "/p.js");
50
51(function () {
52  window.PARSELY = window.PARSELY || {
53    autotrack: false,
54    onReady: function onReady() {
55      window.PARSELY.updateDefaults({
56        data: {
57          newsletter_subscriber: window.linforme.user !== null ? window.linforme.user.isNewsletterSubscribed : undefined,
58          is_subscriber: window.linforme.user !== null && (window.linforme.user.subscription === 'invoice.paid_purchasely' || window.linforme.user.subscription === 'invoice.paid'),
59          is_logged: window.linforme.user !== null || undefined,
60          subscription_type: window.linforme.user !== null && window.linforme.user.subscriptionType === 'Mensuel' ? 'Mensuel' : undefined
61        }
62      });
63      window.PARSELY.beacon.trackPageView();
64    }
65  };
66})();
67
68loadScript(parselyPath, function () {
69  if (window.location.pathname === '/abonnements/paiement/confirmation') {
70    window.PARSELY.conversions.trackSubscription();
71  }
72}, true, true);
73
74if (document.cookie.indexOf('isWebview') === -1) {
75  window.axeptioSettings = {
76    clientId: '633701d3eb3c0dd283fae827',
77    cookiesVersion: "l'inform\xE9-fr".concat(window.linforme.env === 'prd' ? '' : '_loc'),
78    googleConsentMode: {
79      "default": {
80        analytics_storage: 'denied',
81        ad_storage: 'granted',
82        ad_user_data: 'denied',
83        ad_personalization: 'denied',
84        wait_for_update: 500
85      }
86    }
87  };
88  loadScript('https://static.axept.io/sdk.js', function () {}, true, false);
89} else {
90  // On met recaptcha (sans cookie) manuellement pour les webviews, TODO le bouger dans un endroit plus approprié
91  loadScript('https://www.recaptcha.net/recaptcha/enterprise.js?render=6LfsRn0rAAAAABeYRbLc1CxCVl2hsdFVVjiJVw4t', function () {
92    if (typeof window.grecaptcha === 'undefined') {
93      window.grecaptcha = {};
94    }
95
96    window.grecaptcha.enterprise.ready = function (cb) {
97      if (typeof window.grecaptcha.enterprise.execute === 'undefined') {
98        // window.__grecaptcha_cfg is a global variable that stores reCAPTCHA's
99        // configuration. By default, any functions listed in its 'fns' property
100        // are automatically executed when reCAPTCHA loads.
101        var c = '___grecaptcha_cfg';
102        window[c] = window[c] || {};
103        (window[c].fns = window[c].fns || []).push(cb);
104      } else {
105        cb();
106      }
107    };
108  }, false);
109}
110/******/ })()
111;

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.