/* VimeoPlayer - v3.20.11 - 2020-06-09 - https://player.vimeo.com/NOTICE.txt */
!function(t){"use strict";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(t,n){return t(n={exports:{}},n.exports),n.exports}var e=i((function(t,i){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.6+9869a4bc
*/
t.exports=function(){function t(t){return"function"==typeof t}var i=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},e=0,r=void 0,o=void 0,u=function(t,n){h[e]=t,h[e+1]=n,2===(e+=2)&&(o?o(v):p())},a="undefined"!=typeof window?window:void 0,s=a||{},c=s.MutationObserver||s.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var h=new Array(1e3);function v(){for(var t=0;t>>0,e=arguments[1],r=0;r>>0,e=arguments[1],r=0;r>>0;if(0===e)return!1;var r=0|n,o=Math.max(r>=0?r:e-Math.abs(r),0);function u(t,n){return t===n||"number"==typeof t&&"number"==typeof n&&isNaN(t)&&isNaN(n)}for(;othis.length)&&-1!==this.indexOf(t,n)}),Object.values||(Object.values=function(t){return Object.keys(t).map((function(n){return t[n]}))});var u,a,s,c,l={object:!0,symbol:!0},f=function(t){return null!=t},d=Object.keys,h=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}()?Object.keys:function(t){return d(f(t)?Object(t):t)},v=function(t){if(!f(t))throw new TypeError("Cannot use null or undefined");return t},p=Math.max,m=function(){var t,n=Object.assign;return"function"==typeof n&&(n(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}()?Object.assign:function(t,n){var i,e,r,o=p(arguments.length,2);for(t=Object(v(t)),r=function(e){try{t[e]=n[e]}catch(t){i||(i=t)}},e=1;e-1},x=i((function(t){(t.exports=function(t,n){var i,e,r,o,u;return arguments.length<2||"string"!=typeof t?(o=n,n=t,t=null):o=arguments[2],null==t?(i=r=!0,e=!1):(i=T.call(t,"c"),e=T.call(t,"e"),r=T.call(t,"w")),u={value:n,configurable:i,enumerable:e,writable:r},o?m(y(o),u):u}).gs=function(t,n,i){var e,r,o,u;return"string"!=typeof t?(o=i,i=n,n=t,t=null):o=arguments[3],null==n?n=void 0:_(n)?null==i?i=void 0:_(i)||(o=i,i=void 0):(o=n,n=i=void 0),null==t?(e=!0,r=!1):(e=T.call(t,"c"),r=T.call(t,"e")),u={get:n,set:i,configurable:e,enumerable:r},o?m(y(o),u):u}})),S=function(t){if(!function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}(t))throw new TypeError(t+" is not a symbol");return t},A=Object.create,M=Object.defineProperties,R=Object.defineProperty,C=Object.prototype,O=A(null);if("function"==typeof Symbol){u=Symbol;try{String(u()),c=!0}catch(t){}}var I=function(){var t=A(null);return function(n){for(var i,e,r=0;t[n+(r||"")];)++r;return t[n+=r||""]=!0,R(C,i="@@"+n,x.gs(null,(function(t){e||(e=!0,R(this,i,x(t)),e=!1)}))),i}}();s=function(t){if(this instanceof s)throw new TypeError("TypeError: Symbol is not a constructor");return a(t)};var j=a=function t(n){var i;if(this instanceof t)throw new TypeError("TypeError: Symbol is not a constructor");return c?u(n):(i=A(s.prototype),n=void 0===n?"":String(n),M(i,{F:x("",n),V:x("",I(n))}))};M(a,{for:x((function(t){return O[t]?O[t]:O[t]=a(String(t))})),keyFor:x((function(t){var n;for(n in S(t),O)if(O[n]===t)return n})),hasInstance:x("",u&&u.hasInstance||a("hasInstance")),isConcatSpreadable:x("",u&&u.isConcatSpreadable||a("isConcatSpreadable")),iterator:x("",u&&u.iterator||a("iterator")),match:x("",u&&u.match||a("match")),replace:x("",u&&u.replace||a("replace")),search:x("",u&&u.search||a("search")),species:x("",u&&u.species||a("species")),split:x("",u&&u.split||a("split")),toPrimitive:x("",u&&u.toPrimitive||a("toPrimitive")),toStringTag:x("",u&&u.toStringTag||a("toStringTag")),unscopables:x("",u&&u.unscopables||a("unscopables"))}),M(s.prototype,{constructor:x(a),toString:x("",(function(){return this.V}))}),M(a.prototype,{toString:x((function(){return"Symbol ("+S(this).F+")"})),valueOf:x((function(){return S(this)}))}),R(a.prototype,a.toPrimitive,x("",(function(){var t=S(this);return"symbol"==typeof t?t:t.toString()}))),R(a.prototype,a.toStringTag,x("c","Symbol")),R(s.prototype,a.toStringTag,x("c",a.prototype[a.toStringTag])),R(s.prototype,a.toPrimitive,x("c",a.prototype[a.toPrimitive]));var D=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(t){return!1}return!!l[typeof Symbol.iterator]&&!!l[typeof Symbol.toPrimitive]&&!!l[typeof Symbol.toStringTag]}()?Symbol:j,L=window.Map||function(){var t,n,i,e=function(){n=[],i=[]},r=function(i){return-1<(t=n.indexOf(i))};return e(),{get size(){return n.length},has:r,clear:e,get:function(t){return i[n.indexOf(t)]},keys:function(){return n.slice()},values:function(){return i.slice()},entries:function(){return n.map((function(t,n){return[t,i[n]]}))},delete:function(e){return r(e)&&n.splice(t,1)&&!!i.splice(t,1)},forEach:function(t,e){var r=this;i.forEach((function(i,o){return t.call(e,i,n[o],r)}))},set:function(e,o){return r(e)?i[t]=o:i[n.push(e)-1]=o,this}}},N=window.WeakMap||function(){var t=Object.defineProperty,n=Date.now()%1e9,i=function(){this.name="__st"+(1e9*Math.random()>>>0)+n+++"__"};return i.prototype.set=function(n,i){if("object"!==U(n)&&"function"!=typeof n)throw new TypeError("Invalid value used as weak map key");var e=n[this.name];return e&&e[0]===n?e[1]=i:t(n,this.name,{value:[n,i],writable:!0}),this},i.prototype.get=function(t){var n;return(n=t[this.name])&&n[0]===t?n[1]:void 0},i.prototype.delete=function(t){var n=t[this.name];return!(!n||n[0]!==t||(n[0]=n[1]=void 0,0))},i.prototype.has=function(t){var n=t[this.name];return!!n&&n[0]===t},i}(),P=window.Array.from,F=[1];"function"==typeof P&&P(F)===F&&(P=!1);var V=P||function(t){return[].slice.call(t,0)};function U(t){return(U="function"==typeof D&&"symbol"==typeof D.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof D&&t.constructor===D&&t!==D.prototype?"symbol":typeof t})(t)}function B(t,n){for(var i=0;i1?i-1:0),r=1;r1?i-1:0),r=1;r=t){i=n.end(e);break}return i-t}function dt(t,n){if(!n||!n.length)return 0;if(1===n.length&&n.end(0)-n.start(0)<1e-6)return 0;for(var i=0,e=n.length-1;e>=0&&n.end(e)>t;--e)i+=n.end(e)-Math.max(n.start(e),t);return i}function ht(t){return"string"!=typeof t?{}:t.replace("?","").split("&").reduce((function(t,n){if(n.length>0){var i=Q(n.split("="),2),e=i[0],r=i[1];t[e]=decodeURIComponent(r)}return t}),{})}function vt(t){var n=document.createElement("a");return n.href=t,n}function pt(t,n){var i=function(t){if("object"!==U(t))return"";var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return n.length?n.join("&"):""}(n);return"".concat(t).concat(i?"?".concat(i):"")}function mt(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}function wt(t){return t}var bt=Math.max;function gt(t,n,i){return n=bt(void 0===n?t.length-1:n,0),function(){for(var e=arguments,r=-1,o=bt(e.length-n,0),u=Array(o);++r0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}(Gt);function Yt(t,n){return Kt(gt(t,n,wt),t+"")}function Jt(t,n){return t===n||t!=t&&n!=n}function Xt(t,n){for(var i=t.length;i--;)if(Jt(t[i][0],n))return i;return-1}var Zt=Array.prototype.splice;function Qt(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n-1},Qt.prototype.set=function(t,n){var i=this.$,e=Xt(i,t);return e<0?(++this.size,i.push([t,n])):i[e][1]=n,this};var tn=qt(Et,"Map"),nn=qt(Object,"create"),en=Object.prototype.hasOwnProperty,rn=Object.prototype.hasOwnProperty;function on(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n-1&&t%1==0&&t<=9007199254740991}function Nn(t){return null!=t&&Ln(t.length)&&!jt(t)}var Pn="object"==(void 0===t?"undefined":U(t))&&t&&!t.nodeType&&t,Fn=Pn&&"object"==("undefined"==typeof module?"undefined":U(module))&&module&&!module.nodeType&&module,Vn=Fn&&Fn.exports===Pn?Et.Buffer:void 0,Un=(Vn?Vn.isBuffer:void 0)||function(){return!1},Bn=Function.prototype,Hn=Object.prototype,zn=Bn.toString,qn=Hn.hasOwnProperty,Wn=zn.call(Object);function Gn(t){if(!Mn(t)||"[object Object]"!=Ot(t))return!1;var n=Tn(t);if(null===n)return!0;var i=qn.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&zn.call(i)==Wn}var $n={};function Kn(t){return function(n){return t(n)}}$n["[object Float32Array]"]=$n["[object Float64Array]"]=$n["[object Int8Array]"]=$n["[object Int16Array]"]=$n["[object Int32Array]"]=$n["[object Uint8Array]"]=$n["[object Uint8ClampedArray]"]=$n["[object Uint16Array]"]=$n["[object Uint32Array]"]=!0,$n["[object Arguments]"]=$n["[object Array]"]=$n["[object ArrayBuffer]"]=$n["[object Boolean]"]=$n["[object DataView]"]=$n["[object Date]"]=$n["[object Error]"]=$n["[object Function]"]=$n["[object Map]"]=$n["[object Number]"]=$n["[object Object]"]=$n["[object RegExp]"]=$n["[object Set]"]=$n["[object String]"]=$n["[object WeakMap]"]=!1;var Yn="object"==(void 0===t?"undefined":U(t))&&t&&!t.nodeType&&t,Jn=Yn&&"object"==("undefined"==typeof module?"undefined":U(module))&&module&&!module.nodeType&&module,Xn=Jn&&Jn.exports===Yn&&_t.process,Zn=function(){try{return Jn&&Jn.require&&Jn.require("util").types||Xn&&Xn.binding&&Xn.binding("util")}catch(t){}}(),Qn=Zn&&Zn.isTypedArray,ti=Qn?Kn(Qn):function(t){return Mn(t)&&Ln(t.length)&&!!$n[Ot(t)]};function ni(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var ii=Object.prototype.hasOwnProperty;function ei(t,n,i){var e=t[n];ii.call(t,n)&&Jt(e,i)&&(void 0!==i||n in t)||cn(t,n,i)}function ri(t,n,i,e){var r=!i;i||(i={});for(var o=-1,u=n.length;++o-1&&t%1==0&&t1?i[r-1]:void 0,u=r>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,u&&function(t,n,i){if(!It(i))return!1;var e=U(n);return!!("number"==e?Nn(i)&&ui(n,i.length):"string"==e&&n in i)&&Jt(i[n],t)}(i[0],i[1],u)&&(o=r<3?void 0:o,r=1),n=Object(n);++e0&&void 0!==arguments[0]?arguments[0]:this.X;n.addEventListener(wi.LOADED_METADATA,(function(n){t.fire(wi.LOADED_METADATA,n)})),n.addEventListener("webkitplaybacktargetavailabilitychanged",(function(n){switch(n.availability){case"available":t.K||(t.K=!0,t.fire(gi.AIRPLAY_AVAILABLE));break;case"not-available":t.K&&(t.K=!1,t.fire(gi.AIRPLAY_UNAVAILABLE))}})),n.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",(function(n){if(n.target.webkitCurrentPlaybackTargetIsWireless)return t.Y=!0,void t.fire(gi.AIRPLAY_ACTIVATED);t.Y=!1,t.fire(gi.AIRPLAY_DEACTIVATED)}))},n.showPicker=function(){var t=this;this.X.webkitShowPlaybackTargetPicker(),this.loadMetadata().then((function(){return t.X.webkitShowPlaybackTargetPicker()})).catch((function(){}))},n.loadMetadata=function(){var t=this;return this.X.readyState>=1?r.resolve():new r((function(n,i){t.X.addEventListener(wi.LOADED_METADATA,(function(){n()})),t.X.src=t.getFile().src}))},H(AirPlayExternalDisplay,[{key:"element",get:function(){return this.X},set:function(t){if(!(t instanceof HTMLVideoElement))throw new TypeError("The element for AirPlay must be a
'+t.bandwidthSeriesSvg+"
"),n+="",t.sessionId&&t.showSessionId&&(n+='Debug Key:
'+t.sessionId+"
"),n+""},n.templates.icon_airplay=function(t){return''},n.templates.icon_back=function(t){return''},n.templates.icon_broken_heart=function(t){return''},n.templates.icon_card_arrow=function(t){return''},n.templates.icon_cc=function(t){return''},n.templates.icon_chapters=function(t){return''},n.templates.icon_check=function(t){return''},n.templates.icon_clock=function(t){return''},n.templates.icon_close_new=function(t){return''},n.templates.icon_close=function(t){return''},n.templates.icon_collections=function(t){return''},n.templates.icon_embed=function(t){return''},n.templates.icon_facebook=function(t){return''},n.templates.icon_fast_forward=function(t){return''},n.templates.icon_follow=function(t){return''},n.templates.icon_fullscreen=function(t){return''},n.templates.icon_gear=function(t){return''},n.templates.icon_heart=function(t){return''},n.templates.icon_line_arrow=function(t){return''},n.templates.icon_live_viewers=function(t){return''},n.templates.icon_lock=function(t){return''},n.templates.icon_mail=function(t){return''},n.templates.icon_muted=function(t){return''},n.templates.icon_pause=function(t){return''},n.templates.icon_pip=function(t){return''},n.templates.icon_play=function(t){return''},n.templates.icon_prev=function(t){return''},n.templates.icon_replay=function(t){return''},n.templates.icon_share=function(t){return''},n.templates.icon_spin=function(t){return''},n.templates.icon_stereoscopic=function(t){return''},n.templates.icon_tumblr=function(t){return''},n.templates.icon_twitter=function(t){return''},n.templates.icon_unfullscreen=function(t){return''},n.templates.icon_vod_download=function(t){return''},n.templates.icon_vod_rent=function(t){return''},n.templates.icon_vod_subscribe=function(t){return''},n.templates.icon_vod=function(t){return''},n.templates.icon_warning=function(t){return''},n.templates.live_status=function(t){return''},n.templates.live_viewer_count=function(t){var n=' ';return(n+=this.render("icon_live_viewers")||"")+'
0 '},n.templates.logo=function(t){return''},n.templates.menu_list_panel=function(t){var n=' ';for(var i=0;i ',t.items[i].index&&(n+=''+t.items[i].index+""),n+=' '+t.items[i].label+" ","chapters"===t.id&&(n+=' '),n+=" ";return n+'
'},n.templates.menu=function(t){var n='"},n.templates.nudge=function(t){var n=' ';return n+=this.render("icon_fast_forward")||"",n+='
',(n+=this.render("icon_fast_forward")||"")+"
"},n.templates.outer=function(t){var n=' ';return n+=this.render("icon_spin")||"",n+='
This opens in a new window.'},n.templates.sidedock=function(t){var n="";return t.vodButton&&(n+=' '),t.likeButton&&(n+='
"),t.watchLaterButton&&(n+='
"),t.collectionsButton&&(n+='
"),t.shareButton&&(n+='
"),t.vodButton&&(n+="
"),n+""},n.templates.app_redirect=function(t){var n=' ';return t.strings.title&&(n+='
'+t.strings.title+"
"),t.hideRedirectButton||(n+='
"),t.strings.ignoreText&&(n+='
'+t.strings.ignoreText+"
"),t.strings.bottomText&&(n+='
'+t.strings.bottomText+"
"),n+"
"},n.templates.email_capture=function(t){var n=' ';return t.customLogo&&(n+='
'),n+='
',n+=this.escape(t.text)||"",n+="
",t.subtitle&&(n+='
',n+=this.escape(t.subtitle)||"",n+="
"),n+='
'+t.strings.disclaimer+'
',(n+=this.escape(t.confirmation)||"")+"
"},n.templates.error=function(t){var n=' ';return t.title&&(n+="
"+t.title+"
"),t.message&&(n+="
"+t.message+"
"),n+"
"},n.templates.help=function(t){var n=''+t.strings.title+'
- ↑
- '+t.strings.volumeUp+'
- ↓
- '+t.strings.volumeDown+'
- →
- '+t.strings.scrubForward+'
- ←
- '+t.strings.scrubBackwards+'
- L
- '+t.strings.like+'
- S
- '+t.strings.share+'
- W
- '+t.strings.watchLater+'
- C
- '+t.strings.captions+'
- H
- '+t.strings.prefs+'
- F
- '+t.strings.fullscreen+"
";return t.onSite||(n+='- V
- '+t.strings.viewOnVimeo+"
"),n+"
"},n.templates.outro_email=function(t){var n=''},n.templates.outro_image=function(t){var n='"},n.templates.outro_link=function(t){var n=' ',t.title&&(n+='
',n+=this.escape(t.title)||"",n+="
"),t.description&&(n+='
',n+=this.escape(t.description)||"",n+="
"),t.text&&t.url&&(n+='
"),t.text2&&t.url2&&(n+='
"),n+"
"},n.templates.outro_nothing=function(t){return''},n.templates.outro_share=function(t){var n='"},n.templates.outro_staticimage=function(t){var n='"},n.templates.outro_text=function(t){return'"},n.templates.outro_videos=function(t){var n=' ';var i=0;for(t.contexts.length;i
';var r=0;for(e.videos.length;r ";n+="
"}return n+""},n.templates.outro_vod=function(t){var n=' ";var i=t.countries,e=t.country;if(this.helpers.isAvailableInCountry(i,e))if(t.purchased)n+='
'+t.strings.watch+" ";else{if(!t.isComingSoon){n+='
"}(t.isPreorder||t.isComingSoon)&&(n+="
"+t.strings.preRelease+"
")}return n+"
"},n.templates.password=function(t){return''},n.templates.private_locked=function(t){return''+t.strings.title+'
'+t.strings.subtitle+'
"},n.templates.private_unlocked=function(t){return''+t.strings.title+'
'+t.strings.subtitle+'
"},n.templates.share=function(t){var n=''+t.strings.share+'
",t.embed&&(n+=' "),t.url&&(n+=' "),n+=" ",t.embed&&(n+='
'+t.strings.embedTitle+'
'+t.strings.embedSubtitle+'
",t.customizeEmbed&&(n+=' "),n+="
"),n+"
"},n.templates.threesixty_reminder=function(t){var n=' ';return t.showArrows&&(n+='
'),n+"
"+t.text+"
"},n.templates.time_series_graph=function(t){return'"},n.templates.title_byline_badge=function(t){var n="";return t.displayBadge&&(n+=" ",t.link&&(n+='"),n+=' '+t.cssClass+"",t.link&&(n+=""),n+=""),n+""},n.templates.title_owner_byline=function(t){var n="";return t.linkToOwner?(n+='',n+=this.escape(t.owner)||"",n+=""):(n+='',n+=this.escape(t.owner)||"",n+=""),n+""},n.templates.title=function(t){var n='"},n.templates.unmute_button=function(t){var n='"},t.exports?t.exports=n:window.Aftershave=n}()}));function hd(t,n){var i,e=t.querySelector(".vp-shade"),r=t.querySelector(".vp-spin");function o(){clearTimeout(i),e.classList.add("vp-shade-invisible"),r.classList.add("vp-spin-invisible")}return n.on(yi.BUFFER_STARTED,(function(){clearTimeout(i),i=setTimeout((function(){e.classList.remove("vp-shade-invisible"),r.classList.remove("vp-spin-invisible")}),600)})),n.on([yi.BUFFER_ENDED,Pc.He],o),kl.on(gl.buffering,(function(){r.classList.remove("vp-spin-invisible")})),kl.on([gl.playing,gl.paused],(function(){clearTimeout(i),r.classList.add("vp-spin-invisible")})),kl.on(gl.connected,(function(){e.classList.remove("vp-shade-invisible")})),kl.on(gl.disconnected,(function(){o()})),{}}var vd=function(t){return function(n){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r=12?"PM":"AM";return(n=(n%=12)||12)+":"+(i=i<10?"0"+i:i)+" "+e}function yd(t,n){var i=Math.floor(t/3600%60),e=Math.floor(t/60%60);if(t=Math.floor(t%60),n){var r=t+" second"+(1===t?"":"s");return e>0&&(r=e+" minute"+(1===e?"":"s")+", "+r),i>0&&(r=i+" hour"+(1===i?"":"s")+", "+r),r}return(i>0?i+":":"")+_d(e,2)+":"+_d(t,2)}function _d(t,n,i){return t=String(t),new Array(n-t.length+1).join(i||"0")+t}function kd(t,n,i){var e=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return It(i)&&(e="leading"in i?!!i.leading:e,r="trailing"in i?!!i.trailing:r),dl(t,n,{leading:e,maxWait:n,trailing:r})}var Ed=function(){if(void 0!==L)return L;function t(t,n){var i=-1;return t.some((function(t,e){return t[0]===n&&(i=e,!0)})),i}return(function(){function n(){this.kf=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.kf.length},enumerable:!0,configurable:!0}),n.prototype.get=function(n){var i=t(this.kf,n),e=this.kf[i];return e&&e[1]},n.prototype.set=function(n,i){var e=t(this.kf,n);~e?this.kf[e][1]=i:this.kf.push([n,i])},n.prototype.delete=function(n){var i=this.kf,e=t(i,n);~e&&i.splice(e,1)},n.prototype.has=function(n){return!!~t(this.kf,n)},n.prototype.clear=function(){this.kf.splice(0)},n.prototype.forEach=function(t,n){void 0===n&&(n=null);for(var i=0,e=this.kf;i0},t.prototype.connect_=function(){Td&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Md?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Td&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var n=t.propertyName,i=void 0===n?"":n;Ad.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Cd=function(t,n){for(var i=0,e=Object.keys(n);i0},t}(),Bd=void 0!==N?new N:new Ed,Hd=function t(n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Rd.getInstance(),e=new Ud(n,i,this);Bd.set(this,e)};["observe","unobserve","disconnect"].forEach((function(t){Hd.prototype[t]=function(){var n;return(n=Bd.get(this))[t].apply(n,arguments)}}));var zd=void 0!==xd.ResizeObserver?xd.ResizeObserver:Hd;function qd(t,n,i){var e=u()?i.parentElement:i,r=kd(o,150);function o(){var t=ec(e),i=t.width,r=t.height;n.dispatch(function(t,n){return{type:"CONTAINER_RESIZE",payload:{width:t,height:n}}}(i,r))}function u(){return i.parentElement===document.body}function a(t){var n=t.size,r=t.ratio,o=t.bottom;u()&&(e.classList.toggle("vp-center","contain"===n),function(t,n){[].concat(["height","max-width","max-height","bottom"]).map((function(n){return t.style.removeProperty(n)}))}(i),"contain"!==n?o>0&&mc(i,{height:"calc(100% - ".concat(o,"px)"),bottom:"".concat(o/2,"px")}):mc(i,o>0?{maxWidth:"calc((100vh - ".concat(o,"px) / ").concat(r,")"),maxHeight:"calc(100vh - ".concat(o,"px)"),height:"calc(".concat(r," * 100vw)"),bottom:"".concat(o/2,"px")}:{maxWidth:"calc(100vh / ".concat(r,")"),height:"calc(".concat(r," * 100vw)")}))}n.watch("ui.layout.bottom",(function(n){t.events.fire(Pc._l,[{bottom:n}])})),n.watch("ui.layout.settings",a),a(n.get("ui.layout.settings")),new zd(r).observe(e),window.addEventListener("orientationchange",r),t.events.on(Pc.cc,r),t.events.on(Pc.fc,r),o()}function Wd(t,n,i){this.constructorName="MessageApiError",this.message=t,this.name=n,this.source=i}function Gd(t){return t}function $d(t){if(!t||""===t)return{};if("object"===U(t))return t;try{return JSON.parse(t)}catch(t){return{}}}function Kd(t){}Wd.prototype=new Error;var Yd={captureException:function(t){},captureMessage:function(t){},captureBreadcrumb:function(){}},Jd=Yd,Xd=function(t){Jd=Object.assign({},Yd,t)},Zd=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"backbone",e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"info";return Jd.captureBreadcrumb(t,n,i,e)};function Qd(t){var n=function(t){var n=document.referrer||t;try{n=decodeURIComponent(n)}catch(t){n=unescape(n)}return n}(t),i={},e={},o={parseMessage:$d,buildMessage:Gd,logError:Kd},u={},a={get methods(){return i},extendMethods:function(){for(var t=arguments.length,n=new Array(t),e=0;e1?n-1:0),e=1;e-1))try{var a=function(t,n){if(!t)return null;var i=Object.getOwnPropertyDescriptor(n,t);if(i&&"function"==typeof i.value)return i.value;if(i&&"function"==typeof i.get)return i.get;var e=t.substr(0,3),r=t.substr(3,1).toLowerCase()+t.substr(4);return i=Object.getOwnPropertyDescriptor(n,r),"get"===e&&i&&"function"==typeof i.get?i.get:"set"===e&&i&&"function"==typeof i.set?i.set:null}(e,i);if(!a)throw new Wd("“".concat(t,"” is not a valid method. Valid methods are: ").concat(function(t){return Object.keys(t).reduce((function(n,i){var e=Object.getOwnPropertyDescriptor(t,i);return"function"==typeof e.value?(n.push(i),n):("function"==typeof e.get&&n.push("get"+i.charAt(0).toUpperCase()+i.slice(1)),"function"==typeof e.set&&n.push("set"+i.charAt(0).toUpperCase()+i.slice(1)),n)}),[]).sort()}(i).join(", "),"."),"TypeError",e);Zd("API message received",n,"api"),r.resolve(a.call(t,u)).then((function(t){return c({method:e,value:null==t?u:t})})).catch(o.logError)}catch(t){o.logError(t)}}}),!1),a}var th=self!==top,nh=function(){var t=document.createElement("video"),n={request:["requestFullscreen","webkitRequestFullscreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"],exit:["exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],enabled:["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],element:["fullscreenElement","webkitFullscreenElement","webkitCurrentFullScreenElement","mozFullScreenElement","msFullscreenElement"],change:["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],error:["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"]},i={};for(var e in n)for(var r=0,o=n[e].length;r0){var i=lh.pop();n=n||i.element,i.error.call(n,t),ph.onerror(n,t),oh(ih.ERROR,n,t)}},ph={request:function(t,n,i,e){if(t=t||document.body,lh.push({element:t,enter:n||ch,exit:i||ch,error:e||ch}),void 0===nh.request)return fh(t);if(th&&!1===document[nh.enabled])return fh(t);try{t[nh.request]()}catch(n){vh("not_enabled",t)}},exit:function(){!document[nh.exit]&&ph.element?ph.element[nh.exit]():document[nh.exit]()},toggle:function(t,n,i,e){ph.element?ph.exit():ph.request(t,n,i,e)},videoEnabled:function(t){if(ph.enabled)return!0;var n=ah(t=t||document.body);return!(!n||void 0===n.webkitSupportsFullscreen)&&(n.readyState-1&&rh[t].splice(i,1)})),onenter:ch,onexit:ch,onchange:ch,onerror:ch};try{Object.defineProperties(ph,{element:{enumerable:!0,get:function(){return sh&&sh.webkitDisplayingFullscreen?sh:document[nh.element]||null}},enabled:{enumerable:!0,get:function(){return document[nh.enabled]||!1}}})}catch(t){ph.element=null,ph.enabled=!1}function mh(t){return"string"==typeof(t=t.replace("#",""))&&(3===t.length||6===t.length)&&!isNaN(parseInt(t,16))}function wh(t){var n=/rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*([\d.]+))?\)/.exec(t);if(!n)throw new Error("Invalid rgb value");return{red:parseInt(n[1],10),green:parseInt(n[2],10),blue:parseInt(n[3],10),alpha:parseFloat(n[5])||1}}function bh(){for(var t=arguments.length,n=new Array(t),i=0;i=0)return this.rgba=wh(n[0]),this;if(!mh("".concat(n[0])))throw new Error("Invalid hex value");return this.hex=n[0],this}if(3===n.length||4===n.length){for(var r=0;r<3;r++)if(isNaN(parseInt(n[r],10))||parseInt(n[r],10)<0||parseInt(n[r],10)>255)throw new Error("Invalid rgb value");if(n[3]&&parseFloat(n[3])<0||parseFloat(n[3])>1)throw new Error("Invalid alpha value");return this.rgba={red:n[0],green:n[1],blue:n[2],alpha:parseFloat(n[3])||1},this}throw new Error("Invalid color")}function gh(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||"null"===t||0===n.length)return{track:null};var i=t.split("."),e=Q(i,2),r=e[0],o=e[1],u=r.split(/[-_]/),a=Q(u,1),s=a[0],c=r!==s,l=n.filter((function(t){return c&&t.language===r||t.language===s})).sort((function(t,n){var i=2*(t.language===s&&t.kind===o)+2*(t.language===r)+1*(t.kind===o);return 2*(n.language===s&&n.kind===o)+2*(n.language===r)+1*(n.kind===o)-i}));return l.length>0?{track:l[0],exactMatch:l[0].language===r&&l[0].kind===o}:{track:null}}function yh(t,n){switch(t.view){case 2:throw new Wd("The video is private.","PrivacyError",n);case 4:throw new Wd("The video is password-protected. The viewer must enter the password first.","PasswordError",n);case 7:throw new Wd(t.message,"NotFoundError",n)}}function _h(t){for(var n=[],i=0;it.config.video.duration)throw new Wd("Cue point time must be positive number less than the duration of the video (".concat(fc(t.config.video.duration),")."),"RangeError","addCuePoint");try{var e=t.backbone.addCuePoint(n,i);return setTimeout((function(){o.fire(Pc.tc,e)}),0),e.id}catch(t){if("CuePointsNotSupported"===t.name)throw new Wd("Cue points are not supported in the current player.","UnsupportedError","addCuePoint");throw new Wd("Unable to add cue point","InvalidCuePoint","addCuePoint")}},removeCuePoint:function(n){var i=t.backbone.cuePoints.filter((function(t){return t.id===n}))[0];if(!i)throw new Wd("Cue point “".concat(n,"” was not found."),"InvalidCuePoint","removeCuePoint");t.backbone.removeCuePoint(i),setTimeout((function(){o.fire(Pc.nc,i)}),0)},enableTextTrack:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,u=("text_tracks"in t.config.request?t.config.request.text_tracks:[]).map((function(t){return t.language=t.lang,t})),a=u.some((function(t){return t.language.toLowerCase()===n.toLowerCase()}));if(!a)throw new Wd("There are no tracks for “".concat(n.toUpperCase(),"”."),"InvalidTrackLanguageError","enableTextTrack");var s=e?"".concat(n,".").concat(e):n,c=gh(s,u),l=c.track;if(!l||e&&l.kind!==e)throw new Wd("There are no ".concat(e," tracks for “").concat(n.toUpperCase(),"”."),"InvalidTrackError","enableTextTrack");return o.fire(Sc.rs,l.id),i<3?null:new r((function(t,n){o.once(Pc.Qs,(function(n,i){t({label:n.label,language:n.language,kind:n.kind})}))}))},disableTextTrack:function(){o.fire(Sc.os)},toggleFullscreen:function(t){var n={not_supported:{name:"UnsupportedError",msg:"Fullscreen is not supported at all or for this element."},not_enabled:{name:"Error",msg:"The request was made from an iframe that does not allow fullscreen."},not_allowed:{name:"NotAllowedError",msg:"The request failed, probably because it was not called from a user-initiated event."}};return new r((function(i,e){if(!ph.element===t)return ph.on("enter",(function t(){ph.off("enter",t),i()})),ph.on("error",(function i(r,o){ph.off("error",i);var u=n[o]||n.not_supported;e(new Wd(u.msg,u.name,"".concat(t?"request":"exit","Fullscreen")))})),void o.fire(Pc.Ns);i()}))},requestFullscreen:function(){return v.toggleFullscreen(!0)},exitFullscreen:function(){return v.toggleFullscreen(!1)},get fullscreen(){return!!ph.element},get autopause(){return!!t.config.embed.autopause},set autopause(n){t.config.embed.autopause=!!n},get chromecasting(){return!!kl.currentSession},get color(){return t.config.embed.color.replace("#","")},set color(n){if(t.config.embed.settings.color&&!t.config.embed.on_site)throw new Wd("The creator of the video has chosen to always use ".concat(new bh(t.config.embed.color).hex,"."),"EmbedSettingsError","setColor");try{var i=new bh(n);o.fire(Sc.Xa,i.hex)}catch(t){throw new Wd("The color should be 3- or 6-digit hex value.","TypeError","setColor")}var e=new bh(23,35,34,.75);if(e.contrast(i).ratio<3){var r=i.clone().lighten(5,3,e);throw new Wd("".concat(i.hex," does not meet minimum contrast ratio. We recommend using brighter colors. (You could try ").concat(r.hex," instead.) See WCAG 2.0 guidelines: http://www.w3.org/TR/WCAG/#visual-audio-contrast"),"ContrastError","setColor")}},get cuePoints(){return t.backbone.cuePoints.map((function(t){return{time:t.time,data:t.data,id:t.id}}))},get currentTime(){return t.currentTime},set currentTime(n){if(n=parseFloat(n),isNaN(n)||n<0||n>t.config.video.duration)throw new Wd("Seconds must be a positive number less than the duration of the video (".concat(fc(t.config.video.duration),")."),"RangeError","setCurrentTime");return o.fire(Fc.Ha),o.fire(Sc.Ha,null,n),o.fire(Pc.Vc),i<3?null:new r((function(t,n){o.once(wi.SEEKED,(function(n){var i=n.currentTime;t(i)}))}))},get duration(){return fc(t.config.video.duration)},get ended(){return!!t.backbone.ended},get loop(){return!!t.config.embed.loop},set loop(t){o.fire(Sc.Ka,t)},set muted(n){t.backbone.muted=n},get muted(){return t.backbone.muted},get paused(){return!(t.backbone&&"paused"in t.backbone&&!t.backbone.paused)},get buffered(){return _h(t.backbone.buffered)},get played(){return _h(t.backbone.played)},get seekable(){return _h(t.backbone.seekable)},get seeking(){return t.backbone.seeking},get playbackRate(){return t.backbone?t.backbone.playbackRate:1},set playbackRate(n){if(!t.config.embed.settings.speed)throw new Wd("Setting the playback rate is not enabled for this video.","Error","setPlaybackRate");if(isNaN(n)||n>2)throw new Wd("Playback rate should be a number below or equal to ".concat(2,"."),"RangeError","setPlaybackRate");o.fire(Sc.ps,n)},get textTracks(){return(t.backbone?t.backbone.video.textTracks:[]).map((function(t){return{label:t.label,language:t.language,kind:t.kind,mode:t===f?"showing":"disabled"}}))},get videoEmbedCode(){return t.config.video.embed_code},get videoHeight(){return t.backbone.videoHeight||t.config.video.height},get videoId(){return t.config.video.id},get videoTitle(){return t.config.video.title},get videoWidth(){return t.backbone.videoWidth||t.config.video.width},get videoUrl(){if(!t.config.video.url)throw new Wd("The URL is not available because of the video’s privacy settings.","PrivacyError","getVideoUrl");return t.config.video.url},get volume(){var n=fc(t.config.request.cookie.volume);return 1===i?Math.round(100*n):n},set volume(t){if(t=parseFloat(t),1===i&&(t/=100),isNaN(t)||t<0||t>1)throw new Wd("Volume should be a number between 0 and 1.","RangeError","setVolume");d=t,o.fire(Sc.za,t,!0)},_loadVideo:function(n,i){return t.loadVideo(n,i)},get _like(){return!!t.config.user.liked},set _like(n){if(t.config.embed.on_site){if(t.config.user.liked===n)return;o.fire(Pc.dc,n)}},get _watchLater(){return!!t.config.user.watch_later},set _watchLater(n){if(t.config.embed.on_site){if(t.config.user.watch_later===n)return;o.fire(Pc.hc,n)}},get currentChapter(){var n=t.backbone.currentChapterID;if(!n)return null;var i=V(t.backbone.chapters),e=i.findIndex((function(t){return n===t.id}));return{startTime:i[e].startTime,title:i[e].text,index:e+1}},get chapters(){return V(t.backbone.chapters).map((function(t,n){return{startTime:t.startTime,title:t.text,index:n+1}}))},_addChapter:function(n,i){if(n=parseFloat(n),isNaN(n)||n<0||n>t.config.video.duration)throw new Wd("Chapter timecode must be positive number less than the duration of the video (".concat(fc(t.config.video.duration),")."),"RangeError","addCuePoint");try{t.backbone.addChapter(n,i)}catch(t){if("ChaptersNotSupported"===t.name)throw new Wd(t.message,"UnsupportedError","_addChapter");throw new Wd("Unable to add chapter","InvalidChapter","_addChapter")}},_removeChapter:function(n){var i;try{i=t.backbone.chapters.getCueById(n)}catch(t){throw new Wd("Chapters are not supported in this browser.","UnsupportedError","_removeChapter")}if(!i)throw new Wd("Chapter was not found.","InvalidChapter","_removeChapter");try{t.backbone.removeChapter(i)}catch(t){if("ChaptersNotSupported"===t.name)throw new Wd("Chapters are not supported in this browser.","UnsupportedError","_removeChapter");throw new Wd("Unable to remove chapter","InvalidChapter","_removeChapter")}},_addCard:function(t){o.fire(Sc._addCard,t)},_removeCard:function(t){o.fire(Sc._removeCard,t)},_setOutro:function(n,i){t.config.embed.outro!==n?(o.fire(Sc._hideOutro),setTimeout((function(){t.config.embed.outro=n,o.fire(Sc.as,n,i)}),400)):o.fire(Sc.as,n,i)},_hideOutro:function(){o.fire(Sc._hideOutro)},_setEmailCapture:function(n){if(n){if(t.config.embed.email=t.config.embed.email||{},t.config.embed.email.position=n.position.toLowerCase(),"after"===n.position.toLowerCase())return t.config.embed.outro="email",void o.fire(Sc.as,"email",{version:2,data:n});t.config.embed.email.timecode=n.timecode,n.nohide=!0,n.noblur=!0,n.nofocus=na(n,"nofocus",!0),v._showOverlay("email-capture",n)}else v._unsetEmailCapture()},_unsetEmailCapture:function(){t.config.embed.outro&&(o.fire(Sc._hideOutro),delete t.config.embed.outro),t.config.embed.email&&(o.fire(Sc.Wa,{unmakeModal:!0}),delete t.config.embed.email)},_showOverlay:function(t,n){o.fire(Sc._showOverlay,t,n)},_fireEvent:function(){for(var t=arguments.length,n=new Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:[],i=t||{},e=i.language,r=void 0===e?null:e,o=i.label,u=void 0===o?null:o,a=i.kind,s=void 0===a?null:a;return{label:u,language:r,kind:s,cues:n}}))),o.on(Pc.Ws,w(Uc.CHAPTER_CHANGE,(function(n){var i=V(t.backbone.chapters).findIndex((function(t){return n===t.id}));return i>=0?{startTime:t.backbone.chapters[i].startTime,title:t.backbone.chapters[i].text,index:i+1}:null}))),o.on(Pc.Ts,w(Uc.ENDED,(function(){return s=!1,{seconds:fc(t.config.video.duration),percent:1,duration:fc(t.config.video.duration)}}))),o.on(Pc.He,w(Uc.PAUSE,(function(n){return s=!1,{seconds:fc(n),percent:fc(n/t.config.video.duration),duration:fc(t.config.video.duration)}}))),o.on(Pc.Is,w(Uc.PLAYBACK_RATE_CHANGE,g)),o.on(Pc.Is,w(Uc.RATE_CHANGE,g)),o.on(Pc.Qs,w(Uc.TEXT_TRACK_CHANGE,(function(t){f=t;var n=t||{},i=n.language,e=void 0===i?null:i,r=n.label,o=void 0===r?null:r,u=n.kind;return{label:o,language:e,kind:void 0===u?null:u}}))),o.on(Pc.Ss,w(Uc.VOLUME_CHANGE,(function(t){return{volume:fc(t)}}))),o.on(Pc.Js,w(Uc.CONTROL_BAR_VISIBILITY_CHANGED,(function(t){return{visible:t}}))),o.on(Pc.Jc,(function(t){d&&setTimeout((function(){o.fire(Sc.za,d,!0)}),0),t&&y()})),o.on(Pc.bs,(function(t){var n=_(t);a&&m(Uc.ERROR,n)})),o.on(Pc.cc,w(Uc.FULLSCREENCHANGE,(function(){return{fullscreen:!0}}))),o.on(Pc.fc,w(Uc.FULLSCREENCHANGE,(function(){return{fullscreen:!1}}))),o.on(Pc.Gl,w(Uc.AD_STARTED)),o.on(Pc.Bl,w(Uc.AD_COMPLETED)),o.on(Pc.zl,w(Uc.AD_ERROR)),o.on(Pc.$l,w(Uc.AD_SKIPPED)),o.on(Pc.Kl,w(Uc.AD_ALL_COMPLETED)),o.once(Pc.ue,(function(){a=!0,m(Uc.READY),c&&(m(Uc.ERROR,_(c)),c=null)})),o.on(tu.EVENT_ENDED,w(Uc.LIVE_EVENT_ENDED)),o.on(tu.EVENT_STARTED,w(Uc.LIVE_EVENT_STARTED)),o.on(tu.STREAM_OFFLINE,w(Uc.LIVE_STREAM_OFFLINE)),o.on(tu.STREAM_ONLINE,w(Uc.LIVE_STREAM_ONLINE)),o.on(ki.MOTION_END,w(Uc.MOTION_END)),o.on(ki.MOTION_START,w(Uc.MOTION_START)),o.on(ki.WEBVR_HARDWARE_AVAILABLE,w(Uc.WEBVR_HARDWARE_AVAILABLE)),o.on(ki.WEBVR_ENTER,w(Uc.ENTER_WEBVR)),o.on(ki.WEBVR_EXIT,w(Uc.EXIT_WEBVR)),o.on(ki.SPATIAL_UNSUPPORTED,w(Uc.SPATIAL_UNSUPPORTED)),o.on(wi.PLAY,w(Uc.PLAY,(function(n){return s?null:(s=!0,{seconds:fc(n),percent:fc(n/t.config.video.duration),duration:fc(t.config.video.duration)})}))),o.on(wi.PLAYING,w(Uc.PLAYING,(function(){return s?{seconds:fc(t.currentTime),percent:fc(t.currentTime/t.config.video.duration),duration:fc(t.config.video.duration)}:null}))),o.on(wi.PROGRESS,w(Uc.PROGRESS,(function(t){var n=t.loaded,e=t.duration,r=t.loadProgress,o={seconds:fc(n),percent:fc(r),duration:fc(e)};return i<3&&(o.bytesLoaded=-1,o.bytesTotal=-1),o}))),o.on(wi.SEEKING,w(Uc.SEEKING,b)),o.on(wi.SEEKED,w(Uc.SEEKED,b)),o.on(wi.TIME_UPDATE,w(Uc.TIME_UPDATE,(function(t){var n=t.currentTime,i=t.duration,e=t.timeProgress;return{seconds:fc(n),percent:fc(e),duration:fc(i)}}))),o.on(wi.LOADED_METADATA,w(Uc.LOADED_METADATA)),o.on(wi.DURATION_CHANGE,w(Uc.DURATION_CHANGE,(function(n){return{duration:t.backbone.duration}}))),o.on(wi.WAITING,w(Uc.WAITING)),o.on(wi.LOADED_DATA,w(Uc.LOADED_DATA)),o.on(wi.LOAD_START,w(Uc.LOAD_START)),o.on(gl.connected,w(Uc.CHROMECAST_CONNECTED)),o.on(Sc.$a,(function(){c=null,l=!1})),t.doNotTrackEnabled||o.on(Pc.fl,(function(){m(Uc.EMAIL_CAPTURE)})),o.on(Pc._l,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n&&(n.listeners[Uc.SPACE_CHANGE]=!0,m(Uc.SPACE_CHANGE,t))})),o.fire(Pc.Il),v}nh.change&&document.addEventListener(nh.change,(function(t){if(ph.onchange(ph.element),oh(ih.CHANGE,ph.element),ph.element){var n=lh[lh.length-2];n&&n.element===ph.element?hh():dh(ph.element)}else hh()}),!1),document.addEventListener("webkitbeginfullscreen",(function(t){var n=!0;if(lh.length>0)for(var i=0,e=lh.length;i=100)););return this},darken:function(t,n,i){if(this.hsl={hue:this.hue,saturation:this.saturation,lightness:this.lightness-t},n&&i)for(var e=i.contrast(this).ratio;e=1)return this;var n=this.clone();return n.rgba={red:n.red*this.alpha+t.red*t.alpha*(1-this.alpha),green:n.green*this.alpha+t.green*t.alpha*(1-this.alpha),blue:n.blue*this.alpha+t.blue*t.alpha*(1-this.alpha),alpha:n.alpha+t.alpha*(1-this.alpha)},n},contrast:function(t){var n=this.alpha;if(n>=1){t.alpha<1&&(t=t.overlayOn(this));var i=this.luminance+.05,e=t.luminance+.05,r=i/e;return e>i&&(r=1/r),{ratio:r=Math.round(10*r)/10,error:0,min:r,max:r}}var o=this.overlayOn(bh.white).contrast(t).ratio,u=this.overlayOn(bh.black).contrast(t).ratio,a=Math.max(o,u),s={red:Math.min(Math.max(0,(t.red-this.red*n)/(1-n)),255),green:Math.min(Math.max(0,(t.green-this.green*n)/(1-n)),255),blue:Math.min(Math.max(0,(t.blue-this.blue*n)/(1-n)),255)},c=this.clone();c.rgb=s;var l=this.overlayOn(c).contrast(t).ratio;return{ratio:Math.round((l+a)/2*10)/10,error:Math.round((a-l)/2*10)/10,min:l,max:a,closest:c,farthest:u===a?bh.white:bh.black}},wcagAACompliant:function(t){return this.contrast(t).ratio>=4.5},wcagAAACompliant:function(t){return this.contrast(t).ratio>=7},yiqContrastColor:function(){return this.yiq>=120?new bh(0,0,0):new bh(255,255,255)}},bh.hexToRgb=function(t){var n;return 3===(t=String(t)).length||4===t.length?(n=/^#?([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(t))&&(n[1]+=n[1],n[2]+=n[2],n[3]+=n[3]):n=/^#?([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(t),n?{red:parseInt(n[1],16),green:parseInt(n[2],16),blue:parseInt(n[3],16),alpha:1}:null},bh.rgbToHex=function(t,n,i){return"#"+((1<<24)+(Math.round(t)<<16)+(Math.round(n)<<8)+Math.round(i)).toString(16).slice(1)},bh.rgbToHsl=function(t,n,i){t/=255,n/=255,i/=255;var e,r=Math.max(t,n,i),o=Math.min(t,n,i),u=(r+o)/2,a=u;if(r===o)return{hue:0,saturation:0,lightness:100*a};var s=r-o;return e=a>.5?s/(2-r-o):s/(r+o),r===t?u=(n-i)/s+(n1&&(i-=1),6*i<1?t+6*(n-t)*i:2*i<1?n:3*i<2?t+6*(2/3-i)*(n-t):t}if(t/=360,i/=100,0==(n/=100))return{red:Math.floor(255*i),green:Math.floor(255*i),blue:Math.floor(255*i)};var r=i<.5?i*(1+n):i+n-n*i,o=2*i-r;return{red:Math.floor(255*e(o,r,t+1/3)),green:Math.floor(255*e(o,r,t)),blue:Math.floor(255*e(o,r,t-1/3))}},bh.hslToHex=function(t,n,i){var e=bh.hslToRgb(t,n,i);return bh.rgbToHex(e.red,e.green,e.blue)},bh.white=new bh("fff"),bh.black=new bh("000");var Eh=function(){function t(t){this.alertTextElement=t.querySelector(".vp-text-alert-wrapper"),this.alertContentElement=this.alertTextElement.querySelector(".vp-alert-text")}var n=t.prototype;return n.show=function(t){this.alertContentElement.innerHTML=t,this.alertContentElement.classList.remove("hidden"),this.alertTextElement.classList.remove("hidden")},n.hide=function(){this.alertContentElement.classList.add("hidden"),this.alertTextElement.classList.add("hidden")},t}(),Th=i((function(t){!function(){var i="undefined"!=typeof window&&window===this?this:void 0!==n&&null!=n?n:this,e="function"==typeof Object.defineProperties?Object.defineProperty:function(t,n,i){t!=Array.prototype&&t!=Object.prototype&&(t[n]=i.value)};function o(){o=function(){},i.Symbol||(i.Symbol=a)}var u=0;function a(t){return"jscomp_symbol_"+(t||"")+u++}function s(){o();var t=i.Symbol.iterator;t||(t=i.Symbol.iterator=i.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&e(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return c(this)}}),s=function(){}}function c(t){var n=0;return function(t){return s(),(t={next:t})[i.Symbol.iterator]=function(){return this},t}((function(){return nn||(clearTimeout(t.j),t.j=setTimeout((function(){var n=performance.timing.navigationStart,i=p(t.g,t.b);if(n=(window.a&&window.a.A?1e3*window.a.A().C-n:0)||performance.timing.domContentLoadedEventEnd-n,t.u)var e=t.u;else e=performance.timing.domContentLoadedEventEnd?(e=performance.timing).domContentLoadedEventEnd-e.navigationStart:null;var r=performance.now();null===e&&b(t,Math.max(i+5e3,r+1e3));var o=t.a;(i=5e3>r-i||5e3>r-(i=o.length?o[o.length-1].end:n)?null:Math.max(i,e))&&(t.s(i),clearTimeout(t.j),t.i=!1,t.c&&t.c.disconnect(),t.h&&t.h.disconnect()),b(t,performance.now()+1e3)}),n-performance.now()),t.v=n)}m.prototype.getFirstConsistentlyInteractive=function(){var t=this;return new r((function(n){t.s=n,"complete"==document.readyState?w(t):window.addEventListener("load",(function(){w(t)}))}))},m.prototype.m=function(t){this.f.set(t,performance.now())},m.prototype.l=function(t){this.f.delete(t)},m.prototype.B=function(){b(this,performance.now()+5e3)},i.Object.defineProperties(m.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return[].concat(f(this.f.values()))}}});var g={getFirstConsistentlyInteractive:function(t){return t=t||{},"PerformanceLongTaskTiming"in window?new m(t).getFirstConsistentlyInteractive():r.resolve(null)}};t.exports?t.exports=g:window.ttiPolyfill=g}()}));function xh(t){return t.quality||t.metadata.quality}function Sh(t){return gc("av01",t)?"AV1":gc("hvc1",t)?"HEVC":gc("avc1",t)?"AVC":null}function Ah(t){var n=xh(t),i={"1440p":"2K","2160p":"4K","2700p":"5K","3240p":"6K","3780p":"7K","4320p":"8K"};for(var e in i)n=n.replace(e,i[e]);return n}function Mh(t,n){var i,e;return(null==t||null==(i=t.request)||null==(e=i.ab_tests)?void 0:e[n])?t.request.ab_tests[n]:{}}function Rh(t,n,i,e){var o,u,a,s,c=function(t){return function(){for(var n=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:{};(i=Object.assign(Q(),u?u.globalProperties():void 0,i)).name=n,t.events.fire(Pc.Yl,{name:n,data:i}),o.log(i).catch((function(t){}))}function Q(){return Object.assign(function(){var n,e,r,o,u,a,s={autoplay:1===t.config.embed.autoplay,background:!!t.config.embed.settings.background,clip_id:t.config.video.id,context:t.config.embed.context,device_pixel_ratio:window.devicePixelRatio||1,drm:t.config.request.drm||!1,embed:!t.config.embed.on_site,is_mod:!!t.config.user.mod,is_spatial:!(!ys.spatialPlayback||!t.config.video.spatial),logged_in:!!t.config.user.logged_in,looping:!!t.config.embed.loop,owner_id:null==(n=t.config.video)||null==(e=n.owner)?void 0:e.id,product:il(t),referrer:t.config.request.referrer,session_id:t.config.request.session,stayed_on_auto:p,version:el(t.config),version_backend:t.config.request.build.backend,viewer_id:null==(r=t.config.user)?void 0:r.id,viewer_team_id:null==(o=t.config.user)?void 0:o.team_id,viewer_team_origin_user_id:null==(u=t.config.user)?void 0:u.team_origin_user_id,vuid:xl("vuid")};return t.config.video.owner&&(s.account_type=t.config.video.owner.account_type),t.config.embed.api&&(s.api_version=t.config.embed.api),t.config.embed.app_id&&(s.app_id=String(t.config.embed.app_id)),t.config.video.privacy&&(s.privacy=t.config.video.privacy),i.get(Hl)&&(s.live_session_id=null==(a=t.config.video.live_event)?void 0:a.id),ys.webvr&&t.config.video.spatial&&(s.webvr_support=!0),ys.webxr&&t.config.video.spatial&&(s.webxr_support=!0),s}(),function(){var n=t.backbone.video?t.backbone.video.currentFile:{},e=function(){var n={},i=pd(),e=Na("asc"),r="MediaSourceScanner"===t.backbone.currentScannerName,o="HTMLScanner"===t.backbone.currentScannerName,u="HLSLiveScanner"===t.backbone.currentScannerName,a=[];o&&(a=na(t.config,"request.files.progressive")||na(t.config,"request.files.hls")||[]),r&&(a=na(t.config,"request.files.dash.streams",[])),u&&(a=t.backbone.video.currentFile.mime===xc.dashMpd?na(t.config,"request.files.dash.streams",[]):na(t.config,"request.files.hls.streams",[]));var s=V(a).sort(e).map((function(t){return t.profile})),c=-1,l=0,f=null;if(Object.keys(y).forEach((function(t){var n=s.indexOf(parseInt(t,10));n>c&&(c=n);var e=y[t].reduce((function(t,n){return((n.end||i)-n.start)/1e3+t}),0);e>l&&(l=e,f=t)})),n.highest_profile=s[c],n.highest_available_profile=s[s.length-1],n.most_used_profile=f,(r||u)&&T){n.max_speed=Math.round(Math.max.apply(Math,tt(T)))/1e3,n.min_speed=Math.round(Math.min.apply(Math,tt(T)))/1e3;var d=T.reduce((function(t,n){return t+n}),0);n.average_speed=Math.round(d/T.length)/1e3}return n}(),r=n.id,o=void 0===r?0:r,u=n.mime,a=void 0===u?xc.h264:u,s=n.metadata,c=(s=void 0===s?{}:s).profile,l=void 0===c?null:c,f=!1,v=!1;switch(a){case xc.dash:0===n.restrictedStreamIndexes.length&&(f=!0),na(t.config,"request.files.dash.separate_av")&&(v=!0),l=g?g.profile:null;break;case xc.hls:f=!0}var p,m={audio_bitrate:t.backbone.getBitrateAtTime(t.backbone.currentTime,"audio")/1e3,auto:f,average_speed:e.average_speed||0,cdn:n.metadata?n.metadata.cdn:"akamai",delivery:"live"!==Vc[a]?Vc[a]:"dash",dropped_frames:D,dropped_frame_percent:j,event_time:d+md(h),ended:M,forced_embed_quality:R,fullscreen:C,highest_available_profile:e.highest_available_profile?String(e.highest_available_profile):null,highest_profile:e.highest_profile?String(e.highest_profile):null,max_speed:isFinite(e.max_speed)?e.max_speed:0,mime:n.mime||null,min_speed:isFinite(e.min_speed)?e.min_speed:0,most_used_profile:e.most_used_profile?String(e.most_used_profile):null,origin:n.metadata?n.metadata.origin:"",profile_id:l?String(l):null,codec:ku(g)?"":Sh(g.codecs),quality:g?g.quality:null,quality_downswitch_count:I,quality_upswitch_count:O,quality_switch_count:O+I,separate_av:v,target_profile_id:G,ttfb:nt(),video_bitrate:t.backbone.getBitrateAtTime(t.backbone.currentTime,"video")/1e3,video_duration:fc(t.config.video.duration),video_file_id:Number.isInteger(Number(o))?parseInt(o,10):null};i.get(Hl)&&(m.ecdn=!!t.config.video.p2p,m.ecdn&&(m.ecdn_peers=null==(p=window.Streamroot)?void 0:p.instances[0].stats.realtime.dnaSources));return m}(),function(){var n={};if(t.config.request.ab_tests)for(var i in t.config.request.ab_tests){var e=t.config.request.ab_tests[i];for(var r in n["".concat(i,"_test")]=1,n["".concat(i,"_group")]=e.group,e.data)n["".concat(i,"_data_").concat(r)]=e.data[r]}return n}())}function nt(){var t=-1;if(void 0!==window.performance&&"function"==typeof window.performance.getEntriesByType){var n=window.performance.getEntriesByType("resource");if(n){var i=n.filter((function(t){return null!==t.name.split("?")[0].match(/\.m4s$|\.ts$/)}));t=i.map((function(t){return t.responseStart-t.connectStart})).reduce((function(t,n){return t+n}),0)/(i.length||1)}}return fc(t,2)}function it(t){var n=t.url,i=-1;if(window.performance){var e=window.performance.getEntriesByType("resource");if(e.length){var r=e.filter((function(t){return t.name===n})).sort((function(t,n){return t.connectStart-n.connectStart}));if(r.length){var o=r[r.length-1];i=o.responseStart-o.connectStart}}}return fc(i,2)}h=wd(),d=t.config.request.timestamp,o=new Xc(function(){var n="?beacon=1&session-id=".concat(t.config.request.session);return t.config.request.urls.fresnel+n}()),t.events.on(Pc.bs,(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{final:!0},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e={error_type:t,error_reason:i};u.handleExternalError(e,n)})),t.events.on(Sc.$a,(function(){A=!1})),t.events.on(Sc.Ha,(function(){$=!0})),t.events.on(Pc.vl,(function(t,n){Z(nl.ERROR_LINK_PRESSED,{error_type:n,error_url:t})})),t.events.on(Pc.cc,(function(){C=!0,Z(nl.VIDEO_FULLSCREEN_CHANGE)})),t.events.on(Pc.fc,(function(){C=!1,Z(nl.VIDEO_FULLSCREEN_CHANGE)})),t.events.on(Pc.Dl,(function(t,n){Z(t?nl.ALERT_DISPLAYED:nl.ALERT_HIDDEN)})),t.events.on(Pc.Jc,(function(){d=t.config.request.timestamp,h=wd(),v=!1,p=!0,m=!1,w=!1,b="auto",g={},y={},_=null,k=null,E=null,T=[],x=null,S={},A=!1,M=!1,R="none",C=!1,O=0,I=0,j=0,D=0,L=null,P=null,F=null,B=null,z=null,G=null,Y=0,u&&(u.reset(),X())})),t.events.on(Pc.Ds,(function(){W={seek_type:"nudge"}})),t.events.on(Pc.Gs,(function(t,n){W={seek_type:n}})),t.events.on(Pc.Hs,(function(t){W={seek_type:"chapter-".concat(t)}})),t.events.on(Pc.al,(function(t){Z(nl.OUTRO_VIDEO_SELECTED,{selected_video_id:t})})),t.events.on(Uo,(function(){A||kl.isCastConnected||(t.performDelegateAction(Nc,(function(t){A=!0,s.then((function(){return u.logStartRequest()})).catch((function(){}))})),Mh(t.config,"chunk_logging").group&&t.config.request.urls.fresnel_manifest_url&&function(t,n,i,e){var r=Date.now(),o=[{uuid:dc(),created_at:r,event:{name:"session_manifest",version:1,ts_ms:r,fields:{sessionID:n,manifest:i}},tracker:{name:"vimeo-player",version:e}}];new Xc(t).logRequestPromiseWithUrl(t,JSON.stringify(o),!0)}(t.config.request.urls.fresnel_manifest_url+"?beacon=1",t.config.request.session,t.backbone.manifest,el(t.config)))})),t.events.on(Pc.gc,(function(t){"email-capture"===t&&Z(nl.SLATE_DISPLAYED,{slate_type:"email"})})),t.events.on(Pc.Is,(function(t,n){Z(nl.VIDEO_PLAYBACK_RATE_CHANGED,{previous_playback_rate:n})})),t.events.on(Pc.Cs,(function(t){Z(nl.CLICK,{click_target:t})})),t.events.on(Sc.Ya,(function(n){"auto"!==n&&(p=!1),t.backbone.video.currentFile.mime===xc.dash&&("auto"===n||m?"auto"===n&&m&&!w&&(Z(nl.VIDEO_SWITCH_BACK_TO_AUTO,{quality:b,auto:1}),w=!0):(Z(nl.VIDEO_SWITCH_FROM_AUTO,{quality:n,auto:0}),m=!0),b=n)})),t.events.on(Sc.rs,(function(t){x!==t&&(x=t,Z(nl.CAPTIONS_ENABLED,{captions_id:String(t)}))})),t.events.on(Sc.os,(function(){x&&(x=null,Z(nl.CAPTIONS_DISABLED))})),t.events.on(gl.connected,(function(){Z(nl.CHROMECAST_CONNECTED)})),t.events.on(gl.disconnected,(function(){Z(nl.CHROMECAST_DISCONNECTED)})),t.events.on(yi.STREAM_CHANGE,(function(t,n,i){g=t;var e=t.profile?t.profile:t.id,r=pd();if(y[e]=y[e]||[],_){var o=y[_].length-1;y[_][o]&&(y[_][o].end=r)}k&&(i[n].bitrate>k?O+=1:I+=1),y[e].push({start:r}),S[e]={bitrate:i[n].bitrate,width:i[n].width,height:i[n].height},Z(nl.VIDEO_STREAM_CHANGE,{previous_audio_bitrate:E/1e3,previous_video_bitrate:k/1e3,previous_profile_id:String(_)}),_=e,k=i[n].bitrate,E=i[n].audioBitrate})),t.events.on(yi.STREAM_TARGET_CHANGE,(function(t){t&&(G=String(t.profile||"")||null)})),t.events.on(Ho,(function(t){R=t})),t.events.on(wi.PLAYING,(function(){$=!1})),t.events.once(Pc.Os,(function(){v=!0})),t.events.on(Pc.Ul,(function(){Z(nl.AD_BUFFERING)})),t.events.on(Pc.Bl,(function(){Z(nl.AD_COMPLETE)})),t.events.on(Pc.Hl,(function(){Z(nl.AD_CLICKED)})),t.events.on(Pc.zl,(function(t){Z(nl.AD_ERROR,{error_type:t.errorType,error_reason:t.errorReason})})),t.events.on(Pc.ql,(function(){Z(nl.AD_PAUSED)})),t.events.on(Pc.Wl,(function(){Z(nl.AD_RESUMED)})),t.events.on(Pc.Gl,(function(t){Z(nl.AD_STARTED,{startup_duration:t.time?fc(t.time/1e3,2):null})})),t.events.on(Pc.$l,(function(){Z(nl.AD_SKIPPED)})),t.events.on(Pc.ks,(function(){ys.iPhone&&u.setDisplayContext(1)})),t.events.on(Pc.Es,(function(){ys.iPhone&&u.setDisplayContext(0)})),t.events.on(yi.DROPPED_FRAMES,(function(t){var n=t.dropped/t.total*100;j=Math.round(100*n)/100,D=t.dropped})),t.events.on(yi.BANDWIDTH,(function(t){var n=t.speed;T.push(n),T.length>500&&T.shift()})),t.events.on(yi.MANIFEST_TIMEOUT,(function(){Z(nl.VIDEO_MANIFEST_TIMEOUT)})),t.events.on(yi.MANIFEST_LOADED,(function(){Z(nl.VIDEO_MANIFEST_LOADED)})),t.events.on(yi.DOWNLOAD_END,c),t.events.on(yi.DOWNLOAD_TIMEOUT,(function(){Z(nl.DOWNLOAD_TIMEOUT)})),t.events.on(yi.SCANNER_CHANGE,(function(){B=null})),t.events.on(yi.AV_DURATION_MISMATCH,(function(t){Z(nl.VIDEO_DURATION_MISMATCH,{duration_difference:Math.round(100*t)/100})})),t.events.on(yi.QUOTA_EXCEEDED_ERROR,(function(t){var n=t.buffered,i={error_type:yi.QUOTA_EXCEEDED_ERROR};i.buffered=fc(dt(0,n),2),i.bytes_loaded=Y,Z(nl.VIDEO_PLAYBACK_ERROR,i)})),t.events.on(Ei.MEDIASESSION_PLAY,(function(){Z(nl.MEDIASESSION_PLAY)})),t.events.on(Ei.MEDIASESSION_PAUSE,(function(){Z(nl.MEDIASESSION_PAUSE)})),t.events.on(Ei.MEDIASESSION_SEEK_FORWARD,(function(){Z(nl.MEDIASESSION_SEEK_FORWARD)})),t.events.on(Ei.MEDIASESSION_SEEK_BACKWARD,(function(){Z(nl.MEDIASESSION_SEEK_BACKWARD)})),t.events.on(Fc.Ha,(function(){W={seek_type:"api"}})),t.events.on(Fc.Jl,(function(){K=!0})),t.events.on(Fc.Xl,(function(){K=!0})),t.events.on(ki.WEBVR_HARDWARE_AVAILABLE,(function(t){Z(nl.WEBVR_HARDWARE_AVAILABLE,{vr_hardware:t.displayName})})),t.events.on(ki.WEBVR_ENTER,(function(){Z(nl.ENTER_WEBVR,!0)})),t.events.on(ki.WEBVR_EXIT,(function(){Z(nl.EXIT_WEBVR,!0)})),t.events.on(Ti.BRAIN_ML_MODEL_INPUTS,(function(n){var i;(null==(i=n.geolocation)?void 0:i.length)&&n.geolocation[0].length?n.geolocation=n.geolocation[0][0]:n.geolocation="",t.config.request.urls.fresnel_mimir_inputs_url&&function(t,n,i,e){var r={chunk_request_id:i.chunkRequestID,duration:i.duration,available_qualities:i.availableQualities,next_chunk_sizes:i.nextChunkSizes,last_buffer_sizes:i.lastBufferSizes,last_chunk_download_times:i.lastChunkDownloadTimes,last_chunk_sizes:i.lastChunkSizes,last_chunk_qualities:i.lastChunkQualities,num_remaining_chunks:i.numRemainingChunks,last_playback_heads:i.lastPlaybackHeads,geolocation:i.geolocation,session_id:n},o=Date.now(),u=[{uuid:dc(),created_at:o,event:{name:"mimir_inputs",version:1,ts_ms:o,fields:r},tracker:{name:"vimeo-player",version:e}}];new Xc(t).logRequestPromiseWithUrl(t,JSON.stringify(u),!0)}(t.config.request.urls.fresnel_mimir_inputs_url+"?beacon=1",t.config.request.session,n,el(t.config))})),(s=new r((function(n,i){var e;(null==(e=t.backbone)?void 0:e.video)&&n(),t.events.on(Vo,n)}))).then(J).catch((function(){})),t.events.on(Pc.dl,J),Th.getFirstConsistentlyInteractive().then((function(t){z=fc(t)})).catch((function(){}))}var Ch=function(){function t(t,n,i){this.player=t,this.element=n,this.store=i,this.muxClient=null,this.xf()&&(Math.random()>.75||this.Sf())}var n=t.prototype;return n.Af=function(){return!!this.player.config.request.flags.ott},n.xf=function(){return!(this.player.doNotTrackEnabled||!this.Af()&&!this.store.get(Hl))},n.Sf=function(){var t=this;if(!document.getElementById("vp-mux-client")){var n=document.createElement("script");n.setAttribute("id","vp-mux-client"),n.setAttribute("src",this.player.config.request.urls.mux_url),n.onreadystatechange=n.onload=function(){t.Mf(),t.store.get(Hl)||t.Rf()},document.getElementsByTagName("head")[0].appendChild(n)}},n.Mf=function(){var t=this;this.player.events.on(Pc.Jc,(function(n){if(t.xf()&&n&&"undefined"!=typeof mux){var i=t.player.backbone.video?t.player.backbone.video.currentFile:{},e=t.element.querySelector(".vp-telecine").getElementsByTagName("video")[0];mux.emit(e,"videochange",{video_title:t.player.config.video.title,video_id:t.player.config.video.id,video_duration:1e3*t.player.config.video.duration,video_cdn:i.metadata?i.metadata.cdn:"akamai",video_stream_type:t.store.get(Hl)?"live":"vod",viewer_user_id:t.player.config.request.session})}})),this.player.events.on(tu.STREAM_ONLINE,(function(){t.Rf()})),this.player.events.on(tu.STREAM_OFFLINE,(function(){var n=t.element.querySelector(".vp-telecine").getElementsByTagName("video")[0];mux.emit(n,"ended")}))},n.Rf=function(){if("undefined"!=typeof mux){var t=this.player.backbone.video?this.player.backbone.video.currentFile:{},n=this.element.querySelector(".vp-telecine").getElementsByTagName("video")[0];null!==this.muxClient&&mux.destroyMonitor(n);var i="dev"===this.player.config.request.build.js?"6eq01ih8u9u8fkk4hbindded5":"73cngs5ov03sbnck36isdkndt";this.store.get(Ul)&&(i="dev"===this.player.config.request.build.js?"kghblrf3bb9uk33lv58ompm3k":"md0ig7ssl8unl2kpl0h6p0drn");var e={property_key:i,player_name:"Vimeo Player",player_init_time:Date.now(),player_version:el(this.player.config),video_title:this.player.config.video.title,video_id:this.player.config.video.id,video_duration:1e3*this.player.config.video.duration,video_cdn:t.metadata?t.metadata.cdn:"akamai",video_stream_type:this.store.get(Hl)?"live":"vod",viewer_user_id:this.player.config.request.session};this.Af()&&(e.property_key="dev"===this.player.config.request.build.js?"3tb8rggvj5m71caj9jfpiidos":"lrc6o7kvhc6npvqq2r5iks5u4",this.player.config.ott&&(e=Object.assign(e,this.player.config.ott))),this.muxClient=mux.monitor(n,{debug:!1,minimumRebufferDuration:500,data:e})}},t}();function Oh(t){var n,i,e,o,u,a="https://collector.vhx.tv/events.gif",s=new Xc(a),c=t.config.ott||{};function l(){c=t.config.ott||{},e=null,o=null,u=null,i=!1,n=!1}function f(i,e){(e=Object.assign({},e,{name:c.video_title,user_id:c.viewer_user_id,channel_id:c.video_series,user_agent:navigator.userAgent,url:top===self?window.location.href:document.referrer,referrer:t.config.request.referrer,session_id:t.config.request.session,device:"html5"},{type:"video",video_id:c.video_id,current_src:t.backbone.currentFile.src,current_subtitle:"none",current_type:c.video_content_type,duration:c.video_duration,is_drm:t.config.request.drm?1:0,is_fullscreen:n?1:0,is_trailer:c.is_trailer?1:0,is_chromecast:kl.isCastConnected?1:0,is_live:t.config.video.live_event,seconds:10,timecode:t.currentTime})).name=i,void 0===e.timestamp&&(e.timestamp=Math.round(.001*Date.now()));var r=pt(a,e);return s.logRequestPromiseWithUrl(r,{},!0,"GET").catch((function(t){}))}function d(){t.events.on(wi.ENDED,h),t.events.on(wi.ERROR,v),t.events.on(wi.PAUSE,p),t.events.on(wi.PLAY,m),t.events.on(wi.SEEKED,w),t.events.on(wi.WAITING,b),t.events.on(Pc.cc,g),t.events.on(Pc.fc,y),t.events.on(Pc.Ul,_),t.events.on(Pc.Bl,k),t.events.on(Pc.Hl,E),t.events.on(Pc.zl,T),t.events.on(Pc.ql,x),t.events.on(Pc.Wl,S),t.events.on(Pc.Gl,A),t.events.on(Pc.$l,M)}function h(){clearTimeout(u),f("ended")}function v(){clearTimeout(u),f("error")}function p(){clearTimeout(u),f("pause")}function m(){if(function t(){o=Date.now(),clearTimeout(u),u=setTimeout((function(){!function(t){var n=t.elapsedTime,i=Math.round(.001*n);null!==e&&e(),f("timeupdate",Object.assign({seconds:i}))}({elapsedTime:Date.now()-o}),t()}),1e4)}(),!i)return i=!0,void f("firstplay");f("play")}function w(){f("seeked")}function b(){f("waiting")}function g(){n=!0}function y(){n=!1}function _(){f(nl.AD_BUFFERING)}function k(){f(nl.AD_COMPLETE)}function E(){f(nl.AD_CLICKED)}function T(){f(nl.AD_ERROR)}function x(){f(nl.AD_PAUSED)}function S(){f(nl.AD_RESUMED)}function A(){f(nl.AD_STARTED)}function M(){f(nl.AD_SKIPPED)}return l(),t.config.ott?d():new r((function(n,i){t.ottVideoMetadata?n():t.events.on(Pc.rl,(function(t){n()}))})).then((function(){c=t.ottVideoMetadata,d()})).catch((function(t){})),t.events.on(Pc.Jc,l),{reset:function(){clearTimeout(u),o=null,u=null}}}var Ih=function(t){return function(n){for(var i=arguments.length,e=new Array(i>1?i-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return function(n){return function(){var i=n.apply(void 0,arguments);function e(){return t}var r=Ku((function(t){if(jt(t))return t;var n=na(e(),t);return jt(n)?n:function(n){return na(n,t)}}));function o(t,n){var e=(t=r(t))(i.getState());return void 0!==n&&(e=lf(e,n)),e}return W({},i,{getSelectors:e,createGetter:r,get:o})}}}(ld),Js.apply(void 0,[]))),l=new L,f=nt(),d=new sl({events:f}),h=dc();n.classList.add("player-".concat(h)),n.classList.add("loading"),n.id||(n.id="player".concat(h)),n.innerHTML=dd.render("outer",{strings:{back:"Retour",close:"Fermer l’incrustation"}});var v=n.querySelector(".vp-telecine");if(ys.iOS){var p=document.createElement("video");v.appendChild(p);try{p.setAttribute("muted",""),p.setAttribute("playsinline",""),p.load()}catch(t){al.captureException(t)}}var m,w,b,g,y,_=null,k=null,E=null,T=null,x=null,S=null,A={},M=new r((function(t,n){y=t})).then((function(){return f.fire(Pc.ue),null})),R={get config(){return d.config},set config(t){d.config=t},get delegate(){return e},set delegate(t){e=t},ready:function(t){if(!t)return M;M.then((function(){return t()})).catch((function(t){al.captureException(t)}))},get sessionId(){return d.config.request.session}};function C(t){var n=t.old,i=t.loaded;if(function(t,n){t&&s&&"".concat(s," ")}(!n),window.parent!==window){var e,r="Private Video on Vimeo";1!==i.view&&3!==i.view||(r="".concat(i.video.title," from ").concat(i.video.owner.name," on Vimeo")),document.title=r,(null==(e=history)?void 0:e.replaceState)&&i.video&&n&&history.replaceState({id:i.video.id},"","/video/".concat(i.video.id).concat(window.location.search))}if(1!==i.view&&3!==i.view)throw new Error("Config not authorized: ".concat(i.view));(null==n?void 0:n.embed)&&n.embed.color!==i.embed.color&&f.fire(Sc.Xa,i.embed.color),T&&T.reset();var o=!n||!n.video||n.video.id!==i.video.id||n.video.version.current!==i.video.version.current;return function(t){ut=t.substring(0,t.lastIndexOf("/")+1)}(i.request.urls.js),m=null,b=_,f.fire(Sc.$a),c.dispatch(Il(i)),f.fire(Pc.Jc,o,i),t}function O(t){if("opacity"===t.propertyName){var n=document.querySelector(".vp-placeholder");n&&(ef(n).off("transitionend",O),n.parentNode.removeChild(n))}}function I(){!function(){var t=document.querySelector(".vp-placeholder");t&&(ef(t).on("transitionend",O),t.classList.add("vp-placeholder-fadeout"))}(),n.classList.remove("loading"),y()}function j(t){return u.then((function(){if(N(t),k&&k.resetThumbnail(),"function"!=typeof A.authorizationHandler)throw new Error("Config was not authorized.");return A.authorizationHandler(I)})).then((function(t){return d.config=t,m=null,c.dispatch(Il(d.config)),f.fire(Sc.$a),f.fire(Pc.Jc,!0,d.config),t}))}function D(t){(function(){var t=document.location.hash,n=function(t){var n,i=t.match(/\ba?t=([0-9hms:]+)/);null!==i&&(t=i[1]);var e=!1,r=0,o=0,u=0;if((null==(n=i=t.match(/^([0-9]+)$/))?void 0:n.length)&&(e=!0,u=i[1]),!1===e&&null!==(i=t.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s)?/))&&""!==i[0]){e=!0;var a=Q(i,4),s=a[1];r=void 0===s?0:s;var c=a[2];o=void 0===c?0:c;var l=a[3];u=void 0===l?0:l}if(!1===e&&null!==(i=t.match(/^([0-9:]+)/))){e=!0;var f=Q(t.split(":").reverse(),3);u=f[0];var d=f[1];o=void 0===d?0:d;var h=f[2];r=void 0===h?0:h}return e?60*parseInt(r,10)*60+60*parseInt(o,10)+parseInt(u,10):null}(t);null!==n&&(d.config.embed.time=uc(n,0,d.config.video.duration),-1!==t.indexOf("at=")&&history&&history.replaceState&&history.replaceState("","",window.location.pathname+window.location.search))})(),f.on(Pc.Wc,(function(t){d.reload().then((function(n){if(!d.config.user.logged_in)return f.fire(Pc.Kc),n;switch(f.fire(Pc.Gc,t),t){case"like":d.config.user.liked&&f.fire(Pc.Bc);break;case"watch-later":d.config.user.watch_later&&f.fire(Pc.zc);break;case"private":f.fire(Pc.Zc)}return n})).catch((function(t){al.captureException(t)}))})),f.on(Pc.$c,(function(){d.reload().catch((function(t){al.captureException(t)}))})),function(t){var i,e;new qd(t,c,n),k=new El(t,c,n.querySelector(".vp-preview")),f.on([yi.BUFFER_ENDED,wi.PLAYING],(function(){k.hide()})),_=new us(v,d.config),b=_,new Gl(t,c,n.querySelector(".vp-video-wrapper")),new fd(t,c,n.querySelector(".vp-captions")),new hd(n,f),P(t),t.doNotTrackEnabled||(d.config.request.urls.test_imp&&function(t,n){if(t.config.request.ab_tests){var i=new Xc(n);for(var e in t.config.request.ab_tests){var r=t.config.request.ab_tests[e];if(r.track){var o={session_id:t.config.request.session,test_id:e,test_group:String(r.group)};i.log(o,!0,!1).catch((function(t){}))}}}}(t,"".concat(d.config.request.urls.test_imp,"?beacon=1")),new Rh(t,n,c,d.config.request.urls.fresnel),new cf(t,c),new Ch(t,n,c),new Oh(t)),T=new Ml(t),(t.config.request.flags.ott||(null==(i=t.config.request.ab_tests)||null==(e=i.chromecast)?void 0:e.group))&&function(t){if(!t.config.video.spatial&&"stock"!==t.config.video.privacy){var i=new yl({textAlert:new Eh(n),player:t});kl.init({chromecastPlayer:i}),kl.on([gl.error,gl.mediaLoadedFailed],(function(t){al.captureException(t)}))}}(t),N(t)}(t)}function N(t){E||(E=new kh(t),vd(R,E),Xd(al))}function P(t){var i=d.config.request.ads;i&&(i.adcode&&i.adunit||i.adurl)&&(x=new Dh(t,n.querySelector(".vp-video-wrapper")),f.on(Pc.ks,(function(){b=x,f.fire(Pc.El)})),f.on(Pc.Es,(function(){b=_,f.fire(Pc.El)})),kl&&(kl.on(gl.connected,(function(){x.toggleCastingState(!0)})),kl.on(gl.disconnected,(function(){x.toggleCastingState(!1)}))))}function F(t,n){var i=t;return isNaN(t)&&"string"!=typeof t||(i=cc(sc(t),t,n)),i}var V={get store(){return c},get config(){return d.config},get element(){return n},get events(){return f},get uuid(){return h},get expose(){return R},get backbone(){return _},get adHandler(){return x},get displayContext(){return b},get preview(){return k},get doNotTrackEnabled(){return d.config.embed.dnt||d.config.request.flags.dnt},get playLoggingEnabled(){return d.config.embed.log_plays&&d.config.request.flags.plays},get currentTime(){return kl.isCastConnected?kl.chromecastPlayer.lastCurrentTime:_.currentTime},get ottVideoMetadata(){return S},set ottVideoMetadata(t){S=t},init:function(t,n){return w||(A=n,w=d.load(t).then(C).catch((function(t){return j(V)})).then((function(){return"function"==typeof A.initializationHandler?r.resolve(n.initializationHandler()):null})).then((function(){return D(V),"function"==typeof A.postInitializationHandler?r.resolve(n.postInitializationHandler()):null})).then((function(){return r.all([k.thumbnailPromise,u])})).then(I).then((function(){return al.setUp(V),null})).catch((function(t){al.captureException(t)})))},loadVideo:function(t,i){if(g===t&&m)return m;if(k&&k.resetThumbnail(),null==i?void 0:i.video_version){var e=d.config.video.version.available;if(!e||!Array.isArray(e))return r.reject("No available video versions");if(-1===(e=e.map((function(t){return t.id}))).indexOf(i.video_version))return r.reject("Invalid version id specified")}f.fire(Pc._loadVideo),g=t,n.classList.add("loading");var o=F(t,i),u=l.get(o);return t=u?u.Cf.loaded:t,m=d.load(t,i).then((function(t){if(u){var n=_.element;(_=u.Of).element.style.visibility="visible",n.parentNode.replaceChild(_.element,n),f.fire(Pc.dl)}return t=C(t),x||P(V),t})).catch((function(t){return j(V)})).then((function(t){var n=k.loadThumbnail();return r.resolve(n)})).then(I)},preloadVideo:function(t,n,i){var e=F(n,i),o=l.get(e);return o?r.resolve(o):new sl({events:f}).load(n,i).then((function(n){var i=_.element.cloneNode(!1);i.style.visibility="hidden",_.element.parentNode.insertBefore(i,_.element);var r=new us(i,n.loaded);r.loadVideo(n.loaded),r.preload=t;var o={Of:r,Cf:n};return l.set(e,o),o}))},performDelegateAction:function(t){var n,i,r,o,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];null!=(n=e)&&n[t.will]&&!1===(r=(o=e)[t.will].apply(o,[d.config.video.id].concat(tt(a))))||(u.apply(void 0,[d.config.video.id].concat(tt(a),[r])),(null==(i=e)?void 0:i[t.did])&&e[t.did]())},ready:function(){return M},verifyConfig:function(){return d.verify()},updatePhpTokens:function(){return new r((function(t,n){var i=d.config.user,e=i.vimeo_api_client_token,r=i.vimeo_api_interaction_tokens,o=i.vimeo_live_client_token,u=i.vimeo_bucketed_live_client_token,a=!1;if(e)try{a=bd(JSON.parse(atob(e.split(".")[1])).exp)>=0}catch(t){return void n(new Error("Failed to parse PHP client token expiration"))}if(r)try{var s=JSON.parse(atob(r.likes.split(".")[1])).exp,c=JSON.parse(atob(r.watch_later.split(".")[1])).exp,l=JSON.parse(atob(r.following.split(".")[1])).exp;a=bd(s)>=0||bd(c)>=0||bd(l)>=0}catch(t){return void n(new Error("Failed to parse PHP interaction tokens expiration"))}if(o)try{a=bd(JSON.parse(atob(o.split(".")[1])).exp)>=0}catch(t){return void n(new Error("Failed to parse PHP Live token expiration"))}if(u)try{a=bd(JSON.parse(atob(u.split(".")[1])).exp)>=0}catch(t){return void n(new Error("Failed to parse PHP Live token expiration"))}if(a){var f=d.config.request,h=f.signature,v=f.session,p=f.timestamp,m=f.expires;Ke("https://".concat(d.config.player_url,"/video/").concat(d.config.video.id,"/token/refresh?signature=").concat(h,"&session=").concat(v,"&time=").concat(p,"&expires=").concat(m),{withCredentials:!0}).json().then((function(n){return d.config.user.vimeo_api_client_token=n?n.vimeo_api_client_token:null,d.config.user.vimeo_api_interaction_tokens=n?n.vimeo_api_interaction_tokens:null,d.config.user.vimeo_live_client_token=n?n.vimeo_live_client_token:null,d.config.user.vimeo_bucketed_live_client_token=n?n.vimeo_bucketed_live_client_token:null,t()})).catch((function(t){al.captureBreadcrumb("Failed to refresh JWT token",{},"auth","error"),n(t)}))}else t()}))}};return V}function Nh(t,n,i,e){var r=!1;e="function"==typeof n?i:e,i="function"==typeof n?n:i;var o=function(t){var n=!0;if(t.changedTouches){var o=t.changedTouches[0].pageX-window.pageXOffset,u=t.changedTouches[0].pageY-window.pageYOffset,a=document.elementFromPoint(o,u);null!==a&&this.contains(a)&&(n=i.call(this,t))}return"function"==typeof e&&e.call(this,t),r=!0,n},u=function(t){if(!r)return i.call(this,t);r=!1};(n="function"==typeof n?null:n)?ef(t).on("click",n,u).on("touchend",n,o):ef(t).on("click",u).on("touchend",o)}function Ph(t,n){var i,e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=[],u=!1;function a(){i=c(),r.forEach(v),Nh(i,".js-menuClose",E),ef(window).on("resize",S)}function s(){ef(window).off("resize",S)}function c(){var t=document.createElement("div");return t.innerHTML=dd.render("menu",{strings:{close:"Fermer le menu"}}),t.children[0]}function l(){return i.classList.contains("vp-menu-center")}function f(){return i.classList.contains("vp-menu-fullwidth")}function d(){return i.classList.contains("vp-menu-carousel")}function h(){var t=o.length>1&&!d();o.forEach((function(n){n.setCollapsible(t),n.resetCarousel(d())}))}function v(t){o.push(t),i.insertBefore(t.element,i.lastChild),h(),t.on("open",m),t.on(["open","close"],w),t.on(["openEnd","closeEnd"],b),t.on("select",_)}function p(t){return o.find((function(n){return n.id===t}))}function m(t){o.filter((function(t){return t.isOpen()})).forEach((function(t){return t.close()}))}function w(t){u=!0,A()}function b(t){u=!1}function g(){return n&&"true"===n.getAttribute("aria-expanded")}function y(r){g()||(r=r||n.contains(document.activeElement),n.setAttribute("aria-expanded","true"),i.removeAttribute("hidden"),t.events.fire(Pc.Zs,!0,e),S(),h(),i.classList.remove("vp-menu-hidden"),window.requestAnimationFrame((function(){if(i.classList.remove("vp-menu-invisible"),r){var t=R();t.length>0&&t[0].focus()}})))}function _(){d()||E()}function k(){R().some((function(t){return t===document.activeElement}))&&n.focus()}function E(){g()&&setTimeout((function(){k(),n.setAttribute("aria-expanded","false"),t.events.fire(Pc.Zs,!1,e),i.classList.add("vp-menu-invisible")}),100)}function T(t){i.classList.add("vp-menu-hidden"),i.setAttribute("hidden","")}function x(t){return g()?(E(),!1):(y(t),!0)}function S(){if(!f()){var n=ec(t.element),e=ec(i),r=window.getComputedStyle(i),o=parseFloat(r.fontSize),u=e.bottom-i.scrollHeight,a=Math.max(n.top,0)-u;if(a>0){var s=i.scrollHeight-a-o;return i.style.height="".concat(s/o,"em"),void i.classList.add("vp-menu-scroll")}i.style.height="auto",i.classList.remove("vp-menu-scroll")}}function A(){S(),u&&requestAnimationFrame(A)}function M(){ef(i).on("transitionend",(function(t){this===i&&"opacity"===t.propertyName&&i.classList.contains("vp-menu-invisible")&&T()})),ef(document).on("click",(function(t){null!==n&&(!g()||n.contains(t.target)||i.contains(t.target)||E())})),window.addEventListener("blur",E,!1)}function R(){return o.reduce((function(t,n){return t.concat(n.getTabindexItems())}),[])}return a(),M(),e={element:i,button:n,isCentered:l,isVisible:g,isFullwidth:f,show:y,hide:E,toggle:x,retargetFocusFromChild:k,setPanelModes:h,addPanel:v,getPanel:p,getTabindexItems:R,destroy:s}}var Fh=function(t){return function(n){return null==t?void 0:t[n]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),Vh=/[&<>"']/g,Uh=RegExp(Vh.source);function Bh(t){return(t=_o(t))&&Uh.test(t)?t.replace(Vh,Fh):t}function Hh(t){nt(this);var n,i,e,r=this,o={x:0,y:0},u={x:0,y:0},a={x:0,y:0},s=0;function c(n){t.style["".concat(ys.transitionProperty,"Duration")]=n}function l(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.children.length-1,r=-Math.round(n/d());return Math.min(Math.max(r,i),e)}function f(){return!1}function d(){var n=t.children[0],i=getComputedStyle(n);return n.offsetWidth+parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}function h(t){var n=[t.clientX,t.clientY],i=n[0],e=n[1];if(t.targetTouches&&t.targetTouches.length>0){var r=[t.touches[0].pageX,t.touches[0].pageY];i=r[0],e=r[1]}return{x:i,y:e}}function v(t){t.stopImmediatePropagation();var i=h(t),r=i.x,a=i.y;u.x=r-o.x,u.y=a-o.y,n=!1,(e=function(t){return function(n){var i=n?"on":"off",e={pointerdown:["pointermove","pointerup"],MSPointerDown:["pointermove","pointerup"],touchstart:["touchmove","touchend"],mousedown:["mousemove","mouseup"]};ef(window)[i](e[t.type][0],p),ef(window)[i](e[t.type][1],m)}}(t))(!0),c("0ms")}function p(t){var s=h(t),c=s.x,f=s.y;if(a.x=o.x,a.y=o.y,o.x=c-u.x,o.y=f-u.y,Math.abs(o.x-a.x)>=.15*Math.abs(o.y-a.y))return t.preventDefault(),n=!0,r.fire("touchMove"),i=Date.now(),void y(o.x);e(!1),w(l(o.x))}function m(u){if(u.stopImmediatePropagation(),e(!1),n){u.preventDefault();var c=o.x-a.x,f=Date.now()-i+1;return o.x+=50*c/f,w(l(o.x)),void r.fire("touchEnded")}!function(n){n.preventDefault();var i=pc(n.target,t.children);if(-1!==i){if(i!==s)return void w(i);r.fire("tap",i)}}(u)}function w(t){g(t),r.fire("slide",t)}function b(){g(s,"0ms")}function g(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=d();-1!==t&&i>0&&(c(n),o.x=-t*i,y(o.x))}function y(n){var i=l(n,-1,t.children.length);i!==s&&(r.fire("focus",i),s=i),t.style[ys.transformProperty]="translateX(".concat(n,"px)")}return{setUp:function(n){ef(t).on(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],v),ef(t).on("click","a",f),ef(window).on("resize",b),b(),function(t){void 0!==t&&g(t,"0ms")}(n)},show:function(t){g(vc(t))},resize:b,destroy:function(){ef(t).off(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],v),ef(t).off("click","a",f),ef(window).off("resize",b),t.style.removeProperty(ys.transformProperty)},on:this.on}}function zh(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.items.forEach((function(t){void 0!==t.label&&(t.label=Bh(t.label))}));var i,e,r,o,u,a,s=nt(),c=n.id,l=n.items,f=!1;function d(){h(),i=v(),e=i.querySelector(".js-panelItems"),(r=new Hh(e)).on("slide",A),r.on("tap",M),Nh(i,".js-panelTitleButton",S),Nh(i,"li",R),ef(i).on("keydown",C),ef(i).on("keypress",C),ef(i).on("transitionend",(function(t){t.target===i&&(_()?E():x())}))}function h(){n=Object.assign(n,{get active(){return D()?D().label:""}})}function v(){var t=document.createElement("div");return t.innerHTML=dd.render("menu_list_panel",n),t.children[0]}function p(t){var n=V(i.querySelectorAll(".vp-panel-item"));return n[t]||n}function m(t){t!==w()&&(i.classList.toggle("vp-panel-open",!t),i.classList.toggle("vp-panel-collapsible",t),t?e.setAttribute("hidden",""):(e.removeAttribute("hidden"),i.style.removeProperty("height")))}function w(){return i.classList.contains("vp-panel-collapsible")}function b(t){if(f=t,u=i.querySelector(".vp-indicator"),r.destroy(),u.classList.remove("vp-indicator-visible"),f){var n=l.findIndex((function(t){return t.active}));r.setUp(n),g(),u.classList.add("vp-indicator-visible")}}function g(){r.on("touchMove",(function(){u.classList.add("vp-indicator-inactive")})),r.on("touchEnded",(function(){u.classList.remove("vp-indicator-inactive")}))}function y(){i.classList.add("vp-panel-pinTitle")}function _(){return i.classList.contains("vp-panel-open")}function k(){if(w()){s.fire("open",o),t.events.fire(Pc.ec,!0,o),e.removeAttribute("hidden"),i.classList.add("vp-panel-open");var n=window.getComputedStyle(i),r=parseFloat(n.fontSize);i.style.height="".concat(i.scrollHeight/r,"em");var u="".concat(ys.transitionProperty,"Delay");p().forEach((function(t,n){var i=40*n+100;t.style[u]="".concat(i,"ms"),t.classList.add("vp-panel-item-in")}))}}function E(t){s.fire("openEnd",o)}function T(){w()&&(s.fire("close",o),t.events.fire(Pc.rc,!1,o),i.classList.remove("vp-panel-open"),i.style.removeProperty("height"),j())}function x(t){e.setAttribute("hidden",""),p().forEach((function(t,n){t.classList.remove("vp-panel-item-in")})),s.fire("closeEnd",o)}function S(t){return t.preventDefault(),_()?T():k()}function A(t){s.fire("select",l[t].id)}function M(t){s.fire("select",l[t].id)}function R(t){if(!f){var n=pc(t.target,p());s.fire("select",l[n].id)}}function C(t){if("keypress"===t.type&&13===t.which||"keydown"===t.type&&32===t.which){var n=pc(t.target,p());if(-1!==n)return s.fire("select",l[n].id),!1}return null}function O(t){var n=l.findIndex((function(t){return t.active}));if(-1!==n){l[n].active=!1;var e=p(n);e.classList.remove("vp-panel-item-on"),e.setAttribute("aria-checked","false")}var r=l.findIndex((function(n){return"".concat(n.id)==="".concat(t)}));if(-1!==r){l[r].active=!0;var o=p(r);o.classList.add("vp-panel-item-on"),o.setAttribute("aria-checked","true"),i.querySelector(".js-panelStatText").innerHTML=l[r].label}u.classList.remove("vp-indicator-inactive")}function I(t){j(),a=t,t&&p(l.findIndex((function(t){return"".concat(t.id)==="".concat(a)}))).classList.add("vp-".concat(c,"-item-hover"))}function j(){if(a){var t=p(l.findIndex((function(t){return"".concat(t.id)==="".concat(a)})));t.length||t.classList.remove("vp-".concat(c,"-item-hover"))}}function D(){return l.find((function(t){return t.active}))}function L(t){D()&&"auto"!==D().id||(i.querySelector(".js-panelStatText").innerHTML=t)}function N(){return V(i.querySelectorAll('.vp-panel-collapsible button[tabindex="0"], .vp-panel-open li[tabindex="0"]'))}return d(),o={id:c,element:i,setCollapsible:m,resetCarousel:b,pinTitle:y,isOpen:_,open:k,close:T,setActiveItem:O,setHoverState:I,clearHoverState:j,setTitleStat:L,getTabindexItems:N,on:s.on,off:s.off}}function qh(t){var n,i=0,e=!1,r=null,o=null,u=null;function a(){if(ys.touch&&!t.store.get(Hl)&&!t.config.video.spatial){var n=null,a=10;(r=t.element.querySelector(".vp-nudge-wrapper")).classList.remove("hidden"),r.innerHTML=dd.render("nudge"),o=t.element.querySelector(".vp-nudge-forward"),u=t.element.querySelector(".vp-nudge-backward"),Nh(o,(function(t){t.preventDefault(),l("right"),n=setTimeout(f,250)})),Nh(u,(function(t){t.preventDefault(),l("left"),n=setTimeout(f,250)})),t.events.on(Pc.Os,(function(){e=!0}))}function l(t){if(["left","right"].includes(t)){var e="right"===t?s:c,r="right"===t?o:u;i++,clearTimeout(n),i>=2&&(d(r,t,a),2===i&&e(10),e(10*(i-2)),i>2&&(d(r,t,a+=10),i=2))}}function f(){i>=2&&t.events.fire(Pc.Ls),i=0,a=10}}function s(n){l((t.currentTime||0)+n)}function c(n){var i=(t.currentTime||0)-n;l(i>=0?i:0)}function l(n){t.events.fire(Pc.Ds),t.events.fire(Sc.Ha,null,n),e||t.events.fire(Pc.Fs)}function f(n,i){var e=t.currentTime||0,r="right"===i?"+":"-";return"right"===i&&e>t.config.video.duration-10||e<=10&&"left"===i?null:"".concat(r," ").concat(n)}function d(i,e,r){if(["left","right"].includes(e)){var o=t.element.querySelector(".vp-nudge-shade-".concat(e)),u=i.querySelector(".vp-nudge-seconds");f(r,e)&&(u.innerHTML=f(r,e),clearTimeout(n),i.classList.remove("invisible"),o.classList.remove("vp-nudge-shade-invisible"),n=setTimeout((function(){o.classList.add("vp-nudge-shade-invisible"),i.classList.add("invisible")}),500))}}return t.events.on(Pc.Jc,(function(){[o,u].forEach((function(t){t&&ef(t).off("click").off("touchend")})),a()})),a(),{}}var Wh=/^(%20|\s)*(javascript|data)/im,Gh=/[^\x20-\x7E]/gim,$h=/^([^:]+):/gm,Kh=[".","/"];function Yh(t){var n=t.match($h);return null==n?void 0:n[0]}function Jh(t){return t?decodeURI(encodeURI(function(t){var n=Yh(t=t.trim());return t&&!n&&(t="http://".concat(t)),t}(function(t){var n=t.replace(Gh,"");if(function(t){return Kh.indexOf(t[0])>-1}(n))return n;var i=Yh(n);return i&&Wh.test(i)?"":n}(t)))):null}function Xh(){for(var t=arguments.length,n=new Array(t),i=0;i1?n-1:0),e=1;e1?n-1:0),e=1;e0&&(e.style.left=c+"px"),l>0&&(e.style.right=l+"px")}}(),function(n){ef(n).on("mouseenter",".js-chapter-marker",(function(n){t.events.fire(Pc.zs,{id:n.target.dataset.time,position:"marker"})})).on("mouseleave",".js-chapter-marker",(function(n){t.events.fire(Pc.qs)})),t.events.on([Pc.zs,Pc.qs],r),t.events.on(Pc.Ws,o)}(a),i=V(n.querySelectorAll(".js-chapter-marker")),(null==(u=t.backbone)?void 0:u.chaptersTrack)&&t.backbone.chaptersTrack.addEventListener("cuechange",e)}}}function rv(t,n,i){var e,r,o,u,a,s,c,l,f,d,h,v,p,m,w,b,g,y,_,k,E,T,x,S,A,M,R,C=!1,O=!1,I=!1,j=!1,L=!1,P=!1,F=!1,U=!1,B=!1,H=!1,z=!1,q=!1,W=!0,G=!1,$=!1,K=null,Y=null,J=[],X=null,Z=null,tt=null,nt=!1,it=!1,et=n.get(Ul),rt=[],ot=new ev(t,i),ut=t.config.embed.autoplay&&t.config.request.flags.autohide_controls,at=[{id:.5,label:"0.5x"},{id:.75,label:"0.75x"},{id:1,label:"Normal"},{id:1.25,label:"1.25x"},{id:1.5,label:"1.5x"},{id:2,label:"2x"}],st=ys.touch?300:0;function ct(){K=null,Y=null}function lt(){if(!Y){var t=ec(c).left,n=parseInt(window.getComputedStyle(c,"").borderLeftWidth,10);Y=t+n}return Y}function ft(){if(!K){var t=ec(c).right,n=parseInt(window.getComputedStyle(c,"").borderRightWidth,10);K=t-n}return K}function dt(t){var n=lt();return uc((t-n)/(ft()-n),0,1)}function ht(n){var i=J,e=Array.isArray(i),r=0;for(i=e?i:i[D.iterator]();;){var o;if(e){if(r>=i.length)break;o=i[r++]}else{if((r=i.next()).done)break;o=r.value}var u=o,a=ec(u),s=a.left,c=a.right;if(n>=s&&n<=c)return parseFloat(u.getAttribute("data-time"))/t.config.video.duration}return dt(n)}function vt(n,i){O&&!q&&(i=i||t.config.video.duration*n||0,window.requestAnimationFrame((function(){pt(n,i),mt(n,i)})))}function pt(t,i){(!n.get(Dl)||G&&0!==i)&&(n.get(Hl)&&(t=100),v.style.left=Math.min(fc(100*t),100)+"%",p.innerHTML=yd(i),v.style.display="block")}function mt(i,e){n.get(Hl)&&(i=100);var r=Math.min(fc(100*i),100);d.style.width="".concat(r,"%"),l.setAttribute("aria-valuenow",Math.round(e)),l.setAttribute("aria-valuetext","".concat(yd(e)," of ").concat(yd(t.config.video.duration))),a.setAttribute("width","".concat(r,"%"))}function wt(t,i){n.get(Hl)&&(t=100);var e=Math.min(fc(100*t),100);f.style.width="".concat(e,"%"),f.setAttribute("aria-valuenow",fc(i)),f.setAttribute("aria-valuetext","".concat(yd(i,!0)," loaded")),u.setAttribute("width","".concat(e,"%"))}function bt(){G=!1,r.classList.remove("state-playing"),r.classList.add("state-paused")}function gt(){G=!0,$&&At(),r.classList.remove("state-paused"),r.classList.add("state-playing")}function yt(){W=!1,rt.forEach((function(t){return t.retargetFocusFromChild()})),t.events.fire(Pc.Js,W),i.classList.add("invisible")}function _t(){setTimeout((function(){W=!0,t.events.fire(Pc.Js,W),i.classList.remove("invisible")}),st)}function kt(){j||W&&(C||(O&&z||L||ut)&&(I||(!nt&&!it||L)&&(L&&3===t.config.view||U||P||yt())))}function Et(){j||W||L||_t()}function Tt(t){return rt.push(t),t.button.parentNode.insertBefore(t.element,t.button.nextSibling),t}function xt(t){rt=rt.filter((function(n){return n!==t})),t.destroy()}function St(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(y){var n,i=1/_.length,e=t/i,r=Math.ceil(e),o=e%1;o<=.33&&(n="fill1"),o>.33&&o<=.66&&(n="fill2"),_.forEach((function(t,i){t.classList.remove("fill0"),t.classList.remove("fill1"),t.classList.remove("fill2"),i===r-1&&o&&o<=.66?t.classList.add(n):i>r-1&&t.classList.add("fill0")})),y.setAttribute("aria-valuenow",t.toFixed(3)),y.setAttribute("aria-valuetext",Math.round(100*t)+"%")}}function At(){var e;if(1===t.config.view||3===t.config.view){x&&(xt(x),x=null),X&&(xt(X),X=null);var C=t.backbone||{},j=t.config.embed.settings,D={show:j.logo,showLink:!!t.config.video.url,url:t.config.video.url},L=function(){if(!t.config.embed.settings.custom_logo)return null;var n=t.config.embed.settings.custom_logo,i=n.img;return ys.devicePixelRatio>=2&&(i=i.replace(/(mw|mh)=(\d+)/g,(function(t,n,i){return n+"="+2*parseInt(i,10)}))),{showLink:null!==n.url,url:Jh(n.url),img:i,sticky:n.sticky,width:n.width,height:n.height}}();if(!j.watch_trailer||O||G||t.config.embed.autoplay||!t.config.embed.on_site){var N=!t.backbone||t.backbone.supportsSettingVolume,P=!t.backbone||t.backbone.supportsTextTracks,F=Mh(t.config,"chromecast").group&&ys.browser.chrome&&(void 0===j.chromecast||j.chromecast)&&!t.config.video.spatial&&"stock"!==t.config.video.privacy,U=t.displayContext===t.backbone,B=C.supportsPlaybackRate&&j.speed,H=U&&(B||C.representations&&C.representations.length>0),z="disable"!==t.config.video.privacy&&(ys.webvr||ys.stereoscopic)&&t.config.video.spatial&&Mh(t.config,"webvr").group,q=!!t.backbone&&(null==(e=t.backbone.textTracks)?void 0:e.length);t.events.on(yi.TEXT_TRACKS_AVAILABLE,(function(){var n;q=!!t.backbone&&(null==(n=t.backbone.textTracks)?void 0:n.length),At()}));var K={targetBlank:0===t.config.embed.on_site,playState:G?"playing":"paused",volume:N&&j.volume,ccButton:P&&q&&U,castButton:F,ccOn:null!==tt,prefsButton:H,airplayButton:ys.airPlay,stereoscopicButton:z,fullscreenButton:j.fullscreen,vimeoLogo:U?D:{},duration:yd(t.config.video.duration),rawDuration:t.config.video.duration,captionsIcon:dd.render("icon_cc",{title:"Choisir les légendes"}),settingsIcon:dd.render("icon_gear",{title:"Paramètres"}),fullscreenIcon:dd.render("icon_fullscreen",{title:"Afficher en plein écran"}),unfullscreenIcon:dd.render("icon_unfullscreen",{title:"Quitter le mode plein écran"}),playIcon:dd.render("icon_play",{title:"Lire"}),pauseIcon:dd.render("icon_pause",{title:"Pause"}),replayIcon:dd.render("icon_replay",{title:"Lire"}),chaptersIcon:dd.render("icon_chapters",{title:"Chapters"}),chapters:!!C.chapters&&C.chapters.length,strings:{loadedBar:"chargé",playedBar:"lue",volume:"Volume (utiliser les flèches pour changer)",airPlay:"Choisir un appareil AirPlay",airPlayOff:"Désactiver AirPlay",pipEnter:"Afficher la fonction Incrustation (PIP)",pipReturn:"Quitter la fonction Incrustation",fullscreen:"Plein écran",chromecast:"Cast",watchOnVimeo:"Regarder sur vimeo.com",stereoscopic:"Activer la lecture stéréoscopique",stereoscopicOff:"Désactiver la lecture stéréoscopique"}};if(L&&(K.customLogo=L),i.classList.remove("trailer"),$=!1,i.innerHTML=dd.render("controlbar",K),r=i.querySelector(".play"),o=r.querySelector(".buffer"),u=r.querySelector(".loaded"),a=r.querySelector(".played"),s=i.querySelector(".play-bar"),c=i.querySelector(".vp-progress"),l=s.querySelector(".focus-target"),f=s.querySelector(".loaded"),d=s.querySelector(".played"),h=s.querySelector(".cuepoints"),v=i.querySelector(".timecode"),p=v.querySelector(".box"),m=i.querySelector(".ghost-timecode"),w=m.querySelector(".box"),b=i.querySelector(".thumb-preview"),g=i.querySelector(".thumb"),(y=i.querySelector(".volume"))&&(_=V(y.querySelectorAll("div")),t.config.embed.muted?St(0):St(t.config.request.cookie.volume)),T=i.querySelector(".play-bar .cc"),E=i.querySelector(".js-chapter-button"),(k=i.querySelector(".js-prefs"))&&kl.isCastConnected&&Zh(k),S=i.querySelector(".pip"),ys.airPlay&&(A=i.querySelector(".airplay")),(ys.webvr||ys.stereoscopic)&&t.config.video.spatial&&(M=i.querySelector(".stereoscopic")),R=i.querySelector(".fullscreen"),I=!1,W&&t.events.fire(Pc.Js,W),ut&&kt(),Mt(),n.get(Hl)){var Y=i.querySelector(".vp-live-status");Y.style.display="block";var J=Y.querySelector(".vp-live-status-circle");et?(J.classList.remove("offline"),J.classList.add("online"),k&&!kl.isCastConnected&&Xh(k)):(J.classList.add("offline"),J.classList.remove("online"),k&&Zh(k)),p.style.cursor="default",c.classList.add("disabled")}ot.renderChapterMarkers()}else!function(n,e){i.classList.add("trailer");var o={vimeoLogo:n,text:t.config.video.vod.button_text||"Voir la bande-annonce",strings:{watchOnVimeo:"Regarder sur vimeo.com"}};e&&(o.customLogo=e),i.innerHTML=dd.render("controlbar_trailer",o),r=i.querySelector(".play"),$=!0}(D,L)}}function Mt(){if(n.get(Hl)){var i=G&&t.config.duration>0;v.style.display=i?"block":"none"}}function Rt(){var e;function r(n){if(q=!1,e===n.pointerId&&!1!==n.isPrimary){var i=n.clientX;n.targetTouches&&n.targetTouches.length>0&&(i=n.targetTouches[0].clientX,n.preventDefault());var r=ht(i);vt(r),t.events.fire(Sc.Ha,r)}}function o(n){var e=n.type;"pointerup"===e||"MSPointerUp"===e?ef(i).off("pointermove",".vp-progress",r).off("pointerup",".vp-progress",o):"touchend"===n.type?ef(i).off("touchmove",r).off("touchend",o):ef(document).off("mousemove",r).off("mouseup",o),t.events.fire(Pc.$s),t.element.classList.remove("scrubbing")}t.events.on(wi.TIME_UPDATE,(function(n){var i=n.currentTime,e=n.timeProgress;q&&(0===t.config.embed.time||t.config.embed.time>0&&i>=t.config.embed.time)&&(q=!1),P||vt(e,i)})),t.events.on(Pc.Gs,(function(t){P=!0,F=t})),t.events.on(Pc.$s,(function(){P=!1,F=!1})),t.events.on(wi.SEEKED,(function(t){var n=t.timeProgress;F&&vt(n)})),n.get(Dl)&&!n.get(Bl)||(ef(i).on(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],".vp-progress",(function(n){if(!(n.button&&2===n.button||n.target.classList.contains("js-chapter-marker"))){var u=n.type;if(t.element.classList.add("scrubbing"),t.events.fire(Pc.Gs,!1,u),"pointerdown"===u||"MSPointerDown"===u){e=n.pointerId;try{n.target.msSetPointerCapture?n.target.msSetPointerCapture(e):n.target.setPointerCapture(e)}catch(t){}ef(i).on("pointermove",".vp-progress",r).on("pointerup",".vp-progress",o)}else"touchstart"===u?ef(i).on("touchmove",r).on("touchend",o):ef(document).on("mousemove",r).on("mouseup",o);var a=n.clientX;n.targetTouches&&n.targetTouches.length>0&&(a=n.targetTouches[0].clientX,n.preventDefault());var s=ht(a);if(O)vt(s);else{var c=t.config.video.duration*s;pt(s,c),mt(s,c),q=!0}return t.events.fire(Sc.Ha,s,null),!1}})),t.events.on(Sc.vs,(function(n,i){n=uc(n,0,t.config.video.duration),i||(i=n/t.config.video.duration),window.requestAnimationFrame((function(){pt(i,n),mt(i,n)}))})))}function Ct(n){if(n.element.parentElement){if(n.isFullwidth())return n.element.style.right="",n.element.style.bottom="",void(n.element.style.height="");var i=ec(t.element),e=ec(n.button),r=ec(n.element.parentElement),o=ec(n.element),u=0,a=e.right-e.width/2+o.width/2;a=215&&i>=185))return void b.classList.add("hidden");a().then(f).catch((function(){}))}if(H){var l=function(t){var n=J,i=Array.isArray(n),e=0;for(n=i?n:n[D.iterator]();;){var r;if(i){if(e>=n.length)break;r=n[e++]}else{if((e=n.next()).done)break;r=e.value}var o=r,u=ec(o),a=u.left,s=u.right,c=u.width;if(t>=a&&t<=s)return{clientX:a+c/2,snappedTo:o}}return{clientX:t,snappedTo:null}}(n.clientX),d=l.clientX,v=l.snappedTo,p=dt(d),y=t.config.video.duration*p;J.forEach((function(t){return t.classList.toggle("active",t===v)})),t.config.request.thumb_preview&&o&&!u&&a().then((function(n){var i=Q(function(n){var i=t.config.video.duration/t.config.request.thumb_preview.frames,e=Math.min(t.config.request.thumb_preview.frames-1,Math.ceil(n/i)),r=e%t.config.request.thumb_preview.columns,o=Math.floor(e/t.config.request.thumb_preview.columns);return[-r*t.config.request.thumb_preview.frame_width/2,-o*t.config.request.thumb_preview.frame_height/2]}(y),2),e=i[0],r=i[1];return window.requestAnimationFrame((function(){g.style.backgroundPosition="".concat(e,"px ").concat(r,"px")})),n})).catch((function(){})),window.requestAnimationFrame((function(){w.innerHTML=yd(y);var t=(100*p).toFixed(3);m.style.left="".concat(t,"%"),function(t){var n=Q(function(){var t=ec(r).left,n=ec(s).right,i=ec(b).width,e=t+Math.ceil(i/2),o=n-Math.ceil(i/2),u=lt(),a=ft()-u;return[(e-u)/a,(o-u)/a]}(),2),i=n[0],e=n[1],o=(100*Math.max(i,Math.min(e,t))).toFixed(3);b.style.left="".concat(o,"%")}(p),n.clientX>ft()+10&&!b.contains(document.elementFromPoint(n.clientX,n.clientY))&&h()}))}}function h(){m&&(m.classList.add("invisible"),b.classList.add("invisible")),H=!1,ef(s).off("click",l)}n.get(Dl)&&!n.get(Bl)||ef(i).on("mouseenter",".vp-progress",(function(n){H||B||(m.classList.remove("hidden"),H=!0,d(n),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){m.classList.remove("invisible")}))})),t.config.request.thumb_preview&&o&&!u&&a().then(f).catch((function(){})),ef(s).on("click",l))})).on("mousemove",".play-bar",d).on("mouseleave",".play-bar",h).on("mouseenter",".js-chapter-marker",(function(){u=!0})).on("mouseleave",".js-chapter-marker",(function(){u=!1,o=null})),ef(i).on("transitionend",".ghost-timecode",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&(m.classList.add("hidden"),b.classList.add("hidden"))}),!1),t.events.on(Pc.Fc,h),t.events.on(Pc.Jc,(function(){e=null}))}(),function(){var n;function e(n){var i=n.clientX;n.targetTouches&&(i=n.targetTouches[0].clientX,n.preventDefault());var e=o(i);t.events.fire(Sc.za,e),St(e)}function r(n){B=!1,t.events.fire(Pc.Ys),t.element.classList.remove("scrubbing");var o=n.type;"pointerup"===o||"MSPointerUp"===o?ef(i).off("pointermove",".volume",e).off("pointerup",".volume",r):"touchend"===n.type?ef(document).off("touchmove",e).off("touchend",r):ef(document).off("mousemove",e).off("mouseup",r),y.setAttribute("tabindex",y.getAttribute("data-tabindex")),y.removeAttribute("data-tabindex")}function o(t){var n=ec(y).left;return uc((t-n)/(ec(y).right-n),0,1)}ef(i).on("mousemove",".volume",(function(t){var n=t.srcElement;if(-1===_.indexOf(n)){var i=ec(y),e=t.clientX,r=i.bottom-2;if(n=document.elementFromPoint(e,r),-1===_.indexOf(n))return}n.classList.add("hover"),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){n.classList.remove("hover"),n.classList.add("animate")}))}))})),ef(i).on("transitionend",".volume div",(function(t){"height"===t.propertyName&&this.classList.remove("animate")})),ef(document).on("contextmenu",".volume",(function(){this.blur()})),ef(i).on(ys.pointerEvents?"pointerdown":["touchstart","mousedown"],".volume",(function(u){if(1===u.which){y.setAttribute("data-tabindex",y.getAttribute("tabindex")),y.removeAttribute("tabindex"),B=!0,t.element.classList.add("scrubbing"),t.events.fire(Pc.Ks);var a=u.type;if("pointerdown"===a||"MSPointerDown"===a){n=u.pointerId;try{u.target.msSetPointerCapture?u.target.msSetPointerCapture(n):u.target.setPointerCapture(n)}catch(t){}ef(i).on("pointermove",".volume",e).on("pointerup",".volume",r)}else"touchstart"===a?ef(document).on("touchmove",e).on("touchend",r):ef(document).on("mousemove",e).on("mouseup",r);var s=u.clientX;u.targetTouches&&(s=u.targetTouches[0].clientX);var c=o(s);t.events.fire(Sc.za,c),St(c)}})),t.events.on(Pc.Ss,(function(n){t.backbone.muted?St(0):!B&&_&&St(n)})).on([Sc.Qa,Sc.Za],(function(){At()}))}(),Nh(i,".js-chapter-marker",(function(n){var i=parseFloat(n.target.dataset.time)+.001;t.events.fire(Pc.Bs,i,"controlbar")})),t.events.on(yi.CHAPTER_CUES_UPDATED,(function(){ot.renderChapterMarkers()})),function(){function e(){var n=t.backbone.chapters,i=0;return V(n).map((function(n){var e=t.currentTime;return{index:"".concat(i+=1),label:n.text,id:n.id,active:e>=n.startTime&&e0){var e=new zh(t,{id:"quality",title:"Qualité",items:o()});e.on("select",(function(n){t.events.fire(Sc.Ya,n)})),r&&e.setTitleStat(r),e.pinTitle(),i.push(e)}if(t.backbone.supportsPlaybackRate&&t.config.embed.settings.speed){var u=at.map((function(n){return n.active=n.id===t.backbone.playbackRate,n})),a=new zh(t,{id:"speed",title:"Vitesse",items:u});a.on("select",(function(n){t.events.fire(Sc.ps,n)})),a.pinTitle(),i.push(a)}var s=new Ph(t,k,i);function c(n){s.element.classList.toggle("vp-menu-center",n),t.events.fire(Pc.oc,s.isCentered(),s)}return n.watch("ui.controlbar.isPrefsMenuCentered",c),c(n.get("ui.controlbar.isPrefsMenuCentered")),ys.touch&&s.element.classList.add("vp-menu-carousel"),s}())).show(i);X.toggle(i)}})),t.events.on(Pc.As,(function(t){e=t,X&&X.getPanel("quality")&&X.getPanel("quality").setActiveItem(t)})),t.events.on(yi.STREAM_CHANGE,(function(t){var n=t.quality||"".concat(t.height,"p");r=n,X&&X.getPanel("quality")&&X.getPanel("quality").setTitleStat(Ah(t))})),t.events.on(Pc.Is,(function(t){X&&X.getPanel("speed")&&X.getPanel("speed").setActiveItem(t)}))}(),Nh(i,".pip",(function(){"picture-in-picture"!==t.backbone.presentationMode?t.events.fire(Sc.cs):t.events.fire(Sc.ls)})),t.events.on(Go,(function(){S&&(S.classList.remove("hidden"),S.hidden=!1,ct())})).on($o,(function(){S&&(S.classList.add("hidden"),S.hidden=!0,ct())})).on(Ko,(function(){it=!0,S&&(S.classList.add("return"),S.classList.remove("enter"),S.setAttribute("title",S.getAttribute("data-title-return")))})).on(Yo,(function(){it=!1,S&&(S.classList.add("enter"),S.classList.remove("return"),S.setAttribute("title",S.getAttribute("data-title-enter")))})),ys.airPlay&&(Nh(i,".airplay",(function(){t.events.fire(Pc.Vl)})),t.events.on(Pc.Ll,(function(){A&&(A.classList.remove("hidden"),A.hidden=!1,ct())})).on(Pc.Nl,(function(){A&&(A.classList.add("hidden"),A.hidden=!0,ct())})).on(Pc.Pl,(function(){nt=!0,A&&(A.classList.remove("off"),A.classList.add("on"),A.setAttribute("title",A.getAttribute("data-title-on"))),Et()})).on(Pc.Fl,(function(){nt=!1,A&&(A.classList.remove("on"),A.classList.add("off"),A.setAttribute("title",A.getAttribute("data-title-off")))}))),Nh(i,".fullscreen",(function(){t.events.fire(Pc.Ns)})),t.events.on(Pc.cc,(function(){C=!1,i.classList.remove("tiny")})),t.events.on(Pc.fc,(function(t){if(R){var n=R.cloneNode(!0);R.parentNode.replaceChild(n,R),R=n}t||(C=!0),e&&i.classList.add("tiny")})),t.events.on([Pc.Vc,Pc.Gs,Sc.za],Et).on([Pc.Fc,Pc.Uc],kt).on(Pc.sc,(function(){I=!1,kt()})).on(Pc.lc,(function(){I=!1})).on(Pc.Ms,(function(){z=!0,kt()})).on(Sc.za,(function(t,n){n||Et()})),ef(i).on(["pointerenter","pointerleave","mouseenter","mouseleave"],[".play",".play-bar",".custom-logo",".vp-menu"],(function(t){"pointerType"in t?"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE||(I="pointerenter"===t.type||"MSPointerEnter"===t.type):ys.touch||(I="mouseover"===t.type)})),t.events.on(Sc._overrideControlbarBehavior,(function(n){j=n,n?t.events.on(Sc.ss,(function(t){t?_t():yt()})):t.events.off(Sc.ss)})),t.events.on(Pc.gc,(function(t){if("not-supported"!==t&&"private-unlocked"!==t&&"help"!==t)L=!0,kt();else for(var n=i.querySelectorAll("a, button, input, [tabindex]"),e=0,r=n.length;e2&&void 0!==arguments[2]?arguments[2]:1;nt(this),this.version=e,this.visible=!1;var r=this.If=document.createElement("div");r.classList.add("compass-wrapper"),r.innerHTML=dd.render("compass",{version:e}),r.classList.add("cloaked"),t.appendChild(r),n&&r.addEventListener("click",n),this.jf=r.querySelector(".compass-slice"),this.Df=r.querySelector(".compass-line");var o=function(){i.Lf=!0},u=function(t){return function(){setTimeout((function(){i.Lf||(i.fade(),i.Lf=!1)}),t)}};ef(this.If).on("mousein",o).on("pointerin",o).on("mouseout",u(1e3)).on("pointerout",u(1e3)),u(2500)()}var n=t.prototype;return n.setAngle=function(t,n){var i=this;this.Du&&window.cancelAnimationFrame(this.Du);var e=0;1===this.version?e=-45:2===this.version&&(e=-30);var r="".concat(e+n),o=(t+85)/170;this.Du=window.requestAnimationFrame((function(){i.jf.setAttribute("transform","rotate(".concat(r,", ").concat(18,", ").concat(18,")")),i.Df&&i.Df.setAttribute("d",i.Nf(o,18))}))},n.Nf=function(t,n){var i=2*n-Math.round(2*n*t),e=(2*n-2*Math.sqrt(2*i*n-Math.pow(i,2)))/2,r=2*n-e-5;return"M".concat(e+5,",").concat(i," L").concat(r,",").concat(i," z")},n.reveal=function(){var t=this;this.If.classList.remove("cloaked"),window.requestAnimationFrame((function(){t.If.classList.add("in")})),this.visible=!0},n.fade=function(){this.If.classList.add("fade"),this.visible=!0},n.hide=function(){var t=this;this.If.classList.remove("in"),this.If.classList.remove("fade"),this.If.classList.add("leaving"),ef(this.If).on("transitionend",(function n(){"opacity"===event.propertyName&&(t.If.classList.remove("leaving"),t.If.classList.add("cloaked"),t.visible=!1),ef(t.If).off("transitionend",n)}))},n.updatePosition=function(t){if(t){var n=ec(t);if(n.height<265)return this.If.classList.remove("align-bottom"),void this.If.classList.add("hidden");if(n.height<336)return this.If.classList.remove("hidden"),void this.If.classList.add("align-bottom");this.If.classList.remove("hidden"),this.If.classList.remove("align-bottom")}},n.getWrapper=function(){return this.If},t}();function uv(t,n,i){var e=null,r=ys.touch?4500:2e3,o=!0,u=!0,a=!1,s=null,c=null,l=[],f=!1,d=null,h=null,v=!0,p=!1,m=!1,w=!1,b=!1,g=!1,y=i.querySelector(".vp-target"),_=i.querySelector(".vp-sidedock"),k=i.querySelector(".vp-controls"),E=i.querySelector(".vp-title"),T=i.querySelector(".vp-video"),x=V(i.querySelectorAll(".vp-nudge")),S=!!ys.touch&&x.some((function(t){return!t.classList.contains("invisible")})),A=t.config.embed.autoplay&&t.config.request.flags.autohide_controls,M=ys.touch?300:0,R=null,C=Mh(t.config,"webvr").group||!1;function O(){clearTimeout(e),e=null}function I(){g&&(clearTimeout(e),e=setTimeout(D,r))}function j(){ph.element&&ph.element.classList.contains("js-player-fullscreen")&&(a||(i.classList.add("player-cursor-hide"),u=!0,a=!0))}function D(n){(p||v)&&(w||(O(),document.activeElement&&document.body.classList.contains("showfocus")&&(_.contains(document.activeElement)||k.contains(document.activeElement))||(t.events.fire(n?Pc.Fc:Pc.Uc),u=!0,ys.spatialPlayback&&t.config.video.spatial||(y.classList.add("hidden"),y.setAttribute("hidden","")),o=!0,j())))}function L(){I(),S||b||p&&v||(t.events.fire(Pc.Vc),y.classList.remove("hidden"),y.removeAttribute("hidden"))}function N(){p||v?i.removeAttribute("tabindex"):p||v||m||i.setAttribute("tabindex","0")}function P(){t.events.on([wi.TIME_UPDATE,wi.SEEKED],(function n(i){i.currentTime>=1.75&&null===e&&(t.events.fire(Pc.Ms),t.events.off([wi.TIME_UPDATE,wi.SEEKED],n))}))}function F(){T.classList.remove("threesixty-video"),t.element.classList.remove("grabbable"),t.element.classList.remove("grabbing"),s&&s.hide()}function U(){l.forEach((function(t){return clearTimeout(t)})),l=[]}function B(t){t&&(t.classList.remove("cloaked"),window.requestAnimationFrame((function(){t.classList.add("in")})))}function H(t){t&&(t.classList.add("leaving"),window.requestAnimationFrame((function(){ef(t).on("transitionend",(function n(i){"opacity"===i.propertyName&&(t.classList.remove("in"),t.classList.remove("leaving"),t.classList.add("cloaked"),ef(t).off("transitionend",n))}))})))}function z(t){ec(_).width>60?t.classList.add("vp-alert-bumpdown"):t.classList.remove("vp-alert-bumpdown")}return function(){var n=!0;function e(){L()}function c(e){var s;if(r=2e3,u)u=!1;else if(a&&(i.classList.remove("player-cursor-hide"),a=!1),0!==e.screenX&&e.screenX!==screen.width-1&&0!==e.screenY&&e.screenY!==screen.height-1){if(n=!0,ys.spatialPlayback&&(null==(s=t.config.video)?void 0:s.spatial)){var c=ec(t.element),l=e.clientX-c.left,d=e.clientY-c.top,h=d>t.element.clientHeight-55,v=l>t.element.clientWidth-45&&d<180;if(f||!h&&!v)return}o&&L(),I()}else O(),j(),n&&(D(!0),n=!1)}function l(){D(!0)}function d(t){var n=k.contains(t.target)||_.contains(t.target),i=s&&s.getWrapper().contains(t.target);p&&v||i?n||!p&&!v||D(!0):(clearTimeout(R),R=setTimeout(L,M))}ys.pointerEvents?ef(i).on("pointerenter",(function(t){if("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)return r=2e3,e();r=4500,d(t)})).on("pointermove",(function(t){if("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)return c(t)})).on("pointerleave",(function(t){if("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)return l()})):ef(i).on("touchmove",(function(){r=4500,I()})).on("touchend",d).on("mouseenter",e).on("mousemove",c).on("mouseleave",l)}(),t.events.on(wi.PLAY,(function(t){A||0===t||L()})).on(Pc.He,L).on([yi.BUFFER_ENDED,wi.SEEKED,Pc.$s,Pc.Ss,Pc.ec],I).on(Uo,(function(){g=!0})),t.events.on(Pc.Zs,(function(t){t&&I()})),t.events.on(Pc.gc,N).on(Pc.Js,(function(t){v=t,N()})).on(Pc.Xs,(function(t){p=t,N()})),t.events.on(Pc.ol,(function(){w=!0,L()})).on(Pc.ul,(function(){w=!1})),function(){var e=!1,r=!1,o=0;t.events.on(Pc.Zs,(function(t){r=t})),ef(i).on(ys.pointerEvents?"pointerup":"click",(function(i){if(!r&&2!==i.button&&i.target.classList&&function(t){return(t.classList.contains("vp-title")||t.classList.contains("vp-target")||E.contains(t.parentNode)&&"HEADER"===t.parentNode.tagName||T.contains(t))&&!_.contains(t)}(i.target)){var e=("pointerup"===i.type||"MSPointerUp"===i.type)&&"mouse"!==i.pointerType&&i.pointerType!==i.MSPOINTER_TYPE_MOUSE,u=g&&ys.spatialPlayback&&t.config.video.spatial&&c;if(ys.touch||e){var a=-1!==t.backbone.supportedPresentationModes.indexOf("inline")&&!ys.mobileAndroid;if(!u){if(g&&a)return;return void t.events.fire(Pc.Fs)}}1==++o&&setTimeout((function(){if(u){var e=h&&h.x===i.clientX&&h.y===i.clientY;return 1===o&&e&&!ys.mobileAndroid&&t.events.fire(t.backbone.paused?Pc.Fs:Pc.Ps),1!==o&&t.backbone.getEffectByName("ThreeSixtyEffect").snapToCenter(),void(o=0)}if(1===o){if(n.get(Dl)&&!n.get(Ul))return;t.events.fire(t.backbone.paused?Pc.Fs:Pc.Ps)}else t.events.fire(Pc.Ns);o=0}),200)}})),ef(i).on("mousedown",".vp-video-wrapper",(function(t){var n;if(!e)return y.classList.remove("hidden"),y.removeAttribute("hidden"),2!==t.button&&document.createEvent&&((n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,0,null),y.dispatchEvent(n)),!1})).on("contextmenu",".vp-video",(function(t){return y.classList.remove("hidden"),y.removeAttribute("hidden"),!1})),t.events.on(Sc.us,(function(t){if(t)return e=!0,void y.classList.add("hidden");e=!1,y.classList.remove("hidden")}))}(),function(){var n,e;ys.touch||(ef(i).on("focus","a, button, input, [tabindex]",(function(){e=this,clearTimeout(n),n=null,document.activeElement===this&&L()})),ef(i).on("blur","a, button, input, [tabindex]",(function(){document.activeElement===this&&(n=setTimeout(D,50))})),i.addEventListener("focus",(function(t){L(),e&&e.focus()}),!1),t.events.on(Pc.gc,(function(){m=!0,i.removeAttribute("tabindex")})),t.events.on(Pc.yc,(function(){m=!1})))}(),t.events.on(Pc.cc,(function(t){j(),c&&c.adjustRenderSize(),w&&L()})).on(Pc.fc,(function(t){o=!0,c&&c.adjustRenderSize(),t?D():(L(),O())})),P(),t.events.on(Sc.$a,(function(){o=!0,u=!0,v=!0,p=!1,b=!1,g=!1,P(),O()})),t.events.on(Sc.fs,(function(){var n=function(t){return function(){c&&t.apply(void 0,arguments)}},e=n((function(n){var i=t.element.classList.contains("webvr");c&&i&&c.toggleVR()})),r=n((function(n){c.isVRPresenting?setTimeout((function(){t.events.fire(ki.WEBVR_ENTER)}),100):setTimeout((function(){t.events.fire(ki.WEBVR_EXIT)}),100)}));t.events.on(Sc.hs,n((function(){var n=t.element.classList.contains("webvr");n||t.element.classList.add("grabbable"),s&&s.updatePosition(t.element),!s||s.visible||n||s.reveal()}))),t.events.on(Pc.Ts,n((function(){F(),ys.webvr&&c.isVRPresenting&&C&&c.toggleVR()}))),t.events.on(ki.CAMERA_UPDATE,n((function(t){s&&s.setAngle(t.lat,t.lon)}))),t.events.on(Uo,n((function(){t.config.video.spatial?function(){function n(t){d&&(d.innerHTML=dd.render("threesixty_reminder",t))}var e=t.backbone.getEffectByName("ThreeSixtyEffect");t.config.embed.settings.spatial_compass?(s||(s=new ov(t.element.querySelector(".vp-controls-wrapper"),(function(){e.snapToCenter()}))),s.updatePosition(t.element),s.reveal()):s&&s.hide(),t.events.once(Pc.Os,(function(){var i=t.config.embed.cards;(null==i?void 0:i.length)&&i[0].timecode<15||(l.push(setTimeout((function(){n({showArrows:!1,text:ys.android?"Regarder autour":"Cliquez et faites glisser pour voir autour"}),z(d),B(d),setTimeout((function(){return H(d)}),3e3)}),7e3)),ys.android||l.push(setTimeout((function(){n({showArrows:!1,text:ys.android?"Regarder autour":"Utilisez les touches de flèches pour en voir davantage"}),z(d),B(d),setTimeout((function(){return H(d)}),3e3)}),14e3)))})),function(){var t=i;if(!d){var n=d=document.createElement("div");n.classList.add("cloaked"),n.classList.add("vp-alert-round"),n.classList.add("vp-alert-round--top"),n.classList.add("vp-alert-round--threesixty"),t.appendChild(n)}}()}():!t.config.video.spatial&&s&&(F(),U())}))),(ys.webvr||ys.stereoscopic||ys.webxr)&&(ys.webvr&&window.addEventListener("vrdisplaypresentchange",r,!1),t.events.on(Pc.ic,n((function(){U(),ys.webvr&&c.hasVRHeadset&&C?c.toggleVR():t.events.fire(Pc.Nc)}))),t.events.on(ki.WEBVR_HARDWARE_AVAILABLE,n((function(t){var n=i.querySelector(".stereoscopic");n&&n.classList.contains("off")&&C&&n.classList.remove("off")}))),t.events.on(ki.WEBVR_ENTER,n((function(n){window.addEventListener("vrdisplaydisconnect",e,!1),window.addEventListener("vrdisplaydeactivate",e,!1);var r=i.querySelector(".stereoscopic");r&&r.classList.add("on"),s&&s.hide(),t.element.classList.remove("grabbable"),t.element.classList.add("webvr"),c.isUserInteracting=!1}))),t.events.on(ki.WEBVR_EXIT,n((function(n){window.removeEventListener("vrdisplaydisconnect",e),window.removeEventListener("vrdisplaydeactivate",e);var r=i.querySelector(".stereoscopic");r&&r.classList.remove("on"),s&&s.reveal(),t.element.classList.add("grabbable"),t.element.classList.remove("webvr"),c.isUserInteracting=!0}))));var o=null,u=n((function(n){var i=t.element.classList.contains("webvr");f||i||(f=!0,n.preventDefault(),t.element.classList.add("grabbing"),h={x:n.clientX,y:n.clientY},c.makeContact(h))})),a=n((function(n){var i=t.element.classList.contains("webvr");f&&!i&&(U(),c.move({x:n.clientX,y:n.clientY}))})),v=n((function(n){var i=t.element.classList.contains("webvr");f&&!i&&(t.element.classList.remove("grabbing"),c.releaseContact(!1),f=!1)})),p=n((function(n){n.preventDefault(),t.element.classList.contains("webvr")||(c.isUserInteracting||(c.isUserInteracting=!0),null!==o&&clearTimeout(o),U(),o=setTimeout((function(){t.element.classList.remove("player-cursor-hide"),t.element.classList.add("grabbable"),c.isUserInteracting=!1}),500),t.element.classList.add("player-cursor-hide"),t.element.classList.remove("grabbable"),c.moveWheel({x:n.deltaX,y:n.deltaY}))})),m=n((function(t){f||(f=!0,c.makeContact({x:t.touches[0].clientX,y:t.touches[0].clientY}))})),w=n((function(t){f&&(t.preventDefault(),U(),c.move({x:t.touches[0].clientX,y:t.touches[0].clientY}))})),b=n((function(t){c.releaseContact(!0),f=!1})),g=n((function(t){f||U(),c.moveDevice(t.alpha,t.beta,t.gamma,t.orientation)})),_=n((function(n){f=!1,t.element.classList.remove("grabbing"),c.abandonMotion()}));t.events.on(Uo,(function(){ys.android&&c&&window.addEventListener("deviceorientation",g,!1)})),t.events.once(Uo,(function(){if(t.store.watch("ui.player.boundingRect",(function(){s&&s.updatePosition(t.element),c&&c.adjustRenderSize(),f=!1})),ys.pointerEvents)ef(y).on("pointerdown",u),window.addEventListener("pointermove",a),window.addEventListener("pointerup",v),window.addEventListener("pointerleave",_);else{ef(y).on("mousedown",u).on("wheel",p);var n=!(ys.browser.ie||ys.browser.edge);window.addEventListener("touchstart",m,!!n&&{passive:!1}),window.addEventListener("touchmove",w,!!n&&{passive:!1}),window.addEventListener("touchend",b,!!n&&{passive:!1}),window.addEventListener("mousemove",a),window.addEventListener("mouseup",v),window.addEventListener("mouseleave",_)}}))})),t.events.on(Wo,(function(t){F(),c=t,U()})),t.events.on(Pc.Ds,(function(){b=!0,clearTimeout(R),R=null})),t.events.on(Pc.Ls,(function(){b=!1})),{}}function av(t,n,i,e){if(!It(t))return t;for(var r=-1,o=(n=Zu(n,t)).length,u=o-1,a=t;null!=a&&++r0&&e(s)?i>1?t(s,i-1,e,r,o):Mu(o,s):r||(o[o.length]=s)}return o}(t,1):[]}var hv=function(t){return Kt(gt(t,void 0,dv),t+"")}((function(t,n){return null==t?{}:cv(t,n)})),vv=["clip_id","profile_id","player_size","dropped_frames","total_frames","bandwidth","markers","streams","files","video_dims","min_bandwidth","max_badwidth","buffer_occupancy","live_latency","scanner","vr_headset"],pv=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};this.tf=t,this.Pf={},this.Ff=n,this.Vf=null}var n=t.prototype;return n.init=function(){this.Uf(),this.Bf(),this.Hf(),this.zf()},n.reset=function(){this.Uf(),this.zf(),this.Ff()},n.qf=function(t,n){return this.Pf[t]=[n],this.Ff(),this.Pf[t]},n.Wf=function(t,n){return this.Pf[t].push(n),this.Pf[t].length>300&&this.Pf[t].splice(0,25),this.Ff(),this.Pf[t]},n.getCurrent=function(t){return this.Pf[t].slice(-1)[0]},n.getSeries=function(t){return this.Pf[t]},n.Gf=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,i=Ja({},t.data),e=this.$f(n,i);this.Kf(n,n,e)},n.$f=function(t,n){if(t===nl.CHUNK_DOWNLOADED){var i={};i.duration=fc(n.duration,2),i.size=n.size,i.index=n.index,i.profile_id=n.profile_id,i.quality=n.quality,i.buffered=fc(n.buffered,2),i.ttfb=fc(n.ttfb,2),i.headers=hv(n.headers,["x_vim_cachebc","x_cache","akamai_edge_ip","x_akamai_request_id","content_type"]);var e=0,r=0,o=0,u=i.headers.x_vim_cachebc,a=i.headers.x_cache;return u?u.split(",").forEach((function(t){var n=Q(t.split(":"),2),i=n[0],e=n[1];"E"!==i||"h"!==e?"h"!==e||(r=1):o=1})):a&&(r="HIT"===a.substr(0,3),o="HIT"===a.substr(-3)),o?e=2:r&&(e=1),i.cache_hit=e,i}if(t===nl.VIDEO_PLAYBACK_ERROR||t===nl.VIDEO_LOAD_FAILURE||t===nl.VIDEO_START_FAILURE||t===nl.VIDEO_READY)return n;if(void 0!==n.autoplay&&void 0!==n.looping){var s={};return s.cdn=n.cdn,s.quality=n.quality,s}return n},n.Kf=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},e=this.tf.backbone.currentTime,r=Date.now(),o=fc(dt(e,this.tf.backbone.buffered),2);this.Wf("markers",{type:t,title:n,vt:e,t:r,bt:o,data:i})},n.Bf=function(){this.tf.events.on(yi.BANDWIDTH,this.Yf.bind(this)),this.tf.events.on(yi.BUFFER_OCCUPANCY,this.Jf.bind(this)),this.tf.events.on(yi.CURRENT_FILE_CHANGE,this.Xf.bind(this)),this.tf.events.on(yi.DROPPED_FRAMES,this.Zf.bind(this)),this.tf.events.on(yi.SCANNER_CHANGE,this.Qf.bind(this)),this.tf.events.on(yi.STREAM_CHANGE,this.td.bind(this)),this.tf.events.on(yi.STREAM_CHANGE_START,this.nd.bind(this)),this.tf.events.on(wi.TIME_UPDATE,this.ed.bind(this)),this.tf.events.on(ki.WEBVR_HARDWARE_AVAILABLE,this.rd.bind(this)),this.tf.events.on(Pc.Yl,this.Gf.bind(this))},n.rd=function(t){t.displayName&&this.qf("vr_headset",t.displayName)},n.od=function(){var t=this;this.Vf=setInterval((function(){var n=t.tf.backbone.buffered,i=t.tf.backbone.videoElement;if(n&&n.length&&i&&i.currentTime){var e=n.end(n.length-1)-i.currentTime;t.qf("live_latency",e)}else t.qf("live_latency",0)}),500)},n.ud=function(){clearInterval(this.Vf)},n.Hf=function(){var t=this;this.tf.store.watch("ui.player.boundingRect",(function(n){var i=t.getCurrent("video_dims"),e=t.ad(n);t.Wf("video_dims",e);var r=i?"Resized from ".concat(i," to ").concat(e):"Resized to ".concat(e);t.Kf(Hc.MARKER_RESIZE,r)}))},n.ad=function(t){var n="".concat(Math.round(t.width),"px"),i="".concat(Math.round(t.height),"px"),e=window.devicePixelRatio&&window.devicePixelRatio>1?"@".concat(fc(window.devicePixelRatio,3),"x"):"";return n&&i?"".concat(parseInt(n,10),"×").concat(parseInt(i,10)," ").concat(e):""},n.Uf=function(){this.Pf=vv.reduce((function(t,n){return t[n]=[],t}),{})},n.zf=function(){var t=this.tf.backbone.currentFile;this.Wf("files",t),this.Wf("scanner",this.tf.backbone.currentScannerName),"HLSLiveScanner"===this.tf.backbone.currentScannerName&&this.od(),this.qf("min_bandwidth",0),this.qf("max_badwidth",0);var n=this.tf.store.get("ui.player.boundingRect"),i=this.ad(n);this.Wf("video_dims",i)},n.Yf=function(t){var n=Math.round(100*t.speed)/100;this.Wf("bandwidth",{videoTime:this.tf.backbone.currentTime,time:Date.now(),value:n});var i=this.getCurrent("max_badwidth"),e=this.getCurrent("min_bandwidth");(!e||ni)&&this.qf("max_badwidth",n)},n.Zf=function(t){var n=t.dropped,i=t.total;this.qf("total_frames",i),this.qf("dropped_frames",n)},n.su=function(){this.Kf(Hc.MARKER_SEEKED,"Seeked to ".concat(this.tf.backbone.currentTime))},n.sd=function(){this.Kf(Hc.MARKER_ENDED,"Ended")},n.nd=function(t){var n=t.previousStreamIndex,i=t.index,e=t.streams,r=e[i],o=e[n],u=o?o.bitrate:null;if(u!==r.bitrate&&null!==u){var a=this.ld(o),s=this.ld(r);r.bitrateu&&this.Kf(Hc.MARKER_UPSWITCH,"Starting Upswitch from ".concat(a," to ").concat(s))}},n.td=function(t,n,i){var e=i[n],r=this.ld(e);this.Kf(Hc.MARKER_SWITCH_COMPLETE,"Completed switch to ".concat(r)),this.Wf("streams",{profile:void 0!==t?t.profile:null,quality:void 0!==t?t.quality:"".concat(e.height,"p"),bitrate:e.bitrate,framerate:e.framerate,height:e.height,width:e.width,id:e.id,codec:Sh(e.codecs)})},n.Xf=function(){var t=this.getCurrent("files"),n=this.tf.backbone.currentFile;this.Wf("files",n);var i=n.metadata.cdn,e=t?t.metadata.cdn:null,r=t?Vc[t.mime]:null,o=Vc[n.mime],u="CDN to ".concat(i,"/").concat(o);e&&(u="CDN from ".concat(e,"/").concat(r," to ").concat(i,"/").concat(o)),this.Kf(Hc.MARKER_FILE_CHANGE,u)},n.Jf=function(t){var n=Math.round(1e3*t)/1e3;this.Wf("buffer_occupancy",{videoTime:this.tf.backbone.currentTime,time:Date.now(),value:n})},n.Qf=function(){var t=this.getCurrent("scanner"),n=this.tf.backbone.currentScannerName;this.qf("scanner",n),t&&this.Kf(Hc.MARKER_SCANNER_CHANGE,"Scanner change to ".concat(n)),"HLSLiveScanner"===n?this.od():this.ud()},n.fd=function(){this.Kf(Hc.MARKER_STALLED,"Stalled")},n.ld=function(t){return"".concat(t.width,"×").concat(t.height,"@").concat(Math.round(t.framerate)," ").concat(Math.round(t.bitrate/1e3).toLocaleString()," Kbps")},n.ed=function(){this.Ff()},H(t,[{key:"onDataChange",set:function(t){this.Ff=t}}]),t}(),mv=function(t,n,i){return Math.min(Math.max(t,n),i)},wv=function(){function t(t,n){var i=this;this.Z=t,this.tf=n,this.dd=new pv(this.tf),this.dd.onDataChange=function(){i.vd()},this.dd.init(),this.Sn(),this.Y=!1,this.pd=!1,this.wd=!1}var n=t.prototype;return n.render=function(){if(this.Y){var t={};try{t=this.bd()}catch(t){}this.Z.innerHTML=dd.render("debug_panel",t)}},n.vd=function(){if(this.Y)try{var t=this.bd();this.Z.querySelector(".vp-stats-debug-values").innerHTML=dd.render("debug_values",t)}catch(t){}},n.resetData=function(){this.dd.reset(),this.render()},n.Sn=function(){var t=this;this.tf.events.on(Pc.Rc,(function(){"tiny"!==t.tf.store.get("ui.player.mode")&&(t.Z.classList.contains("hidden")?t.showPanel():t.hidePanel())})),Nh(this.Z,".vp-copy-debug",this.gd.bind(this)),this.tf.events.on(Pc.Jc,(function(){t.resetData()})),Nh(this.Z,".vp-stats-debug-close",(function(){t.hidePanel()})),this.tf.store.watch("ui.player.mode",this.toggleVisibility.bind(this))},n.hidePanel=function(){this.Z.classList.add("hidden"),this.Z.setAttribute("hidden",""),this.Z.setAttribute("aria-hidden","true"),this.Y=!1},n.showPanel=function(){this.Z.classList.remove("hidden"),this.Z.removeAttribute("hidden"),this.Z.setAttribute("aria-hidden","false"),this.Y=!0,this.render()},n.toggleVisibility=function(t){if("tiny"===t&&this.Y)return this.pd=!0,void this.hidePanel();this.pd&&(this.showPanel(),this.pd=!1)},n.bd=function(){var t,n,i,e=this.dd.getCurrent("scanner"),r="MediaSourceScanner"===e,o="HLSLiveScanner"===e,u=this.dd.getCurrent("video_dims"),a=!(!this.tf.config.request.files||!this.tf.config.request.files.dash)&&this.tf.config.request.files.dash.separate_av,s=r||o?this.yd():null,c=r||o?this._d(s):null,l=this.dd.getCurrent("vr_headset")||null,f=this.tf.currentTime,d=ft(f,this.tf.backbone.buffered),h=f+d,v=this.kd(this.tf.backbone.buffered),p=this.tf.backbone.brainDebug,m={playerVersion:el(this.tf.config),sessionId:this.tf.config.request.session,clientIp:null==(t=this.tf.config.request)||null==(n=t.client)?void 0:n.ip,showSessionId:this.wd,clipId:this.tf.config.video.id,isDash:r,isLive:o,embedSize:u,separateAudioVideo:a,bandwidthSeriesSvg:c,isCopyDisabled:!!this.tf.doNotTrackEnabled||this.tf.config.embed.settings.background,isDNTEnabled:this.tf.doNotTrackEnabled,hideCloseButton:!!this.tf.config.embed.settings.background,vrHeadsetName:l,currentTime:fc(f,3),bufferAhead:fc(d,3),bufferEnd:fc(h,3),readyState:this.tf.backbone.readyState,support:JSON.stringify(ys),ua:null==(i=navigator)?void 0:i.userAgent,bufferedRanges:JSON.stringify(v),brainDebug:JSON.stringify(p)};return Object.assign(m,this.Ed(),this.Td(),this.xd(),this.Sd(),this.Ad(),this.Md(o),this.Rd())},n.Md=function(t){return t?{liveLatency:"".concat(this.dd.getCurrent("live_latency").toFixed(2)," seconds"),liveSessionID:this.tf.config.video.live_event.id}:null},n.Rd=function(){if(!this.tf.config.video.p2p)return null;var t=na(window,"Streamroot.instances[0].stats"),n=na(t,"realtime.dnaSources");if(void 0===n)return null;var i=na(t,"currentContent.cdnDownload"),e=na(t,"currentContent.dnaDownload");return{p2pSources:n,p2pOffload:"".concat(fc(e/(i+e)*100,1),"%")}},n.Ad=function(){var t=this.dd.getCurrent("files");return t?{delivery:t.mime}:null},n.Ed=function(){var t=this.dd.getCurrent("bandwidth");return{bandwidthKbps:t?"".concat(Math.floor(t.value/1e3).toLocaleString()," Kbps"):0,bandwidthMinKbps:"".concat(Math.floor(this.dd.getCurrent("min_bandwidth")/1e3).toLocaleString()," Kbps"),bandwidthMaxKbps:"".concat(Math.floor(this.dd.getCurrent("max_badwidth")/1e3).toLocaleString()," Kbps")}},n.Td=function(){var t=this.dd.getCurrent("streams");return{codec:t?t.codec:null,resolution:t?"".concat(t.width,"×").concat(t.height,"@").concat(Math.round(t.framerate)," ").concat(Math.round(t.bitrate/1e3).toLocaleString()," Kbps"):null}},n.Sd=function(){var t=this.dd.getCurrent("total_frames")||0,n=this.dd.getCurrent("dropped_frames")||0;return{totalFrames:t,droppedFrames:n,droppedFramesPercent:0!==t?"".concat((n/t*100).toFixed(2),"%"):0}},n.xd=function(){var t=this;return{testGroup:Object.keys(this.tf.config.request.ab_tests).map((function(n){return"".concat(n,": ").concat(t.tf.config.request.ab_tests[n].group)})).join(", ")}},n.yd=function(){return{timeSeries:this.dd.getSeries("bandwidth"),max:this.dd.getCurrent("max_badwidth")}},n.Cd=function(){return{timeSeries:this.dd.getSeries("buffer_occupancy")}},n._d=function(t){for(var n=t.timeSeries,i=t.max||1,e=n.length,r=e<100?0:e-100,o=n[r],u=n[e-1],a=o?o.time:0,s=u?u.time:0,c=[],l=r;ln)return"";var o=(r-t)/(n-t)*250;return isNaN(o)&&(o=0),"\n ".concat(e.title,'\n \n ')})).join("")},n.jd=function(){this.wd=!0,this.vd()},n.Dd=function(t,n){var i=n.getAttribute("data-original-text"),e=n.innerText,r=i;i||(n.setAttribute("data-original-text",e),r=e);var o=document.createElement("textarea");if(o.value=t,this.Z.appendChild(o),o.select(),document.execCommand("copy")){n.innerHTML="Copied",this.Z.removeChild(o);var u=setTimeout((function(){n.innerHTML=r,clearTimeout(u)}),1500);return!0}return this.Z.removeChild(o),!1},n.gd=function(){var t=this.Z.querySelector(".vp-copy-debug-label"),n=this.bd(),i=this.dd.getSeries("markers");delete n.bandwidthSeriesSvg;var e={version:2,tpl:n,mark:i},r=btoa(JSON.stringify(e));this.Dd(r,t)||this.jd()},n.kd=function(t){if(!t)return null;for(var n=t.length,i=0,e=[];i6e4?(this.textAlert.hide(),this.Hd()):(this.timeAlert.hide(),this.textAlert.show("Cet évènement n'a pas encore commencé"))},n.Hd=function(){var t=this.zd();this.timeAlert.show(t[0],t[1],t[2]),!this.store.get(Fl)&&!this.store.get(Vl)||this.Oa||setTimeout(this.Nd.bind(this),3e4)},n.Bd=function(){return this.startTime-new Date},n.zd=function(){var t=this.Bd(),n=(t/6e4).toFixed(0),i=(t/36e5).toFixed(0),e=(t/864e5).toFixed(0),r=(new Date).toDateString()===this.startTime.toDateString();if(e>1||!r)return["This event is scheduled for","".concat(["January","February","March","April","May","June","July","August","September","October","November","December"][this.startTime.getMonth()]," ").concat(this.startTime.getDate()),"at ".concat(gd(this.startTime))];if(i>1&&r)return["This event is scheduled for","Today","at ".concat(gd(this.startTime))];var o=n>1?"minutes":"minute";return["This event will start in","".concat(n," ").concat(o),""]},n.Vd=function(){this.hide()},n.Ud=function(){this.textAlert.show("Le live stream est déconnecté"),ys.iOS&&ph.element&&(this.player.events.fire(Pc.lc),ph.exit())},n.Fd=function(){this.textAlert.show("L'évènement live a fini")},t}();function yv(t,n){var i,e=n.querySelector(".vp-notification");function r(t,r){if(null!==n.parentElement.offsetParent){n.classList.remove("hidden"),n.removeAttribute("hidden"),n.setAttribute("data-name",t);var u=function(t){var i="watchlater"===t||"unwatchlater"===t?.5:.4,e=n.clientHeight;return n.clientHeight>n.clientWidth&&(e=n.clientWidth),{height:Math.round(e*i),width:Math.round(e*i*1.6)}}(t),a="width:"+u.width+"px;height:"+u.height+"px";e.style.cssText=a,e.innerHTML=r,"watchlater"!==t&&"unwatchlater"!==t||function(t,n){var i=t.querySelector(".hour-hand"),e=t.querySelector(".minute-hand");if(i&&e){var r=n?1:-1,o=new Date,u=Math.abs(o.getHours()-12),a=o.getMinutes(),s=a/60*360-135,c=u/12*360+a/60*5,l=c+45*r,f=s+540*r;i.style[ys.transformProperty]="rotate("+c+"deg)",e.style[ys.transformProperty]="rotate("+s+"deg)",window.requestAnimationFrame((function(){t.classList.add("animate"),ys.browser.firefox||ys.browser.opera||window.requestAnimationFrame((function(){i.style[ys.transformProperty]="rotate("+l+"deg)",e.style[ys.transformProperty]="rotate("+f+"deg)"}))}))}}(e,"watchlater"===t),clearTimeout(i),n.classList.remove("animate"),window.requestAnimationFrame((function(){n.classList.remove("invisible"),i=setTimeout(o,750)}))}}function o(){n.classList.add("animate"),n.classList.add("invisible")}function u(){n.classList.remove("animate"),n.classList.remove("invisible"),n.classList.add("hidden"),n.setAttribute("hidden",""),n.removeAttribute("data-name"),e.innerHTML="",e.classList.remove("filled"),e.classList.remove("animate"),t.events.fire(Pc.jl)}return ef(n).on("transitionend",(function(t){e.contains(t.target)&&"height"===t.propertyName?setTimeout(o,100):t.target===n&&"opacity"===t.propertyName&&window.requestAnimationFrame(u)})),t.events.on(Pc.Bc,(function(t){t||r("like",dd.render("icon_heart"))})),t.events.on(Pc.Hc,(function(t){t||r("unlike",dd.render("icon_broken_heart"))})),t.events.on(Pc.zc,(function(t){t||r("watchlater",dd.render("icon_clock"))})),t.events.on(Pc.qc,(function(t){t||r("unwatchlater",dd.render("icon_clock"))})),t.events.fire(Pc.Cl),{}}function _v(t){return t.account_type&&"basic"!==t.account_type&&!/_lapsed|_expired/.test(t.account_type)}function kv(t,n){var i=nt(),e=!1;function r(t){ac(t,"facebook",{width:580,height:400})}function o(t){ac(t,"twitter",{width:550,height:420})}function u(t){ac(t,"tumblr",{width:540,height:600})}var a={get events(){return i},setup:function(){var i;n.classList.remove("vp-share-embed-active","vp-share-embed-only"),(null==(i=t.config.embed.settings.share)?void 0:i.embed_only)&&n.classList.add("vp-share-embed-only");var e=n.querySelector(".js-embedCopy");e&&(e.style.width=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;n=Object.keys(n).map((function(t){return n[t]}));var e=t.cloneNode();e.style.visibility="hidden",e.style.padding=0,t.parentElement.appendChild(e);var r=n.map((function(t){return e.innerText=t,e.clientWidth})),o=Math.max.apply(Math,tt(r)),u=window.getComputedStyle(t),a=parseFloat(u.fontSize);return t.parentElement.removeChild(e),"".concat((o+i)/a,"em")}(e,["Copier","Copié !"])),t.events.on(Pc.Ec,r).on(Pc.Tc,o).on(Pc.xc,u)},destroy:function(){t.events.off(Pc.Ec,r).off(Pc.Tc,o).off(Pc.xc,u)},getShareData:function(){var n,i,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.config.video.title,u=t.config.video.owner.name,a=t.config.video.share_url;return e=document.queryCommandSupported&&document.queryCommandSupported("copy"),r.template=dd.render("share",{url:t.config.video.url,shareUrl:a,playerShareUrl:"https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/share"),title:o,owner:u,embed:"public"===t.config.video.embed_permission&&t.config.embed.settings.embed,embedOnly:null==(n=t.config.embed.settings.share)?void 0:n.embed_only,embedCode:Bh(t.config.video.embed_code),copyButton:e,customizeEmbed:!!t.config.video.url,readOnly:!ys.touch,facebookIcon:dd.render("icon_facebook",{title:"Partager sur Facebook"}),twitterIcon:dd.render("icon_twitter",{title:"Partager sur Twitter"}),tumblrIcon:dd.render("icon_tumblr",{title:"Partager sur Tumblr"}),emailIcon:dd.render("icon_mail",{title:"Partager par e-mail"}),embedIcon:dd.render("icon_embed",{title:"Obtenir le code d’intégration"}),strings:{share:"Partager",emailSubject:"Découvrez « "+o+" » de "+u+" sur Vimeo",emailBody:"Découvrez « "+o+" » de "+u+" sur Vimeo.\n\nLa vidéo est disponible et peut être vue depuis "+a+"\n\nSi vous aimez cette vidéo, partagez-là !\n\nVimeo regorge de vidéos incroyables. Voir d’autres vidéos sur https://vimeo.com.",embedTitle:"Intégration",embedSubtitle:"Ajoutez cette vidéo à votre site en utilisant le code d’intégration ci-dessous.",copy:"Copier",copySuccess:"Copié !",customize:'')+"Personnalisez cette intégration sur Vimeo"}}),r.qd=".js-facebook",(null==(i=t.config.embed.settings.share)?void 0:i.embed_only)&&(r.wrapperClass="embed-only",r.qd=".js-embed-input"),r},showShareView:function(){n.querySelector(".js-share-screen").classList.remove("cloaked"),n.classList.remove("vp-share-embed-active"),i.fire(Pc.Ic)},showEmbedView:function(){t.config.embed.settings.share.embed_only||(n.querySelector(".js-embed-screen").classList.remove("cloaked"),n.classList.add("vp-share-embed-active")),i.fire(Pc.jc)}};return function(){var r;ef(n).on("transitionend",".js-share-screen",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&(i.fire(Pc.Lc),this.classList.add("cloaked"))})).on("transitionend",".js-embed-screen",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&(i.fire(Pc.Dc),this.classList.add("cloaked"),lc(n))})).on("copy","input[name=embed_code]",(function(){t.events.fire(Pc.Ac)})),Nh(n,".js-facebook",(function(){return t.events.fire(Pc.Ec,this.href),ic(),!1})),Nh(n,".js-twitter",(function(){return t.events.fire(Pc.Tc,this.href),ic(),!1})),Nh(n,".js-tumblr",(function(){return t.events.fire(Pc.xc,this.href),ic(),!1})),Nh(n,".js-email",(function(){return t.events.fire(Pc.Sc),window.top.location=this.href,ic(),!1})),Nh(n,".js-embed",(function(){return t.events.fire(Pc.pc),a.showEmbedView(),ic(),!1})),Nh(n,".js-embedCopy",(function(){if(e){n.querySelector("input[name=embed_code]").select();try{document.execCommand("copy")&&function(){t.events.fire(Pc.Ac);var i=n.querySelector(".js-embedCopy");i.innerHTML=i.getAttribute("data-success-label"),clearTimeout(r),r=setTimeout((function(){i.innerHTML=i.getAttribute("data-label")}),2e3)}()}catch(t){}return document.activeElement.blur(),!1}})),ys.touch?ef(n).on("focus","input[name=embed_code]",(function(){var t=this;setTimeout((function(){t.setSelectionRange(0,9999),t.setAttribute("readonly","readonly")}),0)})).on("blur","input",(function(){this.removeAttribute("readonly")})):ef(n).on("click","input[name=embed_code]",(function(){this.setSelectionRange(0,9999)}))}(),a}function Ev(t,n,i){var e,o,u,a=i.querySelector(".vp-outro"),s=null,c=!1,l=!1,f=!1,d=!1,h=!1,v=kd(x,250),p=null,m=t.config.request.ads instanceof Object,w=!1;function b(){return!h&&null===s&&!t.config.embed.loop}function g(){return t.config.embed.outro===qc.VOD?(o=qc.VOD,s=y(o),!0===d&&E(),r.resolve(s)):(h=!0,Ke("https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/outro?on_site=").concat(t.config.embed.on_site,"&type=").concat(t.config.embed.outro,"&email=").concat(t.config.embed.email?1:0),{withCredentials:!0}).json().then((function(n){return o=n.type,(s=y(o,n.data))&&(s.bgimage&&ml(s.bgimage),s.contexts&&s.contexts.forEach((function(t){t.videos.forEach((function(t){ml(t.thumbnail)}))}))),_v(t.config.video.owner)&&function(n,i){[qc.VIDEOS,qc.THREEVIDEOS,qc.PROMOTED].includes(n)&&i.contexts&&i.contexts.forEach((function(n){n.videos.reduce((function(n,i){return n.then(function(n){return function(){return t.preloadVideo("auto",n.id,{autoplay:!0}).catch((function(t){}))}}(i))}),r.resolve())}))}(o,s),s})))}function y(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=hl(t.element.clientWidth*ys.devicePixelRatio,t.element.clientHeight*ys.devicePixelRatio),r=e.width,o=e.height;if(i.img_base&&(i.bgimage=vl({width:r,height:o,baseUrl:i.img_base})),n===qc.VOD){var u=void 0!==t.config.video.vod.is_preorder?t.config.video.vod.is_preorder:!!t.config.video.vod.date_available,a=t.config.video.vod.is_coming_soon,s=t.config.video.vod.date_available_formatted_datetime||t.config.video.vod.date_available,c="Bientôt disponible sur Vimeo On Demand.";a&&s&&(c="Disponible sur Vimeo On Demand le "+s+" !"),u&&(c="Précommander maintenant. Disponible le "+s+"."),i={purchased:t.config.user.purchased,title:t.config.video.vod.feature_title,url:t.config.video.vod.url,currency:t.config.request.currency,countries:t.config.video.vod.countries,country:t.config.request.country,buttons:t.config.video.vod.purchase_options,translationMap:t.config.request.dynamic_translation_map,isPreorder:u,isComingSoon:a,releaseDate:s,strings:{watch:u?"Disponible le "+s:"Regarder",preRelease:c}}}return[qc.VIDEOS,qc.THREEVIDEOS,qc.PROMOTED].includes(n)&&(t.config.user.following=i.following,(i={contexts:Array.isArray(i)?i:[i],owner:t.config.video.owner.id,bgimage:i.bgimage,following:i.following}).contexts&&i.contexts.forEach((function(t){t.videos.forEach((function(n){if(n.fullTitle=n.title,n.byline="",n.owner.id!==i.owner&&(n.fullTitle=n.title+" de "+n.owner.name,n.byline="de "+n.owner.name),n.thumbnail_base){var e=Math.round(r/t.videos.length);n.thumbnail=vl({width:e,height:Math.round(e/1.778),baseUrl:n.thumbnail_base})}}))}))),n===qc.LINK&&(i.url=Jh(i.url),i.url2=Jh(i.url2)),n===qc.SHARE&&(i.strings={back:"Retour"}),i}function _(t){a.classList.toggle("vp-outro--link-medium",t)}function k(t){a.classList.toggle("vp-outro--link-large",t)}function E(){if(c=!0,o===qc.BEGINNING)return a.innerHTML="",void t.events.fire(Sc.$a);if(b())g().then((function(){return E()})).catch((function(){}));else{var r=function(){if([qc.VIDEOS,qc.THREEVIDEOS,qc.PROMOTED].includes(o)){var n;if(0===((null==(n=s)?void 0:n.contexts)||[]).reduce((function(t,n){return t+n.videos.length}),0))return null;s.showFollowButton=!t.config.user.owner&&t.config.user.logged_in,s.strings={follow:"Suivre",following:"Abonné",unfollow:"Ne plus suivre"}}return s&&(s.target=!t.config.embed.on_site),p=o,[qc.THREEVIDEOS,qc.PROMOTED].includes(o)&&(p=qc.VIDEOS),dd.render("outro_"+p,s)}();r&&(a.innerHTML=r,a.setAttribute("data-type",p),i.classList.remove("hidden"),i.removeAttribute("hidden"),l=!0,[qc.VIDEOS,qc.THREEVIDEOS].includes(o)?function(){var t=document.querySelector(".js-outro-followWrap");if(t){var n=window.getComputedStyle(t),i=parseFloat(n.fontSize);t.style.width="".concat(t.clientWidth/i,"em")}}():o===qc.LINK?(n.watch("ui.outro.isLinkTitleVisible",_),n.watch("ui.outro.isLinkDescriptionVisible",k),_(n.get("ui.outro.isLinkTitleVisible")),k(n.get("ui.outro.isLinkDescriptionVisible"))):o===qc.SHARE&&function(){var t=i.querySelector(".js-outro-content"),n=e.getShareData();t.innerHTML=n.template,e.setup()}(),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){i.classList.add("in"),x()}))})))}}function T(){if(l)return e.destroy(),c=!1,f=!1,l=!1,void window.requestAnimationFrame((function(){i.classList.remove("in"),t.events.fire(Pc.ul),A()}));c&&(c=!1,t.events.fire(Pc.ul))}function x(){var n;if(!f&&i.clientWidth){ef(window).off("resize",v),f=!0;var e=[];(null==(n=s)?void 0:n.contexts)&&s.contexts.forEach((function(t){t.videos&&t.videos.forEach((function(t){var n=t.id,i=a.querySelector('[data-video-id="'+n+'"]');i&&i.clientWidth>0&&e.push(n)}))})),t.events.fire(Pc.ol,e)}}function S(){u=setTimeout((function(){var n=t.config.embed.email||{};n&&"after"===n.position?(t.events.fire(Pc.Pc),t.events.on(Pc.kl,(function(){t.events.fire(Sc.as)}))):t.events.fire(Sc.as)}),250)}function A(){ef(window).off("resize",v),ef(window).on("resize",v)}return t.events.on(wi.TIME_UPDATE,(function(t){var n=t.currentTime,i=t.duration;t.timeProgress,d=!1,b()&&n>=i-10&&g().catch((function(){}))})),t.events.on(Uo,(function(){[qc.NOTHING,qc.BEGINNING,qc.EMAIL].includes(t.config.embed.outro)&&(o=t.config.embed.outro,s=!1)})),t.events.on(Pc.Kl,(function(){w=!0})),t.events.on(Pc.Ts,(function(){if(m&&!w)return t.events.on(Pc.Kl,S),void(m=!1);S()})),t.events.on(Pc._loadVideo,(function(){clearTimeout(u)})),t.events.on(Sc.as,(function(n,i){t.performDelegateAction(Lc,(function(){n&&(o=n,s=null,h=!1),i&&i.data&&(s=y(n,i.data)),d=!0,E()}))})),ef(i).on("click",".js-videoLink",(function(n){var i=parseInt(this.getAttribute("data-video-id"),10);t.events.fire(Pc.al,i),_v(t.config.video.owner)&&(n.preventDefault(),t.loadVideo(i,{autoplay:!0}))})),ef(i).on("click",".js-cta",(function(n){t.events.fire(Pc.bl,this.href)})),ef(i).on("click",".js-link",(function(n){t.events.fire(Pc.hl,this.href)})),ef(i).on("click",".js-imageLink",(function(n){t.events.fire(Pc.wl,this.href)})),ef(i).on("transitionend",(function(t){i.classList.contains("in")||(i.classList.add("hidden"),i.setAttribute("hidden",""))}),!1),t.events.on([Sc._hideOutro,Sc.$a,wi.PLAY,wi.SEEKED,Pc.Gs],T),t.events.on(Pc.ol,(function(){t.element.classList.add("player-outroVisible")})).on(Pc.ul,(function(){t.element.classList.remove("player-outroVisible")})),Nh(i,".js-outro-follow",(function(){t.events.fire(Pc.bc)})),ef(i).on("mouseleave",".js-outro-follow",(function(t){var n=document.querySelector(".js-outro-follow");n&&n.classList.remove("vp-outro-follow--activated")})),t.events.on(Pc.pl,(function(){var t=document.querySelector(".js-outro-follow");t&&(t.setAttribute("aria-pressed",!0),t.classList.add("vp-outro-follow--activated"))})),t.events.on(Pc.ml,(function(){var t=document.querySelector(".js-outro-follow");t&&t.setAttribute("aria-pressed",!1)})),t.events.on(Sc._showOverlay,(function(){setTimeout((function(){i.classList.add("hidden")}),150)})),t.events.on(Pc.yc,(function(){i.classList.contains("in")&&i.classList.remove("hidden")})),t.events.on(Sc.$a,(function(){s=null,h=!1,m=t.config.request.ads instanceof Object})),Nh(i,".js-vod-button",(function(){var n=this.getAttribute("data-product-id");return t.events.fire(Pc.mc,n),!1})),Nh(i,".js-vod-watch",(function(){if(!("date_available"in t.config.video.vod))return T(),t.events.fire(Pc.mc),!1})),a&&((e=new kv(t,a)).events.on(Pc.jc,(function(){t.config.embed.settings.share.embed_only||(i.querySelector(".js-back").classList.remove("cloaked"),i.classList.add("embed-active"))})).on(Pc.Ic,(function(){i.classList.remove("embed-active")})),Nh(i,".js-back",(function(){return e.showShareView(),!1})),e.events.on(Pc.Dc,(function(){i.querySelector(".js-back").classList.add("cloaked")}))),A(),{}}function Tv(t,n){var i,e=nt();function r(t){if("yes"===t.form.getAttribute("data-bubble")){t.form.setAttribute("data-bubble","no");var i=n.querySelector(".vp-validation-bubble");i.querySelector(".vp-validation-bubble-message").innerHTML=t.validationMessage||"Cette saisie comporte une erreur.";var e=ec(t),r=ec(t.form);i.style.left=e.left-r.left+"px",i.style.top=e.height+1+"px",i.classList.remove("hidden"),t.focus(),window.requestAnimationFrame((function(){i.classList.add("vp-validation-bubble-animate")})),o()}}function o(t){var e=n.querySelector(".vp-validation-bubble");if(e){if(t)return clearTimeout(i),void e.classList.remove("vp-validation-bubble-animate");clearTimeout(i),i=setTimeout((function(){e.classList.remove("vp-validation-bubble-animate")}),5e3)}}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.showBubble,e=void 0===i||i,u=n.querySelector("input[type=email]"),a=n.querySelector("input[type=text]");return u.setAttribute("aria-invalid","false"),u.setCustomValidity(""),u.checkValidity&&!u.checkValidity()?(u.setAttribute("aria-invalid","true"),u.validity.valueMissing&&u.setCustomValidity("Veuillez saisir votre adresse e-mail."),u.validity.typeMismatch&&u.setCustomValidity("Veuillez saisir une adresse e-mail valide."),e&&r(u),!1):(a.setAttribute("aria-invalid","false"),a.setCustomValidity(""),a.checkValidity&&!a.checkValidity()?(a.setAttribute("aria-invalid","true"),a.validity.typeMismatch&&a.setCustomValidity("Veuillez saisir un nom valide."),!1):(o(!0),!0))}var a=function(){e.fire(Pc.kl)};function s(i){if(!u())return!1;var e=i.querySelector("input[type=email]"),o=i.querySelector("input[type=submit]"),s={signature:"signature",time:"timestamp",expires:"expires"};function c(t){o.classList.remove("loading"),e.setCustomValidity("Uh oh. There was a problem. Please try again."),e.setAttribute("aria-invalid","true"),r(e)}Object.keys(s).forEach((function(n){i.querySelector("input[name=".concat(n,"]")).value=t.config.request[s[n]]})),o.classList.add("loading"),function(i,e,r){lc(n);var o=V(i.querySelectorAll("input")).map((function(t){return t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(t.value):encodeURIComponent(t.value)})).join("&"),u=new XMLHttpRequest;u.open(i.method,i.action+window.location.search,!0),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.withCredentials=!0,u.timeout=3e3,u.onload=function(){var i;try{i=JSON.parse(u.responseText)}catch(t){}!function(i,e){!1!==i?(t.config.embed.email=null,t.events.fire(Pc.fl),function(){var t=n.querySelector(".vp-email-capture"),i=n.querySelector(".vp-email-capture-confirm");t.classList.add("vp-email-capture-invisible"),i.classList.remove("vp-email-capture-confirm-hidden"),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){i.classList.add("in"),setTimeout(a,2250)}))}))}()):c(e.status)}(i,u)},u.onerror=function(t){r(t)},u.send(o)}(i,0,c)}var c={get events(){return e},getData:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.config.embed.email||{},r=i.custom_logo||e.custom_logo;if(r)var o=vl({width:150,height:75,baseUrl:r,defaultExtension:".png"});return n.template=dd.render("email_capture",{allowSkip:i.allow_skip||e.allow_skip,customLogo:o,text:i.text||e.text||"",action:"https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/submit-email"),confirmation:i.confirmation||e.confirmation||"Merci ! Votre e-mail a été enregistré.",referrer:t.config.request.referrer,strings:{email:"Adresse e-mail",fullName:"Nom (optionnel)",nothanks:"Non merci",submit:"Envoyer",disclaimer:"Partagez votre adresse e-mail avec le propriétaire de cette vidéo"}}),n.qd=".js-email-capture-form-input",n.modal=!0,n.logo=!1,n.preventBackgroundClose=!0,n.noblur=i.noblur,n.nofocus=i.nofocus,n}};return Nh(n,".vp-email-capture-form-button--cancel",(function(){a()})),Nh(n,".vp-email-capture-form-button--submit",(function(){this.form.classList.add("vp-email-capture-form-submitted"),this.form.setAttribute("data-bubble","yes"),u()})),ef(n).on("submit",".vp-email-capture-form",(function(){return t.events.fire(Pc.Cc),s(this),!1})).on(["focus","input"],".vp-email-capture-form-input[type=email]",(function(){u({showBubble:!1})})),c}function xv(t,n,i){var e,r,o,u=i.querySelector(".vp-overlay-cell"),a=i.querySelector(".vp-overlay"),s=i.querySelector(".vp-overlay-icon-wrapper"),c=s.querySelector(".vp-overlay-icon"),l=i.querySelector(".vp-overlay-logo"),f=!1,d=null,h=null,v=new kv(t,a),p=new Tv(t,a),m=!1,w=!1;function b(){var t=ec(i),n=ec(a),e=ec(l),r=n.bottom+(t.height-n.bottom)/2;return t.height-r-e.height/2+"px"}function g(){var t=ec(i),n=ec(a),e=ec(s),r=t.height/2,o=t.height-(t.bottom-n.bottom)/2;return{top:r-e.height/2+"px",transform:"translateY("+(o-r)+"px)"}}function y(n,e){i.setAttribute("data-name",n),a.innerHTML=e.template,ys.iOS&&ph.element&&(t.events.fire(Pc.lc),ph.exit()),e.noblur||ic(o=document.activeElement),e.modal&&(i.classList.add("modal"),i.setAttribute("data-modal","true")),e.preventBackgroundClose&&i.setAttribute("data-background-close","false"),e.wrapperClass&&i.classList.add(e.wrapperClass),e.icon.type&&(e.logo&&(l.classList.remove("hidden"),s.classList.add("cloaked"),window.requestAnimationFrame((function(){l.innerHTML=dd.render("logo"),l.style.bottom=b()}))),s.classList.remove("hidden"),c.innerHTML=e.icon.html,window.requestAnimationFrame((function(){var t=g();s.style.top=t.top,s.style[ys.transformProperty]=t.transform})),i.setAttribute("data-icon",e.icon.type),s.setAttribute("data-icon",e.icon.type),c.setAttribute("data-icon",e.icon.type),"private-unlocked"===n&&c.classList.add("open")),i.classList.add("invisible"),i.classList.remove("hidden"),i.removeAttribute("hidden"),i.classList.add("in"),h=e,d=n,f=!0,t.events.fire(Pc.gc,n),t.element.classList.add("player-overlayVisible"),["share","hd-not-allowed"].indexOf(n)>-1&&lc(i),window.requestAnimationFrame((function(){i.classList.remove("invisible"),!e.nofocus&&t.element.contains(document.activeElement)&&function(t){if(t){var n=i.querySelector(t);n&&n.focus()}}(e.qd),window.requestAnimationFrame((function(){a.classList.add("in"),u.classList.add("in")}))}))}function _(){a.classList.remove("in"),a.classList.add("out")}function k(n){if("true"!==i.getAttribute("data-modal")&&f){i.removeAttribute("data-background-close"),u.classList.remove("in"),u.classList.add("out"),_(),i.classList.remove("in"),i.classList.add("out"),clearTimeout(e),e=setTimeout(E,200),(null==n?void 0:n.preventDefault)&&n.preventDefault();var r=i.querySelector(".js-back");r&&r.classList.add("cloaked"),v.destroy(),t.events.fire(Pc.yc,d),t.element.classList.remove("player-overlayVisible"),f=!1,d=null,h=null,window.requestAnimationFrame((function(){o&&(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.activeElement,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{t.focus()}catch(t){n&&n(t)}}(o),o=null)}))}}function E(){i.setAttribute("hidden",""),i.removeAttribute("data-name"),i.removeAttribute("data-icon"),i.classList.add("hidden"),i.classList.remove("out"),i.classList.remove("embed-active"),i.classList.remove("modal"),i.classList.remove("embed-only"),u.classList.remove("out"),u.classList.remove("in"),s.removeAttribute("data-icon"),s.classList.add("hidden"),s.classList.remove("animate"),c.removeAttribute("data-icon"),c.innerHTML="",l.classList.add("hidden"),a.classList.remove("out"),a.innerHTML="",t.events.fire(Pc._c)}function T(){i.setAttribute("data-modal","false")}function x(t){if("yes"===t.form.getAttribute("data-bubble")){t.form.setAttribute("data-bubble","no");var n=i.querySelector(".vp-validation-bubble");n.querySelector(".vp-validation-bubble-message").innerHTML=t.validationMessage||"There is an error with this input.";var e=ec(t),r=ec(t.form);n.style.left=e.left-r.left+"px",n.style.top=e.height+1+"px",n.classList.remove("hidden"),t.focus(),window.requestAnimationFrame((function(){n.classList.add("vp-validation-bubble-animate")})),S()}}function S(t){var n=i.querySelector(".vp-validation-bubble");if(n){if(t)return clearTimeout(r),void n.classList.remove("vp-validation-bubble-animate");clearTimeout(r),r=setTimeout((function(){n.classList.remove("vp-validation-bubble-animate")}),5e3)}}function A(t){var n=i.querySelector("input[type=password]");return n.form.classList.contains("submitted")?(n.setAttribute("aria-invalid","false"),n.setCustomValidity(""),n.checkValidity&&!n.checkValidity()?(n.setAttribute("aria-invalid","true"),n.validity.valueMissing&&n.setCustomValidity("Veuillez saisir le mot de passe."),t||x(n),!1):(S(!0),!0)):null}function M(){R(),s.classList.remove("cloaked"),s.classList.add("animate"),window.requestAnimationFrame((function(){s.style[ys.transformProperty]="translateY(-10px)"})),T(),_()}function R(){l.classList.add("animate")}function C(){c.classList.add("open")}function O(){c.classList.add("pulled-back")}function I(n){return n.icon={type:"lock",html:dd.render("icon_lock")},n.qd=".js-login",n.modal=!0,n.logo=!0,n.template=dd.render("private_locked",{action:"https://".concat(t.config.vimeo_url,"/log_in"),strings:{title:"Vidéo privée",subtitle:"Connectez-vous pour visionner (si vous avez la permission)",logIn:"Se connecter"}}),n}function j(n){return n.icon={type:"lock",html:dd.render("icon_lock")},n.template=dd.render("password",{action:"https://".concat(t.config.player_url,"/video/").concat(t.config.video.id,"/check-password?referrer=").concat(t.config.request.referrer),strings:{title:"Mot de passe requis",subtitle:"Si vous l’avez, saisissez-le ci-dessous",password:"Mot de passe ",watch:"Regarder cette vidéo"}}),n.qd=".js-password",n.modal=!0,n.logo=!!t.config.embed.settings.logo,n}function D(t){return t.icon={type:"lock",html:dd.render("icon_lock")},t.template=dd.render("private_unlocked",{strings:{title:"Vidéo privée",subtitle:"Vous êtes connecté et avez la permission de visionner le contenu (félicitations).",watch:"Regarder cette vidéo"}}),t.qd=".js-watch",t}function L(t,n){return t.template=dd.render("error",{title:n.title,message:n.message}),t.qd=".js-close",t.modal=!!n.modal,t.logo=!!n.logo,n.icon&&"lock"===n.icon&&(t.icon={type:"lock",html:dd.render("icon_lock")}),t}function N(n){return n.template=dd.render("help",{onSite:t.config.embed.on_site,strings:{title:"Raccourcis clavier",volumeUp:"Augmenter le volume",volumeDown:"Baisser le volume",scrubForward:"Avancer",scrubBackwards:"Revenir en arrière",like:"J’aime",share:"Partager",watchLater:"Regarder plus tard",captions:"Activer les légendes",prefs:"Activer le Menu Préférences",fullscreen:"Activer le plein écran",viewOnVimeo:"Regarder sur Vimeo"}}),n.qd=".js-close",n}function P(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=i.redirectUrl,r=i.title,o=i.buttonText,u=i.ignoreText,a=i.bottomText,s=i.newWindow,c=hc(t.config.video.privacy,["disable","unlisted"]);return n.template=dd.render("app_redirect",{hideRedirectButton:c,redirectUrl:e,newWindow:s,strings:{title:r,buttonText:o,ignoreText:u,bottomText:a}}),n.modal=!1,n.logo=!1,n.preventBackgroundClose=!0,n}function F(){var n=t.config.embed.email||{};if(t.backbone){var i=n.timecode||0;m=t.backbone.currentTime>i}n&&"before"===n.position&&!m&&U()}function U(){n.get("ui.overlay.isEmailCaptureVisible")?t.events.fire(Sc._showOverlay,"email-capture"):w=!0}return t.events.on(Sc.Wa,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.unmakeModal&&T(),k()})),t.events.on(Sc._showOverlay,(function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=function(){var t={modal:!1,template:null,logo:!1,icon:{type:null,html:null}};switch(n){case"share":return y(n,v.getShareData(t,i)),void v.setup();case"private-locked":return void y(n,I(t));case"password":return void y(n,j(t));case"private-unlocked":return void y(n,D(t));case"error":return void y(n,L(t,i));case"help":return void y(n,N(t));case"email-capture":return void y(n,p.getData(t,i));case"app-redirect":return void y(n,P(t,i))}};if(f&&!i.nohide)return"share"!==d&&"help"!==d&&"hd-not-allowed"!==d||d!==n?(t.events.once(Pc._c,e),T(),void k()):void k();e()})),ef(i).on("input","input",(function(){this.form.classList.add("interacted")})).on(["focus","blur"],"input",(function(){S(!0)})).on("transitionend",".vp-validation-bubble",(function(t){"opacity"===t.propertyName&&"0"===window.getComputedStyle(this,"").opacity&&this.classList.add("hidden")})),t.events.on([Pc.kc,wi.PLAY],k),t.events.on(Pc.Zc,(function(){"private-locked"===d&&(T(),k())})),t.events.on(Pc.Jc,(function(){"share"===d&&(h=v.getShareData({modal:!1,template:null,logo:!1,icon:{type:null,html:null}}),a.innerHTML=h.template,v.setup())})),ef(window).on("resize",(function(){if(f){l.style.bottom=b();var t=g();s.style.top=t.top,s.style[ys.transformProperty]=t.transform}})),ef(i).on("transitionend",".vp-overlay-logo",(function(t){"opacity"===t.propertyName&&this.classList.contains("animate")&&(l.classList.add("hidden"),l.classList.remove("animate"))})),ef(i).on("transitionend",".vp-overlay-icon-wrapper",(function(t){t.propertyName.indexOf("transform")>-1&&(""===this.style[ys.transformProperty]?(this.classList.remove("centered"),"lock"!==this.getAttribute("data-icon")||c.classList.contains("open")||c.querySelector("canvas")?O():setTimeout(C,100)):"translateY(-10px)"===this.style[ys.transformProperty]&&(s.classList.add("centered"),s.style[ys.transformProperty]=""))})),ef(i).on("transitionend",".vp-overlay-icon",(function(t){t.propertyName.indexOf("transform")>-1&&(this.classList.contains("out")?(T(),k()):this.classList.contains("pulled-back")?(c.classList.add("out"),c.classList.remove("pulled-back")):this.classList.contains("open")&&O())})),n.watch("ui.overlay.isEmailCaptureVisible",(function(n){!n&&f&&"email-capture"===d?(w=f,T(),k()):n&&w&&(w=!1,t.events.fire(Sc._showOverlay,"email-capture"))})),t.events.on(Pc.ue,F),t.events.on(Pc.Jc,F),t.events.on(wi.TIME_UPDATE,(function(n){var i=n.currentTime,e=void 0===i?0:i,r=t.config.embed.email||{};r&&"during"===r.position&&(e=r.timecode&&!m&&(m=!0,U()))})),t.events.on(Pc.Pc,(function(){U()})),p.events.on(Pc.kl,(function(){t.events.fire(Pc.kl),T(),k()})),v.events.on(Pc.jc,(function(){t.config.embed.settings.share.embed_only||(i.querySelector(".js-back").classList.remove("cloaked"),i.classList.add("embed-active"))})).on(Pc.Ic,(function(){i.classList.remove("embed-active")})),Nh(i,".js-back",(function(){return v.showShareView(),!1})),v.events.on(Pc.Dc,(function(){i.querySelector(".js-back").classList.add("cloaked")})),ys.stereoscopic&&(t.events.on(Pc.Nc,(function(){t.events.fire(Sc._showOverlay,"app-redirect",{redirectUrl:t.doNotTrackEnabled?t.config.video.share_url:Wl(t.config.video.id,"player-spatial-redirect"),title:"Headset viewing isn’t currently supported in your mobile browser.",buttonText:"Regarder dans l’app Vimeo",ignoreText:null,bottomText:null,newWindow:!t.config.embed.on_site})})),ef(a).on("click",".app-redirect-ignore",(function(){k()})),ef(a).on("click","[data-new-window]",(function(t){return window.open(document.querySelector(".app-redirect-button").getAttribute("href")),!1}))),ef(a).on("click",".popup",(function(){return t.events.fire(Sc.Ga,"login-private-locked"),!1})),ef(a).on("click",".password input[type=submit]",(function(){this.form.classList.add("submitted"),this.form.setAttribute("data-bubble","yes"),A(!0)})).on("submit",".password form",(function(){return function(n){if(!A())return!1;var e=n.querySelector("input[type=password]"),r=n.querySelector("input[type=submit]");function o(t){r.classList.remove("loading"),e.setCustomValidity("Oh oh... Nous avons rencontré un problème. Veuillez réessayer."),e.setAttribute("aria-invalid","true"),x(e)}r.classList.add("loading"),function(t,n,e){lc(i);var r=V(t.querySelectorAll("input")).map((function(t){return t.name?encodeURIComponent(t.name)+"="+encodeURIComponent(window.btoa(function(t){return encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,n){return String.fromCharCode("0x"+n)}))}(t.value))):encodeURIComponent(t.value)})).join("&"),o=new XMLHttpRequest;o.open(t.method,t.action+window.location.search,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.withCredentials=!0,o.timeout=3e3,o.onload=function(){var t;try{t=JSON.parse(o.responseText)}catch(t){}n(t,o)},o.onerror=function(t){e(t)},o.send(r)}(n,(function(n,i){if(!1!==n){if(t.events.fire(Pc.Xc,n),"icon-hidden"===window.getComputedStyle(u,":after").content)return T(),void k();M()}else o(i.status)}),o)}(this),!1})).on(["focus","input"],[".password input[type=email]",".password input[type=password]"],(function(){A()})),Nh(a,".unlocked button",(function(){0===ec(c).width?(R(),T(),k()):M(),ys.iPad||ys.iPhone||t.events.once(Pc._c,(function(){t.events.fire(Pc.Fs)}))})),function(){var n;t.events.on(Pc.bs,(function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{modal:!0,final:!0};if(!1!==e.final){n=i;var r={modal:!1,template:null,logo:!1,icon:{type:null,html:null}};if(r.modal=e.modal,r.template=dd.render("error",{title:e.title,message:e.message}),r.qd=".js-close",f)return k(),void t.events.once(Pc._c,(function(){return y(i,r)}));y(i,r)}})),ef(a).on("click",".error",(function(i){t.events.fire(Pc.vl,i.target.href,n)}))}(),t.events.on(Pc.Jc,(function(){window.requestAnimationFrame((function(){T(),k()}))})),Nh(i,".js-close",(function(){t.events.fire(Pc.kc)})),ef(i).on(["click","touchend"],[".vp-overlay-content",".js-share",".vp-overlay-logo"],(function(t){t.stopPropagation()})).on(["click","touchend"],[".vp-overlay-cell","nav"],(function(){return"false"===i.getAttribute("data-background-close")||(t.events.fire(Pc.kc),!1)})),t.events.on(Sc.as,(function(){i.classList.add("hidden")})),t.events.on(Pc.ul,(function(){i.classList.contains("in")&&i.classList.remove("hidden")})),t.events.fire(Pc.Rl),{}}var Sv=[".vp-title a"],Av=[".vp-title a:hover"],Mv=["a",".button-link",".vp-overlay-wrapper .footnote.share a:hover",".vp-title h1",".vp-title span.user",".menu li:hover",".menu li.active",".vp-outro-link:hover",".vp-outro-videosTitle a:hover","li.vp-panel-item:hover","li.vp-panel-item-on",".vp-share-footnote a:hover",".card-link span",".vp-panel-collapsible .vp-panel-button:hover"],Rv=["a:hover",".button-link:hover"],Cv=[".vp-overlay-wrapper .close:hover .fill",".vp-overlay-wrapper .back:hover .fill",".stats-debug-close:hover .fill",".stats-debug-copy:hover",".card-link:hover .fill"],Ov=[".play-bar .on .fill",".play-bar a:hover .fill",".play-bar button:not(.toggle):hover .fill",".tiny-bars .fill",".vp-sidedock .on .fill",".controls-outro a:hover .fill",".card-link .fill",".vp-panel-collapsible .vp-panel-button:hover .fill"],Iv=[".vp-controls .play-bar .vp-cast-button"],jv=[".vp-sidedock .on:hover .fill"],Dv=[".play-bar .on .stroke",".vp-sidedock .on .stroke"],Lv=[".vp-sidedock .on:hover .stroke"],Nv=[".vp-sidedock button:hover",".vp-sidedock button.selected","&.touch-support .vp-sidedock button:active",".vp-controls .play:hover",".vp-controls .play-bar .played","&.no-playbar .play-bar button:not(.toggle):hover",".vp-controls.tiny .play-bar button:not(.toggle):hover",".vp-controls .volume div",".vp-overlay .buttons li",".vp-overlay .vp-overlay-content button",'.vp-overlay .vp-overlay-content input[type="submit"]','.vp-overlay .vp-overlay-content a[role="button"]',"li.vp-panel-item-on:before",".vp-controls .replay:hover",".vp-share-buttons li","button.vp-share-embedCopy",".vp-outro-button","a.vp-outro-vodButton",".vp-email-capture-form-button--submit",".vp-email-capture-checkIconWrapper",".chapter-marker",".vp-chapters-active-indicator"],Pv=["li.vp-panel-item-on:before"],Fv=[".vp-overlay .vp-overlay-content button",'.vp-overlay .vp-overlay-content input[type="submit"]','.vp-overlay .vp-overlay-content a[role="button"]',".vp-sidedock button:hover",".vp-sidedock button.selected",".vp-sidedock button:hover .vod-label",".vp-sidedock button.selected .vod-label",".play:hover",".vp-share-footnote--embed a",".vp-outro-button",".vp-outro-button:hover",".vp-outro-wrapper .vp-outro-link:hover","button.vp-share-embedCopy",".vp-outro-vodWrapper a.vp-outro-vodButton",".vp-outro-vodWrapper a.vp-outro-vodButton:hover","li.vp-panel-item:hover","li.vp-panel-item-on",".vp-panel-collapsible .vp-panel-button:hover","input.vp-email-capture-form-button--submit"],Vv=[".vp-controls .play:hover .fill",".vp-sidedock button:hover .fill",".vp-sidedock button.selected .fill",".play-bar a:hover .fill",".play-bar button:not(.toggle):hover .fill","&.no-playbar .play-bar button:not(.toggle):hover .fill",".vp-controls.tiny .play-bar button:not(.toggle):hover .fill",".vp-sidedock .on .fill",'.vp-share-wrapper a[role="button"] .fill',".vp-outro-vodButton .fill",".vp-email-capture-checkIconWrapper .fill",".vp-panel-collapsible .vp-panel-button:hover .fill"],Uv=[".vp-controls .play:hover .stroke",".vp-sidedock button:hover .stroke",".vp-sidedock button.selected .stroke",".vp-sidedock .on .stroke"],Bv=["li.vp-panel-item-on:before"],Hv=["li.vp-panel-item-on:before"],zv=['.vp-overlay-wrapper .vp-overlay a[role="button"]',".vp-sidedock button:hover",".vp-sidedock button.selected",".play:hover","button.vp-share-embedCopy",".vp-outro-button",".vp-outro-button:hover",".vp-outro-vodWrapper a.vp-outro-vodButton",".vp-outro-vodWrapper a.vp-outro-vodButton:hover","input.vp-email-capture-form-button--submit"],qv=[".vp-controls .play:hover .fill",".vp-sidedock button:hover .fill",".vp-sidedock button.selected .fill",".vp-controls .play-bar .fullscreen.tiny:hover .fill",".vp-share-button .fill",".vp-outro-vodButton .fill"],Wv=[".vp-sidedock button:hover .stroke",".vp-sidedock button.selected .stroke"],Gv=["li.vp-panel-item-on:before"],$v=['.vp-overlay .vp-overlay-content input[type="submit"]:active','.vp-overlay a[role="button"]:active',".vp-sidedock button:active",".vp-outro-vodWrapper a.vp-outro-vodButton:active"];function Kv(t,n){var i=n.uuid,e=n.id,r=n.isMobileDevice,o=null;function u(t,n){var o=".player-".concat(i," "),u=o+t.join(","+o);if(n){var a="".concat(e," ");u+=",".concat(a).concat(t.join(","+a))}return r&&(u=u.replace(/:hover/g,":active")),u.replace(/ &/g,"")}return t.events.on(Sc.Xa,(function(n){var e;try{e=new bh(n)}catch(t){e=new bh("00adef")}var r=function(t){o?function(){for(;o.cssRules.length>0;)o.deleteRule(0)}():function(){var t=document.createElement("style");t.setAttribute("data-player",i),document.querySelector("head").appendChild(t),o=t.sheet}();var n=t.complement,e=new bh(23,35,34,.75),r=new bh(0,0,0,.15).overlayOn(t);e.contrast(n).ratio<3&&n.lighten(5,3,e);var a,s=t.lightness<40?t.clone().lighten(15,3,t):t.clone().darken(15,3,t);return tc(u(Sv,!0),"color:"+t.hex+" !important",o),tc(u(Av,!0),"color:"+n.hex+" !important",o),tc(u(Mv),"color:"+t.hex,o),tc(u(Ov),"fill:"+t.hex,o),tc(u(Iv),"--connected-color:"+t.hex,o),tc(u(Dv),"stroke:"+t.hex,o),tc(u(Nv),"background-color:"+t.hex,o),tc(u(Pv),"border-color:"+t.hex,o),tc(u(Rv),"color:"+n.hex,o),tc(u(Cv),"fill:"+n.hex,o),tc(u(jv),"fill:"+s.hex,o),tc(u(Lv),"stroke:"+s.hex,o),tc(u(Gv),"border-color:"+r.hex,o),tc(u($v),"background-color:"+r.hex,o),t.luminance>.95&&(n=t.clone().darken(15,3,t),tc(u(Fv),"color:"+n.hex,o),tc(u(Vv),"fill:"+n.hex,o),tc(u(Uv),"stroke:"+n.hex,o),tc(u(Bv),"background-color:"+n.hex,o),tc(u(Hv),"border-color:"+n.hex,o),s=n.clone().darken(15,3,n),tc(u(jv),"fill:"+s.hex,o),tc(u(Lv),"stroke:"+s.hex,o)),t.yiq>175&&t.luminance<.95&&(a=s.clone().darken(15,3,s),tc(u(jv),"fill:"+a.hex,o),tc(u(Lv),"stroke:"+a.hex,o),tc(u(zv),"color:"+s.hex,o),tc(u(qv),"fill:"+s.hex,o),tc(u(Wv),"stroke:"+s.hex,o)),{main:t.hex,selected:s.hex,sidedockHover:a?s.hex:t.luminance>.95?n.hex:bh.white.hex,sidedockSelected:t.luminance>.95?n.hex:t.hex,sidedockSelectedHover:a?a.hex:s.hex}}(e);t.config.Wd=r,t.config.embed.color=r.main.replace("#",""),t.events.fire(Pc.Yc,t.config.embed.color)})),t.events.fire(Sc.Xa,t.config.embed.color),{}}function Yv(t){var n=null;return t.events.on(Sc.Ga,(function(i,e){var r="https://".concat(t.config.player_url),o="".concat(r,"/video/").concat(t.config.video.id);switch(i){case"login-like":n=ac("".concat(o,"/login/like"),"login",{width:670,height:545}),t.events.fire(Pc.Mc,i);break;case"login-watch-later":n=ac("".concat(o,"/login/watch-later"),"login",{width:670,height:545}),t.events.fire(Pc.Mc,i);break;case"login-private-locked":n=ac("".concat(o,"/login/private"),"login",{width:670,height:545}),t.events.fire(Pc.Mc,i);break;case"purchase":var u="".concat(r,"/video/").concat(t.config.video.vod.feature_id||t.config.video.id,"/purchase/vod");(null==e?void 0:e.productId)&&(u+="/".concat(e.productId)),u+="?referrer=".concat(encodeURIComponent(t.config.request.referrer)),n=ac(u,"purchase",{width:790,height:670}),t.events.fire(Pc.Mc,i)}})),window.closePopup=function(i){if(n){try{n.close(),t.events.fire(Pc.Oc,i)}catch(t){}n=null}},t.config.embed.on_site||(window.confirmPurchase=function(n,i,e){i?t.loadVideo(n):e&&t.events.fire(Pc.Fs)}),t.config.embed.on_site||(window.confirmLoginAction=function(n,i){t.events.fire(Pc.Wc,i)}),{}}function Jv(t,n,i,e){var r=e[n];return r?(r=Xv(r=Qv(t,r),i,e.prices),e.expires_in_duration_str&&(r=r.replace("{TIME}",e.expires_in_duration_str)),e.available_on_formatted&&(r=r.replace("{DATE}",e.available_on_formatted)),r):null}function Xv(t,n,i){var e=i.USD;return n in i&&(e=i[n]),-1!==t.indexOf("${price}")?t.replace("${price}",e):-1!==t.indexOf("{PRICE}")?t.replace("{PRICE}",e):t}function Zv(t,n){return!t||0===t.length||-1!==t.indexOf(n)}function Qv(t,n){return void 0!==t&&void 0!==t[n]?t[n]:n}var tp=Object.freeze({__proto__:null,formatVodLabel:Jv,getDisplayPrice:Xv,isAvailableInCountry:Zv,translateFromRequest:Qv});function np(t,n){var i,e,r,o,u,a,s,c,l,f=!1,d=!1,h=!1,v=!1,p=!1,m=!1,w=!1,b=!1,g=[],y=[],_=null,k=!1,E=!1,T=null,x=t.config.embed.autoplay&&t.config.request.flags.autohide_controls;function S(){return v||w||b}function A(){f&&(E||(d&&k||S()||x)&&(h||(!p&&!m||S())&&(f=!1,t.events.fire(Pc.Xs,f),(T||n).classList.add("invisible"))))}function M(){if(!f&&!S()){var i=T||n;i.classList.add("invisible"),i.classList.remove("hidden"),i.removeAttribute("hidden"),n.classList.remove("hidden"),n.removeAttribute("hidden"),n.classList.contains("vod")&&n.classList.remove("vod"),setTimeout((function(){f=!0,t.events.fire(Pc.Xs,f),i.classList.remove("invisible")}),0)}}function R(n,i,e){var r="data-label-"+e,o="add"!==e||t.config.user.logged_in?r:"data-label-add-logged-out";n.setAttribute("aria-label",n.getAttribute(o)),i.classList.add("hidden"),i.setAttribute("hidden",""),i.firstChild.innerHTML=n.getAttribute(r)}function C(){var t="BUTTON"===this.tagName?this:this.querySelector("button"),n=g.indexOf(t);n>=0&&y[n]&&(_&&(window.cancelAnimationFrame(_),_=null),y[n].classList.add("invisible"))}function O(){if(i){var t=i.parentElement;T.insertBefore(t,T.firstChild)}}function I(){var d;if(1===t.config.view||3===t.config.view){var h=t.config.embed.settings,v=t.config.video.vod&&"purchase_options"in t.config.video.vod&&t.config.video.vod.purchase_options.length,p=v&&t.config.video.vod.is_coming_soon,m="ondemand.main"===t.config.embed.context||"Vimeo\\Controller\\OnDemandController.main"===t.config.embed.context,w=t.config.video.vod&&t.config.user.purchased?1:0,b=v&&h.vod&&Zv(t.config.video.vod.countries,t.config.request.country);b&&p&&m&&(b=!1);var _=v&&t.config.video.vod.purchase_options[0],k=null;_&&(k=Jv(t.config.request.dynamic_translation_map,"label_string",t.config.request.currency,_)),n.innerHTML=dd.render("sidedock",{loggedIn:!!t.config.user.logged_in,vodButton:b,purchased:w,vodPurchaseInfo:_,vodDisplayLabel:k,likeButton:h.like,liked:t.config.user.liked,watchLaterButton:h.watch_later,addedToWatchLater:t.config.user.watch_later,collectionsButton:h.collections,shareButton:h.share,strings:{like:"J’aime",likeLoggedOut:"Like (this opens in a new window)",unlike:"Je n’aime plus",watchLaterAdd:"Ajouter à la liste Regarder plus tard",watchLaterAddLoggedOut:"Add to Watch Later (this opens in a new window)",watchLaterRemove:"Enlever de la liste Regarder plus tard",collections:"Ajouter aux collections",share:(null==(d=h.share)?void 0:d.embed_only)?"Intégration":"Partager"}}),i=n.querySelector(".vod-button"),b&&(T=n.querySelector(".sidedock-inner"),w&&O());var E=T||n;v&&b&&!t.config.embed.settings.instant_sidedock?n.classList.add("vod"):ys.touch&&(f=!0,t.events.fire(Pc.Xs,f),E.classList.remove("hidden"),E.removeAttribute("hidden"),E.classList.remove("invisible")),e=n.querySelector(".like-button"),r=n.querySelector(".like-label"),o=n.querySelector(".watch-later-button"),u=n.querySelector(".watch-later-label"),a=n.querySelector(".collections-button"),s=n.querySelector(".collections-label"),c=n.querySelector(".share-button"),l=n.querySelector(".share-label"),g=[i,e,o,c,a],y=[null,r,u,l,s]}}return I(),function(){var n=t.config.embed.settings.instant_sidedock,i=t.config.video.vod,e=i&&"purchase_options"in i&&i.purchase_options.length,r=i&&Zv(t.config.video.vod.countries,t.config.request.country);(n||e&&r)&&(x||M())}(),Nh(n,".vod-button",(function(){var n=i.getAttribute("data-product-id");t.events.fire(Pc.mc,n)}),C),t.events.on(Pc.ol,(function(){O(),n.classList.add("sidedock-outro"),"share"===t.config.embed.outro&&(t.config.embed.settings.share=0,I())})),t.events.on(Pc.ul,(function(){!function(){if(i){var t=i.parentElement;n.insertBefore(t,T)}}(),n.classList.remove("sidedock-outro"),"share"===t.config.embed.outro&&(t.config.embed.settings.share=1,I())})),Nh(n,".like-button",(function(){t.events.fire(Pc.dc)}),C),t.events.on(Pc.Bc,(function(){e&&(e.classList.add("on"),R(e,r,"remove"))})),t.events.on(Pc.Hc,(function(){e&&(e.classList.remove("on"),R(e,r,"add"))})),Nh(n,".watch-later-button",(function(){t.events.fire(Pc.hc)}),C),t.events.on(Pc.zc,(function(){o&&(o.classList.add("on"),R(o,u,"remove"))})),t.events.on(Pc.qc,(function(){o&&(o.classList.remove("on"),R(o,u,"add"))})),Nh(n,".collections-button",(function(){t.events.fire(Pc.wc)}),C),Nh(n,".share-button",(function(){return t.events.fire(t.config.embed.settings.share.embed_only?Pc.pc:Pc.vc),!1}),C),ef(n).on("blur","button",C).on("mouseleave",".box",C).on(["focus","pointerdown","touchstart","mouseenter"],"button",(function(){var t=g.indexOf(this);y.forEach((function(n,i){i!==t&&n&&n.classList.add("invisible")})),t>=0&&y[t]&&(y[t].classList.add("invisible"),y[t].classList.remove("hidden"),y[t].removeAttribute("hidden",""),_=window.requestAnimationFrame((function(){_=window.requestAnimationFrame((function(){y[t].classList.remove("invisible"),y[t].classList.add("visible")}))})))})).on("transitionend","label",(function(t){"opacity"===t.propertyName&&t.target.classList.contains("invisible")&&(t.target.classList.add("hidden"),t.target.setAttribute("hidden",""),t.target.classList.remove("visible"))})),Nh(n,"label",(function(){var t=y.indexOf(this);t>=0&&g[t].click()})),t.events.on([Pc.Fc,Pc.Uc,Pc.Ds],A).on(Pc.Vc,M).on(Pc.Ms,(function(){k=!0,A()})).on(wi.PLAY,(function(){d=!0})),ef(n).on(["pointerenter","pointerleave","mouseenter","mouseleave"],(function(t){"pointerType"in t?"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE||(h="pointerenter"===t.type||"MSPointerEnter"===t.type):h="mouseover"===t.type})),ef(n).on("transitionend",(function(t){var e=T||n;"opacity"===t.propertyName&&e.classList.contains("invisible")&&(e.classList.add("hidden"),e.setAttribute("hidden",""),i&&e.contains(i)&&(n.classList.add("hidden"),n.setAttribute("hidden","")))})),t.events.on(Pc.sc,(function(){h=!1,A()})).on(Pc.fc,(function(t){t||(E=!0)})),t.events.on([Pc.Pl],(function(){p=!0,M()})).on([Pc.Fl],(function(){p=!1})),t.events.on(Ko,(function(){m=!0,M()})).on(Yo,(function(){m=!1})),t.events.on(Pc.gc,(function(){v=!0,h=!1,A()})).on(Pc.yc,(function(){v=!1,M()})),t.events.on(Pc.Dl,(function(t){w=t,t&&A()})),t.events.on([Pc.oc,Pc.Zs],(function(t,n){n.isCentered()&&n.isVisible()&&(b=!0,h=!1,A()),n.isCentered()&&n.isVisible()||(b=!1,M())})),t.events.on(Pc.Jc,(function(){I()})),t.events.on(Sc.$a,(function(){h=!1,k=!1,A(),d=!1,h=!1,E=!1})),t.events.fire(Pc.Sl),{}}function ip(t,n){var i=!0,e=!1,r=!1,o=!1,u=!1,a=!1,s=!1,c=!0,l=!1,f=!1,d=!1;function h(){i=!1,n.classList.add("invisible")}function v(){n.classList.remove("hidden"),n.removeAttribute("hidden"),setTimeout((function(){i=!0,n.classList.remove("invisible")}),0)}function p(){return r||o||u}function m(){i&&(p()||l?h():a||s&&(c&&e||h()))}function w(){var n;i||(!a||p()?c&&!f&&(l||(s||p()?(null==(n=t.config.embed)?void 0:n.settings.info_on_pause)&&c&&!p()&&v():v())):v())}function b(){if(1===t.config.view||3===t.config.view){var i=!!t.config.embed.settings.byline,e=null!==t.config.video.owner.url,r=t.config.video.owner.url,o=0===t.config.embed.on_site,u=t.config.embed.settings.spatial_label,a=t.config.request.file_codecs||t.config.video.file_codecs,s=void 0!==a,c={ClickTargets:Tc,linkToOwner:e,ownerLink:r,targetBlank:o,showPortrait:!!t.config.embed.settings.portrait,portraitImg:t.config.video.owner[ys.devicePixelRatio>1?"img_2x":"img"],showByline:i,portraitAlt:"Lien vers le profil du propriétaire de la vidéo",showTitle:!!t.config.embed.settings.title,showTitleLink:null!==t.config.video.url,titleLink:t.config.video.url,title:t.config.video.title,is360:t.config.video.spatial&&u,hasHDR:s&&a.hevc.hdr.length>0,strings:{}};if(t.config.embed.settings.byline){var l=t.config.embed.settings.byline_badge,f="";(null==l?void 0:l.type)&&(f=dd.render("title_byline_badge",{targetBlank:o,cssClass:l.type,link:l.url||!1,displayBadge:!t.config.video.live_event})),c.strings.byline="de "+dd.render("title_owner_byline",{ClickTargets:Tc,linkToOwner:e,ownerLink:r,targetBlank:o,owner:t.config.video.owner.name})+f}t.config.embed.settings.badge&&(c.showPortrait=!1),t.config.embed.autoplay&&(n.classList.add("hidden"),n.setAttribute("hidden","")),n.innerHTML=dd.render("title",c)}}return b(),t.events.on([Pc.Fc,Pc.Uc],m).on(Pc.Vc,w).on(Uo,(function(){s=!0,c=!1,m()})).on([Pc.Fs,wi.PLAY],(function(){c=!1,f=!1,m()})).on(Pc.He,(function(t,n){n||(c=!0,w())})).on(Pc.Ts,(function(){l=!0,m()})).on(Pc.Gs,(function(){d=c,f=!0})).on(Pc.$s,(function(){d&&(f=!1)})).on(Pc.sc,(function(){m()})).on(Pc.fc,(function(t){t||w()})),ef(n).on(["pointerenter","pointerleave","mouseenter","mouseleave"],(function(t){"pointerType"in t?"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE||(e="pointerenter"===t.type||"MSPointerEnter"===t.type):e="mouseover"===t.type})),ef(n).on("transitionend",(function(t){"opacity"===t.propertyName&&n.classList.contains("invisible")&&(n.classList.add("hidden"),n.setAttribute("hidden",""))}),!1),t.events.on(Pc.Ts,(function(t){m()})),t.events.on([Pc.Pl],(function(){a=!0,w()})).on([Pc.Fl],(function(){a=!1,m()})),t.events.on(Pc.gc,(function(t){"not-supported"!==t&&"private-unlocked"!==t&&"help"!==t&&(r=!0,e=!1,m())})).on(Pc.yc,(function(){r=!1,e=!1,setTimeout(w,0)})),t.events.on(Pc.ol,(function(t){o=!0,e=!1,m()})).on(Pc.ul,(function(){o=!1,e=!1,setTimeout(w,0)})),t.events.on([Pc.oc,Pc.Zs],(function(t,n){n.isCentered()&&n.isVisible()&&(u=!0,e=!1,m()),n.isCentered()&&n.isVisible()||(u=!1,e=!1,w())})),t.events.on(Pc.Jc,(function(){b(),3===t.config.view&&w()})),t.events.on(Sc.$a,(function(){s=!1,c=!0,l=!1,f=!1,w()})),t.events.fire(Pc.Tl),{}}function ep(t,n){function i(){n.classList.remove("hidden"),n.removeAttribute("hidden"),n.classList.remove("invisible")}function e(){ef(n).on("transitionend",(function(){ef(n).off("transitionend"),n.classList.contains("invisible")&&(n.classList.add("hidden"),n.setAttribute("hidden",""))})),n.classList.add("invisible")}return function(){var r=t.config.embed.settings.badge;if(r){var o=ys.devicePixelRatio>1?"img_2x":"img";ys.svg&&r.svg&&(o="svg"),n.innerHTML=dd.render("badge",{showPortrait:!1,targetBlank:0===t.config.embed.on_site,badge:{link:r.link,img:r[o],margin:r.margin||!1,width:r.width,height:r.height,name:r.name,shadow:r.shadow||!1}}),Nh(n,".vp-badge",(function(){t.events.fire(Pc.uc,r.id)})),t.config.embed.autoplay?e():i()}else e()}(),{show:i,hide:e}}function rp(t,n){var i=t.events;function e(t){t.preventDefault(),i.fire(Sc.qa,!1)}function r(){n.classList.add("invisible"),n.classList.remove("hidden"),n.removeAttribute("hidden"),setTimeout((function(){n.classList.remove("invisible")}),0),i.once(Pc.Ss,o)}function o(t){t>0&&!n.classList.contains("invisible")&&u()}function u(){ef(n).on("transitionend",a),n.classList.add("invisible")}function a(){ef(n).off("transitionend",a),n.classList.add("hidden"),n.setAttribute("hidden","")}return function(){var t={title:ys.touch?"Touchez l'écran pour rétablir le son":"Cliquez pour rétablir le son"};n.innerHTML=dd.render("unmute_button",t),Nh(n,e),Nh(n,".vp-unmute-button",e),i.once(Pc.ac,r),i.on(tu.EVENT_ENDED,u)}(),{}}function op(t,n){var i=null,e=!1;function r(){var r=n.querySelector(".vp-badge");if(i=new ep(t,r),r.innerHTML)return 16===t.config.embed.settings.badge.id?(i.show(),void t.events.on(Pc.Js,(function(t){t?i.show():i.hide()}))):void t.events.on([Pc.Fs,wi.PLAY],(function(){e&&i.hide()})).on(Uo,(function(){e=!0,i.hide()})).on(Pc.Ts,i.hide).on(Pc.gc,(function(t){"not-supported"!==t&&"private-unlocked"!==t&&"help"!==t&&i.hide()})).on(Pc.yc,(function(){e||i.show()}))}r(),function(){var i=n.querySelector(".vp-unmute");new rp(t,i)}(),t.events.on(Pc.Jc,(function(){r()})),t.events.on(Sc.$a,(function(){e=!1,r()}))}var up=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=6,e=76,r=parseInt(e*ys.devicePixelRatio,10),o=parseFloat(n.timecode);if(isNaN(o))throw new TypeError("Time must be a number.");if(o<0)throw new TypeError("Time must be a positive number.");this.time=o,this.data=n,this.id=n.id,this.displayTime=n.display_time||i,n.url&&(this.data.url=Jh(n.url)),n.image_url&&(n.image=vl({width:r,height:r,baseUrl:Jh(n.image_url),crop:!0})),this.renderTemplate()}var n=t.prototype;return n.renderTemplate=function(){var t=this,n=document.createElement("div");n.innerHTML=dd.render("card",this.data),this.element=n.children[0],this.data.image&&pl(this.data.image).catch((function(n){t.element.querySelector(".js-cardImageWrap").style.display="none"}))},n.isActive=function(t){return t>=this.time&&t0&&void 0!==arguments[0]?arguments[0]:function(t,n){return tn?this.Jd(t,n,i,r-1):t[r]0&&t.apply(void 0,arguments)}};function c(){v(),u.forEach((function(t,n){t.element.parentNode.removeChild(t.element)})),u=new ap,Array.isArray(t.config.embed.cards)&&t.config.embed.cards.length&&(t.config.video.title&&t.config.embed.settings.title&&l(-1,{className:"card--contentInfo",timecode:0,headline:t.config.video.title,teaser:t.config.embed.settings.byline?t.config.video.owner.name:"",image:t.config.video.owner[ys.devicePixelRatio>1?"img_2x":"img"],id:"title-card"}),t.config.embed.cards.forEach((function(t){l(t.timecode,t)})))}function l(i,e){var r=u.get(i),a=new up(t,e);if(u.set(i,a),r)return o.replaceChild(a.element,r.element),a;var s=u.keys().indexOf(i);return o.insertBefore(a.element,o.children[s]),n.dispatch(function(t){return{type:"CARDS_SET_SIZE",payload:t}}(u.size)),a}function f(n){t.element.classList.toggle("player-cardsCarousel",n),t.element.classList.toggle("player-cardsCorner",!n),e.destroy(),n&&e.setUp()}function d(n,i){n&&(i?n.element.classList.add("card-animating"):n.element.classList.remove("card-animating"),n.element.classList.add("card-active"),ef(n.element.childNodes[1]).on("mouseover",(function(){a=!0})),ef(n.element.childNodes[1]).on("mouseout",(function(){a=!1})),e.show(n.element),t.events.fire(Pc.gl,n.id,n.data))}function h(t){a||t.classList.remove("card-active")}function v(){V(i.querySelectorAll(".card-active")).forEach(h)}return e=new Hh(o),n.watch("ui.cards.size",(function(n){t.element.classList.toggle("player-withCards",n>0)})),n.watch("ui.cards.isCarouselVisible",f),n.watch("ui.cards.isCardsThumbVisible",(function(t){i.classList.toggle("cards-wrapper--withThumbnails",t)})),f(n.get("ui.cards.isCarouselVisible")),t.events.on(Pc.Jc,c),t.events.on(Sc._addCard,(function(t){var n=l(t.timecode,t);v(),d(n)})),t.events.on(Sc._removeCard,(function(t){v();var n=u.get(t.timecode).element;n.parentNode.removeChild(n),u.delete(t.timecode)})),e.on("slide",s((function(n){var i=u.values()[n];"title-card"!==i.id&&t.events.fire(Pc.gl,i.id,i.data),t.events.fire(Sc.vs,i.time)}))),e.on("tap",s((function(n){var i=u.values()[n];i.data.url&&"title-card"!==i.id&&(t.events.fire(Pc.yl,i.id,i.data),t.backbone.paused||t.events.fire(Pc.Ps),window.open(i.data.url))}))),t.events.on(wi.TIME_UPDATE,s((function(t){var i=function(t){var i=u.values().filter((function(n){return n.isActive(t)})).slice(-1)[0];if(i)return i;if(n.get("ui.cards.isCarouselVisible")){var e=u.values().slice(-1)[0];if(e&&t>e.end)return e}return null}(t.currentTime);i!==r&&(!i&&a||(a=!1,v(),(r=i)&&"title-card"===r.id?n.get("ui.cards.isCarouselVisible")&&d(r,!0):d(r,!0)))}))),t.events.on(Pc.Ts,s(v)),Nh(document,".player-cardsCorner .card",s((function(n){n.preventDefault();var i=pc(n.target,o.children),e=u.values()[i];e.data.url&&"title-card"!==e.id&&(t.events.fire(Pc.yl,e.id,e.data),t.backbone.paused||t.events.fire(Pc.Ps),window.open(e.data.url))}))),c(),{}}var cp={16:"shift",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down"};function lp(t,n,i){var e,r=!!t.config.embed.on_site,o=i.querySelector(".volume"),u=!1,a=null,s=t.config.video.fps/5,c=Math.max(s,.618*t.config.video.duration),l=s,f=0,d=!1,h=kd(g,80);function v(){return!r&&(1===t.config.view||3===t.config.view)}function p(){u&&"help"===e&&t.events.fire(Pc.kc)}function m(t){return"number"!=typeof t.which&&(t.which=t.keyCode),t}function w(t){if("keypress"===t.type){var n=String.fromCharCode(t.which);return t.shiftKey||(n=n.toLowerCase()),n}return t.which in cp?cp[t.which]:String.fromCharCode(t.which).toLowerCase()}function b(n){if(t.config.embed.settings.background)return!0;var i=n.target||n.srcElement;return"INPUT"===i.tagName||"SELECT"===i.tagName||"TEXTAREA"===i.tagName||i.isContentEditable}function g(i,e){if(!n.get(Dl)){d||(e&&!t.backbone.paused&&t.events.fire(Pc.Ps),t.events.fire(Pc.Gs,!0,"keyboard"),d=!0),!function(t){var n=t,i=Math.ceil(s),e=Math.ceil(c-s);l=function(t,n,i,e){return t/=100,i*(--t*t*t+1)+n}(n,i,e)}(f),1==++f&&(l=5*t.config.video.fps);var r=e?1:l,o="right"===i?r:-r;!function(n){var i=n/t.config.video.fps;t.events.fire(Sc.Ha,null,i)}(Math["right"===i?"ceil":"floor"](t.currentTime*t.config.video.fps)+o)}}function y(t){var n=a.getTabindexItems(),i=n.indexOf(document.activeElement),e="up"===t?i-1:i+1,r=null;return!(r=e>=n.length?n[0]:e<0?n[n.length-1]:n[e])||(r.focus(),!1)}function _(){if(a)return!0;if(n.get(Dl)&&!n.get(Ul))return!0;if(!document.activeElement||document.activeElement===document.body){var i=t.backbone.paused?Pc.Fs:Pc.Ps;return t.events.fire(i),p(),!1}}function k(){return a?(a.element.contains(document.activeElement)&&a.button.focus(),a.hide(),!1):u?(t.events.fire(Pc.kc),!1):void 0}function E(){return a?!a.element.contains(document.activeElement)||y("up"):ys.spatialPlayback&&t.config.video.spatial?(t.backbone.getEffectByName("ThreeSixtyEffect").keyPress("up"),!1):!(!t.config.embed.on_site||!document.activeElement||i.contains(document.activeElement))||(p(),t.events.fire(Sc.za,.05,!1,!0),!1)}function T(){return a?!a.element.contains(document.activeElement)||y("down"):ys.spatialPlayback&&t.config.video.spatial?(t.backbone.getEffectByName("ThreeSixtyEffect").keyPress("down"),!1):!(!t.config.embed.on_site||!document.activeElement||i.contains(document.activeElement))||(p(),t.events.fire(Sc.za,-.05,!1,!0),!1)}function x(n,i){if(a)return!a.element.contains(document.activeElement)||y("left"===i?"up":"down");if(p(),ys.spatialPlayback&&t.config.video.spatial)return t.backbone.getEffectByName("ThreeSixtyEffect").keyPress(i),!1;if(document.activeElement&&document.activeElement===o){var e="left"===i?-.05:.05;return t.events.fire(Sc.za,e,!1,!0),!1}n.shiftKey||0===f?g(i,n.shiftKey):h(i,n.shiftKey)}return t.events.on(Pc.gc,(function(t){u=!0,e=t,"not-supported"===t&&(r=!0)})),t.events.on(Pc.yc,(function(){u=!1,e=null})),t.events.on(Pc.Zs,(function(t,n){t||a!==n?t&&(a=n):a=null})),t.events.on(Pc.Jc,(function(t){t&&(r=!1)})),function(){var i={l:Pc.dc,w:Pc.hc,s:Pc.vc,c:[Pc.Us,!0],h:[Pc.Vs,!0],f:Pc.Ns,d:Pc.Rc,space:_,up:E,down:T,left:x,right:x,esc:k,"?":[Sc._showOverlay,"help"]};function r(n){if(m(n),function(t){return!(t.ctrlKey||t.metaKey||t.altKey)&&(t.which in cp?"keydown"===t.type:"keypress"===t.type)}(n)&&!b(n)&&v()){var r=w(n);if(r in i){if("function"==typeof i[r])return void(!1===i[r](n,r)&&(n.preventDefault(),n.stopPropagation()));!1===function(n){if(n=Array.isArray(n)?n:[n],u&&"help"===e){if(t.events.fire(Pc.kc),n[0]===Sc._showOverlay&&"help"===n[1])return!1;if(n[0]!==Sc.Ja)return setTimeout((function(){t.events.fire.apply(null,n)}),250),!1}return t.events.fire.apply(null,n),!1}(i[r])&&(n.preventDefault(),n.stopPropagation())}}}t.config.embed.on_site||(i.v=Sc.Ja),document.addEventListener("keydown",r,!1),document.addEventListener("keypress",r,!1),document.addEventListener("keyup",(function(i){if(m(i),!b(i)&&v()){var e=w(i);!ys.spatialPlayback||!t.config.video.spatial||"left"!==e&&"right"!==e&&"up"!==e&&"down"!==e?n.get(Dl)||"left"!==e&&"right"!==e||function(n){l=s,f=0;var i=n.shiftKey;t.events.fire(Pc.$s,i),d=!1}(i):t.backbone.getEffectByName("ThreeSixtyEffect").keyUp(e)}}),!1)}(),t.events.on(Pc.sl,(function(){r=!1})).on(Pc.cl,(function(){r=!0})),t.config.embed.on_site&&document.querySelector(".player")===i&&(r=!1),function(){var t,n=!1;document.body.addEventListener("keyup",(function(t){9!==t.which||document.body.classList.contains("showfocus")||document.body.classList.add("showfocus")})),document.body.addEventListener("keydown",(function(i){32!==i.which&&13!==i.which||(n=!0,clearTimeout(t),t=setTimeout((function(){n=!1}),200))})),document.body.addEventListener("click",(function(t){n||document.body.classList.remove("showfocus")}))}(),{pause:function(){r=!0},unpause:function(){r=!1}}}var fp=function(){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.displayTimeout,e=void 0===i?0:i,r=n.label,o=void 0===r?"Alert":r;nt(this),this.Xd=t,this.Zd=!1,this.Qd=null,this.th=null,this.nh=o;var u=Math.round(e/1e3);0!==u&&(this.nh="".concat(o," Will be dismissed in ").concat(u," seconds")),this.ih=null,this.eh=e,this.rh(),this.Sn()}var n=t.prototype;return n.show=function(t){var n=this;!0!==this.Zd&&(clearTimeout(this.ih),this.th.classList.remove("hidden"),this.th.removeAttribute("hidden"),window.requestAnimationFrame((function(){n.th.classList.add("in")})),(this.th.querySelector("[data-alert-autofocus]")||this.th).focus(),this.Zd=!0,this.fire("show",t),0!==this.eh&&(this.ih=setTimeout((function(){n.hide("timeout")}),this.eh)))},n.hide=function(t){var n=this;!1!==this.Zd&&(clearTimeout(this.ih),this.th.classList.add("leaving"),window.requestAnimationFrame((function(){var t=n;n.oh(),ef(n.th).on("transitionend",(function n(i){"opacity"===i.propertyName&&(t.th.classList.remove("leaving"),t.th.classList.add("hidden"),t.th.setAttribute("hidden",""),ef(t.th).off("transitionend",n))}))})),this.Zd=!1,this.fire("hide",t))},n.oh=function(){this.th.classList.remove("in")},n.rh=function(){this.th||(this.th=document.createElement("div"),this.th.classList.add("vp-alert"),this.th.setAttribute("role","alertdialog"),this.th.setAttribute("aria-label",this.nh),this.th.setAttribute("aria-atomic","true"),this.th.classList.add("hidden"),this.th.setAttribute("hidden",""),this.Xd.appendChild(this.th),this.oh()),this.Qd instanceof HTMLElement?(this.th.innerHTML="",this.th.appendChild(this.Qd)):(this.th.textContent=this.Qd,this.th.innerHTML=this.Qd);var t=document.createElement("button");t.setAttribute("data-close",""),t.setAttribute("aria-label","Close alert"),t.classList.add("close"),t.innerHTML=dd.render("icon_close"),this.th.appendChild(t)},n.Sn=function(){var t=this;ef(this.th).on("click","[data-close]",(function(n){t.hide(n)}))},H(t,[{key:"visible",get:function(){return this.Zd}},{key:"message",get:function(){return this.Qd},set:function(t){t instanceof HTMLElement&&this.Qd&&t.textContent===this.Qd.textContent||t!==this.Qd&&(this.Qd=t,this.rh())}}]),t}(),dp=function(){function t(t,n,i){this.player=t,this.backbone=n,this.isBufferingTooLong=!1,this.isBufferingTooFrequent=!1,this.autoAlertWasDismissed=!1,this.bufferCount=-1,this.badPlaybackTimer=null,this.uh(i),this.ah()}var n=t.prototype;return n.handleBufferStarted=function(){this.bufferCount+=1,this.sh()},n.handleBufferEnded=function(){clearTimeout(this.badPlaybackTimer),this.badPlaybackTimer=null,this.isBufferingTooLong=!1},n.ah=function(){var t=this;this.player.events.on(Ec.Ua,(function(n){t.lh(n)})),this.player.events.on(Ec.Ba,(function(n){t.fh(n)})),this.player.events.on(Ec.Va,this.handleBufferStarted.bind(this)),this.player.events.on(yi.BUFFER_ENDED,this.handleBufferEnded.bind(this)),this.player.events.on(Ec.Fa,(function(){t.autoAlertWasDismissed||(t.showAlert("stream_studder"),al.captureBreadcrumb("Alert shown",{message:"stream_studder"},"video"))})),this.player.events.on(Pc.As,(function(n){"auto"===n&&t.alertUI.hide("qualitymenuauto")}))},n.lh=function(t){t||this.showAlert("warning_alert",{strings:{text:'Accédez à une liste de navigateurs supportant le visionnage à 360°.'}})},n.fh=function(t){t||this.showAlert("warning_alert",{strings:{text:'Vous souhaitez regarder une vidéo à 360° ? Consultez les navigateurs et les paramètres supportés.'}})},n.showAlert=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.alertUI&&!this.player.config.embed.settings.background&&(this.alertUI.message=dd.render(t,n),this.alertUI.show())},n.uh=function(t){var n=this;this.alertUI=new fp(t),this.alertUI.on("show",(function(t){n.player.events.fire(Pc.Dl,!0,t)})),this.alertUI.on("hide",(function(t){var i=t.target,e=i&&"function"==typeof i.getAttribute;if(e)switch(i.getAttribute("data-context")){case"suggestion":n.player.events.fire(Sc.Ya,"auto"),t="suggestion";break;default:t="close"}(e||"qualitymenuauto"===t)&&(n.autoAlertWasDismissed=!0),n.player.events.fire(Pc.Dl,!1,t)}))},n.sh=function(){var t=this;null===this.badPlaybackTimer&&0!==this.bufferCount&&(this.badPlaybackTimer=setTimeout((function(){t.isBufferingTooLong=!0,t.dh()}),1e4))},n.dh=function(){"MediaSourceScanner"===this.backbone.currentScannerName&&(this.isBufferingTooLong||this.isBufferingTooFrequent)&&(this.backbone.video.currentFile.restrictedStreamIndexes.length<=0||(this.isBufferingTooLong,this.isBufferingTooFrequent,this.player.events.fire(Ec.Fa),this.bufferCount=0,this.badPlaybackTimer=null,this.isBufferingTooFrequent=!1,this.isBufferingTooLong=!1))},t}();function hp(t,n,i){return i?n?n(t):t:(t&&t.then||(t=r.resolve(t)),n?t.then(n):t)}function vp(t,n){try{var i=t()}catch(t){return n(t)}return i&&i.then?i.then(void 0,n):i}function pp(){}var mp=function(){function t(t,n){this.tf=t,this.hh=n,this.vh=0,this.ph()}var n=t.prototype;return n.wh=function(){this.hh.get(Ul)&&(this.tf.element.querySelector(".vp-live-viewer-status-wrapper")||(this.If=document.createElement("div"),this.If.classList.add("vp-live-viewer-status-wrapper","invisible"),this.If.innerHTML=dd.render("live_status"),this.If.querySelector(".vp-live-status-circle").classList.remove("offline"),this.tf.element.querySelector(".vp-controls-wrapper").appendChild(this.If)))},n.bh=function(){var t=this.tf.element.querySelector(".vp-live-viewer-status-wrapper");t&&this.tf.element.querySelector(".vp-controls-wrapper").removeChild(t)},n.ph=function(){var t=this;this.hh.watch(zl,(function(){return t.bh()})),this.tf.events.on(Pc.Jc,(function(){t.tf.config.video.live_event?t.wh():t.bh()})),this.tf.events.on(tu.STREAM_ONLINE,(function(){t.wh(),t.gh()})),this.tf.events.on(Pc.Js,(function(n){var i;null==(i=t.If)||i.classList.toggle("invisible",n)}))},n.gh=function(){try{var t=this;if(!t.hh.get(Ul)||!t.tf.config.video.live_event.show_viewer_count)return;var n=setTimeout((function(){t.gh()}),3e4),i="".concat(t.tf.config.video.id);"unlisted"===t.tf.config.video.privacy&&(i+=":".concat(t.tf.config.video.unlisted_hash));var e="https://".concat(t.tf.config.vimeo_api_url,"/videos/").concat(i,"/stats/live"),o={jwt_token:t.tf.config.user.vimeo_bucketed_live_client_token};return wp(vp((function(){return hp(t.tf.updatePhpTokens(),(function(){return wp(vp((function(){return hp(Ke({url:e,searchParams:o}).json(),(function(n){n.viewers?(t.vh=0,t.yh(n.viewers.current)):t.vh++}))}),(function(){t.vh++,t._h()&&clearTimeout(n)})))}))}),(function(i){al.captureException(i),t.vh++,t._h()&&clearTimeout(n)})))}catch(t){return r.reject(t)}},n.yh=function(t){this.tf.config.video.live_event.show_viewer_count&&(this.If.querySelector(".vp-live-viewer-count")||(this.tf.element.querySelector(".vp-live-viewer-count").style.display="block",this.If.innerHTML+=dd.render("live_viewer_count")),V(this.tf.element.querySelectorAll(".vp-live-viewer-count-value")).forEach((function(n){return n.innerHTML=function(t){return t=parseFloat(t),isNaN(t)||t<0?"0":t<1e3?t.toString():t>=1e3&&t<1e6?Math.floor(t/1e3)+","+Math.round(t%1e3/100)+"k":Math.floor(t/1e6)+","+Math.round(t%1e6/1e5)+"M"}(t)})))},n._h=function(){return this.vh>3&&(V(this.tf.element.querySelectorAll(".vp-live-viewer-count")).forEach((function(t){return t.classList.add("hidden")})),!0)},t}();function wp(t){if(t&&t.then)return t.then(pp)}t.BigScreen=ph,t.VimeoPlayer=function(t,n,i,e){dd.helpers=tp;var o=function(t){if(!0===t)return r.resolve(null);var n=!1;return new r((function(i,e){t.link.addEventListener("load",(function(){if(!n){n=!0;var e=(new Date).getTime()-t.startTime;setTimeout((function(){return i(e)}),100)}}),!1)}))}(i),u=new Lh({element:t,delegate:e,cssLoadedPromise:o}),a=u.store;t.classList.add("js-player-fullscreen");var s=u.expose,c=null,l=null,f=null,d=null,h=null,v=null,p=t.querySelector(".vp-controls"),m=t.querySelector(".vp-sidedock"),w=t.querySelector(".vp-title"),b=t.querySelector(".vp-cards-wrapper"),g=ys.mobileAndroid||ys.iPhone||ys.windowsPhone||ys.browser.bb10,y={tiny:Pc.Qc,mini:Pc.tl,normal:Pc.nl,none:Pc.nl};function _(n){n&&void 0!==y[n]&&(u.events.fire(y[n]),t.classList.toggle("player-normal","normal"===n),t.classList.toggle("player-mini","mini"===n),t.classList.toggle("player-tiny","tiny"===n))}function k(n){Object.keys(Bf).forEach((function(i){return t.classList.toggle("player-".concat(i),n===i)}))}function E(){var n=u.config.embed.settings,i=(1===u.config.view||3===u.config.view)&&n&&!n.playbar;t.classList.toggle("no-playbar",i),t.classList.toggle("with-fullscreen",!!n.fullscreen);var e=n.custom_logo;t.classList.toggle("with-custom-logo",!!e),t.classList.toggle("with-sticky-custom-logo",e&&e.sticky),t.classList.toggle("hide-controls-mode",!!n.background||0===n.controls),t.classList.toggle("touch-support",ys.touch)}function T(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.config.video.url;if(!(!n||t&&t.metaKey)){if(-1===n.indexOf("#")&&u.backbone.currentTime>0&&u.backbone.currentTime0&&window.innerHeight>0?t():i=setTimeout(n,250)};u.events.once(Pc.ue,e),u.events.once(Pc.bs,e)})),function(){var t=function(t,n){return u.verifyConfig().then((function(){var i=u.config.request,e=i.signature,r=i.session,o=i.timestamp,a=i.expires;return Ke("https://".concat(u.config.player_url,"/video/").concat(u.config.video.id,"/").concat(t,"?signature=").concat(e,"&session=").concat(r,"&time=").concat(o,"&expires=").concat(a),{method:n,withCredentials:!0})})).catch((function(i){al.captureException(i,{extra:{action:t,method:n}})}))},n=function(t,n){return u.updatePhpTokens().then((function(){var i="following"===t?u.config.video.owner.id:u.config.video.id,e=u.config.user.vimeo_api_interaction_tokens,r="";if(e)switch(r="?auth=",t){case"likes":r+=e.likes;break;case"watchlater":r+=e.watch_later;break;case"following":r+=e.following}var o=u.config.video.unlisted_hash&&"following"!==t?":".concat(u.config.video.unlisted_hash):"";return Ke("https://".concat(u.config.vimeo_api_url,"/users/").concat(u.config.user.id,"/").concat(t,"/").concat(i).concat(o).concat(r),{method:n,jwt:u.config.user.vimeo_api_client_token}).catch((function(i){al.captureException(i,{extra:{action:t,method:n}})}))})).catch((function(t){al.captureException(t)}))};u.events.on(Pc.mc,(function(t){if(u.config.user.purchased)return!u.config.video.vod.is_feature&&u.config.video.vod.feature_id?void u.loadVideo(u.config.video.vod.feature_id).then((function(){return u.events.fire(Pc.Fs),u.config.video.vod.feature_id})).catch((function(t){al.captureException(t),u.events.fire(Sc._showOverlay,"error",{title:"Désolé",message:"Un problème s’est produit. Veuillez essayer à nouveau."})})):void u.events.fire(Pc.Fs);u.config.video.vod&&u.config.video.vod.is_coming_soon?T(null,u.config.video.vod.url):u.performDelegateAction(Oc,(function(){u.events.fire(Sc.Ga,"purchase",{productId:t})}),[t])})),u.events.on(Pc.dc,(function(){u.config.user.logged_in?u.config.user.id!==u.config.video.owner.id&&(u.config.user.liked?u.performDelegateAction(Mc,(function(){"disable"!==u.config.video.privacy?n("likes","DELETE"):t("like","DELETE"),u.config.user.liked=!1,u.events.fire(Pc.Hc)})):u.performDelegateAction(Ac,(function(){"disable"!==u.config.video.privacy?n("likes","PUT"):t("like","PUT"),u.config.user.liked=!0,u.events.fire(Pc.Bc)}))):u.performDelegateAction(jc,(function(){u.events.fire(Sc.Ga,"login-like")}))})),u.events.on(Pc.hc,(function(){(u.config.video.url||"unlisted"===u.config.video.privacy)&&(u.config.user.logged_in?u.config.user.watch_later?u.performDelegateAction(Cc,(function(){n("watchlater","DELETE"),u.config.user.watch_later=!1,u.events.fire(Pc.qc)})):u.performDelegateAction(Rc,(function(){n("watchlater","PUT"),u.config.user.watch_later=!0,u.events.fire(Pc.zc)})):u.performDelegateAction(jc,(function(){u.events.fire(Sc.Ga,"login-watch-later")})))})),u.events.on(Pc.wc,(function(){u.performDelegateAction(Dc,(function(){u.config.video.vod&&u.config.video.vod.url?T(null,"".concat(u.config.video.vod.url,"#collections")):u.config.video.url&&T(null,"".concat(u.config.video.url,"#collections"))}))})),u.events.on(Pc.vc,(function(){var t=u.config.embed.settings.share&&u.config.embed.settings.share.embed_only,n=function(){u.events.fire(Sc._showOverlay,"share",t)};ph.element?n():u.performDelegateAction(Ic,n)})),u.events.on(Pc.pc,(function(){u.config.embed.settings.share.embed_only&&u.performDelegateAction(Ic,(function(){u.events.fire(Sc._showOverlay,"share",!0)}))})),u.events.on(Pc.bc,(function(){if(u.config.user.logged_in&&u.config.user.id!==u.config.video.owner.id){if(u.config.user.following)return n("following","DELETE"),u.config.user.following=!1,void u.events.fire(Pc.ml);n("following","PUT"),u.config.user.following=!0,u.events.fire(Pc.pl)}}))}(),u.events.on(Pc.ks,(function(){t.classList.add("player-ad")})),u.events.on([Pc.Es,Sc.$a],(function(){t.classList.remove("player-ad")})),function(){var n=function(){return function(t,n,i){return t&&t.then||(t=r.resolve(t)),n?t.then(n):t}(d,(function(){var n=function(){var n=ec(t),i=n.width,e=n.height;return g?e<=200?"10px":i<450?"12px":i<=1024?"11px":"10px":"10px"}();p.style.fontSize=n,m.style.fontSize=n,w.style.fontSize=n}))};u.events.on(Pc.cc,n),u.events.on(Pc.fc,n),window.addEventListener("orientationchange",n),g&&(t.classList.add("mobile"),n())}(),a.watch("ui.player.mode",_),a.watch("ui.player.breakpoint",k),function(){function n(){var n=t;if(e&&e.getFullscreenElement&&"function"==typeof e.getFullscreenElement){var i=e.getFullscreenElement();i&&i instanceof HTMLElement&&i.contains(t)&&i.classList.contains("js-player-fullscreen")&&(n=i)}return n}u.config.embed.fullscreen=!0,ys.iPad&&t.classList.add("no-fullscreen-api-support");var i=u.config.embed.playsinline&&ys.iOS>=10,r=ys.iPad||i;ph.enabled||r||(t.classList.add("no-fullscreen-support"),ys.iOS||(u.config.embed.fullscreen=!1));var o=!1,a=!1,s=!1;u.events.on([Ko,Yo],(function(){s=!0})),u.events.on(Sc.es,(function(){ph.enabled||ph.videoEnabled(t)?(u.events.fire(Pc.sc),a=!1,ph.request(n())):u.events.fire(Sc.us,!0)})),u.events.on(Pc.Ns,(function(){"picture-in-picture"===u.backbone.presentationMode&&u.events.fire(Sc.ls),ph.element?(u.events.fire(Pc.lc),ph.exit()):(u.events.fire(Pc.sc),a=!0,ph.request(n()))}));var c=ph.onenter,l=ph.onexit;if(ph.onenter=function(t){o||(n().contains(t)?function(t,i){s?s=!1:o||(o=!0,u.events.fire(Pc.cc,n()===t,a))}(t):"function"==typeof c&&c(t))},ph.onexit=function(){o?s?s=!1:o&&(o=!1,u.events.fire(Pc.fc,a),a||u.events.fire(Sc.us,!1),a=!1):"function"==typeof l&&l()},ef(t).on("click","a",(function(t){ph.element===n()&&ph.exit()})),ef(t).on("gestureend",(function(t){t.scale>1&&u.events.fire(Pc.Ns)})),"undefined"!=typeof MSGesture){var f=1,d=new MSGesture;d.target=t,ef(t).on("pointerdown",(function(t){d.addPointer(t.pointerId)})).on(["MSGestureChange"],(function(t){f*=t.scale})).on(["MSGestureEnd"],(function(){(!o&&f>=2||o&&f<1)&&u.events.fire(Pc.Ns),f=1}))}}(),Nh(t,"a[data-clip-link]",T),u.events.on(Sc.Ja,T),Nh(t,"[data-track-click]",(function(t){var n=t.target.dataset.trackClick;u.events.fire(Pc.Cs,n)})),x(),u.events.on(Pc.Jc,(function(){E(),x()})),u.events.on(Sc.ms,(function(){h.disable()}))}function A(){c||(c=new xv(u,a,t.querySelector(".vp-overlay-wrapper")))}function M(){l||(l=new Kv(u,{uuid:u.uuid,id:t.id,isMobileDevice:!1}))}function R(){f||(f=new Yv(u))}var C={initializationHandler:function(){return function(){A(),M(),R(),new rv(u,a,p),new uv(u,a,t);var n=new lp(u,a,t);new yv(u,t.querySelector(".vp-notification-wrapper")),new Ev(u,a,t.querySelector(".vp-outro-wrapper")),new np(u,m),new ip(u,w),new op(u,t),Object.defineProperties(s,{pauseKeyboard:{enumerable:!0,value:n.pause},unpauseKeyboard:{enumerable:!0,value:n.unpause}})}(),S(),r.resolve()},postInitializationHandler:function(){return u.backbone&&(new wv(t.querySelector(".vp-stats-debug"),u),new sp(u,a,b),new dp(u,u.backbone,t)),r.resolve()},authorizationHandler:function(t){t(),A(),M();var n="Error",i="Unhandled video privacy";switch(u.config.view){case 4:return new r((function(t,n){u.events.fire(Sc._showOverlay,"password"),u.events.once(Pc.Xc,(function(n){t(n)}))}));case 2:R();var e="private-locked",o=null;return u.config.user.logged_in&&(e="error",o={title:"Vidéo privée",message:"Désolé, vous n’avez pas la permission de regarder.",modal:!0,logo:!!u.config.embed.settings.logo,icon:"lock"}),u.events.fire(Sc._showOverlay,e,o),r.reject();case 7:n=u.config.title,i=u.config.message}return u.events.fire(Sc._showOverlay,"error",{title:n,message:i,modal:!0}),r.reject()}};return u.init(n,C).then((function(){return 3!==u.config.view||u.config.embed.autoplay||u.events.fire(Sc._showOverlay,"private-unlocked"),!0})).catch((function(n){al.captureException(n),A(),M(),t.classList.remove("loading"),u.events.fire(Pc.bs,Wc.id,Wc)})),s},t.requestModule=er}(this.window=this.window||{});