Plugin Directory

Changeset 3348866


Ignore:
Timestamp:
08/23/2025 05:18:38 AM (6 months ago)
Author:
FolioVision
Message:

8.0.24: HLS and YouTube fixes

Location:
fv-player/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • fv-player/trunk/controller/frontend.php

    r3336706 r3348866  
    437437
    438438    if( $fv_fp->should_force_load_js() || $fv_fp->load_hlsjs ) {
    439       wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/freedom-video-player/hls.min.js', array('flowplayer'), '1.6.5', true );
    440     }
    441     $aConf['script_hls_js'] = flowplayer::get_plugin_url().'/freedom-video-player/hls.min.js?ver=1.6.5';
     439      wp_enqueue_script( 'flowplayer-hlsjs', flowplayer::get_plugin_url().'/freedom-video-player/hls.min.js', array('flowplayer'), '1.6.9', true );
     440    }
     441    $aConf['script_hls_js'] = flowplayer::get_plugin_url().'/freedom-video-player/hls.min.js?ver=1.6.9';
    442442
    443443    $dashjs_version = '3.2.2-mod';
  • fv-player/trunk/controller/s3-upload.php

    r3336706 r3348866  
    300300    if ( empty( $detected_mime_type ) ) {
    301301      wp_send_json( array( 'error' => 'File type not supported.' ) );
     302      exit;
     303    }
     304
     305    /**
     306     * Ensure video resolution is at least the minimal resolution
     307     */
     308    $video_width = 0;
     309    $video_height = 0;
     310
     311    global $fv_fp;
     312    $minimal_video_resolution = $fv_fp->_get_option( array( 'coconut', 'minimal_source_video_resolution' ) );
     313
     314    if ( $minimal_video_resolution && ! empty( $ThisFileInfo['video']['resolution_x'] ) && ! empty( $ThisFileInfo['video']['resolution_y'] ) ) {
     315
     316      // Convert resolution names like 720p to actual dimensions
     317      $resolution_map = array(
     318        '480p'  => array( 720,  480  ),
     319        '720p'  => array( 1280, 720  ),
     320        '1080p' => array( 1920, 1080 ),
     321        '1440p' => array( 2560, 1440 ),
     322        '4K'    => array( 3840, 2160 )
     323      );
     324
     325      if ( array_key_exists( $minimal_video_resolution, $resolution_map ) ) {
     326        $minimal_width  = $resolution_map[ $minimal_video_resolution ][0];
     327        $minimal_height = $resolution_map[ $minimal_video_resolution ][1];
     328      } else {
     329        $minimal_width  = 0;
     330        $minimal_height = 0;
     331      }
     332
     333      if ( $minimal_width && $minimal_height ) {
     334
     335        // For 4:3 aspect ratio
     336        $minimal_width_4_3 = $minimal_height * 4 / 3;
     337        $minimal_height_4_3 = $minimal_height;
     338
     339        // For 21:9 aspect ratio
     340        $minimal_width_21_9 = $minimal_width;
     341        $minimal_height_21_9 = $minimal_width * 9 / 21;
     342
     343        $video_width    = absint( $ThisFileInfo['video']['resolution_x'] );
     344        $video_height   = absint( $ThisFileInfo['video']['resolution_y'] );
     345
     346        // Check for vertical video
     347        // Alternatively we could parse degrees from $ThisFileInfo['video']['rotate'], but is that commonly used for vertical videos?
     348        if ( $video_width < $video_height ) {
     349          $video_width  = absint( $ThisFileInfo['video']['resolution_y'] );
     350          $video_height = absint( $ThisFileInfo['video']['resolution_x'] );
     351        }
     352
     353        if (
     354          $video_width >= $minimal_width && $video_height >= $minimal_height ||
     355          $video_width >= $minimal_width_4_3 && $video_height >= $minimal_height_4_3 ||
     356          $video_width >= $minimal_width_21_9 && $video_height >= $minimal_height_21_9
     357        ) {
     358          // Video dimensions are good for one of the aspect ratios
     359
     360        } else {
     361          wp_send_json( array( 'error' => 'The video resolution is too low. Please create a ' . $minimal_video_resolution . ' video.' ) );
     362          exit;
     363        }
     364
     365      }
    302366    }
    303367
     
    341405        'fileformat'  => isset( $ThisFileInfo['fileformat'] ) ? $ThisFileInfo['fileformat'] : 'unknown',
    342406        'mime_type'   => $detected_mime_type,
    343         'filesize'    => $file_size
     407        'filesize'    => $file_size,
     408        'resolution'  => $video_width . 'x' . $video_height,
    344409      )
    345410    ));
  • fv-player/trunk/freedom-video-player/fv-player-youtube.dev.js

    r3314575 r3348866  
    233233        this.m = void 0;
    234234        this.g = 1;
    235         this.v = this.l = 0;
     235        this.A = this.l = 0;
    236236        this.i = null
    237237    }
     
    247247    function B(a, b) {
    248248        a.i = {
    249             N: b,
    250             O: !0
     249            P: b,
     250            R: !0
    251251        };
    252         a.g = a.l || a.v
     252        a.g = a.l || a.A
    253253    }
    254254    y.prototype.return = function(a) {
     
    256256            return: a
    257257        };
    258         this.g = this.v
     258        this.g = this.A
    259259    }
    260260    ;
     
    319319            b = a.g.i;
    320320            a.g.i = null;
    321             if (b.O)
    322                 throw b.N;
     321            if (b.R)
     322                throw b.P;
    323323            return {
    324324                value: b.return,
     
    445445              , k = !1;
    446446            return {
    447                 resolve: h(this.I),
     447                resolve: h(this.K),
    448448                reject: h(this.l)
    449449            }
    450450        }
    451451        ;
    452         b.prototype.I = function(h) {
     452        b.prototype.K = function(h) {
    453453            if (h === this)
    454454                this.l(new TypeError("A Promise cannot resolve to itself"));
    455455            else if (h instanceof b)
    456                 this.K(h);
     456                this.M(h);
    457457            else {
    458458                a: switch (typeof h) {
     
    466466                    g = !1
    467467                }
    468                 g ? this.H(h) : this.m(h)
    469             }
    470         }
    471         ;
    472         b.prototype.H = function(h) {
     468                g ? this.J(h) : this.m(h)
     469            }
     470        }
     471        ;
     472        b.prototype.J = function(h) {
    473473            var g = void 0;
    474474            try {
     
    478478                return
    479479            }
    480             typeof g == "function" ? this.L(g, h) : this.m(h)
     480            typeof g == "function" ? this.N(g, h) : this.m(h)
    481481        }
    482482        ;
    483483        b.prototype.l = function(h) {
    484             this.v(2, h)
     484            this.A(2, h)
    485485        }
    486486        ;
    487487        b.prototype.m = function(h) {
    488             this.v(1, h)
    489         }
    490         ;
    491         b.prototype.v = function(h, g) {
     488            this.A(1, h)
     489        }
     490        ;
     491        b.prototype.A = function(h, g) {
    492492            if (this.h != 0)
    493493                throw Error("Cannot settle(" + h + ", " + g + "): Promise already settled in state" + this.h);
    494494            this.h = h;
    495495            this.i = g;
    496             this.h === 2 && this.J();
    497             this.R()
    498         }
    499         ;
    500         b.prototype.J = function() {
     496            this.h === 2 && this.L();
     497            this.C()
     498        }
     499        ;
     500        b.prototype.L = function() {
    501501            var h = this;
    502502            f(function() {
    503                 if (h.S()) {
     503                if (h.I()) {
    504504                    var g = q.console;
    505505                    typeof g !== "undefined" && g.error(h.i)
     
    508508        }
    509509        ;
    510         b.prototype.S = function() {
     510        b.prototype.I = function() {
    511511            if (this.o)
    512512                return !1;
     
    527527        }
    528528        ;
    529         b.prototype.R = function() {
     529        b.prototype.C = function() {
    530530            if (this.g != null) {
    531531                for (var h = 0; h < this.g.length; ++h)
     
    536536        ;
    537537        var e = new c;
    538         b.prototype.K = function(h) {
     538        b.prototype.M = function(h) {
    539539            var g = this.j();
    540             h.A(g.resolve, g.reject)
    541         }
    542         ;
    543         b.prototype.L = function(h, g) {
     540            h.B(g.resolve, g.reject)
     541        }
     542        ;
     543        b.prototype.N = function(h, g) {
    544544            var k = this.j();
    545545            try {
     
    566566            }
    567567            );
    568             this.A(k(h, l), k(g, m));
     568            this.B(k(h, l), k(g, m));
    569569            return u
    570570        }
     
    574574        }
    575575        ;
    576         b.prototype.A = function(h, g) {
     576        b.prototype.B = function(h, g) {
    577577            function k() {
    578578                switch (l.h) {
     
    603603            return new b(function(g, k) {
    604604                for (var l = x(h), m = l.next(); !m.done; m = l.next())
    605                     d(m.value).A(g, k)
     605                    d(m.value).B(g, k)
    606606            }
    607607            )
     
    624624                    w.push(void 0),
    625625                    A++,
    626                     d(k.value).A(u(w.length - 1), m),
     626                    d(k.value).B(u(w.length - 1), m),
    627627                    k = g.next();
    628628                while (!k.done)
     
    10201020        function c() {}
    10211021        c.prototype = b.prototype;
    1022         a.G = b.prototype;
     1022        a.H = b.prototype;
    10231023        a.prototype = new c;
    10241024        a.prototype.constructor = a;
    1025         a.X = function(d, f, e) {
     1025        a.Y = function(d, f, e) {
    10261026            for (var h = Array(arguments.length - 2), g = 2; g < arguments.length; g++)
    10271027                h[g - 2] = arguments[g];
     
    11601160    J.prototype.dispose = function() {
    11611161        this.i || (this.i = !0,
    1162         this.B())
     1162        this.D())
    11631163    }
    11641164    ;
     
    11731173    }
    11741174    ;
    1175     J.prototype.B = function() {
     1175    J.prototype.D = function() {
    11761176        if (this.j)
    11771177            for (; this.j.length; )
     
    12061206    var Sa = new K("about:invalid#zClosurez");
    12071207    function Ta(a) {
    1208         this.P = a
     1208        this.S = a
    12091209    }
    12101210    function L(a) {
     
    12201220      , Va = /^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;
    12211221    var Wa = {
    1222         W: 0,
    1223         U: 1,
    1224         V: 2,
     1222        X: 0,
     1223        V: 1,
     1224        W: 2,
    12251225        0: "FORMATTED_HTML_CONTENT",
    12261226        1: "EMBEDDED_INTERNAL_CONTENT",
     
    12471247                } else
    12481248                    M[O] = N[O];
    1249     M.G = N.prototype;
     1249    M.H = N.prototype;
    12501250    function Ya(a) {
    12511251        Ra.test(a) && (a.indexOf("&") != -1 && (a = a.replace(La, "&amp;")),
     
    13341334        this.g = [];
    13351335        this.h = {};
    1336         this.v = !!a
     1336        this.A = !!a
    13371337    }
    13381338    ta(T, J);
     
    13561356            (a = a.find(function(e) {
    13571357                return f[e + 1] == b && f[e + 2] == c
    1358             })) && d.C(a)
    1359         }
    1360     }
    1361     n.C = function(a) {
     1358            })) && d.F(a)
     1359        }
     1360    }
     1361    n.F = function(a) {
    13621362        var b = this.g[a];
    13631363        if (b) {
     
    13731373    }
    13741374    ;
    1375     n.F = function(a, b) {
     1375    n.G = function(a, b) {
    13761376        var c = this.h[a];
    13771377        if (c) {
     
    13791379            for (e = 1; e < f; e++)
    13801380                d[e - 1] = arguments[e];
    1381             if (this.v)
     1381            if (this.A)
    13821382                for (e = 0; e < c.length; e++)
    13831383                    f = c[e],
     
    13951395                    this.l.length > 0 && this.m == 0)
    13961396                        for (; c = this.l.pop(); )
    1397                             this.C(c)
     1397                            this.F(c)
    13981398                }
    13991399            }
     
    14111411        if (a) {
    14121412            var b = this.h[a];
    1413             b && (b.forEach(this.C, this),
     1413            b && (b.forEach(this.F, this),
    14141414            delete this.h[a])
    14151415        } else
     
    14181418    }
    14191419    ;
    1420     n.B = function() {
    1421         T.G.B.call(this);
     1420    n.D = function() {
     1421        T.H.D.call(this);
    14221422        this.clear();
    14231423        this.l.length = 0
     
    15161516    }
    15171517    function wb(a) {
    1518         U.F.apply(U, arguments)
     1518        U.G.apply(U, arguments)
    15191519    }
    15201520    ;function xb(a) {
     
    15261526    ;var W = window;
    15271527    function X(a, b) {
    1528         this.u = {};
     1528        this.v = {};
    15291529        this.playerInfo = {};
    15301530        this.videoTitle = "";
     
    15341534        this.l = [];
    15351535        this.j = null;
    1536         this.v = {};
     1536        this.C = {};
    15371537        this.options = null;
     1538        this.A = this.T.bind(this);
    15381539        if (!a)
    15391540            throw Error("YouTube player element ID required.");
     
    16591660                for (f = 0; f < e.length; ++f)
    16601661                    if (a = e[f],
    1661                     a instanceof Ta && a.P(c)) {
     1662                    a instanceof Ta && a.S(c)) {
    16621663                        e = new K(c);
    16631664                        break a
     
    16831684            b.src = c
    16841685    }
    1685     n.D = function() {
    1686         this.g && this.g.contentWindow ? this.sendMessage({
     1686    n.T = function() {
     1687        Hb(this) || clearInterval(this.h)
     1688    }
     1689    ;
     1690    function Hb(a) {
     1691        if (!a.g || !a.g.contentWindow)
     1692            return !1;
     1693        a.sendMessage({
    16871694            event: "listening"
    1688         }) : clearInterval(this.h)
    1689     }
    1690     ;
     1695        });
     1696        return !0
     1697    }
    16911698    function Cb(a) {
    1692         Hb(a, a.id, String(Y(a, "host")));
    1693         a.h = setInterval(a.D.bind(a), 250);
     1699        Ib(a, a.id, String(Y(a, "host")));
     1700        a.h = setInterval(a.A, 250);
    16941701        a.g && (a.o = function() {
    16951702            clearInterval(a.h);
    1696             a.h = setInterval(a.D.bind(a), 250)
     1703            a.h = setInterval(a.A, 250)
    16971704        }
    16981705        ,
    16991706        a.g.addEventListener("load", a.o))
    17001707    }
    1701     function Ib(a) {
     1708    function Jb(a) {
    17021709        var b = a.getBoundingClientRect();
    17031710        a = Math.max(0, Math.min(b.bottom, window.innerHeight || document.documentElement.clientHeight) - Math.max(b.top, 0)) * Math.max(0, Math.min(b.right, window.innerWidth || document.documentElement.clientWidth) - Math.max(b.left, 0));
     
    17061713    }
    17071714    function Eb(a, b) {
    1708         a.v[b] || (a.v[b] = !0,
     1715        a.C[b] || (a.C[b] = !0,
    17091716        Fb(a, "addEventListener", [b]))
    17101717    }
     
    17281735    ;
    17291736    function Gb(a) {
    1730         if (W.yt_embedsEnableIframeApiVideoIdValidation) {
    17311737            if ((a = String(Y(a, "videoId"))) && (a.length !== 11 || !a.match(/^[a-zA-Z0-9\-_]+$/)))
    17321738                throw Error("Invalid video id");
    17331739            return "/embed/" + a
    1734         }
    1735         return "/embed/" + String(Y(a, "videoId"))
    17361740    }
    17371741    function Bb(a, b) {
     
    17831787        a && a.length > 0 && (c.aorigins = Array.from(a).join(",")),
    17841788        window.document.referrer && (c.gporigin = window.document.referrer));
    1785         W.yt_embedsEnableAutoplayAndVisibilitySignals && b && (c.vf = Ib(b));
     1789        W.yt_embedsEnableAutoplayAndVisibilitySignals && b && (c.vf = Jb(b));
    17861790        return c
    17871791    }
    1788     function Jb(a, b) {
     1792    function Kb(a, b) {
    17891793        if (H(b)) {
    17901794            for (var c in b)
     
    17971801        }
    17981802    }
    1799     function Kb(a, b) {
     1803    function Lb(a, b) {
    18001804        b = x(b);
    18011805        for (var c = b.next(), d = {}; !c.done; d = {
    1802             s: void 0
     1806            u: void 0
    18031807        },
    18041808        c = b.next())
    1805             d.s = c.value,
    1806             a[d.s] || (d.s === "getCurrentTime" ? a[d.s] = function() {
     1809            d.u = c.value,
     1810            a[d.u] || (d.u === "getCurrentTime" ? a[d.u] = function() {
    18071811                var f = this.playerInfo.currentTime;
    18081812                if (this.playerInfo.playerState === 1) {
     
    18121816                return f
    18131817            }
    1814             : xb(d.s) ? a[d.s] = function(f) {
     1818            : xb(d.u) ? a[d.u] = function(f) {
    18151819                return function() {
    18161820                    this.playerInfo = {};
    1817                     this.u = {};
    1818                     Fb(this, f.s, arguments);
     1821                    this.v = {};
     1822                    Fb(this, f.u, arguments);
    18191823                    return this
    18201824                }
    1821             }(d) : yb(d.s) ? a[d.s] = function(f) {
     1825            }(d) : yb(d.u) ? a[d.u] = function(f) {
    18221826                return function() {
    1823                     var e = f.s
     1827                    var e = f.u
    18241828                      , h = 0;
    18251829                    e.search("get") === 0 ? h = 3 : e.search("is") === 0 && (h = 2);
    18261830                    return this.playerInfo[e.charAt(h).toLowerCase() + e.substring(h + 1)]
    18271831                }
    1828             }(d) : a[d.s] = function(f) {
     1832            }(d) : a[d.u] = function(f) {
    18291833                return function() {
    1830                     Fb(this, f.s, arguments);
     1834                    Fb(this, f.u, arguments);
    18311835                    return this
    18321836                }
     
    18481852    ;
    18491853    n.getOptions = function(a) {
    1850         return this.u.namespaces ? a ? this.u[a] ? this.u[a].options || [] : [] : this.u.namespaces || [] : []
     1854        return this.v.namespaces ? a ? this.v[a] ? this.v[a].options || [] : [] : this.v.namespaces || [] : []
    18511855    }
    18521856    ;
    18531857    n.getOption = function(a, b) {
    1854         if (this.u.namespaces && a && b && this.u[a])
    1855             return this.u[a][b]
     1858        if (this.v.namespaces && a && b && this.v[a])
     1859            return this.v[a][b]
    18561860    }
    18571861    ;
     
    18661870    }
    18671871    var Z = null
    1868       , Lb = null;
    1869     function Mb(a) {
     1872      , Mb = null;
     1873    function Nb(a) {
    18701874        if (a.tagName.toLowerCase() !== "iframe") {
    18711875            var b = vb(a, "videoid");
     
    18781882        }
    18791883    }
    1880     function Hb(a, b, c) {
     1884    function Ib(a, b, c) {
    18811885        Z || (Z = {},
    1882         Lb = new Set,
    1883         Nb.addEventListener("message", function(d) {
    1884             a: if (Lb.has(d.origin)) {
     1886        Mb = new Set,
     1887        Ob.addEventListener("message", function(d) {
     1888            a: if (Mb.has(d.origin)) {
    18851889                try {
    18861890                    var f = JSON.parse(d.data)
     
    18891893                }
    18901894                var e = Z[f.id];
    1891                 if (e && d.origin === e.M)
    1892                     switch (d = e.T,
     1895                if (e && d.origin === e.O)
     1896                    switch (d = e.U,
    18931897                    d.m = !0,
    18941898                    d.m && (va(d.l, d.sendMessage, d),
     
    19001904                        if (H(f))
    19011905                            for (var h in f)
    1902                                 f.hasOwnProperty(h) && (d.u[h] = f[h]);
     1906                                f.hasOwnProperty(h) && (d.v[h] = f[h]);
    19031907                        break;
    19041908                    case "infoDelivery":
    1905                         Jb(d, f);
     1909                        Kb(d, f);
    19061910                        break;
    19071911                    case "initialDelivery":
    19081912                        H(f) && (clearInterval(d.h),
    19091913                        d.playerInfo = {},
    1910                         d.u = {},
    1911                         Kb(d, f.apiInterface),
    1912                         Jb(d, f));
     1914                        d.v = {},
     1915                        Lb(d, f.apiInterface),
     1916                        Kb(d, f));
     1917                        break;
     1918                    case "alreadyInitialized":
     1919                        clearInterval(d.h);
     1920                        break;
     1921                    case "readyToListen":
     1922                        Hb(d);
    19131923                        break;
    19141924                    default:
     
    19171927                            data: f
    19181928                        },
    1919                         d.j.F(e, h),
     1929                        d.j.G(e, h),
    19201930                        wb("player." + e, h))
    19211931                    }
     
    19231933        }));
    19241934        Z[b] = {
    1925             T: a,
    1926             M: c
     1935            U: a,
     1936            O: c
    19271937        };
    1928         Lb.add(c)
    1929     }
    1930     var Nb = window;
     1938        Mb.add(c)
     1939    }
     1940    var Ob = window;
    19311941    I("FV_YT.PlayerState.UNSTARTED", -1);
    19321942    I("FV_YT.PlayerState.ENDED", 0);
     
    19611971        a = ya(b.getElementsByTagName("yt:player"));
    19621972        b = ya((b || document).querySelectorAll(".yt-player"));
    1963         va(xa(a, b), Mb)
     1973        va(xa(a, b), Nb)
    19641974    });
    19651975    typeof YTConfig !== "undefined" && YTConfig.parsetags && YTConfig.parsetags !== "onload" || ub();
    1966     // var Ob = G.onYTReady;
    1967     // Ob && Ob();
    1968     // var Pb = G.onYouTubeIframeAPIReady;
     1976    // var Pb = G.onYTReady;
    19691977    // Pb && Pb();
    1970     // var Qb = G.onYouTubePlayerAPIReady;
     1978    // var Qb = G.onYouTubeIframeAPIReady;
    19711979    // Qb && Qb();
     1980    // var Rb = G.onYouTubePlayerAPIReady;
     1981    // Rb && Rb();
    19721982}
    19731983).call(this);
     
    21912201      var wrapperTag = common.createElement("div");
    21922202      wrapperTag.className = 'fp-engine fvyoutube-engine';
     2203
     2204      /**
     2205       * FV Player loads YouTube as FV_YT to avoid conflicts with original YouTube Player API,
     2206       * that might be loaded by some other script.
     2207       *
     2208       * But we have seen scripts like Plausible Tracking, that use mutation observer to find out
     2209       * about new YouTube iframes and run new YT.Player() on them. When that happens our original
     2210       * events for the API instance stop working on iPhone!
     2211       *
     2212       * So we were going to use YT.get() on the load function below to get the API instance for
     2213       * the iframe. But I found that just adding the ID attribute to the iframe fixes the issue.
     2214       * Perhaps YouTube player API does not remove the old events if it sees the iframe has the
     2215       * ID attribute.
     2216       */
     2217      wrapperTag.id = 'fv-player-yt-wrapper-' + root.attr('id');
     2218
    21932219      common.prepend(common.find(".fp-player", root)[0], wrapperTag);
    21942220
    2195       //console.log('new YT preload');  //  probably shouldn't happen when used in lightbox
    2196 
    2197       // this is the event which lets the player load YouTube
    2198       jQuery(document).one('fv-player-yt-api-loaded', function() {
    2199 
    2200         // only one player can enter the loading phase
    2201         if ( ! window.fv_player_pro_yt_load && window.fv_player_pro_yt_loading ) {
    2202           return;
    2203         }
    2204 
    2205         window.fv_player_pro_yt_loading = true;
    2206 
    2207         api.youtube = new FV_YT.Player(
    2208           wrapperTag,
    2209           fv_player_pro_youtube_player_vars(video_id, root)
    2210         );
    2211 
    2212         jQuery('.fp-engine.fvyoutube-engine',root)[0].allowFullscreen = false;
    2213 
    2214         // splash needs to cover the iframe
    2215         var splash = jQuery('.fp-splash',root);
    2216         jQuery('.fp-ui',root).before( splash );
    2217         splash.css('pointer-events','none');
    2218 
    2219         jQuery('.fp-ui',root).before('<div class="fv-pf-yt-temp2"></div>');
    2220         if( flowplayer.support.iOS && flowplayer.support.iOS.version > 11 ) {
    2221           jQuery(root).addClass('is-ytios11');
    2222           jQuery(root).find('.fv-pf-yt-temp2').on('click', function(){
    2223             api.toggle();
    2224           });
    2225         }
    2226 
    2227         api.fv_yt_onReady = fv_player_pro_youtube_addRemovableEventListener(api.youtube,'onReady',fv_player_pro_youtube_onReady);
    2228         api.fv_yt_onStateChange = fv_player_pro_youtube_addRemovableEventListener(api.youtube,'onStateChange',fv_player_pro_youtube_onStateChange);
    2229         api.fv_yt_onError = fv_player_pro_youtube_addRemovableEventListener(api.youtube,'onError',fv_player_pro_youtube_onError);
    2230       });
    2231 
    2232       if ( !window.fv_player_pro_yt_load || is_lightbox ) {
    2233         window.fv_player_pro_yt_load = true;
    2234         jQuery(document).trigger('fv-player-yt-api-loaded');
    2235       }
     2221        //console.log('new YT preload');  //  probably shouldn't happen when used in lightbox
     2222
     2223        // this is the event which lets the player load YouTube
     2224        jQuery(document).one('fv-player-yt-api-loaded', function() {
     2225
     2226          // only one player can enter the loading phase
     2227          if( ( typeof(FV_YT) == "undefined" || typeof(FV_YT.Player) == "undefined" ) && window.fv_player_pro_yt_loading ) {
     2228            return;
     2229          }
     2230
     2231          window.fv_player_pro_yt_loading = true;
     2232
     2233          var intLoad = setInterval( function() {
     2234            // somehow the loading indicator disappears, so we put it back
     2235            api.loading = true;
     2236            root.addClass('is-loading');
     2237
     2238            if( typeof(FV_YT) == "undefined" || typeof(FV_YT.Player) == "undefined" ) {
     2239              return;
     2240            }
     2241
     2242            clearInterval(intLoad);
     2243
     2244            api.youtube = new FV_YT.Player(
     2245              wrapperTag,
     2246              fv_player_pro_youtube_player_vars(video_id, root)
     2247            );
     2248
     2249            jQuery('.fp-engine.fvyoutube-engine',root)[0].allowFullscreen = false;
     2250
     2251            // splash needs to cover the iframe
     2252            var splash = jQuery('.fp-splash',root);
     2253            jQuery('.fp-ui',root).before( splash );
     2254            splash.css('pointer-events','none');
     2255
     2256            jQuery('.fp-ui',root).before('<div class="fv-pf-yt-temp2"></div>');
     2257            if( flowplayer.support.iOS && flowplayer.support.iOS.version > 11 ) {
     2258              jQuery(root).addClass('is-ytios11');
     2259              jQuery(root).find('.fv-pf-yt-temp2').on('click', function(){
     2260                api.toggle();
     2261              });
     2262            }
     2263
     2264            api.fv_yt_onReady = fv_player_pro_youtube_addRemovableEventListener(api.youtube,'onReady',fv_player_pro_youtube_onReady);
     2265            api.fv_yt_onStateChange = fv_player_pro_youtube_addRemovableEventListener(api.youtube,'onStateChange',fv_player_pro_youtube_onStateChange);
     2266            api.fv_yt_onError = fv_player_pro_youtube_addRemovableEventListener(api.youtube,'onError',fv_player_pro_youtube_onError);
     2267
     2268          }, 50 );
     2269        });
     2270
     2271        if ( !window.fv_player_pro_yt_load || is_lightbox ) {
     2272          window.fv_player_pro_yt_load = true;
     2273          jQuery(document).trigger('fv-player-yt-api-loaded');
     2274        }
    22362275
    22372276    }
     
    27592798                  common.prepend(common.find(".fp-player", root)[0], wrapperTag);
    27602799
    2761                   youtube = new FV_YT.Player(
    2762                     wrapperTag,
    2763                     fv_player_pro_youtube_player_vars(video_id, root, {
    2764                       onReady: onReady,
    2765                       onStateChange: onStateChange,
    2766                       onError: onError,
    2767                       onApiChange: onApiChange,
    2768                     })
    2769                   );
    2770 
    2771                   var iframe = jQuery('.fp-engine.fvyoutube-engine',root);
    2772                   iframe[0].allowFullscreen = false;
    2773                   /* in Chrome it's possible to double click the video entery YouTube fullscreen that way. Cancelling the event won't help, so here is a pseudo-fix */
    2774                   iframe.on("webkitfullscreenchange", function() {
    2775                     if (document.webkitCancelFullScreen) {
    2776                       document.webkitCancelFullScreen();
     2800                  var intLoad = setInterval( function() {
     2801                    if( typeof(FV_YT) == "undefined" || typeof(FV_YT.Player) == "undefined" ) {
     2802                      //console.log('YT not awaken yet!');
     2803                      return;
    27772804                    }
    2778                     return false;
    2779                   });
     2805
     2806                    clearInterval(intLoad);
     2807
     2808                    /*var had_youtube_before =
     2809                      jQuery('presto-player[src*=\\.youtube\\.com], presto-player[src*=\\.youtu\\.be], presto-player[src*=\\.youtube-nocookie\\.com]').length ||
     2810                      jQuery('iframe[src*=\\.youtube\\.com], iframe[src*=\\.youtu\\.be], iframe[src*=\\.youtube-nocookie\\.com]').length;*/
     2811
     2812                    youtube = new FV_YT.Player(
     2813                      wrapperTag,
     2814                      fv_player_pro_youtube_player_vars(video_id, root, {
     2815                        onReady: onReady,
     2816                        onStateChange: onStateChange,
     2817                        onError: onError,
     2818                        onApiChange: onApiChange,
     2819                      })
     2820                    );
     2821
     2822                    /*if( had_youtube_before ) {
     2823                      //youtube.loadVideoById( video_id, 0, 'default' );
     2824
     2825                      setTimeout( function() {
     2826                        onReady();
     2827                      },1000);
     2828                    }
     2829
     2830                    console.log(youtube);*/
     2831
     2832                    var iframe = jQuery('.fp-engine.fvyoutube-engine',root);
     2833                    iframe[0].allowFullscreen = false;
     2834                    /* in Chrome it's possible to double click the video entery YouTube fullscreen that way. Cancelling the event won't help, so here is a pseudo-fix */
     2835                    iframe.on("webkitfullscreenchange", function() {
     2836                      if (document.webkitCancelFullScreen) {
     2837                        document.webkitCancelFullScreen();
     2838                      }
     2839                      return false;
     2840                    });
     2841                  }, 5 );
    27802842                }
    27812843
  • fv-player/trunk/freedom-video-player/fv-player-youtube.min.js

    r3314575 r3348866  
    1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FV_YT,YTConfig,fv_player_youtube_error,fv_player_pro_youtube_get_video_id,fv_player_pro_youtube_addRemovableEventListener,fv_player_pro_youtube_onReady,fv_player_pro_youtube_onStateChange,fv_player_pro_youtube_onError,fv_player_pro_youtube_is_mobile,fv_player_pro_youtube_is_old_android,fv_player_pro_youtube_player_vars,fv_player_pro_youtube_preload;fv_flowplayer_conf.youtube&&(window.FV_YT||(FV_YT={loading:0,loaded:0}),window.YTConfig||(YTConfig={host:"https://www.youtube.com"}),FV_YT.loading||(FV_YT.loading=1,(()=>{var t=[];FV_YT.ready=function(e){FV_YT.loaded?e():t.push(e)},window.onYTReady=function(){FV_YT.loaded=1;for(var e=0;e<t.length;e++)try{t[e]()}catch(e){}},FV_YT.setConfig=function(e){for(var t in e)e.hasOwnProperty(t)&&(YTConfig[t]=e[t])}})()),function(){function P(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var u="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){return e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value),e};var i=(e=>{e=["object"==("undefined"==typeof globalThis?"undefined":_typeof(globalThis))&&globalThis,e,"object"==("undefined"==typeof window?"undefined":_typeof(window))&&window,"object"==("undefined"==typeof self?"undefined":_typeof(self))&&self,"object"==("undefined"==typeof global?"undefined":_typeof(global))&&global];for(var t=0;t<e.length;++t){var r=e[t];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")})(this);function e(e,t){if(t)e:{var r=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var n=e[o];if(!(n in r))break e;r=r[n]}(t=t(o=r[e=e[e.length-1]]))!=o&&null!=t&&u(r,e,{configurable:!0,writable:!0,value:t})}}function Y(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}e("Symbol",function(e){function r(e,t){this.g=e,u(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;r.prototype.toString=function(){return this.g};var o="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",n=0;return function e(t){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new r(o+(t||"")+"_"+n++,t)}}),e("Symbol.iterator",function(e){if(!e){e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),r=0;r<t.length;r++){var o=i[t[r]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&u(o.prototype,e,{configurable:!0,writable:!0,value:function(){return Y(P(this))}})}}return e});var t,r="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)A=Object.setPrototypeOf;else{e:{var B={};try{B.__proto__={a:!0},t=B.a;break e}catch(e){}t=!1}A=t?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:P(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function o(){this.j=!1,this.h=null,this.m=void 0,this.g=1,this.v=this.l=0,this.i=null}function n(e){if(e.j)throw new TypeError("Generator is already running");e.j=!0}function a(e,t){e.i={N:t,O:!0},e.g=e.l||e.v}function s(e,t,r){return e.g=r,{value:t}}function L(e){this.g=new o,this.h=e}function f(t,e,r,o){try{var n=e.call(t.g.h,r);if(!(n instanceof Object))throw new TypeError("Iterator result "+n+" is not an object");if(!n.done)return t.g.j=!1,n;var i=n.value}catch(e){return t.g.h=null,a(t.g,e),c(t)}return t.g.h=null,o.call(t.g,i),c(t)}function c(t){for(;t.g.g;)try{var e=t.h(t.g);if(e)return t.g.j=!1,{value:e.value,done:!1}}catch(e){t.g.m=void 0,a(t.g,e)}if(t.g.j=!1,t.g.i){if(e=t.g.i,t.g.i=null,e.O)throw e.N;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function D(o){this.next=function(e){return n(o.g),e=o.g.h?f(o,o.g.h.next,e,o.g.o):(o.g.o(e),c(o))},this.throw=function(e){return n(o.g),e=o.g.h?f(o,o.g.h.throw,e,o.g.o):(a(o.g,e),c(o))},this.return=function(e){return e=e,n((t=o).g),(r=t.g.h)?f(t,"return"in r?r.return:function(e){return{value:e,done:!0}},e,t.g.return):(t.g.return(e),c(t));var t,r},this[Symbol.iterator]=function(){return this}}function M(t){function n(e){return t.next(e)}function i(e){return t.throw(e)}return new Promise(function(r,o){!function e(t){t.done?r(t.value):Promise.resolve(t.value).then(n,i).then(e,o)}(t.next())})}function d(e){return M(new D(new L(e)))}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}o.prototype.o=function(e){this.m=e},o.prototype.return=function(e){this.i={return:e},this.g=this.v},e("Promise",function(e){function a(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function t(){this.g=null}function s(t){return t instanceof a?t:new a(function(e){e(t)})}if(e)return e;t.prototype.h=function(e){var t;null==this.g&&(this.g=[],(t=this).i(function(){t.l()})),this.g.push(e)};var r=i.setTimeout,n=(t.prototype.i=function(e){r(e,0)},t.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(e){this.j(e)}}}this.g=null},t.prototype.j=function(e){this.i(function(){throw e})},a.prototype.j=function(){function e(t){return function(e){o||(o=!0,t.call(r,e))}}var r=this,o=!1;return{resolve:e(this.I),reject:e(this.l)}},a.prototype.I=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof a)this.K(e);else{switch(_typeof(e)){case"object":var t=null!=e;break;case"function":t=!0;break;default:t=!1}t?this.H(e):this.m(e)}},a.prototype.H=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.L(t,e):this.m(e)},a.prototype.l=function(e){this.v(2,e)},a.prototype.m=function(e){this.v(1,e)},a.prototype.v=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.J(),this.R()},a.prototype.J=function(){var t=this;r(function(){var e;t.S()&&void 0!==(e=i.console)&&e.error(t.i)},1)},a.prototype.S=function(){var e,t,r;return!this.o&&(e=i.CustomEvent,t=i.Event,void 0===(r=i.dispatchEvent)||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,r(e)))},a.prototype.R=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)n.h(this.g[e]);this.g=null}},new t);return a.prototype.K=function(e){var t=this.j();e.A(t.resolve,t.reject)},a.prototype.L=function(e,t){var r=this.j();try{e.call(t,r.resolve,r.reject)}catch(e){r.reject(e)}},a.prototype.then=function(e,t){function r(t,e){return"function"==typeof t?function(e){try{o(t(e))}catch(e){n(e)}}:e}var o,n,i=new a(function(e,t){o=e,n=t});return this.A(r(e,o),r(t,n)),i},a.prototype.catch=function(e){return this.then(void 0,e)},a.prototype.A=function(e,t){function r(){switch(o.h){case 1:e(o.i);break;case 2:t(o.i);break;default:throw Error("Unexpected state: "+o.h)}}var o=this;null==this.g?n.h(r):this.g.push(r),this.o=!0},a.resolve=s,a.reject=function(r){return new a(function(e,t){t(r)})},a.race=function(n){return new a(function(e,t){for(var r=l(n),o=r.next();!o.done;o=r.next())s(o.value).A(e,t)})},a.all=function(e){var t=l(e),i=t.next();return i.done?s([]):new a(function(r,e){var o=[],n=0;do{o.push(void 0),n++,s(i.value).A((t=>function(e){o[t]=e,0==--n&&r(o)})(o.length-1),e),i=t.next()}while(!i.done)})},a});var R="function"==typeof Object.assign?Object.assign:function(e,t){for(var r=1;r<arguments.length;r++){var o=arguments[r];if(o)for(var n in o)p(o,n)&&(e[n]=o[n])}return e},h=(e("Object.assign",function(e){return e||R}),e("Symbol.dispose",function(e){return e||Symbol("Symbol.dispose")}),e("WeakMap",function(o){function e(e){if(this.g=(s+=Math.random()+1).toString(),e){e=l(e);for(var t;!(t=e.next()).done;)this.set((t=t.value)[0],t[1])}}function r(){}function n(e){var t=_typeof(e);return"object"===t&&null!==e||"function"===t}function i(e){var t;p(e,a)||(t=new r,u(e,a,{value:t}))}function t(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof r?e:(Object.isExtensible(e)&&i(e),t(e))})}var a,s;return(()=>{if(o&&Object.seal)try{var e=Object.seal({}),t=Object.seal({}),r=new o([[e,2],[t,3]]);return 2==r.get(e)&&3==r.get(t)?(r.delete(e),r.set(t,4),!r.has(e)&&4==r.get(t)):void 0}catch(e){}})()?o:(a="$jscomp_hidden_"+Math.random(),t("freeze"),t("preventExtensions"),t("seal"),s=0,e.prototype.set=function(e,t){if(!n(e))throw Error("Invalid WeakMap key");if(i(e),p(e,a))return e[a][this.g]=t,this;throw Error("WeakMap key fail: "+e)},e.prototype.get=function(e){return n(e)&&p(e,a)?e[a][this.g]:void 0},e.prototype.has=function(e){return n(e)&&p(e,a)&&p(e[a],this.g)},e.prototype.delete=function(e){return!!(n(e)&&p(e,a)&&p(e[a],this.g))&&delete e[a][this.g]},e)}),e("Map",function(n){function r(){var e={};return e.previous=e.next=e.head=e}function e(e,t){var r=e[1];return Y(function(){if(r){for(;r.head!=e[1];)r=r.previous;for(;r.next!=r.head;)return r=r.next,{done:!1,value:t(r)};r=null}return{done:!0,value:void 0}})}function o(e,t){var r=t&&_typeof(t),o=("object"==r||"function"==r?i.has(t)?r=i.get(t):(r=""+ ++a,i.set(t,r)):r="p_"+t,e[0][r]);if(o&&p(e[0],r))for(e=0;e<o.length;e++){var n=o[e];if(t!=t&&n.key!=n.key||t===n.key)return{id:r,list:o,index:e,entry:n}}return{id:r,list:o,index:-1,entry:void 0}}function t(e){if(this[0]={},this[1]=r(),this.size=0,e){e=l(e);for(var t;!(t=e.next()).done;)this.set((t=t.value)[0],t[1])}}var i,a;return(()=>{if(n&&"function"==typeof n&&n.prototype.entries&&"function"==typeof Object.seal)try{var e,t,r=Object.seal({x:4}),o=new n(l([[r,"s"]]));return"s"!=o.get(r)||1!=o.size||o.get({x:4})||o.set({x:4},"t")!=o||2!=o.size?void 0:(t=(e=o.entries()).next()).done||t.value[0]!=r||"s"!=t.value[1]?void 0:!((t=e.next()).done||4!=t.value[0].x||"t"!=t.value[1]||!e.next().done)}catch(e){}})()?n:(i=new WeakMap,t.prototype.set=function(e,t){var r=o(this,e=0===e?0:e);return r.list||(r.list=this[0][r.id]=[]),r.entry?r.entry.value=t:(r.entry={next:this[1],previous:this[1].previous,head:this[1],key:e,value:t},r.list.push(r.entry),this[1].previous.next=r.entry,this[1].previous=r.entry,this.size++),this},t.prototype.delete=function(e){return!(!(e=o(this,e)).entry||!e.list||(e.list.splice(e.index,1),e.list.length||delete this[0][e.id],e.entry.previous.next=e.entry.next,e.entry.next.previous=e.entry.previous,e.entry.head=null,this.size--,0))},t.prototype.clear=function(){this[0]={},this[1]=this[1].previous=r(),this.size=0},t.prototype.has=function(e){return!!o(this,e).entry},t.prototype.get=function(e){return(e=o(this,e).entry)&&e.value},t.prototype.entries=function(){return e(this,function(e){return[e.key,e.value]})},t.prototype.keys=function(){return e(this,function(e){return e.key})},t.prototype.values=function(){return e(this,function(e){return e.value})},t.prototype.forEach=function(e,t){for(var r,o=this.entries();!(r=o.next()).done;)e.call(t,(r=r.value)[1],r[0],this)},t.prototype[Symbol.iterator]=t.prototype.entries,a=0,t)}),e("Set",function(n){function e(e){if(this.g=new Map,e){e=l(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return(()=>{if(n&&"function"==typeof n&&n.prototype.entries&&"function"==typeof Object.seal)try{var e,t,r=Object.seal({x:4}),o=new n(l([r]));return o.has(r)&&1==o.size&&o.add(r)==o&&1==o.size&&o.add({x:4})==o&&2==o.size?(t=(e=o.entries()).next()).done||t.value[0]!=r||t.value[1]!=r?void 0:!(t=e.next()).done&&t.value[0]!=r&&4==t.value[0].x&&t.value[1]==t.value[0]&&e.next().done:void 0}catch(e){}})()?n:(e.prototype.add=function(e){return this.g.set(e=0===e?0:e,e),this.size=this.g.size,this},e.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},e.prototype.clear=function(){this.g.clear(),this.size=0},e.prototype.has=function(e){return this.g.has(e)},e.prototype.entries=function(){return this.g.entries()},e.prototype.keys=e.prototype.values=function(){return this.g.values()},e.prototype[Symbol.iterator]=e.prototype.values,e.prototype.forEach=function(t,r){var o=this;this.g.forEach(function(e){return t.call(r,e,e,o)})},e)}),e("Array.prototype.find",function(e){return e||function(e,t){e:{for(var r=this,o=(r=r instanceof String?String(r):r).length,n=0;n<o;n++){var i=r[n];if(e.call(t,i,n,r)){e=i;break e}}e=void 0}return e}}),e("Array.from",function(e){return e||function(e,t,r){t=null!=t?t:function(e){return e};var o=[],n="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof n){e=n.call(e);for(var i=0;!(n=e.next()).done;)o.push(t.call(r,n.value,i++))}else for(n=e.length,i=0;i<n;i++)o.push(t.call(r,e[i],i));return o}}),this||self);function y(e){var t=_typeof(e);return"object"==t&&null!=e||"function"==t}function z(e){return Object.prototype.hasOwnProperty.call(e,v)&&e[v]||(e[v]=++U)}var v="closure_uid_"+(1e9*Math.random()>>>0),U=0;function g(e,t){e=e.split(".");for(var r,o=h;e.length&&(r=e.shift());)e.length||void 0===t?o=o[r]&&o[r]!==Object.prototype[r]?o[r]:o[r]={}:o[r]=t}var q=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var r=0;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},b=Array.prototype.forEach?function(e,t,r){Array.prototype.forEach.call(e,t,r)}:function(e,t,r){for(var o=e.length,n="string"==typeof e?e.split(""):e,i=0;i<o;i++)i in n&&t.call(r,n[i],i,e)};function W(e){var t=e.length;if(0<t){for(var r=Array(t),o=0;o<t;o++)r[o]=e[o];return r}return[]}function G(e,t){this.i=e,this.j=t,this.h=0,this.g=null}function $(){this.h=this.g=null}G.prototype.get=function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e},$.prototype.add=function(e,t){var r=H.get();r.set(e,t),this.h?this.h.next=r:this.g=r,this.h=r},$.prototype.remove=function(){var e=null;return this.g&&(e=this.g,this.g=this.g.next,this.g||(this.h=null),e.next=null),e};var H=new G(function(){return new J},function(e){return e.reset()});function J(){this.next=this.scope=this.g=null}J.prototype.set=function(e,t){this.g=e,this.scope=t,this.next=null};var Z,K=!(J.prototype.reset=function(){this.next=this.scope=this.g=null}),X=new $;function ee(e){var t;Z||(t=Promise.resolve(void 0),Z=function(){t.then(te)}),K||(Z(),K=!0),X.add(e,void 0)}function te(){for(var e;e=X.remove();){try{e.g.call(e.scope)}catch(e){(e=>{h.setTimeout(function(){throw e},0)})(e)}var t=H;t.j(e),t.h<100&&(t.h++,e.next=t.g,t.g=e)}K=!1}function m(){this.i=this.i,this.j=this.j}m.prototype.i=!1,m.prototype.dispose=function(){this.i||(this.i=!0,this.B())},m.prototype[Symbol.dispose]=function(){this.dispose()},m.prototype.addOnDisposeCallback=function(e,t){this.i?void 0!==t?e.call(t):e():(this.j||(this.j=[]),t&&(e=e.bind(t)),this.j.push(e))},m.prototype.B=function(){if(this.j)for(;this.j.length;)this.j.shift()()};var re=/&/g,oe=/</g,ne=/>/g,ie=/"/g,ae=/'/g,se=/\x00/g,ue=/[\x00&<>"']/;function _(e){this.g=e}_.prototype.toString=function(){return this.g};var le=new _("about:invalid#zClosurez");function fe(e){this.P=e}function w(t){return new fe(function(e){return e.substr(0,t.length+1).toLowerCase()===t+":"})}var ce=[w("data"),w("http"),w("https"),w("mailto"),w("ftp"),new fe(function(e){return/^[^:]*([/?#]|$)/.test(e)})],de=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i,pe={W:0,U:1,V:2,0:"FORMATTED_HTML_CONTENT",1:"EMBEDDED_INTERNAL_CONTENT",2:"EMBEDDED_TRUSTED_EXTERNAL_CONTENT"};function j(e,t){t=Error.call(this,e+" cannot be used with intent "+pe[t]),this.message=t.message,"stack"in t&&(this.stack=t.stack),this.type=e,this.name="TypeCannotBeUsedWithIframeIntentError"}var he,C,E=Error;if((j.prototype=r(E.prototype)).constructor=j,A)A(j,E);else for(var S in E)"prototype"!=S&&(Object.defineProperties?(he=Object.getOwnPropertyDescriptor(E,S))&&Object.defineProperty(j,S,he):j[S]=E[S]);function ye(e){return e=ue.test(e)&&-1!=(e=-1!=(e=-1!=(e=-1!=(e=-1!=(e=-1!=e.indexOf("&")?e.replace(re,"&amp;"):e).indexOf("<")?e.replace(oe,"&lt;"):e).indexOf(">")?e.replace(ne,"&gt;"):e).indexOf('"')?e.replace(ie,"&quot;"):e).indexOf("'")?e.replace(ae,"&#39;"):e).indexOf("\0")?e.replace(se,"&#0;"):e}j.G=E.prototype;e:{for(var ve=["CLOSURE_FLAGS"],ge=h,be=0;be<ve.length;be++)if(null==(ge=ge[ve[be]])){C=null;break e}C=ge}r=C&&C[610401301];function T(){var e=h.navigator;return(e=e&&e.userAgent)||""}var x,F,me=null!=r&&r,A=h.navigator;function _e(){return!!me&&!!x&&0<x.brands.length}function we(){if(_e()){var e=x.brands.find(function(e){return"Chromium"===e.brand});if(!e||!e.version)return NaN;e=e.version.split(".")}else{if(""===(e=(()=>{for(var e,t,r=T(),o=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),n=[];e=o.exec(r);)n.push([e[1],e[2],e[3]||void 0]);if(t={},n.forEach(function(e){t[e[0]]=e[1]}),r=function(e){return t[e.find(function(e){return e in t})]||""},_e())e:{if(me&&x)for(o=0;o<x.brands.length;o++)if((n=x.brands[o].brand)&&-1!=n.indexOf("Chromium")){o=!0;break e}o=!1}else o=(-1!=T().indexOf("Chrome")||-1!=T().indexOf("CriOS"))&&(_e()||-1==T().indexOf("Edge"))||-1!=T().indexOf("Silk");return o?r(["Chrome","CriOS","HeadlessChrome"]):""})()))return NaN;e=e.split(".")}return 0===e.length?NaN:Number(e[0])}function je(e,t){var r=t.parentNode;r&&r.replaceChild(e,t)}function k(e){m.call(this),this.o=1,this.l=[],this.m=0,this.g=[],this.h={},this.v=!!e}function Ce(){}x=A&&A.userAgentData||null,r=k,F=m,Ce.prototype=F.prototype,r.G=F.prototype,r.prototype=new Ce,(r.prototype.constructor=r).X=function(e,t,r){for(var o=Array(arguments.length-2),n=2;n<arguments.length;n++)o[n-2]=arguments[n];return F.prototype[t].apply(e,o)},(A=k.prototype).subscribe=function(e,t,r){var o=(o=this.h[e])||(this.h[e]=[]),n=this.o;return this.g[n]=e,this.g[n+1]=t,this.g[n+2]=r,this.o=n+3,o.push(n),n},A.C=function(e){var t,r,o=this.g[e];return o&&(t=this.h[o],0!=this.m?(this.l.push(e),this.g[e+1]=function(){}):(t&&0<=(r=q(t=t,r=e))&&Array.prototype.splice.call(t,r,1),delete this.g[e],delete this.g[e+1],delete this.g[e+2])),!!o},A.F=function(e,t){var r=this.h[e];if(r){for(var o=Array(arguments.length-1),n=arguments.length,i=1;i<n;i++)o[i-1]=arguments[i];if(this.v)for(i=0;i<r.length;i++)n=r[i],((e,t,r)=>{ee(function(){e.apply(t,r)})})(this.g[n+1],this.g[n+2],o);else{this.m++;try{for(i=0,n=r.length;i<n&&!this.i;i++){var a=r[i];this.g[a+1].apply(this.g[a+2],o)}}finally{if(this.m--,0<this.l.length&&0==this.m)for(;r=this.l.pop();)this.C(r)}}return 0!=i}return!1},A.clear=function(e){var t;e?(t=this.h[e])&&(t.forEach(this.C,this),delete this.h[e]):(this.g.length=0,this.h={})},A.B=function(){k.G.B.call(this),this.clear(),this.l.length=0};var Ee=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Se(e){e=(o=e.match(Ee))[1];var t=o[2],r=o[3],o=o[4],n="";return e&&(n+=e+":"),r&&(n+="//",t&&(n+=t+"@"),n+=r,o)&&(n+=":"+o),n}var Te=/#|$/,xe=["https://www.google.com"];function Fe(){var e=this;this.g=[],this.h=function(){Promise.all(e.g.map(function(e){document.requestStorageAccessFor(e)})).then(function(){window.removeEventListener("click",e.h)})}}function Ae(){var r=new Fe,t=void 0===(t=["https://www.youtube.com"])?xe:t;d(function(e){switch(e.g){case 1:return s(e,d(function(e){var t=e.return,r=119<=we();return t.call(e,r&&!!navigator.permissions&&!!navigator.permissions.query&&"requestStorageAccessFor"in document)}),2);case 2:if(e.m)return s(e,Promise.all(t.map(function(t){return d(function(e){if(1==e.g)return e.l=2,s(e,navigator.permissions.query({name:"top-level-storage-access",requestedOrigin:t}),4);2!=e.g?("prompt"===e.m.state&&r.g.push(t),e.g=0,e.l=0):(e.l=0,e.i=null,e.g=0)})})),4);e.g=3;break;case 4:0<r.g.length&&window.addEventListener("click",r.h);case 3:return e.return()}})}var O={},ke=[],I=new k,Oe={};function Ie(){for(var e=l(ke),t=e.next();!t.done;t=e.next())(t=t.value)()}function Ve(e,t){return"yt:"===e.tagName.toLowerCase().substring(0,3)?e.getAttribute(t):e.dataset?e.dataset[t]:e.getAttribute("data-"+t)}var V=window;function Qe(e,t){if(this.u={},this.playerInfo={},this.videoTitle="",this.i=this.g=null,this.h=0,this.m=!1,this.l=[],this.j=null,this.v={},this.options=null,!e)throw Error("YouTube player element ID required.");this.id=z(this),t=Object.assign({title:"video player",videoId:"",width:640,height:360},t||{});var r,o=document;if(e="string"==typeof e?o.getElementById(e):e){V.yt_embedsEnableRsaforFromIframeApi&&Ae(),o="iframe"===e.tagName.toLowerCase(),t.host||(t.host=o?Se(e.src):"https://www.youtube.com"),this.options=t||{},t=[this.options,window.YTConfig||{}];for(var n=0;n<t.length;n++)t[n].host&&(t[n].host=t[n].host.toString().replace("http://","https://"));if(o||(e=(V.yt_embedsEnableAutoplayAndVisibilitySignals?(Ye(this,t=document.createElement("iframe"),e),je(t,this.i=e),Be(this,t,Me(this,t))):(Ye(this,t=document.createElement("iframe"),e),Be(this,t,Me(this)),je(t,this.i=e)),t)),this.g=e,this.g.id||(this.g.id="widget"+z(this.g)),O[this.g.id]=this,window.postMessage){this.j=new k;var i,a,o=r=this,s=r.id,u=String(Q(r,"host"));for(i in N||(N={},ze=new Set,qe.addEventListener("message",function(e){e:if(ze.has(e.origin)){try{var t=JSON.parse(e.data)}catch(e){break e}var r=N[t.id];if(r&&e.origin===r.M)switch(e=r.T,e.m=!0,e.m&&(b(e.l,e.sendMessage,e),e.l.length=0),r=t.event,t=t.info,r){case"apiInfoDelivery":if(y(t))for(var o in t)t.hasOwnProperty(o)&&(e.u[o]=t[o]);break;case"infoDelivery":Re(e,t);break;case"initialDelivery":if(y(t)){clearInterval(e.h),e.playerInfo={},e.u={};{var n=e;var i=t.apiInterface;for(var a=(i=l(i)).next(),s={};!a.done;s={s:void 0},a=i.next())s.s=a.value,n[s.s]||("getCurrentTime"===s.s?n[s.s]=function(){var e,t=this.playerInfo.currentTime;return 1===this.playerInfo.playerState&&0<(e=(Date.now()/1e3-this.playerInfo.currentTimeLastUpdated_)*this.playerInfo.playbackRate)&&(t+=Math.min(e,1)),t}:(e=>(0===e.search("cue")||0===e.search("load"))&&"loadModule"!==e)(s.s)?n[s.s]=(e=>function(){return this.playerInfo={},this.u={},Pe(this,e.s,arguments),this})(s):(e=>0===e.search("get")||0===e.search("is"))(s.s)?n[s.s]=(r=>function(){var e=r.s,t=0;return 0===e.search("get")?t=3:0===e.search("is")&&(t=2),this.playerInfo[e.charAt(t).toLowerCase()+e.substring(t+1)]})(s):n[s.s]=(e=>function(){return Pe(this,e.s,arguments),this})(s))}Re(e,t)}break;default:e.j.i||(e.j.F(r,o={target:e,data:t}),function(){I.F.apply(I,arguments)}("player."+r,o))}}})),N[s]={T:o,M:u},ze.add(u),r.h=setInterval(r.D.bind(r),250),r.g&&(r.o=function(){clearInterval(r.h),r.h=setInterval(r.D.bind(r),250)},r.g.addEventListener("load",r.o)),e=Q(this,"events"))e.hasOwnProperty(i)&&this.addEventListener(i,e[i]);for(a in Oe)Oe.hasOwnProperty(a)&&Ne(this,a)}}}function Ne(e,t){var r;2===(t=t.split(".")).length&&(r=t[1],"player"===t[0])&&Le(e,r)}function Pe(e,t,r){r=r||[],t={event:"command",func:t,args:r=Array.prototype.slice.call(r)},e.m?e.sendMessage(t):e.l.push(t)}function Ye(e,t,r){for(var o=0,n=(r=r.attributes).length;o<n;o++){var i=r[o].value;null!=i&&""!==i&&"null"!==i&&t.setAttribute(r[o].name,i)}t.setAttribute("frameBorder","0"),t.setAttribute("allowfullscreen",""),t.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),t.setAttribute("referrerPolicy","strict-origin-when-cross-origin"),t.setAttribute("title","YouTube "+Q(e,"title")),(r=Q(e,"width"))&&t.setAttribute("width",r.toString()),(e=Q(e,"height"))&&t.setAttribute("height",e.toString())}function Be(e,t,r){e=""+Q(e,"host")+De(e)+"?";var o,n=[];for(o in r)!function e(t,r,o){if(Array.isArray(r))for(var n=0;n<r.length;n++)e(t,String(r[n]),o);else null!=r&&o.push(t+(""===r?"":"="+encodeURIComponent(String(r))))}(o,r[o],n);if(r=e+n.join("&"),V.yt_embedsEnableIframeSrcWithIntent){var i=void 0===i?ce:i;e:if(i=void 0===i?ce:i,r instanceof _)i=r;else{for(o=0;o<i.length;++o)if((e=i[o])instanceof fe&&e.P(r)){i=new _(r);break e}i=void 0}for(i=i||le,t.removeAttribute("srcdoc"),r="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-storage-access-by-user-activation".split(" "),t.setAttribute("sandbox",""),o=0;o<r.length;o++)t.sandbox.supports&&!t.sandbox.supports(r[o])||t.sandbox.add(r[o]);void 0!==(i=i instanceof _?i.g:de.test(i)?i:void 0)&&(t.src=i),t.sandbox.add("allow-presentation","allow-top-navigation")}else t.src=r}function Le(e,t){e.v[t]||(e.v[t]=!0,Pe(e,"addEventListener",[t]))}function De(e){if(V.yt_embedsEnableIframeApiVideoIdValidation){if(!(e=String(Q(e,"videoId")))||11===e.length&&e.match(/^[a-zA-Z0-9\-_]+$/))return"/embed/"+e;throw Error("Invalid video id")}return"/embed/"+String(Q(e,"videoId"))}function Me(e,t){var a=(a=Q(e,"playerVars"))?(e=>{var t,r={};for(t in e)r[t]=e[t];return r})(a):{},r=(window!==window.top&&document.referrer&&(a.widget_referrer=document.referrer.substring(0,256)),Q(e,"embedConfig"));if(r){if(y(r))try{r=JSON.stringify(r)}catch(e){console.error("Invalid embed config JSON",e)}a.embed_config=r}return a.enablejsapi=window.postMessage?1:0,window.location.host&&(a.origin=window.location.protocol+"//"+window.location.host),a.widgetid=e.id,window.location.href&&b(["debugjs","debugcss"],function(e){var t=window.location.href,r=t.search(Te);e:{for(var o=0,n=e.length;0<=(o=t.indexOf(e,o))&&o<r;){var i=t.charCodeAt(o-1);if((38==i||63==i)&&(!(i=t.charCodeAt(o+n))||61==i||38==i||35==i))break e;o+=n+1}o=-1}null!==(t=o<0?null:(((n=t.indexOf("&",o))<0||r<n)&&(n=r),o+=e.length+1,decodeURIComponent(t.slice(o,-1!==n?n:0).replace(/\+/g," "))))&&(a[e]=t)}),V.yt_embedsEnableIframeApiSendFullEmbedUrl&&(window.location.href&&(a.forigin=window.location.href),e=window.location.ancestorOrigins,a.aoriginsup=void 0===e?0:1,e&&0<e.length&&(a.aorigins=Array.from(e).join(",")),window.document.referrer)&&(a.gporigin=window.document.referrer),V.yt_embedsEnableAutoplayAndVisibilitySignals&&t&&(a.vf=(e=(r=t).getBoundingClientRect(),r=Math.max(0,Math.min(e.bottom,window.innerHeight||document.documentElement.clientHeight)-Math.max(e.top,0))*Math.max(0,Math.min(e.right,window.innerWidth||document.documentElement.clientWidth)-Math.max(e.left,0)),r=(e=e.height*e.width)?r/e:0,"hidden"===document.visibilityState||r<.5?1:r<.75?2:r<.85?3:r<.95?4:r<1?5:6)),a}function Re(e,t){if(y(t)){for(var r in t)t.hasOwnProperty(r)&&(e.playerInfo[r]=t[r]);e.playerInfo.hasOwnProperty("videoData")&&((t=e.playerInfo.videoData).hasOwnProperty("title")&&t.title?(t=t.title)!==e.videoTitle&&(e.videoTitle=t,e.g.setAttribute("title",t)):(e.videoTitle="",e.g.setAttribute("title","YouTube "+Q(e,"title"))))}}function Q(e,t){e=[e.options,window.YTConfig||{}];for(var r=0;r<e.length;r++){var o=e[r][t];if(void 0!==o)return o}return null}(A=Qe.prototype).setSize=function(e,t){return this.g.width=e.toString(),this.g.height=t.toString(),this},A.getIframe=function(){return this.g},A.addEventListener=function(e,t){var r="string"==typeof t?function(){window[t].apply(window,arguments)}:t;return r&&(this.j.subscribe(e,r),Le(this,e)),this},A.destroy=function(){this.g&&this.g.id&&(O[this.g.id]=null);var e=this.j;e&&"function"==typeof e.dispose&&e.dispose(),this.i?je(this.i,this.g):(e=this.g)&&e.parentNode&&e.parentNode.removeChild(e),N&&(N[this.id]=null),this.options=null,this.g&&this.o&&this.g.removeEventListener("load",this.o),this.i=this.g=null},A.D=function(){this.g&&this.g.contentWindow?this.sendMessage({event:"listening"}):clearInterval(this.h)},A.sendMessage=function(e){e.id=this.id,e.channel="widget",e=JSON.stringify(e);var t=Se(this.g.src||"").replace("http:","https:");if(this.g.contentWindow)try{this.g.contentWindow.postMessage(e,t)}catch(e){if(!e.name||"SyntaxError"!==e.name)throw e;e.message&&0<e.message.indexOf("target origin ''")||console&&console.warn&&console.warn(e)}else console&&console.warn&&console.warn("The YouTube player is not attached to the DOM. API calls should be made after the onReady event. See more: https://developers.google.com/youtube/iframe_api_reference#Events")},A.getVideoEmbedCode=function(){var e=""+Q(this,"host")+De(this),t=Number(Q(this,"width")),r=Number(Q(this,"height"));if(isNaN(t)||isNaN(r))throw Error("Invalid width or height property");var t=Math.floor(t),r=Math.floor(r),o=this.videoTitle;return'<iframe width="'+t+'" height="'+r+'" src="'+ye(e)+'" title="'+ye(null!=o?o:"YouTube video player")+'" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>'},A.getOptions=function(e){return this.u.namespaces?e?this.u[e]&&this.u[e].options||[]:this.u.namespaces||[]:[]},A.getOption=function(e,t){if(this.u.namespaces&&e&&t&&this.u[e])return this.u[e][t]};var N=null,ze=null;function Ue(e){var t;"iframe"!==e.tagName.toLowerCase()&&(t=Ve(e,"videoid"))&&new Qe(e,t={videoId:t,width:Ve(e,"width"),height:Ve(e,"height")})}var qe=window;g("FV_YT.PlayerState.UNSTARTED",-1),g("FV_YT.PlayerState.ENDED",0),g("FV_YT.PlayerState.PLAYING",1),g("FV_YT.PlayerState.PAUSED",2),g("FV_YT.PlayerState.BUFFERING",3),g("FV_YT.PlayerState.CUED",5),g("FV_YT.get",function(e){return O[e]}),g("FV_YT.scan",Ie),g("FV_YT.subscribe",function(e,t,r){for(var o in I.subscribe(e,t,r),Oe[e]=!0,O)O.hasOwnProperty(o)&&Ne(O[o],e)}),g("FV_YT.unsubscribe",function(e,t,r){var o,n,i;e=e,o=t,n=r,(e=(t=I).h[e])&&(i=t.g,e=e.find(function(e){return i[e+1]==o&&i[e+2]==n}))&&t.C(e)}),g("FV_YT.Player",Qe),ke.push(function(e){var t=e;e=W((t=t||document).getElementsByTagName("yt:player")),t=W((t||document).querySelectorAll(".yt-player")),b(function(){return Array.prototype.concat.apply([],arguments)}(e,t),Ue)}),void 0!==YTConfig&&YTConfig.parsetags&&"onload"!==YTConfig.parsetags||Ie()}.call(this)),"undefined"!=typeof flowplayer&&(fv_player_youtube_error=function(e){switch(e=parseInt(e)){case 2:return"Invalid parameter value.";case 5:return"HTML5 player error.";case 100:return"The video could not be found. It's either removed or private.";case 101:case 150:return"The video cannot be embedded.";default:return"Code: "+e}},fv_player_pro_youtube_get_video_id=function(e){var t;return((t=(t=e.match(/(?:\?|&)v=([a-zA-Z0-9_-]+)(?:\?|$|&)/))||e.match(/youtu.be\/([a-zA-Z0-9_-]+)(?:\?|$|&)/))||!!(t=e.match(/(?:embed|live|shorts)\/([a-zA-Z0-9_-]+)(?:\?|$|&)/)))&&t[1]},fv_player_pro_youtube_addRemovableEventListener=function(e,t,r){var o="youtubeCallbackFunction"+Math.random().toString(36).substr(2,7);return window[o]=r,e.addEventListener(t,o),function(){window[o]=function(){},void 0!==e.removeEventListener&&e.removeEventListener(t,o)}},fv_player_pro_youtube_onReady=function(e){var e=jQuery(e.target.getIframe()).closest(".flowplayer"),t=(e.removeClass("is-loading"),e.data("flowplayer"));t.loading=!1,t.trigger("yt-ready"),t.fv_yt_did_preload=!0,jQuery(document).trigger("fv-player-yt-api-loaded"),0==t.youtube.getDuration()&&(t.live=!0,jQuery(e).addClass("is-live"))},fv_player_pro_youtube_onStateChange=function(e){var t=jQuery(e.target.getIframe()).parents(".flowplayer");switch(e.data){case-1:jQuery(".fp-splash",t).css("pointer-events",""),t.addClass("is-loading");break;case FV_YT.PlayerState.PLAYING:t.data("flowplayer").load();break;case FV_YT.PlayerState.BUFFERING:t.addClass("is-loading")}},fv_player_pro_youtube_onError=function(e){var t=jQuery(e.target.getIframe()).parents(".flowplayer"),r=t.data("flowplayer"),o=(fv_player_log("FV Player Youtube onError for preloaded player",e),(0<r.video.index?r.conf.playlist[r.video.index]:r.conf.clip).sources[0].src);fv_player_track(r,!1,"Video "+(t.hasClass("is-cva")?"Ad ":"")+"error","YouTube video removed",o),setTimeout(function(){t.removeClass("is-splash"),r.loading=!1,t.removeClass("is-loading"),1<r.conf.clip.sources.length&&(r.youtube.destroy(),r.youtube=!1,jQuery(".fvyoutube-engine",t).remove(),jQuery(".fv-pf-yt-temp2",t).remove(),jQuery(t).removeClass("is-ytios11"),jQuery(".fp-ui",t).css("background-image",""),jQuery(".fp-ui",t).append('<div class="wpfp_custom_popup fp-notice-load" style="height: 100%"><div class="wpfp_custom_popup_content">'+fv_flowplayer_translations.video_loaded+"</div></div>"),jQuery(".fp-notice-load").one("click",function(){jQuery(".fp-notice-load",t).remove(),r.trigger("error",[r,{code:4,video:r.video,custom_error:fv_player_youtube_error(e.data)}])}))})},fv_player_pro_youtube_is_mobile=function(){return navigator.userAgent.match(/FBAN|FBAV|FB_IAB|FB4A|FBMD|FBBV|FBDV|FBSN|FBSV|FBSS|FBID|FBLC|FBOP|FBRV|FBSF|FBAN|FB4A|FBMD|FBAV|FBBV|FBDV|FBSN|FBSV|FBSS|FBID|FBLC|FBOP|FBRV|FBSF|FB_IAB/i)?(jQuery("body").addClass("is-fv-player-fb-app"),!0):!flowplayer.support.android&&(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.browser.safari)},fv_player_pro_youtube_is_old_android=function(){return flowplayer.support.android&&flowplayer.support.android.version<4.4},fv_player_pro_youtube_player_vars=function(e,t,r){e={videoId:e,width:t.width,height:t.height,playerVars:{autoplay:0,controls:!jQuery(t).hasClass("no-controlbar")&&fv_player_pro_youtube_is_old_android()?1:0,disablekb:1,enablejsapi:1,fs:0,html5:1,iv_load_policy:3,loop:0,modestbranding:1,origin:"https:"==document.location.protocol?"https://":"http://"+flowplayer.conf.hostname,playsinline:1,rel:0,showinfo:0,showsearch:0,start:0,t0:1,widget_referrer:window?window.location.href:null}};return fv_flowplayer_conf.youtube_cookies||(e.host="https://www.youtube-nocookie.com"),r&&(e.events=r),e},fv_player_pro_youtube_preload=function(e,t,r){var o,n,i=jQuery(e);!((t=t||i.data("flowplayer"))&&t.conf.item&&"video/youtube"==t.conf.item.sources[0].type||t&&t.conf.clip&&"video/youtube"==t.conf.clip.sources[0].type)||1==t.loading||t.youtube||t.video.index||(t.loading=!0,i.addClass("is-loading"),e=flowplayer.common,o=t.conf.item?fv_player_pro_youtube_get_video_id(t.conf.item.sources[0].src):fv_player_pro_youtube_get_video_id(t.conf.clip.sources[0].src),e.removeNode(e.findDirect("video",i)[0]||e.find(".fp-player > video",i)[0]),(n=e.createElement("div")).className="fp-engine fvyoutube-engine",e.prepend(e.find(".fp-player",i)[0],n),jQuery(document).one("fv-player-yt-api-loaded",function(){var e;!window.fv_player_pro_yt_load&&window.fv_player_pro_yt_loading||(window.fv_player_pro_yt_loading=!0,t.youtube=new FV_YT.Player(n,fv_player_pro_youtube_player_vars(o,i)),jQuery(".fp-engine.fvyoutube-engine",i)[0].allowFullscreen=!1,e=jQuery(".fp-splash",i),jQuery(".fp-ui",i).before(e),e.css("pointer-events","none"),jQuery(".fp-ui",i).before('<div class="fv-pf-yt-temp2"></div>'),flowplayer.support.iOS&&11<flowplayer.support.iOS.version&&(jQuery(i).addClass("is-ytios11"),jQuery(i).find(".fv-pf-yt-temp2").on("click",function(){t.toggle()})),t.fv_yt_onReady=fv_player_pro_youtube_addRemovableEventListener(t.youtube,"onReady",fv_player_pro_youtube_onReady),t.fv_yt_onStateChange=fv_player_pro_youtube_addRemovableEventListener(t.youtube,"onStateChange",fv_player_pro_youtube_onStateChange),t.fv_yt_onError=fv_player_pro_youtube_addRemovableEventListener(t.youtube,"onError",fv_player_pro_youtube_onError))}),window.fv_player_pro_yt_load&&!r)||(window.fv_player_pro_yt_load=!0,jQuery(document).trigger("fv-player-yt-api-loaded"))},(()=>{function t(a,s){function r(e){var t=e.getPlaybackQuality(),r={seekable:!0,src:e.getVideoUrl()};return r.duration=e.getDuration(),t&&void 0!==n[t]&&(r.width=n[t].width,r.height=n[t].height,r.quality=t,r.qualityLabel=i.qualityLabels[t],r.bitrate=n[t].bitrate),"function"==typeof e.getVideoData&&(t=e.getVideoData()).title&&(r.fv_title="YouTube: "+t.title+" ("+t.video_id+")",r.fv_title_clean=t.title),r}function u(e){fv_player_log("FV Player Youtube onError",e);var t=(0<a.video.index?a.conf.playlist[a.video.index]:a.conf.clip).sources[0].src;fv_player_track(a,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+"error","YouTube video removed",t),s.addClass("is-splash"),a.trigger("error",[a,{code:4,video:a.video,custom_message:"Error: "+fv_player_youtube_error(e.data)}]),1<a.conf.playlist.length&&0==a.conf.clip.sources.length&&setTimeout(function(){a.loading=!1,s.removeClass("is-loading"),a.paused=!1,s.removeClass("is-paused"),a.ready=!0,a.bind("load",function(){a.ready=!1}),setTimeout(function(){a.next()},5e3)})}function l(){a.one("ready progress",function(){var r,t,o,e,n;"fvyoutube"===a.engine.engineName&&-1<p.getOptions().indexOf("captions")&&(a.video.subtitles?p.unloadModule("captions"):(r=p.getOption("captions","track"),0==(t=p.getOption("captions","tracklist"))?p.loadModule("captions"):(p.setOption("captions","fontSize",1),e=(o=flowplayer.common).find(".fp-captions",s)[0],e=(e=o.find(".fp-subtitle",s)[0])||o.appendTo(o.createElement("div",{class:"fp-captions"}),o.find(".fp-player",s)[0]),Array.prototype.forEach.call(e.children,o.removeNode),e=s.find(".fp-cc")[0]||o.createElement("strong",{className:"fp-cc"},"CC"),n=s.find(".fp-subtitle-menu")[0]||o.createElement("div",{className:"fp-menu fp-subtitle-menu"},"<strong>Closed Captions</strong>"),o.find("a",n).forEach(o.removeNode),n.appendChild(o.createElement("a",{"data-yt-subtitle-index":-1},"No subtitles")),(t||[]).forEach(function(e,t){t=o.createElement("a",{"data-yt-subtitle-index":t},e.displayName);r&&r.languageCode&&r.languageCode==e.languageCode&&jQuery(t).addClass("fp-selected"),n.appendChild(t)}),o.find(".fp-ui",s)[0].appendChild(n),o.find(".fp-controls",s)[0].appendChild(e),s.find(".fp-cc").removeClass("fp-hidden"),jQuery(document).on("click",".fp-subtitle-menu a",function(e){e.preventDefault(),jQuery("a[data-yt-subtitle-index]").removeClass("fp-selected"),jQuery(this).addClass("fp-selected"),t[jQuery(this).data("yt-subtitle-index")]?(null==s.data("fv-player-youtube-nl")&&s.data("fv-player-youtube-nl",s.hasClass("is-youtube-nl")),s.removeClass("is-youtube-nl"),p.setOption("captions","track",{languageCode:t[jQuery(this).data("yt-subtitle-index")].languageCode})):(s.data("fv-player-youtube-nl")&&s.addClass("is-youtube-nl"),p.unloadModule("captions"))}))))})}function f(){0==p.getDuration()&&(a.live=!0,jQuery(s).addClass("is-live"));var e=jQuery.extend(d,r(p));if(!a.ready){a.autoplayed&&a.mute(!0,!0),p.playVideo();try{a.one("ready",function(){a.trigger("resume",[a])}),a.trigger("ready",[a,e])}catch(e){}}a.ready=!0,v&&jQuery(".fp-ui",s).hide(),(flowplayer.support.iOS.version<11||flowplayer.support.android.version<5)&&(s.find(".fp-speed").hide(),a.YTErrorTimeout=setTimeout(function(){a.error||-1!=p.getPlayerState()||a.trigger("error",[a,{code:4,video:a.video,custom_message:"Error: YouTube video not started"}])},1e3))}function c(e){switch(0==s.find(".fv-fp-no-picture.is-active").length&&jQuery(".fvyoutube-engine",s).show(),e.data){case-1:jQuery(".fp-splash",s).css("pointer-events",""),a.playing=!1,a.paused=!0,setTimeout(function(){-1==p.getPlayerState()&&(fv_player_log("This video did not start yet!"),s.removeClass("is-youtube-nl"),a.fv_yt_did_preload)&&(s.find(".fp-splash").remove(),s.removeClass("is-loading").addClass("is-ready"))},1e3);break;case FV_YT.PlayerState.BUFFERING:"function"==typeof p.getCurrentTime&&a.trigger("seek",[a,p.getCurrentTime()]);break;case FV_YT.PlayerState.CUED:s.removeClass("is-loading"),s.addClass("is-paused"),a.loading=!1,flowplayer.support.firstframe||(t=jQuery("[rel="+s.attr("id")+"] span").eq(a.video.index),jQuery(".fv-pf-yt-temp",s).css("background-image",t.css("background-image")),flowplayer.support.dataload||jQuery(".fp-ui",s).hide(),jQuery(".fv-pf-yt-temp",s).show(),jQuery(".fv-pf-yt-temp-play",s).show());break;case FV_YT.PlayerState.ENDED:a.playing=!1,clearInterval(y),y=!1,a.trigger("pause",[a]),a.trigger("finish",[a]),jQuery(".fvyoutube-engine",s).hide(),jQuery(".fv-pf-yt-temp2",s).show(),jQuery(".fp-ui",s).show();break;case FV_YT.PlayerState.PAUSED:a.autoplayed&&1===a.youtube_unmute_attempted?(a.youtube_unmute_attempted=2,fv_player_log("FV FP YouTube: Volume restore failed."),a.mute(!0,!0),p.playVideo(),jQuery("body").one("click",function(){a&&a.ready&&(fv_player_log("FV FP YouTube: Volume restore on click."),a.volume(a.volumeLevel))})):a.seeking?p.playVideo():(clearInterval(y),y=!1,a.trigger("pause",[a]));break;case FV_YT.PlayerState.PLAYING:var t;jQuery.extend(a.video,r(p)),f(),o(),v&&((t=jQuery(".fp-ui",s)).show(),jQuery(".fp-splash",s).css("pointer-events",""),!jQuery(s).hasClass("no-controlbar")&&fv_player_pro_youtube_is_old_android()||flowplayer.support.iOS&&flowplayer.support.iOS.version<10)&&t.hide(),a.seeking&&(a.seeking=!1,"function"==typeof p.getCurrentTime)&&a.trigger("seek",[a,p.getCurrentTime()]),a.paused&&a.trigger("resume",[a]),a.one("progress",function(){a.autoplayed&&!a.youtube_unmute_attempted&&p.isMuted()&&(fv_player_log("FV FP YouTube: Trying to restore volume to "+a.volumeLevel),a.volume(a.volumeLevel),a.youtube_unmute_attempted=1,setTimeout(function(){a.youtube_unmute_attempted=!1},500))}),window.fv_player_pro&&fv_player_pro.youtube_nl&&s.addClass("is-youtube-nl")}}function o(){var t=!1;function e(){var e;void 0!==p&&void 0!==p.getCurrentTime&&(e=p.getCurrentTime(),v&&(void 0!==a.seeking&&a.seeking&&t&&t<e&&a.trigger("seek",[a]),t=e),e=a.video.time=0<e?e:0,a.live&&(e-=g=0==g?e:g),a.trigger("progress",[a,e]),(e=p.getVideoLoadedFraction()*a.video.duration+.5)<a.video.duration&&!a.video.buffered?(a.video.buffer=e,a.trigger("buffer",[a,a.video.buffer])):a.video.buffered||(a.video.buffered=!0,a.video.buffer&&a.trigger("buffer",[a,a.video.buffer]),a.trigger("buffered",[a])))}y||(y=setTimeout(e,100),y=setInterval(e,250))}var d,p,n={small:{width:320,height:240,bitrate:64},medium:{width:640,height:360,bitrate:512},large:{width:854,height:480,bitrate:640},hd720:{width:1280,height:720,bitrate:2e3},hd1080:{width:1920,height:1080,bitrate:4e3}},i={bitrates:!1,defaultQuality:"default",activeClass:"active",qualityLabels:{medium:"medium",large:"large",hd720:"hd"}},h=flowplayer.common,y=!1,v=fv_player_pro_youtube_is_mobile(),s=jQuery(s),g=0,e={engineName:t.engineName,load:function(e){g=0;var t,r,o,n,i,e=fv_player_pro_youtube_get_video_id((d=e).src);e?(p?flowplayer.support.dataload||flowplayer.support.inlineVideo?p.loadVideoById(e,0,"default"):p.cueVideoById(e,0,"default"):a.youtube&&a.youtube.getIframe()?(p=a.youtube,a.fv_yt_onReady(),a.fv_yt_onStateChange(),a.fv_yt_onError(),p.addEventListener("onReady",f),p.addEventListener("onStateChange",c),p.addEventListener("onError",u),p.addEventListener("onApiChange",l),flowplayer.support.dataload||flowplayer.support.inlineVideo?p.loadVideoById(e,0,"default"):(p.cueVideoById(e,0,"default"),setTimeout(function(){f()},100))):(h.removeNode(h.findDirect("video",s)[0]||h.find(".fp-player > video",s)[0]),(t=h.createElement("div")).className="fp-engine fvyoutube-engine",h.prepend(h.find(".fp-player",s)[0],t),p=new FV_YT.Player(t,fv_player_pro_youtube_player_vars(e,s,{onReady:f,onStateChange:c,onError:u,onApiChange:l})),(t=jQuery(".fp-engine.fvyoutube-engine",s))[0].allowFullscreen=!1,t.on("webkitfullscreenchange",function(){return document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),!1})),r=flowplayer.support.fullscreen,o=window,a.fullscreen=function(e){var t=jQuery(s).find(".fp-player")[0];if(!a.disabled)return(e=void 0===e?!a.isFullscreen:e)&&(i=o.scrollY,n=o.scrollX),r?e?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){if("function"==typeof t[e])return t[e](Element.ALLOW_KEYBOARD_INPUT),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||t[e](),!1}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):a.trigger(e?"fullscreen":"fullscreen-exit",[a]),a},a.on("fullscreen-exit",function(){o.scrollTo(n,i)})):(s.find(".fp-ui").append('<div class="fp-message"><h2>'+fv_flowplayer_translations.invalid_youtube+"</h2></div>"),s.addClass("is-error").removeClass("is-loading"))},mute:function(e){void 0!==p&&(a.muted=!!e,e?p.mute():p.unMute(),a.trigger("mute",[a,e]))},pause:function(){clearInterval(a.YTErrorTimeout),p.pauseVideo()},pick:function(e){for(var t,r=0;r<e.length;r+=1)if((t=e[r]).src.match(/(youtube\.com|youtube-nocookie\.com|youtu\.be)/))return t.src.match(/\/shorts\//)&&(t.src=t.src.replace("/shorts/","/watch?v=")),t},resume:function(){a.finished,void 0!==p.playVideo&&p.playVideo()},seek:function(e){p.seekTo(e,!0),a.seeking=!0,d.currentTime=e,o()},speed:function(e){p.setPlaybackRate(parseFloat(e)),a.trigger("speed",[a,e])},stop:function(){p.stopVideo()},unload:function(){clearInterval(y),fv_player_pro_youtube_is_mobile()?(p.stopVideo(),a.one("load",function(e,t){"fvyoutube"!=t.engine.engineName&&(clearInterval(y),p.destroy(),a.youtube=!1,jQuery(".fvyoutube-engine",s).remove(),jQuery(".fv-pf-yt-temp2",s).remove(),jQuery(s).removeClass("is-ytios11"))})):(p.destroy(),jQuery(".fvyoutube-engine",s).remove(),clearInterval(y)),a.youtube_unmute_attempted=!1,flowplayer.support.firstframe||a.one("ready",function(e,t){t.stop()})},volume:function(e){"function"==typeof p.setVolume&&(0<e&&a.mute(!1),a.volumeLevel=e,p.setVolume(100*e),a.trigger("volume",[a,e]))}};return jQuery(document).on("afterClose.fb beforeLoad.fb",function(){p&&a.lightbox_visible&&!a.lightbox_visible()&&a.is_in_lightbox&&a.is_in_lightbox()&&(a.trigger("unload",[a]),p.destroy(),p=!1,a.youtube)&&(a.youtube=!1)}),e}t.engineName="fvyoutube",t.canPlay=function(e){return/video\/youtube/i.test(e)},flowplayer.engines.push(t),flowplayer(function(e,t){jQuery(t).hasClass("lightboxed")||fv_player_pro_youtube_is_mobile()&&setTimeout(function(){fv_player_pro_youtube_preload(t,e)})}),jQuery(document).ready(function(){fv_player_pro_youtube_is_mobile()&&(jQuery(document).on("afterShow.fb",function(){jQuery(".fancybox-slide--current .flowplayer").each(function(){fv_player_pro_youtube_preload(this,!1,!0)})}),jQuery(document).on("beforeClose.fb beforeLoad.fb",function(e,t,r){jQuery(".freedomplayer",r.$slide).each(function(){var e=jQuery(this).data("freedomplayer");e&&(e.trigger("unload",[e]),e.youtube)&&(e.youtube.destroy(),e.youtube=!1)})}))})})()),"undefined"!=typeof flowplayer&&flowplayer(function(e,t){e.on("ready beforeseek",function(){"fvyoutube"==e.engine.engineName?void 0!==e.youtube&&"function"==typeof e.youtube.getAvailablePlaybackRates&&(e.conf.backupSpeeds=e.conf.speeds,e.conf.speeds=e.youtube.getAvailablePlaybackRates()):(e.youtube&&(e.youtube.destroy(),e.youtube=!1,jQuery(".fp-ui",t).css("background-image",""),jQuery(".fvyoutube-engine",t).remove(),jQuery(".fv-pf-yt-temp2",t).remove(),jQuery(t).removeClass("is-ytios11")),void 0!==e.conf.backupSpeeds&&(e.conf.speeds=e.conf.backupSpeeds))}),void 0!==jQuery.fn.fitVids&&jQuery(t).addClass("fitvidsignore")});
     1function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FV_YT,YTConfig,fv_player_youtube_error,fv_player_pro_youtube_get_video_id,fv_player_pro_youtube_addRemovableEventListener,fv_player_pro_youtube_onReady,fv_player_pro_youtube_onStateChange,fv_player_pro_youtube_onError,fv_player_pro_youtube_is_mobile,fv_player_pro_youtube_is_old_android,fv_player_pro_youtube_player_vars,fv_player_pro_youtube_preload;fv_flowplayer_conf.youtube&&(window.FV_YT||(FV_YT={loading:0,loaded:0}),window.YTConfig||(YTConfig={host:"https://www.youtube.com"}),FV_YT.loading||(FV_YT.loading=1,(()=>{var t=[];FV_YT.ready=function(e){FV_YT.loaded?e():t.push(e)},window.onYTReady=function(){FV_YT.loaded=1;for(var e=0;e<t.length;e++)try{t[e]()}catch(e){}},FV_YT.setConfig=function(e){for(var t in e)e.hasOwnProperty(t)&&(YTConfig[t]=e[t])}})()),function(){function Y(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var u="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){return e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value),e};var i=(e=>{e=["object"==("undefined"==typeof globalThis?"undefined":_typeof(globalThis))&&globalThis,e,"object"==("undefined"==typeof window?"undefined":_typeof(window))&&window,"object"==("undefined"==typeof self?"undefined":_typeof(self))&&self,"object"==("undefined"==typeof global?"undefined":_typeof(global))&&global];for(var t=0;t<e.length;++t){var r=e[t];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")})(this);function e(e,t){if(t)e:{var r=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var n=e[o];if(!(n in r))break e;r=r[n]}(t=t(o=r[e=e[e.length-1]]))!=o&&null!=t&&u(r,e,{configurable:!0,writable:!0,value:t})}}function N(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}e("Symbol",function(e){function r(e,t){this.g=e,u(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;r.prototype.toString=function(){return this.g};var o="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",n=0;return function e(t){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new r(o+(t||"")+"_"+n++,t)}}),e("Symbol.iterator",function(e){if(!e){e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),r=0;r<t.length;r++){var o=i[t[r]];"function"==typeof o&&"function"!=typeof o.prototype[e]&&u(o.prototype,e,{configurable:!0,writable:!0,value:function(){return N(Y(this))}})}}return e});var t,r="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)A=Object.setPrototypeOf;else{e:{var B={};try{B.__proto__={a:!0},t=B.a;break e}catch(e){}t=!1}A=t?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:Y(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function o(){this.j=!1,this.h=null,this.m=void 0,this.g=1,this.A=this.l=0,this.i=null}function n(e){if(e.j)throw new TypeError("Generator is already running");e.j=!0}function a(e,t){e.i={P:t,R:!0},e.g=e.l||e.A}function s(e,t,r){return e.g=r,{value:t}}function L(e){this.g=new o,this.h=e}function f(t,e,r,o){try{var n=e.call(t.g.h,r);if(!(n instanceof Object))throw new TypeError("Iterator result "+n+" is not an object");if(!n.done)return t.g.j=!1,n;var i=n.value}catch(e){return t.g.h=null,a(t.g,e),c(t)}return t.g.h=null,o.call(t.g,i),c(t)}function c(t){for(;t.g.g;)try{var e=t.h(t.g);if(e)return t.g.j=!1,{value:e.value,done:!1}}catch(e){t.g.m=void 0,a(t.g,e)}if(t.g.j=!1,t.g.i){if(e=t.g.i,t.g.i=null,e.R)throw e.P;return{value:e.return,done:!0}}return{value:void 0,done:!0}}function D(o){this.next=function(e){return n(o.g),e=o.g.h?f(o,o.g.h.next,e,o.g.o):(o.g.o(e),c(o))},this.throw=function(e){return n(o.g),e=o.g.h?f(o,o.g.h.throw,e,o.g.o):(a(o.g,e),c(o))},this.return=function(e){return e=e,n((t=o).g),(r=t.g.h)?f(t,"return"in r?r.return:function(e){return{value:e,done:!0}},e,t.g.return):(t.g.return(e),c(t));var t,r},this[Symbol.iterator]=function(){return this}}function M(t){function n(e){return t.next(e)}function i(e){return t.throw(e)}return new Promise(function(r,o){!function e(t){t.done?r(t.value):Promise.resolve(t.value).then(n,i).then(e,o)}(t.next())})}function d(e){return M(new D(new L(e)))}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}o.prototype.o=function(e){this.m=e},o.prototype.return=function(e){this.i={return:e},this.g=this.A},e("Promise",function(e){function a(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function t(){this.g=null}function s(t){return t instanceof a?t:new a(function(e){e(t)})}if(e)return e;t.prototype.h=function(e){var t;null==this.g&&(this.g=[],(t=this).i(function(){t.l()})),this.g.push(e)};var r=i.setTimeout,n=(t.prototype.i=function(e){r(e,0)},t.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var r=e[t];e[t]=null;try{r()}catch(e){this.j(e)}}}this.g=null},t.prototype.j=function(e){this.i(function(){throw e})},a.prototype.j=function(){function e(t){return function(e){o||(o=!0,t.call(r,e))}}var r=this,o=!1;return{resolve:e(this.K),reject:e(this.l)}},a.prototype.K=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof a)this.M(e);else{switch(_typeof(e)){case"object":var t=null!=e;break;case"function":t=!0;break;default:t=!1}t?this.J(e):this.m(e)}},a.prototype.J=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.N(t,e):this.m(e)},a.prototype.l=function(e){this.A(2,e)},a.prototype.m=function(e){this.A(1,e)},a.prototype.A=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.L(),this.C()},a.prototype.L=function(){var t=this;r(function(){var e;t.I()&&void 0!==(e=i.console)&&e.error(t.i)},1)},a.prototype.I=function(){var e,t,r;return!this.o&&(e=i.CustomEvent,t=i.Event,void 0===(r=i.dispatchEvent)||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=i.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,r(e)))},a.prototype.C=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)n.h(this.g[e]);this.g=null}},new t);return a.prototype.M=function(e){var t=this.j();e.B(t.resolve,t.reject)},a.prototype.N=function(e,t){var r=this.j();try{e.call(t,r.resolve,r.reject)}catch(e){r.reject(e)}},a.prototype.then=function(e,t){function r(t,e){return"function"==typeof t?function(e){try{o(t(e))}catch(e){n(e)}}:e}var o,n,i=new a(function(e,t){o=e,n=t});return this.B(r(e,o),r(t,n)),i},a.prototype.catch=function(e){return this.then(void 0,e)},a.prototype.B=function(e,t){function r(){switch(o.h){case 1:e(o.i);break;case 2:t(o.i);break;default:throw Error("Unexpected state: "+o.h)}}var o=this;null==this.g?n.h(r):this.g.push(r),this.o=!0},a.resolve=s,a.reject=function(r){return new a(function(e,t){t(r)})},a.race=function(n){return new a(function(e,t){for(var r=l(n),o=r.next();!o.done;o=r.next())s(o.value).B(e,t)})},a.all=function(e){var t=l(e),i=t.next();return i.done?s([]):new a(function(r,e){var o=[],n=0;do{o.push(void 0),n++,s(i.value).B((t=>function(e){o[t]=e,0==--n&&r(o)})(o.length-1),e),i=t.next()}while(!i.done)})},a});var R="function"==typeof Object.assign?Object.assign:function(e,t){for(var r=1;r<arguments.length;r++){var o=arguments[r];if(o)for(var n in o)p(o,n)&&(e[n]=o[n])}return e},h=(e("Object.assign",function(e){return e||R}),e("Symbol.dispose",function(e){return e||Symbol("Symbol.dispose")}),e("WeakMap",function(o){function e(e){if(this.g=(s+=Math.random()+1).toString(),e){e=l(e);for(var t;!(t=e.next()).done;)this.set((t=t.value)[0],t[1])}}function r(){}function n(e){var t=_typeof(e);return"object"===t&&null!==e||"function"===t}function i(e){var t;p(e,a)||(t=new r,u(e,a,{value:t}))}function t(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof r?e:(Object.isExtensible(e)&&i(e),t(e))})}var a,s;return(()=>{if(o&&Object.seal)try{var e=Object.seal({}),t=Object.seal({}),r=new o([[e,2],[t,3]]);return 2==r.get(e)&&3==r.get(t)?(r.delete(e),r.set(t,4),!r.has(e)&&4==r.get(t)):void 0}catch(e){}})()?o:(a="$jscomp_hidden_"+Math.random(),t("freeze"),t("preventExtensions"),t("seal"),s=0,e.prototype.set=function(e,t){if(!n(e))throw Error("Invalid WeakMap key");if(i(e),p(e,a))return e[a][this.g]=t,this;throw Error("WeakMap key fail: "+e)},e.prototype.get=function(e){return n(e)&&p(e,a)?e[a][this.g]:void 0},e.prototype.has=function(e){return n(e)&&p(e,a)&&p(e[a],this.g)},e.prototype.delete=function(e){return!!(n(e)&&p(e,a)&&p(e[a],this.g))&&delete e[a][this.g]},e)}),e("Map",function(n){function r(){var e={};return e.previous=e.next=e.head=e}function e(e,t){var r=e[1];return N(function(){if(r){for(;r.head!=e[1];)r=r.previous;for(;r.next!=r.head;)return r=r.next,{done:!1,value:t(r)};r=null}return{done:!0,value:void 0}})}function o(e,t){var r=t&&_typeof(t),o=("object"==r||"function"==r?i.has(t)?r=i.get(t):(r=""+ ++a,i.set(t,r)):r="p_"+t,e[0][r]);if(o&&p(e[0],r))for(e=0;e<o.length;e++){var n=o[e];if(t!=t&&n.key!=n.key||t===n.key)return{id:r,list:o,index:e,entry:n}}return{id:r,list:o,index:-1,entry:void 0}}function t(e){if(this[0]={},this[1]=r(),this.size=0,e){e=l(e);for(var t;!(t=e.next()).done;)this.set((t=t.value)[0],t[1])}}var i,a;return(()=>{if(n&&"function"==typeof n&&n.prototype.entries&&"function"==typeof Object.seal)try{var e,t,r=Object.seal({x:4}),o=new n(l([[r,"s"]]));return"s"!=o.get(r)||1!=o.size||o.get({x:4})||o.set({x:4},"t")!=o||2!=o.size?void 0:(t=(e=o.entries()).next()).done||t.value[0]!=r||"s"!=t.value[1]?void 0:!((t=e.next()).done||4!=t.value[0].x||"t"!=t.value[1]||!e.next().done)}catch(e){}})()?n:(i=new WeakMap,t.prototype.set=function(e,t){var r=o(this,e=0===e?0:e);return r.list||(r.list=this[0][r.id]=[]),r.entry?r.entry.value=t:(r.entry={next:this[1],previous:this[1].previous,head:this[1],key:e,value:t},r.list.push(r.entry),this[1].previous.next=r.entry,this[1].previous=r.entry,this.size++),this},t.prototype.delete=function(e){return!(!(e=o(this,e)).entry||!e.list||(e.list.splice(e.index,1),e.list.length||delete this[0][e.id],e.entry.previous.next=e.entry.next,e.entry.next.previous=e.entry.previous,e.entry.head=null,this.size--,0))},t.prototype.clear=function(){this[0]={},this[1]=this[1].previous=r(),this.size=0},t.prototype.has=function(e){return!!o(this,e).entry},t.prototype.get=function(e){return(e=o(this,e).entry)&&e.value},t.prototype.entries=function(){return e(this,function(e){return[e.key,e.value]})},t.prototype.keys=function(){return e(this,function(e){return e.key})},t.prototype.values=function(){return e(this,function(e){return e.value})},t.prototype.forEach=function(e,t){for(var r,o=this.entries();!(r=o.next()).done;)e.call(t,(r=r.value)[1],r[0],this)},t.prototype[Symbol.iterator]=t.prototype.entries,a=0,t)}),e("Set",function(n){function e(e){if(this.g=new Map,e){e=l(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return(()=>{if(n&&"function"==typeof n&&n.prototype.entries&&"function"==typeof Object.seal)try{var e,t,r=Object.seal({x:4}),o=new n(l([r]));return o.has(r)&&1==o.size&&o.add(r)==o&&1==o.size&&o.add({x:4})==o&&2==o.size?(t=(e=o.entries()).next()).done||t.value[0]!=r||t.value[1]!=r?void 0:!(t=e.next()).done&&t.value[0]!=r&&4==t.value[0].x&&t.value[1]==t.value[0]&&e.next().done:void 0}catch(e){}})()?n:(e.prototype.add=function(e){return this.g.set(e=0===e?0:e,e),this.size=this.g.size,this},e.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},e.prototype.clear=function(){this.g.clear(),this.size=0},e.prototype.has=function(e){return this.g.has(e)},e.prototype.entries=function(){return this.g.entries()},e.prototype.keys=e.prototype.values=function(){return this.g.values()},e.prototype[Symbol.iterator]=e.prototype.values,e.prototype.forEach=function(t,r){var o=this;this.g.forEach(function(e){return t.call(r,e,e,o)})},e)}),e("Array.prototype.find",function(e){return e||function(e,t){e:{for(var r=this,o=(r=r instanceof String?String(r):r).length,n=0;n<o;n++){var i=r[n];if(e.call(t,i,n,r)){e=i;break e}}e=void 0}return e}}),e("Array.from",function(e){return e||function(e,t,r){t=null!=t?t:function(e){return e};var o=[],n="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof n){e=n.call(e);for(var i=0;!(n=e.next()).done;)o.push(t.call(r,n.value,i++))}else for(n=e.length,i=0;i<n;i++)o.push(t.call(r,e[i],i));return o}}),this||self);function y(e){var t=_typeof(e);return"object"==t&&null!=e||"function"==t}function z(e){return Object.prototype.hasOwnProperty.call(e,v)&&e[v]||(e[v]=++U)}var v="closure_uid_"+(1e9*Math.random()>>>0),U=0;function g(e,t){e=e.split(".");for(var r,o=h;e.length&&(r=e.shift());)e.length||void 0===t?o=o[r]&&o[r]!==Object.prototype[r]?o[r]:o[r]={}:o[r]=t}var q=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var r=0;r<e.length;r++)if(r in e&&e[r]===t)return r;return-1},b=Array.prototype.forEach?function(e,t,r){Array.prototype.forEach.call(e,t,r)}:function(e,t,r){for(var o=e.length,n="string"==typeof e?e.split(""):e,i=0;i<o;i++)i in n&&t.call(r,n[i],i,e)};function W(e){var t=e.length;if(0<t){for(var r=Array(t),o=0;o<t;o++)r[o]=e[o];return r}return[]}function G(e,t){this.i=e,this.j=t,this.h=0,this.g=null}function $(){this.h=this.g=null}G.prototype.get=function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e},$.prototype.add=function(e,t){var r=H.get();r.set(e,t),this.h?this.h.next=r:this.g=r,this.h=r},$.prototype.remove=function(){var e=null;return this.g&&(e=this.g,this.g=this.g.next,this.g||(this.h=null),e.next=null),e};var H=new G(function(){return new J},function(e){return e.reset()});function J(){this.next=this.scope=this.g=null}J.prototype.set=function(e,t){this.g=e,this.scope=t,this.next=null};var Z,K=!(J.prototype.reset=function(){this.next=this.scope=this.g=null}),X=new $;function ee(e){var t;Z||(t=Promise.resolve(void 0),Z=function(){t.then(te)}),K||(Z(),K=!0),X.add(e,void 0)}function te(){for(var e;e=X.remove();){try{e.g.call(e.scope)}catch(e){(e=>{h.setTimeout(function(){throw e},0)})(e)}var t=H;t.j(e),t.h<100&&(t.h++,e.next=t.g,t.g=e)}K=!1}function m(){this.i=this.i,this.j=this.j}m.prototype.i=!1,m.prototype.dispose=function(){this.i||(this.i=!0,this.D())},m.prototype[Symbol.dispose]=function(){this.dispose()},m.prototype.addOnDisposeCallback=function(e,t){this.i?void 0!==t?e.call(t):e():(this.j||(this.j=[]),t&&(e=e.bind(t)),this.j.push(e))},m.prototype.D=function(){if(this.j)for(;this.j.length;)this.j.shift()()};var re=/&/g,oe=/</g,ne=/>/g,ie=/"/g,ae=/'/g,se=/\x00/g,ue=/[\x00&<>"']/;function _(e){this.g=e}_.prototype.toString=function(){return this.g};var le=new _("about:invalid#zClosurez");function fe(e){this.S=e}function w(t){return new fe(function(e){return e.substr(0,t.length+1).toLowerCase()===t+":"})}var ce=[w("data"),w("http"),w("https"),w("mailto"),w("ftp"),new fe(function(e){return/^[^:]*([/?#]|$)/.test(e)})],de=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i,pe={X:0,V:1,W:2,0:"FORMATTED_HTML_CONTENT",1:"EMBEDDED_INTERNAL_CONTENT",2:"EMBEDDED_TRUSTED_EXTERNAL_CONTENT"};function j(e,t){t=Error.call(this,e+" cannot be used with intent "+pe[t]),this.message=t.message,"stack"in t&&(this.stack=t.stack),this.type=e,this.name="TypeCannotBeUsedWithIframeIntentError"}var he,C,E=Error;if((j.prototype=r(E.prototype)).constructor=j,A)A(j,E);else for(var T in E)"prototype"!=T&&(Object.defineProperties?(he=Object.getOwnPropertyDescriptor(E,T))&&Object.defineProperty(j,T,he):j[T]=E[T]);function ye(e){return e=ue.test(e)&&-1!=(e=-1!=(e=-1!=(e=-1!=(e=-1!=(e=-1!=e.indexOf("&")?e.replace(re,"&amp;"):e).indexOf("<")?e.replace(oe,"&lt;"):e).indexOf(">")?e.replace(ne,"&gt;"):e).indexOf('"')?e.replace(ie,"&quot;"):e).indexOf("'")?e.replace(ae,"&#39;"):e).indexOf("\0")?e.replace(se,"&#0;"):e}j.H=E.prototype;e:{for(var ve=["CLOSURE_FLAGS"],ge=h,be=0;be<ve.length;be++)if(null==(ge=ge[ve[be]])){C=null;break e}C=ge}r=C&&C[610401301];function S(){var e=h.navigator;return(e=e&&e.userAgent)||""}var x,F,me=null!=r&&r,A=h.navigator;function _e(){return!!me&&!!x&&0<x.brands.length}function we(){if(_e()){var e=x.brands.find(function(e){return"Chromium"===e.brand});if(!e||!e.version)return NaN;e=e.version.split(".")}else{if(""===(e=(()=>{for(var e,t,r=S(),o=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),n=[];e=o.exec(r);)n.push([e[1],e[2],e[3]||void 0]);if(t={},n.forEach(function(e){t[e[0]]=e[1]}),r=function(e){return t[e.find(function(e){return e in t})]||""},_e())e:{if(me&&x)for(o=0;o<x.brands.length;o++)if((n=x.brands[o].brand)&&-1!=n.indexOf("Chromium")){o=!0;break e}o=!1}else o=(-1!=S().indexOf("Chrome")||-1!=S().indexOf("CriOS"))&&(_e()||-1==S().indexOf("Edge"))||-1!=S().indexOf("Silk");return o?r(["Chrome","CriOS","HeadlessChrome"]):""})()))return NaN;e=e.split(".")}return 0===e.length?NaN:Number(e[0])}function je(e,t){var r=t.parentNode;r&&r.replaceChild(e,t)}function k(e){m.call(this),this.o=1,this.l=[],this.m=0,this.g=[],this.h={},this.A=!!e}function Ce(){}x=A&&A.userAgentData||null,r=k,F=m,Ce.prototype=F.prototype,r.H=F.prototype,r.prototype=new Ce,(r.prototype.constructor=r).Y=function(e,t,r){for(var o=Array(arguments.length-2),n=2;n<arguments.length;n++)o[n-2]=arguments[n];return F.prototype[t].apply(e,o)},(A=k.prototype).subscribe=function(e,t,r){var o=(o=this.h[e])||(this.h[e]=[]),n=this.o;return this.g[n]=e,this.g[n+1]=t,this.g[n+2]=r,this.o=n+3,o.push(n),n},A.F=function(e){var t,r,o=this.g[e];return o&&(t=this.h[o],0!=this.m?(this.l.push(e),this.g[e+1]=function(){}):(t&&0<=(r=q(t=t,r=e))&&Array.prototype.splice.call(t,r,1),delete this.g[e],delete this.g[e+1],delete this.g[e+2])),!!o},A.G=function(e,t){var r=this.h[e];if(r){for(var o=Array(arguments.length-1),n=arguments.length,i=1;i<n;i++)o[i-1]=arguments[i];if(this.A)for(i=0;i<r.length;i++)n=r[i],((e,t,r)=>{ee(function(){e.apply(t,r)})})(this.g[n+1],this.g[n+2],o);else{this.m++;try{for(i=0,n=r.length;i<n&&!this.i;i++){var a=r[i];this.g[a+1].apply(this.g[a+2],o)}}finally{if(this.m--,0<this.l.length&&0==this.m)for(;r=this.l.pop();)this.F(r)}}return 0!=i}return!1},A.clear=function(e){var t;e?(t=this.h[e])&&(t.forEach(this.F,this),delete this.h[e]):(this.g.length=0,this.h={})},A.D=function(){k.H.D.call(this),this.clear(),this.l.length=0};var Ee=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Te(e){e=(o=e.match(Ee))[1];var t=o[2],r=o[3],o=o[4],n="";return e&&(n+=e+":"),r&&(n+="//",t&&(n+=t+"@"),n+=r,o)&&(n+=":"+o),n}var Se=/#|$/,xe=["https://www.google.com"];function Fe(){var e=this;this.g=[],this.h=function(){Promise.all(e.g.map(function(e){document.requestStorageAccessFor(e)})).then(function(){window.removeEventListener("click",e.h)})}}function Ae(){var r=new Fe,t=void 0===(t=["https://www.youtube.com"])?xe:t;d(function(e){switch(e.g){case 1:return s(e,d(function(e){var t=e.return,r=119<=we();return t.call(e,r&&!!navigator.permissions&&!!navigator.permissions.query&&"requestStorageAccessFor"in document)}),2);case 2:if(e.m)return s(e,Promise.all(t.map(function(t){return d(function(e){if(1==e.g)return e.l=2,s(e,navigator.permissions.query({name:"top-level-storage-access",requestedOrigin:t}),4);2!=e.g?("prompt"===e.m.state&&r.g.push(t),e.g=0,e.l=0):(e.l=0,e.i=null,e.g=0)})})),4);e.g=3;break;case 4:0<r.g.length&&window.addEventListener("click",r.h);case 3:return e.return()}})}var O={},ke=[],V=new k,Oe={};function Ve(){for(var e=l(ke),t=e.next();!t.done;t=e.next())(t=t.value)()}function Ie(e,t){return"yt:"===e.tagName.toLowerCase().substring(0,3)?e.getAttribute(t):e.dataset?e.dataset[t]:e.getAttribute("data-"+t)}var I=window;function Qe(e,t){if(this.v={},this.playerInfo={},this.videoTitle="",this.i=this.g=null,this.h=0,this.m=!1,this.l=[],this.j=null,this.C={},this.options=null,this.A=this.T.bind(this),!e)throw Error("YouTube player element ID required.");this.id=z(this),t=Object.assign({title:"video player",videoId:"",width:640,height:360},t||{});var r,o=document;if(e="string"==typeof e?o.getElementById(e):e){I.yt_embedsEnableRsaforFromIframeApi&&Ae(),o="iframe"===e.tagName.toLowerCase(),t.host||(t.host=o?Te(e.src):"https://www.youtube.com"),this.options=t||{},t=[this.options,window.YTConfig||{}];for(var n=0;n<t.length;n++)t[n].host&&(t[n].host=t[n].host.toString().replace("http://","https://"));if(o||(e=(I.yt_embedsEnableAutoplayAndVisibilitySignals?(Ne(this,t=document.createElement("iframe"),e),je(t,this.i=e),Be(this,t,Re(this,t))):(Ne(this,t=document.createElement("iframe"),e),Be(this,t,Re(this)),je(t,this.i=e)),t)),this.g=e,this.g.id||(this.g.id="widget"+z(this.g)),O[this.g.id]=this,window.postMessage){this.j=new k;var i,a,o=r=this,s=r.id,u=String(Q(r,"host"));for(i in P||(P={},Ue=new Set,We.addEventListener("message",function(e){e:if(Ue.has(e.origin)){try{var t=JSON.parse(e.data)}catch(e){break e}var r=P[t.id];if(r&&e.origin===r.O)switch(e=r.U,e.m=!0,e.m&&(b(e.l,e.sendMessage,e),e.l.length=0),r=t.event,t=t.info,r){case"apiInfoDelivery":if(y(t))for(var o in t)t.hasOwnProperty(o)&&(e.v[o]=t[o]);break;case"infoDelivery":ze(e,t);break;case"initialDelivery":if(y(t)){clearInterval(e.h),e.playerInfo={},e.v={};{var n=e;var i=t.apiInterface;for(var a=(i=l(i)).next(),s={};!a.done;s={u:void 0},a=i.next())s.u=a.value,n[s.u]||("getCurrentTime"===s.u?n[s.u]=function(){var e,t=this.playerInfo.currentTime;return 1===this.playerInfo.playerState&&0<(e=(Date.now()/1e3-this.playerInfo.currentTimeLastUpdated_)*this.playerInfo.playbackRate)&&(t+=Math.min(e,1)),t}:(e=>(0===e.search("cue")||0===e.search("load"))&&"loadModule"!==e)(s.u)?n[s.u]=(e=>function(){return this.playerInfo={},this.v={},Ye(this,e.u,arguments),this})(s):(e=>0===e.search("get")||0===e.search("is"))(s.u)?n[s.u]=(r=>function(){var e=r.u,t=0;return 0===e.search("get")?t=3:0===e.search("is")&&(t=2),this.playerInfo[e.charAt(t).toLowerCase()+e.substring(t+1)]})(s):n[s.u]=(e=>function(){return Ye(this,e.u,arguments),this})(s))}ze(e,t)}break;case"alreadyInitialized":clearInterval(e.h);break;case"readyToListen":Le(e);break;default:e.j.i||(e.j.G(r,o={target:e,data:t}),function(){V.G.apply(V,arguments)}("player."+r,o))}}})),P[s]={U:o,O:u},Ue.add(u),r.h=setInterval(r.A,250),r.g&&(r.o=function(){clearInterval(r.h),r.h=setInterval(r.A,250)},r.g.addEventListener("load",r.o)),e=Q(this,"events"))e.hasOwnProperty(i)&&this.addEventListener(i,e[i]);for(a in Oe)Oe.hasOwnProperty(a)&&Pe(this,a)}}}function Pe(e,t){var r;2===(t=t.split(".")).length&&(r=t[1],"player"===t[0])&&De(e,r)}function Ye(e,t,r){r=r||[],t={event:"command",func:t,args:r=Array.prototype.slice.call(r)},e.m?e.sendMessage(t):e.l.push(t)}function Ne(e,t,r){for(var o=0,n=(r=r.attributes).length;o<n;o++){var i=r[o].value;null!=i&&""!==i&&"null"!==i&&t.setAttribute(r[o].name,i)}t.setAttribute("frameBorder","0"),t.setAttribute("allowfullscreen",""),t.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"),t.setAttribute("referrerPolicy","strict-origin-when-cross-origin"),t.setAttribute("title","YouTube "+Q(e,"title")),(r=Q(e,"width"))&&t.setAttribute("width",r.toString()),(e=Q(e,"height"))&&t.setAttribute("height",e.toString())}function Be(e,t,r){e=""+Q(e,"host")+Me(e)+"?";var o,n=[];for(o in r)!function e(t,r,o){if(Array.isArray(r))for(var n=0;n<r.length;n++)e(t,String(r[n]),o);else null!=r&&o.push(t+(""===r?"":"="+encodeURIComponent(String(r))))}(o,r[o],n);if(r=e+n.join("&"),I.yt_embedsEnableIframeSrcWithIntent){var i=void 0===i?ce:i;e:if(i=void 0===i?ce:i,r instanceof _)i=r;else{for(o=0;o<i.length;++o)if((e=i[o])instanceof fe&&e.S(r)){i=new _(r);break e}i=void 0}for(i=i||le,t.removeAttribute("srcdoc"),r="allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-storage-access-by-user-activation".split(" "),t.setAttribute("sandbox",""),o=0;o<r.length;o++)t.sandbox.supports&&!t.sandbox.supports(r[o])||t.sandbox.add(r[o]);void 0!==(i=i instanceof _?i.g:de.test(i)?i:void 0)&&(t.src=i),t.sandbox.add("allow-presentation","allow-top-navigation")}else t.src=r}function Le(e){return e.g&&e.g.contentWindow&&(e.sendMessage({event:"listening"}),1)}function De(e,t){e.C[t]||(e.C[t]=!0,Ye(e,"addEventListener",[t]))}function Me(e){if(!(e=String(Q(e,"videoId")))||11===e.length&&e.match(/^[a-zA-Z0-9\-_]+$/))return"/embed/"+e;throw Error("Invalid video id")}function Re(e,t){var a=(a=Q(e,"playerVars"))?(e=>{var t,r={};for(t in e)r[t]=e[t];return r})(a):{},r=(window!==window.top&&document.referrer&&(a.widget_referrer=document.referrer.substring(0,256)),Q(e,"embedConfig"));if(r){if(y(r))try{r=JSON.stringify(r)}catch(e){console.error("Invalid embed config JSON",e)}a.embed_config=r}return a.enablejsapi=window.postMessage?1:0,window.location.host&&(a.origin=window.location.protocol+"//"+window.location.host),a.widgetid=e.id,window.location.href&&b(["debugjs","debugcss"],function(e){var t=window.location.href,r=t.search(Se);e:{for(var o=0,n=e.length;0<=(o=t.indexOf(e,o))&&o<r;){var i=t.charCodeAt(o-1);if((38==i||63==i)&&(!(i=t.charCodeAt(o+n))||61==i||38==i||35==i))break e;o+=n+1}o=-1}null!==(t=o<0?null:(((n=t.indexOf("&",o))<0||r<n)&&(n=r),o+=e.length+1,decodeURIComponent(t.slice(o,-1!==n?n:0).replace(/\+/g," "))))&&(a[e]=t)}),I.yt_embedsEnableIframeApiSendFullEmbedUrl&&(window.location.href&&(a.forigin=window.location.href),e=window.location.ancestorOrigins,a.aoriginsup=void 0===e?0:1,e&&0<e.length&&(a.aorigins=Array.from(e).join(",")),window.document.referrer)&&(a.gporigin=window.document.referrer),I.yt_embedsEnableAutoplayAndVisibilitySignals&&t&&(a.vf=(e=(r=t).getBoundingClientRect(),r=Math.max(0,Math.min(e.bottom,window.innerHeight||document.documentElement.clientHeight)-Math.max(e.top,0))*Math.max(0,Math.min(e.right,window.innerWidth||document.documentElement.clientWidth)-Math.max(e.left,0)),r=(e=e.height*e.width)?r/e:0,"hidden"===document.visibilityState||r<.5?1:r<.75?2:r<.85?3:r<.95?4:r<1?5:6)),a}function ze(e,t){if(y(t)){for(var r in t)t.hasOwnProperty(r)&&(e.playerInfo[r]=t[r]);e.playerInfo.hasOwnProperty("videoData")&&((t=e.playerInfo.videoData).hasOwnProperty("title")&&t.title?(t=t.title)!==e.videoTitle&&(e.videoTitle=t,e.g.setAttribute("title",t)):(e.videoTitle="",e.g.setAttribute("title","YouTube "+Q(e,"title"))))}}function Q(e,t){e=[e.options,window.YTConfig||{}];for(var r=0;r<e.length;r++){var o=e[r][t];if(void 0!==o)return o}return null}(A=Qe.prototype).setSize=function(e,t){return this.g.width=e.toString(),this.g.height=t.toString(),this},A.getIframe=function(){return this.g},A.addEventListener=function(e,t){var r="string"==typeof t?function(){window[t].apply(window,arguments)}:t;return r&&(this.j.subscribe(e,r),De(this,e)),this},A.destroy=function(){this.g&&this.g.id&&(O[this.g.id]=null);var e=this.j;e&&"function"==typeof e.dispose&&e.dispose(),this.i?je(this.i,this.g):(e=this.g)&&e.parentNode&&e.parentNode.removeChild(e),P&&(P[this.id]=null),this.options=null,this.g&&this.o&&this.g.removeEventListener("load",this.o),this.i=this.g=null},A.T=function(){Le(this)||clearInterval(this.h)},A.sendMessage=function(e){e.id=this.id,e.channel="widget",e=JSON.stringify(e);var t=Te(this.g.src||"").replace("http:","https:");if(this.g.contentWindow)try{this.g.contentWindow.postMessage(e,t)}catch(e){if(!e.name||"SyntaxError"!==e.name)throw e;e.message&&0<e.message.indexOf("target origin ''")||console&&console.warn&&console.warn(e)}else console&&console.warn&&console.warn("The YouTube player is not attached to the DOM. API calls should be made after the onReady event. See more: https://developers.google.com/youtube/iframe_api_reference#Events")},A.getVideoEmbedCode=function(){var e=""+Q(this,"host")+Me(this),t=Number(Q(this,"width")),r=Number(Q(this,"height"));if(isNaN(t)||isNaN(r))throw Error("Invalid width or height property");var t=Math.floor(t),r=Math.floor(r),o=this.videoTitle;return'<iframe width="'+t+'" height="'+r+'" src="'+ye(e)+'" title="'+ye(null!=o?o:"YouTube video player")+'" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>'},A.getOptions=function(e){return this.v.namespaces?e?this.v[e]&&this.v[e].options||[]:this.v.namespaces||[]:[]},A.getOption=function(e,t){if(this.v.namespaces&&e&&t&&this.v[e])return this.v[e][t]};var P=null,Ue=null;function qe(e){var t;"iframe"!==e.tagName.toLowerCase()&&(t=Ie(e,"videoid"))&&new Qe(e,t={videoId:t,width:Ie(e,"width"),height:Ie(e,"height")})}var We=window;g("FV_YT.PlayerState.UNSTARTED",-1),g("FV_YT.PlayerState.ENDED",0),g("FV_YT.PlayerState.PLAYING",1),g("FV_YT.PlayerState.PAUSED",2),g("FV_YT.PlayerState.BUFFERING",3),g("FV_YT.PlayerState.CUED",5),g("FV_YT.get",function(e){return O[e]}),g("FV_YT.scan",Ve),g("FV_YT.subscribe",function(e,t,r){for(var o in V.subscribe(e,t,r),Oe[e]=!0,O)O.hasOwnProperty(o)&&Pe(O[o],e)}),g("FV_YT.unsubscribe",function(e,t,r){var o,n,i;e=e,o=t,n=r,(e=(t=V).h[e])&&(i=t.g,e=e.find(function(e){return i[e+1]==o&&i[e+2]==n}))&&t.F(e)}),g("FV_YT.Player",Qe),ke.push(function(e){var t=e;e=W((t=t||document).getElementsByTagName("yt:player")),t=W((t||document).querySelectorAll(".yt-player")),b(function(){return Array.prototype.concat.apply([],arguments)}(e,t),qe)}),void 0!==YTConfig&&YTConfig.parsetags&&"onload"!==YTConfig.parsetags||Ve()}.call(this)),"undefined"!=typeof flowplayer&&(fv_player_youtube_error=function(e){switch(e=parseInt(e)){case 2:return"Invalid parameter value.";case 5:return"HTML5 player error.";case 100:return"The video could not be found. It's either removed or private.";case 101:case 150:return"The video cannot be embedded.";default:return"Code: "+e}},fv_player_pro_youtube_get_video_id=function(e){var t;return((t=(t=e.match(/(?:\?|&)v=([a-zA-Z0-9_-]+)(?:\?|$|&)/))||e.match(/youtu.be\/([a-zA-Z0-9_-]+)(?:\?|$|&)/))||!!(t=e.match(/(?:embed|live|shorts)\/([a-zA-Z0-9_-]+)(?:\?|$|&)/)))&&t[1]},fv_player_pro_youtube_addRemovableEventListener=function(e,t,r){var o="youtubeCallbackFunction"+Math.random().toString(36).substr(2,7);return window[o]=r,e.addEventListener(t,o),function(){window[o]=function(){},void 0!==e.removeEventListener&&e.removeEventListener(t,o)}},fv_player_pro_youtube_onReady=function(e){var e=jQuery(e.target.getIframe()).closest(".flowplayer"),t=(e.removeClass("is-loading"),e.data("flowplayer"));t.loading=!1,t.trigger("yt-ready"),t.fv_yt_did_preload=!0,jQuery(document).trigger("fv-player-yt-api-loaded"),0==t.youtube.getDuration()&&(t.live=!0,jQuery(e).addClass("is-live"))},fv_player_pro_youtube_onStateChange=function(e){var t=jQuery(e.target.getIframe()).parents(".flowplayer");switch(e.data){case-1:jQuery(".fp-splash",t).css("pointer-events",""),t.addClass("is-loading");break;case FV_YT.PlayerState.PLAYING:t.data("flowplayer").load();break;case FV_YT.PlayerState.BUFFERING:t.addClass("is-loading")}},fv_player_pro_youtube_onError=function(e){var t=jQuery(e.target.getIframe()).parents(".flowplayer"),r=t.data("flowplayer"),o=(fv_player_log("FV Player Youtube onError for preloaded player",e),(0<r.video.index?r.conf.playlist[r.video.index]:r.conf.clip).sources[0].src);fv_player_track(r,!1,"Video "+(t.hasClass("is-cva")?"Ad ":"")+"error","YouTube video removed",o),setTimeout(function(){t.removeClass("is-splash"),r.loading=!1,t.removeClass("is-loading"),1<r.conf.clip.sources.length&&(r.youtube.destroy(),r.youtube=!1,jQuery(".fvyoutube-engine",t).remove(),jQuery(".fv-pf-yt-temp2",t).remove(),jQuery(t).removeClass("is-ytios11"),jQuery(".fp-ui",t).css("background-image",""),jQuery(".fp-ui",t).append('<div class="wpfp_custom_popup fp-notice-load" style="height: 100%"><div class="wpfp_custom_popup_content">'+fv_flowplayer_translations.video_loaded+"</div></div>"),jQuery(".fp-notice-load").one("click",function(){jQuery(".fp-notice-load",t).remove(),r.trigger("error",[r,{code:4,video:r.video,custom_error:fv_player_youtube_error(e.data)}])}))})},fv_player_pro_youtube_is_mobile=function(){return navigator.userAgent.match(/FBAN|FBAV|FB_IAB|FB4A|FBMD|FBBV|FBDV|FBSN|FBSV|FBSS|FBID|FBLC|FBOP|FBRV|FBSF|FBAN|FB4A|FBMD|FBAV|FBBV|FBDV|FBSN|FBSV|FBSS|FBID|FBLC|FBOP|FBRV|FBSF|FB_IAB/i)?(jQuery("body").addClass("is-fv-player-fb-app"),!0):!flowplayer.support.android&&(!flowplayer.support.firstframe||flowplayer.support.iOS||flowplayer.support.browser.safari)},fv_player_pro_youtube_is_old_android=function(){return flowplayer.support.android&&flowplayer.support.android.version<4.4},fv_player_pro_youtube_player_vars=function(e,t,r){e={videoId:e,width:t.width,height:t.height,playerVars:{autoplay:0,controls:!jQuery(t).hasClass("no-controlbar")&&fv_player_pro_youtube_is_old_android()?1:0,disablekb:1,enablejsapi:1,fs:0,html5:1,iv_load_policy:3,loop:0,modestbranding:1,origin:"https:"==document.location.protocol?"https://":"http://"+flowplayer.conf.hostname,playsinline:1,rel:0,showinfo:0,showsearch:0,start:0,t0:1,widget_referrer:window?window.location.href:null}};return fv_flowplayer_conf.youtube_cookies||(e.host="https://www.youtube-nocookie.com"),r&&(e.events=r),e},fv_player_pro_youtube_preload=function(e,r,t){var o,n,i=jQuery(e);!((r=r||i.data("flowplayer"))&&r.conf.item&&"video/youtube"==r.conf.item.sources[0].type||r&&r.conf.clip&&"video/youtube"==r.conf.clip.sources[0].type)||1==r.loading||r.youtube||r.video.index||(r.loading=!0,i.addClass("is-loading"),e=flowplayer.common,o=r.conf.item?fv_player_pro_youtube_get_video_id(r.conf.item.sources[0].src):fv_player_pro_youtube_get_video_id(r.conf.clip.sources[0].src),e.removeNode(e.findDirect("video",i)[0]||e.find(".fp-player > video",i)[0]),(n=e.createElement("div")).className="fp-engine fvyoutube-engine",n.id="fv-player-yt-wrapper-"+i.attr("id"),e.prepend(e.find(".fp-player",i)[0],n),jQuery(document).one("fv-player-yt-api-loaded",function(){var t;(void 0===FV_YT||void 0===FV_YT.Player)&&window.fv_player_pro_yt_loading||(window.fv_player_pro_yt_loading=!0,t=setInterval(function(){var e;r.loading=!0,i.addClass("is-loading"),void 0!==FV_YT&&void 0!==FV_YT.Player&&(clearInterval(t),r.youtube=new FV_YT.Player(n,fv_player_pro_youtube_player_vars(o,i)),jQuery(".fp-engine.fvyoutube-engine",i)[0].allowFullscreen=!1,e=jQuery(".fp-splash",i),jQuery(".fp-ui",i).before(e),e.css("pointer-events","none"),jQuery(".fp-ui",i).before('<div class="fv-pf-yt-temp2"></div>'),flowplayer.support.iOS&&11<flowplayer.support.iOS.version&&(jQuery(i).addClass("is-ytios11"),jQuery(i).find(".fv-pf-yt-temp2").on("click",function(){r.toggle()})),r.fv_yt_onReady=fv_player_pro_youtube_addRemovableEventListener(r.youtube,"onReady",fv_player_pro_youtube_onReady),r.fv_yt_onStateChange=fv_player_pro_youtube_addRemovableEventListener(r.youtube,"onStateChange",fv_player_pro_youtube_onStateChange),r.fv_yt_onError=fv_player_pro_youtube_addRemovableEventListener(r.youtube,"onError",fv_player_pro_youtube_onError))},50))}),window.fv_player_pro_yt_load&&!t)||(window.fv_player_pro_yt_load=!0,jQuery(document).trigger("fv-player-yt-api-loaded"))},(()=>{function t(u,l){function r(e){var t=e.getPlaybackQuality(),r={seekable:!0,src:e.getVideoUrl()};return r.duration=e.getDuration(),t&&void 0!==n[t]&&(r.width=n[t].width,r.height=n[t].height,r.quality=t,r.qualityLabel=i.qualityLabels[t],r.bitrate=n[t].bitrate),"function"==typeof e.getVideoData&&(t=e.getVideoData()).title&&(r.fv_title="YouTube: "+t.title+" ("+t.video_id+")",r.fv_title_clean=t.title),r}function f(e){fv_player_log("FV Player Youtube onError",e);var t=(0<u.video.index?u.conf.playlist[u.video.index]:u.conf.clip).sources[0].src;fv_player_track(u,!1,"Video "+(l.hasClass("is-cva")?"Ad ":"")+"error","YouTube video removed",t),l.addClass("is-splash"),u.trigger("error",[u,{code:4,video:u.video,custom_message:"Error: "+fv_player_youtube_error(e.data)}]),1<u.conf.playlist.length&&0==u.conf.clip.sources.length&&setTimeout(function(){u.loading=!1,l.removeClass("is-loading"),u.paused=!1,l.removeClass("is-paused"),u.ready=!0,u.bind("load",function(){u.ready=!1}),setTimeout(function(){u.next()},5e3)})}function c(){u.one("ready progress",function(){var r,t,o,e,n;"fvyoutube"===u.engine.engineName&&-1<y.getOptions().indexOf("captions")&&(u.video.subtitles?y.unloadModule("captions"):(r=y.getOption("captions","track"),0==(t=y.getOption("captions","tracklist"))?y.loadModule("captions"):(y.setOption("captions","fontSize",1),e=(o=flowplayer.common).find(".fp-captions",l)[0],e=(e=o.find(".fp-subtitle",l)[0])||o.appendTo(o.createElement("div",{class:"fp-captions"}),o.find(".fp-player",l)[0]),Array.prototype.forEach.call(e.children,o.removeNode),e=l.find(".fp-cc")[0]||o.createElement("strong",{className:"fp-cc"},"CC"),n=l.find(".fp-subtitle-menu")[0]||o.createElement("div",{className:"fp-menu fp-subtitle-menu"},"<strong>Closed Captions</strong>"),o.find("a",n).forEach(o.removeNode),n.appendChild(o.createElement("a",{"data-yt-subtitle-index":-1},"No subtitles")),(t||[]).forEach(function(e,t){t=o.createElement("a",{"data-yt-subtitle-index":t},e.displayName);r&&r.languageCode&&r.languageCode==e.languageCode&&jQuery(t).addClass("fp-selected"),n.appendChild(t)}),o.find(".fp-ui",l)[0].appendChild(n),o.find(".fp-controls",l)[0].appendChild(e),l.find(".fp-cc").removeClass("fp-hidden"),jQuery(document).on("click",".fp-subtitle-menu a",function(e){e.preventDefault(),jQuery("a[data-yt-subtitle-index]").removeClass("fp-selected"),jQuery(this).addClass("fp-selected"),t[jQuery(this).data("yt-subtitle-index")]?(null==l.data("fv-player-youtube-nl")&&l.data("fv-player-youtube-nl",l.hasClass("is-youtube-nl")),l.removeClass("is-youtube-nl"),y.setOption("captions","track",{languageCode:t[jQuery(this).data("yt-subtitle-index")].languageCode})):(l.data("fv-player-youtube-nl")&&l.addClass("is-youtube-nl"),y.unloadModule("captions"))}))))})}function d(){0==y.getDuration()&&(u.live=!0,jQuery(l).addClass("is-live"));var e=jQuery.extend(h,r(y));if(!u.ready){u.autoplayed&&u.mute(!0,!0),y.playVideo();try{u.one("ready",function(){u.trigger("resume",[u])}),u.trigger("ready",[u,e])}catch(e){}}u.ready=!0,s&&jQuery(".fp-ui",l).hide(),(flowplayer.support.iOS.version<11||flowplayer.support.android.version<5)&&(l.find(".fp-speed").hide(),u.YTErrorTimeout=setTimeout(function(){u.error||-1!=y.getPlayerState()||u.trigger("error",[u,{code:4,video:u.video,custom_message:"Error: YouTube video not started"}])},1e3))}function p(e){switch(0==l.find(".fv-fp-no-picture.is-active").length&&jQuery(".fvyoutube-engine",l).show(),e.data){case-1:jQuery(".fp-splash",l).css("pointer-events",""),u.playing=!1,u.paused=!0,setTimeout(function(){-1==y.getPlayerState()&&(fv_player_log("This video did not start yet!"),l.removeClass("is-youtube-nl"),u.fv_yt_did_preload)&&(l.find(".fp-splash").remove(),l.removeClass("is-loading").addClass("is-ready"))},1e3);break;case FV_YT.PlayerState.BUFFERING:"function"==typeof y.getCurrentTime&&u.trigger("seek",[u,y.getCurrentTime()]);break;case FV_YT.PlayerState.CUED:l.removeClass("is-loading"),l.addClass("is-paused"),u.loading=!1,flowplayer.support.firstframe||(t=jQuery("[rel="+l.attr("id")+"] span").eq(u.video.index),jQuery(".fv-pf-yt-temp",l).css("background-image",t.css("background-image")),flowplayer.support.dataload||jQuery(".fp-ui",l).hide(),jQuery(".fv-pf-yt-temp",l).show(),jQuery(".fv-pf-yt-temp-play",l).show());break;case FV_YT.PlayerState.ENDED:u.playing=!1,clearInterval(a),a=!1,u.trigger("pause",[u]),u.trigger("finish",[u]),jQuery(".fvyoutube-engine",l).hide(),jQuery(".fv-pf-yt-temp2",l).show(),jQuery(".fp-ui",l).show();break;case FV_YT.PlayerState.PAUSED:u.autoplayed&&1===u.youtube_unmute_attempted?(u.youtube_unmute_attempted=2,fv_player_log("FV FP YouTube: Volume restore failed."),u.mute(!0,!0),y.playVideo(),jQuery("body").one("click",function(){u&&u.ready&&(fv_player_log("FV FP YouTube: Volume restore on click."),u.volume(u.volumeLevel))})):u.seeking?y.playVideo():(clearInterval(a),a=!1,u.trigger("pause",[u]));break;case FV_YT.PlayerState.PLAYING:var t;jQuery.extend(u.video,r(y)),d(),o(),s&&((t=jQuery(".fp-ui",l)).show(),jQuery(".fp-splash",l).css("pointer-events",""),!jQuery(l).hasClass("no-controlbar")&&fv_player_pro_youtube_is_old_android()||flowplayer.support.iOS&&flowplayer.support.iOS.version<10)&&t.hide(),u.seeking&&(u.seeking=!1,"function"==typeof y.getCurrentTime)&&u.trigger("seek",[u,y.getCurrentTime()]),u.paused&&u.trigger("resume",[u]),u.one("progress",function(){u.autoplayed&&!u.youtube_unmute_attempted&&y.isMuted()&&(fv_player_log("FV FP YouTube: Trying to restore volume to "+u.volumeLevel),u.volume(u.volumeLevel),u.youtube_unmute_attempted=1,setTimeout(function(){u.youtube_unmute_attempted=!1},500))}),window.fv_player_pro&&fv_player_pro.youtube_nl&&l.addClass("is-youtube-nl")}}function o(){var t=!1;function e(){var e;void 0!==y&&void 0!==y.getCurrentTime&&(e=y.getCurrentTime(),s&&(void 0!==u.seeking&&u.seeking&&t&&t<e&&u.trigger("seek",[u]),t=e),e=u.video.time=0<e?e:0,u.live&&(e-=g=0==g?e:g),u.trigger("progress",[u,e]),(e=y.getVideoLoadedFraction()*u.video.duration+.5)<u.video.duration&&!u.video.buffered?(u.video.buffer=e,u.trigger("buffer",[u,u.video.buffer])):u.video.buffered||(u.video.buffered=!0,u.video.buffer&&u.trigger("buffer",[u,u.video.buffer]),u.trigger("buffered",[u])))}a||(a=setTimeout(e,100),a=setInterval(e,250))}var h,y,n={small:{width:320,height:240,bitrate:64},medium:{width:640,height:360,bitrate:512},large:{width:854,height:480,bitrate:640},hd720:{width:1280,height:720,bitrate:2e3},hd1080:{width:1920,height:1080,bitrate:4e3}},i={bitrates:!1,defaultQuality:"default",activeClass:"active",qualityLabels:{medium:"medium",large:"large",hd720:"hd"}},v=flowplayer.common,a=!1,s=fv_player_pro_youtube_is_mobile(),l=jQuery(l),g=0,e={engineName:t.engineName,load:function(e){g=0;var t,r,o,n,i,a,s=fv_player_pro_youtube_get_video_id((h=e).src);s?(y?flowplayer.support.dataload||flowplayer.support.inlineVideo?y.loadVideoById(s,0,"default"):y.cueVideoById(s,0,"default"):u.youtube&&u.youtube.getIframe()?(y=u.youtube,u.fv_yt_onReady(),u.fv_yt_onStateChange(),u.fv_yt_onError(),y.addEventListener("onReady",d),y.addEventListener("onStateChange",p),y.addEventListener("onError",f),y.addEventListener("onApiChange",c),flowplayer.support.dataload||flowplayer.support.inlineVideo?y.loadVideoById(s,0,"default"):(y.cueVideoById(s,0,"default"),setTimeout(function(){d()},100))):(v.removeNode(v.findDirect("video",l)[0]||v.find(".fp-player > video",l)[0]),(t=v.createElement("div")).className="fp-engine fvyoutube-engine",v.prepend(v.find(".fp-player",l)[0],t),r=setInterval(function(){var e;void 0!==FV_YT&&void 0!==FV_YT.Player&&(clearInterval(r),y=new FV_YT.Player(t,fv_player_pro_youtube_player_vars(s,l,{onReady:d,onStateChange:p,onError:f,onApiChange:c})),(e=jQuery(".fp-engine.fvyoutube-engine",l))[0].allowFullscreen=!1,e.on("webkitfullscreenchange",function(){return document.webkitCancelFullScreen&&document.webkitCancelFullScreen(),!1}))},5)),o=flowplayer.support.fullscreen,n=window,u.fullscreen=function(e){var t=jQuery(l).find(".fp-player")[0];if(!u.disabled)return(e=void 0===e?!u.isFullscreen:e)&&(a=n.scrollY,i=n.scrollX),o?e?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){if("function"==typeof t[e])return t[e](Element.ALLOW_KEYBOARD_INPUT),"webkitRequestFullScreen"!==e||document.webkitFullscreenElement||t[e](),!1}):["exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].forEach(function(e){"function"==typeof document[e]&&document[e]()}):u.trigger(e?"fullscreen":"fullscreen-exit",[u]),u},u.on("fullscreen-exit",function(){n.scrollTo(i,a)})):(l.find(".fp-ui").append('<div class="fp-message"><h2>'+fv_flowplayer_translations.invalid_youtube+"</h2></div>"),l.addClass("is-error").removeClass("is-loading"))},mute:function(e){void 0!==y&&(u.muted=!!e,e?y.mute():y.unMute(),u.trigger("mute",[u,e]))},pause:function(){clearInterval(u.YTErrorTimeout),y.pauseVideo()},pick:function(e){for(var t,r=0;r<e.length;r+=1)if((t=e[r]).src.match(/(youtube\.com|youtube-nocookie\.com|youtu\.be)/))return t.src.match(/\/shorts\//)&&(t.src=t.src.replace("/shorts/","/watch?v=")),t},resume:function(){u.finished,void 0!==y.playVideo&&y.playVideo()},seek:function(e){y.seekTo(e,!0),u.seeking=!0,h.currentTime=e,o()},speed:function(e){y.setPlaybackRate(parseFloat(e)),u.trigger("speed",[u,e])},stop:function(){y.stopVideo()},unload:function(){clearInterval(a),fv_player_pro_youtube_is_mobile()?(y.stopVideo(),u.one("load",function(e,t){"fvyoutube"!=t.engine.engineName&&(clearInterval(a),y.destroy(),u.youtube=!1,jQuery(".fvyoutube-engine",l).remove(),jQuery(".fv-pf-yt-temp2",l).remove(),jQuery(l).removeClass("is-ytios11"))})):(y.destroy(),jQuery(".fvyoutube-engine",l).remove(),clearInterval(a)),u.youtube_unmute_attempted=!1,flowplayer.support.firstframe||u.one("ready",function(e,t){t.stop()})},volume:function(e){"function"==typeof y.setVolume&&(0<e&&u.mute(!1),u.volumeLevel=e,y.setVolume(100*e),u.trigger("volume",[u,e]))}};return jQuery(document).on("afterClose.fb beforeLoad.fb",function(){y&&u.lightbox_visible&&!u.lightbox_visible()&&u.is_in_lightbox&&u.is_in_lightbox()&&(u.trigger("unload",[u]),y.destroy(),y=!1,u.youtube)&&(u.youtube=!1)}),e}t.engineName="fvyoutube",t.canPlay=function(e){return/video\/youtube/i.test(e)},flowplayer.engines.push(t),flowplayer(function(e,t){jQuery(t).hasClass("lightboxed")||fv_player_pro_youtube_is_mobile()&&setTimeout(function(){fv_player_pro_youtube_preload(t,e)})}),jQuery(document).ready(function(){fv_player_pro_youtube_is_mobile()&&(jQuery(document).on("afterShow.fb",function(){jQuery(".fancybox-slide--current .flowplayer").each(function(){fv_player_pro_youtube_preload(this,!1,!0)})}),jQuery(document).on("beforeClose.fb beforeLoad.fb",function(e,t,r){jQuery(".freedomplayer",r.$slide).each(function(){var e=jQuery(this).data("freedomplayer");e&&(e.trigger("unload",[e]),e.youtube)&&(e.youtube.destroy(),e.youtube=!1)})}))})})()),"undefined"!=typeof flowplayer&&flowplayer(function(e,t){e.on("ready beforeseek",function(){"fvyoutube"==e.engine.engineName?void 0!==e.youtube&&"function"==typeof e.youtube.getAvailablePlaybackRates&&(e.conf.backupSpeeds=e.conf.speeds,e.conf.speeds=e.youtube.getAvailablePlaybackRates()):(e.youtube&&(e.youtube.destroy(),e.youtube=!1,jQuery(".fp-ui",t).css("background-image",""),jQuery(".fvyoutube-engine",t).remove(),jQuery(".fv-pf-yt-temp2",t).remove(),jQuery(t).removeClass("is-ytios11")),void 0!==e.conf.backupSpeeds&&(e.conf.speeds=e.conf.backupSpeeds))}),void 0!==jQuery.fn.fitVids&&jQuery(t).addClass("fitvidsignore")});
  • fv-player/trunk/freedom-video-player/fv-player.min.js

    r3336706 r3348866  
    1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}if("undefined"!=typeof fv_flowplayer_conf){var FVAbrController,parseIOSVersion=function(e){e=/iP(ad|hone)(; CPU)? OS (\d+_\d)/.exec(e);return e&&1<e.length?parseFloat(e[e.length-1].replace("_","."),10):0};try{"object"==_typeof(window.localStorage)&&void 0!==window.localStorage.volume&&delete fv_flowplayer_conf.volume}catch(e){}flowplayer.conf=fv_flowplayer_conf,flowplayer.conf.embed=!1,flowplayer.conf.share=!1,flowplayer.conf.analytics=!1,void 0!==fv_flowplayer_conf.disable_localstorage&&(flowplayer.conf.storage={});try{flowplayer.conf.key=atob(flowplayer.conf.key)}catch(e){}!flowplayer.support.android&&flowplayer.conf.dacast_hlsjs&&((FVAbrController=function(e){this.hls=e,this.nextAutoLevel=3}).prototype.nextAutoLevel=function(e){this.nextAutoLevel=e},FVAbrController.prototype.destroy=function(){},flowplayer.conf.hlsjs={startLevel:-1,abrController:FVAbrController}),flowplayer.support.iOS&&flowplayer.support.iOS.chrome&&0==flowplayer.support.iOS.version&&(flowplayer.support.iOS.version=parseIOSVersion(navigator.userAgent)),flowplayer.conf.hlsjs.use_for_safari&&(flowplayer.support.iOS&&13<=parseInt(flowplayer.support.iOS.version)||!flowplayer.support.iOS&&flowplayer.support.browser.safari&&8<=parseInt(flowplayer.support.browser.version))&&(flowplayer.conf.hlsjs.safari=!0),flowplayer.support.fvmobile=!(flowplayer.support.firstframe&&!flowplayer.support.iOS&&!flowplayer.support.android);var fls=flowplayer.support;flowplayer.conf.mobile_native_fullscreen&&"ontouchstart"in window&&fls.fvmobile&&(flowplayer.conf.native_fullscreen=!0),"ontouchstart"in window&&(fls.android&&fls.android.version<4.4&&!(fls.browser.chrome&&54<fls.browser.version)&&(flowplayer.conf.native_fullscreen=!0),fls.iOS)&&(fv_player_in_iframe()||fls.iOS.version<7)&&(flowplayer.conf.native_fullscreen=!0)}"undefined"!=typeof fv_flowplayer_translations&&(flowplayer.defaults.errors=fv_flowplayer_translations);var fv_player_did_autoplay=!1;function fv_player_videos_parse(e,t){try{var a=JSON.parse(e)}catch(e){return!1}var n;jQuery(a.sources).each(function(e,o){a.sources[e].src=o.src.replace(/(\?[a-z]+=){random}/,"$1"+Math.random())}),flowplayer.support.browser.safari&&(n=[],jQuery(a.sources).each(function(e,o){"video/webm"!=o.type&&n.push(o)}),0<n.length)&&(a.sources=n);var r,e=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)").exec(location.search);return!(null!=e&&"yes"==e[1]||jQuery(window).width()<=480||jQuery(window).height()<=480)||null!=e&&"no"==e[1]||(r=!1,jQuery(a.sources).each(function(e,o){if(!o)return!1;o.mobile&&(a.sources[e]=a.sources[0],a.sources[0]=o,r=!0),r&&jQuery(t).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>")})),t.trigger("fv_player_videos_parse",a),a}function fv_player_in_iframe(){try{return window.self!==window.top}catch(e){return!0}}function fv_escape_attr(e){var o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,function(e){return o[e]})}function fv_player_preload(){function e(){jQuery(".flowplayer.fp-is-embed").each(function(){var e=jQuery(this);e.hasClass("has-chapters")||e.hasClass("has-transcript")||0!=jQuery(".fp-playlist-external[rel="+e.attr("id")+"]").length||e.height(jQuery(window).height())})}if(flowplayer.support.touch&&(jQuery(".fp-playlist-external.fp-playlist-horizontal.fv-playlist-design-2017").addClass("visible-captions"),jQuery(".fp-playlist-external.fp-playlist-vertical.fv-playlist-design-2017").addClass("visible-captions")),flowplayer(function(n,r){localStorage.flowplayerTestStorage&&delete localStorage.flowplayerTestStorage;var e,o,t,i=(r=jQuery(r)).find(".fp-player"),l=!1,a=n.conf.splash,s=(r.hasClass("fixed-controls")&&r.find(".fp-controls").on("click",function(e){n.loading||n.ready||(e.preventDefault(),e.stopPropagation(),n.load())}),0==r.data("volume")&&r.hasClass("no-controlbar")&&r.find(".fp-volume").remove(),jQuery(".fp-playlist-external[rel="+r.attr("id")+"]")),f=((!n.conf.playlist||0==n.conf.playlist.length)&&s.length&&0<s.find("a[data-item]").length?(o=[],s.find("a[data-item]").each(function(){(e=fv_player_videos_parse(jQuery(this).attr("data-item"),r))?o.push(e):jQuery(this).remove()}),n.conf.playlist=o,n.conf.clip=o[0]):n.conf.clip||(n.conf.clip=fv_player_videos_parse(jQuery(r).attr("data-item"),r)),jQuery("a",s).on("click",function(e){e.preventDefault(),l=!0;var e=jQuery(this),o=jQuery(".fp-playlist-external[rel="+r.attr("id")+"]"),o=jQuery("a",o).index(this),t=e.prev("a"),a=e.data("item");if(e.closest(".fv-playlist-draggable.is-dragging").length)return!1;if(location.href.match(/wp-admin/)&&0<e.parents(".fv-player-editor-preview").length)return fv_flowplayer_conf.current_video_to_edit=o,e.parents(".fv-player-custom-video").find(".edit-video .fv-player-editor-button").trigger("click"),!1;if(t.length&&e.is(":visible")&&!t.is(":visible"))return t.trigger("click"),!1;if(!jQuery("#"+e.parent().attr("rel")).hasClass("dynamic-playlist")){if(fv_player_playlist_active(jQuery(".fp-playlist-external[rel="+r.attr("id")+"]"),this),n){if(n.error&&(n.pause(),n.error=n.loading=!1,r.removeClass("is-error"),r.find(".fp-message.fp-shown").remove()),!n.video||n.video.index==o)return;n.play(o)}t=(t=a.splash)||e.find("img").attr("src");u(r,i,a,t),r[0].getBoundingClientRect().bottom-100<0&&jQuery("html, body").animate({scrollTop:jQuery(r).offset().top-100},300)}}),jQuery("[rel="+r.attr("id")+"]")),p=!1,c=r.find(".fp-splash"),d=r.find(".fv-fp-splash-text");function u(e,o,t,a){e=e.find("img.fp-splash");a?(0==e.length&&(e=jQuery('<img class="fp-splash" />'),o.prepend(e)),e.attr("alt",t.fv_title?fv_escape_attr(t.fv_title):"video"),e.removeAttr("srcset"),e.attr("src",a)):e.length&&e.remove()}n.bind("load",function(e,o,t){var a;o.conf.playlist.length&&(t.type.match(/^audio/)&&!l&&(a=(a=(t=(o=f.find("a").eq(t.index)).data("item")).splash)||o.find("img").attr("src"),u(r,i,t,a)),l=!1)}),n.bind("ready",function(e,o,t){setTimeout(function(){var e;-1<t.index&&0<f.length&&(e=jQuery("a",f).eq(t.index),fv_player_playlist_active(f,e),p=e.find(".fvp-progress"))},100),c=r.find(".fp-splash"),t.is_audio_stream||t.type.match(/^audio/)||(window.fv_player_pro&&window.fv_player_pro.autoplay_scroll||r.data("fvautoplay")||!a||"application/x-mpegurl"==o.video.type?o.one("progress",function(){c.remove(),d.remove()}):(c.remove(),d.remove()))}),n.bind("unload",function(){jQuery(".fp-playlist-external .now-playing").remove(),jQuery(".fp-playlist-external a").removeClass("is-active");var e=i.find("iframe.fp-engine");e.length?(e.after(d),e.after(c)):(i.prepend(d),i.prepend(c)),p=!1}),n.bind("progress",function(e,o,t){p.length&&o.playlist_thumbnail_progress&&o.playlist_thumbnail_progress(p,o.video,t)}),n.bind("error-subtitles",function(){console.log("error-subtitles"),fv_player_notice(r,fv_flowplayer_translations[8],2e3)}),(s=jQuery(r).parent().find("div.fp-playlist-vertical[rel="+jQuery(r).attr("id")+"]")).length&&((t=function(){var e=s.hasClass("fp-playlist-only-captions")?"height":"max-height";s.parents(".fp-playlist-text-wrapper").hasClass("is-fv-narrow")&&(e="max-height"),s.css(e,(()=>{var e=r.height();return e=0==e?r.css("max-height"):e})()),"max-height"==e&&s.css("height","auto")})(),jQuery(window).on("resize tabsactivate",function(){setTimeout(t,0)})),n.show_status=function(e){var t="";["loading","ready","playing","paused","seeking"].every(function(e,o){return n[e]&&(t+=" "+e),!0}),console.log("FV Player Status ("+e+")",t)},window.fv_player_loaded||(window.fv_player_loaded=!0,setTimeout(function(){jQuery(document).trigger("fv_player_loaded");var e=new CustomEvent("fv_player_loaded",[]);document.dispatchEvent(e)},100)),setTimeout(function(){r.trigger("fv_player_loaded")},10),r.data("error")&&(n.message(r.data("error")),r.find(".fp-controls").remove(),r.find(".fp-header").css("opacity",1).show(),n.conf.clip={sources:[{src:!1,type:"video/mp4"}]},n.on("load",function(e){e.preventDefault(),e.stopPropagation()}))}),window.self==window.top||location.href.match(/fv_player_preview/)||(e(),jQuery(window.self).on("resize",e)),"undefined"!=typeof fv_flowplayer_playlists)for(var o in fv_flowplayer_playlists)fv_flowplayer_playlists.hasOwnProperty(o)&&jQuery("#"+o).flowplayer({playlist:fv_flowplayer_playlists[o]});fv_player_load(),fv_video_link_autoplay(),jQuery(document).ajaxComplete(function(){fv_player_load()}),jQuery(window).on("hashchange",fv_video_link_autoplay)}function fv_player_load(i){i&&1<i.lenght&&console.log("FV Player: Can't use fv_player_load with more than a single forced element!");var l=!1;if((i||jQuery(".flowplayer")).each(function(e,o){var t=jQuery(o),o=t.data("flowplayer");if(o)i&&(l=o);else{i&&(t.find(".fp-preload, .fvfp_admin_error").remove(),t.attr("data-item-lazy")?(t.attr("data-item",t.attr("data-item-lazy")),t.removeAttr("item-lazy")):(a=jQuery("[rel="+t.attr("id")+"]"))&&a.find("a[data-item-lazy]").each(function(e,o){(o=jQuery(o)).attr("data-item",o.attr("data-item-lazy")),o.removeAttr("data-item-lazy")}));var a,n,o=!1;if(t.attr("data-item"))o={clip:fv_player_videos_parse(t.attr("data-item"),t)};else if(a=jQuery("[rel="+t.attr("id")+"]")){if(0==a.find("a[data-item]").length)return;var r=[];a.find("a[data-item]").each(function(){(n=fv_player_videos_parse(jQuery(this).attr("data-item"),t))?r.push(n):jQuery(this).remove()}),o={playlist:r}}o&&(o=flowplayer.extend(o,t.data()),l=flowplayer(t[0],o),t.data("freedomplayer",l),t.data("flowplayer",l))}}),jQuery(".fv-playlist-slider-wrapper").each(function(){var e=jQuery(this).find("a:visible");(e=0===e.length?jQuery(this).find("a"):e).length&&(e=e.outerWidth()*e.length,jQuery(this).find(".fp-playlist-external").attr("style","width: "+e+"px; max-width: "+e+"px !important"))}),void 0!==jQuery().tabs&&(jQuery("body").removeClass("fv_flowplayer_tabs_hide"),jQuery(".fv_flowplayer_tabs_content").tabs()),i&&l)return l}function fv_player_playlist_active(e,o){e&&(jQuery("a",e).removeClass("is-active"),jQuery(".now-playing").remove());var t,e=jQuery(e),o=jQuery(o),a=!1,n=(o.addClass("is-active"),e.hasClass("fv-playlist-design-2014"));(n&&0==o.find("h4").length||!n)&&0==o.find(".now-playing").length&&o.prepend('<strong class="now-playing"><span>'+fv_flowplayer_translations.playlist_current+"</span></strong>"),e.parent().find(".flowplayer").length||(a=!0),(e.hasClass("fp-playlist-vertical")||e.hasClass("fp-playlist-horizontal")&&e.hasClass("is-audio"))&&!(e=>{var o=e.getBoundingClientRect(),t=o.top,a=t+o.height,e=e.parentNode;do{if(o=e.getBoundingClientRect(),a<=o.bottom==!1)return;if(t<=o.top)return;e=e.parentNode}while(e!=document.body);return a<=document.documentElement.clientHeight})(o.get(0))?(t=a?e.parent():e).animate({scrollTop:t.scrollTop()+(o.position().top-t.position().top)},750):e.hasClass("fp-playlist-horizontal")&&!(e=>{var o=e.getBoundingClientRect(),t=o.left,a=t+o.width,e=e.parentNode;do{if(o=e.getBoundingClientRect(),a<=o.right==!1)return;if(t<=o.left)return;e=e.parentNode}while(e!=document.body);return a<=document.documentElement.clientWidth})(o.get(0))&&(t=a?e.parent():e).animate({scrollLeft:t.scrollLeft()+(o.position().left-t.position().left)},750)}function fv_parse_sharelink(e){var o,t="fvp_";return(e=e.replace("https?://[^./].","")).match(/(youtube.com)/)?t+e.match(/(?:v=)([A-Za-z0-9_-]*)/)[1]:e.match(/(vimeo.com)|(youtu.be)/)?t+e.match(/(?:\/)([^/]*$)/)[1]:(o=e.match(/(?:\/)([^/]*$)/))?t+o[1].match(/^[^.]*/)[0]:t+e}function fv_player_get_video_link_hash(e){var o=fv_parse_sharelink((void 0!==e.video.sources_original&&void 0!==e.video.sources_original[0]?e.video.sources_original:e.video.sources)[0].src);return o=void 0!==e.video.id?fv_parse_sharelink(e.video.id.toString()):o}function fv_player_time_hms(e){var o,t,a;return isNaN(e)?NaN:(o=parseInt(e,10),t=Math.floor(o/3600),a=Math.floor(o/60)%60,e=o%60,t?t+="h":t="",t&&a<10?a="0"+a+"m":a?a+="m":a="",(t||a)&&e<10&&(e="0"+e),t+a+(e+="s"))}function fv_player_time_hms_ms(e){var o;return isNaN(e)?NaN:(o=void 0!==(o=((e=parseFloat(e).toFixed(3))+"").split("."))[1]&&0<o[1]?o[1]+"ms":"",fv_player_time_hms(e)+o)}function fv_player_time_seconds(e,o){var t;return e?(t=0,e.match(/(\d+[a-z]{1,2})/g).forEach(function(e){e.endsWith("h")?t+=3600*parseInt(e):e.endsWith("m")?t+=60*parseInt(e):e.endsWith("s")&&!e.endsWith("ms")?t+=parseInt(e):e.endsWith("ms")&&parseInt(e)&&(t+=parseInt(e)/1e3)}),o?Math.min(t,o):t):-1}function fv_autoplay_init(e,t,o,a,n){var r,i,l;!fv_autoplay_exec_in_progress&&(fv_autoplay_exec_in_progress=!0,r=e.data("flowplayer"))&&(i=fv_player_time_seconds(o),n=fv_player_time_seconds(n),a=fv_player_time_seconds(a),e.parent().hasClass("ui-tabs-panel")&&(o=e.parent().attr("id"),jQuery("[aria-controls="+o+"] a").trigger("click")),e.find(".fp-player").attr("class").match(/\bis-sticky/)||(l=jQuery(e).offset().top-(jQuery(window).height()-jQuery(e).height())/2,window.scrollTo(0,l),r.one("ready",function(){window.scrollTo(0,l)})),e.hasClass("lightboxed")&&setTimeout(function(){jQuery("[href=\\#"+e.attr("id")+"]").trigger("click")},0),t?fv_player_video_link_autoplay_can(r,parseInt(t))?r.ready?fv_player_video_link_seek(r,i,n,a):(r.play(parseInt(t)),r.one("ready",function(){fv_player_video_link_seek(r,i,n,a)})):flowplayer.support.inlineVideo&&(r.one(r.playing?"progress":"ready",function(e,o){o.play(parseInt(t)),o.one("ready",function(){fv_player_video_link_seek(o,i,n,a)})}),e.find(".fp-splash").attr("src",jQuery("[rel="+e.attr("id")+"] div").eq(t).find("img").attr("src")).removeAttr("srcset"),fv_player_in_iframe()||fv_player_notice(e,fv_flowplayer_translations[11],"progress")):r.ready?fv_player_video_link_seek(r,i,n,a):(fv_player_video_link_autoplay_can(r)?r.load():fv_player_in_iframe()||fv_player_notice(e,fv_flowplayer_translations[11],"progress"),r.one("ready",function(){fv_player_video_link_seek(r,i,n,a)})))}function fv_player_video_link_seek(e,o,t,a){fv_autoplay_exec_in_progress=!1;var n=setInterval(function(){e.loading||((0<o||0<e.video.time)&&(e.custom_seek?e.custom_seek(o):e.seek(o)),t&&a&&e.trigger("link-ab",[e,a,t]),clearInterval(n))},10)}jQuery(document).ready(function(){var e=0,o=setInterval(function(){++e<1e3&&(window.fv_vast_conf&&!window.FV_Player_IMA||window.fv_player_pro&&!window.FV_Flowplayer_Pro&&!window.FV_Player_Pro&&document.getElementById("fv_player_pro")!=fv_player_pro||window.fv_player_user_playlists&&!window.fv_player_user_playlists.is_loaded||window.FV_Player_JS_Loader_scripts_total&&window.FV_Player_JS_Loader_scripts_loaded<window.FV_Player_JS_Loader_scripts_total)||(clearInterval(o),fv_player_preload())},10)});var fv_autoplay_exec_in_progress=!1;function fv_video_link_autoplay(){var e,i,l,s,f,p=!0;"undefined"!=typeof flowplayer&&"undefined"!=typeof fv_flowplayer_conf&&fv_flowplayer_conf.video_hash_links&&window.location.hash.substring(1).length&&(e=window.location.hash.match(/\?t=/)?window.location.hash.substring(1).split("?t="):window.location.hash.substring(1).split(","),i=e[0],l=void 0!==e[1]&&e[1],s=void 0!==e[2]&&e[2],f=void 0!==e[3]&&e[3],jQuery(".flowplayer").each(function(){var e=jQuery(this),o=(e=e.hasClass("lightbox-starter")?jQuery(e.attr("href")):e).data("flowplayer");if(o){var t,a=void 0!==o.conf.playlist&&1<o.conf.playlist.length?o.conf.playlist:[o.conf.clip];for(t in a)if(a.hasOwnProperty(t)){var n=void 0!==a[t].id&&fv_parse_sharelink(a[t].id.toString());if(i===n&&p)return 0<o.conf.playlist.length?o.conf.playlist[t].prevent_position_restore=!0:o.conf.clip.prevent_position_restore=!0,console.log("fv_autoplay_exec for "+n,t),fv_autoplay_init(e,parseInt(t),l,s,f),p=!1}for(t in a)if(a.hasOwnProperty(t)){var r=fv_parse_sharelink(a[t].sources[0].src);if(i===r&&p)return 0<o.conf.playlist.length?o.conf.playlist[t].prevent_position_restore=!0:o.conf.clip.prevent_position_restore=!0,console.log("fv_autoplay_exec for "+r,t),fv_autoplay_init(e,parseInt(t),l,s,f),p=!1}}}))}function fv_player_video_link_autoplay_can(e,o){return!("video/youtube"==(o?e.conf.playlist[o]:e.conf.clip).sources[0].type&&(flowplayer.support.iOS||flowplayer.support.android)||fv_player_in_iframe())&&flowplayer.support.firstframe}function fv_player_notice(e,o,t){var a=jQuery(".fvfp-notices",e),n=(a.length||(a=jQuery('<div class="fvfp-notices">'),jQuery(".fp-player",e).append(a)),jQuery('<div class="fvfp-notice-content">'+o+"</div></div>"));return a.append(n),"string"==typeof t&&jQuery(e).data("flowplayer").on(t,function(){n.fadeOut(100,function(){jQuery(this).remove()})}),0<t&&setTimeout(function(){n.fadeOut(2e3,function(){jQuery(this).remove()})},t),n}var fv_player_clipboard=function(e,o,t){if(navigator.clipboard&&"function"==typeof navigator.clipboard.writeText)navigator.clipboard.writeText(e).then(function(){o()},function(){void 0!==t&&t()});else try{fv_player_doCopy(e)?o():void 0!==t&&t()}catch(e){void 0!==t&&t(e)}};function fv_player_doCopy(e){var o,t,a,n=document.createElement("textarea"),e=(n.value=e,n.style.opacity=0,n.style.position="absolute",n.setAttribute("readonly",!0),document.body.appendChild(n),0<document.getSelection().rangeCount&&document.getSelection().getRangeAt(0));navigator.userAgent.match(/ipad|ipod|iphone/i)?(o=n.contentEditable,n.contentEditable=!0,(t=document.createRange()).selectNodeContents(n),(a=window.getSelection()).removeAllRanges(),a.addRange(t),n.setSelectionRange(0,999999),n.contentEditable=o):n.select();try{var r=document.execCommand("copy");return e&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(e)),document.body.removeChild(n),r}catch(e){throw new Error("Unsuccessfull")}}function fv_player_log(e,o){fv_flowplayer_conf.debug&&"undefined"!=typeof console&&"function"==typeof console.log&&(o?console.log(e,o):console.log(e)),fv_flowplayer_conf.debug&&void 0!==window.location.search&&window.location.search.match(/fvfp/)&&jQuery("body").prepend(e+"<br />")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function is_ga_4(e){return!(void 0===e.conf.fvanalytics||!e.conf.fvanalytics||!e.conf.fvanalytics.startsWith("G-"))}function fv_player_track(e,o,t,a,n,r){if("object"!=_typeof(e)&&(r=n,n=a,a=t,t=o,o=e,e=!1),o=o||flowplayer.conf.fvanalytics,void 0===a&&(a="Unknown engine"),/fv_player_track_debug/.test(window.location.href)&&console.log("FV Player Track: "+t+" - "+a+" '"+n+"'",r),"undefined"!=typeof gtag)is_ga_4(e)&&"Heartbeat"!==n?gtag("event",t,{video_title:n,video_current_time:e.video.time,video_provider:a,video_duration:e.video.duration,value:r||1}):gtag("event",t,{event_category:a,event_label:n,value:r||1});else if(o&&"undefined"!=typeof ga)ga("create",o,"auto",n,{allowLinker:!0}),ga("require","linker"),r?ga("send","event",t,a,n,r):ga("send","event",t,a,n);else if(o&&"undefined"!=typeof _gat){e=_gat._getTracker(o);if(void 0===e._setAllowLinker)return;e._setAllowLinker(!0),r?e._trackEvent(t,a,n,r):e._trackEvent(t,a,n)}flowplayer.conf.matomo_domain&&flowplayer.conf.matomo_site_id&&"undefined"!=typeof _paq&&(r?_paq.push(["trackEvent",t,a,n,r]):_paq.push(["trackEvent",t,a,n]))}function fv_player_track_name(e,o){e=e.attr("title");return(e=(e=e||void 0===o.fv_title?e:o.fv_title)||void 0===o.title?e:o.title)||void 0===o.src||(e=o.src.split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i,""),o.type.match(/mpegurl/)&&(e=o.src.split("/").slice(-2)[0].replace(/\.(\w{3,4})(\?.*)?$/i,"")+"/"+e)),e}function freedomplayer_playlist_size_check(){jQuery(".fp-playlist-external").each(function(){var e=jQuery(this),o=e.parent().width(),t=e.css("max-width").match(/%/)?e.width():parseInt(e.css("max-width")),t=0<t&&t<o?t:o;900<=e.parent().width()?e.addClass("is-wide"):e.removeClass("is-wide"),(e.hasClass("fp-playlist-polaroid")||e.hasClass("fp-playlist-version-one")||e.hasClass("fp-playlist-version-two"))&&(o=e.hasClass("fp-playlist-version-one")||e.hasClass("fp-playlist-version-two")?200:150,8<(t=Math.floor(t/o))?t=8:t<2&&(t=2),e.css("--fp-playlist-items-per-row",String(t)))})}flowplayer(function(t,r){var n,i,o,l,a,s;function e(){var e;"dash"==t.engine.engineName?((e=l[t.engine.dash.getQualityFor("video")]).qualityIndex!=a&&(a=e.qualityIndex,f(e.qualityIndex,l)),o.match(/dash_debug/)&&p(e.width,e.height,e.bitrate)):"hlsjs-lite"==t.engine.engineName&&(n.currentLevel!=a&&(a=n.currentLevel,f(n.currentLevel,n.levels)),o.match(/hls_debug/))&&(e=n.levels[n.currentLevel])&&p(e.width,e.height,e.bitrate)}function f(e,o){var t,a,n;o[e]&&(t=o[e].height,a=541,n=1e5,jQuery(o).each(function(e,o){720<=o.height&&o.height<1400&&(a=720),o.height<n&&(n=o.height),localStorage.FVPlayerHLSQuality==o.height&&(r.find("a[data-quality]").removeClass("fp-selected fp-color"),r.find("a[data-quality="+e+"]").addClass("fp-selected fp-color"))}),r.find("a[data-quality]").removeClass("is-current"),r.find("a[data-quality="+e+"]").addClass("is-current"),o=1400<=t?"4K":a<=t?"HD":360<=t&&n<t?"SD":"SD",r.find(".fp-qsel").html(o))}function p(e,o,t){s.html("Using "+e+"x"+o+" at "+Math.round(t/1024)+" kbps")}function c(){var t=r.find(".fp-qsel-menu");t.children().each(function(e,o){t.prepend(o)}),t.children().each(function(e,o){var t;/^NaNp/.test(jQuery(o).html())?(t=jQuery(o).html().match(/\((.*?)\)/))&&void 0!==t[1]&&jQuery(o).html(t[1]):jQuery(o).html(jQuery(o).html().replace(/\(.*?\)/,""))}),t.prepend(t.find("a[data-quality=-1]")),t.prepend(t.find("strong"))}r=jQuery(r),void 0===t.conf.disable_localstorage&&(i=t.conf.splash,flowplayer.engine("hlsjs-lite").plugin(function(e){(n=e.hls).on(Hls.Events.ERROR,function(e,o){"mediaError"==o.type&&"fragParsingError"==o.details&&1==o.fatal&&(n.destroy(),t.trigger("error",[t,{code:3}]),setTimeout(function(){r.removeClass("is-seeking"),r.addClass("is-paused")},0))}),flowplayer.support.browser.safari&&n.on(Hls.Events.KEY_LOADED,function(e){"hlsKeyLoaded"==e&&setTimeout(function(){t.loading&&(console.log("FV Player: Safari stuck loading HLS, resuming playback..."),t.resume())},0)});var a=!(!flowplayer.conf.hd_streaming||flowplayer.support.fvmobile)&&720;localStorage.FVPlayerHLSQuality&&(a=localStorage.FVPlayerHLSQuality),(a=0==jQuery(e.root).data("hd_streaming")?!1:a)&&n.on(Hls.Events.MANIFEST_PARSED,function(e,o){var t=!1;jQuery.each(o.levels,function(e,o){o.height==a&&(t=e)}),localStorage.FVPlayerHLSQuality||t||jQuery.each(o.levels,function(e,o){o.height>t&&(t=e)}),t&&(console.log("FV Player: Picked "+o.levels[t].height+"p quality"),n.startLevel=t,n.currentLevel=t)})}),r=jQuery(r),o=document.location.search,localStorage.FVPlayerDashQuality&&(t.conf.dash||(t.conf.dash={}),t.conf.dash.initialVideoQuality="restore"),r.on("click",".fp-qsel-menu a",function(){var e;"hlsjs-lite"==t.engine.engineName&&(-1==(e=jQuery(this).data("quality"))?localStorage.removeItem("FVPlayerHLSQuality"):(e=n.levels[e],localStorage.FVPlayerHLSQuality=e.height))}),0!=r.data("hd_streaming")&&(localStorage.FVPlayerHLSQuality?(t.conf.hlsjs.startLevel=parseInt(localStorage.FVPlayerHLSQuality),t.conf.hlsjs.testBandwidth=!1,t.conf.hlsjs.autoLevelEnabled=!1):flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile&&(t.conf.hlsjs.startLevel=3,t.conf.hlsjs.testBandwidth=!1,t.conf.hlsjs.autoLevelEnabled=!1)),t.bind("quality",function(e,o,t){"dash"==o.engine.engineName&&(-1==t?localStorage.removeItem("FVPlayerDashQuality"):l[t]&&(localStorage.FVPlayerDashQuality=l[t].height))}),l=[],a=-1,t.bind("ready",function(e,o){var a;r.find(".fp-qsel-menu strong").text(fv_flowplayer_translations.quality),"dash"==o.engine.engineName?(l=o.engine.dash.getBitrateInfoListFor("video"),localStorage.FVPlayerDashQuality&&o.conf.dash.initialVideoQuality&&o.quality(o.conf.dash.initialVideoQuality),c()):"hlsjs-lite"==o.engine.engineName?(i&&(r.addClass("is-loading"),o.loading=!0,o.one("progress",function(){o.loading&&(r.removeClass("is-loading"),o.loading=!1)})),o.video.qualities&&2<o.video.qualities.length&&(a=-1,0!=r.data("hd_streaming")&&(localStorage.FVPlayerHLSQuality?jQuery(o.video.qualities).each(function(e,o){if(o.value==localStorage.FVPlayerHLSQuality)return a=localStorage.FVPlayerHLSQuality,!1}):flowplayer.conf.hd_streaming&&!flowplayer.support.fvmobile&&jQuery(o.video.qualities).each(function(e,o){var t=parseInt(o.label);0<t&&-1==a&&720<=t&&t<=720&&(a=o.value)}),-1<(a=parseInt(a)))&&r.one("progress",function(){setTimeout(function(){o.quality(a)})}),c())):o.video.sources_fvqs&&0<o.video.sources_fvqs.length&&o.video.src.match(/vimeo.*?\.mp4/)&&setTimeout(c,0),r.find("a[data-quality]").removeClass("is-current")}),(o.match(/dash_debug/)||o.match(/hls_debug/))&&(s=jQuery('<div class="fv-debug" style="background: gray; color: white; top: 10%; position: absolute; z-index: 1000">').appendTo(r.find(".fp-player"))),t.bind("ready progress",e),t.bind("quality",function(){setTimeout(e,0)}))}),flowplayer(function(a,s){var n,r,e,o,t,s=jQuery(s),i=flowplayer.bean,l=0,f=0,p=("undefined"==typeof ga&&a.conf.fvanalytics&&"undefined"==typeof _gat&&"undefined"==typeof gtag&&(is_ga_4(a)?jQuery.getScript({url:"https://www.googletagmanager.com/gtag/js?id="+a.conf.fvanalytics,cache:!0},function(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config",a.conf.fvanalytics)}):jQuery.getScript({url:"https://www.google-analytics.com/analytics.js",cache:!0},function(){ga("create",a.conf.fvanalytics,"auto")})),!window._paq&&a.conf.matomo_domain&&a.conf.matomo_site_id&&(e="//"+a.conf.matomo_domain+"/",(t=window._paq=window._paq||[]).push(["setTrackerUrl",e+"matomo.php"]),t.push(["setSiteId",a.conf.matomo_site_id]),o=(t=document).createElement("script"),t=t.getElementsByTagName("script")[0],o.type="text/javascript",o.async=!0,o.src=e+"matomo.js",t.parentNode.insertBefore(o,t)),a.bind("progress",function(e,o,t){if(1<t){var a=o.video,n=a.duration,r=0,i=fv_player_track_name(s,a);if(4<n&&(19*n/20<t?r=4:3*n/4<t?r=3:n/2<t?r=2:n/4<t&&(r=1)),o.live&&(r=0),!s.data("fv_track_"+p[r])){for(var l in p)if(p.hasOwnProperty(l)){if(l==r)break;if(!s.data("fv_track_"+p[l]))return}s.trigger("fv_track_"+p[r].replace(/ /,"_"),[o,i]),s.data("fv_track_"+p[r],!0),fv_player_track(o,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+p[r],o.engine.engineName+"/"+a.type,i)}}}).bind("finish ready ",function(e,o){for(var t in p)p.hasOwnProperty(t)&&s.removeData("fv_track_"+p[t])}).bind("error",function(e,o,t){setTimeout(function(){var e;o.error&&((e=void 0!==o.video&&void 0!==o.video.src&&o.video)||void 0===o.conf.clip||void 0===o.conf.clip.sources||void 0===o.conf.clip.sources[0]||void 0===o.conf.clip.sources[0].src||(e=o.conf.clip.sources[0]),!(e=fv_player_track_name(s,e))||e.match(/\/\/vimeo.com\/\d/)||is_ga_4(o)||fv_player_track(o,!1,"Video "+(s.hasClass("is-cva")?"Ad ":"")+"error",t.message,e))},100)}),a.bind("load unload",c).bind("progress",function(e,o){o.seeking||(l+=f?+new Date-f:0,f=+new Date),n=n||setTimeout(function(){n=null,c({type:"heartbeat"})},6e5)}).bind("pause",function(){f=0}),a.bind("shutdown",function(){i.off(window,"visibilitychange pagehide",c)}),i.on(window,"visibilitychange pagehide",c),is_ga_4(a)?["Play","25 Percent Played","50  Percent Played","75 Percent Played","100 Percent Played"]:["start","first quartile","second quartile","third quartile","complete"]);function c(e,o,t){"visible"===document.visibilityState&&"load"!==e.type&&"heartbeat"!==e.type||(t=t||a.video,"load"===e.type&&(r=fv_player_track_name(s,t)),l&&(fv_player_track(a,!1,"Video / Seconds played",a.engine.engineName+"/"+a.video.type,r,Math.round(l/1e3)),l=0,n)&&(clearTimeout(n),n=null))}a.get_time_played=function(){return l/1e3}}),flowplayer(function(n,r){var i=(r=jQuery(r)).find(".fp-player"),l=r.hasClass("fp-full"),s=0;function o(){var e=i.width()||r.width(),o=n.video.index||0,t=(900<e?jQuery(".fp-subtitle",r).addClass("is-wide"):jQuery(".fp-subtitle",r).removeClass("is-wide"),e<480+35*s),o=(void 0!==n.fv_timeline_chapters_data&&void 0!==n.fv_timeline_chapters_data[o]&&(t=!0),l||r.toggleClass("fp-full",r.hasClass("has-abloop")||t),""),t=(e<400?o="is-tiny":e<600&&400<=e&&(o="is-small"),r.trigger("fv-player-size",[o]),i),e=((t=r.parent().hasClass("fp-playlist-vertical-wrapper")||r.parent().hasClass("fp-playlist-text-wrapper")?r.parent():t).width()<=560?t.addClass("is-fv-narrow"):t.removeClass("is-fv-narrow"),r.find(".fp-controls")),o=e.parent().width(),t=e.find(".fp-duration, .fp-playbtn"),a=0;t.removeClass("wont-fit"),r.find(".fp-controls").children(":visible:not(.fp-timeline)").each(function(){a+=jQuery(this).outerWidth(!0)}),o<a&&t.addClass("wont-fit")}o();function e(){clearTimeout(f),f=setTimeout(t,a)}var t,a,f;t=o,a=250;window.addEventListener("resize",e),"fonts"in document&&n.one("load",function(){document.fonts.load("1em flowplayer")}),n.on("ready fullscreen fullscreen-exit sticky sticky-exit",function(e){setTimeout(function(){s=r.find(".fp-controls > strong:visible").length+r.find(".fp-controls > .fp-icon:visible").length,o()},0)}),n.on("unload pause finish error",function(){"undefined"!=typeof checker&&clearInterval(checker)})}),jQuery(window).on("resize tabsactivate",freedomplayer_playlist_size_check),jQuery(document).ready(freedomplayer_playlist_size_check),flowplayer(function(o,a){a=jQuery(a),o.setLogoPosition=function(){var e=freedomplayer.support.browser.safari&&parseFloat(freedomplayer.support.browser.version)<14.1||freedomplayer.support.iOS&&parseFloat(freedomplayer.support.iOS.version)<15;o.conf.logo_over_video&&o.video&&o.video.width&&o.video.height&&!e?a.find(".fp-logo").css("--fp-aspect-ratio",(o.video.width/o.video.height).toFixed(2)):a.find(".fp-logo").css("width","100%").css("height","100%")},o.bind("ready",function(e,o,t){o.setLogoPosition(),t.remove_black_bars?a.addClass("remove-black-bars"):a.removeClass("remove-black-bars"),/Chrome/.test(navigator.userAgent)&&54<parseFloat(/Chrome\/(\d\d)/.exec(navigator.userAgent)[1],10)&&(o.video.subtitles?jQuery(a).addClass("chrome55fix-subtitles"):jQuery(a).addClass("chrome55fix"))});var e=a.css("background-image");if(e){if(!(e=e.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(","))||!e[0].match(/^(https?:)?\/\//))return;var t=new Image,e=(t.src=e[0],t.height/t.width),t=a.height()/a.width();Math.abs(t-e)<.05&&a.css("background-size","cover")}var n=!1;jQuery(o.conf.playlist).each(function(e,o){o.sources[0].type.match(/youtube/)&&(n=!0)}),n&&a.addClass("is-youtube"),o.bind("ready",function(e,o,t){"video/youtube"==t.type?a.addClass("is-youtube"):a.removeClass("is-youtube")})}),(e=>{e(window).on("resize",function(){e("iframe[id][src][height][width]").each(function(){e(this).attr("id").match(/fv_vimeo_/)&&e(this).width()<=e(this).attr("width")&&e(this).height(e(this).width()*e(this).attr("height")/e(this).attr("width"))}),jQuery(".wistia_embed").each(function(){e(this).height(e(this).width()*e(this).data("ratio"))})}).trigger("resize")})(jQuery),jQuery(document).on("tabsactivate",".fv_flowplayer_tabs_content",function(e,o){var t=jQuery(o.oldPanel).find(".flowplayer").data("flowplayer");void 0!==t&&t.pause(),jQuery(".flowplayer",o.newPanel).data("flowplayer").load()}),flowplayer(function(o,a){a=jQuery(a);var e=flowplayer.bean;a.hasClass("is-audio")&&(e.off(a[0],"mouseenter"),e.off(a[0],"mouseleave"),a.removeClass("is-mouseout"),a.addClass("fixed-controls").addClass("is-mouseover"),o.on("error",function(e,o,t){jQuery(".fp-message",a).html(jQuery(".fp-message",a).html().replace(/video/,"audio"))}),a.on("click",function(e){o.ready||(e.preventDefault(),e.stopPropagation(),o.load())}))}),jQuery(document).on("mfpClose",function(){void 0!==jQuery(".flowplayer").data("flowplayer")&&jQuery(".flowplayer").data("flowplayer").unload()}),jQuery(document).on("click",".vc_tta-tab a",function(){var e=jQuery(".flowplayer.is-playing").data("flowplayer");e&&e.pause()}),flowplayer(function(e,o){o=jQuery(o),e.bind("ready",function(){setTimeout(function(){var e=jQuery("video",o);0<e.length&&e.prop("autoplay",!1)},100),o.find("video.fp-engine").addClass("intrinsic-ignore")})}),jQuery(".flowplayer").on("ready",function(e,o){/BB10/.test(navigator.userAgent)&&o.fullscreen()});var fv_flowplayer_safety_resize_arr=Array();function fv_flowplayer_safety_resize(){var o=!1;jQuery(".flowplayer").each(function(){if(jQuery(this).is(":visible")&&!jQuery(this).hasClass("lightboxed")&&!jQuery(this).hasClass("lightbox-starter")&&!jQuery(this).hasClass("is-audio")&&(jQuery(this).width()<30||jQuery(this).height()<20)){o=!0;var e=jQuery(this);while(jQuery(e).width()<30||jQuery(e).width()==jQuery(this).width()){if(0==jQuery(e).parent().length)break;(e=jQuery(e).parent()).hasClass("ld-video")&&(""==e[0].style.height&&e.css("height","auto"),0<parseInt(e.css("padding-bottom")))&&e.css("padding-bottom","0")}jQuery(this).width(jQuery(e).width()),jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio"))),fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]=e}}),o&&jQuery(window).resize(function(){jQuery(".flowplayer").each(function(){jQuery(this).hasClass("lightboxed")||jQuery(this).hasClass("lightbox-starter")||fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")]&&(jQuery(this).width(fv_flowplayer_safety_resize_arr[jQuery(this).attr("id")].width()),jQuery(this).height(parseInt(jQuery(this).width()*jQuery(this).attr("data-ratio"))))})})}void 0!==flowplayer.conf.safety_resize&&flowplayer.conf.safety_resize&&jQuery(document).ready(function(){setTimeout(function(){fv_flowplayer_safety_resize()},10)});var fv_autoplay_type,fv_player_scroll_autoplay,fv_player_scroll_autoplay_last_winner,fv_player_scroll_int,fv_player_warning,isIE11=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fv_player_lightbox_bind(){jQuery(".freedomplayer.lightbox-starter").each(function(){var e,o=jQuery(this);(parseInt(o.css("width"))<10||parseInt(o.css("height"))<10)&&((e=o.find(".fp-ratio")).length<1&&(o.append('<div class="fp-ratio"></div>'),e=o.find(".fp-ratio")),e.css("paddingTop",100*o.data("ratio")+"%")),o.find(".fp-preload").remove()})}function fv_flowplayer_mobile_switch(e){var o,t=new RegExp("[\\?&]fv_flowplayer_mobile=([^&#]*)").exec(location.search);!(null!=t&&"yes"==t[1]||jQuery(window).width()<=480||jQuery(window).height()<=480)||null!=t&&"no"==t[1]||(o=!1,jQuery("#wpfp_"+e+" video source").each(function(){jQuery(this).attr("id")!="wpfp_"+e+"_mobile"&&(o=!0,jQuery(this).remove())}),o&&jQuery("#wpfp_"+e).after('<p class="fv-flowplayer-mobile-switch">'+fv_flowplayer_translations.mobile_browser_detected_1+' <a href="'+document.URL+'?fv_flowplayer_mobile=no">'+fv_flowplayer_translations.mobile_browser_detected_2+"</a>.</p>"))}if(isIE11&&(jQuery(document).ready(function(){jQuery(".fp-waiting").hide()}),flowplayer(function(e,o){e.bind("load",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("beforeseek",function(e){jQuery(e.currentTarget).find(".fp-waiting").show()}).bind("progress",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("seek",function(e){jQuery(e.currentTarget).find(".fp-waiting").hide()}).bind("fullscreen",function(e){jQuery("#wpadminbar").hide()}).bind("fullscreen-exit",function(e){jQuery("#wpadminbar").show()})})),flowplayer.support.browser&&flowplayer.support.browser.msie&&parseInt(flowplayer.support.browser.version,10)<9&&jQuery(".flowplayer").each(function(){jQuery(this).css("width",jQuery(this).css("max-width")),jQuery(this).css("height",jQuery(this).css("max-height"))}),location.href.match(/elementor-preview=/)?(console.log("FV Player: Elementor editor is active"),setInterval(fv_player_load,1e3)):location.href.match(/brizy-edit-iframe/)?(console.log("FV Player: Brizy editor is active"),setInterval(fv_player_load,1e3)):"blob:"===location.protocol&&setTimeout(function(){jQuery("body.block-editor-iframe__body").length&&(console.log("FV Player: Site Editor is active"),setInterval(fv_player_load,1e3))},0),window.DELEGATE_NAMES&&flowplayer(function(e,o){fv_player_notice(o,fv_flowplayer_translations.chrome_extension_disable_html5_autoplay)}),flowplayer(function(e,o){flowplayer.bean.off(o,"contextmenu")}),location.href.match(/elementor-preview=/)&&(console.log("FV Player: Elementor editor is active"),setInterval(fv_player_load,1e3)),flowplayer(function(t,a){void 0!==(a=jQuery(a)).data("fv-embed")&&a.data("fv-embed")&&"false"!=a.data("fv-embed")&&(t.embedCode=function(){t.video;var e=a.width(),o=a.height();return o+=2,(a.hasClass("has-chapters")||a.hasClass("has-transcript"))&&(o+=300),0<jQuery(".fp-playlist-external[rel="+a.attr("id")+"]").length&&(o+=170),'<iframe src="'+(a.data("fv-embed")+"#"+fv_player_get_video_link_hash(t))+'" allowfullscreen allow="autoplay" width="'+parseInt(e)+'" height="'+parseInt(o)+'" frameborder="0" style="max-width:100%"></iframe>'})}),jQuery(document).on("click",".flowplayer .embed-code-toggle",function(){var e,o,t=jQuery(this).closest(".flowplayer");return"undefined"!=typeof fv_player_editor_conf?fv_player_notice(t,fv_player_editor_translations.embed_notice,2e3):(e=jQuery(this),"function"==typeof(t=(o=e.parents(".flowplayer")).data("flowplayer")).embedCode&&o.find(".embed-code textarea").val(t.embedCode()),fv_player_clipboard(o.find(".embed-code textarea").val(),function(){fv_player_notice(o,fv_flowplayer_translations.embed_copied,2e3)},function(){e.parents(".fvp-share-bar").find(".embed-code").toggle(),e.parents(".fvp-share-bar").toggleClass("visible")})),!1}),flowplayer(function(a,n){var r,i,l="fullscreen",s="fullscreen-exit",f=flowplayer.support.fullscreen,p=window,c=flowplayer.bean;a.fullscreen=function(e){if(!a.disabled&&0!=jQuery(n).data("fullscreen")){(e=void 0===e?!a.isFullscreen:e)&&(i=p.scrollY,r=p.scrollX,console.log("scrollY",i));var o,t=d.find("video.fp-engine",n)[0];if(!(flowplayer.conf.native_fullscreen&&t&&flowplayer.support.iOS))return o=jQuery(n).find(".fp-player")[0],flowplayer.support.browser.safari&&flowplayer.support.fullscreen&&e&&document.fullscreenElement&&(f=!1,document.addEventListener("fullscreenchange",function(e){flowplayer(".is-fullscreen").trigger(s)})),f?e?["requestFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].forEach(function(e){"function"==typeof o[e]&&(o