Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mux-embed

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mux-embed - npm Package Compare versions

Comparing version 2.0.21 to 2.0.22

dist/mux-standalone.js

4

dist/mux.js
/**
* mux-embed
* @version 2.0.20
* @version 2.0.21
* @copyright 2016 Mux, Inc
* @license
*/
!function e(t,i,a){function r(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(n)return n(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return r(i?i:e)},d,d.exports,e,t,i,a)}return i[o].exports}for(var n="function"==typeof require&&require,o=0;o<a.length;o++)r(a[o]);return r}({1:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function n(e){var t={};return Object.keys(e).forEach(function(i){if(e.hasOwnProperty(i)&&void 0!==e[i]){var a=i.split("_"),r=a[0],n=u[r];n||(s.default.debug("Data key word `"+a[0]+"` not expected in "+i),n=r+"_"),a.splice(1).forEach(function(e){c[e]?n+=c[e]:(s.default.debug("Data key word `"+e+"` not expected in "+i),n+="_"+e+"_")}),t[n]=e[i]}}),t}Object.defineProperty(i,"__esModule",{value:!0}),i.default=n;var o=e("./utils/log.js"),s=a(o),l={a:"property",d:"ad",e:"event",f:"experiment",m:"mux",p:"player",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view"},u=r(l),d={ad:"ad",ap:"api",al:"application",ar:"architecture",au:"autoplay",br:"break",cd:"code",cg:"category",cn:"config",co:"count",cp:"complete",ct:"content",cu:"current",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",du:"duration",dv:"device",ec:"encoding",en:"end",eg:"engine",em:"embed",er:"error",ev:"events",ex:"expires",fi:"first",fm:"family",fq:"frequency",fr:"frame",fs:"fullscreen",ho:"host",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",li:"live",lo:"load",ma:"max",me:"message",mi:"mime",ml:"midroll",mn:"manufacturer",mx:"mux",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",ph:"playhead",pi:"plugin",pl:"preroll",po:"poster",pr:"preload",ra:"rate",re:"rebuffer",ro:"ratio",se:"session",sk:"seek",sm:"stream",sq:"sequence",sr:"series",st:"start",so:"source",su:"startup",sw:"software",tc:"tech",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch"},c=r(d)},{"./utils/log.js":15}],2:[function(e,t,i){"use strict";function a(){this.isAdBreak=!1,this.on("adbreakstart",function(){this.isAdBreak=!0}),this.on("play",function(){this.isAdBreak=!1}),this.on("playing",function(){this.isAdBreak=!1}),this.on("seeking",function(){this.isAdBreak=!1}),this.on("viewend",function(){this.isAdBreak=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],3:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){},r=0;a.prototype.on=function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++r,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t},a.prototype.off=function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})},a.prototype.one=function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++r;var n=function r(){a.off(e,r),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)},a.prototype.emit=function(e,t){var i=this;t=t||{};var a=this._listeners&&this._listeners[e]||[],r=this._listeners&&this._listeners["after"+e]||[],n=function(t,a){t=t.slice(),t.forEach(function(t){t.call(i,{type:e},a)})};n(a,t),n(r,t)},i.default=a},{}],4:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("global/window"),n=a(r),o=function(){this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,this.on("playing",function(){this._playheadShouldBeProgressing=!0}),this.on("play",this._startPlaybackHeartbeatInterval),this.on("adbreakstart",this._startPlaybackHeartbeatInterval),this.on("adplay",this._startPlaybackHeartbeatInterval),this.on("seeking",this._startPlaybackHeartbeatInterval),this.on("pause",this._stopPlaybackHeartbeatInterval),this.on("ended",this._stopPlaybackHeartbeatInterval),this.on("viewend",this._stopPlaybackHeartbeatInterval),this.on("error",this._stopPlaybackHeartbeatInterval),this.on("adpause",this._stopPlaybackHeartbeatInterval),this.on("adbreakend",this._stopPlaybackHeartbeatInterval),this.on("seeked",function(){this.data.player_is_paused&&this._stopPlaybackHeartbeatInterval()}),this.on("timeupdate",function(){this.emit("playbackheartbeat",{viewer_time:Date.now()})})};o.prototype._startPlaybackHeartbeatInterval=function(){var e=this;null===this._playbackHeartbeatInterval&&(this.emit("playbackheartbeat",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=n.default.setInterval(function(){e.emit("playbackheartbeat",{viewer_time:Date.now()})},this.playbackHeartbeatTime))},o.prototype._stopPlaybackHeartbeatInterval=function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(n.default.clearInterval(this._playbackHeartbeatInterval),this.emit("playbackheartbeatend",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=null)},i.default=o},{"global/window":26}],5:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("playbackheartbeat",this._updatePlayheadTime),this.on("playbackheartbeatend",this._updatePlayheadTime),this.on("timeupdate",this._updatePlayheadTime),this.on("destroy",function(){this.off("timeupdate",this._updatePlayheadTime)})};a.prototype._updatePlayheadTime=function(e,t){t.player_playhead_time?this.data.player_playhead_time=t.player_playhead_time:this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime())},i.default=a},{}],6:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,this.on("playbackheartbeat",this._checkIfRebuffering),this.on("playbackheartbeatend",this._cleanupRebufferTracker),this.on("seeking",function(){this._cleanupRebufferTracker(null,{viewer_time:Date.now()})})};o.prototype._checkIfRebuffering=function(e,t){if(this.isSeeking||this.isAdBreak||!this._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return this._lastCheckedTime=t.viewer_time,this._lastPlayheadTime=this.data.player_playhead_time,void(this._lastPlayheadTimeUpdatedTime=t.viewer_time);if(this._lastPlayheadTime!==this.data.player_playhead_time)return this._rebuffering&&(this._rebuffering=!1,this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime),this.emit("rebufferend")),this._lastCheckedTime=t.viewer_time,this._lastPlayheadTime=this.data.player_playhead_time,void(this._lastPlayheadTimeUpdatedTime=t.viewer_time);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;i>=this.minimumRebufferDuration&&(this._rebuffering?this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime):(this._rebuffering=!0,(0,n.default)(this.data,"view_rebuffer_count",1),this._updateRebufferMetrics(i),this.emit("rebufferstart"))),this._lastCheckedTime=t.viewer_time},o.prototype._cleanupRebufferTracker=function(e,t){this._rebuffering&&(this._rebuffering=!1,this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime),this.emit("rebufferend")),this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null},o.prototype._updateRebufferMetrics=function(e){e>0&&(0,n.default)(this.data,"view_rebuffer_duration",e),this.data.view_watch_time>=0&&this.data.view_rebuffer_count>0&&(this.data.view_rebuffer_frequency=this.data.view_rebuffer_count/this.data.view_watch_time,this.data.view_rebuffer_percentage=this.data.view_rebuffer_duration/this.data.view_watch_time)},i.default=o},{"../utils/safe-increment.js":17}],7:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){var e=this;this.on("viewinit",function(){this._lastPlayheadPosition=-1});var t=["pause","rebufferstart","seeking","error","adbreakstart","hb"],i=["playing","hb"];t.forEach(function(t){e.on(t,function(){if(this._lastPlayheadPosition>=0&&this.data.player_playhead_time>=0&&this._lastPlayerWidth>=0&&this._lastSourceWidth>0&&this._lastPlayerHeight>=0&&this._lastSourceHeight>0){var e=this.data.player_playhead_time-this._lastPlayheadPosition;if(e<0)return void(this._lastPlayheadPosition=-1);var t=Math.min(this._lastPlayerWidth/this._lastSourceWidth,this._lastPlayerHeight/this._lastSourceHeight),i=Math.max(0,t-1),a=Math.max(0,1-t);this.data.view_max_upscale_percentage=Math.max(this.data.view_max_upscale_percentage||0,i),this.data.view_max_downscale_percentage=Math.max(this.data.view_max_downscale_percentage||0,a),(0,o.default)(this.data,"view_total_content_playback_time",e),(0,o.default)(this.data,"view_total_upscaling",i*e),(0,o.default)(this.data,"view_total_downscaling",a*e)}this._lastPlayheadPosition=-1})}),i.forEach(function(t){e.on(t,function(){this._lastPlayheadPosition=this.data.player_playhead_time,this._lastPlayerWidth=this.data.player_width,this._lastPlayerHeight=this.data.player_height,this._lastSourceWidth=this.data.video_source_width,this._lastSourceHeight=this.data.video_source_height})})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":17}],8:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){this.isSeeking=!1,this.on("seeking",function(){this._lastSeekingTime=Date.now(),this.isSeeking===!1&&(this.isSeeking=!0,this.send("seeking"))}),this.on("seeked",function(){this.isSeeking=!1;var e=this._lastSeekingTime||Date.now(),t=Date.now()-e;(0,o.default)(this.data,"view_seek_count",1),(0,o.default)(this.data,"view_seek_duration",t);var i=this.data.view_max_seek_time||0;this.data.view_max_seek_time=Math.max(i,t)}),this.on("viewend",function(){this.isSeeking=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":17}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("viewinit",function(){var e=this.data,t=e.view_id;this.one("playing",function(){"undefined"==typeof this.data.view_time_to_first_frame&&this.calculateTimeToFirstFrame(Date.now(),t)});var i=function(){("undefined"==typeof this.data.player_playhead_time||this.data.player_playhead_time<=1e3)&&this.calculateTimeToFirstFrame(Date.now(),t)};this.one("adbreakstart",i),this.one("adplay",i),this.one("adplaying",i),this.one("viewend",function(){this.off("adbreakstart",i),this.off("adplay",i),this.off("adplaying",i)})})};a.prototype.calculateTimeToFirstFrame=function(e,t){t===this.data.view_id&&(this.data.view_time_to_first_frame=e-this.data.view_start)},i.default=a},{}],10:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._watchTimeTrackerLastCheckedTime=null,this.on("playbackheartbeat",this._updateWatchTime),this.on("playbackheartbeatend",this._clearWatchTimeState)};o.prototype._updateWatchTime=function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),(0,n.default)(this.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._updateRebufferMetrics(),this._watchTimeTrackerLastCheckedTime=i},o.prototype._clearWatchTimeState=function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null},i.default=o},{"../utils/safe-increment.js":17}],11:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},n=e("global/window"),o=a(n),s=e("platform"),l=a(s),u=e("qs"),d=a(u),c=e("./vendor/js-cookie.js"),f=a(c),p=e("./minify-keys.js"),h=a(p),y=e("./utils/image-beacon.js"),_=a(y),m=e("lodash.assign"),b=a(m),v=e("./utils/log.js"),g=a(v),w=e("./utils/uuid.js"),x=e("./player-monitor.js"),k=a(x),S=e("./video-el-monitor.js"),j=a(S),O=e("./utils/utils-public.js"),P=a(O),T="2.0.20",M="2.0",E=o.default.MUX_VAR_NAME||"mux",A=o.default[E],I={};i.default=function(){function e(e){var t=void 0,i=Date.now();try{t=d.default.parse(f.default.get("muxData")||"")}catch(e){}return t=t||{},t.mux_viewer_id=t.mux_viewer_id||(0,w.generateUUID)(),(!t.session_expires||t.session_expires<i)&&(t.session_id=(0,w.generateUUID)(),t.session_start=i),t.session_expires=i+15e5,e&&(0,b.default)(t,e),f.default.set("muxData",d.default.stringify(t),{expires:7300}),t}function t(e,t){e=Array.prototype.slice.apply(e),t=t||Date.now();var i=e[e.length-1],a=void 0;return"object"!==("undefined"==typeof i?"undefined":r(i))?(e.push({viewer_time:t}),e):(i.viewer_time||(a=(0,b.default)({},i),a.viewer_time=t,e[e.length-1]=a),e)}if(!A||!A.loaded){var i=o.default[E]=function(e){var a=arguments,r=Date.now();"string"==typeof e?i.hasOwnProperty(e)?o.default.setTimeout(function(){a=Array.prototype.splice.call(a,1),a=t(a,r),i[e].apply(null,a)},0):g.default.warn("`"+e+"` is an unknown task"):"function"==typeof e?o.default.setTimeout(function(){e(i)},0):g.default.warn("`"+e+"` is invalid.")};i.loaded=Date.now(),i.VERSION=T,i.API_VERSION=M,i.PLAYER_TRACKED=!1,i.monitor=function(e,t){return(0,j.default)(i,e,t)},i.init=function(e,t){I[e]=new k.default(i,e,t)},i.emit=function(e,t,i){I[e]?(I[e].emit(t,i),"destroy"===t&&delete I[e]):g.default.error("A monitor for `"+e+"` has not been initialized.")};var a={mux_api_version:M,mux_embed_version:T,page_url:o.default.location.href,viewer_application_name:l.default.name,viewer_application_version:l.default.version,viewer_application_engine:l.default.layout,viewer_device_name:l.default.product,viewer_device_category:"",viewer_device_manufacturer:l.default.manufacturer,viewer_os_family:l.default.os&&l.default.os.family,viewer_os_architecture:l.default.os&&l.default.os.architecture,viewer_os_version:l.default.os&&l.default.os.version};return i.send=function(t,n){if(t&&!i.checkDoNotTrack()){var o=e()||{},s={};if(!n||"object"!==("undefined"==typeof n?"undefined":r(n)))return g.default.error("A data object was expected in send() but was not provided");"pageloadstart"===t&&(a.page_load_start=n.viewer_time),(0,b.default)(s,a),(0,b.default)(s,n),(0,b.default)(s,o),s.event=t,s.user_id&&(s.viewer_user_id=s.user_id,delete s.user_id),s=(0,h.default)(s),g.default.debug("Sending event: ",t,s),_.default.send("https://img.litix.io/a.gif",t,s)}},i.checkDoNotTrack=function(){var e=o.default.navigator,t=o.default.doNotTrack||e.doNotTrack||e.msDoNotTrack;return"1"===t},i.checkDoNotTrack()&&g.default.debug("The browser's Do Not Track flag is enabled - Mux beaconing is disabled."),i.log=g.default,i.utils=P.default,i}}()},{"./minify-keys.js":1,"./player-monitor.js":12,"./utils/image-beacon.js":14,"./utils/log.js":15,"./utils/utils-public.js":19,"./utils/uuid.js":20,"./vendor/js-cookie.js":22,"./video-el-monitor.js":23,"global/window":26,"lodash.assign":27,platform:29,qs:30}],12:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./utils/log.js"),n=a(r),o=e("lodash.assign"),s=a(o),l=e("./utils/uuid.js"),u=e("global/document"),d=a(u),c=e("global/window"),f=a(c),p=e("./mixins/event-emitter.js"),h=a(p),y=e("./mixins/playback-heartbeat.js"),_=a(y),m=e("./utils/safe-increment.js"),b=a(m),v=e("./utils/video-id-from-src.js"),g=a(v),w=e("./mixins/watch-time-tracker.js"),x=a(w),k=e("./mixins/playhead-time-tracker.js"),S=a(k),j=e("./mixins/rebuffer-tracker.js"),O=a(j),P=e("./mixins/time-to-first-frame-tracker.js"),T=a(P),M=e("./mixins/scaling-tracker.js"),E=a(M),A=e("./mixins/seeking-tracker.js"),I=a(A),C=e("./mixins/ad-tracker.js"),D=a(C),R=f.default.performance&&f.default.performance.timing.navigationStart||!1,N=["viewstart","ended","loadstart","pause","play","playing","ratechange","stalled","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","rebufferstart","rebufferend","seeked","error","hb"],B=function(e,t,i){var a=this,r={debug:!1,minimumRebufferDuration:100,playbackHeartbeatTime:25};this.mux=e,this.id=t,i=(0,s.default)(r,i),n.default.setLevel(i.debug?"debug":"warn"),this.getPlayheadTime=i.getPlayheadTime,this.getStateData=i.getStateData||function(){},this.minimumRebufferDuration=i.minimumRebufferDuration,this.playbackHeartbeatTime=i.playbackHeartbeatTime,this.data={player_instance_id:(0,l.generateShortID)()},this.data.view_sequence_number=1,this.data.player_sequence_number=1,this.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this.updateStateData(),(0,s.default)(this.data,t),this._initializeViewData();var i=function(){"undefined"==typeof this.data.view_start&&(this.data.view_start=Date.now(),this.emit("viewstart"))};this.one("play",i),this.one("adbreakstart",i)}),this.on("videochange",function(e,t){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",t)}),this.on("destroy",function(e,t){"undefined"!=typeof this.data.view_start&&(this.emit("viewend"),this.send("viewend")),f.default.clearTimeout(this._heartBeatTimeout)}),this.on("playerready",function(e,t){(0,s.default)(this.data,t)}),N.forEach(function(e){a.on(e,function(t,i){0!==e.indexOf("ad")&&this.updateStateData(),(0,s.default)(this.data,{viewer_time:Date.now()},i),this._sanitizeData()}),a.on("after"+e,function(){this.send(e)})}),this.one("playerready",function(){var e=Date.now();this.data.player_init_time&&(this.data.player_startup_time=e-this.data.player_init_time),this.mux.PLAYER_TRACKED||(this.mux.PLAYER_TRACKED=!0,this.data.player_init_time&&R&&(this.data.page_load_time=this.data.player_init_time-R),R&&(this.data.player_load_time=e-R)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time,delete this.data.player_load_time}),I.default.apply(this),D.default.apply(this),S.default.apply(this),_.default.apply(this),E.default.apply(this),x.default.apply(this),O.default.apply(this),T.default.apply(this),this.emit("viewinit",i.data)};(0,s.default)(B.prototype,S.default.prototype),(0,s.default)(B.prototype,h.default.prototype),(0,s.default)(B.prototype,I.default.prototype),(0,s.default)(B.prototype,D.default.prototype),(0,s.default)(B.prototype,_.default.prototype),(0,s.default)(B.prototype,x.default.prototype),(0,s.default)(B.prototype,O.default.prototype),(0,s.default)(B.prototype,T.default.prototype),B.prototype.updateStateData=function(){(0,s.default)(this.data,this.getStateData()),this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime()),this._sanitizeData()},B.prototype.send=function(e){var t=(0,s.default)({},this.data);if(1===t.player_error_code&&(delete t.player_error_code,delete t.player_error_message),t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=d.default.createElement("a");i.href=t.video_source_url;var a=i.hostname,r=a.match(/[^\.]+\.[^\.]+$/);r&&r.length&&(t.video_source_domain=r[0]),t.video_source_host_name=a}delete t.ad_request_id,n.default.debug("Sending `"+e+"`",t),this.mux.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,this._restartHeartBeat()},B.prototype._sanitizeData=function(){var e=this,t=["player_width","player_height","video_source_width","video_source_height","player_playhead_time"];t.forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i})},B.prototype._resetVideoData=function(e,t){var i=this;Object.keys(this.data).forEach(function(e){0===e.indexOf("video_")&&delete i.data[e]})},B.prototype._resetViewData=function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1},B.prototype._initializeViewData=function(){var e=this,t=this.data.view_id=(0,l.generateUUID)();this.data.video_id||(this.data.video_id=(0,g.default)(this.data.player_source_url));var i=function(){t===e.data.view_id&&(0,b.default)(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()},B.prototype._restartHeartBeat=function(){var e=this;f.default.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=f.default.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)},i.default=B},{"./mixins/ad-tracker.js":2,"./mixins/event-emitter.js":3,"./mixins/playback-heartbeat.js":4,"./mixins/playhead-time-tracker.js":5,"./mixins/rebuffer-tracker.js":6,"./mixins/scaling-tracker.js":7,"./mixins/seeking-tracker.js":8,"./mixins/time-to-first-frame-tracker.js":9,"./mixins/watch-time-tracker.js":10,"./utils/log.js":15,"./utils/safe-increment.js":17,"./utils/uuid.js":20,"./utils/video-id-from-src.js":21,"global/document":25,"global/window":26,"lodash.assign":27}],13:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(o.default.defaultView&&o.default.defaultView.getComputedStyle)return o.default.defaultView.getComputedStyle(e,null).getPropertyValue(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n)},{"global/document":25}],14:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("qs"),n=a(r),o={};o.send=function(e,t,i){var a=new Image;return a.src=e+"?e="+t+"&"+n.default.stringify(i),a},i.default=o},{qs:30}],15:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("loglevel"),n=a(r),o=n.default.methodFactory;n.default.methodFactory=function(e,t,i){var a=o(e,t,i);return function(){for(var e=["[mux]"],t=0;t<arguments.length;t++)e.push(arguments[t]);a.apply(void 0,e)}},n.default.setLevel(n.default.getLevel()),i.default=n.default},{loglevel:28}],16:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){o.default.debug("safeCall error",e)}return r}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("./log.js"),o=a(n)},{"./log.js":15}],17:[function(e,t,i){"use strict";function a(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],18:[function(e,t,i){"use strict";function a(e){return Math.floor(1e3*e)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],19:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./safe-call.js"),n=a(r),o=e("./safe-increment.js"),s=a(o),l=e("./get-computed-style.js"),u=a(l),d=e("./seconds-to-ms.js"),c=a(d),f={};f.safeCall=n.default,f.safeIncrement=s.default,f.getComputedStyle=u.default,f.secondsToMs=c.default,i.default=f},{"./get-computed-style.js":13,"./safe-call.js":16,"./safe-increment.js":17,"./seconds-to-ms.js":18}],20:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})},r=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)};i.generateUUID=a,i.generateShortID=r},{}],21:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=o.default.createElement("a");t.href=e;var i=t.pathname.replace(/\.[^\/.]+$/,"");return l.default.btoa(t.host+i).split("=")[0]}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n),s=e("global/window"),l=a(s)},{"global/document":25,"global/window":26}],22:[function(e,t,i){"use strict";!function(e){t.exports=e()}(function(){function e(i){function a(e,r,n){var o;if(arguments.length>1){if(n=t({path:"/"},a.defaults,n),"number"==typeof n.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*n.expires),n.expires=s}try{o=JSON.stringify(r),/^[\{\[]/.test(o)&&(r=o)}catch(e){}return r=i.write?i.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape),document.cookie=[e,"=",r,n.expires&&"; expires="+n.expires.toUTCString(),n.path&&"; path="+n.path,n.domain&&"; domain="+n.domain,n.secure?"; secure":""].join("")}e||(o={});for(var l=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,d=0;d<l.length;d++){var c=l[d].split("="),f=c[0].replace(u,decodeURIComponent),p=c.slice(1).join("=");'"'===p.charAt(0)&&(p=p.slice(1,-1));try{if(p=i.read?i.read(p,f):i(p,f)||p.replace(u,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch(e){}if(e===f){o=p;break}e||(o[f]=p)}catch(e){}}return o}return a.get=a.set=a,a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(e,i){a(e,"",t(i,{expires:-1}))},a.withConverter=e,a}var t=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t};return e(function(){})})},{}],23:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i){var a=void 0;t&&"undefined"!=typeof t.nodeName?(a=t,t=a.id?a.id:a.className):a=o.default.querySelector(t);var r=a&&a.nodeName?a.nodeName.toLowerCase():"",n=e.log,s=e.utils.getComputedStyle,c=e.utils.secondsToMs;return a?"video"!==r&&"audio"!==r?n.error("The element of `"+t+"` was not a media element."):(i=i||{},i.data=(0,l.default)({player_software:"HTML5 Video Element",player_mux_plugin:"VideoElementMonitor",player_mux_plugin_version:"2.0.20"},i.data),i.getPlayheadTime=function(){return c(a.currentTime)},i.getStateData=function(){return{player_is_paused:a.paused,player_playhead_time:c(a.currentTime),player_width:parseInt(s(a,"width")),player_height:parseInt(s(a,"height")),player_autoplay_on:a.autoplay,player_preload_on:a.preload,player_error_code:a.error&&a.error.code,player_error_message:a.error&&d[a.error.code],video_poster_url:a.poster,video_source_url:a.currentSrc,video_source_duration:c(a.duration),video_source_height:a.videoHeight,video_source_width:a.videoWidth}},e.init(t,i),e.emit(t,"playerready"),a.paused||(e.emit(t,"play"),a.readyState>2&&e.emit(t,"playing")),void u.forEach(function(i){a.addEventListener(i,function(){e.emit(t,i)},!1)})):n.error("No element was found with the `"+t+"` query selector.")}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n),s=e("lodash.assign"),l=a(s),u=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],d={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"}},{"global/document":25,"lodash.assign":27}],24:[function(e,t,i){},{}],25:[function(e,t,i){(function(i){var a="undefined"!=typeof i?i:"undefined"!=typeof window?window:{},r=e("min-document");if("undefined"!=typeof document)t.exports=document;else{var n=a["__GLOBAL_DOCUMENT_CACHE@4"];n||(n=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exports=n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":24}],26:[function(e,t,i){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,i){function a(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function r(e){return function(t){return null==t?void 0:t[e]}}function n(e,t){for(var i=-1,a=Array(e);++i<e;)a[i]=t(i);return a}function o(e,t){return function(i){return e(t(i))}}function s(e,t,i){var a=e[t];C.call(e,t)&&_(a,i)&&(void 0!==i||t in e)||(e[t]=i)}function l(e,t){return null!=e&&(C.call(e,t)||"object"==typeof e&&t in e&&null===U(e))}function u(e,t){return t=L(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,n=L(i.length-t,0),o=Array(n);++r<n;)o[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=o,a(e,this,s)}}function d(e,t,i,a){i||(i={});for(var r=-1,n=t.length;++r<n;){var o=t[r],l=a?a(i[o],e[o],o,i,e):void 0;s(i,o,void 0===l?e[o]:l)}return i}function c(e){return u(function(t,i){var a=-1,r=i.length,n=r>1?i[r-1]:void 0,o=r>2?i[2]:void 0;for(n=e.length>3&&"function"==typeof n?(r--,n):void 0,o&&h(i[0],i[1],o)&&(n=r<3?void 0:n,r=1),t=Object(t);++a<r;){var s=i[a];s&&e(t,s,a,n)}return t})}function f(e){var t=e?e.length:void 0;return w(t)&&(G(e)||S(e)||m(e))?n(t,String):null}function p(e,t){return t=null==t?O:t,!!t&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function h(e,t,i){if(!x(i))return!1;var a=typeof t;return!!("number"==a?b(i)&&p(t,i.length):"string"==a&&t in i)&&_(i[t],e)}function y(e){var t=e&&e.constructor,i="function"==typeof t&&t.prototype||I;return e===i}function _(e,t){return e===t||e!==e&&t!==t}function m(e){return v(e)&&C.call(e,"callee")&&(!R.call(e,"callee")||D.call(e)==P)}function b(e){return null!=e&&w(F(e))&&!g(e)}function v(e){return k(e)&&b(e)}function g(e){var t=x(e)?D.call(e):"";return t==T||t==M}function w(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=O}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){return!!e&&"object"==typeof e}function S(e){return"string"==typeof e||!G(e)&&k(e)&&D.call(e)==E}function j(e){var t=y(e);if(!t&&!b(e))return H(e);var i=f(e),a=!!i,r=i||[],n=r.length;for(var o in e)!l(e,o)||a&&("length"==o||p(o,n))||t&&"constructor"==o||r.push(o);return r}var O=9007199254740991,P="[object Arguments]",T="[object Function]",M="[object GeneratorFunction]",E="[object String]",A=/^(?:0|[1-9]\d*)$/,I=Object.prototype,C=I.hasOwnProperty,D=I.toString,R=I.propertyIsEnumerable,N=Object.getPrototypeOf,B=Object.keys,L=Math.max,W=!R.call({valueOf:1},"valueOf"),H=o(B,Object),F=r("length"),U=o(N,Object),G=Array.isArray,$=c(function(e,t){if(W||y(t)||b(t))return void d(t,j(t),e);for(var i in t)C.call(t,i)&&s(e,i,t[i])});t.exports=$},{}],28:[function(e,t,i){!function(e,i){"use strict";"function"==typeof define&&define.amd?define(i):"object"==typeof t&&t.exports?t.exports=i():e.log=i()}(this,function(){"use strict";function e(e){return typeof console!==s&&(void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):o)}function t(e,t){var i=e[t];if("function"==typeof i.bind)return i.bind(e);try{return Function.prototype.bind.call(i,e)}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}}function i(e,t,i){return function(){typeof console!==s&&(a.call(this,t,i),this[e].apply(this,arguments))}}function a(e,t){for(var i=0;i<l.length;i++){var a=l[i];this[a]=i<e?o:this.methodFactory(a,e,t)}}function r(t,a,r){return e(t)||i.apply(this,arguments)}function n(e,t,i){function n(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage[c]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+t+";"}catch(e){}}function o(){var e;try{e=window.localStorage[c]}catch(e){}if(typeof e===s)try{var t=window.document.cookie,i=t.indexOf(encodeURIComponent(c)+"=");
!function e(t,i,a){function r(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(n)return n(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return r(i?i:e)},d,d.exports,e,t,i,a)}return i[o].exports}for(var n="function"==typeof require&&require,o=0;o<a.length;o++)r(a[o]);return r}({1:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function n(e){var t={};return Object.keys(e).forEach(function(i){if(e.hasOwnProperty(i)&&void 0!==e[i]){var a=i.split("_"),r=a[0],n=u[r];n||(s.default.debug("Data key word `"+a[0]+"` not expected in "+i),n=r+"_"),a.splice(1).forEach(function(e){c[e]?n+=c[e]:(s.default.debug("Data key word `"+e+"` not expected in "+i),n+="_"+e+"_")}),t[n]=e[i]}}),t}Object.defineProperty(i,"__esModule",{value:!0}),i.default=n;var o=e("./utils/log.js"),s=a(o),l={a:"property",d:"ad",e:"event",f:"experiment",m:"mux",p:"player",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view"},u=r(l),d={ad:"ad",ap:"api",al:"application",ar:"architecture",au:"autoplay",br:"break",cd:"code",cg:"category",cn:"config",co:"count",cp:"complete",ct:"content",cu:"current",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",du:"duration",dv:"device",ec:"encoding",en:"end",eg:"engine",em:"embed",er:"error",ev:"events",ex:"expires",fi:"first",fm:"family",fq:"frequency",fr:"frame",fs:"fullscreen",ho:"host",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",li:"live",lo:"load",ma:"max",me:"message",mi:"mime",ml:"midroll",mn:"manufacturer",mx:"mux",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",ph:"playhead",pi:"plugin",pl:"preroll",po:"poster",pr:"preload",ra:"rate",re:"rebuffer",ro:"ratio",se:"session",sk:"seek",sm:"stream",sq:"sequence",sr:"series",st:"start",so:"source",su:"startup",sw:"software",tc:"tech",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch"},c=r(d)},{"./utils/log.js":15}],2:[function(e,t,i){"use strict";function a(){this.isAdBreak=!1,this.on("adbreakstart",function(){this.isAdBreak=!0}),this.on("play",function(){this.isAdBreak=!1}),this.on("playing",function(){this.isAdBreak=!1}),this.on("seeking",function(){this.isAdBreak=!1}),this.on("viewend",function(){this.isAdBreak=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],3:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){},r=0;a.prototype.on=function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++r,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t},a.prototype.off=function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})},a.prototype.one=function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++r;var n=function r(){a.off(e,r),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)},a.prototype.emit=function(e,t){var i=this;t=t||{};var a=this._listeners&&this._listeners[e]||[],r=this._listeners&&this._listeners["after"+e]||[],n=function(t,a){t=t.slice(),t.forEach(function(t){t.call(i,{type:e},a)})};n(a,t),n(r,t)},i.default=a},{}],4:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("global/window"),n=a(r),o=function(){this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,this.on("playing",function(){this._playheadShouldBeProgressing=!0}),this.on("play",this._startPlaybackHeartbeatInterval),this.on("adbreakstart",this._startPlaybackHeartbeatInterval),this.on("adplay",this._startPlaybackHeartbeatInterval),this.on("seeking",this._startPlaybackHeartbeatInterval),this.on("pause",this._stopPlaybackHeartbeatInterval),this.on("ended",this._stopPlaybackHeartbeatInterval),this.on("viewend",this._stopPlaybackHeartbeatInterval),this.on("error",this._stopPlaybackHeartbeatInterval),this.on("adpause",this._stopPlaybackHeartbeatInterval),this.on("adbreakend",this._stopPlaybackHeartbeatInterval),this.on("seeked",function(){this.data.player_is_paused&&this._stopPlaybackHeartbeatInterval()}),this.on("timeupdate",function(){this.emit("playbackheartbeat",{viewer_time:Date.now()})})};o.prototype._startPlaybackHeartbeatInterval=function(){var e=this;null===this._playbackHeartbeatInterval&&(this.emit("playbackheartbeat",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=n.default.setInterval(function(){e.emit("playbackheartbeat",{viewer_time:Date.now()})},this.playbackHeartbeatTime))},o.prototype._stopPlaybackHeartbeatInterval=function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(n.default.clearInterval(this._playbackHeartbeatInterval),this.emit("playbackheartbeatend",{viewer_time:Date.now()}),this._playbackHeartbeatInterval=null)},i.default=o},{"global/window":26}],5:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("playbackheartbeat",this._updatePlayheadTime),this.on("playbackheartbeatend",this._updatePlayheadTime),this.on("timeupdate",this._updatePlayheadTime),this.on("destroy",function(){this.off("timeupdate",this._updatePlayheadTime)})};a.prototype._updatePlayheadTime=function(e,t){t.player_playhead_time?this.data.player_playhead_time=t.player_playhead_time:this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime())},i.default=a},{}],6:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,this.on("playbackheartbeat",this._checkIfRebuffering),this.on("playbackheartbeatend",this._cleanupRebufferTracker),this.on("seeking",function(){this._cleanupRebufferTracker(null,{viewer_time:Date.now()})})};o.prototype._checkIfRebuffering=function(e,t){if(this.isSeeking||this.isAdBreak||!this._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return this._lastCheckedTime=t.viewer_time,this._lastPlayheadTime=this.data.player_playhead_time,void(this._lastPlayheadTimeUpdatedTime=t.viewer_time);if(this._lastPlayheadTime!==this.data.player_playhead_time)return this._rebuffering&&(this._rebuffering=!1,this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime),this.emit("rebufferend")),this._lastCheckedTime=t.viewer_time,this._lastPlayheadTime=this.data.player_playhead_time,void(this._lastPlayheadTimeUpdatedTime=t.viewer_time);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;i>=this.minimumRebufferDuration&&(this._rebuffering?this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime):(this._rebuffering=!0,(0,n.default)(this.data,"view_rebuffer_count",1),this._updateRebufferMetrics(i),this.emit("rebufferstart"))),this._lastCheckedTime=t.viewer_time},o.prototype._cleanupRebufferTracker=function(e,t){this._rebuffering&&(this._rebuffering=!1,this._updateRebufferMetrics(t.viewer_time-this._lastCheckedTime),this.emit("rebufferend")),this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null},o.prototype._updateRebufferMetrics=function(e){e>0&&(0,n.default)(this.data,"view_rebuffer_duration",e),this.data.view_watch_time>=0&&this.data.view_rebuffer_count>0&&(this.data.view_rebuffer_frequency=this.data.view_rebuffer_count/this.data.view_watch_time,this.data.view_rebuffer_percentage=this.data.view_rebuffer_duration/this.data.view_watch_time)},i.default=o},{"../utils/safe-increment.js":17}],7:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){var e=this;this.on("viewinit",function(){this._lastPlayheadPosition=-1});var t=["pause","rebufferstart","seeking","error","adbreakstart","hb"],i=["playing","hb"];t.forEach(function(t){e.on(t,function(){if(this._lastPlayheadPosition>=0&&this.data.player_playhead_time>=0&&this._lastPlayerWidth>=0&&this._lastSourceWidth>0&&this._lastPlayerHeight>=0&&this._lastSourceHeight>0){var e=this.data.player_playhead_time-this._lastPlayheadPosition;if(e<0)return void(this._lastPlayheadPosition=-1);var t=Math.min(this._lastPlayerWidth/this._lastSourceWidth,this._lastPlayerHeight/this._lastSourceHeight),i=Math.max(0,t-1),a=Math.max(0,1-t);this.data.view_max_upscale_percentage=Math.max(this.data.view_max_upscale_percentage||0,i),this.data.view_max_downscale_percentage=Math.max(this.data.view_max_downscale_percentage||0,a),(0,o.default)(this.data,"view_total_content_playback_time",e),(0,o.default)(this.data,"view_total_upscaling",i*e),(0,o.default)(this.data,"view_total_downscaling",a*e)}this._lastPlayheadPosition=-1})}),i.forEach(function(t){e.on(t,function(){this._lastPlayheadPosition=this.data.player_playhead_time,this._lastPlayerWidth=this.data.player_width,this._lastPlayerHeight=this.data.player_height,this._lastSourceWidth=this.data.video_source_width,this._lastSourceHeight=this.data.video_source_height})})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":17}],8:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(){this.isSeeking=!1,this.on("seeking",function(){this._lastSeekingTime=Date.now(),this.isSeeking===!1&&(this.isSeeking=!0,this.send("seeking"))}),this.on("seeked",function(){this.isSeeking=!1;var e=this._lastSeekingTime||Date.now(),t=Date.now()-e;(0,o.default)(this.data,"view_seek_count",1),(0,o.default)(this.data,"view_seek_duration",t);var i=this.data.view_max_seek_time||0;this.data.view_max_seek_time=Math.max(i,t)}),this.on("viewend",function(){this.isSeeking=!1})}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("../utils/safe-increment.js"),o=a(n)},{"../utils/safe-increment.js":17}],9:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){this.on("viewinit",function(){var e=this.data,t=e.view_id;this.one("playing",function(){"undefined"==typeof this.data.view_time_to_first_frame&&this.calculateTimeToFirstFrame(Date.now(),t)});var i=function(){("undefined"==typeof this.data.player_playhead_time||this.data.player_playhead_time<=1e3)&&this.calculateTimeToFirstFrame(Date.now(),t)};this.one("adbreakstart",i),this.one("adplay",i),this.one("adplaying",i),this.one("viewend",function(){this.off("adbreakstart",i),this.off("adplay",i),this.off("adplaying",i)})})};a.prototype.calculateTimeToFirstFrame=function(e,t){t===this.data.view_id&&(this.data.view_time_to_first_frame=e-this.data.view_start)},i.default=a},{}],10:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("../utils/safe-increment.js"),n=a(r),o=function(){this._watchTimeTrackerLastCheckedTime=null,this.on("playbackheartbeat",this._updateWatchTime),this.on("playbackheartbeatend",this._clearWatchTimeState)};o.prototype._updateWatchTime=function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),(0,n.default)(this.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._updateRebufferMetrics(),this._watchTimeTrackerLastCheckedTime=i},o.prototype._clearWatchTimeState=function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null},i.default=o},{"../utils/safe-increment.js":17}],11:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},n=e("global/window"),o=a(n),s=e("platform"),l=a(s),u=e("qs"),d=a(u),c=e("./vendor/js-cookie.js"),f=a(c),p=e("./minify-keys.js"),h=a(p),y=e("./utils/image-beacon.js"),_=a(y),m=e("lodash.assign"),b=a(m),v=e("./utils/log.js"),g=a(v),w=e("./utils/uuid.js"),x=e("./player-monitor.js"),k=a(x),S=e("./video-el-monitor.js"),j=a(S),O=e("./utils/utils-public.js"),P=a(O),T="2.0.21",M="2.0",E=o.default.MUX_VAR_NAME||"mux",A=o.default[E],I={};i.default=function(){function e(e){var t=void 0,i=Date.now();try{t=d.default.parse(f.default.get("muxData")||"")}catch(e){}return t=t||{},t.mux_viewer_id=t.mux_viewer_id||(0,w.generateUUID)(),(!t.session_expires||t.session_expires<i)&&(t.session_id=(0,w.generateUUID)(),t.session_start=i),t.session_expires=i+15e5,e&&(0,b.default)(t,e),f.default.set("muxData",d.default.stringify(t),{expires:7300}),t}function t(e,t){e=Array.prototype.slice.apply(e),t=t||Date.now();var i=e[e.length-1],a=void 0;return"object"!==("undefined"==typeof i?"undefined":r(i))?(e.push({viewer_time:t}),e):(i.viewer_time||(a=(0,b.default)({},i),a.viewer_time=t,e[e.length-1]=a),e)}if(!A||!A.loaded){var i=o.default[E]=function(e){var a=arguments,r=Date.now();"string"==typeof e?i.hasOwnProperty(e)?o.default.setTimeout(function(){a=Array.prototype.splice.call(a,1),a=t(a,r),i[e].apply(null,a)},0):g.default.warn("`"+e+"` is an unknown task"):"function"==typeof e?o.default.setTimeout(function(){e(i)},0):g.default.warn("`"+e+"` is invalid.")};i.loaded=Date.now(),i.VERSION=T,i.API_VERSION=M,i.PLAYER_TRACKED=!1,i.monitor=function(e,t){return(0,j.default)(i,e,t)},i.init=function(e,t){I[e]=new k.default(i,e,t)},i.emit=function(e,t,i){I[e]?(I[e].emit(t,i),"destroy"===t&&delete I[e]):g.default.error("A monitor for `"+e+"` has not been initialized.")};var a={mux_api_version:M,mux_embed_version:T,page_url:o.default.location.href,viewer_application_name:l.default.name,viewer_application_version:l.default.version,viewer_application_engine:l.default.layout,viewer_device_name:l.default.product,viewer_device_category:"",viewer_device_manufacturer:l.default.manufacturer,viewer_os_family:l.default.os&&l.default.os.family,viewer_os_architecture:l.default.os&&l.default.os.architecture,viewer_os_version:l.default.os&&l.default.os.version};return i.send=function(t,n){if(t&&!i.checkDoNotTrack()){var o=e()||{},s={};if(!n||"object"!==("undefined"==typeof n?"undefined":r(n)))return g.default.error("A data object was expected in send() but was not provided");"pageloadstart"===t&&(a.page_load_start=n.viewer_time),(0,b.default)(s,a),(0,b.default)(s,n),(0,b.default)(s,o),s.event=t,s.user_id&&(s.viewer_user_id=s.user_id,delete s.user_id),s=(0,h.default)(s),g.default.debug("Sending event: ",t,s),_.default.send("https://img.litix.io/a.gif",t,s)}},i.checkDoNotTrack=function(){var e=o.default.navigator,t=o.default.doNotTrack||e.doNotTrack||e.msDoNotTrack;return"1"===t},i.checkDoNotTrack()&&g.default.debug("The browser's Do Not Track flag is enabled - Mux beaconing is disabled."),i.log=g.default,i.utils=P.default,i}}()},{"./minify-keys.js":1,"./player-monitor.js":12,"./utils/image-beacon.js":14,"./utils/log.js":15,"./utils/utils-public.js":19,"./utils/uuid.js":20,"./vendor/js-cookie.js":22,"./video-el-monitor.js":23,"global/window":26,"lodash.assign":27,platform:29,qs:30}],12:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./utils/log.js"),n=a(r),o=e("lodash.assign"),s=a(o),l=e("./utils/uuid.js"),u=e("global/document"),d=a(u),c=e("global/window"),f=a(c),p=e("./mixins/event-emitter.js"),h=a(p),y=e("./mixins/playback-heartbeat.js"),_=a(y),m=e("./utils/safe-increment.js"),b=a(m),v=e("./utils/video-id-from-src.js"),g=a(v),w=e("./mixins/watch-time-tracker.js"),x=a(w),k=e("./mixins/playhead-time-tracker.js"),S=a(k),j=e("./mixins/rebuffer-tracker.js"),O=a(j),P=e("./mixins/time-to-first-frame-tracker.js"),T=a(P),M=e("./mixins/scaling-tracker.js"),E=a(M),A=e("./mixins/seeking-tracker.js"),I=a(A),C=e("./mixins/ad-tracker.js"),D=a(C),R=f.default.performance&&f.default.performance.timing.navigationStart||!1,N=["viewstart","ended","loadstart","pause","play","playing","ratechange","stalled","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","rebufferstart","rebufferend","seeked","error","hb"],B=function(e,t,i){var a=this,r={debug:!1,minimumRebufferDuration:100,playbackHeartbeatTime:25};this.mux=e,this.id=t,i=(0,s.default)(r,i),n.default.setLevel(i.debug?"debug":"warn"),this.getPlayheadTime=i.getPlayheadTime,this.getStateData=i.getStateData||function(){},this.minimumRebufferDuration=i.minimumRebufferDuration,this.playbackHeartbeatTime=i.playbackHeartbeatTime,this.data={player_instance_id:(0,l.generateShortID)()},this.data.view_sequence_number=1,this.data.player_sequence_number=1,this.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this.updateStateData(),(0,s.default)(this.data,t),this._initializeViewData();var i=function(){"undefined"==typeof this.data.view_start&&(this.data.view_start=Date.now(),this.emit("viewstart"))};this.one("play",i),this.one("adbreakstart",i)}),this.on("videochange",function(e,t){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",t)}),this.on("destroy",function(e,t){"undefined"!=typeof this.data.view_start&&(this.emit("viewend"),this.send("viewend")),f.default.clearTimeout(this._heartBeatTimeout)}),this.on("playerready",function(e,t){(0,s.default)(this.data,t)}),N.forEach(function(e){a.on(e,function(t,i){0!==e.indexOf("ad")&&this.updateStateData(),(0,s.default)(this.data,{viewer_time:Date.now()},i),this._sanitizeData()}),a.on("after"+e,function(){this.send(e)})}),this.one("playerready",function(){var e=Date.now();this.data.player_init_time&&(this.data.player_startup_time=e-this.data.player_init_time),this.mux.PLAYER_TRACKED||(this.mux.PLAYER_TRACKED=!0,this.data.player_init_time&&R&&(this.data.page_load_time=this.data.player_init_time-R),R&&(this.data.player_load_time=e-R)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time,delete this.data.player_load_time}),I.default.apply(this),D.default.apply(this),S.default.apply(this),_.default.apply(this),E.default.apply(this),x.default.apply(this),O.default.apply(this),T.default.apply(this),this.emit("viewinit",i.data)};(0,s.default)(B.prototype,S.default.prototype),(0,s.default)(B.prototype,h.default.prototype),(0,s.default)(B.prototype,I.default.prototype),(0,s.default)(B.prototype,D.default.prototype),(0,s.default)(B.prototype,_.default.prototype),(0,s.default)(B.prototype,x.default.prototype),(0,s.default)(B.prototype,O.default.prototype),(0,s.default)(B.prototype,T.default.prototype),B.prototype.updateStateData=function(){(0,s.default)(this.data,this.getStateData()),this.getPlayheadTime&&(this.data.player_playhead_time=this.getPlayheadTime()),this._sanitizeData()},B.prototype.send=function(e){var t=(0,s.default)({},this.data);if(1===t.player_error_code&&(delete t.player_error_code,delete t.player_error_message),t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=d.default.createElement("a");i.href=t.video_source_url;var a=i.hostname,r=a.match(/[^\.]+\.[^\.]+$/);r&&r.length&&(t.video_source_domain=r[0]),t.video_source_host_name=a}delete t.ad_request_id,n.default.debug("Sending `"+e+"`",t),this.mux.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,this._restartHeartBeat()},B.prototype._sanitizeData=function(){var e=this,t=["player_width","player_height","video_source_width","video_source_height","player_playhead_time"];t.forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i})},B.prototype._resetVideoData=function(e,t){var i=this;Object.keys(this.data).forEach(function(e){0===e.indexOf("video_")&&delete i.data[e]})},B.prototype._resetViewData=function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1},B.prototype._initializeViewData=function(){var e=this,t=this.data.view_id=(0,l.generateUUID)();this.data.video_id||(this.data.video_id=(0,g.default)(this.data.player_source_url));var i=function(){t===e.data.view_id&&(0,b.default)(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()},B.prototype._restartHeartBeat=function(){var e=this;f.default.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=f.default.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)},i.default=B},{"./mixins/ad-tracker.js":2,"./mixins/event-emitter.js":3,"./mixins/playback-heartbeat.js":4,"./mixins/playhead-time-tracker.js":5,"./mixins/rebuffer-tracker.js":6,"./mixins/scaling-tracker.js":7,"./mixins/seeking-tracker.js":8,"./mixins/time-to-first-frame-tracker.js":9,"./mixins/watch-time-tracker.js":10,"./utils/log.js":15,"./utils/safe-increment.js":17,"./utils/uuid.js":20,"./utils/video-id-from-src.js":21,"global/document":25,"global/window":26,"lodash.assign":27}],13:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(o.default.defaultView&&o.default.defaultView.getComputedStyle)return o.default.defaultView.getComputedStyle(e,null).getPropertyValue(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n)},{"global/document":25}],14:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("qs"),n=a(r),o={};o.send=function(e,t,i){var a=new Image;return a.src=e+"?e="+t+"&"+n.default.stringify(i),a},i.default=o},{qs:30}],15:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("loglevel"),n=a(r),o=n.default.methodFactory;n.default.methodFactory=function(e,t,i){var a=o(e,t,i);return function(){for(var e=["[mux]"],t=0;t<arguments.length;t++)e.push(arguments[t]);a.apply(void 0,e)}},n.default.setLevel(n.default.getLevel()),i.default=n.default},{loglevel:28}],16:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){o.default.debug("safeCall error",e)}return r}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("./log.js"),o=a(n)},{"./log.js":15}],17:[function(e,t,i){"use strict";function a(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],18:[function(e,t,i){"use strict";function a(e){return Math.floor(1e3*e)}Object.defineProperty(i,"__esModule",{value:!0}),i.default=a},{}],19:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e("./safe-call.js"),n=a(r),o=e("./safe-increment.js"),s=a(o),l=e("./get-computed-style.js"),u=a(l),d=e("./seconds-to-ms.js"),c=a(d),f={};f.safeCall=n.default,f.safeIncrement=s.default,f.getComputedStyle=u.default,f.secondsToMs=c.default,i.default=f},{"./get-computed-style.js":13,"./safe-call.js":16,"./safe-increment.js":17,"./seconds-to-ms.js":18}],20:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"===e?t:3&t|8;return i.toString(16)})},r=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)};i.generateUUID=a,i.generateShortID=r},{}],21:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=o.default.createElement("a");t.href=e;var i=t.pathname.replace(/\.[^\/.]+$/,"");return l.default.btoa(t.host+i).split("=")[0]}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n),s=e("global/window"),l=a(s)},{"global/document":25,"global/window":26}],22:[function(e,t,i){"use strict";!function(e){t.exports=e()}(function(){function e(i){function a(e,r,n){var o;if(arguments.length>1){if(n=t({path:"/"},a.defaults,n),"number"==typeof n.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*n.expires),n.expires=s}try{o=JSON.stringify(r),/^[\{\[]/.test(o)&&(r=o)}catch(e){}return r=i.write?i.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),e=e.replace(/[\(\)]/g,escape),document.cookie=[e,"=",r,n.expires&&"; expires="+n.expires.toUTCString(),n.path&&"; path="+n.path,n.domain&&"; domain="+n.domain,n.secure?"; secure":""].join("")}e||(o={});for(var l=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,d=0;d<l.length;d++){var c=l[d].split("="),f=c[0].replace(u,decodeURIComponent),p=c.slice(1).join("=");'"'===p.charAt(0)&&(p=p.slice(1,-1));try{if(p=i.read?i.read(p,f):i(p,f)||p.replace(u,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch(e){}if(e===f){o=p;break}e||(o[f]=p)}catch(e){}}return o}return a.get=a.set=a,a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(e,i){a(e,"",t(i,{expires:-1}))},a.withConverter=e,a}var t=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t};return e(function(){})})},{}],23:[function(e,t,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function r(e,t,i){var a=void 0;t&&"undefined"!=typeof t.nodeName?(a=t,t=a.id?a.id:a.className):a=o.default.querySelector(t);var r=a&&a.nodeName?a.nodeName.toLowerCase():"",n=e.log,s=e.utils.getComputedStyle,c=e.utils.secondsToMs;return a?"video"!==r&&"audio"!==r?n.error("The element of `"+t+"` was not a media element."):(i=i||{},i.data=(0,l.default)({player_software:"HTML5 Video Element",player_mux_plugin:"VideoElementMonitor",player_mux_plugin_version:"2.0.21"},i.data),i.getPlayheadTime=function(){return c(a.currentTime)},i.getStateData=function(){return{player_is_paused:a.paused,player_playhead_time:c(a.currentTime),player_width:parseInt(s(a,"width")),player_height:parseInt(s(a,"height")),player_autoplay_on:a.autoplay,player_preload_on:a.preload,player_error_code:a.error&&a.error.code,player_error_message:a.error&&d[a.error.code],video_poster_url:a.poster,video_source_url:a.currentSrc,video_source_duration:c(a.duration),video_source_height:a.videoHeight,video_source_width:a.videoWidth}},e.init(t,i),e.emit(t,"playerready"),a.paused||(e.emit(t,"play"),a.readyState>2&&e.emit(t,"playing")),void u.forEach(function(i){a.addEventListener(i,function(){e.emit(t,i)},!1)})):n.error("No element was found with the `"+t+"` query selector.")}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;var n=e("global/document"),o=a(n),s=e("lodash.assign"),l=a(s),u=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],d={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"}},{"global/document":25,"lodash.assign":27}],24:[function(e,t,i){},{}],25:[function(e,t,i){(function(i){var a="undefined"!=typeof i?i:"undefined"!=typeof window?window:{},r=e("min-document");if("undefined"!=typeof document)t.exports=document;else{var n=a["__GLOBAL_DOCUMENT_CACHE@4"];n||(n=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exports=n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":24}],26:[function(e,t,i){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,i){function a(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function r(e){return function(t){return null==t?void 0:t[e]}}function n(e,t){for(var i=-1,a=Array(e);++i<e;)a[i]=t(i);return a}function o(e,t){return function(i){return e(t(i))}}function s(e,t,i){var a=e[t];C.call(e,t)&&_(a,i)&&(void 0!==i||t in e)||(e[t]=i)}function l(e,t){return null!=e&&(C.call(e,t)||"object"==typeof e&&t in e&&null===U(e))}function u(e,t){return t=L(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,n=L(i.length-t,0),o=Array(n);++r<n;)o[r]=i[t+r];r=-1;for(var s=Array(t+1);++r<t;)s[r]=i[r];return s[t]=o,a(e,this,s)}}function d(e,t,i,a){i||(i={});for(var r=-1,n=t.length;++r<n;){var o=t[r],l=a?a(i[o],e[o],o,i,e):void 0;s(i,o,void 0===l?e[o]:l)}return i}function c(e){return u(function(t,i){var a=-1,r=i.length,n=r>1?i[r-1]:void 0,o=r>2?i[2]:void 0;for(n=e.length>3&&"function"==typeof n?(r--,n):void 0,o&&h(i[0],i[1],o)&&(n=r<3?void 0:n,r=1),t=Object(t);++a<r;){var s=i[a];s&&e(t,s,a,n)}return t})}function f(e){var t=e?e.length:void 0;return w(t)&&(G(e)||S(e)||m(e))?n(t,String):null}function p(e,t){return t=null==t?O:t,!!t&&("number"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function h(e,t,i){if(!x(i))return!1;var a=typeof t;return!!("number"==a?b(i)&&p(t,i.length):"string"==a&&t in i)&&_(i[t],e)}function y(e){var t=e&&e.constructor,i="function"==typeof t&&t.prototype||I;return e===i}function _(e,t){return e===t||e!==e&&t!==t}function m(e){return v(e)&&C.call(e,"callee")&&(!R.call(e,"callee")||D.call(e)==P)}function b(e){return null!=e&&w(F(e))&&!g(e)}function v(e){return k(e)&&b(e)}function g(e){var t=x(e)?D.call(e):"";return t==T||t==M}function w(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=O}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){return!!e&&"object"==typeof e}function S(e){return"string"==typeof e||!G(e)&&k(e)&&D.call(e)==E}function j(e){var t=y(e);if(!t&&!b(e))return H(e);var i=f(e),a=!!i,r=i||[],n=r.length;for(var o in e)!l(e,o)||a&&("length"==o||p(o,n))||t&&"constructor"==o||r.push(o);return r}var O=9007199254740991,P="[object Arguments]",T="[object Function]",M="[object GeneratorFunction]",E="[object String]",A=/^(?:0|[1-9]\d*)$/,I=Object.prototype,C=I.hasOwnProperty,D=I.toString,R=I.propertyIsEnumerable,N=Object.getPrototypeOf,B=Object.keys,L=Math.max,W=!R.call({valueOf:1},"valueOf"),H=o(B,Object),F=r("length"),U=o(N,Object),G=Array.isArray,$=c(function(e,t){if(W||y(t)||b(t))return void d(t,j(t),e);for(var i in t)C.call(t,i)&&s(e,i,t[i])});t.exports=$},{}],28:[function(e,t,i){!function(e,i){"use strict";"function"==typeof define&&define.amd?define(i):"object"==typeof t&&t.exports?t.exports=i():e.log=i()}(this,function(){"use strict";function e(e){return typeof console!==s&&(void 0!==console[e]?t(console,e):void 0!==console.log?t(console,"log"):o)}function t(e,t){var i=e[t];if("function"==typeof i.bind)return i.bind(e);try{return Function.prototype.bind.call(i,e)}catch(t){return function(){return Function.prototype.apply.apply(i,[e,arguments])}}}function i(e,t,i){return function(){typeof console!==s&&(a.call(this,t,i),this[e].apply(this,arguments))}}function a(e,t){for(var i=0;i<l.length;i++){var a=l[i];this[a]=i<e?o:this.methodFactory(a,e,t)}}function r(t,a,r){return e(t)||i.apply(this,arguments)}function n(e,t,i){function n(e){var t=(l[e]||"silent").toUpperCase();try{return void(window.localStorage[c]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+t+";"}catch(e){}}function o(){var e;try{e=window.localStorage[c]}catch(e){}if(typeof e===s)try{var t=window.document.cookie,i=t.indexOf(encodeURIComponent(c)+"=");
i&&(e=/^([^;]+)/.exec(t.slice(i))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}var u,d=this,c="loglevel";e&&(c+=":"+e),d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=i||r,d.getLevel=function(){return u},d.setLevel=function(t,i){if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),!("number"==typeof t&&t>=0&&t<=d.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(u=t,i!==!1&&n(t),a.call(d,t,e),typeof console===s&&t<d.levels.SILENT)return"No console available for logging"},d.setDefaultLevel=function(e){o()||d.setLevel(e,!1)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)};var f=o();null==f&&(f=null==t?"WARN":t),d.setLevel(f,!1)}var o=function(){},s="undefined",l=["trace","debug","info","warn","error"],u=new n,d={};u.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new n(e,u.getLevel(),u.methodFactory)),t};var c=typeof window!==s?window.log:void 0;return u.noConflict=function(){return typeof window!==s&&window.log===u&&(window.log=c),u},u})},{}],29:[function(e,t,i){(function(e){(function(){"use strict";function a(e){return e=String(e),e.charAt(0).toUpperCase()+e.slice(1)}function r(e,t,i){var a={6.4:"10",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&i&&/^Win/i.test(e)&&(a=a[/[\d.]+$/.exec(e)])&&(e="Windows "+a),e=String(e),t&&i&&(e=e.replace(RegExp(t,"i"),i)),e=o(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").split(" on ")[0])}function n(e,t){var i=-1,a=e?e.length:0;if("number"==typeof a&&a>-1&&a<=g)for(;++i<a;)t(e[i],i,e);else s(e,t)}function o(e){return e=f(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:a(e)}function s(e,t){for(var i in e)S.call(e,i)&&t(e[i],i,e)}function l(e){return null==e?a(e):j.call(e).slice(8,-1)}function u(e,t){var i=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(i)||"object"==i&&!e[t])}function d(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function c(e,t){var i=null;return n(e,function(a,r){i=t(i,a,r,e)}),i}function f(e){return String(e).replace(/^ +| +$/g,"")}function p(e){function t(t){return c(t,function(t,i){return t||RegExp("\\b"+(i.pattern||d(i))+"\\b","i").exec(e)&&(i.label||i)})}function i(t){return c(t,function(t,i,a){return t||(i[z]||i[/^[a-z]+(?: +[a-z]+\b)*/i.exec(z)]||RegExp("\\b"+d(a)+"(?:\\b|\\w*\\d)","i").exec(e))&&a})}function a(t){return c(t,function(t,i){return t||RegExp("\\b"+(i.pattern||d(i))+"\\b","i").exec(e)&&(i.label||i)})}function n(t){return c(t,function(t,i){var a=i.pattern||d(i);return!t&&(t=RegExp("\\b"+a+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(t=r(t,a,i.label||i)),t})}function h(t){return c(t,function(t,i){var a=i.pattern||d(i);return!t&&(t=RegExp("\\b"+a+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+a+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(i.label&&!RegExp(a,"i").test(i.label)?i.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),i=i.label||i,t=o(t[0].replace(RegExp(a,"i"),i).replace(RegExp("; *(?:"+i+"[_-])?","i")," ").replace(RegExp("("+i+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function m(t){return c(t,function(t,i){return t||(RegExp(i+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}function b(){return this.description||""}var v=y,g=e&&"object"==typeof e&&"String"!=l(e);g&&(v=e,e=null);var k=v.navigator||{},S=k.userAgent||"";e||(e=S);var O,P,T=g||x==_,M=g?!!k.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(j.toString()),E="Object",A=g?E:"ScriptBridgingProxyObject",I=g?E:"Environment",C=g&&v.java?"JavaPackage":l(v.java),D=g?E:"RuntimeObject",R=/\bJava/.test(C)&&v.java,N=R&&l(v.environment)==I,B=R?"a":"α",L=R?"b":"β",W=v.document||{},H=v.operamini||v.opera,F=w.test(F=g&&H?H["[[Class]]"]:l(H))?F:H=null,U=e,G=[],$=null,q=e==S,V=q&&H&&"function"==typeof H.version&&H.version(),K=t(["Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),X=a(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel",{label:"SRWare Iron",pattern:"Iron"},"K-Meleon","Konqueror","Lunascape","Maxthon","Midori","Nook Browser","PhantomJS","Raven","Rekonq","RockMelt","SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser","Sunrise","Swiftfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),z=h([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nook","PlayBook","PlayStation 4","PlayStation 3","PlayStation Vita","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),J=i({Apple:{iPad:1,iPhone:1,iPod:1},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{"PlayStation 4":1,"PlayStation 3":1,"PlayStation Vita":1}}),Y=n(["Windows Phone ","Android","CentOS","Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(K&&(K=[K]),J&&!z&&(z=h([J])),(O=/\bGoogle TV\b/.exec(z))&&(z=O[0]),/\bSimulator\b/i.test(e)&&(z=(z?z+" ":"")+"Simulator"),"Opera Mini"==X&&/\bOPiOS\b/.test(e)&&G.push("running in Turbo/Uncompressed mode"),/^iP/.test(z)?(X||(X="Safari"),Y="iOS"+((O=/ OS ([\d_]+)/i.exec(e))?" "+O[1].replace(/_/g,"."):"")):"Konqueror"!=X||/buntu/i.test(Y)?J&&"Google"!=J&&(/Chrome/.test(X)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(z))?(X="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):X&&!(O=!/\bMinefield\b|\(Android;/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(X))||(X&&!z&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(O+"/")+8))&&(X=null),(O=z||J||Y)&&(z||J||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(X=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:O)+" Browser")):Y="Kubuntu",(O=/\((Mobile|Tablet).*?Firefox\b/i.exec(e))&&O[1]&&(Y="Firefox OS",z||(z=O[1])),V||(V=m(["(?:Cloud9|CriOS|CrMo|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))","Version",d(X),"(?:Firefox|Minefield|NetFront)"])),"iCab"==K&&parseFloat(V)>3?K=["WebKit"]:"Trident"!=K&&(O=/\bOpera\b/.test(X)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&"WebKit"||!K&&/\bMSIE\b/i.test(e)&&("Mac OS"==Y?"Tasman":"Trident"))?K=[O]:/\bPlayStation\b(?! Vita\b)/i.test(X)&&"WebKit"==K&&(K=["NetFront"]),"IE"==X&&(O=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(X+=" Mobile",Y="Windows Phone "+(/\+$/.test(O)?O:O+".x"),G.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(X="IE Mobile",Y="Windows Phone 8+",G.unshift("desktop mode"),V||(V=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=X&&"Trident"==K&&(O=/\brv:([\d.]+)/.exec(e))?(/\bWPDesktop\b/i.test(e)||(X&&G.push("identifying as "+X+(V?" "+V:"")),X="IE"),V=O[1]):"Chrome"!=X&&"IE"==X||!(O=/\bEdge\/([\d.]+)/.exec(e))||(X="Microsoft Edge",V=O[1],K=["Trident"]),q){if(u(v,"global"))if(R&&(O=R.lang.System,U=O.getProperty("os.arch"),Y=Y||O.getProperty("os.name")+" "+O.getProperty("os.version")),T&&u(v,"system")&&(O=[v.system])[0]){Y||(Y=O[0].os||null);try{O[1]=v.require("ringo/engine").version,V=O[1].join("."),X="RingoJS"}catch(e){O[0].global.system==v.system&&(X="Narwhal")}}else"object"==typeof v.process&&(O=v.process)?(X="Node.js",U=O.arch,Y=O.platform,V=/[\d.]+/.exec(O.version)[0]):N&&(X="Rhino");else l(O=v.runtime)==A?(X="Adobe AIR",Y=O.flash.system.Capabilities.os):l(O=v.phantom)==D?(X="PhantomJS",V=(O=O.version||null)&&O.major+"."+O.minor+"."+O.patch):"number"==typeof W.documentMode&&(O=/\bTrident\/(\d+)/i.exec(e))&&(V=[V,W.documentMode],(O=+O[1]+4)!=V[1]&&(G.push("IE "+V[1]+" mode"),K&&(K[1]=""),V[1]=O),V="IE"==X?String(V[1].toFixed(1)):V[0]);Y=Y&&o(Y)}V&&(O=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(V)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(q&&k.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&($=/b/i.test(O)?"beta":"alpha",V=V.replace(RegExp(O+"\\+?$"),"")+("beta"==$?L:B)+(/\d+\+?/.exec(O)||"")),"Fennec"==X||"Firefox"==X&&/\b(?:Android|Firefox OS)\b/.test(Y)?X="Firefox Mobile":"Maxthon"==X&&V?V=V.replace(/\.[\d.]+/,".x"):"Silk"==X?(/\bMobi/i.test(e)||(Y="Android",G.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&G.unshift("accelerated")):/\bXbox\b/i.test(z)?(Y=null,"Xbox 360"==z&&/\bIEMobile\b/.test(e)&&G.unshift("mobile mode")):!/^(?:Chrome|IE|Opera)$/.test(X)&&(!X||z||/Browser|Mobi/.test(X))||"Windows CE"!=Y&&!/Mobi/i.test(e)?"IE"==X&&q&&null===v.external?G.unshift("platform preview"):(/\bBlackBerry\b/.test(z)||/\bBB10\b/.test(e))&&(O=(RegExp(z.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||V)?(O=[O,/BB10/.test(e)],Y=(O[1]?(z=null,J="BlackBerry"):"Device Software")+" "+O[0],V=null):this!=s&&"Wii"!=z&&(q&&H||/Opera/.test(X)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==X&&/\bOS X (?:\d+\.){2,}/.test(Y)||"IE"==X&&(Y&&!/^Win/.test(Y)&&V>5.5||/\bWindows XP\b/.test(Y)&&V>8||8==V&&!/\bTrident\b/.test(e)))&&!w.test(O=p.call(s,e.replace(w,"")+";"))&&O.name&&(O="ing as "+O.name+((O=O.version)?" "+O:""),w.test(X)?(/\bIE\b/.test(O)&&"Mac OS"==Y&&(Y=null),O="identify"+O):(O="mask"+O,X=F?o(F.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(O)&&(Y=null),q||(V=null)),K=["Presto"],G.push(O)):X+=" Mobile",(O=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(O=[parseFloat(O.replace(/\.(\d)$/,".0$1")),O],"Safari"==X&&"+"==O[1].slice(-1)?(X="WebKit Nightly",$="alpha",V=O[1].slice(0,-1)):V!=O[1]&&V!=(O[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1])||(V=null),O[1]=(/\bChrome\/([\d.]+)/i.exec(e)||0)[1],537.36==O[0]&&537.36==O[2]&&parseFloat(O[1])>=28&&"IE"!=X&&"Microsoft Edge"!=X&&(K=["Blink"]),q&&(M||O[1])?(K&&(K[1]="like Chrome"),O=O[1]||(O=O[0],O<530?1:O<532?2:O<532.05?3:O<533?4:O<534.03?5:O<534.07?6:O<534.1?7:O<534.13?8:O<534.16?9:O<534.24?10:O<534.3?11:O<535.01?12:O<535.02?"13+":O<535.07?15:O<535.11?16:O<535.19?17:O<536.05?18:O<536.1?19:O<537.01?20:O<537.11?"21+":O<537.13?23:O<537.18?24:O<537.24?25:O<537.36?26:"Blink"!=K?"27":"28")):(K&&(K[1]="like Safari"),O=O[0],O=O<400?1:O<500?2:O<526?3:O<533?4:O<534?"4+":O<535?5:O<537?6:O<538?7:O<601?8:"8"),K&&(K[1]+=" "+(O+="number"==typeof O?".x":/[.+]/.test(O)?"":"+")),"Safari"==X&&(!V||parseInt(V)>45)&&(V=O)),"Opera"==X&&(O=/\bzbov|zvav$/.exec(Y))?(X+=" ",G.unshift("desktop mode"),"zvav"==O?(X+="Mini",V=null):X+="Mobile",Y=Y.replace(RegExp(" *"+O+"$"),"")):"Safari"==X&&/\bChrome\b/.exec(K&&K[1])&&(G.unshift("desktop mode"),X="Chrome Mobile",V=null,/\bOS X\b/.test(Y)?(J="Apple",Y="iOS 4.3+"):Y=null),V&&0==V.indexOf(O=/[\d.]+$/.exec(Y))&&e.indexOf("/"+O+"-")>-1&&(Y=f(Y.replace(O,""))),K&&!/\b(?:Avant|Nook)\b/.test(X)&&(/Browser|Lunascape|Maxthon/.test(X)||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(X)&&K[1])&&(O=K[K.length-1])&&G.push(O),G.length&&(G=["("+G.join("; ")+")"]),J&&z&&z.indexOf(J)<0&&G.push("on "+J),z&&G.push((/^on /.test(G[G.length-1])?"":"on ")+z),Y&&(O=/ ([\d.+]+)$/.exec(Y),P=O&&"/"==Y.charAt(Y.length-O[0].length-1),Y={architecture:32,family:O&&!P?Y.replace(O[0],""):Y,version:O?O[1]:null,toString:function(){var e=this.version;return this.family+(e&&!P?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(O=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(U))&&!/\bi686\b/i.test(U)&&(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+O),"")),X&&(/\bWOW64\b/i.test(e)||q&&/\w(?:86|32)$/.test(k.cpuClass||k.platform)&&!/\bWin64; x64\b/i.test(e))&&G.unshift("32-bit")),e||(e=null);var Z={};return Z.description=e,Z.layout=K&&K[0],Z.manufacturer=J,Z.name=X,Z.prerelease=$,Z.product=z,Z.ua=e,Z.version=X&&V,Z.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Z.parse=p,Z.toString=b,Z.version&&G.unshift(V),Z.name&&G.unshift(X),Y&&X&&(Y!=String(Y).split(" ")[0]||Y!=X.split(" ")[0]&&!z)&&G.push(z?"("+Y+")":"on "+Y),G.length&&(Z.description=G.join(" ")),Z}var h={function:!0,object:!0},y=h[typeof window]&&window||this,_=y,m=h[typeof i]&&i,b=h[typeof t]&&t&&!t.nodeType&&t,v=m&&b&&"object"==typeof e&&e;!v||v.global!==v&&v.window!==v&&v.self!==v||(y=v);var g=Math.pow(2,53)-1,w=/\bOpera/,x=this,k=Object.prototype,S=k.hasOwnProperty,j=k.toString;"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return p()}):m&&b?s(p(),function(e,t){m[t]=e}):y.platform=p()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],30:[function(e,t,i){"use strict";var a=e("./stringify"),r=e("./parse");t.exports={stringify:a,parse:r}},{"./parse":31,"./stringify":32}],31:[function(e,t,i){"use strict";var a=e("./utils"),r=Object.prototype.hasOwnProperty,n={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1,decoder:a.decode},o=function(e,t){for(var i={},a=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),n=0;n<a.length;++n){var o,s,l=a[n],u=l.indexOf("]=")===-1?l.indexOf("="):l.indexOf("]=")+1;u===-1?(o=t.decoder(l),s=t.strictNullHandling?null:""):(o=t.decoder(l.slice(0,u)),s=t.decoder(l.slice(u+1))),r.call(i,o)?i[o]=[].concat(i[o]).concat(s):i[o]=s}return i},s=function e(t,i,a){if(!t.length)return i;var r,n=t.shift();if("[]"===n)r=[],r=r.concat(e(t,i,a));else{r=a.plainObjects?Object.create(null):{};var o="["===n[0]&&"]"===n[n.length-1]?n.slice(1,n.length-1):n,s=parseInt(o,10);!isNaN(s)&&n!==o&&String(s)===o&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(r=[],r[s]=e(t,i,a)):r[o]=e(t,i,a)}return r},l=function(e,t,i){if(e){var a=i.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,n=/^([^\[\]]*)/,o=/(\[[^\[\]]*\])/g,l=n.exec(a),u=[];if(l[1]){if(!i.plainObjects&&r.call(Object.prototype,l[1])&&!i.allowPrototypes)return;u.push(l[1])}for(var d=0;null!==(l=o.exec(a))&&d<i.depth;)d+=1,(i.plainObjects||!r.call(Object.prototype,l[1].replace(/\[|\]/g,""))||i.allowPrototypes)&&u.push(l[1]);return l&&u.push("["+a.slice(l.index)+"]"),s(u,t,i)}};t.exports=function(e,t){var i=t||{};if(null!==i.decoder&&void 0!==i.decoder&&"function"!=typeof i.decoder)throw new TypeError("Decoder has to be a function.");if(i.delimiter="string"==typeof i.delimiter||a.isRegExp(i.delimiter)?i.delimiter:n.delimiter,i.depth="number"==typeof i.depth?i.depth:n.depth,i.arrayLimit="number"==typeof i.arrayLimit?i.arrayLimit:n.arrayLimit,i.parseArrays=i.parseArrays!==!1,i.decoder="function"==typeof i.decoder?i.decoder:n.decoder,i.allowDots="boolean"==typeof i.allowDots?i.allowDots:n.allowDots,i.plainObjects="boolean"==typeof i.plainObjects?i.plainObjects:n.plainObjects,i.allowPrototypes="boolean"==typeof i.allowPrototypes?i.allowPrototypes:n.allowPrototypes,i.parameterLimit="number"==typeof i.parameterLimit?i.parameterLimit:n.parameterLimit,i.strictNullHandling="boolean"==typeof i.strictNullHandling?i.strictNullHandling:n.strictNullHandling,""===e||null===e||"undefined"==typeof e)return i.plainObjects?Object.create(null):{};for(var r="string"==typeof e?o(e,i):e,s=i.plainObjects?Object.create(null):{},u=Object.keys(r),d=0;d<u.length;++d){var c=u[d],f=l(c,r[c],i);s=a.merge(s,f,i)}return a.compact(s)}},{"./utils":33}],32:[function(e,t,i){"use strict";var a=e("./utils"),r={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},n={delimiter:"&",strictNullHandling:!1,skipNulls:!1,encode:!0,encoder:a.encode},o=function e(t,i,r,n,o,s,l,u,d){var c=t;if("function"==typeof l)c=l(i,c);else if(c instanceof Date)c=c.toISOString();else if(null===c){if(n)return s?s(i):i;c=""}if("string"==typeof c||"number"==typeof c||"boolean"==typeof c||a.isBuffer(c))return s?[s(i)+"="+s(c)]:[i+"="+String(c)];var f=[];if("undefined"==typeof c)return f;var p;if(Array.isArray(l))p=l;else{var h=Object.keys(c);p=u?h.sort(u):h}for(var y=0;y<p.length;++y){var _=p[y];o&&null===c[_]||(f=Array.isArray(c)?f.concat(e(c[_],r(i,_),r,n,o,s,l,u,d)):f.concat(e(c[_],i+(d?"."+_:"["+_+"]"),r,n,o,s,l,u,d)))}return f};t.exports=function(e,t){var i,a,s=e,l=t||{},u="undefined"==typeof l.delimiter?n.delimiter:l.delimiter,d="boolean"==typeof l.strictNullHandling?l.strictNullHandling:n.strictNullHandling,c="boolean"==typeof l.skipNulls?l.skipNulls:n.skipNulls,f="boolean"==typeof l.encode?l.encode:n.encode,p=f?"function"==typeof l.encoder?l.encoder:n.encoder:null,h="function"==typeof l.sort?l.sort:null,y="undefined"!=typeof l.allowDots&&l.allowDots;if(null!==l.encoder&&void 0!==l.encoder&&"function"!=typeof l.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof l.filter?(a=l.filter,s=a("",s)):Array.isArray(l.filter)&&(i=a=l.filter);var _=[];if("object"!=typeof s||null===s)return"";var m;m=l.arrayFormat in r?l.arrayFormat:"indices"in l?l.indices?"indices":"repeat":"indices";var b=r[m];i||(i=Object.keys(s)),h&&i.sort(h);for(var v=0;v<i.length;++v){var g=i[v];c&&null===s[g]||(_=_.concat(o(s[g],g,b,d,c,p,a,h,y)))}return _.join(u)}},{"./utils":33}],33:[function(e,t,i){"use strict";var a=function(){for(var e=new Array(256),t=0;t<256;++t)e[t]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}();i.arrayToObject=function(e,t){for(var i=t.plainObjects?Object.create(null):{},a=0;a<e.length;++a)"undefined"!=typeof e[a]&&(i[a]=e[a]);return i},i.merge=function(e,t,a){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var r=e;return Array.isArray(e)&&!Array.isArray(t)&&(r=i.arrayToObject(e,a)),Object.keys(t).reduce(function(e,r){var n=t[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=i.merge(e[r],n,a):e[r]=n,e},r)},i.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},i.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),i="",r=0;r<t.length;++r){var n=t.charCodeAt(r);45===n||46===n||95===n||126===n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?i+=t.charAt(r):n<128?i+=a[n]:n<2048?i+=a[192|n>>6]+a[128|63&n]:n<55296||n>=57344?i+=a[224|n>>12]+a[128|n>>6&63]+a[128|63&n]:(r+=1,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),i+=a[240|n>>18]+a[128|n>>12&63]+a[128|n>>6&63]+a[128|63&n])}return i},i.compact=function(e,t){if("object"!=typeof e||null===e)return e;var a=t||[],r=a.indexOf(e);if(r!==-1)return a[r];if(a.push(e),Array.isArray(e)){for(var n=[],o=0;o<e.length;++o)e[o]&&"object"==typeof e[o]?n.push(i.compact(e[o],a)):"undefined"!=typeof e[o]&&n.push(e[o]);return n}for(var s=Object.keys(e),l=0;l<s.length;++l){var u=s[l];e[u]=i.compact(e[u],a)}return e},i.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},i.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}]},{},[11]);
{
"name": "mux-embed",
"version": "2.0.21",
"version": "2.0.22",
"author": "Mux, Inc",
"description": "Mux Javascript SDK and HTML5 Video element monitor",
"main": "dist/mux.js",
"main": "dist/mux-standalone.js",
"scripts": {

@@ -14,6 +14,12 @@ "nsp": "nsp check",

"build": "npm-run-all nsp clean lint test mkdirs build:browserify build:bannerize build:uglify build:dist",
"build:bannerize": "bannerize build/mux.debug.js --banner=scripts/banner.ejs",
"build:browserify": "browserify lib/mux.js -o build/mux.debug.js",
"build:uglify": "uglifyjs build/mux.debug.js --comments --mangle --compress -o build/mux.js",
"build:dist": "cp build/mux.js dist/mux.js",
"build:bannerize": "npm-run-all -p build:bannerize:standard build:bannerize:npm",
"build:bannerize:standard": "bannerize build/mux.debug.js --banner=scripts/banner.ejs",
"build:bannerize:npm": "bannerize build/mux-standalone.debug.js --banner=scripts/banner.ejs",
"build:browserify": "npm-run-all -p build:browserify:standard build:browserify:npm",
"build:browserify:standard": "browserify lib/mux.js -o build/mux.debug.js",
"build:browserify:npm": "browserify lib/mux.js --standalone mux -o build/mux-standalone.debug.js",
"build:uglify": "npm-run-all -p build:uglify:standard build:uglify:npm",
"build:uglify:standard": "uglifyjs build/mux.debug.js --comments --mangle --compress -o build/mux.js",
"build:uglify:npm": "uglifyjs build/mux-standalone.debug.js --comments --mangle --compress -o build/mux-standalone.js",
"build:dist": "cp build/mux.js dist/mux.js; cp build/mux-standalone.js dist/mux-standalone.js",
"start": "npm run mkdirs && npm-run-all -p start:server start:karma start:watch:test start:watch:lib",

@@ -20,0 +26,0 @@ "start:server": "babel-node scripts/server.js",

# Mux Embed
The core Mux Javascript SDK and HTML5 Video Element tracker.
## Using
Install the package:
`npm install mux-embed`
Include mux-embed where needed:
`import mux from 'mux-embed';`
## Using directly in an HTML page
The above directions are for including within an NPM project. If, however, you want to include the script file directly in a website, make sure that you use the `/node_modules/mux-embed/dist/mux.js` file in your `<script>` tag.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc