PageSourceSearch

https://fred-inc.com/wp-content/themes/Divi/includes/builder/featu…/assets/js/jquery.mobile.js?ver=4.27.9

js fred-inc.com collected 2026-09-26 07:24:42 UTC 10,776 bytes, 372 lines download raw bytes

1/*!
2* jQuery Mobile 1.5.0-alpha.1
3* (c) 2010, 2017 jQuery Foundation, Inc.
4* jquery.org/license
5*
6* Modified to adapt the latest jQuery version (v3 above) included on WordPress 5.6:
7* - (2020-12-11) - Try to access `.concat` of undefined `$.event.props` - removed.
8* - (2021-02-04) - jQuery bind method is deprecated.
9* - (2021-02-04) - jQuery unbind method is deprecated.
10* - (2024-10-13) - Upgrade to 1.5.0-alpha.1
11* - (2024-10-20) - Remove code unrelated to swipe feature
12*/
13
14(function(e, t, n) {
15  typeof define == "function" && define.amd
16    ? define(["jquery"], function(r) {
17        return n(r, e, t), r.mobile;
18      })
19    : n(e.jQuery, e, t);
20})(this, document, function(e, t, n, r) {
21  (function(e, t, n, r) {
22    function T(e) {
23      while (e && typeof e.originalEvent != "undefined") e = e.originalEvent;
24      return e;
25    }
26
27    function N(t, n) {
28      var i = t.type,
29        s,
30        o,
31        a,
32        l,
33        c,
34        h,
35        p,
36        d,
37        v;
38      t = e.Event(t);
39      t.type = n;
40      s = t.originalEvent;
41      o = [];
42      i.search(/^(mouse|click)/) > -1 && (o = f);
43      if (s) for (p = o.length, l; p; ) (l = o[--p]), (t[l] = s[l]);
44      i.search(/mouse(down|up)|click/) > -1 && !t.which && (t.which = 1);
45      if (i.search(/^touch/) !== -1) {
46        a = T(s);
47        i = a.touches;
48        c = a.changedTouches;
49        h = i && i.length ? i[0] : c && c.length ? c[0] : r;
50        if (h) for (d = 0, v = u.length; d < v; d++) (l = u[d]), (t[l] = h[l]);
51      }
52      return t;
53    }
54
55    function P(t, n, r) {
56      var i;
57      if ((r && r[t]) || (!r && k(n.target, t)))
58        (i = N(n, t)), e(n.target).trigger(i);
59      return i;
60    }
61
62    function B(t) {
63      var n = T(t).touches,
64        r,
65        i,
66        o;
67      n && n.length === 1 &&
68        ((r = t.target),
69        (i = C(r)),
70        i.hasVirtualBinding &&
71          ((E = w++),
72          e.data(r, s, E),
73          D(),
74          M(),
75          (d = !1),
76          (o = T(t).touches[0]),
77          (h = o.pageX),
78          (p = o.pageY),
79          P("vmouseover", t, i),
80          P("vmousedown", t, i)));
81    }
82
83    function j(e) {
84      if (g) return;
85      d || P("vmousecancel", e, C(e.target));
86      d = !0;
87      _();
88    }
89
90    function F(t) {
91      if (g) return;
92      var n = T(t).touches[0],
93        r = d,
94        i = e.vmouse.moveDistanceThreshold,
95        s = C(t.target);
96      d =
97        d || Math.abs(n.pageX - h) > i || Math.abs(n.pageY - p) > i;
98      d && !r && P("vmousecancel", t, s);
99      P("vmousemove", t, s);
100      _();
101    }
102
103    function I(e) {
104      if (g) return;
105      A();
106      var t = C(e.target),
107        n,
108        r;
109      P("vmouseup", e, t);
110      d ||
111        ((n = P("vclick", e, t)),
112        n &&
113          n.isDefaultPrevented() &&
114          ((r = T(e).changedTouches[0]),
115          v.push({ touchID: E, x: r.clientX, y: r.clientY }),
116          (m = !0)));
117      P("vmouseout", e, t);
118      d = !1;
119      _();
120    }
121
122    function U(t) {
123      var n = t.substr(1);
124      return {
125        setup: function() {
126          q(this) || e.data(this, i, {});
127          var r = e.data(this, i);
128          r[t] = !0;
129          l[t] = (l[t] || 0) + 1;
130          l[t] === 1 && b.on(n, H);
131          e(this).on(n, R);
132          y &&
133            ((l.touchstart = (l.touchstart || 0) + 1),
134            l.touchstart === 1 &&
135              b
136                .on("touchstart", B)
137                .on("touchend", I)
138                .on("touchmove", F)
139                .on("scroll", j));
140        },
141        teardown: function() {
142          --l[t];
143          l[t] || b.off(n, H);
144          y &&
145            (--l.touchstart,
146            l.touchstart ||
147              b
148                .off("touchstart", B)
149                .off("touchmove", F)
150                .off("touchend", I)
151                .off("scroll", j));
152          var r = e(this),
153            s = e.data(this, i);
154          s && (s[t] = !1);
155          r.off(n, R);
156          q(this) || r.removeData(i);
157        }
158      };
159    }
160
161    var i = "virtualMouseBindings",
162      s = "virtualTouchID",
163      o = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(
164        " "
165      ),
166      u = "clientX clientY pageX pageY screenX screenY".split(" "),
167      a = e.event.mouseHooks ? e.event.mouseHooks.props : [],
168      f = [],
169      l = {},
170      c = 0,
171      h = 0,
172      p = 0,
173      d = !1,
174      v = [],
175      m = !1,
176      g = !1,
177      y = "addEventListener" in n,
178      b = e(n),
179      w = 1,
180      E = 0,
181      S,
182      x;
183    e.vmouse = {
184      moveDistanceThreshold: 10,
185      clickDistanceThreshold: 10,
186      resetTimerDuration: 1500
187    };
188    for (x = 0; x < o.length;
188 x++) e.event.special[o[x]] = U(o[x]);
189    y &&
190      n.addEventListener(
191        "click",
192        function(t) {
193          var n = v.length,
194            r = t.target,
195            i,
196            o,
197            u,
198            a,
199            f,
200            l;
201          if (n) {
202            i = t.clientX;
203            o = t.clientY;
204            S = e.vmouse.clickDistanceThreshold;
205            u = r;
206            while (u) {
207              for (a = 0; a < n; a++) {
208                f = v[a];
209                l = 0;
210                if (
211                  (u === r &&
212                    Math.abs(f.x - i) < S &&
213                    Math.abs(f.y - o) < S) ||
214                  e.data(u, s) === f.touchID
215                ) {
216                  t.preventDefault();
217                  t.stopPropagation();
218                  return;
219                }
220              }
221              u = u.parentNode;
222            }
223          }
224        },
225        !0
226      );
227  })(e, t, n),
228    function(e) {
229      e.mobile = {};
230    }(e),
231    function(e, t) {
232      var r = { touch: "ontouchend" in n };
233      e.mobile.support = e.mobile.support || {};
234      e.extend(e.support, r);
235      e.extend(e.mobile.support, r);
236    }(e),
237    function(e, t, r) {
238      function l(t, n, i, s) {
239        var o = i.type;
240        i.type = n;
241        s ? e.event.trigger(i, r, t) : e.event.dispatch.call(t, i);
242        i.type = o;
243      }
244      var i = e(n),
245        s = e.mobile.support.touch,
246        o = "touchmove scroll",
247        u = s ? "touchstart" : "mousedown",
248        a = s ? "touchend" : "mouseup",
249        f = s ? "touchmove" : "mousemove";
250      e.each(
251        "touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(
252          " "
253        ),
254        function(t, n) {
255          e.fn[n] = function(e) {
256            return e ? this.on(n, e) : this.trigger(n);
257          };
258          e.attrFn && (e.attrFn[n] = !0);
259        }
260      );
261      e.event.special.swipe = {
262        scrollSupressionThreshold: 30,
263        durationThreshold: 1e3,
264        horizontalDistanceThreshold: 30,
265        verticalDistanceThreshold: 30,
266        getLocation: function(e) {
267          var n = t.pageXOffset,
268            r = t.pageYOffset,
269            i = e.clientX,
270            s = e.clientY;
271          if (
272            (e.pageY === 0 && Math.floor(s) > Math.floor(e.pageY)) ||
273            (e.pageX === 0 && Math.floor(i) > Math.floor(e.pageX))
274          )
275            (i -= n), (s -= r);
276          else if (s < e.pageY - r || i < e.pageX - n)
277            (i = e.pageX - n), (s = e.pageY - r);
278          return { x: i, y: s };
279        },
280        start: function(t) {
281          var n = t.originalEvent.touches ? t.originalEvent.touches[0] : t,
282            r = e.event.special.swipe.getLocation(n);
283          return {
284            time: new Date().getTime(),
285            coords: [r.x, r.y],
286            origin: e(t.target)
287          };
288        },
289        stop: function(t) {
290          var n = t.originalEvent.touches ? t.originalEvent.touches[0] : t,
291            r = e.event.special.swipe.getLocation(n);
292          return { time: new Date().getTime(), coords: [r.x, r.y] };
293        },
294        handleSwipe: function(t, n, r, i) {
295          if (
296            n.time - t.time < e.event.special.swipe.durationThreshold &&
297            Math.abs(t.coords[0] - n.coords[0]) >
298              e.event.special.swipe.horizontalDistanceThreshold &&
299            Math.abs(t.coords[1] - n.coords[1]) <
300              e.event.special.swipe.verticalDistanceThreshold
301          ) {
302            var s = t.coords[0] > n.coords[0] ? "swipeleft" : "swiperight";
303            return (
304              l(r, "swipe", e.Event("swipe", { target: i, swipestart: t, swipestop: n }), !0),
305              l(r, s, e.Event(s, { target: i, swipestart: t, swipestop: n }), !0),
306              !0
307            );
308          }
309          return !1;
310        },
311        eventInProgress: !1,
312        setup: function() {
313          var t,
314            n = this,
315            r = e(n),
316            s = {};
317          (t = e.data(this, "mobile-events")),
318            t || ((t = { length: 0 }), e.data(this, "mobile-events", t)),
319            t.length++,
320            (t.swipe = s),
321            (s.start = function(t) {
322              if (e.event.special.swipe.eventInProgress) return;
323              e.event.special.swipe.eventInProgress = !0;
324              var r,
325                o = e.event.special.swipe.start(t),
326                u = t.target,
327                l = !1;
328              (s.move = function(t) {
329                if (!o || t.isDefaultPrevented()) return;
330                (r = e.event.special.swipe.stop(t)),
331                  l ||
332                    (l = e.event.special.swipe.handleSwipe(o, r, n, u)),
333                    l && (e.event.special.swipe.eventInProgress = !1),
334                    Math.abs(o.coords[0] - r.coords[0]) >
335                      e.event.special.swipe.scrollSupressionThreshold &&
336                      t.preventDefault();
337              }),
338                (s.stop = function() {
339                  l = !0;
340                  e.event.special.swipe.eventInProgress = !1;
341                  i.off(f, s.move);
342                  s.move = null;
343                });
344              i.on(f, s.move).one(a, s.stop);
345            }),
346            r.on(u, s.start);
347        },
348        teardown: function() {
349          var t, n;
350          (t = e.data(this, "mobile-events")),
351            t && ((n = t.swipe), delete t.swipe, t.length--, t.length === 0 && e.removeData(this, "mobile-events")),
352            n &&
353              (n.start && e(this).off(u, n.start),
354              n.move && i.off(f, n.move),
355              n.stop && i.off(a, n.stop));
356        }
357      };
358      e.each(
359        { swipeleft: "swipe.left", swiperight: "swipe.right" },
360        function(t, n) {
361          e.event.special[t] = {
362            setup: function() {
363              e(this).on(n, e.noop);
364            },
365            teardown: function() {
366              e(this).off(n);
367            }
368          };
369        }
370      );
371    }(e, this);
372});

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.