ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? PK\9+J J wp-emoji-loader.min.jsnu[/*! This file is auto-generated */ const a=JSON.parse(document.getElementById("wp-emoji-settings").textContent),o=(window._wpemojiSettings=a,"wpEmojiSettingsSupports"),s=["flag","emoji"];function i(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function c(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0);const a=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data);return t.every((e,t)=>e===a[t])}function p(e,t){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var n=e.getImageData(16,16,1,1);for(let e=0;e{s[e]=t(o,e,n,a)}),s}function r(e){var t=document.createElement("script");t.src=e,t.defer=!0,document.head.appendChild(t)}a.supports={everything:!0,everythingExceptFlag:!0},new Promise(t=>{let n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf(){i(n=e.data),r.terminate(),t(n)})}catch(e){}i(n=f(s,u,c,p))}t(n)}).then(e=>{for(const n in e)a.supports[n]=e[n],a.supports.everything=a.supports.everything&&a.supports[n],"flag"!==n&&(a.supports.everythingExceptFlag=a.supports.everythingExceptFlag&&a.supports[n]);var t;a.supports.everythingExceptFlag=a.supports.everythingExceptFlag&&!a.supports.flag,a.supports.everything||((t=a.source||{}).concatemoji?r(t.concatemoji):t.wpemoji&&t.twemoji&&(r(t.twemoji),r(t.wpemoji)))});PK\i/]] heartbeat.jsnu[/** * Heartbeat API * * Heartbeat is a simple server polling API that sends XHR requests to * the server every 15 - 60 seconds and triggers events (or callbacks) upon * receiving data. Currently these 'ticks' handle transports for post locking, * login-expiration warnings, autosave, and related tasks while a user is logged in. * * Available PHP filters (in ajax-actions.php): * - heartbeat_received * - heartbeat_send * - heartbeat_tick * - heartbeat_nopriv_received * - heartbeat_nopriv_send * - heartbeat_nopriv_tick * @see wp_ajax_nopriv_heartbeat(), wp_ajax_heartbeat() * * Custom jQuery events: * - heartbeat-send * - heartbeat-tick * - heartbeat-error * - heartbeat-connection-lost * - heartbeat-connection-restored * - heartbeat-nonces-expired * * @since 3.6.0 * @output wp-includes/js/heartbeat.js */ ( function( $, window, undefined ) { /** * Constructs the Heartbeat API. * * @since 3.6.0 * * @return {Object} An instance of the Heartbeat class. * @constructor */ var Heartbeat = function() { var $document = $(document), settings = { // Suspend/resume. suspend: false, // Whether suspending is enabled. suspendEnabled: true, // Current screen id, defaults to the JS global 'pagenow' when present // (in the admin) or 'front'. screenId: '', // XHR request URL, defaults to the JS global 'ajaxurl' when present. url: '', // Timestamp, start of the last connection request. lastTick: 0, // Container for the enqueued items. queue: {}, // Connect interval (in seconds). mainInterval: 60, // Used when the interval is set to 5 seconds temporarily. tempInterval: 0, // Used when the interval is reset. originalInterval: 0, // Used to limit the number of Ajax requests. minimalInterval: 0, // Used together with tempInterval. countdown: 0, // Whether a connection is currently in progress. connecting: false, // Whether a connection error occurred. connectionError: false, // Used to track non-critical errors. errorcount: 0, // Whether at least one connection has been completed successfully. hasConnected: false, // Whether the current browser window is in focus and the user is active. hasFocus: true, // Timestamp, last time the user was active. Checked every 30 seconds. userActivity: 0, // Flag whether events tracking user activity were set. userActivityEvents: false, // Timer that keeps track of how long a user has focus. checkFocusTimer: 0, // Timer that keeps track of how long needs to be waited before connecting to // the server again. beatTimer: 0 }; /** * Sets local variables and events, then starts the heartbeat. * * @since 3.8.0 * @access private * * @return {void} */ function initialize() { var options, hidden, visibilityState, visibilitychange; if ( typeof window.pagenow === 'string' ) { settings.screenId = window.pagenow; } if ( typeof window.ajaxurl === 'string' ) { settings.url = window.ajaxurl; } // Pull in options passed from PHP. if ( typeof window.heartbeatSettings === 'object' ) { options = window.heartbeatSettings; // The XHR URL can be passed as option when window.ajaxurl is not set. if ( ! settings.url && options.ajaxurl ) { settings.url = options.ajaxurl; } /* * Logic check: the interval can be from 1 to 3600 seconds and can be set temporarily * to 5 seconds. It can be set in the initial options or changed later from JS * or from PHP through the AJAX responses. */ if ( options.interval ) { settings.mainInterval = options.interval; if ( settings.mainInterval < 1 ) { settings.mainInterval = 1; } else if ( settings.mainInterval > 3600 ) { settings.mainInterval = 3600; } } /* * Used to limit the number of Ajax requests. Overrides all other intervals * if they are shorter. Needed for some hosts that cannot handle frequent requests * and the user may exceed the allocated server CPU time, etc. The minimal interval * can be up to 600 seconds, however setting it to longer than 120 seconds * will limit or disable some of the functionality (like post locks). * Once set at initialization, minimalInterval cannot be changed/overridden. */ if ( options.minimalInterval ) { options.minimalInterval = parseInt( options.minimalInterval, 10 ); settings.minimalInterval = options.minimalInterval > 0 && options.minimalInterval <= 600 ? options.minimalInterval : 0; } if ( settings.minimalInterval && settings.mainInterval < settings.minimalInterval ) { settings.mainInterval = settings.minimalInterval; } // 'screenId' can be added from settings on the front end where the JS global // 'pagenow' is not set. if ( ! settings.screenId ) { settings.screenId = options.screenId || 'front'; } if ( options.suspension === 'disable' ) { settings.suspendEnabled = false; } } // Convert to milliseconds. settings.mainInterval = settings.mainInterval * 1000; settings.originalInterval = settings.mainInterval; if ( settings.minimalInterval ) { settings.minimalInterval = settings.minimalInterval * 1000; } /* * Switch the interval to 120 seconds by using the Page Visibility API. * If the browser doesn't support it (Safari < 7, Android < 4.4, IE < 10), the * interval will be increased to 120 seconds after 5 minutes of mouse and keyboard * inactivity. */ if ( typeof document.hidden !== 'undefined' ) { hidden = 'hidden'; visibilitychange = 'visibilitychange'; visibilityState = 'visibilityState'; } else if ( typeof document.msHidden !== 'undefined' ) { // IE10. hidden = 'msHidden'; visibilitychange = 'msvisibilitychange'; visibilityState = 'msVisibilityState'; } else if ( typeof document.webkitHidden !== 'undefined' ) { // Android. hidden = 'webkitHidden'; visibilitychange = 'webkitvisibilitychange'; visibilityState = 'webkitVisibilityState'; } if ( hidden ) { if ( document[hidden] ) { settings.hasFocus = false; } $document.on( visibilitychange + '.wp-heartbeat', function() { if ( document[visibilityState] === 'hidden' ) { blurred(); window.clearInterval( settings.checkFocusTimer ); } else { focused(); if ( document.hasFocus ) { settings.checkFocusTimer = window.setInterval( checkFocus, 10000 ); } } }); } // Use document.hasFocus() if available. if ( document.hasFocus ) { settings.checkFocusTimer = window.setInterval( checkFocus, 10000 ); } $(window).on( 'pagehide.wp-heartbeat', function() { // Don't connect anymore. suspend(); // Abort the last request if not completed. if ( settings.xhr && settings.xhr.readyState !== 4 ) { settings.xhr.abort(); } }); $(window).on( 'pageshow.wp-heartbeat', /** * Handles pageshow event, specifically when page navigation is restored from back/forward cache. * * @param {jQuery.Event} event * @param {PageTransitionEvent} event.originalEvent */ function ( event ) { if ( event.originalEvent.persisted ) { /* * When page navigation is stored via bfcache (Back/Forward Cache), consider this the same as * if the user had just switched to the tab since the behavior is similar. */ focused(); } } ); // Check for user activity every 30 seconds. window.setInterval( checkUserActivity, 30000 ); // Start one tick after DOM ready. $( function() { settings.lastTick = time(); scheduleNextTick(); }); } /** * Returns the current time according to the browser. * * @since 3.6.0 * @access private * * @return {number} Returns the current time. */ function time() { return (new Date()).getTime(); } /** * Checks if the iframe is from the same origin. * * @since 3.6.0 * @access private * * @return {boolean} Returns whether or not the iframe is from the same origin. */ function isLocalFrame( frame ) { var origin, src = frame.src; /* * Need to compare strings as WebKit doesn't throw JS errors when iframes have * different origin. It throws uncatchable exceptions. */ if ( src && /^https?:\/\//.test( src ) ) { origin = window.location.origin ? window.location.origin : window.location.protocol + '//' + window.location.host; if ( src.indexOf( origin ) !== 0 ) { return false; } } try { if ( frame.contentWindow.document ) { return true; } } catch(e) {} return false; } /** * Checks if the document's focus has changed. * * @since 4.1.0 * @access private * * @return {void} */ function checkFocus() { if ( settings.hasFocus && ! document.hasFocus() ) { blurred(); } else if ( ! settings.hasFocus && document.hasFocus() ) { focused(); } } /** * Sets error state and fires an event on XHR errors or timeout. * * @since 3.8.0 * @access private * * @param {string} error The error type passed from the XHR. * @param {number} status The HTTP status code passed from jqXHR * (200, 404, 500, etc.). * * @return {void} */ function setErrorState( error, status ) { var trigger; if ( error ) { switch ( error ) { case 'abort': // Do nothing. break; case 'timeout': // No response for 30 seconds. trigger = true; break; case 'error': if ( 503 === status && settings.hasConnected ) { trigger = true; break; } /* falls through */ case 'parsererror': case 'empty': case 'unknown': settings.errorcount++; if ( settings.errorcount > 2 && settings.hasConnected ) { trigger = true; } break; } if ( trigger && ! hasConnectionError() ) { settings.connectionError = true; $document.trigger( 'heartbeat-connection-lost', [error, status] ); wp.hooks.doAction( 'heartbeat.connection-lost', error, status ); } } } /** * Clears the error state and fires an event if there is a connection error. * * @since 3.8.0 * @access private * * @return {void} */ function clearErrorState() { // Has connected successfully. settings.hasConnected = true; if ( hasConnectionError() ) { settings.errorcount = 0; settings.connectionError = false; $document.trigger( 'heartbeat-connection-restored' ); wp.hooks.doAction( 'heartbeat.connection-restored' ); } } /** * Gathers the data and connects to the server. * * @since 3.6.0 * @access private * * @return {void} */ function connect() { var ajaxData, heartbeatData; // If the connection to the server is slower than the interval, // heartbeat connects as soon as the previous connection's response is received. if ( settings.connecting || settings.suspend ) { return; } settings.lastTick = time(); heartbeatData = $.extend( {}, settings.queue ); // Clear the data queue. Anything added after this point will be sent on the next tick. settings.queue = {}; $document.trigger( 'heartbeat-send', [ heartbeatData ] ); wp.hooks.doAction( 'heartbeat.send', heartbeatData ); ajaxData = { data: heartbeatData, interval: settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000, _nonce: typeof window.heartbeatSettings === 'object' ? window.heartbeatSettings.nonce : '', action: 'heartbeat', screen_id: settings.screenId, has_focus: settings.hasFocus }; if ( 'customize' === settings.screenId ) { ajaxData.wp_customize = 'on'; } settings.connecting = true; settings.xhr = $.ajax({ url: settings.url, type: 'post', timeout: 30000, // Throw an error if not completed after 30 seconds. data: ajaxData, dataType: 'json' }).always( function() { settings.connecting = false; scheduleNextTick(); }).done( function( response, textStatus, jqXHR ) { var newInterval; if ( ! response ) { setErrorState( 'empty' ); return; } clearErrorState(); if ( response.nonces_expired ) { $document.trigger( 'heartbeat-nonces-expired' ); wp.hooks.doAction( 'heartbeat.nonces-expired' ); } // Change the interval from PHP. if ( response.heartbeat_interval ) { newInterval = response.heartbeat_interval; delete response.heartbeat_interval; } // Update the heartbeat nonce if set. if ( response.heartbeat_nonce && typeof window.heartbeatSettings === 'object' ) { window.heartbeatSettings.nonce = response.heartbeat_nonce; delete response.heartbeat_nonce; } // Update the Rest API nonce if set and wp-api loaded. if ( response.rest_nonce && typeof window.wpApiSettings === 'object' ) { window.wpApiSettings.nonce = response.rest_nonce; // This nonce is required for api-fetch through heartbeat.tick. // delete response.rest_nonce; } $document.trigger( 'heartbeat-tick', [response, textStatus, jqXHR] ); wp.hooks.doAction( 'heartbeat.tick', response, textStatus, jqXHR ); // Do this last. Can trigger the next XHR if connection time > 5 seconds and newInterval == 'fast'. if ( newInterval ) { interval( newInterval ); } }).fail( function( jqXHR, textStatus, error ) { setErrorState( textStatus || 'unknown', jqXHR.status ); $document.trigger( 'heartbeat-error', [jqXHR, textStatus, error] ); wp.hooks.doAction( 'heartbeat.error', jqXHR, textStatus, error ); }); } /** * Schedules the next connection. * * Fires immediately if the connection time is longer than the interval. * * @since 3.8.0 * @access private * * @return {void} */ function scheduleNextTick() { var delta = time() - settings.lastTick, interval = settings.mainInterval; if ( settings.suspend ) { return; } if ( ! settings.hasFocus ) { interval = 120000; // 120 seconds. Post locks expire after 150 seconds. } else if ( settings.countdown > 0 && settings.tempInterval ) { interval = settings.tempInterval; settings.countdown--; if ( settings.countdown < 1 ) { settings.tempInterval = 0; } } if ( settings.minimalInterval && interval < settings.minimalInterval ) { interval = settings.minimalInterval; } window.clearTimeout( settings.beatTimer ); if ( delta < interval ) { settings.beatTimer = window.setTimeout( function() { connect(); }, interval - delta ); } else { connect(); } } /** * Sets the internal state when the browser window becomes hidden or loses focus. * * @since 3.6.0 * @access private * * @return {void} */ function blurred() { settings.hasFocus = false; } /** * Sets the internal state when the browser window becomes visible or is in focus. * * @since 3.6.0 * @access private * * @return {void} */ function focused() { settings.userActivity = time(); // Resume if suspended. resume(); if ( ! settings.hasFocus ) { settings.hasFocus = true; scheduleNextTick(); } } /** * Suspends connecting. */ function suspend() { settings.suspend = true; } /** * Resumes connecting. */ function resume() { settings.suspend = false; } /** * Runs when the user becomes active after a period of inactivity. * * @since 3.6.0 * @access private * * @return {void} */ function userIsActive() { settings.userActivityEvents = false; $document.off( '.wp-heartbeat-active' ); $('iframe').each( function( i, frame ) { if ( isLocalFrame( frame ) ) { $( frame.contentWindow ).off( '.wp-heartbeat-active' ); } }); focused(); } /** * Checks for user activity. * * Runs every 30 seconds. Sets 'hasFocus = true' if user is active and the window * is in the background. Sets 'hasFocus = false' if the user has been inactive * (no mouse or keyboard activity) for 5 minutes even when the window has focus. * * @since 3.8.0 * @access private * * @return {void} */ function checkUserActivity() { var lastActive = settings.userActivity ? time() - settings.userActivity : 0; // Throttle down when no mouse or keyboard activity for 5 minutes. if ( lastActive > 300000 && settings.hasFocus ) { blurred(); } // Suspend after 10 minutes of inactivity when suspending is enabled. // Always suspend after 60 minutes of inactivity. This will release the post lock, etc. if ( ( settings.suspendEnabled && lastActive > 600000 ) || lastActive > 3600000 ) { suspend(); } if ( ! settings.userActivityEvents ) { $document.on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active', function() { userIsActive(); }); $('iframe').each( function( i, frame ) { if ( isLocalFrame( frame ) ) { $( frame.contentWindow ).on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active', function() { userIsActive(); }); } }); settings.userActivityEvents = true; } } // Public methods. /** * Checks whether the window (or any local iframe in it) has focus, or the user * is active. * * @since 3.6.0 * @memberOf wp.heartbeat.prototype * * @return {boolean} True if the window or the user is active. */ function hasFocus() { return settings.hasFocus; } /** * Checks whether there is a connection error. * * @since 3.6.0 * * @memberOf wp.heartbeat.prototype * * @return {boolean} True if a connection error was found. */ function hasConnectionError() { return settings.connectionError; } /** * Connects as soon as possible regardless of 'hasFocus' state. * * Will not open two concurrent connections. If a connection is in progress, * will connect again immediately after the current connection completes. * * @since 3.8.0 * * @memberOf wp.heartbeat.prototype * * @return {void} */ function connectNow() { settings.lastTick = 0; scheduleNextTick(); } /** * Disables suspending. * * Should be used only when Heartbeat is performing critical tasks like * autosave, post-locking, etc. Using this on many screens may overload * the user's hosting account if several browser windows/tabs are left open * for a long time. * * @since 3.8.0 * * @memberOf wp.heartbeat.prototype * * @return {void} */ function disableSuspend() { settings.suspendEnabled = false; } /** * Gets/Sets the interval. * * When setting to 'fast' or 5, the interval is 5 seconds for the next 30 ticks * (for 2 minutes and 30 seconds) by default. In this case the number of 'ticks' * can be passed as second argument. If the window doesn't have focus, * the interval slows down to 2 minutes. * * @since 3.6.0 * * @memberOf wp.heartbeat.prototype * * @param {string|number} speed Interval: 'fast' or integer between 1 and 3600 (seconds). * Fast equals 5. * @param {number} ticks Tells how many ticks before the interval reverts back. * Value must be between 1 and 30. Used with speed = 'fast' or 5. * * @return {number} Current interval in seconds. */ function interval( speed, ticks ) { var newInterval, oldInterval = settings.tempInterval ? settings.tempInterval : settings.mainInterval; if ( speed ) { if ( 'fast' === speed ) { // Special case, see below. newInterval = 5000; } else if ( 'long-polling' === speed ) { // Allow long polling (experimental). settings.mainInterval = 0; return 0; } else { speed = parseInt( speed, 10 ); if ( speed >= 1 && speed <= 3600 ) { newInterval = speed * 1000; } else { newInterval = settings.originalInterval; } } if ( settings.minimalInterval && newInterval < settings.minimalInterval ) { newInterval = settings.minimalInterval; } // Special case, runs for a number of ticks then reverts to the previous interval. if ( 5000 === newInterval ) { ticks = parseInt( ticks, 10 ) || 30; ticks = ticks < 1 || ticks > 30 ? 30 : ticks; settings.countdown = ticks; settings.tempInterval = newInterval; } else { settings.countdown = 0; settings.tempInterval = 0; settings.mainInterval = newInterval; } /* * Change the next connection time if new interval has been set. * Will connect immediately if the time since the last connection * is greater than the new interval. */ if ( newInterval !== oldInterval ) { scheduleNextTick(); } } return settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000; } /** * Enqueues data to send with the next XHR. * * As the data is send asynchronously, this function doesn't return the XHR * response. To see the response, use the custom jQuery event 'heartbeat-tick' * on the document, example: * $(document).on( 'heartbeat-tick.myname', function( event, data, textStatus, jqXHR ) { * // code * }); * If the same 'handle' is used more than once, the data is not overwritten when * the third argument is 'true'. Use `wp.heartbeat.isQueued('handle')` to see if * any data is already queued for that handle. * * @since 3.6.0 * * @memberOf wp.heartbeat.prototype * * @param {string} handle Unique handle for the data, used in PHP to * receive the data. * @param {*} data The data to send. * @param {boolean} noOverwrite Whether to overwrite existing data in the queue. * * @return {boolean} True if the data was queued. */ function enqueue( handle, data, noOverwrite ) { if ( handle ) { if ( noOverwrite && this.isQueued( handle ) ) { return false; } settings.queue[handle] = data; return true; } return false; } /** * Checks if data with a particular handle is queued. * * @since 3.6.0 * * @param {string} handle The handle for the data. * * @return {boolean} True if the data is queued with this handle. */ function isQueued( handle ) { if ( handle ) { return settings.queue.hasOwnProperty( handle ); } } /** * Removes data with a particular handle from the queue. * * @since 3.7.0 * * @memberOf wp.heartbeat.prototype * * @param {string} handle The handle for the data. * * @return {void} */ function dequeue( handle ) { if ( handle ) { delete settings.queue[handle]; } } /** * Gets data that was enqueued with a particular handle. * * @since 3.7.0 * * @memberOf wp.heartbeat.prototype * * @param {string} handle The handle for the data. * * @return {*} The data or undefined. */ function getQueuedItem( handle ) { if ( handle ) { return this.isQueued( handle ) ? settings.queue[handle] : undefined; } } initialize(); // Expose public methods. return { hasFocus: hasFocus, connectNow: connectNow, disableSuspend: disableSuspend, interval: interval, hasConnectionError: hasConnectionError, enqueue: enqueue, dequeue: dequeue, isQueued: isQueued, getQueuedItem: getQueuedItem }; }; /** * Ensure the global `wp` object exists. * * @namespace wp */ window.wp = window.wp || {}; /** * Contains the Heartbeat API. * * @namespace wp.heartbeat * @type {Heartbeat} */ window.wp.heartbeat = new Heartbeat(); }( jQuery, window )); PK\~??wp-ajax-response.jsnu[/** * @output wp-includes/js/wp-ajax-response.js */ /* global wpAjax */ window.wpAjax = jQuery.extend( { unserialize: function( s ) { var r = {}, q, pp, i, p; if ( !s ) { return r; } q = s.split('?'); if ( q[1] ) { s = q[1]; } pp = s.split('&'); for ( i in pp ) { if ( typeof pp.hasOwnProperty === 'function' && !pp.hasOwnProperty(i) ) { continue; } p = pp[i].split('='); r[p[0]] = p[1]; } return r; }, parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission. var parsed = {}, re = jQuery('#' + r).empty(), err = '', noticeMessage = ''; if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) { parsed.responses = []; parsed.errors = false; jQuery('response', x).each( function() { var th = jQuery(this), child = jQuery(this.firstChild), response; response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') }; response.data = jQuery( 'response_data', child ).text(); response.supplemental = {}; if ( !jQuery( 'supplemental', child ).children().each( function() { if ( this.nodeName === 'notice' ) { noticeMessage += jQuery(this).text(); return; } response.supplemental[this.nodeName] = jQuery(this).text(); } ).length ) { response.supplemental = false; } response.errors = []; if ( !jQuery('wp_error', child).each( function() { var code = jQuery(this).attr('code'), anError, errorData, formField; anError = { code: code, message: this.firstChild.nodeValue, data: false }; errorData = jQuery('wp_error_data[code="' + code + '"]', x); if ( errorData ) { anError.data = errorData.get(); } formField = jQuery( 'form-field', errorData ).text(); if ( formField ) { code = formField; } if ( e ) { wpAjax.invalidateForm( jQuery('#' + e + ' :input[name="' + code + '"]' ).parents('.form-field:first') ); } err += '

' + anError.message + '

'; response.errors.push( anError ); parsed.errors = true; } ).length ) { response.errors = false; } parsed.responses.push( response ); } ); if ( err.length ) { re.html( '' ); wp.a11y.speak( err ); } else if ( noticeMessage.length ) { re.html( ''); jQuery(document).trigger( 'wp-updates-notice-added' ); wp.a11y.speak( noticeMessage ); } return parsed; } if ( isNaN( x ) ) { wp.a11y.speak( x ); return ! re.html( '' ); } x = parseInt( x, 10 ); if ( -1 === x ) { wp.a11y.speak( wpAjax.noPerm ); return ! re.html( '' ); } else if ( 0 === x ) { wp.a11y.speak( wpAjax.broken ); return ! re.html( '' ); } return true; }, invalidateForm: function ( selector ) { return jQuery( selector ).addClass( 'form-invalid' ).find('input').one( 'change wp-check-valid-field', function() { jQuery(this).closest('.form-invalid').removeClass( 'form-invalid' ); } ); }, validateForm: function( selector ) { selector = jQuery( selector ); return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() === ''; } ) ).length; } }, wpAjax || { noPerm: 'Sorry, you are not allowed to do that.', broken: 'An error occurred while processing your request. Please refresh the page and try again.' } ); // Basic form validation. jQuery( function($){ $('form.validate').on( 'submit', function() { return wpAjax.validateForm( $(this) ); } ); }); PK\㮙l l thickbox/thickbox.cssnu[#TB_overlay { background: #000; opacity: 0.7; filter: alpha(opacity=70); position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100050; /* Above DFW. */ } #TB_window { position: fixed; background-color: #fff; z-index: 100050; /* Above DFW. */ visibility: hidden; text-align: left; top: 50%; left: 50%; -webkit-box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.3 ); } #TB_window img#TB_Image { display: block; margin: 15px 0 0 15px; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; border-top: 1px solid #666; border-left: 1px solid #666; } #TB_caption{ height: 25px; padding: 7px 30px 10px 25px; float: left; } #TB_closeWindow { height: 25px; padding: 11px 25px 10px 0; float: right; } #TB_closeWindowButton { position: absolute; left: auto; right: 0; width: 29px; height: 29px; border: 0; padding: 0; background: none; cursor: pointer; outline: none; -webkit-transition: color .1s ease-in-out, background .1s ease-in-out; transition: color .1s ease-in-out, background .1s ease-in-out; } #TB_ajaxWindowTitle { float: left; font-weight: 600; line-height: 29px; overflow: hidden; padding: 0 29px 0 10px; text-overflow: ellipsis; white-space: nowrap; width: calc( 100% - 39px ); } #TB_title { background: #fcfcfc; border-bottom: 1px solid #ddd; height: 29px; } #TB_ajaxContent { clear: both; padding: 2px 15px 15px 15px; overflow: auto; text-align: left; line-height: 1.4em; } #TB_ajaxContent.TB_modal { padding: 15px; } #TB_ajaxContent p { padding: 5px 0px 5px 0px; } #TB_load { position: fixed; display: none; z-index: 100050; top: 50%; left: 50%; background-color: #E8E8E8; border: 1px solid #555; margin: -45px 0 0 -125px; padding: 40px 15px 15px; } #TB_HideSelect { z-index: 99; position: fixed; top: 0; left: 0; background-color: #fff; border: none; filter: alpha(opacity=0); opacity: 0; height: 100%; width: 100%; } #TB_iframeContent { clear: both; border: none; } .tb-close-icon { display: block; color: #666; text-align: center; line-height: 29px; width: 29px; height: 29px; position: absolute; top: 0; right: 0; } .tb-close-icon:before { content: "\f158"; content: "\f158" / ''; font: normal 20px/29px dashicons; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #TB_closeWindowButton:hover .tb-close-icon, #TB_closeWindowButton:focus .tb-close-icon { color: #006799; } #TB_closeWindowButton:focus .tb-close-icon { -webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8); box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8); } PK\k;;thickbox/loadingAnimation.gifnu[GIF89a! NETSCAPE2.0! ,DRihlp,tmx| Ȥrl:P'@0ج(E X\zlXifZunYrt|n~Yzd `w^xoE% U ~¶Ʊ̯ϺsҿeշsjF )Łl?J4aÁ'&h1 D%r#Ȑ #0$0#J#I|y0&ɏ4)dYI6;L;y PJLXf 3kT`h{׮U!%kT jmjZs}/Vu-w/Tbv+XqaÈ7X|_^-|€Ϡ=倁ӨQZ[c^eǦ]wtԼ}\pˍ778 {׽?W{֥g Do`# ^A}G ~Gp H`}1߁ Χv`\! )rx%(!. `%:DXA EciJ4d;)VLR@!:ZdY%S)&`x&ij&m#my_:%)ـXԩ@@mꀠ#2 .*飉F褙x 桜R*꟠R香Zjj) `+l`a ,Ų촽.F{.,j-^ .Ǝ, KlZJ/޶Kλ/K믻{ |K/ X 00GļT|/ h "p?{| =61/@$S.|뼾ʓ?~ˏ#[=kG~Vg-/YX'6 { ˰W=sMb ~b gAaa0 L<SM.vp!nN }D?Lx%L,xuOoDF1[zpvjq4+W fG 18c?a&:=t8n ntZt"#Q5.td#-H.F2WtV%WM*IQr2Y:RnX/=x~c1HC"m082zd&Hc>OuE$npU(7=2A'Pp ;Ce(UNԝV,5K-ELU] (i9OP֒1E^H" XͪVծz3`dhMZךZ\!! ,Ldihlp,tmx|A+Ȥrl:&DX-ƴJ,,c*ayU65{iuVV잠sd}rW{\o`y t|vq(kx)u~z)w', D,+)**()ɲë'Ĺ(ձѽ&&ٰ%&A, p@PA pEA 8ྈ.lE 28"ICU$D9eɏ,ErL1f)m9fG4i.,HEg'Xx:*ZJU [v5-[dpkDܷ'r*lִ*5W-_".!B&Q8dX5bb9`4,>iԞAv=*T´m)t^vn٭h嵍GDqWWq8 ɹ/~sѱ|ܣ(@@8hϢ~ I~}ՙ`%, x߃7 BH " 0Ha}v)lh83FXc%袊D`A-,耐CYAI+i$?RYPf$ Vɣ"%\:ejBXh& E>[)f#Ly uv)hg!~y#9g^tYܩ.6`iDbk*難Rǩ)F) V*eJ:+6jl.[ D W$"p,H ih*H;mfm~n徛.` 䚋+n ڛB0( .6 m&{S ̋1 䍋1 @Op3.Ls0}< tl4 ?|tN\4HO}B^J[]rI?m ,Mk`#k u,t1xM2|+W,Ȃ}[3k.Sy cQg92n:B6^65ֶk u>|WN{ 76og\ǣG={%x=mܫ/1oݿ=_ǿS8oz Lۧ,y>{{'rx3Hɐ#! 9I2a 쭬pyK\3n<]@:m.RէѾ$ * Jo_? D>~)\¡2֩Jq-+{& qD.'馭;Ξ֗K KG$>>z388#"3, K K GG>>ƹ;@}# =~䵫V\(q~%D N,A3P4%2Ui摜>}N6 P1BuIVG<*iMD}xY'֯=N% 2`9+]N>{D.a>+±À ~7q} wV؇eј= |9r8NC!гg zpkگK ‷ 4XEq3D9NjK/>qҩ/!=zCg9G7`!DqPXDsQuxąj&+ (fȠu,H.Zhud=8a)]K\OC*Bf9u.4$8crI@酙Txe^fgi!掇 jf iJ& v` .$Ĩ Ҋ*.ꭹk>+ڊ$L;k>JKv+ˢ.؎.Blzz&P.K; //<p.|1 KkS3 wl2 *v,)ӯb*=}j/w~Nyˌ?￷3揀_1f~T  (AEPt Y2muK=q^=݅_[XЅ%dC0UطְKF> 1^7)Fsx?T61zaDnuZDȨmC׶fz\H-3ݮBP!^$=J&lGօ(3ѕL+e5rR"IKl2l\/s5$ri %Ij@ڐ$r vf'Lbf,f5)Nd)4*Qy3>\:}3\Q;aɹ^g;멹Zp ' I8Ne{"Dȉ0ShEYl5DhⰡJ8Ҍ* eAN%?x~=OT555 ƄԦ:PTJժZXͪVU* %] XJֲhMZ! ,Ldihlp,tmx|﫣pH,ȤrtAZX i  ŕRUW 5ᵪE_c{/ysmu)ix[}pbz|Uwr{n+t')j1, ,+'**())ɫ&Ͻ%(ǹ'۷-A* ,ǂ?O_ װA U0$⿉:Da0F"-&1Ƒ'J\H~iD){̩&Lh"ESOJRf]u\6zve@ںs5WkԴ@-Aw0`vW 낁e0@),.c~ygKysϫ'.tM'D6IFm*N;Y Mܷݵ{69貱;FWX_Pˣ`_`{? Ⳡ~{@}|'w"V{`)(X(dzImx"|$&"/+*`#ӂ4hcf͸8(b==p#i LycrBVn Hb,<\:y馗k9 e‰_>h D!e9 %(H6ʣ()~.z)X('zvxsj蔈Bj*jBZ*록j+ ,V  .`wlӦ:;l,$k-BK .@+m^m ۮm«BR p(nn2̭ྛ# k/&Lqz;OuΜ~:tm з>|[>;{}CgO]O>߽:yI[^]KS 8?R0kdZo7 &KdL`B2sdwWB^0~^0?Y~ ֱ" نh"0HdD=Q\wD# 8_-Vw[I 56{XA;jNpG9 O~]fF.{[:I2zx[3?>g=IPnq#%*wJKO\`(q,d =q%!:Fё#1e&j4_KDJS{&-7n%7/6pB~-,)OM*MyO63 2LjS0PLB|hzЅ:pEf6#Q7R2ڳJ'},9ŕrQy̘/բKU9E𝲧Jqәtc*.Lk6բu*/ R^T}Tdnի]( i&hMZֶ& fm\J׺u`B! , PLdihlp,tmx|醙pH,Ȥrɜ8H( BDvѐNW֖|'V VzW%S0]5buez)m}-yj v~*s(wx`Y'|'%%, ,+$**())ΰý±Ķ('ݪڼ,O ,T/ߊ}N\!P=*p`A}VtcB -v< zH)$j & &S4$82bɖ:$(& 6Uhl:銫XJլPU bSVs[,ݭj_Vݎ \xB޴Q% kF`, >ɊΞ^!iU,P=tγY׆}jڮmz֯5[wU07s=tɱ/\o(Coh+ /ЀUaЖݡ_}ʕ,M$_ 7 8߂!|fX JH ȡ&8X !28 "a]:0 hB9#cԈ/#$ ='BE:pdE MX&) T$M~cYf$N[rg駚3bM:a[4p(A:!h{IBB)=vzߧN# jꪱ6Zi bz+"+,h :v, y ²: m&؎+m*Ϯmߞ{m%n+/.$m  Sko{0 0P13K+L22:O-{|, +|2)k3 27s/Jʹ8?3YW\p m_0Z.q 0^O-qet,7}8pn BRnӊ\3(`u!Mu$lӍNШzױ^Ԟ /mk9>շ;޻ۻS~nOV|Oا}ף-^>?ϽOݺ_m~ӟ,/]gdF<]+c] ρà6 u1궃ZDd2oe EcQZwn#ֲ.sLb+(>X|XEԋ.iS)PijwTl GGя&r-h09ՁVL*AP"QmXJֲhMZֶpk@! ,`HSihlp,tmx|AȤrl:ШCuAG+ht`xY_]>aWvk_,dfopikm}**zr)yl|(t/ %T r.. V-,ýǠ'Ƹ+*(ֿ+*,-߰)A)[U .#Dh"Z ` }Xذ`hq_F0P#CE4Y1%F+(Đ_͘8]yRdϋ$L@A ~) OYDm0ՅUTSl*ְ(f]u hOu+V*]m㚀Y|6{"0zKf;8UkױY&0p bUiC?͢'vtj٫is~"lһmVzEmL)|npUup罉6)jc_} PkY/=*~}G-ހ`~g߃),ȟ Q!~'`!+|(:E Q.N., =xD#@I;࣍Cd/FV$L9ERi% ^&–f Sy($PH5 &rhbc  KRbJ9OBz ʧ6'F䧫z%=飝"jj((pYR-(> @Ǻ`m -,| r ffA P/ j׺B0v[-2 Gnh@$p~%[̲ zr ܱo 1ܲ˼|(q> L#})EK =c)۲le/ NM=q2c'M=8߁m54cLp'R3.M z4}&yԜ;Z@[:w.۩Km{[;W>tx7ߗ7/K?Уn} /?x;;}OomL4[. isTvux[{}bm,o~gk+_w* W B,ƾ¶ǿ+ïʵռ*f)(ꗄ"#FEE (:!C&`ď"-flh#ʔ Is hQ0e>TcѝYX$ %ׯ&aѠlY1`Ӧ ۷gèv슷h oz%pm{໅7fx1Ǝqȗ1? 3qՀv1Mvm] ^m ͻ…/7䶗3-3u;~=wvǹg/ۿg>=/`kN i8 +x  a& *8 NH!a !*(!Ņ6'b?Ȣ>n\ओV8E' Y'qRy[va٧zyP4D*(Mb9Cr6 % Yn@*Tzډ>)*ꨩ©k Z뮷 kJ6ʯ(` (p .[  v;/./z |n| c[&ROL131 {01 _[ .njL3 ¼ 3w8L6"9-t/ tS?Mt;BVtZg[x?5_omtYǝ<2)g|0|2 0>8!}8K~9 ;8*~/z>:}hnL^Jov c]Í+{ '^خ>TcˢߋXٖ.0ys=?%0˿' m8Z|[8#,n@+B 0|"8lT!XX=0#|<0>a ]ݏst 8""Sb.'j̀ [ fEa[Wx1mI1\XTleB)#XF=fx#G[4 Y1<$/&{$#1EN2b|%A9GRaqĖE:)s7W.Ww0)K~sc´%+KqrafRԛXl6ώ֤Pkyڌ7׽|B& kӛ^7Yw:WK\#3y]elf7q2-EX} (G+l+a&pQltd'KɗS)җW7~vW1}晣G>{O~|wG]~&_Y})Gw1M)*PH(! Zj)x"N0 %^(4Rb ᘣ(B(-"yD ,%d6" O˜W 6p"Ș9`& bI—Pg gXYw#%s:a9%PX虖J)@ ,Х ")0 @~%Ċ +:+ **Z+"++zl ,({FZ[-b[..j-$0޻켼Po# 쯸׻pp0#<c 1 GL2\B1&k0.Rln6 mn9=Z-+CC\4G{Z_:nc8ׇ=ۏy 3oo7> x>ݏ֘ ;AvjުX/  (.zs 8AHA" %5\{` W1뱏r"ĸ){X?(qqBlbCubGǵ;<40ie ZFrl#zC1{HVPp[b6.zT"iE*iDd*IjS$>YPJыӣ 8HحQ\wlrKYޒh[+VG*j$;v8O!,jNΚ&#jS{LYiW 0L c;O"s\f_@~ 4.τvp=!: qst8hIsJ8dF14si/RBҥu@Ӛ8ͩNw@ PJT%;PK\c ^^thickbox/macFFBgHack.pngnu[PNG  IHDRc%IDATH! _jM H$D"H_,!ZIENDB`PK\S44thickbox/thickbox.jsnu[/* * Thickbox 3.1 - One Box To Rule Them All. * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ if ( typeof tb_pathToImage != 'string' ) { var tb_pathToImage = thickboxL10n.loadingAnimation; } /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ //on page load call tb_init jQuery(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox imgLoader = new Image();// preload image imgLoader.src = tb_pathToImage; }); /* * Add thickbox to href & area elements that have a class of .thickbox. * Remove the loading indicator when content in an iframe has loaded. */ function tb_init(domChunk){ jQuery( 'body' ) .on( 'click', domChunk, tb_click ) .on( 'thickbox:iframe:loaded', function() { jQuery( '#TB_window' ).removeClass( 'thickbox-loading' ); }); } function tb_click(){ var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t,a,g); this.blur(); return false; } function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link var $closeBtn; try { if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 jQuery("body","html").css({height: "100%", width: "100%"}); jQuery("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 jQuery("body").append("
"); jQuery("#TB_overlay").on( 'click', tb_remove ); } }else{//all others if(document.getElementById("TB_overlay") === null){ jQuery("body").append("
"); jQuery("#TB_overlay").on( 'click', tb_remove ); jQuery( 'body' ).addClass( 'modal-open' ); } } if(tb_detectMacXFF()){ jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } if(caption===null){caption="";} jQuery("body").append("
");//add loader to the page jQuery('#TB_load').show();//show loader var baseURL; if(url.indexOf("?")!==-1){ //ff there is a query string involved baseURL = url.substr(0, url.indexOf("?")); }else{ baseURL = url; } var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$|\.avif$/; var urlType = baseURL.toLowerCase().match(urlString); if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp' || urlType == '.webp' || urlType == '.avif' ){//code to show images TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if(imageGroup){ TB_TempArray = jQuery("a[rel="+imageGroup+"]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = "  "+thickboxL10n.next+""; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "  "+thickboxL10n.prev+""; } } else { TB_FoundURL = true; TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length); } } } imgPreloader = new Image(); imgPreloader.onload = function(){ imgPreloader.onload = null; // Resizing large images - original by Christian Montoya edited by me. var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; } } else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } // End Resizing TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"); jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if (!(TB_PrevHTML === "")) { function goPrev(){ if(jQuery(document).off("click",goPrev)){jQuery(document).off("click",goPrev);} jQuery("#TB_window").remove(); jQuery("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } jQuery("#TB_prev").on( 'click', goPrev ); } if (!(TB_NextHTML === "")) { function goNext(){ jQuery("#TB_window").remove(); jQuery("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } jQuery("#TB_next").on( 'click', goNext ); } jQuery(document).on('keydown.thickbox', function(e){ if ( e.which == 27 ){ // close tb_remove(); } else if ( e.which == 190 ){ // display previous image if(!(TB_NextHTML == "")){ jQuery(document).off('thickbox'); goNext(); } } else if ( e.which == 188 ){ // display next image if(!(TB_PrevHTML == "")){ jQuery(document).off('thickbox'); goPrev(); } } return false; }); tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_ImageOff").on( 'click', tb_remove ); jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show }; imgPreloader.src = url; }else{//code to show html var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no parameters were added to URL TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no parameters were added to URL ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); jQuery("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal jQuery("#TB_window").append("
"+caption+"
"); }else{//iframe modal jQuery("#TB_overlay").off(); jQuery("#TB_window").append(""); } }else{// not an iframe, ajax if(jQuery("#TB_window").css("visibility") != "visible"){ if(params['modal'] != "true"){//ajax no modal jQuery("#TB_window").append("
"+caption+"
"); }else{//ajax modal jQuery("#TB_overlay").off(); jQuery("#TB_window").append("
"); } }else{//this means the window is already up, we are just loading new content via ajax jQuery("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; jQuery("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; jQuery("#TB_ajaxContent")[0].scrollTop = 0; jQuery("#TB_ajaxWindowTitle").html(caption); } } jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if(url.indexOf('TB_inline') != -1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); jQuery("#TB_window").on('tb_unload', function () { jQuery('#' + params['inlineId']).append( jQuery("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}); }else{ var load_url = url; load_url += -1 === url.indexOf('?') ? '?' : '&'; jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){//to do a post change this load method tb_position(); jQuery("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); jQuery("#TB_window").css({'visibility':'visible'}); }); } } if(!params['modal']){ jQuery(document).on('keydown.thickbox', function(e){ if ( e.which == 27 ){ // close tb_remove(); return false; } }); } $closeBtn = jQuery( '#TB_closeWindowButton' ); /* * If the native Close button icon is visible, move focus on the button * (e.g. in the Network Admin Themes screen). * In other admin screens is hidden and replaced by a different icon. */ if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) { $closeBtn.trigger( 'focus' ); } } catch(e) { //nothing here } } //helper functions below function tb_showIframe(){ jQuery("#TB_load").remove(); jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' ); } function tb_remove() { jQuery("#TB_imageOff").off("click"); jQuery("#TB_closeWindowButton").off("click"); jQuery( '#TB_window' ).fadeOut( 'fast', function() { jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).off().remove(); jQuery( 'body' ).trigger( 'thickbox:removed' ); }); jQuery( 'body' ).removeClass( 'modal-open' ); jQuery("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 jQuery("body","html").css({height: "auto", width: "auto"}); jQuery("html").css("overflow",""); } jQuery(document).off('.thickbox'); return false; } function tb_position() { var isIE6 = typeof document.body.style.maxHeight === "undefined"; jQuery("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if ( ! isIE6 ) { // take away IE6 jQuery("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); } } function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;}// return empty object var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) {continue;} var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function tb_getPageSize(){ var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = [w,h]; return arrayPageSize; } function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true; } } PK\$  customize-views.min.jsnu[/*! This file is auto-generated */ !function(i,e,o){var t;e&&e.customize&&((t=e.customize).HeaderTool.CurrentView=e.Backbone.View.extend({template:e.template("header-current"),initialize:function(){this.listenTo(this.model,"change",this.render),this.render()},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.setButtons(),this},setButtons:function(){var e=i("#customize-control-header_image .actions .remove"),t=i("#customize-control-header_image .actions .new");this.model.get("choice")?(e.show(),t.removeClass("upload-button")):(e.hide(),t.addClass("upload-button"))}}),t.HeaderTool.ChoiceView=e.Backbone.View.extend({template:e.template("header-choice"),className:"header-view",events:{"click .choice,.random":"select","click .close":"removeImage"},initialize:function(){var e=[this.model.get("header").url,this.model.get("choice")];this.listenTo(this.model,"change:selected",this.toggleSelected),o.contains(e,t.get().header_image)&&t.HeaderTool.currentHeader.set(this.extendedModel())},render:function(){return this.$el.html(this.template(this.extendedModel())),this.toggleSelected(),this},toggleSelected:function(){this.$el.toggleClass("selected",this.model.get("selected"))},extendedModel:function(){var e=this.model.get("collection");return o.extend(this.model.toJSON(),{type:e.type})},select:function(){this.preventJump(),this.model.save(),t.HeaderTool.currentHeader.set(this.extendedModel())},preventJump:function(){var e=i(".wp-full-overlay-sidebar-content"),t=e.scrollTop();o.defer(function(){e.scrollTop(t)})},removeImage:function(e){e.stopPropagation(),this.model.destroy(),this.remove()}}),t.HeaderTool.ChoiceListView=e.Backbone.View.extend({initialize:function(){this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"sort",this.render),this.listenTo(this.collection,"change",this.toggleList),this.render()},render:function(){this.$el.empty(),this.collection.each(this.addOne,this),this.toggleList()},addOne:function(e){e.set({collection:this.collection}),e=new t.HeaderTool.ChoiceView({model:e}),this.$el.append(e.render().el)},toggleList:function(){var e=this.$el.parents().prev(".customize-control-title"),t=this.$el.find(".random").parent();this.collection.shouldHideTitle()?e.add(t).hide():e.add(t).show()}}),t.HeaderTool.CombinedList=e.Backbone.View.extend({initialize:function(e){this.collections=e,this.on("all",this.propagate,this)},propagate:function(t,i){o.each(this.collections,function(e){e.trigger(t,i)})}}))}(jQuery,window.wp,_);PK\7ܦ%%wp-pointer.min.jsnu[/*! This file is auto-generated */ !function(o){var i=0,e=9999;o.widget("wp.pointer",{options:{pointerClass:"wp-pointer",pointerWidth:320,content:function(){return o(this).text()},buttons:function(t,i){return o('').text(wp.i18n.__("Dismiss")).on("click.pointer",function(t){t.preventDefault(),i.element.pointer("close")})},position:"top",show:function(t,i){i.pointer.show(),i.opened()},hide:function(t,i){i.pointer.hide(),i.closed()},document:document},_create:function(){var t;this.content=o('
'),this.arrow=o('
'),t="absolute",this.element.parents().add(this.element).filter(function(){return"fixed"===o(this).css("position")}).length&&(t="fixed"),this.pointer=o("
").append(this.content).append(this.arrow).attr("id","wp-pointer-"+i++).addClass(this.options.pointerClass).css({position:t,width:this.options.pointerWidth+"px",display:"none"}).appendTo(this.options.document.body)},_setOption:function(t,i){var e=this.options,n=this.pointer;"document"===t&&i!==e.document?n.detach().appendTo(i.body):"pointerClass"===t&&n.removeClass(e.pointerClass).addClass(i),o.Widget.prototype._setOption.apply(this,arguments),"position"===t?this.reposition():"content"===t&&this.active&&this.update()},destroy:function(){this.pointer.remove(),o.Widget.prototype.destroy.call(this)},widget:function(){return this.pointer},update:function(i){var e=this,t=this.options,n=o.Deferred();if(!t.disabled)return n.done(function(t){e._update(i,t)}),(t="string"==typeof t.content?t.content:t.content.call(this.element[0],n.resolve,i,this._handoff()))&&n.resolve(t),n.promise()},_update:function(t,i){var e=this.options;i&&(this.pointer.stop(),this.content.html(i),(i=e.buttons.call(this.element[0],t,this._handoff()))&&i.wrap('
').parent().appendTo(this.content),this.reposition())},reposition:function(){var t;this.options.disabled||(t=this._processPosition(this.options.position),this.pointer.css({top:0,left:0,zIndex:e++}).show().position(o.extend({of:this.element,collision:"fit none"},t)),this.repoint())},repoint:function(){var t=this.options;t.disabled||(t="string"==typeof t.position?t.position:t.position.edge,this.pointer[0].className=this.pointer[0].className.replace(/wp-pointer-[^\s'"]*/,""),this.pointer.addClass("wp-pointer-"+t))},_processPosition:function(t){var i={top:"bottom",bottom:"top",left:"right",right:"left"},t="string"==typeof t?{edge:t+""}:o.extend({},t);return t.edge&&("top"==t.edge||"bottom"==t.edge?(t.align=t.align||"left",t.at=t.at||t.align+" "+i[t.edge],t.my=t.my||t.align+" "+t.edge):(t.align=t.align||"top",t.at=t.at||i[t.edge]+" "+t.align,t.my=t.my||t.edge+" "+t.align)),t},open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||this.update().done(function(){i._open(t)})},_open:function(t){var i=this,e=this.options;this.active||e.disabled||this.element.is(":hidden")||(this.active=!0,this._trigger("open",t,this._handoff()),this._trigger("show",t,this._handoff({opened:function(){i._trigger("opened",t,i._handoff())}})))},close:function(t){var i;this.active&&!this.options.disabled&&((i=this).active=!1,this._trigger("close",t,this._handoff()),this._trigger("hide",t,this._handoff({closed:function(){i._trigger("closed",t,i._handoff())}})))},sendToTop:function(){this.active&&this.pointer.css("z-index",e++)},toggle:function(t){this.pointer.is(":hidden")?this.open(t):this.close(t)},_handoff:function(t){return o.extend({pointer:this.pointer,element:this.element},t)}})}(jQuery);PK\Cwp-list-revisions.jsnu[/** * @output wp-includes/js/wp-list-revisions.js */ (function(w) { var init = function() { var pr = document.getElementById('post-revisions'), inputs = pr ? pr.getElementsByTagName('input') : []; pr.onclick = function() { var i, checkCount = 0, side; for ( i = 0; i < inputs.length; i++ ) { checkCount += inputs[i].checked ? 1 : 0; side = inputs[i].getAttribute('name'); if ( ! inputs[i].checked && ( 'left' == side && 1 > checkCount || 'right' == side && 1 < checkCount && ( ! inputs[i-1] || ! inputs[i-1].checked ) ) && ! ( inputs[i+1] && inputs[i+1].checked && 'right' == inputs[i+1].getAttribute('name') ) ) inputs[i].style.visibility = 'hidden'; else if ( 'left' == side || 'right' == side ) inputs[i].style.visibility = 'visible'; } }; pr.onclick(); }; if ( w && w.addEventListener ) w.addEventListener('load', init, false); else if ( w && w.attachEvent ) w.attachEvent('onload', init); })(window); PK\n#|dd mce-view.jsnu[/** * @output wp-includes/js/mce-view.js */ /* global tinymce */ /* * The TinyMCE view API. * * Note: this API is "experimental" meaning that it will probably change * in the next few releases based on feedback from 3.9.0. * If you decide to use it, please follow the development closely. * * Diagram * * |- registered view constructor (type) * | |- view instance (unique text) * | | |- editor 1 * | | | |- view node * | | | |- view node * | | | |- ... * | | |- editor 2 * | | | |- ... * | |- view instance * | | |- ... * |- registered view * | |- ... */ ( function( window, wp, shortcode, $ ) { 'use strict'; var views = {}, instances = {}; wp.mce = wp.mce || {}; /** * wp.mce.views * * A set of utilities that simplifies adding custom UI within a TinyMCE editor. * At its core, it serves as a series of converters, transforming text to a * custom UI, and back again. */ wp.mce.views = { /** * Registers a new view type. * * @param {string} type The view type. * @param {Object} extend An object to extend wp.mce.View.prototype with. */ register: function( type, extend ) { views[ type ] = wp.mce.View.extend( _.extend( extend, { type: type } ) ); }, /** * Unregisters a view type. * * @param {string} type The view type. */ unregister: function( type ) { delete views[ type ]; }, /** * Returns the settings of a view type. * * @param {string} type The view type. * * @return {Function} The view constructor. */ get: function( type ) { return views[ type ]; }, /** * Unbinds all view nodes. * Runs before removing all view nodes from the DOM. */ unbind: function() { _.each( instances, function( instance ) { instance.unbind(); } ); }, /** * Scans a given string for each view's pattern, * replacing any matches with markers, * and creates a new instance for every match. * * @param {string} content The string to scan. * @param {tinymce.Editor} editor The editor. * * @return {string} The string with markers. */ setMarkers: function( content, editor ) { var pieces = [ { content: content } ], self = this, instance, current; _.each( views, function( view, type ) { current = pieces.slice(); pieces = []; _.each( current, function( piece ) { var remaining = piece.content, result, text; // Ignore processed pieces, but retain their location. if ( piece.processed ) { pieces.push( piece ); return; } // Iterate through the string progressively matching views // and slicing the string as we go. while ( remaining && ( result = view.prototype.match( remaining ) ) ) { // Any text before the match becomes an unprocessed piece. if ( result.index ) { pieces.push( { content: remaining.substring( 0, result.index ) } ); } result.options.editor = editor; instance = self.createInstance( type, result.content, result.options ); text = instance.loader ? '.' : instance.text; // Add the processed piece for the match. pieces.push( { content: instance.ignore ? text : '

' + text + '

', processed: true } ); // Update the remaining content. remaining = remaining.slice( result.index + result.content.length ); } // There are no additional matches. // If any content remains, add it as an unprocessed piece. if ( remaining ) { pieces.push( { content: remaining } ); } } ); } ); content = _.pluck( pieces, 'content' ).join( '' ); return content.replace( /

\s*

' ); }, /** * Create a view instance. * * @param {string} type The view type. * @param {string} text The textual representation of the view. * @param {Object} options Options. * @param {boolean} force Recreate the instance. Optional. * * @return {wp.mce.View} The view instance. */ createInstance: function( type, text, options, force ) { var View = this.get( type ), encodedText, instance; if ( text.indexOf( '[' ) !== -1 && text.indexOf( ']' ) !== -1 ) { // Looks like a shortcode? Remove any line breaks from inside of shortcodes // or autop will replace them with

and
later and the string won't match. text = text.replace( /\[[^\]]+\]/g, function( match ) { return match.replace( /[\r\n]/g, '' ); }); } if ( ! force ) { instance = this.getInstance( text ); if ( instance ) { return instance; } } encodedText = encodeURIComponent( text ); options = _.extend( options || {}, { text: text, encodedText: encodedText } ); return instances[ encodedText ] = new View( options ); }, /** * Get a view instance. * * @param {(string|HTMLElement)} object The textual representation of the view or the view node. * * @return {wp.mce.View} The view instance or undefined. */ getInstance: function( object ) { if ( typeof object === 'string' ) { return instances[ encodeURIComponent( object ) ]; } return instances[ $( object ).attr( 'data-wpview-text' ) ]; }, /** * Given a view node, get the view's text. * * @param {HTMLElement} node The view node. * * @return {string} The textual representation of the view. */ getText: function( node ) { return decodeURIComponent( $( node ).attr( 'data-wpview-text' ) || '' ); }, /** * Renders all view nodes that are not yet rendered. * * @param {boolean} force Rerender all view nodes. */ render: function( force ) { _.each( instances, function( instance ) { instance.render( null, force ); } ); }, /** * Update the text of a given view node. * * @param {string} text The new text. * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in. * @param {HTMLElement} node The view node to update. * @param {boolean} force Recreate the instance. Optional. */ update: function( text, editor, node, force ) { var instance = this.getInstance( node ); if ( instance ) { instance.update( text, editor, node, force ); } }, /** * Renders any editing interface based on the view type. * * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in. * @param {HTMLElement} node The view node to edit. */ edit: function( editor, node ) { var instance = this.getInstance( node ); if ( instance && instance.edit ) { instance.edit( instance.text, function( text, force ) { instance.update( text, editor, node, force ); } ); } }, /** * Remove a given view node from the DOM. * * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in. * @param {HTMLElement} node The view node to remove. */ remove: function( editor, node ) { var instance = this.getInstance( node ); if ( instance ) { instance.remove( editor, node ); } } }; /** * A Backbone-like View constructor intended for use when rendering a TinyMCE View. * The main difference is that the TinyMCE View is not tied to a particular DOM node. * * @param {Object} options Options. */ wp.mce.View = function( options ) { _.extend( this, options ); this.initialize(); }; wp.mce.View.extend = Backbone.View.extend; _.extend( wp.mce.View.prototype, /** @lends wp.mce.View.prototype */{ /** * The content. * * @type {*} */ content: null, /** * Whether or not to display a loader. * * @type {Boolean} */ loader: true, /** * Runs after the view instance is created. */ initialize: function() {}, /** * Returns the content to render in the view node. * * @return {*} */ getContent: function() { return this.content; }, /** * Renders all view nodes tied to this view instance that are not yet rendered. * * @param {string} content The content to render. Optional. * @param {boolean} force Rerender all view nodes tied to this view instance. Optional. */ render: function( content, force ) { if ( content != null ) { this.content = content; } content = this.getContent(); // If there's nothing to render an no loader needs to be shown, stop. if ( ! this.loader && ! content ) { return; } // We're about to rerender all views of this instance, so unbind rendered views. force && this.unbind(); // Replace any left over markers. this.replaceMarkers(); if ( content ) { this.setContent( content, function( editor, node ) { $( node ).data( 'rendered', true ); this.bindNode.call( this, editor, node ); }, force ? null : false ); } else { this.setLoader(); } }, /** * Binds a given node after its content is added to the DOM. */ bindNode: function() {}, /** * Unbinds a given node before its content is removed from the DOM. */ unbindNode: function() {}, /** * Unbinds all view nodes tied to this view instance. * Runs before their content is removed from the DOM. */ unbind: function() { this.getNodes( function( editor, node ) { this.unbindNode.call( this, editor, node ); }, true ); }, /** * Gets all the TinyMCE editor instances that support views. * * @param {Function} callback A callback. */ getEditors: function( callback ) { _.each( tinymce.editors, function( editor ) { if ( editor.plugins.wpview ) { callback.call( this, editor ); } }, this ); }, /** * Gets all view nodes tied to this view instance. * * @param {Function} callback A callback. * @param {boolean} rendered Get (un)rendered view nodes. Optional. */ getNodes: function( callback, rendered ) { this.getEditors( function( editor ) { var self = this; $( editor.getBody() ) .find( '[data-wpview-text="' + self.encodedText + '"]' ) .filter( function() { var data; if ( rendered == null ) { return true; } data = $( this ).data( 'rendered' ) === true; return rendered ? data : ! data; } ) .each( function() { callback.call( self, editor, this, this /* back compat */ ); } ); } ); }, /** * Gets all marker nodes tied to this view instance. * * @param {Function} callback A callback. */ getMarkers: function( callback ) { this.getEditors( function( editor ) { var self = this; $( editor.getBody() ) .find( '[data-wpview-marker="' + this.encodedText + '"]' ) .each( function() { callback.call( self, editor, this ); } ); } ); }, /** * Replaces all marker nodes tied to this view instance. */ replaceMarkers: function() { this.getMarkers( function( editor, node ) { var selected = node === editor.selection.getNode(); var $viewNode; if ( ! this.loader && $( node ).text() !== tinymce.DOM.decode( this.text ) ) { editor.dom.setAttrib( node, 'data-wpview-marker', null ); return; } $viewNode = editor.$( '

' ); editor.undoManager.ignore( function() { editor.$( node ).replaceWith( $viewNode ); } ); if ( selected ) { setTimeout( function() { editor.undoManager.ignore( function() { editor.selection.select( $viewNode[0] ); editor.selection.collapse(); } ); } ); } } ); }, /** * Removes all marker nodes tied to this view instance. */ removeMarkers: function() { this.getMarkers( function( editor, node ) { editor.dom.setAttrib( node, 'data-wpview-marker', null ); } ); }, /** * Sets the content for all view nodes tied to this view instance. * * @param {*} content The content to set. * @param {Function} callback A callback. Optional. * @param {boolean} rendered Only set for (un)rendered nodes. Optional. */ setContent: function( content, callback, rendered ) { if ( _.isObject( content ) && ( content.sandbox || content.head || content.body.indexOf( '/g, '>' ); } ); } this.getNodes( function( editor, node ) { var dom = editor.dom, styles = '', bodyClasses = editor.getBody().className || '', editorHead = editor.getDoc().getElementsByTagName( 'head' )[0], iframe, iframeWin, iframeDoc, MutationObserver, observer, i, block; tinymce.each( dom.$( 'link[rel="stylesheet"]', editorHead ), function( link ) { if ( link.href && link.href.indexOf( 'skins/lightgray/content.min.css' ) === -1 && link.href.indexOf( 'skins/wordpress/wp-content.css' ) === -1 ) { styles += dom.getOuterHTML( link ); } } ); if ( self.iframeHeight ) { dom.add( node, 'span', { 'data-mce-bogus': 1, style: { display: 'block', width: '100%', height: self.iframeHeight } }, '\u200B' ); } editor.undoManager.transact( function() { node.innerHTML = ''; iframe = dom.add( node, 'iframe', { /* jshint scripturl: true */ src: tinymce.Env.ie ? 'javascript:""' : '', frameBorder: '0', allowTransparency: 'true', scrolling: 'no', 'class': 'wpview-sandbox', style: { width: '100%', display: 'block' }, height: self.iframeHeight } ); dom.add( node, 'span', { 'class': 'mce-shim' } ); dom.add( node, 'span', { 'class': 'wpview-end' } ); } ); /* * Bail if the iframe node is not attached to the DOM. * Happens when the view is dragged in the editor. * There is a browser restriction when iframes are moved in the DOM. They get emptied. * The iframe will be rerendered after dropping the view node at the new location. */ if ( ! iframe.contentWindow ) { return; } iframeWin = iframe.contentWindow; iframeDoc = iframeWin.document; iframeDoc.open(); iframeDoc.write( '' + '' + '' + '' + head + styles + '' + '' + '' + body + '' + '' ); iframeDoc.close(); function resize() { var $iframe; if ( block ) { return; } // Make sure the iframe still exists. if ( iframe.contentWindow ) { $iframe = $( iframe ); self.iframeHeight = $( iframeDoc.body ).height(); if ( $iframe.height() !== self.iframeHeight ) { $iframe.height( self.iframeHeight ); editor.nodeChanged(); } } } if ( self.iframeHeight ) { block = true; setTimeout( function() { block = false; resize(); }, 3000 ); } function addObserver() { observer = new MutationObserver( _.debounce( resize, 100 ) ); observer.observe( iframeDoc.body, { attributes: true, childList: true, subtree: true } ); } $( iframeWin ).on( 'load', resize ); MutationObserver = iframeWin.MutationObserver || iframeWin.WebKitMutationObserver || iframeWin.MozMutationObserver; if ( MutationObserver ) { if ( ! iframeDoc.body ) { iframeDoc.addEventListener( 'DOMContentLoaded', addObserver, false ); } else { addObserver(); } } else { for ( i = 1; i < 6; i++ ) { setTimeout( resize, i * 700 ); } } callback && callback.call( self, editor, node ); }, rendered ); }, /** * Sets a loader for all view nodes tied to this view instance. */ setLoader: function( dashicon ) { this.setContent( '
' + '
' + '
' + '
' ); }, /** * Sets an error for all view nodes tied to this view instance. * * @param {string} message The error message to set. * @param {string} dashicon A dashicon ID. Optional. {@link https://developer.wordpress.org/resource/dashicons/} */ setError: function( message, dashicon ) { this.setContent( '
' + '
' + '

' + message + '

' + '
' ); }, /** * Tries to find a text match in a given string. * * @param {string} content The string to scan. * * @return {Object} */ match: function( content ) { var match = shortcode.next( this.type, content ); if ( match ) { return { index: match.index, content: match.content, options: { shortcode: match.shortcode } }; } }, /** * Update the text of a given view node. * * @param {string} text The new text. * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in. * @param {HTMLElement} node The view node to update. * @param {boolean} force Recreate the instance. Optional. */ update: function( text, editor, node, force ) { _.find( views, function( view, type ) { var match = view.prototype.match( text ); if ( match ) { $( node ).data( 'rendered', false ); editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) ); wp.mce.views.createInstance( type, text, match.options, force ).render(); editor.selection.select( node ); editor.nodeChanged(); editor.focus(); return true; } } ); }, /** * Remove a given view node from the DOM. * * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in. * @param {HTMLElement} node The view node to remove. */ remove: function( editor, node ) { this.unbindNode.call( this, editor, node ); editor.dom.remove( node ); editor.focus(); } } ); } )( window, window.wp, window.wp.shortcode, window.jQuery ); /* * The WordPress core TinyMCE views. * Views for the gallery, audio, video, playlist and embed shortcodes, * and a view for embeddable URLs. */ ( function( window, views, media, $ ) { var base, gallery, av, embed, schema, parser, serializer; function verifyHTML( string ) { var settings = {}; if ( ! window.tinymce ) { return string.replace( /<[^>]+>/g, '' ); } if ( ! string || ( string.indexOf( '<' ) === -1 && string.indexOf( '>' ) === -1 ) ) { return string; } schema = schema || new window.tinymce.html.Schema( settings ); parser = parser || new window.tinymce.html.DomParser( settings, schema ); serializer = serializer || new window.tinymce.html.Serializer( settings, schema ); return serializer.serialize( parser.parse( string, { forced_root_block: false } ) ); } base = { state: [], edit: function( text, update ) { var type = this.type, frame = media[ type ].edit( text ); this.pausePlayers && this.pausePlayers(); _.each( this.state, function( state ) { frame.state( state ).on( 'update', function( selection ) { update( media[ type ].shortcode( selection ).string(), type === 'gallery' ); } ); } ); frame.on( 'close', function() { frame.detach(); } ); frame.open(); } }; gallery = _.extend( {}, base, { state: [ 'gallery-edit' ], template: media.template( 'editor-gallery' ), initialize: function() { var attachments = media.gallery.attachments( this.shortcode, media.view.settings.post.id ), attrs = this.shortcode.attrs.named, self = this; attachments.more() .done( function() { attachments = attachments.toJSON(); _.each( attachments, function( attachment ) { if ( attachment.sizes ) { if ( attrs.size && attachment.sizes[ attrs.size ] ) { attachment.thumbnail = attachment.sizes[ attrs.size ]; } else if ( attachment.sizes.thumbnail ) { attachment.thumbnail = attachment.sizes.thumbnail; } else if ( attachment.sizes.full ) { attachment.thumbnail = attachment.sizes.full; } } } ); self.render( self.template( { verifyHTML: verifyHTML, attachments: attachments, columns: attrs.columns ? parseInt( attrs.columns, 10 ) : media.galleryDefaults.columns } ) ); } ) .fail( function( jqXHR, textStatus ) { self.setError( textStatus ); } ); } } ); av = _.extend( {}, base, { action: 'parse-media-shortcode', initialize: function() { var self = this, maxwidth = null; if ( this.url ) { this.loader = false; this.shortcode = media.embed.shortcode( { url: this.text } ); } // Obtain the target width for the embed. if ( self.editor ) { maxwidth = self.editor.getBody().clientWidth; } wp.ajax.post( this.action, { post_ID: media.view.settings.post.id, type: this.shortcode.tag, shortcode: this.shortcode.string(), maxwidth: maxwidth } ) .done( function( response ) { self.render( response ); } ) .fail( function( response ) { if ( self.url ) { self.ignore = true; self.removeMarkers(); } else { self.setError( response.message || response.statusText, 'admin-media' ); } } ); this.getEditors( function( editor ) { editor.on( 'wpview-selected', function() { self.pausePlayers(); } ); } ); }, pausePlayers: function() { this.getNodes( function( editor, node, content ) { var win = $( 'iframe.wpview-sandbox', content ).get( 0 ); if ( win && ( win = win.contentWindow ) && win.mejs ) { _.each( win.mejs.players, function( player ) { try { player.pause(); } catch ( e ) {} } ); } } ); } } ); embed = _.extend( {}, av, { action: 'parse-embed', edit: function( text, update ) { var frame = media.embed.edit( text, this.url ), self = this; this.pausePlayers(); frame.state( 'embed' ).props.on( 'change:url', function( model, url ) { if ( url && model.get( 'url' ) ) { frame.state( 'embed' ).metadata = model.toJSON(); } } ); frame.state( 'embed' ).on( 'select', function() { var data = frame.state( 'embed' ).metadata; if ( self.url ) { update( data.url ); } else { update( media.embed.shortcode( data ).string() ); } } ); frame.on( 'close', function() { frame.detach(); } ); frame.open(); } } ); views.register( 'gallery', _.extend( {}, gallery ) ); views.register( 'audio', _.extend( {}, av, { state: [ 'audio-details' ] } ) ); views.register( 'video', _.extend( {}, av, { state: [ 'video-details' ] } ) ); views.register( 'playlist', _.extend( {}, av, { state: [ 'playlist-edit', 'video-playlist-edit' ] } ) ); views.register( 'embed', _.extend( {}, embed ) ); views.register( 'embedURL', _.extend( {}, embed, { match: function( content ) { // There may be a "bookmark" node next to the URL... var re = /(^|

(?:]+>\s*<\/span>)?)(https?:\/\/[^\s"]+?)((?:]+>\s*<\/span>)?<\/p>\s*|$)/gi; var match = re.exec( content ); if ( match ) { return { index: match.index + match[1].length, content: match[2], options: { url: true } }; } } } ) ); } )( window, window.wp.mce.views, window.wp.media, window.jQuery ); PK\7::customize-preview-nav-menus.jsnu[/** * @output wp-includes/js/customize-preview-nav-menus.js */ /* global _wpCustomizePreviewNavMenusExports */ /** @namespace wp.customize.navMenusPreview */ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( $, _, wp, api ) { 'use strict'; var self = { data: { navMenuInstanceArgs: {} } }; if ( 'undefined' !== typeof _wpCustomizePreviewNavMenusExports ) { _.extend( self.data, _wpCustomizePreviewNavMenusExports ); } /** * Initialize nav menus preview. */ self.init = function() { var self = this, synced = false; /* * Keep track of whether we synced to determine whether or not bindSettingListener * should also initially fire the listener. This initial firing needs to wait until * after all of the settings have been synced from the pane in order to prevent * an infinite selective fallback-refresh. Note that this sync handler will be * added after the sync handler in customize-preview.js, so it will be triggered * after all of the settings are added. */ api.preview.bind( 'sync', function() { synced = true; } ); if ( api.selectiveRefresh ) { // Listen for changes to settings related to nav menus. api.each( function( setting ) { self.bindSettingListener( setting ); } ); api.bind( 'add', function( setting ) { /* * Handle case where an invalid nav menu item (one for which its associated object has been deleted) * is synced from the controls into the preview. Since invalid nav menu items are filtered out from * being exported to the frontend by the _is_valid_nav_menu_item filter in wp_get_nav_menu_items(), * the customizer controls will have a nav_menu_item setting where the preview will have none, and * this can trigger an infinite fallback refresh when the nav menu item lacks any valid items. */ if ( setting.get() && ! setting.get()._invalid ) { self.bindSettingListener( setting, { fire: synced } ); } } ); api.bind( 'remove', function( setting ) { self.unbindSettingListener( setting ); } ); /* * Ensure that wp_nav_menu() instances nested inside of other partials * will be recognized as being present on the page. */ api.selectiveRefresh.bind( 'render-partials-response', function( response ) { if ( response.nav_menu_instance_args ) { _.extend( self.data.navMenuInstanceArgs, response.nav_menu_instance_args ); } } ); } api.preview.bind( 'active', function() { self.highlightControls(); } ); }; if ( api.selectiveRefresh ) { /** * Partial representing an invocation of wp_nav_menu(). * * @memberOf wp.customize.navMenusPreview * @alias wp.customize.navMenusPreview.NavMenuInstancePartial * * @class * @augments wp.customize.selectiveRefresh.Partial * @since 4.5.0 */ self.NavMenuInstancePartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.navMenusPreview.NavMenuInstancePartial.prototype */{ /** * Constructor. * * @since 4.5.0 * @param {string} id - Partial ID. * @param {Object} options * @param {Object} options.params * @param {Object} options.params.navMenuArgs * @param {string} options.params.navMenuArgs.args_hmac * @param {string} [options.params.navMenuArgs.theme_location] * @param {number} [options.params.navMenuArgs.menu] * @param {Object} [options.constructingContainerContext] */ initialize: function( id, options ) { var partial = this, matches, argsHmac; matches = id.match( /^nav_menu_instance\[([0-9a-f]{32})]$/ ); if ( ! matches ) { throw new Error( 'Illegal id for nav_menu_instance partial. The key corresponds with the args HMAC.' ); } argsHmac = matches[1]; options = options || {}; options.params = _.extend( { selector: '[data-customize-partial-id="' + id + '"]', navMenuArgs: options.constructingContainerContext || {}, containerInclusive: true }, options.params || {} ); api.selectiveRefresh.Partial.prototype.initialize.call( partial, id, options ); if ( ! _.isObject( partial.params.navMenuArgs ) ) { throw new Error( 'Missing navMenuArgs' ); } if ( partial.params.navMenuArgs.args_hmac !== argsHmac ) { throw new Error( 'args_hmac mismatch with id' ); } }, /** * Return whether the setting is related to this partial. * * @since 4.5.0 * @param {wp.customize.Value|string} setting - Object or ID. * @param {number|Object|false|null} newValue - New value, or null if the setting was just removed. * @param {number|Object|false|null} oldValue - Old value, or null if the setting was just added. * @return {boolean} */ isRelatedSetting: function( setting, newValue, oldValue ) { var partial = this, navMenuLocationSetting, navMenuId, isNavMenuItemSetting, _newValue, _oldValue, urlParser; if ( _.isString( setting ) ) { setting = api( setting ); } /* * Prevent nav_menu_item changes only containing type_label differences triggering a refresh. * These settings in the preview do not include type_label property, and so if one of these * nav_menu_item settings is dirty, after a refresh the nav menu instance would do a selective * refresh immediately because the setting from the pane would have the type_label whereas * the setting in the preview would not, thus triggering a change event. The following * condition short-circuits this unnecessary selective refresh and also prevents an infinite * loop in the case where a nav_menu_instance partial had done a fallback refresh. * @todo Nav menu item settings should not include a type_label property to begin with. */ isNavMenuItemSetting = /^nav_menu_item\[/.test( setting.id ); if ( isNavMenuItemSetting && _.isObject( newValue ) && _.isObject( oldValue ) ) { _newValue = _.clone( newValue ); _oldValue = _.clone( oldValue ); delete _newValue.type_label; delete _oldValue.type_label; // Normalize URL scheme when parent frame is HTTPS to prevent selective refresh upon initial page load. if ( 'https' === api.preview.scheme.get() ) { urlParser = document.createElement( 'a' ); urlParser.href = _newValue.url; urlParser.protocol = 'https:'; _newValue.url = urlParser.href; urlParser.href = _oldValue.url; urlParser.protocol = 'https:'; _oldValue.url = urlParser.href; } // Prevent original_title differences from causing refreshes if title is present. if ( newValue.title ) { delete _oldValue.original_title; delete _newValue.original_title; } if ( _.isEqual( _oldValue, _newValue ) ) { return false; } } if ( partial.params.navMenuArgs.theme_location ) { if ( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' === setting.id ) { return true; } navMenuLocationSetting = api( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ); } navMenuId = partial.params.navMenuArgs.menu; if ( ! navMenuId && navMenuLocationSetting ) { navMenuId = navMenuLocationSetting(); } if ( ! navMenuId ) { return false; } return ( ( 'nav_menu[' + navMenuId + ']' === setting.id ) || ( isNavMenuItemSetting && ( ( newValue && newValue.nav_menu_term_id === navMenuId ) || ( oldValue && oldValue.nav_menu_term_id === navMenuId ) ) ) ); }, /** * Make sure that partial fallback behavior is invoked if there is no associated menu. * * @since 4.5.0 * * @return {Promise} */ refresh: function() { var partial = this, menuId, deferred = $.Deferred(); // Make sure the fallback behavior is invoked when the partial is no longer associated with a menu. if ( _.isNumber( partial.params.navMenuArgs.menu ) ) { menuId = partial.params.navMenuArgs.menu; } else if ( partial.params.navMenuArgs.theme_location && api.has( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ) ) { menuId = api( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ).get(); } if ( ! menuId ) { partial.fallback(); deferred.reject(); return deferred.promise(); } return api.selectiveRefresh.Partial.prototype.refresh.call( partial ); }, /** * Render content. * * @inheritdoc * @param {wp.customize.selectiveRefresh.Placement} placement */ renderContent: function( placement ) { var partial = this, previousContainer = placement.container; // Do fallback behavior to refresh preview if menu is now empty. if ( '' === placement.addedContent ) { placement.partial.fallback(); } if ( api.selectiveRefresh.Partial.prototype.renderContent.call( partial, placement ) ) { // Trigger deprecated event. $( document ).trigger( 'customize-preview-menu-refreshed', [ { instanceNumber: null, // @deprecated wpNavArgs: placement.context, // @deprecated wpNavMenuArgs: placement.context, oldContainer: previousContainer, newContainer: placement.container } ] ); } } }); api.selectiveRefresh.partialConstructor.nav_menu_instance = self.NavMenuInstancePartial; /** * Request full refresh if there are nav menu instances that lack partials which also match the supplied args. * * @param {Object} navMenuInstanceArgs */ self.handleUnplacedNavMenuInstances = function( navMenuInstanceArgs ) { var unplacedNavMenuInstances; unplacedNavMenuInstances = _.filter( _.values( self.data.navMenuInstanceArgs ), function( args ) { return ! api.selectiveRefresh.partial.has( 'nav_menu_instance[' + args.args_hmac + ']' ); } ); if ( _.findWhere( unplacedNavMenuInstances, navMenuInstanceArgs ) ) { api.selectiveRefresh.requestFullRefresh(); return true; } return false; }; /** * Add change listener for a nav_menu[], nav_menu_item[], or nav_menu_locations[] setting. * * @since 4.5.0 * * @param {wp.customize.Value} setting * @param {Object} [options] * @param {boolean} options.fire Whether to invoke the callback after binding. * This is used when a dynamic setting is added. * @return {boolean} Whether the setting was bound. */ self.bindSettingListener = function( setting, options ) { var matches; options = options || {}; matches = setting.id.match( /^nav_menu\[(-?\d+)]$/ ); if ( matches ) { setting._navMenuId = parseInt( matches[1], 10 ); setting.bind( this.onChangeNavMenuSetting ); if ( options.fire ) { this.onChangeNavMenuSetting.call( setting, setting(), false ); } return true; } matches = setting.id.match( /^nav_menu_item\[(-?\d+)]$/ ); if ( matches ) { setting._navMenuItemId = parseInt( matches[1], 10 ); setting.bind( this.onChangeNavMenuItemSetting ); if ( options.fire ) { this.onChangeNavMenuItemSetting.call( setting, setting(), false ); } return true; } matches = setting.id.match( /^nav_menu_locations\[(.+?)]/ ); if ( matches ) { setting._navMenuThemeLocation = matches[1]; setting.bind( this.onChangeNavMenuLocationsSetting ); if ( options.fire ) { this.onChangeNavMenuLocationsSetting.call( setting, setting(), false ); } return true; } return false; }; /** * Remove change listeners for nav_menu[], nav_menu_item[], or nav_menu_locations[] setting. * * @since 4.5.0 * * @param {wp.customize.Value} setting */ self.unbindSettingListener = function( setting ) { setting.unbind( this.onChangeNavMenuSetting ); setting.unbind( this.onChangeNavMenuItemSetting ); setting.unbind( this.onChangeNavMenuLocationsSetting ); }; /** * Handle change for nav_menu[] setting for nav menu instances lacking partials. * * @since 4.5.0 * * @this {wp.customize.Value} */ self.onChangeNavMenuSetting = function() { var setting = this; self.handleUnplacedNavMenuInstances( { menu: setting._navMenuId } ); // Ensure all nav menu instances with a theme_location assigned to this menu are handled. api.each( function( otherSetting ) { if ( ! otherSetting._navMenuThemeLocation ) { return; } if ( setting._navMenuId === otherSetting() ) { self.handleUnplacedNavMenuInstances( { theme_location: otherSetting._navMenuThemeLocation } ); } } ); }; /** * Handle change for nav_menu_item[] setting for nav menu instances lacking partials. * * @since 4.5.0 * * @param {Object} newItem New value for nav_menu_item[] setting. * @param {Object} oldItem Old value for nav_menu_item[] setting. * @this {wp.customize.Value} */ self.onChangeNavMenuItemSetting = function( newItem, oldItem ) { var item = newItem || oldItem, navMenuSetting; navMenuSetting = api( 'nav_menu[' + String( item.nav_menu_term_id ) + ']' ); if ( navMenuSetting ) { self.onChangeNavMenuSetting.call( navMenuSetting ); } }; /** * Handle change for nav_menu_locations[] setting for nav menu instances lacking partials. * * @since 4.5.0 * * @this {wp.customize.Value} */ self.onChangeNavMenuLocationsSetting = function() { var setting = this, hasNavMenuInstance; self.handleUnplacedNavMenuInstances( { theme_location: setting._navMenuThemeLocation } ); // If there are no wp_nav_menu() instances that refer to the theme location, do full refresh. hasNavMenuInstance = !! _.findWhere( _.values( self.data.navMenuInstanceArgs ), { theme_location: setting._navMenuThemeLocation } ); if ( ! hasNavMenuInstance ) { api.selectiveRefresh.requestFullRefresh(); } }; } /** * Connect nav menu items with their corresponding controls in the pane. * * Setup shift-click on nav menu items which are more granular than the nav menu partial itself. * Also this applies even if a nav menu is not partial-refreshable. * * @since 4.5.0 */ self.highlightControls = function() { var selector = '.menu-item'; // Skip adding highlights if not in the customizer preview iframe. if ( ! api.settings.channel ) { return; } // Focus on the menu item control when shift+clicking the menu item. $( document ).on( 'click', selector, function( e ) { var navMenuItemParts; if ( ! e.shiftKey ) { return; } navMenuItemParts = $( this ).attr( 'class' ).match( /(?:^|\s)menu-item-(-?\d+)(?:\s|$)/ ); if ( navMenuItemParts ) { e.preventDefault(); e.stopPropagation(); // Make sure a sub-nav menu item will get focused instead of parent items. api.preview.send( 'focus-nav-menu-item-control', parseInt( navMenuItemParts[1], 10 ) ); } }); }; api.bind( 'preview-ready', function() { self.init(); } ); return self; }( jQuery, _, wp, wp.customize ) ); PK\    underscore.jsnu[(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define('underscore', factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () { var current = global._; var exports = global._ = factory(); exports.noConflict = function () { global._ = current; return exports; }; }())); }(this, (function () { // Underscore.js 1.13.7 // https://underscorejs.org // (c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. // Current version. var VERSION = '1.13.7'; // Establish the root object, `window` (`self`) in the browser, `global` // on the server, or `this` in some virtual machines. We use `self` // instead of `window` for `WebWorker` support. var root = (typeof self == 'object' && self.self === self && self) || (typeof global == 'object' && global.global === global && global) || Function('return this')() || {}; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype; var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; // Create quick reference variables for speed access to core prototypes. var push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // Modern feature detection. var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', supportsDataView = typeof DataView !== 'undefined'; // All **ECMAScript 5+** native function implementations that we hope to use // are declared here. var nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeCreate = Object.create, nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; // Create references to these builtin functions because we override them. var _isNaN = isNaN, _isFinite = isFinite; // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // The largest integer that can be represented exactly. var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; // Some functions take a variable number of arguments, or a few expected // arguments at the beginning and then a variable number of values to operate // on. This helper accumulates all remaining arguments past the function’s // argument length (or an explicit `startIndex`), into an array that becomes // the last argument. Similar to ES6’s "rest parameter". function restArguments(func, startIndex) { startIndex = startIndex == null ? func.length - 1 : +startIndex; return function() { var length = Math.max(arguments.length - startIndex, 0), rest = Array(length), index = 0; for (; index < length; index++) { rest[index] = arguments[index + startIndex]; } switch (startIndex) { case 0: return func.call(this, rest); case 1: return func.call(this, arguments[0], rest); case 2: return func.call(this, arguments[0], arguments[1], rest); } var args = Array(startIndex + 1); for (index = 0; index < startIndex; index++) { args[index] = arguments[index]; } args[startIndex] = rest; return func.apply(this, args); }; } // Is a given variable an object? function isObject(obj) { var type = typeof obj; return type === 'function' || (type === 'object' && !!obj); } // Is a given value equal to null? function isNull(obj) { return obj === null; } // Is a given variable undefined? function isUndefined(obj) { return obj === void 0; } // Is a given value a boolean? function isBoolean(obj) { return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; } // Is a given value a DOM element? function isElement(obj) { return !!(obj && obj.nodeType === 1); } // Internal function for creating a `toString`-based type tester. function tagTester(name) { var tag = '[object ' + name + ']'; return function(obj) { return toString.call(obj) === tag; }; } var isString = tagTester('String'); var isNumber = tagTester('Number'); var isDate = tagTester('Date'); var isRegExp = tagTester('RegExp'); var isError = tagTester('Error'); var isSymbol = tagTester('Symbol'); var isArrayBuffer = tagTester('ArrayBuffer'); var isFunction = tagTester('Function'); // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). var nodelist = root.document && root.document.childNodes; if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { isFunction = function(obj) { return typeof obj == 'function' || false; }; } var isFunction$1 = isFunction; var hasObjectTag = tagTester('Object'); // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. // In IE 11, the most common among them, this problem also applies to // `Map`, `WeakMap` and `Set`. // Also, there are cases where an application can override the native // `DataView` object, in cases like that we can't use the constructor // safely and should just rely on alternate `DataView` checks var hasDataViewBug = ( supportsDataView && (!/\[native code\]/.test(String(DataView)) || hasObjectTag(new DataView(new ArrayBuffer(8)))) ), isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map)); var isDataView = tagTester('DataView'); // In IE 10 - Edge 13, we need a different heuristic // to determine whether an object is a `DataView`. // Also, in cases where the native `DataView` is // overridden we can't rely on the tag itself. function alternateIsDataView(obj) { return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); } var isDataView$1 = (hasDataViewBug ? alternateIsDataView : isDataView); // Is a given value an array? // Delegates to ECMA5's native `Array.isArray`. var isArray = nativeIsArray || tagTester('Array'); // Internal function to check whether `key` is an own property name of `obj`. function has$1(obj, key) { return obj != null && hasOwnProperty.call(obj, key); } var isArguments = tagTester('Arguments'); // Define a fallback version of the method in browsers (ahem, IE < 9), where // there isn't any inspectable "Arguments" type. (function() { if (!isArguments(arguments)) { isArguments = function(obj) { return has$1(obj, 'callee'); }; } }()); var isArguments$1 = isArguments; // Is a given object a finite number? function isFinite$1(obj) { return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); } // Is the given value `NaN`? function isNaN$1(obj) { return isNumber(obj) && _isNaN(obj); } // Predicate-generating function. Often useful outside of Underscore. function constant(value) { return function() { return value; }; } // Common internal logic for `isArrayLike` and `isBufferLike`. function createSizePropertyCheck(getSizeProperty) { return function(collection) { var sizeProperty = getSizeProperty(collection); return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; } } // Internal helper to generate a function to obtain property `key` from `obj`. function shallowProperty(key) { return function(obj) { return obj == null ? void 0 : obj[key]; }; } // Internal helper to obtain the `byteLength` property of an object. var getByteLength = shallowProperty('byteLength'); // Internal helper to determine whether we should spend extensive checks against // `ArrayBuffer` et al. var isBufferLike = createSizePropertyCheck(getByteLength); // Is a given value a typed array? var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; function isTypedArray(obj) { // `ArrayBuffer.isView` is the most future-proof, so use it when available. // Otherwise, fall back on the above regular expression. return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) : isBufferLike(obj) && typedArrayPattern.test(toString.call(obj)); } var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false); // Internal helper to obtain the `length` property of an object. var getLength = shallowProperty('length'); // Internal helper to create a simple lookup structure. // `collectNonEnumProps` used to depend on `_.contains`, but this led to // circular imports. `emulatedSet` is a one-off solution that only works for // arrays of strings. function emulatedSet(keys) { var hash = {}; for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; return { contains: function(key) { return hash[key] === true; }, push: function(key) { hash[key] = true; return keys.push(key); } }; } // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't // be iterated by `for key in ...` and thus missed. Extends `keys` in place if // needed. function collectNonEnumProps(obj, keys) { keys = emulatedSet(keys); var nonEnumIdx = nonEnumerableProps.length; var constructor = obj.constructor; var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto; // Constructor is a special case. var prop = 'constructor'; if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop); while (nonEnumIdx--) { prop = nonEnumerableProps[nonEnumIdx]; if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { keys.push(prop); } } } // Retrieve the names of an object's own properties. // Delegates to **ECMAScript 5**'s native `Object.keys`. function keys(obj) { if (!isObject(obj)) return []; if (nativeKeys) return nativeKeys(obj); var keys = []; for (var key in obj) if (has$1(obj, key)) keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; } // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. function isEmpty(obj) { if (obj == null) return true; // Skip the more expensive `toString`-based type checks if `obj` has no // `.length`. var length = getLength(obj); if (typeof length == 'number' && ( isArray(obj) || isString(obj) || isArguments$1(obj) )) return length === 0; return getLength(keys(obj)) === 0; } // Returns whether an object has a given set of `key:value` pairs. function isMatch(object, attrs) { var _keys = keys(attrs), length = _keys.length; if (object == null) return !length; var obj = Object(object); for (var i = 0; i < length; i++) { var key = _keys[i]; if (attrs[key] !== obj[key] || !(key in obj)) return false; } return true; } // If Underscore is called as a function, it returns a wrapped object that can // be used OO-style. This wrapper holds altered versions of all functions added // through `_.mixin`. Wrapped objects may be chained. function _$1(obj) { if (obj instanceof _$1) return obj; if (!(this instanceof _$1)) return new _$1(obj); this._wrapped = obj; } _$1.VERSION = VERSION; // Extracts the result from a wrapped and chained object. _$1.prototype.value = function() { return this._wrapped; }; // Provide unwrapping proxies for some methods used in engine operations // such as arithmetic and JSON stringification. _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value; _$1.prototype.toString = function() { return String(this._wrapped); }; // Internal function to wrap or shallow-copy an ArrayBuffer, // typed array or DataView to a new view, reusing the buffer. function toBufferView(bufferSource) { return new Uint8Array( bufferSource.buffer || bufferSource, bufferSource.byteOffset || 0, getByteLength(bufferSource) ); } // We use this string twice, so give it a name for minification. var tagDataView = '[object DataView]'; // Internal recursive comparison function for `_.isEqual`. function eq(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison). if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive. if (a !== a) return b !== b; // Exhaust primitive checks var type = typeof a; if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; return deepEq(a, b, aStack, bStack); } // Internal recursive comparison function for `_.isEqual`. function deepEq(a, b, aStack, bStack) { // Unwrap any wrapped objects. if (a instanceof _$1) a = a._wrapped; if (b instanceof _$1) b = b._wrapped; // Compare `[[Class]]` names. var className = toString.call(a); if (className !== toString.call(b)) return false; // Work around a bug in IE 10 - Edge 13. if (hasDataViewBug && className == '[object Object]' && isDataView$1(a)) { if (!isDataView$1(b)) return false; className = tagDataView; } switch (className) { // These types are compared by value. case '[object RegExp]': // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return '' + a === '' + b; case '[object Number]': // `NaN`s are equivalent, but non-reflexive. // Object(NaN) is equivalent to NaN. if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values. return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a === +b; case '[object Symbol]': return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); case '[object ArrayBuffer]': case tagDataView: // Coerce to typed array so we can fall through. return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); } var areArrays = className === '[object Array]'; if (!areArrays && isTypedArray$1(a)) { var byteLength = getByteLength(a); if (byteLength !== getByteLength(b)) return false; if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; areArrays = true; } if (!areArrays) { if (typeof a != 'object' || typeof b != 'object') return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && isFunction$1(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } } // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. aStack = aStack || []; bStack = bStack || []; var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (aStack[length] === a) return bStack[length] === b; } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); // Recursively compare objects and arrays. if (areArrays) { // Compare array lengths to determine if a deep comparison is necessary. length = a.length; if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties. while (length--) { if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { // Deep compare objects. var _keys = keys(a), key; length = _keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality. if (keys(b).length !== length) return false; while (length--) { // Deep compare each member key = _keys[length]; if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); return true; } // Perform a deep comparison to check if two objects are equal. function isEqual(a, b) { return eq(a, b); } // Retrieve all the enumerable property names of an object. function allKeys(obj) { if (!isObject(obj)) return []; var keys = []; for (var key in obj) keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; } // Since the regular `Object.prototype.toString` type tests don't work for // some types in IE 11, we use a fingerprinting heuristic instead, based // on the methods. It's not great, but it's the best we got. // The fingerprint method lists are defined below. function ie11fingerprint(methods) { var length = getLength(methods); return function(obj) { if (obj == null) return false; // `Map`, `WeakMap` and `Set` have no enumerable keys. var keys = allKeys(obj); if (getLength(keys)) return false; for (var i = 0; i < length; i++) { if (!isFunction$1(obj[methods[i]])) return false; } // If we are testing against `WeakMap`, we need to ensure that // `obj` doesn't have a `forEach` method in order to distinguish // it from a regular `Map`. return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); }; } // In the interest of compact minification, we write // each string in the fingerprints only once. var forEachName = 'forEach', hasName = 'has', commonInit = ['clear', 'delete'], mapTail = ['get', hasName, 'set']; // `Map`, `WeakMap` and `Set` each have slightly different // combinations of the above sublists. var mapMethods = commonInit.concat(forEachName, mapTail), weakMapMethods = commonInit.concat(mapTail), setMethods = ['add'].concat(commonInit, forEachName, hasName); var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'); var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'); var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'); var isWeakSet = tagTester('WeakSet'); // Retrieve the values of an object's properties. function values(obj) { var _keys = keys(obj); var length = _keys.length; var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[_keys[i]]; } return values; } // Convert an object into a list of `[key, value]` pairs. // The opposite of `_.object` with one argument. function pairs(obj) { var _keys = keys(obj); var length = _keys.length; var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [_keys[i], obj[_keys[i]]]; } return pairs; } // Invert the keys and values of an object. The values must be serializable. function invert(obj) { var result = {}; var _keys = keys(obj); for (var i = 0, length = _keys.length; i < length; i++) { result[obj[_keys[i]]] = _keys[i]; } return result; } // Return a sorted list of the function names available on the object. function functions(obj) { var names = []; for (var key in obj) { if (isFunction$1(obj[key])) names.push(key); } return names.sort(); } // An internal function for creating assigner functions. function createAssigner(keysFunc, defaults) { return function(obj) { var length = arguments.length; if (defaults) obj = Object(obj); if (length < 2 || obj == null) return obj; for (var index = 1; index < length; index++) { var source = arguments[index], keys = keysFunc(source), l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (!defaults || obj[key] === void 0) obj[key] = source[key]; } } return obj; }; } // Extend a given object with all the properties in passed-in object(s). var extend = createAssigner(allKeys); // Assigns a given object with all the own properties in the passed-in // object(s). // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) var extendOwn = createAssigner(keys); // Fill in a given object with default properties. var defaults = createAssigner(allKeys, true); // Create a naked function reference for surrogate-prototype-swapping. function ctor() { return function(){}; } // An internal function for creating a new object that inherits from another. function baseCreate(prototype) { if (!isObject(prototype)) return {}; if (nativeCreate) return nativeCreate(prototype); var Ctor = ctor(); Ctor.prototype = prototype; var result = new Ctor; Ctor.prototype = null; return result; } // Creates an object that inherits from the given prototype object. // If additional properties are provided then they will be added to the // created object. function create(prototype, props) { var result = baseCreate(prototype); if (props) extendOwn(result, props); return result; } // Create a (shallow-cloned) duplicate of an object. function clone(obj) { if (!isObject(obj)) return obj; return isArray(obj) ? obj.slice() : extend({}, obj); } // Invokes `interceptor` with the `obj` and then returns `obj`. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. function tap(obj, interceptor) { interceptor(obj); return obj; } // Normalize a (deep) property `path` to array. // Like `_.iteratee`, this function can be customized. function toPath$1(path) { return isArray(path) ? path : [path]; } _$1.toPath = toPath$1; // Internal wrapper for `_.toPath` to enable minification. // Similar to `cb` for `_.iteratee`. function toPath(path) { return _$1.toPath(path); } // Internal function to obtain a nested property in `obj` along `path`. function deepGet(obj, path) { var length = path.length; for (var i = 0; i < length; i++) { if (obj == null) return void 0; obj = obj[path[i]]; } return length ? obj : void 0; } // Get the value of the (deep) property on `path` from `object`. // If any property in `path` does not exist or if the value is // `undefined`, return `defaultValue` instead. // The `path` is normalized through `_.toPath`. function get(object, path, defaultValue) { var value = deepGet(object, toPath(path)); return isUndefined(value) ? defaultValue : value; } // Shortcut function for checking if an object has a given property directly on // itself (in other words, not on a prototype). Unlike the internal `has` // function, this public version can also traverse nested properties. function has(obj, path) { path = toPath(path); var length = path.length; for (var i = 0; i < length; i++) { var key = path[i]; if (!has$1(obj, key)) return false; obj = obj[key]; } return !!length; } // Keep the identity function around for default iteratees. function identity(value) { return value; } // Returns a predicate for checking whether an object has a given set of // `key:value` pairs. function matcher(attrs) { attrs = extendOwn({}, attrs); return function(obj) { return isMatch(obj, attrs); }; } // Creates a function that, when passed an object, will traverse that object’s // properties down the given `path`, specified as an array of keys or indices. function property(path) { path = toPath(path); return function(obj) { return deepGet(obj, path); }; } // Internal function that returns an efficient (for current engines) version // of the passed-in callback, to be repeatedly applied in other Underscore // functions. function optimizeCb(func, context, argCount) { if (context === void 0) return func; switch (argCount == null ? 3 : argCount) { case 1: return function(value) { return func.call(context, value); }; // The 2-argument case is omitted because we’re not using it. case 3: return function(value, index, collection) { return func.call(context, value, index, collection); }; case 4: return function(accumulator, value, index, collection) { return func.call(context, accumulator, value, index, collection); }; } return function() { return func.apply(context, arguments); }; } // An internal function to generate callbacks that can be applied to each // element in a collection, returning the desired result — either `_.identity`, // an arbitrary callback, a property matcher, or a property accessor. function baseIteratee(value, context, argCount) { if (value == null) return identity; if (isFunction$1(value)) return optimizeCb(value, context, argCount); if (isObject(value) && !isArray(value)) return matcher(value); return property(value); } // External wrapper for our callback generator. Users may customize // `_.iteratee` if they want additional predicate/iteratee shorthand styles. // This abstraction hides the internal-only `argCount` argument. function iteratee(value, context) { return baseIteratee(value, context, Infinity); } _$1.iteratee = iteratee; // The function we call internally to generate a callback. It invokes // `_.iteratee` if overridden, otherwise `baseIteratee`. function cb(value, context, argCount) { if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context); return baseIteratee(value, context, argCount); } // Returns the results of applying the `iteratee` to each element of `obj`. // In contrast to `_.map` it returns an object. function mapObject(obj, iteratee, context) { iteratee = cb(iteratee, context); var _keys = keys(obj), length = _keys.length, results = {}; for (var index = 0; index < length; index++) { var currentKey = _keys[index]; results[currentKey] = iteratee(obj[currentKey], currentKey, obj); } return results; } // Predicate-generating function. Often useful outside of Underscore. function noop(){} // Generates a function for a given object that returns a given property. function propertyOf(obj) { if (obj == null) return noop; return function(path) { return get(obj, path); }; } // Run a function **n** times. function times(n, iteratee, context) { var accum = Array(Math.max(0, n)); iteratee = optimizeCb(iteratee, context, 1); for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; } // Return a random integer between `min` and `max` (inclusive). function random(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); } // A (possibly faster) way to get the current timestamp as an integer. var now = Date.now || function() { return new Date().getTime(); }; // Internal helper to generate functions for escaping and unescaping strings // to/from HTML interpolation. function createEscaper(map) { var escaper = function(match) { return map[match]; }; // Regexes for identifying a key that needs to be escaped. var source = '(?:' + keys(map).join('|') + ')'; var testRegexp = RegExp(source); var replaceRegexp = RegExp(source, 'g'); return function(string) { string = string == null ? '' : '' + string; return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; }; } // Internal list of HTML entities for escaping. var escapeMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' }; // Function for escaping strings to HTML interpolation. var _escape = createEscaper(escapeMap); // Internal list of HTML entities for unescaping. var unescapeMap = invert(escapeMap); // Function for unescaping strings from HTML interpolation. var _unescape = createEscaper(unescapeMap); // By default, Underscore uses ERB-style template delimiters. Change the // following template settings to use alternative delimiters. var templateSettings = _$1.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }; // When customizing `_.templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\u2028': 'u2028', '\u2029': 'u2029' }; var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; function escapeChar(match) { return '\\' + escapes[match]; } // In order to prevent third-party code injection through // `_.templateSettings.variable`, we test it against the following regular // expression. It is intentionally a bit more liberal than just matching valid // identifiers, but still prevents possible loopholes through defaults or // destructuring assignment. var bareIdentifier = /^\s*(\w|\$)+\s*$/; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. // NB: `oldSettings` only exists for backwards compatibility. function template(text, settings, oldSettings) { if (!settings && oldSettings) settings = oldSettings; settings = defaults({}, settings, _$1.templateSettings); // Combine delimiters into one regular expression via alternation. var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escapeRegExp, escapeChar); index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } // Adobe VMs need the match returned to produce the correct offset. return match; }); source += "';\n"; var argument = settings.variable; if (argument) { // Insure against third-party code injection. (CVE-2021-23358) if (!bareIdentifier.test(argument)) throw new Error( 'variable is not a bare identifier: ' + argument ); } else { // If a variable is not specified, place data values in local scope. source = 'with(obj||{}){\n' + source + '}\n'; argument = 'obj'; } source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; var render; try { render = new Function(argument, '_', source); } catch (e) { e.source = source; throw e; } var template = function(data) { return render.call(this, data, _$1); }; // Provide the compiled source as a convenience for precompilation. template.source = 'function(' + argument + '){\n' + source + '}'; return template; } // Traverses the children of `obj` along `path`. If a child is a function, it // is invoked with its parent as context. Returns the value of the final // child, or `fallback` if any child is undefined. function result(obj, path, fallback) { path = toPath(path); var length = path.length; if (!length) { return isFunction$1(fallback) ? fallback.call(obj) : fallback; } for (var i = 0; i < length; i++) { var prop = obj == null ? void 0 : obj[path[i]]; if (prop === void 0) { prop = fallback; i = length; // Ensure we don't continue iterating. } obj = isFunction$1(prop) ? prop.call(obj) : prop; } return obj; } // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; function uniqueId(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; } // Start chaining a wrapped Underscore object. function chain(obj) { var instance = _$1(obj); instance._chain = true; return instance; } // Internal function to execute `sourceFunc` bound to `context` with optional // `args`. Determines whether to execute a function as a constructor or as a // normal function. function executeBound(sourceFunc, boundFunc, context, callingContext, args) { if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); var self = baseCreate(sourceFunc.prototype); var result = sourceFunc.apply(self, args); if (isObject(result)) return result; return self; } // Partially apply a function by creating a version that has had some of its // arguments pre-filled, without changing its dynamic `this` context. `_` acts // as a placeholder by default, allowing any combination of arguments to be // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. var partial = restArguments(function(func, boundArgs) { var placeholder = partial.placeholder; var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); for (var i = 0; i < length; i++) { args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; } while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; return bound; }); partial.placeholder = _$1; // Create a function bound to a given object (assigning `this`, and arguments, // optionally). var bind = restArguments(function(func, context, args) { if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function'); var bound = restArguments(function(callArgs) { return executeBound(func, bound, context, this, args.concat(callArgs)); }); return bound; }); // Internal helper for collection methods to determine whether a collection // should be iterated as an array or as an object. // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 var isArrayLike = createSizePropertyCheck(getLength); // Internal implementation of a recursive `flatten` function. function flatten$1(input, depth, strict, output) { output = output || []; if (!depth && depth !== 0) { depth = Infinity; } else if (depth <= 0) { return output.concat(input); } var idx = output.length; for (var i = 0, length = getLength(input); i < length; i++) { var value = input[i]; if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { // Flatten current level of array or arguments object. if (depth > 1) { flatten$1(value, depth - 1, strict, output); idx = output.length; } else { var j = 0, len = value.length; while (j < len) output[idx++] = value[j++]; } } else if (!strict) { output[idx++] = value; } } return output; } // Bind a number of an object's methods to that object. Remaining arguments // are the method names to be bound. Useful for ensuring that all callbacks // defined on an object belong to it. var bindAll = restArguments(function(obj, keys) { keys = flatten$1(keys, false, false); var index = keys.length; if (index < 1) throw new Error('bindAll must be passed function names'); while (index--) { var key = keys[index]; obj[key] = bind(obj[key], obj); } return obj; }); // Memoize an expensive function by storing its results. function memoize(func, hasher) { var memoize = function(key) { var cache = memoize.cache; var address = '' + (hasher ? hasher.apply(this, arguments) : key); if (!has$1(cache, address)) cache[address] = func.apply(this, arguments); return cache[address]; }; memoize.cache = {}; return memoize; } // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. var delay = restArguments(function(func, wait, args) { return setTimeout(function() { return func.apply(null, args); }, wait); }); // Defers a function, scheduling it to run after the current call stack has // cleared. var defer = partial(delay, _$1, 1); // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run // as much as it can, without ever going more than once per `wait` duration; // but if you'd like to disable the execution on the leading edge, pass // `{leading: false}`. To disable execution on the trailing edge, ditto. function throttle(func, wait, options) { var timeout, context, args, result; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; var throttled = function() { var _now = now(); if (!previous && options.leading === false) previous = _now; var remaining = wait - (_now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = _now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; throttled.cancel = function() { clearTimeout(timeout); previous = 0; timeout = context = args = null; }; return throttled; } // When a sequence of calls of the returned function ends, the argument // function is triggered. The end of a sequence is defined by the `wait` // parameter. If `immediate` is passed, the argument function will be // triggered at the beginning of the sequence instead of at the end. function debounce(func, wait, immediate) { var timeout, previous, args, result, context; var later = function() { var passed = now() - previous; if (wait > passed) { timeout = setTimeout(later, wait - passed); } else { timeout = null; if (!immediate) result = func.apply(context, args); // This check is needed because `func` can recursively invoke `debounced`. if (!timeout) args = context = null; } }; var debounced = restArguments(function(_args) { context = this; args = _args; previous = now(); if (!timeout) { timeout = setTimeout(later, wait); if (immediate) result = func.apply(context, args); } return result; }); debounced.cancel = function() { clearTimeout(timeout); timeout = args = context = null; }; return debounced; } // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. function wrap(func, wrapper) { return partial(wrapper, func); } // Returns a negated version of the passed-in predicate. function negate(predicate) { return function() { return !predicate.apply(this, arguments); }; } // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. function compose() { var args = arguments; var start = args.length - 1; return function() { var i = start; var result = args[start].apply(this, arguments); while (i--) result = args[i].call(this, result); return result; }; } // Returns a function that will only be executed on and after the Nth call. function after(times, func) { return function() { if (--times < 1) { return func.apply(this, arguments); } }; } // Returns a function that will only be executed up to (but not including) the // Nth call. function before(times, func) { var memo; return function() { if (--times > 0) { memo = func.apply(this, arguments); } if (times <= 1) func = null; return memo; }; } // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. var once = partial(before, 2); // Returns the first key on an object that passes a truth test. function findKey(obj, predicate, context) { predicate = cb(predicate, context); var _keys = keys(obj), key; for (var i = 0, length = _keys.length; i < length; i++) { key = _keys[i]; if (predicate(obj[key], key, obj)) return key; } } // Internal function to generate `_.findIndex` and `_.findLastIndex`. function createPredicateIndexFinder(dir) { return function(array, predicate, context) { predicate = cb(predicate, context); var length = getLength(array); var index = dir > 0 ? 0 : length - 1; for (; index >= 0 && index < length; index += dir) { if (predicate(array[index], index, array)) return index; } return -1; }; } // Returns the first index on an array-like that passes a truth test. var findIndex = createPredicateIndexFinder(1); // Returns the last index on an array-like that passes a truth test. var findLastIndex = createPredicateIndexFinder(-1); // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. function sortedIndex(array, obj, iteratee, context) { iteratee = cb(iteratee, context, 1); var value = iteratee(obj); var low = 0, high = getLength(array); while (low < high) { var mid = Math.floor((low + high) / 2); if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; } return low; } // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. function createIndexFinder(dir, predicateFind, sortedIndex) { return function(array, item, idx) { var i = 0, length = getLength(array); if (typeof idx == 'number') { if (dir > 0) { i = idx >= 0 ? idx : Math.max(idx + length, i); } else { length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; } } else if (sortedIndex && idx && length) { idx = sortedIndex(array, item); return array[idx] === item ? idx : -1; } if (item !== item) { idx = predicateFind(slice.call(array, i, length), isNaN$1); return idx >= 0 ? idx + i : -1; } for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { if (array[idx] === item) return idx; } return -1; }; } // Return the position of the first occurrence of an item in an array, // or -1 if the item is not included in the array. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. var indexOf = createIndexFinder(1, findIndex, sortedIndex); // Return the position of the last occurrence of an item in an array, // or -1 if the item is not included in the array. var lastIndexOf = createIndexFinder(-1, findLastIndex); // Return the first value which passes a truth test. function find(obj, predicate, context) { var keyFinder = isArrayLike(obj) ? findIndex : findKey; var key = keyFinder(obj, predicate, context); if (key !== void 0 && key !== -1) return obj[key]; } // Convenience version of a common use case of `_.find`: getting the first // object containing specific `key:value` pairs. function findWhere(obj, attrs) { return find(obj, matcher(attrs)); } // The cornerstone for collection functions, an `each` // implementation, aka `forEach`. // Handles raw objects in addition to array-likes. Treats all // sparse array-likes as if they were dense. function each(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; if (isArrayLike(obj)) { for (i = 0, length = obj.length; i < length; i++) { iteratee(obj[i], i, obj); } } else { var _keys = keys(obj); for (i = 0, length = _keys.length; i < length; i++) { iteratee(obj[_keys[i]], _keys[i], obj); } } return obj; } // Return the results of applying the iteratee to each element. function map(obj, iteratee, context) { iteratee = cb(iteratee, context); var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length, results = Array(length); for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; results[index] = iteratee(obj[currentKey], currentKey, obj); } return results; } // Internal helper to create a reducing function, iterating left or right. function createReduce(dir) { // Wrap code that reassigns argument variables in a separate function than // the one that accesses `arguments.length` to avoid a perf hit. (#1991) var reducer = function(obj, iteratee, memo, initial) { var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length, index = dir > 0 ? 0 : length - 1; if (!initial) { memo = obj[_keys ? _keys[index] : index]; index += dir; } for (; index >= 0 && index < length; index += dir) { var currentKey = _keys ? _keys[index] : index; memo = iteratee(memo, obj[currentKey], currentKey, obj); } return memo; }; return function(obj, iteratee, memo, context) { var initial = arguments.length >= 3; return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); }; } // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. var reduce = createReduce(1); // The right-associative version of reduce, also known as `foldr`. var reduceRight = createReduce(-1); // Return all the elements that pass a truth test. function filter(obj, predicate, context) { var results = []; predicate = cb(predicate, context); each(obj, function(value, index, list) { if (predicate(value, index, list)) results.push(value); }); return results; } // Return all the elements for which a truth test fails. function reject(obj, predicate, context) { return filter(obj, negate(cb(predicate)), context); } // Determine whether all of the elements pass a truth test. function every(obj, predicate, context) { predicate = cb(predicate, context); var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; if (!predicate(obj[currentKey], currentKey, obj)) return false; } return true; } // Determine if at least one element in the object passes a truth test. function some(obj, predicate, context) { predicate = cb(predicate, context); var _keys = !isArrayLike(obj) && keys(obj), length = (_keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; if (predicate(obj[currentKey], currentKey, obj)) return true; } return false; } // Determine if the array or object contains a given item (using `===`). function contains(obj, item, fromIndex, guard) { if (!isArrayLike(obj)) obj = values(obj); if (typeof fromIndex != 'number' || guard) fromIndex = 0; return indexOf(obj, item, fromIndex) >= 0; } // Invoke a method (with arguments) on every item in a collection. var invoke = restArguments(function(obj, path, args) { var contextPath, func; if (isFunction$1(path)) { func = path; } else { path = toPath(path); contextPath = path.slice(0, -1); path = path[path.length - 1]; } return map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); }); // Convenience version of a common use case of `_.map`: fetching a property. function pluck(obj, key) { return map(obj, property(key)); } // Convenience version of a common use case of `_.filter`: selecting only // objects containing specific `key:value` pairs. function where(obj, attrs) { return filter(obj, matcher(attrs)); } // Return the maximum element (or element-based computation). function max(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value > result) { result = value; } } } else { iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) { result = v; lastComputed = computed; } }); } return result; } // Return the minimum element (or element-based computation). function min(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value < result) { result = value; } } } else { iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed < lastComputed || (computed === Infinity && result === Infinity)) { result = v; lastComputed = computed; } }); } return result; } // Safely create a real, live array from anything iterable. var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; function toArray(obj) { if (!obj) return []; if (isArray(obj)) return slice.call(obj); if (isString(obj)) { // Keep surrogate pair characters together. return obj.match(reStrSymbol); } if (isArrayLike(obj)) return map(obj, identity); return values(obj); } // Sample **n** random values from a collection using the modern version of the // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `_.map`. function sample(obj, n, guard) { if (n == null || guard) { if (!isArrayLike(obj)) obj = values(obj); return obj[random(obj.length - 1)]; } var sample = toArray(obj); var length = getLength(sample); n = Math.max(Math.min(n, length), 0); var last = length - 1; for (var index = 0; index < n; index++) { var rand = random(index, last); var temp = sample[index]; sample[index] = sample[rand]; sample[rand] = temp; } return sample.slice(0, n); } // Shuffle a collection. function shuffle(obj) { return sample(obj, Infinity); } // Sort the object's values by a criterion produced by an iteratee. function sortBy(obj, iteratee, context) { var index = 0; iteratee = cb(iteratee, context); return pluck(map(obj, function(value, key, list) { return { value: value, index: index++, criteria: iteratee(value, key, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index - right.index; }), 'value'); } // An internal function used for aggregate "group by" operations. function group(behavior, partition) { return function(obj, iteratee, context) { var result = partition ? [[], []] : {}; iteratee = cb(iteratee, context); each(obj, function(value, index) { var key = iteratee(value, index, obj); behavior(result, value, key); }); return result; }; } // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. var groupBy = group(function(result, value, key) { if (has$1(result, key)) result[key].push(value); else result[key] = [value]; }); // Indexes the object's values by a criterion, similar to `_.groupBy`, but for // when you know that your index values will be unique. var indexBy = group(function(result, value, key) { result[key] = value; }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. var countBy = group(function(result, value, key) { if (has$1(result, key)) result[key]++; else result[key] = 1; }); // Split a collection into two arrays: one whose elements all pass the given // truth test, and one whose elements all do not pass the truth test. var partition = group(function(result, value, pass) { result[pass ? 0 : 1].push(value); }, true); // Return the number of elements in a collection. function size(obj) { if (obj == null) return 0; return isArrayLike(obj) ? obj.length : keys(obj).length; } // Internal `_.pick` helper function to determine whether `key` is an enumerable // property name of `obj`. function keyInObj(value, key, obj) { return key in obj; } // Return a copy of the object only containing the allowed properties. var pick = restArguments(function(obj, keys) { var result = {}, iteratee = keys[0]; if (obj == null) return result; if (isFunction$1(iteratee)) { if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); keys = allKeys(obj); } else { iteratee = keyInObj; keys = flatten$1(keys, false, false); obj = Object(obj); } for (var i = 0, length = keys.length; i < length; i++) { var key = keys[i]; var value = obj[key]; if (iteratee(value, key, obj)) result[key] = value; } return result; }); // Return a copy of the object without the disallowed properties. var omit = restArguments(function(obj, keys) { var iteratee = keys[0], context; if (isFunction$1(iteratee)) { iteratee = negate(iteratee); if (keys.length > 1) context = keys[1]; } else { keys = map(flatten$1(keys, false, false), String); iteratee = function(value, key) { return !contains(keys, key); }; } return pick(obj, iteratee, context); }); // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. function initial(array, n, guard) { return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); } // Get the first element of an array. Passing **n** will return the first N // values in the array. The **guard** check allows it to work with `_.map`. function first(array, n, guard) { if (array == null || array.length < 1) return n == null || guard ? void 0 : []; if (n == null || guard) return array[0]; return initial(array, array.length - n); } // Returns everything but the first entry of the `array`. Especially useful on // the `arguments` object. Passing an **n** will return the rest N values in the // `array`. function rest(array, n, guard) { return slice.call(array, n == null || guard ? 1 : n); } // Get the last element of an array. Passing **n** will return the last N // values in the array. function last(array, n, guard) { if (array == null || array.length < 1) return n == null || guard ? void 0 : []; if (n == null || guard) return array[array.length - 1]; return rest(array, Math.max(0, array.length - n)); } // Trim out all falsy values from an array. function compact(array) { return filter(array, Boolean); } // Flatten out an array, either recursively (by default), or up to `depth`. // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. function flatten(array, depth) { return flatten$1(array, depth, false); } // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. var difference = restArguments(function(array, rest) { rest = flatten$1(rest, true, true); return filter(array, function(value){ return !contains(rest, value); }); }); // Return a version of the array that does not contain the specified value(s). var without = restArguments(function(array, otherArrays) { return difference(array, otherArrays); }); // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // The faster algorithm will not work with an iteratee if the iteratee // is not a one-to-one function, so providing an iteratee will disable // the faster algorithm. function uniq(array, isSorted, iteratee, context) { if (!isBoolean(isSorted)) { context = iteratee; iteratee = isSorted; isSorted = false; } if (iteratee != null) iteratee = cb(iteratee, context); var result = []; var seen = []; for (var i = 0, length = getLength(array); i < length; i++) { var value = array[i], computed = iteratee ? iteratee(value, i, array) : value; if (isSorted && !iteratee) { if (!i || seen !== computed) result.push(value); seen = computed; } else if (iteratee) { if (!contains(seen, computed)) { seen.push(computed); result.push(value); } } else if (!contains(result, value)) { result.push(value); } } return result; } // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. var union = restArguments(function(arrays) { return uniq(flatten$1(arrays, true, true)); }); // Produce an array that contains every item shared between all the // passed-in arrays. function intersection(array) { var result = []; var argsLength = arguments.length; for (var i = 0, length = getLength(array); i < length; i++) { var item = array[i]; if (contains(result, item)) continue; var j; for (j = 1; j < argsLength; j++) { if (!contains(arguments[j], item)) break; } if (j === argsLength) result.push(item); } return result; } // Complement of zip. Unzip accepts an array of arrays and groups // each array's elements on shared indices. function unzip(array) { var length = (array && max(array, getLength).length) || 0; var result = Array(length); for (var index = 0; index < length; index++) { result[index] = pluck(array, index); } return result; } // Zip together multiple lists into a single array -- elements that share // an index go together. var zip = restArguments(unzip); // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. Passing by pairs is the reverse of `_.pairs`. function object(list, values) { var result = {}; for (var i = 0, length = getLength(list); i < length; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; } // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](https://docs.python.org/library/functions.html#range). function range(start, stop, step) { if (stop == null) { stop = start || 0; start = 0; } if (!step) { step = stop < start ? -1 : 1; } var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); for (var idx = 0; idx < length; idx++, start += step) { range[idx] = start; } return range; } // Chunk a single array into multiple arrays, each containing `count` or fewer // items. function chunk(array, count) { if (count == null || count < 1) return []; var result = []; var i = 0, length = array.length; while (i < length) { result.push(slice.call(array, i, i += count)); } return result; } // Helper function to continue chaining intermediate results. function chainResult(instance, obj) { return instance._chain ? _$1(obj).chain() : obj; } // Add your own custom functions to the Underscore object. function mixin(obj) { each(functions(obj), function(name) { var func = _$1[name] = obj[name]; _$1.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return chainResult(this, func.apply(_$1, args)); }; }); return _$1; } // Add all mutator `Array` functions to the wrapper. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _$1.prototype[name] = function() { var obj = this._wrapped; if (obj != null) { method.apply(obj, arguments); if ((name === 'shift' || name === 'splice') && obj.length === 0) { delete obj[0]; } } return chainResult(this, obj); }; }); // Add all accessor `Array` functions to the wrapper. each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _$1.prototype[name] = function() { var obj = this._wrapped; if (obj != null) obj = method.apply(obj, arguments); return chainResult(this, obj); }; }); // Named Exports var allExports = { __proto__: null, VERSION: VERSION, restArguments: restArguments, isObject: isObject, isNull: isNull, isUndefined: isUndefined, isBoolean: isBoolean, isElement: isElement, isString: isString, isNumber: isNumber, isDate: isDate, isRegExp: isRegExp, isError: isError, isSymbol: isSymbol, isArrayBuffer: isArrayBuffer, isDataView: isDataView$1, isArray: isArray, isFunction: isFunction$1, isArguments: isArguments$1, isFinite: isFinite$1, isNaN: isNaN$1, isTypedArray: isTypedArray$1, isEmpty: isEmpty, isMatch: isMatch, isEqual: isEqual, isMap: isMap, isWeakMap: isWeakMap, isSet: isSet, isWeakSet: isWeakSet, keys: keys, allKeys: allKeys, values: values, pairs: pairs, invert: invert, functions: functions, methods: functions, extend: extend, extendOwn: extendOwn, assign: extendOwn, defaults: defaults, create: create, clone: clone, tap: tap, get: get, has: has, mapObject: mapObject, identity: identity, constant: constant, noop: noop, toPath: toPath$1, property: property, propertyOf: propertyOf, matcher: matcher, matches: matcher, times: times, random: random, now: now, escape: _escape, unescape: _unescape, templateSettings: templateSettings, template: template, result: result, uniqueId: uniqueId, chain: chain, iteratee: iteratee, partial: partial, bind: bind, bindAll: bindAll, memoize: memoize, delay: delay, defer: defer, throttle: throttle, debounce: debounce, wrap: wrap, negate: negate, compose: compose, after: after, before: before, once: once, findKey: findKey, findIndex: findIndex, findLastIndex: findLastIndex, sortedIndex: sortedIndex, indexOf: indexOf, lastIndexOf: lastIndexOf, find: find, detect: find, findWhere: findWhere, each: each, forEach: each, map: map, collect: map, reduce: reduce, foldl: reduce, inject: reduce, reduceRight: reduceRight, foldr: reduceRight, filter: filter, select: filter, reject: reject, every: every, all: every, some: some, any: some, contains: contains, includes: contains, include: contains, invoke: invoke, pluck: pluck, where: where, max: max, min: min, shuffle: shuffle, sample: sample, sortBy: sortBy, groupBy: groupBy, indexBy: indexBy, countBy: countBy, partition: partition, toArray: toArray, size: size, pick: pick, omit: omit, first: first, head: first, take: first, initial: initial, last: last, rest: rest, tail: rest, drop: rest, compact: compact, flatten: flatten, without: without, uniq: uniq, unique: uniq, union: union, intersection: intersection, difference: difference, unzip: unzip, transpose: unzip, zip: zip, object: object, range: range, chunk: chunk, mixin: mixin, 'default': _$1 }; // Default Export // Add all of the Underscore functions to the wrapper object. var _ = mixin(allExports); // Legacy Node.js API. _._ = _; return _; }))); PK\xUUwp-list-revisions.min.jsnu[/*! This file is auto-generated */ !function(e){function t(){var e=document.getElementById("post-revisions"),n=e?e.getElementsByTagName("input"):[];e.onclick=function(){for(var e,t=0,i=0;i{var i={175:e=>{var t=wp.media.view.MediaFrame.MediaDetails,i=wp.media.controller.MediaLibrary,a=wp.media.view.l10n,s=t.extend({defaults:{id:"audio",url:"",menu:"audio-details",content:"audio-details",toolbar:"audio-details",type:"link",title:a.audioDetailsTitle,priority:120},initialize:function(e){e.DetailsView=wp.media.view.AudioDetails,e.cancelText=a.audioDetailsCancel,e.addText=a.audioAddSourceTitle,t.prototype.initialize.call(this,e)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-audio",this.renderReplaceToolbar,this),this.on("toolbar:render:add-audio-source",this.renderAddSourceToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new i({type:"audio",id:"replace-audio",title:a.audioReplaceTitle,toolbar:"replace-audio",media:this.media,menu:"audio-details"}),new i({type:"audio",id:"add-audio-source",title:a.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}});e.exports=s},241:e=>{var t=Backbone.Model.extend({initialize:function(){this.attachment=!1},setSource:function(e){this.attachment=e,this.extension=e.get("filename").split(".").pop(),this.get("src")&&this.extension===this.get("src").split(".").pop()&&this.unset("src"),_.contains(wp.media.view.settings.embedExts,this.extension)?this.set(this.extension,this.attachment.get("url")):this.unset(this.extension)},changeAttachment:function(e){this.setSource(e),this.unset("src"),_.each(_.without(wp.media.view.settings.embedExts,this.extension),function(e){this.unset(e)},this)}});e.exports=t},741:e=>{var t=wp.media.view.MediaFrame.Select,i=wp.media.view.l10n,a=t.extend({defaults:{id:"media",url:"",menu:"media-details",content:"media-details",toolbar:"media-details",type:"link",priority:120},initialize:function(e){this.DetailsView=e.DetailsView,this.cancelText=e.cancelText,this.addText=e.addText,this.media=new wp.media.model.PostMedia(e.metadata),this.options.selection=new wp.media.model.Selection(this.media.attachment,{multiple:!1}),t.prototype.initialize.apply(this,arguments)},bindHandlers:function(){var e=this.defaults.menu;t.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:"+e,this.createMenu,this),this.on("content:render:"+e,this.renderDetailsContent,this),this.on("menu:render:"+e,this.renderMenu,this),this.on("toolbar:render:"+e,this.renderDetailsToolbar,this)},renderDetailsContent:function(){var e=new this.DetailsView({controller:this,model:this.state().media,attachment:this.state().media.attachment}).render();this.content.set(e)},renderMenu:function(e){var t=this.lastState(),i=t&&t.id,a=this;e.set({cancel:{text:this.cancelText,priority:20,click:function(){i?a.setState(i):a.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},setPrimaryButton:function(e,t){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{button:{style:"primary",text:e,priority:80,click:function(){var e=this.controller;t.call(this,e,e.state()),e.setState(e.options.state),e.reset()}}}}))},renderDetailsToolbar:function(){this.setPrimaryButton(i.update,function(e,t){e.close(),t.trigger("update",e.media.toJSON())})},renderReplaceToolbar:function(){this.setPrimaryButton(i.replace,function(e,t){var i=t.get("selection").single();e.media.changeAttachment(i),t.trigger("replace",e.media.toJSON())})},renderAddSourceToolbar:function(){this.setPrimaryButton(this.addText,function(e,t){var i=t.get("selection").single();e.media.setSource(i),t.trigger("add-source",e.media.toJSON())})}});e.exports=a},1206:e=>{var t=wp.media.controller.State,i=wp.media.view.l10n,i=t.extend({defaults:{id:"audio-details",toolbar:"audio-details",title:i.audioDetailsTitle,content:"audio-details",menu:"audio-details",router:!1,priority:60},initialize:function(e){this.media=e.media,t.prototype.initialize.apply(this,arguments)}});e.exports=i},3713:e=>{var t=wp.media.view.MediaDetails,i=t.extend({className:"audio-details",template:wp.template("audio-details"),setMedia:function(){var e=this.$(".wp-audio-shortcode");return e.find("source").length?(e.is(":hidden")&&e.show(),this.media=t.prepareSrc(e.get(0))):(e.hide(),this.media=!1),this}});e.exports=i},5039:e=>{var t=wp.media.controller.State,i=wp.media.view.l10n,i=t.extend({defaults:{id:"video-details",toolbar:"video-details",title:i.videoDetailsTitle,content:"video-details",menu:"video-details",router:!1,priority:60},initialize:function(e){this.media=e.media,t.prototype.initialize.apply(this,arguments)}});e.exports=i},5836:e=>{var t=wp.media.view.MediaDetails,i=t.extend({className:"video-details",template:wp.template("video-details"),setMedia:function(){var e=this.$(".wp-video-shortcode");return e.find("source").length?(e.is(":hidden")&&e.show(),e.hasClass("youtube-video")||e.hasClass("vimeo-video")?this.media=e.get(0):this.media=t.prepareSrc(e.get(0))):(e.hide(),this.media=!1),this}});e.exports=i},8646:e=>{var t=wp.media.view.MediaFrame.MediaDetails,i=wp.media.controller.MediaLibrary,a=wp.media.view.l10n,s=t.extend({defaults:{id:"video",url:"",menu:"video-details",content:"video-details",toolbar:"video-details",type:"link",title:a.videoDetailsTitle,priority:120},initialize:function(e){e.DetailsView=wp.media.view.VideoDetails,e.cancelText=a.videoDetailsCancel,e.addText=a.videoAddSourceTitle,t.prototype.initialize.call(this,e)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-video",this.renderReplaceToolbar,this),this.on("toolbar:render:add-video-source",this.renderAddSourceToolbar,this),this.on("toolbar:render:select-poster-image",this.renderSelectPosterImageToolbar,this),this.on("toolbar:render:add-track",this.renderAddTrackToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.VideoDetails({media:this.media}),new i({type:"video",id:"replace-video",title:a.videoReplaceTitle,toolbar:"replace-video",media:this.media,menu:"video-details"}),new i({type:"video",id:"add-video-source",title:a.videoAddSourceTitle,toolbar:"add-video-source",media:this.media,menu:!1}),new i({type:"image",id:"select-poster-image",title:a.videoSelectPosterImageTitle,toolbar:"select-poster-image",media:this.media,menu:"video-details"}),new i({type:"text",id:"add-track",title:a.videoAddTrackTitle,toolbar:"add-track",media:this.media,menu:"video-details"})])},renderSelectPosterImageToolbar:function(){this.setPrimaryButton(a.videoSelectPosterImageTitle,function(t,e){var i=[],a=e.get("selection").single();t.media.set("poster",a.get("url")),e.trigger("set-poster-image",t.media.toJSON()),_.each(wp.media.view.settings.embedExts,function(e){t.media.get(e)&&i.push(t.media.get(e))}),wp.ajax.send("set-attachment-thumbnail",{data:{_ajax_nonce:wp.media.view.settings.nonce.setAttachmentThumbnail,urls:i,thumbnail_id:a.get("id")}})})},renderAddTrackToolbar:function(){this.setPrimaryButton(a.videoAddTrackTitle,function(e,t){var i=t.get("selection").single(),a=e.media.get("content");-1===a.indexOf(i.get("url"))&&(a+=[''].join(""),e.media.set("content",a)),t.trigger("add-track",e.media.toJSON())})}});e.exports=s},9467:e=>{var t=wp.media.view.Settings.AttachmentDisplay,i=jQuery,a=t.extend({initialize:function(){_.bindAll(this,"success"),this.players=[],this.listenTo(this.controller.states,"close",wp.media.mixin.unsetPlayers),this.on("ready",this.setPlayer),this.on("media:setting:remove",wp.media.mixin.unsetPlayers,this),this.on("media:setting:remove",this.render),this.on("media:setting:remove",this.setPlayer),t.prototype.initialize.apply(this,arguments)},events:function(){return _.extend({"click .remove-setting":"removeSetting","change .content-track":"setTracks","click .remove-track":"setTracks","click .add-media-source":"addSource"},t.prototype.events)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},removeSetting:function(e){var e=i(e.currentTarget).parent(),t=e.find("input").data("setting");t&&(this.model.unset(t),this.trigger("media:setting:remove",this)),e.remove()},setTracks:function(){var t="";_.each(this.$(".content-track"),function(e){t+=i(e).val()}),this.model.set("content",t),this.trigger("media:setting:remove",this)},addSource:function(e){this.controller.lastMime=i(e.currentTarget).data("mime"),this.controller.setState("add-"+this.controller.defaults.id+"-source")},loadPlayer:function(){this.players.push(new MediaElementPlayer(this.media,this.settings)),this.scriptXhr=!1},setPlayer:function(){var e;this.players.length||!this.media||this.scriptXhr||((e=this.model.get("src"))&&-1hK$y 'H,?Y7,4-?~`2/Z2G%|想v0DzPC9O cК%3|v8ӅY#4e>!`B6Y$aFNт 9>8E (>pBRgr:d>̈R4 LB+vOP*cB }!{͠,3~^H85 0w)B8  "5UbFH3I6 M ]?BI  nt?|_eRu"gG5ujBxy'Ț(}KB0o2WL@| Y c߲B@-!Wv6VMZQJ}+HqE\»?]!3GJH+ZV>"Jcjr0!t5ZXc]b1IJw$VF|id{ah첦ܾ҄_>CV["%_=֠w.+$0#jFV߽0tK!BN'I`FԌ>::kR?zFI`FԌ?\/#3,Tu URj>}%8QHD^'EGݖJNP!/|ݰ ~,140 0 0 0 0 0 0 0Jņ6b-WKtMln,d=;sAnJ %tÓ,`~&s|7 Erǔv2B=uv`Ì2j9m#u$gcGqL&le~f#h Ҏ7M4/-ҎO1`Xv-*lE#4fIDɒfht QrZs(ur$G+WvJvZ҈\АYG#ھ22TGáɴ_?^ 8w8*&NHPK$ԉpi9_we*9!QT%ByبV'r;&O {Y ͛~ΏyVh`uh R3ACJ;f"!),lhePځXVa.w=fdOUO:wH٣`<J1G Yᄐ}}2$GZATǜ rJt*Ͳ ZTdNHB3Bҝ2X /ѷ-kK-xan';s@(ްQ]͞q=c 5}B{ζ?50sdzt{n@קO[܃%.Xy9&ng %pZ"/aq*ؔn7PϢ/M=M}^)O4aѼEG,j qե uue=Ww{=rku :θkk rg,ٽs,i483,ZzwGèСw}S6wB\/W70!"*?;a cḡg)HZo.r' zOQxÑ},1=o->zQXbڴpLQpXoJY0bDQ!^"yֳU4;,?VlD:Y&ma@ lT2l!y|b^%1tDOS0A/iQC<=5% iܒVbӠmA텞n{q0HuӃ!R'@Vz5S'\.g%EFJwisA`#tA=\(A z+\-r@ȁ-b1ʀ*B9~ AU((f2ޡؚ>bkm[[`hG5 )kagᷴkAF8844}F'H9qlfE~[4 =*9rzf${xR LINh J3ze*I>Cy96`L}!f0 caL aKG`E6aD.}U怎ͽ |-i)lA`0,*Z`^~~Keyl|v0QS/bZ&\V,@.jHs<_4Q0pYZlo!Ї%ґ'-}zM9 yqbw+ʼԺR?HIENDB`PK\TXt  $mediaelement/mediaelement-migrate.jsnu[/* global console, MediaElementPlayer, mejs */ (function ( window, $ ) { // Reintegrate `plugins` since they don't exist in MEJS anymore; it won't affect anything in the player if (mejs.plugins === undefined) { mejs.plugins = {}; mejs.plugins.silverlight = []; mejs.plugins.silverlight.push({ types: [] }); } // Inclusion of old `HtmlMediaElementShim` if it doesn't exist mejs.HtmlMediaElementShim = mejs.HtmlMediaElementShim || { getTypeFromFile: mejs.Utils.getTypeFromFile }; // Add missing global variables for backward compatibility if (mejs.MediaFeatures === undefined) { mejs.MediaFeatures = mejs.Features; } if (mejs.Utility === undefined) { mejs.Utility = mejs.Utils; } /** * Create missing variables and have default `classPrefix` overridden to avoid issues. * * `media` is now a fake wrapper needed to simplify manipulation of various media types, * so in order to access the `video` or `audio` tag, use `media.originalNode` or `player.node`; * `player.container` used to be jQuery but now is a HTML element, and many elements inside * the player rely on it being a HTML now, so its conversion is difficult; however, a * `player.$container` new variable has been added to be used as jQuery object */ var init = MediaElementPlayer.prototype.init; MediaElementPlayer.prototype.init = function () { this.options.classPrefix = 'mejs-'; this.$media = this.$node = $( this.node ); init.call( this ); }; var ready = MediaElementPlayer.prototype._meReady; MediaElementPlayer.prototype._meReady = function () { this.container = $( this.container) ; this.controls = $( this.controls ); this.layers = $( this.layers ); ready.apply( this, arguments ); }; // Override method so certain elements can be called with jQuery MediaElementPlayer.prototype.getElement = function ( el ) { return $ !== undefined && el instanceof $ ? el[0] : el; }; // Add jQuery ONLY to most of custom features' arguments for backward compatibility; default features rely 100% // on the arguments being HTML elements to work properly MediaElementPlayer.prototype.buildfeatures = function ( player, controls, layers, media ) { var defaultFeatures = [ 'playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen' ]; for (var i = 0, total = this.options.features.length; i < total; i++) { var feature = this.options.features[i]; if (this['build' + feature]) { try { // Use jQuery for non-default features if (defaultFeatures.indexOf(feature) === -1) { this['build' + feature]( player, $(controls), $(layers), media ); } else { this['build' + feature]( player, controls, layers, media ); } } catch (e) { console.error( 'error building ' + feature, e ); } } } }; })( window, jQuery ); PK\i!#>#>#mediaelement/mediaelementplayer.cssnu[/* Accessibility: hide screen reader texts (and prefer "top" for RTL languages). Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */ .mejs__offscreen { border: 0; clip: rect( 1px, 1px, 1px, 1px ); -webkit-clip-path: inset( 50% ); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; } .mejs__container { background: #000; box-sizing: border-box; font-family: 'Helvetica', Arial, serif; position: relative; text-align: left; text-indent: 0; vertical-align: top; } .mejs__container * { box-sizing: border-box; } /* Hide native play button and control bar from iOS to favor plugin button */ .mejs__container video::-webkit-media-controls, .mejs__container video::-webkit-media-controls-panel, .mejs__container video::-webkit-media-controls-panel-container, .mejs__container video::-webkit-media-controls-start-playback-button { -webkit-appearance: none; display: none !important; } .mejs__fill-container, .mejs__fill-container .mejs__container { height: 100%; width: 100%; } .mejs__fill-container { background: transparent; margin: 0 auto; overflow: hidden; position: relative; } .mejs__container:focus { outline: none; } .mejs__iframe-overlay { height: 100%; position: absolute; width: 100%; } .mejs__embed, .mejs__embed body { background: #000; height: 100%; margin: 0; overflow: hidden; padding: 0; width: 100%; } .mejs__fullscreen { overflow: hidden !important; } .mejs__container-fullscreen { bottom: 0; left: 0; overflow: hidden; position: fixed; right: 0; top: 0; z-index: 1000; } .mejs__container-fullscreen .mejs__mediaelement, .mejs__container-fullscreen video { height: 100% !important; width: 100% !important; } /* Start: LAYERS */ .mejs__background { left: 0; position: absolute; top: 0; } .mejs__mediaelement { height: 100%; left: 0; position: absolute; top: 0; width: 100%; z-index: 0; } .mejs__poster { background-position: 50% 50%; background-repeat: no-repeat; background-size: cover; left: 0; position: absolute; top: 0; z-index: 1; } :root .mejs__poster-img { display: none; } .mejs__poster-img { border: 0; padding: 0; } .mejs__overlay { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; left: 0; position: absolute; top: 0; } .mejs__layer { z-index: 1; } .mejs__overlay-play { cursor: pointer; } .mejs__overlay-button { background: url('mejs-controls.svg') no-repeat; background-position: 0 -39px; height: 80px; width: 80px; } .mejs__overlay:hover > .mejs__overlay-button { background-position: -80px -39px; } .mejs__overlay-loading { height: 80px; width: 80px; } .mejs__overlay-loading-bg-img { -webkit-animation: mejs__loading-spinner 1s linear infinite; animation: mejs__loading-spinner 1s linear infinite; background: transparent url('mejs-controls.svg') -160px -40px no-repeat; display: block; height: 80px; width: 80px; z-index: 1; } @-webkit-keyframes mejs__loading-spinner { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes mejs__loading-spinner { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } /* End: LAYERS */ /* Start: CONTROL BAR */ .mejs__controls { bottom: 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; height: 40px; left: 0; list-style-type: none; margin: 0; padding: 0 10px; position: absolute; width: 100%; z-index: 3; } .mejs__controls:not([style*='display: none']) { background: rgba(255, 0, 0, 0.7); background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.35)); } .mejs__button, .mejs__time, .mejs__time-rail { font-size: 10px; height: 40px; line-height: 10px; margin: 0; width: 32px; } .mejs__button > button { background: transparent url('mejs-controls.svg'); border: 0; cursor: pointer; display: block; font-size: 0; height: 20px; line-height: 0; margin: 10px 6px; overflow: hidden; padding: 0; position: absolute; text-decoration: none; width: 20px; } /* :focus for accessibility */ .mejs__button > button:focus { outline: dotted 1px #999; } .mejs__container-keyboard-inactive a, .mejs__container-keyboard-inactive a:focus, .mejs__container-keyboard-inactive button, .mejs__container-keyboard-inactive button:focus, .mejs__container-keyboard-inactive [role=slider], .mejs__container-keyboard-inactive [role=slider]:focus { outline: 0; } /* End: CONTROL BAR */ /* Start: Time (Current / Duration) */ .mejs__time { box-sizing: content-box; color: #fff; font-size: 11px; font-weight: bold; height: 24px; overflow: hidden; padding: 16px 6px 0; text-align: center; width: auto; } /* End: Time (Current / Duration) */ /* Start: Play/Pause/Stop */ .mejs__play > button { background-position: 0 0; } .mejs__pause > button { background-position: -20px 0; } .mejs__replay > button { background-position: -160px 0; } /* End: Play/Pause/Stop */ /* Start: Progress Bar */ .mejs__time-rail { direction: ltr; -webkit-box-flex: 1; -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; height: 40px; margin: 0 10px; padding-top: 10px; position: relative; } .mejs__time-total, .mejs__time-buffering, .mejs__time-loaded, .mejs__time-current, .mejs__time-float, .mejs__time-hovered, .mejs__time-float-current, .mejs__time-float-corner, .mejs__time-marker { border-radius: 2px; cursor: pointer; display: block; height: 10px; position: absolute; } .mejs__time-total { background: rgba(255, 255, 255, 0.3); margin: 5px 0 0; width: 100%; } .mejs__time-buffering { -webkit-animation: buffering-stripes 2s linear infinite; animation: buffering-stripes 2s linear infinite; background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent); background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent); background-size: 15px 15px; width: 100%; } @-webkit-keyframes buffering-stripes { from { background-position: 0 0; } to { background-position: 30px 0; } } @keyframes buffering-stripes { from { background-position: 0 0; } to { background-position: 30px 0; } } .mejs__time-loaded { background: rgba(255, 255, 255, 0.3); } .mejs__time-current, .mejs__time-handle-content { background: rgba(255, 255, 255, 0.9); } .mejs__time-hovered { background: rgba(255, 255, 255, 0.5); z-index: 10; } .mejs__time-hovered.negative { background: rgba(0, 0, 0, 0.2); } .mejs__time-current, .mejs__time-buffering, .mejs__time-loaded, .mejs__time-hovered { left: 0; -webkit-transform: scaleX(0); -ms-transform: scaleX(0); transform: scaleX(0); -webkit-transform-origin: 0 0; -ms-transform-origin: 0 0; transform-origin: 0 0; -webkit-transition: 0.15s ease-in all; transition: 0.15s ease-in all; width: 100%; } .mejs__time-buffering { -webkit-transform: scaleX(1); -ms-transform: scaleX(1); transform: scaleX(1); } .mejs__time-hovered { -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1); transition: height 0.1s cubic-bezier(0.44, 0, 1, 1); } .mejs__time-hovered.no-hover { -webkit-transform: scaleX(0) !important; -ms-transform: scaleX(0) !important; transform: scaleX(0) !important; } .mejs__time-handle, .mejs__time-handle-content { border: 4px solid transparent; cursor: pointer; left: 0; position: absolute; -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); z-index: 11; } .mejs__time-handle-content { border: 4px solid rgba(255, 255, 255, 0.9); border-radius: 50%; height: 10px; left: -7px; top: -4px; -webkit-transform: scale(0); -ms-transform: scale(0); transform: scale(0); width: 10px; } .mejs__time-rail:hover .mejs__time-handle-content, .mejs__time-rail .mejs__time-handle-content:focus, .mejs__time-rail .mejs__time-handle-content:active { -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1); } .mejs__time-float { background: #eee; border: solid 1px #333; bottom: 100%; color: #111; display: none; height: 17px; margin-bottom: 9px; position: absolute; text-align: center; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); width: 36px; } .mejs__time-float-current { display: block; left: 0; margin: 2px; text-align: center; width: 30px; } .mejs__time-float-corner { border: solid 5px #eee; border-color: #eee transparent transparent; border-radius: 0; display: block; height: 0; left: 50%; line-height: 0; position: absolute; top: 100%; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); width: 0; } .mejs__long-video .mejs__time-float { margin-left: -23px; width: 64px; } .mejs__long-video .mejs__time-float-current { width: 60px; } .mejs__broadcast { color: #fff; height: 10px; position: absolute; top: 15px; width: 100%; } /* End: Progress Bar */ /* Start: Fullscreen */ .mejs__fullscreen-button > button { background-position: -80px 0; } .mejs__unfullscreen > button { background-position: -100px 0; } /* End: Fullscreen */ /* Start: Mute/Volume */ .mejs__mute > button { background-position: -60px 0; } .mejs__unmute > button { background-position: -40px 0; } .mejs__volume-button { position: relative; } .mejs__volume-button > .mejs__volume-slider { -webkit-backface-visibility: hidden; background: rgba(50, 50, 50, 0.7); border-radius: 0; bottom: 100%; display: none; height: 115px; left: 50%; margin: 0; position: absolute; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); width: 25px; z-index: 1; } .mejs__volume-button:hover { border-radius: 0 0 4px 4px; } .mejs__volume-total { background: rgba(255, 255, 255, 0.5); height: 100px; left: 50%; margin: 0; position: absolute; top: 8px; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); width: 2px; } .mejs__volume-current { background: rgba(255, 255, 255, 0.9); left: 0; margin: 0; position: absolute; width: 100%; } .mejs__volume-handle { background: rgba(255, 255, 255, 0.9); border-radius: 1px; cursor: ns-resize; height: 6px; left: 50%; position: absolute; -webkit-transform: translateX(-50%); -ms-transform: translateX(-50%); transform: translateX(-50%); width: 16px; } .mejs__horizontal-volume-slider { display: block; height: 36px; position: relative; vertical-align: middle; width: 56px; } .mejs__horizontal-volume-total { background: rgba(50, 50, 50, 0.8); border-radius: 2px; font-size: 1px; height: 8px; left: 0; margin: 0; padding: 0; position: absolute; top: 16px; width: 50px; } .mejs__horizontal-volume-current { background: rgba(255, 255, 255, 0.8); border-radius: 2px; font-size: 1px; height: 100%; left: 0; margin: 0; padding: 0; position: absolute; top: 0; width: 100%; } .mejs__horizontal-volume-handle { display: none; } /* End: Mute/Volume */ /* Start: Track (Captions and Chapters) */ .mejs__captions-button, .mejs__chapters-button { position: relative; } .mejs__captions-button > button { background-position: -140px 0; } .mejs__chapters-button > button { background-position: -180px 0; } .mejs__captions-button > .mejs__captions-selector, .mejs__chapters-button > .mejs__chapters-selector { background: rgba(50, 50, 50, 0.7); border: solid 1px transparent; border-radius: 0; bottom: 100%; margin-right: -43px; overflow: hidden; padding: 0; position: absolute; right: 50%; visibility: visible; width: 86px; } .mejs__chapters-button > .mejs__chapters-selector { margin-right: -55px; width: 110px; } .mejs__captions-selector-list, .mejs__chapters-selector-list { list-style-type: none !important; margin: 0; overflow: hidden; padding: 0; } .mejs__captions-selector-list-item, .mejs__chapters-selector-list-item { color: #fff; cursor: pointer; display: block; list-style-type: none !important; margin: 0 0 6px; overflow: hidden; padding: 0; } .mejs__captions-selector-list-item:hover, .mejs__chapters-selector-list-item:hover { background-color: rgb(200, 200, 200) !important; background-color: rgba(255, 255, 255, 0.4) !important; } .mejs__captions-selector-input, .mejs__chapters-selector-input { clear: both; float: left; left: -1000px; margin: 3px 3px 0 5px; position: absolute; } .mejs__captions-selector-label, .mejs__chapters-selector-label { cursor: pointer; float: left; font-size: 10px; line-height: 15px; padding: 4px 10px 0; width: 100%; } .mejs__captions-selected, .mejs__chapters-selected { color: rgba(33, 248, 248, 1); } .mejs__captions-translations { font-size: 10px; margin: 0 0 5px; } .mejs__captions-layer { bottom: 0; color: #fff; font-size: 16px; left: 0; line-height: 20px; position: absolute; text-align: center; } .mejs__captions-layer a { color: #fff; text-decoration: underline; } .mejs__captions-layer[lang=ar] { font-size: 20px; font-weight: normal; } .mejs__captions-position { bottom: 15px; left: 0; position: absolute; width: 100%; } .mejs__captions-position-hover { bottom: 35px; } .mejs__captions-text, .mejs__captions-text * { background: rgba(20, 20, 20, 0.5); box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5); padding: 0; white-space: pre-wrap; } .mejs__container.mejs__hide-cues video::-webkit-media-text-track-container { display: none; } /* End: Track (Captions and Chapters) */ /* Start: Error */ .mejs__overlay-error { position: relative; } .mejs__overlay-error > img { left: 0; max-width: 100%; position: absolute; top: 0; z-index: -1; } .mejs__cannotplay, .mejs__cannotplay a { color: #fff; font-size: 0.8em; } .mejs__cannotplay { position: relative; } .mejs__cannotplay p, .mejs__cannotplay a { display: inline-block; padding: 0 15px; width: 100%; } /* End: Error */PK\[b(mediaelement/mediaelement-migrate.min.jsnu[!function(a){void 0===mejs.plugins&&(mejs.plugins={},mejs.plugins.silverlight=[],mejs.plugins.silverlight.push({types:[]})),mejs.HtmlMediaElementShim=mejs.HtmlMediaElementShim||{getTypeFromFile:mejs.Utils.getTypeFromFile},void 0===mejs.MediaFeatures&&(mejs.MediaFeatures=mejs.Features),void 0===mejs.Utility&&(mejs.Utility=mejs.Utils);var e=MediaElementPlayer.prototype.init,t=(MediaElementPlayer.prototype.init=function(){this.options.classPrefix="mejs-",this.$media=this.$node=a(this.node),e.call(this)},MediaElementPlayer.prototype._meReady);MediaElementPlayer.prototype._meReady=function(){this.container=a(this.container),this.controls=a(this.controls),this.layers=a(this.layers),t.apply(this,arguments)},MediaElementPlayer.prototype.getElement=function(e){return void 0!==a&&e instanceof a?e[0]:e},MediaElementPlayer.prototype.buildfeatures=function(e,t,i,s){for(var l=["playpause","current","progress","duration","tracks","volume","fullscreen"],r=0,n=this.options.features.length;r'+mejsL10n.strings["mejs.download-file"]+""},void 0!==t.videoShortcodeLibrary&&"mediaelement"!==t.videoShortcodeLibrary||e.push(".wp-video-shortcode"),void 0!==t.audioShortcodeLibrary&&"mediaelement"!==t.audioShortcodeLibrary||e.push(".wp-audio-shortcode"),e.length&&n(e.join(", ")).not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(t)}}},n(e.wp.mediaelement.initialize)}(window,jQuery);PK\A   mediaelement/mediaelement.min.jsnu[/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */ !function i(o,l,s){function d(n,e){if(!l[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var a=l[n]={exports:{}};o[n][0].call(a.exports,function(e){var t=o[n][1][e];return d(t||e)},a,a.exports,i,o,l,s)}return l[n].exports}for(var u="function"==typeof require&&require,e=0;et[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,r,a){i.plugins[e]=i.detectPlugin(t,n,r,a)},detectPlugin:function(e,t,n,r){var a=[0,0,0],i=void 0,o=void 0;if(null!==O.NAV.plugins&&void 0!==O.NAV.plugins&&"object"===d(O.NAV.plugins[e])){if((i=O.NAV.plugins[e].description)&&(void 0===O.NAV.mimeTypes||!O.NAV.mimeTypes[t]||O.NAV.mimeTypes[t].enabledPlugin))for(var l=0,s=(a=i.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;l

'+P.default.t("mejs.install-flash")+"
"}else _=['id="__'+i.id+'"','name="__'+i.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+i.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+i.options.pluginPath+i.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(_.push('width="'+w+'"'),_.push('height="'+b+'"')):_.push('style="position: fixed; left: -9999em; top: -9999em;"'),i.flashWrapper.innerHTML="";if(i.flashNode=i.flashWrapper.lastChild,i.hide=function(){r=!1,E&&(i.flashNode.style.display="none")},i.show=function(){r=!0,E&&(i.flashNode.style.display="")},i.setSize=function(e,t){i.flashNode.style.width=e+"px",i.flashNode.style.height=t+"px",null!==i.flashApi&&"function"==typeof i.flashApi.fire_setSize&&i.flashApi.fire_setSize(e,t)},i.destroy=function(){i.flashNode.remove()},n&&0":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function l(r,a){var i=this,o=arguments,l=2x',t.firstChild.href}function d(e){var t=1.mejs__overlay-button{background-position:-80px -39px}.mejs__overlay-loading{height:80px;width:80px}.mejs__overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs__controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs__controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs__button,.mejs__time,.mejs__time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs__button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs__button>button:focus{outline:1px dotted #999}.mejs__container-keyboard-inactive [role=slider],.mejs__container-keyboard-inactive [role=slider]:focus,.mejs__container-keyboard-inactive a,.mejs__container-keyboard-inactive a:focus,.mejs__container-keyboard-inactive button,.mejs__container-keyboard-inactive button:focus{outline:0}.mejs__time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs__play>button{background-position:0 0}.mejs__pause>button{background-position:-20px 0}.mejs__replay>button{background-position:-160px 0}.mejs__time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs__time-buffering,.mejs__time-current,.mejs__time-float,.mejs__time-float-corner,.mejs__time-float-current,.mejs__time-hovered,.mejs__time-loaded,.mejs__time-marker,.mejs__time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs__time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs__time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs__time-loaded{background:hsla(0,0%,100%,.3)}.mejs__time-current,.mejs__time-handle-content{background:hsla(0,0%,100%,.9)}.mejs__time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs__time-hovered.negative{background:rgba(0,0,0,.2)}.mejs__time-buffering,.mejs__time-current,.mejs__time-hovered,.mejs__time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs__time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs__time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs__time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs__time-handle,.mejs__time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs__time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs__time-rail .mejs__time-handle-content:active,.mejs__time-rail .mejs__time-handle-content:focus,.mejs__time-rail:hover .mejs__time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs__time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs__time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs__time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs__long-video .mejs__time-float{margin-left:-23px;width:64px}.mejs__long-video .mejs__time-float-current{width:60px}.mejs__broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs__fullscreen-button>button{background-position:-80px 0}.mejs__unfullscreen>button{background-position:-100px 0}.mejs__mute>button{background-position:-60px 0}.mejs__unmute>button{background-position:-40px 0}.mejs__volume-button{position:relative}.mejs__volume-button>.mejs__volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs__volume-button:hover{border-radius:0 0 4px 4px}.mejs__volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs__volume-current{left:0;margin:0;width:100%}.mejs__volume-current,.mejs__volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs__volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs__horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs__horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs__horizontal-volume-current,.mejs__horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs__horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs__horizontal-volume-handle{display:none}.mejs__captions-button,.mejs__chapters-button{position:relative}.mejs__captions-button>button{background-position:-140px 0}.mejs__chapters-button>button{background-position:-180px 0}.mejs__captions-button>.mejs__captions-selector,.mejs__chapters-button>.mejs__chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs__chapters-button>.mejs__chapters-selector{margin-right:-55px;width:110px}.mejs__captions-selector-list,.mejs__chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs__captions-selector-list-item,.mejs__chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs__captions-selector-list-item:hover,.mejs__chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs__captions-selector-input,.mejs__chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs__captions-selector-label,.mejs__chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs__captions-selected,.mejs__chapters-selected{color:#21f8f8}.mejs__captions-translations{font-size:10px;margin:0 0 5px}.mejs__captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs__captions-layer a{color:#fff;text-decoration:underline}.mejs__captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs__captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs__captions-position-hover{bottom:35px}.mejs__captions-text,.mejs__captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container{display:none}.mejs__overlay-error{position:relative}.mejs__overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs__cannotplay,.mejs__cannotplay a{color:#fff;font-size:.8em}.mejs__cannotplay{position:relative}.mejs__cannotplay a,.mejs__cannotplay p{display:inline-block;padding:0 15px;width:100%}PK\V mediaelement/wp-mediaelement.jsnu[/* global _wpmejsSettings, mejsL10n */ (function( window, $ ) { window.wp = window.wp || {}; function wpMediaElement() { var settings = {}; /** * Initialize media elements. * * Ensures media elements that have already been initialized won't be * processed again. * * @memberOf wp.mediaelement * * @since 4.4.0 * * @return {void} */ function initialize() { var selectors = []; if ( typeof _wpmejsSettings !== 'undefined' ) { settings = $.extend( true, {}, _wpmejsSettings ); } settings.classPrefix = 'mejs-'; settings.success = settings.success || function ( mejs ) { var autoplay, loop; if ( mejs.rendererName && -1 !== mejs.rendererName.indexOf( 'flash' ) ) { autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay; loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop; if ( autoplay ) { mejs.addEventListener( 'canplay', function() { mejs.play(); }, false ); } if ( loop ) { mejs.addEventListener( 'ended', function() { mejs.play(); }, false ); } } }; /** * Custom error handler. * * Sets up a custom error handler in case a video render fails, and provides a download * link as the fallback. * * @since 4.9.3 * * @param {object} media The wrapper that mimics all the native events/properties/methods for all renderers. * @param {object} node The original HTML video, audio, or iframe tag where the media was loaded. * @return {string} */ settings.customError = function ( media, node ) { // Make sure we only fall back to a download link for flash files. if ( -1 !== media.rendererName.indexOf( 'flash' ) || -1 !== media.rendererName.indexOf( 'flv' ) ) { return '' + mejsL10n.strings['mejs.download-file'] + ''; } }; if ( 'undefined' === typeof settings.videoShortcodeLibrary || 'mediaelement' === settings.videoShortcodeLibrary ) { selectors.push( '.wp-video-shortcode' ); } if ( 'undefined' === typeof settings.audioShortcodeLibrary || 'mediaelement' === settings.audioShortcodeLibrary ) { selectors.push( '.wp-audio-shortcode' ); } if ( ! selectors.length ) { return; } // Only initialize new media elements. $( selectors.join( ', ' ) ) .not( '.mejs-container' ) .filter(function () { return ! $( this ).parent().hasClass( 'mejs-mediaelement' ); }) .mediaelementplayer( settings ); } return { initialize: initialize }; } /** * @namespace wp.mediaelement * @memberOf wp */ window.wp.mediaelement = new wpMediaElement(); $( window.wp.mediaelement.initialize ); })( window, jQuery ); PK\6mediaelement/mejs-controls.svgnu[ PK\,=mediaelement/mediaelement.jsnu[/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1 && arguments[1] !== undefined ? arguments[1] : null; if (typeof message === 'string' && message.length) { var str = void 0, pluralForm = void 0; var language = i18n.language(); var _plural = function _plural(input, number, form) { if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') { return input; } var _pluralForms = function () { return [function () { return arguments.length <= 1 ? undefined : arguments[1]; }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return [3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) { return arguments.length <= 3 ? undefined : arguments[3]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) { return arguments.length <= 4 ? undefined : arguments[4]; } else { return arguments.length <= 1 ? undefined : arguments[1]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) { return arguments.length <= 3 ? undefined : arguments[3]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) { return arguments.length <= 4 ? undefined : arguments[4]; } else { return arguments.length <= 5 ? undefined : arguments[5]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) { return arguments.length <= 3 ? undefined : arguments[3]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) { return arguments.length <= 4 ? undefined : arguments[4]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) { return arguments.length <= 5 ? undefined : arguments[5]; } else { return arguments.length <= 6 ? undefined : arguments[6]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2]; }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) { return arguments.length <= 2 ? undefined : arguments[2]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) { return arguments.length <= 3 ? undefined : arguments[3]; } else { return arguments.length <= 4 ? undefined : arguments[4]; } }, function () { if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) { return arguments.length <= 1 ? undefined : arguments[1]; } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) { return arguments.length <= 2 ? undefined : arguments[2]; } else { return arguments.length <= 3 ? undefined : arguments[3]; } }]; }(); return _pluralForms[form].apply(null, [number].concat(input)); }; if (i18n[language] !== undefined) { str = i18n[language][message]; if (pluralParam !== null && typeof pluralParam === 'number') { pluralForm = i18n[language]['mejs.plural-form']; str = _plural.apply(null, [str, pluralParam, pluralForm]); } } if (!str && i18n.en) { str = i18n.en[message]; if (pluralParam !== null && typeof pluralParam === 'number') { pluralForm = i18n.en['mejs.plural-form']; str = _plural.apply(null, [str, pluralParam, pluralForm]); } } str = str || message; if (pluralParam !== null && typeof pluralParam === 'number') { str = str.replace('%1', pluralParam); } return (0, _general.escapeHTML)(str); } return message; }; _mejs2.default.i18n = i18n; if (typeof mejsL10n !== 'undefined') { _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings); } exports.default = i18n; },{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _general = _dereq_(18); var _media2 = _dereq_(19); var _renderer = _dereq_(8); var _constants = _dereq_(16); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var MediaElement = function MediaElement(idOrNode, options, sources) { var _this = this; _classCallCheck(this, MediaElement); var t = this; sources = Array.isArray(sources) ? sources : null; t.defaults = { renderers: [], fakeNodeName: 'mediaelementwrapper', pluginPath: 'build/', shimScriptAccess: 'sameDomain' }; options = Object.assign(t.defaults, options); t.mediaElement = _document2.default.createElement(options.fakeNodeName); var id = idOrNode, error = false; if (typeof idOrNode === 'string') { t.mediaElement.originalNode = _document2.default.getElementById(idOrNode); } else { t.mediaElement.originalNode = idOrNode; id = idOrNode.id; } if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) { return null; } t.mediaElement.options = options; id = id || 'mejs_' + Math.random().toString().slice(2); t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs'); var tagName = t.mediaElement.originalNode.tagName.toLowerCase(); if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) { t.mediaElement.originalNode.setAttribute('preload', 'none'); } t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode); t.mediaElement.appendChild(t.mediaElement.originalNode); var processURL = function processURL(url, type) { if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (this.readyState === 4 && this.status === 200) { var _url = _window2.default.URL || _window2.default.webkitURL, blobUrl = _url.createObjectURL(this.response); t.mediaElement.originalNode.setAttribute('src', blobUrl); return blobUrl; } return url; }; xhr.open('GET', url); xhr.responseType = 'blob'; xhr.send(); } return url; }; var mediaFiles = void 0; if (sources !== null) { mediaFiles = sources; } else if (t.mediaElement.originalNode !== null) { mediaFiles = []; switch (t.mediaElement.originalNode.nodeName.toLowerCase()) { case 'iframe': mediaFiles.push({ type: '', src: t.mediaElement.originalNode.getAttribute('src') }); break; case 'audio': case 'video': var _sources = t.mediaElement.originalNode.children.length, nodeSource = t.mediaElement.originalNode.getAttribute('src'); if (nodeSource) { var node = t.mediaElement.originalNode, type = (0, _media2.formatType)(nodeSource, node.getAttribute('type')); mediaFiles.push({ type: type, src: processURL(nodeSource, type) }); } for (var i = 0; i < _sources; i++) { var n = t.mediaElement.originalNode.children[i]; if (n.tagName.toLowerCase() === 'source') { var src = n.getAttribute('src'), _type = (0, _media2.formatType)(src, n.getAttribute('type')); mediaFiles.push({ type: _type, src: processURL(src, _type) }); } } break; } } t.mediaElement.id = id; t.mediaElement.renderers = {}; t.mediaElement.events = {}; t.mediaElement.promises = []; t.mediaElement.renderer = null; t.mediaElement.rendererName = null; t.mediaElement.changeRenderer = function (rendererName, mediaFiles) { var t = _this, media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src; if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) { t.mediaElement.renderer.pause(); if (t.mediaElement.renderer.stop) { t.mediaElement.renderer.stop(); } t.mediaElement.renderer.show(); t.mediaElement.renderer.setSrc(media); return true; } if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) { t.mediaElement.renderer.pause(); if (t.mediaElement.renderer.stop) { t.mediaElement.renderer.stop(); } t.mediaElement.renderer.hide(); } var newRenderer = t.mediaElement.renderers[rendererName], newRendererType = null; if (newRenderer !== undefined && newRenderer !== null) { newRenderer.show(); newRenderer.setSrc(media); t.mediaElement.renderer = newRenderer; t.mediaElement.rendererName = rendererName; return true; } var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order; for (var _i = 0, total = rendererArray.length; _i < total; _i++) { var index = rendererArray[_i]; if (index === rendererName) { var rendererList = _renderer.renderer.renderers; newRendererType = rendererList[index]; var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options); newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles); newRenderer.name = rendererName; t.mediaElement.renderers[newRendererType.name] = newRenderer; t.mediaElement.renderer = newRenderer; t.mediaElement.rendererName = rendererName; newRenderer.show(); return true; } } return false; }; t.mediaElement.setSize = function (width, height) { if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) { t.mediaElement.renderer.setSize(width, height); } }; t.mediaElement.generateError = function (message, urlList) { message = message || ''; urlList = Array.isArray(urlList) ? urlList : []; var event = (0, _general.createEvent)('error', t.mediaElement); event.message = message; event.urls = urlList; t.mediaElement.dispatchEvent(event); error = true; }; var props = _mejs2.default.html5media.properties, methods = _mejs2.default.html5media.methods, addProperty = function addProperty(obj, name, onGet, onSet) { var oldValue = obj[name]; var getFn = function getFn() { return onGet.apply(obj, [oldValue]); }, setFn = function setFn(newValue) { oldValue = onSet.apply(obj, [newValue]); return oldValue; }; Object.defineProperty(obj, name, { get: getFn, set: setFn }); }, assignGettersSetters = function assignGettersSetters(propName) { if (propName !== 'src') { var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1), getFn = function getFn() { return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null; }, setFn = function setFn(value) { if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') { t.mediaElement.renderer['set' + capName](value); } }; addProperty(t.mediaElement, propName, getFn, setFn); t.mediaElement['get' + capName] = getFn; t.mediaElement['set' + capName] = setFn; } }, getSrc = function getSrc() { return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null; }, setSrc = function setSrc(value) { var mediaFiles = []; if (typeof value === 'string') { mediaFiles.push({ src: value, type: value ? (0, _media2.getTypeFromFile)(value) : '' }); } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) { var _src = (0, _media2.absolutizeUrl)(value.src), _type2 = value.type, media = Object.assign(value, { src: _src, type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2 }); mediaFiles.push(media); } else if (Array.isArray(value)) { for (var _i2 = 0, total = value.length; _i2 < total; _i2++) { var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src), _type3 = value[_i2].type, _media = Object.assign(value[_i2], { src: _src2, type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3 }); mediaFiles.push(_media); } } var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []), event = void 0; if (!t.mediaElement.paused && !(t.mediaElement.src == null || t.mediaElement.src === '')) { t.mediaElement.pause(); event = (0, _general.createEvent)('pause', t.mediaElement); t.mediaElement.dispatchEvent(event); } t.mediaElement.originalNode.src = mediaFiles[0].src || ''; if (renderInfo === null && mediaFiles[0].src) { t.mediaElement.generateError('No renderer found', mediaFiles); return; } var shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === ''); return shouldChangeRenderer ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null; }, triggerAction = function triggerAction(methodName, args) { try { if (methodName === 'play' && (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls' || t.mediaElement.rendererName === 'vimeo_iframe')) { var response = t.mediaElement.renderer[methodName](args); if (response && typeof response.then === 'function') { response.catch(function () { if (t.mediaElement.paused) { setTimeout(function () { var tmpResponse = t.mediaElement.renderer.play(); if (tmpResponse !== undefined) { tmpResponse.catch(function () { if (!t.mediaElement.renderer.paused) { t.mediaElement.renderer.pause(); } }); } }, 150); } }); } } else { t.mediaElement.renderer[methodName](args); } } catch (e) { t.mediaElement.generateError(e, mediaFiles); } }, assignMethods = function assignMethods(methodName) { t.mediaElement[methodName] = function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') { if (t.mediaElement.promises.length) { Promise.all(t.mediaElement.promises).then(function () { triggerAction(methodName, args); }).catch(function (e) { t.mediaElement.generateError(e, mediaFiles); }); } else { triggerAction(methodName, args); } } return null; }; }; addProperty(t.mediaElement, 'src', getSrc, setSrc); t.mediaElement.getSrc = getSrc; t.mediaElement.setSrc = setSrc; for (var _i3 = 0, total = props.length; _i3 < total; _i3++) { assignGettersSetters(props[_i3]); } for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) { assignMethods(methods[_i4]); } t.mediaElement.addEventListener = function (eventName, callback) { t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || []; t.mediaElement.events[eventName].push(callback); }; t.mediaElement.removeEventListener = function (eventName, callback) { if (!eventName) { t.mediaElement.events = {}; return true; } var callbacks = t.mediaElement.events[eventName]; if (!callbacks) { return true; } if (!callback) { t.mediaElement.events[eventName] = []; return true; } for (var _i5 = 0; _i5 < callbacks.length; _i5++) { if (callbacks[_i5] === callback) { t.mediaElement.events[eventName].splice(_i5, 1); return true; } } return false; }; t.mediaElement.dispatchEvent = function (event) { var callbacks = t.mediaElement.events[event.type]; if (callbacks) { for (var _i6 = 0; _i6 < callbacks.length; _i6++) { callbacks[_i6].apply(null, [event]); } } }; t.mediaElement.destroy = function () { var mediaElement = t.mediaElement.originalNode.cloneNode(true); var wrapper = t.mediaElement.parentElement; mediaElement.removeAttribute('id'); mediaElement.remove(); t.mediaElement.remove(); wrapper.appendChild(mediaElement); }; if (mediaFiles.length) { t.mediaElement.src = mediaFiles; } if (t.mediaElement.promises.length) { Promise.all(t.mediaElement.promises).then(function () { if (t.mediaElement.options.success) { t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode); } }).catch(function () { if (error && t.mediaElement.options.error) { t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode); } }); } else { if (t.mediaElement.options.success) { t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode); } if (error && t.mediaElement.options.error) { t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode); } } return t.mediaElement; }; _window2.default.MediaElement = MediaElement; _mejs2.default.MediaElement = MediaElement; exports.default = MediaElement; },{"16":16,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var mejs = {}; mejs.version = '4.2.17'; mejs.html5media = { properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'], readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'], methods: ['load', 'play', 'pause', 'canPlayType'], events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'], mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv'] }; _window2.default.mejs = mejs; exports.default = mejs; },{"3":3}],8:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderer = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Renderer = function () { function Renderer() { _classCallCheck(this, Renderer); this.renderers = {}; this.order = []; } _createClass(Renderer, [{ key: 'add', value: function add(renderer) { if (renderer.name === undefined) { throw new TypeError('renderer must contain at least `name` property'); } this.renderers[renderer.name] = renderer; this.order.push(renderer.name); } }, { key: 'select', value: function select(mediaFiles) { var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var renderersLength = renderers.length; renderers = renderers.length ? renderers : this.order; if (!renderersLength) { var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i], rendererRanking = function rendererRanking(renderer) { for (var i = 0, total = rendererIndicator.length; i < total; i++) { if (rendererIndicator[i].test(renderer)) { return i; } } return rendererIndicator.length; }; renderers.sort(function (a, b) { return rendererRanking(a) - rendererRanking(b); }); } for (var i = 0, total = renderers.length; i < total; i++) { var key = renderers[i], _renderer = this.renderers[key]; if (_renderer !== null && _renderer !== undefined) { for (var j = 0, jl = mediaFiles.length; j < jl; j++) { if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) { return { rendererName: _renderer.name, src: mediaFiles[j].src }; } } } } return null; } }, { key: 'order', set: function set(order) { if (!Array.isArray(order)) { throw new TypeError('order must be an array of strings.'); } this._order = order; }, get: function get() { return this._order; } }, { key: 'renderers', set: function set(renderers) { if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') { throw new TypeError('renderers must be an array of objects.'); } this._renderers = renderers; }, get: function get() { return this._renderers; } }]); return Renderer; }(); var renderer = exports.renderer = new Renderer(); _mejs2.default.Renderers = renderer; },{"7":7}],9:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var EN = exports.EN = { 'mejs.plural-form': 1, 'mejs.download-file': 'Download File', 'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/', 'mejs.fullscreen': 'Fullscreen', 'mejs.play': 'Play', 'mejs.pause': 'Pause', 'mejs.time-slider': 'Time Slider', 'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.', 'mejs.live-broadcast': 'Live Broadcast', 'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.', 'mejs.unmute': 'Unmute', 'mejs.mute': 'Mute', 'mejs.volume-slider': 'Volume Slider', 'mejs.video-player': 'Video Player', 'mejs.audio-player': 'Audio Player', 'mejs.captions-subtitles': 'Captions/Subtitles', 'mejs.captions-chapters': 'Chapters', 'mejs.none': 'None', 'mejs.afrikaans': 'Afrikaans', 'mejs.albanian': 'Albanian', 'mejs.arabic': 'Arabic', 'mejs.belarusian': 'Belarusian', 'mejs.bulgarian': 'Bulgarian', 'mejs.catalan': 'Catalan', 'mejs.chinese': 'Chinese', 'mejs.chinese-simplified': 'Chinese (Simplified)', 'mejs.chinese-traditional': 'Chinese (Traditional)', 'mejs.croatian': 'Croatian', 'mejs.czech': 'Czech', 'mejs.danish': 'Danish', 'mejs.dutch': 'Dutch', 'mejs.english': 'English', 'mejs.estonian': 'Estonian', 'mejs.filipino': 'Filipino', 'mejs.finnish': 'Finnish', 'mejs.french': 'French', 'mejs.galician': 'Galician', 'mejs.german': 'German', 'mejs.greek': 'Greek', 'mejs.haitian-creole': 'Haitian Creole', 'mejs.hebrew': 'Hebrew', 'mejs.hindi': 'Hindi', 'mejs.hungarian': 'Hungarian', 'mejs.icelandic': 'Icelandic', 'mejs.indonesian': 'Indonesian', 'mejs.irish': 'Irish', 'mejs.italian': 'Italian', 'mejs.japanese': 'Japanese', 'mejs.korean': 'Korean', 'mejs.latvian': 'Latvian', 'mejs.lithuanian': 'Lithuanian', 'mejs.macedonian': 'Macedonian', 'mejs.malay': 'Malay', 'mejs.maltese': 'Maltese', 'mejs.norwegian': 'Norwegian', 'mejs.persian': 'Persian', 'mejs.polish': 'Polish', 'mejs.portuguese': 'Portuguese', 'mejs.romanian': 'Romanian', 'mejs.russian': 'Russian', 'mejs.serbian': 'Serbian', 'mejs.slovak': 'Slovak', 'mejs.slovenian': 'Slovenian', 'mejs.spanish': 'Spanish', 'mejs.swahili': 'Swahili', 'mejs.swedish': 'Swedish', 'mejs.tagalog': 'Tagalog', 'mejs.thai': 'Thai', 'mejs.turkish': 'Turkish', 'mejs.ukrainian': 'Ukrainian', 'mejs.vietnamese': 'Vietnamese', 'mejs.welsh': 'Welsh', 'mejs.yiddish': 'Yiddish' }; },{}],10:[function(_dereq_,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(18); var _media = _dereq_(19); var _constants = _dereq_(16); var _dom = _dereq_(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NativeDash = { promise: null, load: function load(settings) { if (typeof dashjs !== 'undefined') { NativeDash.promise = new Promise(function (resolve) { resolve(); }).then(function () { NativeDash._createPlayer(settings); }); } else { settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js'; NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path); NativeDash.promise.then(function () { NativeDash._createPlayer(settings); }); } return NativeDash.promise; }, _createPlayer: function _createPlayer(settings) { var player = dashjs.MediaPlayer().create(); _window2.default['__ready__' + settings.id](player); return player; } }; var DashNativeRenderer = { name: 'native_dash', options: { prefix: 'native_dash', dash: { path: 'https://cdn.dashjs.org/latest/dash.all.min.js', debug: false, drm: {}, robustnessLevel: '' } }, canPlayType: function canPlayType(type) { return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1; }, create: function create(mediaElement, options, mediaFiles) { var originalNode = mediaElement.originalNode, id = mediaElement.id + '_' + options.prefix, autoplay = originalNode.autoplay, children = originalNode.children; var node = null, dashPlayer = null; originalNode.removeAttribute('type'); for (var i = 0, total = children.length; i < total; i++) { children[i].removeAttribute('type'); } node = originalNode.cloneNode(true); options = Object.assign(options, mediaElement.options); var props = _mejs2.default.html5media.properties, events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) { return e !== 'error'; }), attachNativeEvents = function attachNativeEvents(e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }, assignGettersSetters = function assignGettersSetters(propName) { var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); node['get' + capName] = function () { return dashPlayer !== null ? node[propName] : null; }; node['set' + capName] = function (value) { if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) { if (propName === 'src') { var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value; node[propName] = source; if (dashPlayer !== null) { dashPlayer.reset(); for (var _i = 0, _total = events.length; _i < _total; _i++) { node.removeEventListener(events[_i], attachNativeEvents); } dashPlayer = NativeDash._createPlayer({ options: options.dash, id: id }); if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') { dashPlayer.setProtectionData(value.drm); if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) { dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel); } } dashPlayer.attachSource(source); if (autoplay) { dashPlayer.play(); } } } else { node[propName] = value; } } }; }; for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) { assignGettersSetters(props[_i2]); } _window2.default['__ready__' + id] = function (_dashPlayer) { mediaElement.dashPlayer = dashPlayer = _dashPlayer; var dashEvents = dashjs.MediaPlayer.events, assignEvents = function assignEvents(eventName) { if (eventName === 'loadedmetadata') { dashPlayer.initialize(); dashPlayer.attachView(node); dashPlayer.setAutoPlay(false); if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) { dashPlayer.setProtectionData(options.dash.drm); if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) { dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel); } } dashPlayer.attachSource(node.getSrc()); } node.addEventListener(eventName, attachNativeEvents); }; for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) { assignEvents(events[_i3]); } var assignMdashEvents = function assignMdashEvents(e) { if (e.type.toLowerCase() === 'error') { mediaElement.generateError(e.message, node.src); console.error(e); } else { var _event = (0, _general.createEvent)(e.type, mediaElement); _event.data = e; mediaElement.dispatchEvent(_event); } }; for (var eventType in dashEvents) { if (dashEvents.hasOwnProperty(eventType)) { dashPlayer.on(dashEvents[eventType], function (e) { return assignMdashEvents(e); }); } } }; if (mediaFiles && mediaFiles.length > 0) { for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) { if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) { node.setAttribute('src', mediaFiles[_i4].src); if (typeof mediaFiles[_i4].drm !== 'undefined') { options.dash.drm = mediaFiles[_i4].drm; } break; } } } node.setAttribute('id', id); originalNode.parentNode.insertBefore(node, originalNode); originalNode.autoplay = false; originalNode.style.display = 'none'; node.setSize = function (width, height) { node.style.width = width + 'px'; node.style.height = height + 'px'; return node; }; node.hide = function () { node.pause(); node.style.display = 'none'; return node; }; node.show = function () { node.style.display = ''; return node; }; node.destroy = function () { if (dashPlayer !== null) { dashPlayer.reset(); } }; var event = (0, _general.createEvent)('rendererready', node); mediaElement.dispatchEvent(event); mediaElement.promises.push(NativeDash.load({ options: options.dash, id: id })); return node; } }; _media.typeChecks.push(function (url) { return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null; }); _renderer.renderer.add(DashNativeRenderer); },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PluginDetector = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _i18n = _dereq_(5); var _i18n2 = _interopRequireDefault(_i18n); var _renderer = _dereq_(8); var _general = _dereq_(18); var _constants = _dereq_(16); var _media = _dereq_(19); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var PluginDetector = exports.PluginDetector = { plugins: [], hasPluginVersion: function hasPluginVersion(plugin, v) { var pv = PluginDetector.plugins[plugin]; v[1] = v[1] || 0; v[2] = v[2] || 0; return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2]; }, addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) { PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect); }, detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) { var version = [0, 0, 0], description = void 0, ax = void 0; if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') { description = _constants.NAV.plugins[pluginName].description; if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) { version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.'); for (var i = 0, total = version.length; i < total; i++) { version[i] = parseInt(version[i].match(/\d+/), 10); } } } else if (_window2.default.ActiveXObject !== undefined) { try { ax = new ActiveXObject(activeX); if (ax) { version = axDetect(ax); } } catch (e) { } } return version; } }; PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) { var version = [], d = ax.GetVariable("$version"); if (d) { d = d.split(" ")[1].split(","); version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; } return version; }); var FlashMediaElementRenderer = { create: function create(mediaElement, options, mediaFiles) { var flash = {}; var isActive = false; flash.options = options; flash.id = mediaElement.id + '_' + flash.options.prefix; flash.mediaElement = mediaElement; flash.flashState = {}; flash.flashApi = null; flash.flashApiStack = []; var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { flash.flashState[propName] = null; var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); flash['get' + capName] = function () { if (flash.flashApi !== null) { if (typeof flash.flashApi['get_' + propName] === 'function') { var value = flash.flashApi['get_' + propName](); if (propName === 'buffered') { return { start: function start() { return 0; }, end: function end() { return value; }, length: 1 }; } return value; } else { return null; } } else { return null; } }; flash['set' + capName] = function (value) { if (propName === 'src') { value = (0, _media.absolutizeUrl)(value); } if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) { try { flash.flashApi['set_' + propName](value); } catch (e) { } } else { flash.flashApiStack.push({ type: 'set', propName: propName, value: value }); } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } var methods = _mejs2.default.html5media.methods, assignMethods = function assignMethods(methodName) { flash[methodName] = function () { if (isActive) { if (flash.flashApi !== null) { if (flash.flashApi['fire_' + methodName]) { try { flash.flashApi['fire_' + methodName](); } catch (e) { } } else { } } else { flash.flashApiStack.push({ type: 'call', methodName: methodName }); } } }; }; methods.push('stop'); for (var _i = 0, _total = methods.length; _i < _total; _i++) { assignMethods(methods[_i]); } var initEvents = ['rendererready']; for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) { var event = (0, _general.createEvent)(initEvents[_i2], flash); mediaElement.dispatchEvent(event); } _window2.default['__ready__' + flash.id] = function () { flash.flashReady = true; flash.flashApi = _document2.default.getElementById('__' + flash.id); if (flash.flashApiStack.length) { for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) { var stackItem = flash.flashApiStack[_i3]; if (stackItem.type === 'set') { var propName = stackItem.propName, capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); flash['set' + capName](stackItem.value); } else if (stackItem.type === 'call') { flash[stackItem.methodName](); } } } }; _window2.default['__event__' + flash.id] = function (eventName, message) { var event = (0, _general.createEvent)(eventName, flash); if (message) { try { event.data = JSON.parse(message); event.details.data = JSON.parse(message); } catch (e) { event.message = message; } } flash.mediaElement.dispatchEvent(event); }; flash.flashWrapper = _document2.default.createElement('div'); if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) { flash.options.shimScriptAccess = 'sameDomain'; } var autoplay = mediaElement.originalNode.autoplay, flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')], isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video', flashHeight = isVideo ? mediaElement.originalNode.height : 1, flashWidth = isVideo ? mediaElement.originalNode.width : 1; if (mediaElement.originalNode.getAttribute('src')) { flashVars.push('src=' + mediaElement.originalNode.getAttribute('src')); } if (flash.options.enablePseudoStreaming === true) { flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam); flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType); } if (flash.options.streamDelimiter) { flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter)); } if (flash.options.proxyType) { flashVars.push('proxytype=' + flash.options.proxyType); } mediaElement.appendChild(flash.flashWrapper); mediaElement.originalNode.style.display = 'none'; var settings = []; if (_constants.IS_IE || _constants.IS_EDGE) { var specialIEContainer = _document2.default.createElement('div'); flash.flashWrapper.appendChild(specialIEContainer); if (_constants.IS_EDGE) { settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"']; } else { settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"']; } if (!isVideo) { settings.push('style="clip: rect(0 0 0 0); position: absolute;"'); } specialIEContainer.outerHTML = '' + ('') + ('') + '' + '' + '' + ('') + '' + ('
' + _i18n2.default.t('mejs.install-flash') + '
') + '
'; } else { settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"']; if (isVideo) { settings.push('width="' + flashWidth + '"'); settings.push('height="' + flashHeight + '"'); } else { settings.push('style="position: fixed; left: -9999em; top: -9999em;"'); } flash.flashWrapper.innerHTML = ''; } flash.flashNode = flash.flashWrapper.lastChild; flash.hide = function () { isActive = false; if (isVideo) { flash.flashNode.style.display = 'none'; } }; flash.show = function () { isActive = true; if (isVideo) { flash.flashNode.style.display = ''; } }; flash.setSize = function (width, height) { flash.flashNode.style.width = width + 'px'; flash.flashNode.style.height = height + 'px'; if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') { flash.flashApi.fire_setSize(width, height); } }; flash.destroy = function () { flash.flashNode.remove(); }; if (mediaFiles && mediaFiles.length > 0) { for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) { if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) { flash.setSrc(mediaFiles[_i4].src); break; } } } return flash; } }; var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]); if (hasFlash) { _media.typeChecks.push(function (url) { url = url.toLowerCase(); if (url.startsWith('rtmp')) { if (~url.indexOf('.mp3')) { return 'audio/rtmp'; } else { return 'video/rtmp'; } } else if (/\.og(a|g)/i.test(url)) { return 'audio/ogg'; } else if (~url.indexOf('.m3u8')) { return 'application/x-mpegURL'; } else if (~url.indexOf('.mpd')) { return 'application/dash+xml'; } else if (~url.indexOf('.flv')) { return 'video/flv'; } else { return null; } }); var FlashMediaElementVideoRenderer = { name: 'flash_video', options: { prefix: 'flash_video', filename: 'mediaelement-flash-video.swf', enablePseudoStreaming: false, pseudoStreamingStartQueryParam: 'start', pseudoStreamingType: 'byte', proxyType: '', streamDelimiter: '' }, canPlayType: function canPlayType(type) { return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create }; _renderer.renderer.add(FlashMediaElementVideoRenderer); var FlashMediaElementHlsVideoRenderer = { name: 'flash_hls', options: { prefix: 'flash_hls', filename: 'mediaelement-flash-video-hls.swf' }, canPlayType: function canPlayType(type) { return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create }; _renderer.renderer.add(FlashMediaElementHlsVideoRenderer); var FlashMediaElementMdashVideoRenderer = { name: 'flash_dash', options: { prefix: 'flash_dash', filename: 'mediaelement-flash-video-mdash.swf' }, canPlayType: function canPlayType(type) { return ~['application/dash+xml'].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create }; _renderer.renderer.add(FlashMediaElementMdashVideoRenderer); var FlashMediaElementAudioRenderer = { name: 'flash_audio', options: { prefix: 'flash_audio', filename: 'mediaelement-flash-audio.swf' }, canPlayType: function canPlayType(type) { return ~['audio/mp3'].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create }; _renderer.renderer.add(FlashMediaElementAudioRenderer); var FlashMediaElementAudioOggRenderer = { name: 'flash_audio_ogg', options: { prefix: 'flash_audio_ogg', filename: 'mediaelement-flash-audio-ogg.swf' }, canPlayType: function canPlayType(type) { return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase()); }, create: FlashMediaElementRenderer.create }; _renderer.renderer.add(FlashMediaElementAudioOggRenderer); } },{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(18); var _constants = _dereq_(16); var _media = _dereq_(19); var _dom = _dereq_(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NativeFlv = { promise: null, load: function load(settings) { if (typeof flvjs !== 'undefined') { NativeFlv.promise = new Promise(function (resolve) { resolve(); }).then(function () { NativeFlv._createPlayer(settings); }); } else { settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest'; NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path); NativeFlv.promise.then(function () { NativeFlv._createPlayer(settings); }); } return NativeFlv.promise; }, _createPlayer: function _createPlayer(settings) { flvjs.LoggingControl.enableDebug = settings.options.debug; flvjs.LoggingControl.enableVerbose = settings.options.debug; var player = flvjs.createPlayer(settings.options, settings.configs); _window2.default['__ready__' + settings.id](player); return player; } }; var FlvNativeRenderer = { name: 'native_flv', options: { prefix: 'native_flv', flv: { path: 'https://cdn.jsdelivr.net/npm/flv.js@latest', cors: true, debug: false } }, canPlayType: function canPlayType(type) { return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1; }, create: function create(mediaElement, options, mediaFiles) { var originalNode = mediaElement.originalNode, id = mediaElement.id + '_' + options.prefix; var node = null, flvPlayer = null; node = originalNode.cloneNode(true); options = Object.assign(options, mediaElement.options); var props = _mejs2.default.html5media.properties, events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) { return e !== 'error'; }), attachNativeEvents = function attachNativeEvents(e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }, assignGettersSetters = function assignGettersSetters(propName) { var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); node['get' + capName] = function () { return flvPlayer !== null ? node[propName] : null; }; node['set' + capName] = function (value) { if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) { if (propName === 'src') { node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value; if (flvPlayer !== null) { var _flvOptions = {}; _flvOptions.type = 'flv'; _flvOptions.url = value; _flvOptions.cors = options.flv.cors; _flvOptions.debug = options.flv.debug; _flvOptions.path = options.flv.path; var _flvConfigs = options.flv.configs; flvPlayer.destroy(); for (var i = 0, total = events.length; i < total; i++) { node.removeEventListener(events[i], attachNativeEvents); } flvPlayer = NativeFlv._createPlayer({ options: _flvOptions, configs: _flvConfigs, id: id }); flvPlayer.attachMediaElement(node); flvPlayer.load(); } } else { node[propName] = value; } } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } _window2.default['__ready__' + id] = function (_flvPlayer) { mediaElement.flvPlayer = flvPlayer = _flvPlayer; var flvEvents = flvjs.Events, assignEvents = function assignEvents(eventName) { if (eventName === 'loadedmetadata') { flvPlayer.unload(); flvPlayer.detachMediaElement(); flvPlayer.attachMediaElement(node); flvPlayer.load(); } node.addEventListener(eventName, attachNativeEvents); }; for (var _i = 0, _total = events.length; _i < _total; _i++) { assignEvents(events[_i]); } var assignFlvEvents = function assignFlvEvents(name, data) { if (name === 'error') { var message = data[0] + ': ' + data[1] + ' ' + data[2].msg; mediaElement.generateError(message, node.src); } else { var _event = (0, _general.createEvent)(name, mediaElement); _event.data = data; mediaElement.dispatchEvent(_event); } }; var _loop = function _loop(eventType) { if (flvEvents.hasOwnProperty(eventType)) { flvPlayer.on(flvEvents[eventType], function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return assignFlvEvents(flvEvents[eventType], args); }); } }; for (var eventType in flvEvents) { _loop(eventType); } }; if (mediaFiles && mediaFiles.length > 0) { for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) { if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) { node.setAttribute('src', mediaFiles[_i2].src); break; } } } node.setAttribute('id', id); originalNode.parentNode.insertBefore(node, originalNode); originalNode.autoplay = false; originalNode.style.display = 'none'; var flvOptions = {}; flvOptions.type = 'flv'; flvOptions.url = node.src; flvOptions.cors = options.flv.cors; flvOptions.debug = options.flv.debug; flvOptions.path = options.flv.path; var flvConfigs = options.flv.configs; node.setSize = function (width, height) { node.style.width = width + 'px'; node.style.height = height + 'px'; return node; }; node.hide = function () { if (flvPlayer !== null) { flvPlayer.pause(); } node.style.display = 'none'; return node; }; node.show = function () { node.style.display = ''; return node; }; node.destroy = function () { if (flvPlayer !== null) { flvPlayer.destroy(); } }; var event = (0, _general.createEvent)('rendererready', node); mediaElement.dispatchEvent(event); mediaElement.promises.push(NativeFlv.load({ options: flvOptions, configs: flvConfigs, id: id })); return node; } }; _media.typeChecks.push(function (url) { return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null; }); _renderer.renderer.add(FlvNativeRenderer); },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(18); var _constants = _dereq_(16); var _media = _dereq_(19); var _dom = _dereq_(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NativeHls = { promise: null, load: function load(settings) { if (typeof Hls !== 'undefined') { NativeHls.promise = new Promise(function (resolve) { resolve(); }).then(function () { NativeHls._createPlayer(settings); }); } else { settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest'; NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path); NativeHls.promise.then(function () { NativeHls._createPlayer(settings); }); } return NativeHls.promise; }, _createPlayer: function _createPlayer(settings) { var player = new Hls(settings.options); _window2.default['__ready__' + settings.id](player); return player; } }; var HlsNativeRenderer = { name: 'native_hls', options: { prefix: 'native_hls', hls: { path: 'https://cdn.jsdelivr.net/npm/hls.js@latest', autoStartLoad: false, debug: false } }, canPlayType: function canPlayType(type) { return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1; }, create: function create(mediaElement, options, mediaFiles) { var originalNode = mediaElement.originalNode, id = mediaElement.id + '_' + options.prefix, preload = originalNode.getAttribute('preload'), autoplay = originalNode.autoplay; var hlsPlayer = null, node = null, index = 0, total = mediaFiles.length; node = originalNode.cloneNode(true); options = Object.assign(options, mediaElement.options); options.hls.autoStartLoad = preload && preload !== 'none' || autoplay; var props = _mejs2.default.html5media.properties, events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) { return e !== 'error'; }), attachNativeEvents = function attachNativeEvents(e) { var event = (0, _general.createEvent)(e.type, mediaElement); mediaElement.dispatchEvent(event); }, assignGettersSetters = function assignGettersSetters(propName) { var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); node['get' + capName] = function () { return hlsPlayer !== null ? node[propName] : null; }; node['set' + capName] = function (value) { if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) { if (propName === 'src') { node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value; if (hlsPlayer !== null) { hlsPlayer.destroy(); for (var i = 0, _total = events.length; i < _total; i++) { node.removeEventListener(events[i], attachNativeEvents); } hlsPlayer = NativeHls._createPlayer({ options: options.hls, id: id }); hlsPlayer.loadSource(value); hlsPlayer.attachMedia(node); } } else { node[propName] = value; } } }; }; for (var i = 0, _total2 = props.length; i < _total2; i++) { assignGettersSetters(props[i]); } _window2.default['__ready__' + id] = function (_hlsPlayer) { mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer; var hlsEvents = Hls.Events, assignEvents = function assignEvents(eventName) { if (eventName === 'loadedmetadata') { var url = mediaElement.originalNode.src; hlsPlayer.detachMedia(); hlsPlayer.loadSource(url); hlsPlayer.attachMedia(node); } node.addEventListener(eventName, attachNativeEvents); }; for (var _i = 0, _total3 = events.length; _i < _total3; _i++) { assignEvents(events[_i]); } var recoverDecodingErrorDate = void 0, recoverSwapAudioCodecDate = void 0; var assignHlsEvents = function assignHlsEvents(name, data) { if (name === 'hlsError') { console.warn(data); data = data[1]; if (data.fatal) { switch (data.type) { case 'mediaError': var now = new Date().getTime(); if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) { recoverDecodingErrorDate = new Date().getTime(); hlsPlayer.recoverMediaError(); } else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) { recoverSwapAudioCodecDate = new Date().getTime(); console.warn('Attempting to swap Audio Codec and recover from media error'); hlsPlayer.swapAudioCodec(); hlsPlayer.recoverMediaError(); } else { var message = 'Cannot recover, last media error recovery failed'; mediaElement.generateError(message, node.src); console.error(message); } break; case 'networkError': if (data.details === 'manifestLoadError') { if (index < total && mediaFiles[index + 1] !== undefined) { node.setSrc(mediaFiles[index++].src); node.load(); node.play(); } else { var _message = 'Network error'; mediaElement.generateError(_message, mediaFiles); console.error(_message); } } else { var _message2 = 'Network error'; mediaElement.generateError(_message2, mediaFiles); console.error(_message2); } break; default: hlsPlayer.destroy(); break; } return; } } var event = (0, _general.createEvent)(name, mediaElement); event.data = data; mediaElement.dispatchEvent(event); }; var _loop = function _loop(eventType) { if (hlsEvents.hasOwnProperty(eventType)) { hlsPlayer.on(hlsEvents[eventType], function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return assignHlsEvents(hlsEvents[eventType], args); }); } }; for (var eventType in hlsEvents) { _loop(eventType); } }; if (total > 0) { for (; index < total; index++) { if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) { node.setAttribute('src', mediaFiles[index].src); break; } } } if (preload !== 'auto' && !autoplay) { node.addEventListener('play', function () { if (hlsPlayer !== null) { hlsPlayer.startLoad(); } }); node.addEventListener('pause', function () { if (hlsPlayer !== null) { hlsPlayer.stopLoad(); } }); } node.setAttribute('id', id); originalNode.parentNode.insertBefore(node, originalNode); originalNode.autoplay = false; originalNode.style.display = 'none'; node.setSize = function (width, height) { node.style.width = width + 'px'; node.style.height = height + 'px'; return node; }; node.hide = function () { node.pause(); node.style.display = 'none'; return node; }; node.show = function () { node.style.display = ''; return node; }; node.destroy = function () { if (hlsPlayer !== null) { hlsPlayer.stopLoad(); hlsPlayer.destroy(); } }; var event = (0, _general.createEvent)('rendererready', node); mediaElement.dispatchEvent(event); mediaElement.promises.push(NativeHls.load({ options: options.hls, id: id })); return node; } }; _media.typeChecks.push(function (url) { return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null; }); _renderer.renderer.add(HlsNativeRenderer); },{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){ 'use strict'; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(18); var _constants = _dereq_(16); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var HtmlMediaElement = { name: 'html5', options: { prefix: 'html5' }, canPlayType: function canPlayType(type) { var mediaElement = _document2.default.createElement('video'); if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) { return 'yes'; } else if (mediaElement.canPlayType) { return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, ''); } else { return ''; } }, create: function create(mediaElement, options, mediaFiles) { var id = mediaElement.id + '_' + options.prefix; var isActive = false; var node = null; if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) { node = _document2.default.createElement('audio'); mediaElement.appendChild(node); } else { node = mediaElement.originalNode; } node.setAttribute('id', id); var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); node['get' + capName] = function () { return node[propName]; }; node['set' + capName] = function (value) { if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) { node[propName] = value; } }; }; for (var i = 0, _total = props.length; i < _total; i++) { assignGettersSetters(props[i]); } var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) { return e !== 'error'; }), assignEvents = function assignEvents(eventName) { node.addEventListener(eventName, function (e) { if (isActive) { var _event = (0, _general.createEvent)(e.type, e.target); mediaElement.dispatchEvent(_event); } }); }; for (var _i = 0, _total2 = events.length; _i < _total2; _i++) { assignEvents(events[_i]); } node.setSize = function (width, height) { node.style.width = width + 'px'; node.style.height = height + 'px'; return node; }; node.hide = function () { isActive = false; node.style.display = 'none'; return node; }; node.show = function () { isActive = true; node.style.display = ''; return node; }; var index = 0, total = mediaFiles.length; if (total > 0) { for (; index < total; index++) { if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) { node.setAttribute('src', mediaFiles[index].src); break; } } } node.addEventListener('error', function (e) { if (e && e.target && e.target.error && e.target.error.code === 4 && isActive) { if (index < total && mediaFiles[index + 1] !== undefined) { node.src = mediaFiles[index++].src; node.load(); node.play(); } else { mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles); } } }); var event = (0, _general.createEvent)('rendererready', node); mediaElement.dispatchEvent(event); return node; } }; _window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement; _renderer.renderer.add(HtmlMediaElement); },{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){ 'use strict'; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _renderer = _dereq_(8); var _general = _dereq_(18); var _media = _dereq_(19); var _dom = _dereq_(17); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var YouTubeApi = { isIframeStarted: false, isIframeLoaded: false, iframeQueue: [], enqueueIframe: function enqueueIframe(settings) { YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded; if (YouTubeApi.isLoaded) { YouTubeApi.createIframe(settings); } else { YouTubeApi.loadIframeApi(); YouTubeApi.iframeQueue.push(settings); } }, loadIframeApi: function loadIframeApi() { if (!YouTubeApi.isIframeStarted) { (0, _dom.loadScript)('https://www.youtube.com/player_api'); YouTubeApi.isIframeStarted = true; } }, iFrameReady: function iFrameReady() { YouTubeApi.isLoaded = true; YouTubeApi.isIframeLoaded = true; while (YouTubeApi.iframeQueue.length > 0) { var settings = YouTubeApi.iframeQueue.pop(); YouTubeApi.createIframe(settings); } }, createIframe: function createIframe(settings) { return new YT.Player(settings.containerId, settings); }, getYouTubeId: function getYouTubeId(url) { var youTubeId = ''; if (url.indexOf('?') > 0) { youTubeId = YouTubeApi.getYouTubeIdFromParam(url); if (youTubeId === '') { youTubeId = YouTubeApi.getYouTubeIdFromUrl(url); } } else { youTubeId = YouTubeApi.getYouTubeIdFromUrl(url); } var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1); youTubeId = id.split('?'); return youTubeId[0]; }, getYouTubeIdFromParam: function getYouTubeIdFromParam(url) { if (url === undefined || url === null || !url.trim().length) { return null; } var parts = url.split('?'), parameters = parts[1].split('&'); var youTubeId = ''; for (var i = 0, total = parameters.length; i < total; i++) { var paramParts = parameters[i].split('='); if (paramParts[0] === 'v') { youTubeId = paramParts[1]; break; } } return youTubeId; }, getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) { if (url === undefined || url === null || !url.trim().length) { return null; } var parts = url.split('?'); url = parts[0]; return url.substring(url.lastIndexOf('/') + 1); }, getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) { if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) { return url; } var parts = url.split('/'); parts[2] = parts[2].replace('.com', '-nocookie.com'); return parts.join('/'); } }; var YouTubeIframeRenderer = { name: 'youtube_iframe', options: { prefix: 'youtube_iframe', youtube: { autoplay: 0, controls: 0, disablekb: 1, end: 0, loop: 0, modestbranding: 0, playsinline: 0, rel: 0, showinfo: 0, start: 0, iv_load_policy: 3, nocookie: false, imageQuality: null } }, canPlayType: function canPlayType(type) { return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase()); }, create: function create(mediaElement, options, mediaFiles) { var youtube = {}, apiStack = [], readyState = 4; var youTubeApi = null, paused = true, ended = false, youTubeIframe = null, volume = 1; youtube.options = options; youtube.id = mediaElement.id + '_' + options.prefix; youtube.mediaElement = mediaElement; var props = _mejs2.default.html5media.properties, assignGettersSetters = function assignGettersSetters(propName) { var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); youtube['get' + capName] = function () { if (youTubeApi !== null) { var value = null; switch (propName) { case 'currentTime': return youTubeApi.getCurrentTime(); case 'duration': return youTubeApi.getDuration(); case 'volume': volume = youTubeApi.getVolume() / 100; return volume; case 'playbackRate': return youTubeApi.getPlaybackRate(); case 'paused': return paused; case 'ended': return ended; case 'muted': return youTubeApi.isMuted(); case 'buffered': var percentLoaded = youTubeApi.getVideoLoadedFraction(), duration = youTubeApi.getDuration(); return { start: function start() { return 0; }, end: function end() { return percentLoaded * duration; }, length: 1 }; case 'src': return youTubeApi.getVideoUrl(); case 'readyState': return readyState; } return value; } else { return null; } }; youtube['set' + capName] = function (value) { if (youTubeApi !== null) { switch (propName) { case 'src': var url = typeof value === 'string' ? value : value[0].src, _videoId = YouTubeApi.getYouTubeId(url); if (mediaElement.originalNode.autoplay) { youTubeApi.loadVideoById(_videoId); } else { youTubeApi.cueVideoById(_videoId); } break; case 'currentTime': youTubeApi.seekTo(value); break; case 'muted': if (value) { youTubeApi.mute(); } else { youTubeApi.unMute(); } setTimeout(function () { var event = (0, _general.createEvent)('volumechange', youtube); mediaElement.dispatchEvent(event); }, 50); break; case 'volume': volume = value; youTubeApi.setVolume(value * 100); setTimeout(function () { var event = (0, _general.createEvent)('volumechange', youtube); mediaElement.dispatchEvent(event); }, 50); break; case 'playbackRate': youTubeApi.setPlaybackRate(value); setTimeout(function () { var event = (0, _general.createEvent)('ratechange', youtube); mediaElement.dispatchEvent(event); }, 50); break; case 'readyState': var event = (0, _general.createEvent)('canplay', youtube); mediaElement.dispatchEvent(event); break; default: break; } } else { apiStack.push({ type: 'set', propName: propName, value: value }); } }; }; for (var i = 0, total = props.length; i < total; i++) { assignGettersSetters(props[i]); } var methods = _mejs2.default.html5media.methods, assignMethods = function assignMethods(methodName) { youtube[methodName] = function () { if (youTubeApi !== null) { switch (methodName) { case 'play': paused = false; return youTubeApi.playVideo(); case 'pause': paused = true; return youTubeApi.pauseVideo(); case 'load': return null; } } else { apiStack.push({ type: 'call', methodName: methodName }); } }; }; for (var _i = 0, _total = methods.length; _i < _total; _i++) { assignMethods(methods[_i]); } var errorHandler = function errorHandler(error) { var message = ''; switch (error.data) { case 2: message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.'; break; case 5: message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.'; break; case 100: message = 'The video requested was not found. Either video has been removed or has been marked as private.'; break; case 101: case 105: message = 'The owner of the requested video does not allow it to be played in embedded players.'; break; default: message = 'Unknown error.'; break; } mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles); }; var youtubeContainer = _document2.default.createElement('div'); youtubeContainer.id = youtube.id; if (youtube.options.youtube.nocookie) { mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src); } mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode); mediaElement.originalNode.style.display = 'none'; var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio', height = isAudio ? '1' : mediaElement.originalNode.height, width = isAudio ? '1' : mediaElement.originalNode.width, videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src), youtubeSettings = { id: youtube.id, containerId: youtubeContainer.id, videoId: videoId, height: height, width: width, host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined, playerVars: Object.assign({ controls: 0, rel: 0, disablekb: 1, showinfo: 0, modestbranding: 0, html5: 1, iv_load_policy: 3 }, youtube.options.youtube), origin: _window2.default.location.host, events: { onReady: function onReady(e) { mediaElement.youTubeApi = youTubeApi = e.target; mediaElement.youTubeState = { paused: true, ended: false }; if (apiStack.length) { for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) { var stackItem = apiStack[_i2]; if (stackItem.type === 'set') { var propName = stackItem.propName, capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1); youtube['set' + capName](stackItem.value); } else if (stackItem.type === 'call') { youtube[stackItem.methodName](); } } } youTubeIframe = youTubeApi.getIframe(); if (mediaElement.originalNode.muted) { youTubeApi.mute(); } var events = ['mouseover', 'mouseout'], assignEvents = function assignEvents(e) { var newEvent = (0, _general.createEvent)(e.type, youtube); mediaElement.dispatchEvent(newEvent); }; for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) { youTubeIframe.addEventListener(events[_i3], assignEvents, false); } var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay']; for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) { var event = (0, _general.createEvent)(initEvents[_i4], youtube); mediaElement.dispatchEvent(event); } }, onStateChange: function onStateChange(e) { var events = []; switch (e.data) { case -1: events = ['loadedmetadata']; paused = true; ended = false; break; case 0: events = ['ended']; paused = false; ended = !youtube.options.youtube.loop; if (!youtube.options.youtube.loop) { youtube.stopInterval(); } break; case 1: events = ['play', 'playing']; paused = false; ended = false; youtube.startInterval(); break; case 2: events = ['pause']; paused = true; ended = false; youtube.stopInterval(); break; case 3: events = ['progress']; ended = false; break; case 5: events = ['loadeddata', 'loadedmetadata', 'canplay']; paused = true; ended = false; break; } for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) { var event = (0, _general.createEvent)(events[_i5], youtube); mediaElement.dispatchEvent(event); } }, onError: function onError(e) { return errorHandler(e); } } }; if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) { youtubeSettings.playerVars.playsinline = 1; } if (mediaElement.originalNode.controls) { youtubeSettings.playerVars.controls = 1; } if (mediaElement.originalNode.autoplay) { youtubeSettings.playerVars.autoplay = 1; } if (mediaElement.originalNode.loop) { youtubeSettings.playerVars.loop = 1; } if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) { youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src); } YouTubeApi.enqueueIframe(youtubeSettings); youtube.onEvent = function (eventName, player, _youTubeState) { if (_youTubeState !== null && _youTubeState !== undefined) { mediaElement.youTubeState = _youTubeState; } }; youtube.setSize = function (width, height) { if (youTubeApi !== null) { youTubeApi.setSize(width, height); } }; youtube.hide = function () { youtube.stopInterval(); youtube.pause(); if (youTubeIframe) { youTubeIframe.style.display = 'none'; } }; youtube.show = function () { if (youTubeIframe) { youTubeIframe.style.display = ''; } }; youtube.destroy = function () { youTubeApi.destroy(); }; youtube.interval = null; youtube.startInterval = function () { youtube.interval = setInterval(function () { var event = (0, _general.createEvent)('timeupdate', youtube); mediaElement.dispatchEvent(event); }, 250); }; youtube.stopInterval = function () { if (youtube.interval) { clearInterval(youtube.interval); } }; youtube.getPosterUrl = function () { var quality = options.youtube.imageQuality, resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'], id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src); return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : ''; }; return youtube; } }; _window2.default.onYouTubePlayerAPIReady = function () { YouTubeApi.iFrameReady(); }; _media.typeChecks.push(function (url) { return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null ); }); _renderer.renderer.add(YouTubeIframeRenderer); },{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var NAV = exports.NAV = _window2.default.navigator; var UA = exports.UA = NAV.userAgent.toLowerCase(); var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream; var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream; var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream; var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream; var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA); var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName); var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default); var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA); var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA); var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME; var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA); var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default; var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () { var element = _document2.default.createElement('x'), documentElement = _document2.default.documentElement, getComputedStyle = _window2.default.getComputedStyle; if (!('pointerEvents' in element.style)) { return false; } element.style.pointerEvents = 'auto'; element.style.pointerEvents = 'x'; documentElement.appendChild(element); var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto'; element.remove(); return !!supports; }(); var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () { var supportsPassive = false; try { var opts = Object.defineProperty({}, 'passive', { get: function get() { supportsPassive = true; } }); _window2.default.addEventListener('test', null, opts); } catch (e) {} return supportsPassive; }(); var html5Elements = ['source', 'track', 'audio', 'video']; var video = void 0; for (var i = 0, total = html5Elements.length; i < total; i++) { video = _document2.default.createElement(html5Elements[i]); } var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_IE && /edge/i.test(UA); var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined; var hasNativeFullscreen = video.requestFullscreen !== undefined; if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) { hasNativeFullscreen = false; hasiOSFullScreen = false; } var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined; var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined; var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined; var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen; var nativeFullScreenEnabled = hasTrueNativeFullScreen; var fullScreenEventName = ''; var isFullScreen = void 0, requestFullScreen = void 0, cancelFullScreen = void 0; if (hasMozNativeFullScreen) { nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled; } else if (hasMsNativeFullScreen) { nativeFullScreenEnabled = _document2.default.msFullscreenEnabled; } if (IS_CHROME) { hasiOSFullScreen = false; } if (hasTrueNativeFullScreen) { if (hasWebkitNativeFullScreen) { fullScreenEventName = 'webkitfullscreenchange'; } else if (hasMozNativeFullScreen) { fullScreenEventName = 'fullscreenchange'; } else if (hasMsNativeFullScreen) { fullScreenEventName = 'MSFullscreenChange'; } exports.isFullScreen = isFullScreen = function isFullScreen() { if (hasMozNativeFullScreen) { return _document2.default.mozFullScreen; } else if (hasWebkitNativeFullScreen) { return _document2.default.webkitIsFullScreen; } else if (hasMsNativeFullScreen) { return _document2.default.msFullscreenElement !== null; } }; exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) { if (hasWebkitNativeFullScreen) { el.webkitRequestFullScreen(); } else if (hasMozNativeFullScreen) { el.mozRequestFullScreen(); } else if (hasMsNativeFullScreen) { el.msRequestFullscreen(); } }; exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() { if (hasWebkitNativeFullScreen) { _document2.default.webkitCancelFullScreen(); } else if (hasMozNativeFullScreen) { _document2.default.mozCancelFullScreen(); } else if (hasMsNativeFullScreen) { _document2.default.msExitFullscreen(); } }; } var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen; var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen; var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen; var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen; var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen; var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen; var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled; var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName; exports.isFullScreen = isFullScreen; exports.requestFullScreen = requestFullScreen; exports.cancelFullScreen = cancelFullScreen; _mejs2.default.Features = _mejs2.default.Features || {}; _mejs2.default.Features.isiPad = IS_IPAD; _mejs2.default.Features.isiPod = IS_IPOD; _mejs2.default.Features.isiPhone = IS_IPHONE; _mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad; _mejs2.default.Features.isAndroid = IS_ANDROID; _mejs2.default.Features.isIE = IS_IE; _mejs2.default.Features.isEdge = IS_EDGE; _mejs2.default.Features.isChrome = IS_CHROME; _mejs2.default.Features.isFirefox = IS_FIREFOX; _mejs2.default.Features.isSafari = IS_SAFARI; _mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID; _mejs2.default.Features.hasMSE = HAS_MSE; _mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS; _mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS; _mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT; _mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN; _mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN; _mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN; _mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN; _mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN; _mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN; _mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED; _mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME; _mejs2.default.Features.isFullScreen = isFullScreen; _mejs2.default.Features.requestFullScreen = requestFullScreen; _mejs2.default.Features.cancelFullScreen = cancelFullScreen; },{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeClass = exports.addClass = exports.hasClass = undefined; exports.loadScript = loadScript; exports.offset = offset; exports.toggleClass = toggleClass; exports.fadeOut = fadeOut; exports.fadeIn = fadeIn; exports.siblings = siblings; exports.visible = visible; exports.ajax = ajax; var _window = _dereq_(3); var _window2 = _interopRequireDefault(_window); var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function loadScript(url) { return new Promise(function (resolve, reject) { var script = _document2.default.createElement('script'); script.src = url; script.async = true; script.onload = function () { script.remove(); resolve(); }; script.onerror = function () { script.remove(); reject(); }; _document2.default.head.appendChild(script); }); } function offset(el) { var rect = el.getBoundingClientRect(), scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft, scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop; return { top: rect.top + scrollTop, left: rect.left + scrollLeft }; } var hasClassMethod = void 0, addClassMethod = void 0, removeClassMethod = void 0; if ('classList' in _document2.default.documentElement) { hasClassMethod = function hasClassMethod(el, className) { return el.classList !== undefined && el.classList.contains(className); }; addClassMethod = function addClassMethod(el, className) { return el.classList.add(className); }; removeClassMethod = function removeClassMethod(el, className) { return el.classList.remove(className); }; } else { hasClassMethod = function hasClassMethod(el, className) { return new RegExp('\\b' + className + '\\b').test(el.className); }; addClassMethod = function addClassMethod(el, className) { if (!hasClass(el, className)) { el.className += ' ' + className; } }; removeClassMethod = function removeClassMethod(el, className) { el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), ''); }; } var hasClass = exports.hasClass = hasClassMethod; var addClass = exports.addClass = addClassMethod; var removeClass = exports.removeClass = removeClassMethod; function toggleClass(el, className) { hasClass(el, className) ? removeClass(el, className) : addClass(el, className); } function fadeOut(el) { var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400; var callback = arguments[2]; if (!el.style.opacity) { el.style.opacity = 1; } var start = null; _window2.default.requestAnimationFrame(function animate(timestamp) { start = start || timestamp; var progress = timestamp - start; var opacity = parseFloat(1 - progress / duration, 2); el.style.opacity = opacity < 0 ? 0 : opacity; if (progress > duration) { if (callback && typeof callback === 'function') { callback(); } } else { _window2.default.requestAnimationFrame(animate); } }); } function fadeIn(el) { var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400; var callback = arguments[2]; if (!el.style.opacity) { el.style.opacity = 0; } var start = null; _window2.default.requestAnimationFrame(function animate(timestamp) { start = start || timestamp; var progress = timestamp - start; var opacity = parseFloat(progress / duration, 2); el.style.opacity = opacity > 1 ? 1 : opacity; if (progress > duration) { if (callback && typeof callback === 'function') { callback(); } } else { _window2.default.requestAnimationFrame(animate); } }); } function siblings(el, filter) { var siblings = []; el = el.parentNode.firstChild; do { if (!filter || filter(el)) { siblings.push(el); } } while (el = el.nextSibling); return siblings; } function visible(elem) { if (elem.getClientRects !== undefined && elem.getClientRects === 'function') { return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); } return !!(elem.offsetWidth || elem.offsetHeight); } function ajax(url, dataType, success, error) { var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP'); var type = 'application/x-www-form-urlencoded; charset=UTF-8', completed = false, accept = '*/'.concat('*'); switch (dataType) { case 'text': type = 'text/plain'; break; case 'json': type = 'application/json, text/javascript'; break; case 'html': type = 'text/html'; break; case 'xml': type = 'application/xml, text/xml'; break; } if (type !== 'application/x-www-form-urlencoded') { accept = type + ', */*; q=0.01'; } if (xhr) { xhr.open('GET', url, true); xhr.setRequestHeader('Accept', accept); xhr.onreadystatechange = function () { if (completed) { return; } if (xhr.readyState === 4) { if (xhr.status === 200) { completed = true; var data = void 0; switch (dataType) { case 'json': data = JSON.parse(xhr.responseText); break; case 'xml': data = xhr.responseXML; break; default: data = xhr.responseText; break; } success(data); } else if (typeof error === 'function') { error(xhr.status); } } }; xhr.send(); } } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.offset = offset; _mejs2.default.Utils.hasClass = hasClass; _mejs2.default.Utils.addClass = addClass; _mejs2.default.Utils.removeClass = removeClass; _mejs2.default.Utils.toggleClass = toggleClass; _mejs2.default.Utils.fadeIn = fadeIn; _mejs2.default.Utils.fadeOut = fadeOut; _mejs2.default.Utils.siblings = siblings; _mejs2.default.Utils.visible = visible; _mejs2.default.Utils.ajax = ajax; _mejs2.default.Utils.loadScript = loadScript; },{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.escapeHTML = escapeHTML; exports.debounce = debounce; exports.isObjectEmpty = isObjectEmpty; exports.splitEvents = splitEvents; exports.createEvent = createEvent; exports.isNodeAfter = isNodeAfter; exports.isString = isString; var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function escapeHTML(input) { if (typeof input !== 'string') { throw new Error('Argument passed must be a string'); } var map = { '&': '&', '<': '<', '>': '>', '"': '"' }; return input.replace(/[&<>"]/g, function (c) { return map[c]; }); } function debounce(func, wait) { var _this = this, _arguments = arguments; var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; if (typeof func !== 'function') { throw new Error('First argument must be a function'); } if (typeof wait !== 'number') { throw new Error('Second argument must be a numeric value'); } var timeout = void 0; return function () { var context = _this, args = _arguments; var later = function later() { timeout = null; if (!immediate) { func.apply(context, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { func.apply(context, args); } }; } function isObjectEmpty(instance) { return Object.getOwnPropertyNames(instance).length <= 0; } function splitEvents(events, id) { var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/; var ret = { d: [], w: [] }; (events || '').split(' ').forEach(function (v) { var eventName = '' + v + (id ? '.' + id : ''); if (eventName.startsWith('.')) { ret.d.push(eventName); ret.w.push(eventName); } else { ret[rwindow.test(v) ? 'w' : 'd'].push(eventName); } }); ret.d = ret.d.join(' '); ret.w = ret.w.join(' '); return ret; } function createEvent(eventName, target) { if (typeof eventName !== 'string') { throw new Error('Event name must be a string'); } var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i), detail = { target: target }; if (eventFrags !== null) { eventName = eventFrags[1]; detail.namespace = eventFrags[2]; } return new window.CustomEvent(eventName, { detail: detail }); } function isNodeAfter(sourceNode, targetNode) { return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2); } function isString(value) { return typeof value === 'string'; } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.escapeHTML = escapeHTML; _mejs2.default.Utils.debounce = debounce; _mejs2.default.Utils.isObjectEmpty = isObjectEmpty; _mejs2.default.Utils.splitEvents = splitEvents; _mejs2.default.Utils.createEvent = createEvent; _mejs2.default.Utils.isNodeAfter = isNodeAfter; _mejs2.default.Utils.isString = isString; },{"7":7}],19:[function(_dereq_,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.typeChecks = undefined; exports.absolutizeUrl = absolutizeUrl; exports.formatType = formatType; exports.getMimeFromType = getMimeFromType; exports.getTypeFromFile = getTypeFromFile; exports.getExtension = getExtension; exports.normalizeExtension = normalizeExtension; var _mejs = _dereq_(7); var _mejs2 = _interopRequireDefault(_mejs); var _general = _dereq_(18); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var typeChecks = exports.typeChecks = []; function absolutizeUrl(url) { if (typeof url !== 'string') { throw new Error('`url` argument must be a string'); } var el = document.createElement('div'); el.innerHTML = 'x'; return el.firstChild.href; } function formatType(url) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; return url && !type ? getTypeFromFile(url) : type; } function getMimeFromType(type) { if (typeof type !== 'string') { throw new Error('`type` argument must be a string'); } return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type; } function getTypeFromFile(url) { if (typeof url !== 'string') { throw new Error('`url` argument must be a string'); } for (var i = 0, total = typeChecks.length; i < total; i++) { var type = typeChecks[i](url); if (type) { return type; } } var ext = getExtension(url), normalizedExt = normalizeExtension(ext); var mime = 'video/mp4'; if (normalizedExt) { if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) { mime = 'video/' + normalizedExt; } else if ('mov' === normalizedExt) { mime = 'video/quicktime'; } else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) { mime = 'audio/' + normalizedExt; } } return mime; } function getExtension(url) { if (typeof url !== 'string') { throw new Error('`url` argument must be a string'); } var baseUrl = url.split('?')[0], baseName = baseUrl.split('\\').pop().split('/').pop(); return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : ''; } function normalizeExtension(extension) { if (typeof extension !== 'string') { throw new Error('`extension` argument must be a string'); } switch (extension) { case 'mp4': case 'm4v': return 'mp4'; case 'webm': case 'webma': case 'webmv': return 'webm'; case 'ogg': case 'oga': case 'ogv': return 'ogg'; default: return extension; } } _mejs2.default.Utils = _mejs2.default.Utils || {}; _mejs2.default.Utils.typeChecks = typeChecks; _mejs2.default.Utils.absolutizeUrl = absolutizeUrl; _mejs2.default.Utils.formatType = formatType; _mejs2.default.Utils.getMimeFromType = getMimeFromType; _mejs2.default.Utils.getTypeFromFile = getTypeFromFile; _mejs2.default.Utils.getExtension = getExtension; _mejs2.default.Utils.normalizeExtension = normalizeExtension; },{"18":18,"7":7}],20:[function(_dereq_,module,exports){ 'use strict'; var _document = _dereq_(2); var _document2 = _interopRequireDefault(_document); var _promisePolyfill = _dereq_(4); var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } (function (arr) { arr.forEach(function (item) { if (item.hasOwnProperty('remove')) { return; } Object.defineProperty(item, 'remove', { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentNode.removeChild(this); } }); }); })([Element.prototype, CharacterData.prototype, DocumentType.prototype]); (function () { if (typeof window.CustomEvent === 'function') { return false; } function CustomEvent(event, params) { params = params || { bubbles: false, cancelable: false, detail: undefined }; var evt = _document2.default.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype = window.Event.prototype; window.CustomEvent = CustomEvent; })(); if (typeof Object.assign !== 'function') { Object.assign = function (target) { if (target === null || target === undefined) { throw new TypeError('Cannot convert undefined or null to object'); } var to = Object(target); for (var index = 1, total = arguments.length; index < total; index++) { var nextSource = arguments[index]; if (nextSource !== null) { for (var nextKey in nextSource) { if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { to[nextKey] = nextSource[nextKey]; } } } } return to; }; } if (!String.prototype.startsWith) { String.prototype.startsWith = function (searchString, position) { position = position || 0; return this.substr(position, searchString.length) === searchString; }; } if (!Element.prototype.matches) { Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) { var matches = (this.document || this.ownerDocument).querySelectorAll(s), i = matches.length - 1; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; }; } if (window.Element && !Element.prototype.closest) { Element.prototype.closest = function (s) { var matches = (this.document || this.ownerDocument).querySelectorAll(s), i = void 0, el = this; do { i = matches.length; while (--i >= 0 && matches.item(i) !== el) {} } while (i < 0 && (el = el.parentElement)); return el; }; } (function () { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function () { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) { clearTimeout(id); }; })(); if (/firefox/i.test(navigator.userAgent)) { var getComputedStyle = window.getComputedStyle; window.getComputedStyle = function (el, pseudoEl) { var t = getComputedStyle(el, pseudoEl); return t === null ? { getPropertyValue: function getPropertyValue() {} } : t; }; } if (!window.Promise) { window.Promise = _promisePolyfill2.default; } (function (constructor) { if (constructor && constructor.prototype && constructor.prototype.children === null) { Object.defineProperty(constructor.prototype, 'children', { get: function get() { var i = 0, node = void 0, nodes = this.childNodes, children = []; while (node = nodes[i++]) { if (node.nodeType === 1) { children.push(node); } } return children; } }); } })(window.Node || window.Element); },{"2":2,"4":4}]},{},[20,6,5,9,14,11,10,12,13,15]); PK\ZCw""mediaelement/wp-playlist.jsnu[/* global _wpmejsSettings, MediaElementPlayer */ (function ($, _, Backbone) { 'use strict'; /** @namespace wp */ window.wp = window.wp || {}; var WPPlaylistView = Backbone.View.extend(/** @lends WPPlaylistView.prototype */{ /** * @constructs * * @param {Object} options The options to create this playlist view with. * @param {Object} options.metadata The metadata */ initialize : function (options) { this.index = 0; this.settings = {}; this.data = options.metadata || $.parseJSON( this.$('script.wp-playlist-script').html() ); this.playerNode = this.$( this.data.type ); this.tracks = new Backbone.Collection( this.data.tracks ); this.current = this.tracks.first(); if ( 'audio' === this.data.type ) { this.currentTemplate = wp.template( 'wp-playlist-current-item' ); this.currentNode = this.$( '.wp-playlist-current-item' ); } this.renderCurrent(); if ( this.data.tracklist ) { this.itemTemplate = wp.template( 'wp-playlist-item' ); this.playingClass = 'wp-playlist-playing'; this.renderTracks(); } this.playerNode.attr( 'src', this.current.get( 'src' ) ); _.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' ); if ( ! _.isUndefined( window._wpmejsSettings ) ) { this.settings = _.clone( _wpmejsSettings ); } this.settings.success = this.bindPlayer; this.setPlayer(); }, bindPlayer : function (mejs) { this.mejs = mejs; this.mejs.addEventListener( 'ended', this.ended ); }, bindResetPlayer : function (mejs) { this.bindPlayer( mejs ); this.playCurrentSrc(); }, setPlayer: function (force) { if ( this.player ) { this.player.pause(); this.player.remove(); this.playerNode = this.$( this.data.type ); } if (force) { this.playerNode.attr( 'src', this.current.get( 'src' ) ); this.settings.success = this.bindResetPlayer; } // This is also our bridge to the outside world. this.player = new MediaElementPlayer( this.playerNode.get(0), this.settings ); }, playCurrentSrc : function () { this.renderCurrent(); this.mejs.setSrc( this.playerNode.attr( 'src' ) ); this.mejs.load(); this.mejs.play(); }, renderCurrent : function () { var dimensions, defaultImage = 'wp-includes/images/media/video.svg'; if ( 'video' === this.data.type ) { if ( this.data.images && this.current.get( 'image' ) && -1 === this.current.get( 'image' ).src.indexOf( defaultImage ) ) { this.playerNode.attr( 'poster', this.current.get( 'image' ).src ); } dimensions = this.current.get( 'dimensions' ); if ( dimensions && dimensions.resized ) { this.playerNode.attr( dimensions.resized ); } } else { if ( ! this.data.images ) { this.current.set( 'image', false ); } this.currentNode.html( this.currentTemplate( this.current.toJSON() ) ); } }, renderTracks : function () { var self = this, i = 1, tracklist = $( '
' ); this.tracks.each(function (model) { if ( ! self.data.images ) { model.set( 'image', false ); } model.set( 'artists', self.data.artists ); model.set( 'index', self.data.tracknumbers ? i : false ); tracklist.append( self.itemTemplate( model.toJSON() ) ); i += 1; }); this.$el.append( tracklist ); this.$( '.wp-playlist-item' ).eq(0).addClass( this.playingClass ); }, events : { 'click .wp-playlist-item' : 'clickTrack', 'click .wp-playlist-next' : 'next', 'click .wp-playlist-prev' : 'prev' }, clickTrack : function (e) { e.preventDefault(); this.index = this.$( '.wp-playlist-item' ).index( e.currentTarget ); this.setCurrent(); }, ended : function () { if ( this.index + 1 < this.tracks.length ) { this.next(); } else { this.index = 0; this.setCurrent(); } }, next : function () { this.index = this.index + 1 >= this.tracks.length ? 0 : this.index + 1; this.setCurrent(); }, prev : function () { this.index = this.index - 1 < 0 ? this.tracks.length - 1 : this.index - 1; this.setCurrent(); }, loadCurrent : function () { var last = this.playerNode.attr( 'src' ) && this.playerNode.attr( 'src' ).split('.').pop(), current = this.current.get( 'src' ).split('.').pop(); this.mejs && this.mejs.pause(); if ( last !== current ) { this.setPlayer( true ); } else { this.playerNode.attr( 'src', this.current.get( 'src' ) ); this.playCurrentSrc(); } }, setCurrent : function () { this.current = this.tracks.at( this.index ); if ( this.data.tracklist ) { this.$( '.wp-playlist-item' ) .removeClass( this.playingClass ) .eq( this.index ) .addClass( this.playingClass ); } this.loadCurrent(); } }); /** * Initialize media playlists in the document. * * Only initializes new playlists not previously-initialized. * * @since 4.9.3 * @return {void} */ function initialize() { $( '.wp-playlist:not(:has(.mejs-container))' ).each( function() { new WPPlaylistView( { el: this } ); } ); } /** * Expose the API publicly on window.wp.playlist. * * @namespace wp.playlist * @since 4.9.3 * @type {object} */ window.wp.playlist = { initialize: initialize }; $( document ).ready( initialize ); window.WPPlaylistView = WPPlaylistView; }(jQuery, _, Backbone)); PK\>Ok@@#mediaelement/renderers/vimeo.min.jsnu[/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */ !function a(o,s,u){function c(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(l)return l(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return c(t||e)},i,i.exports,a,o,s,u)}return s[n].exports}for(var l="function"==typeof require&&require,e=0;e 0) { bufferedTime = duration * loadProgress; if (mediaElement.originalNode.autoplay) { paused = false; ended = false; var event = mejs.Utils.createEvent('play', vimeo); mediaElement.dispatchEvent(event); } } }).catch(function (error) { errorHandler(error, vimeo); }); }); vimeoPlayer.on('progress', function () { vimeoPlayer.getDuration().then(function (loadProgress) { duration = loadProgress; if (duration > 0) { bufferedTime = duration * loadProgress; if (mediaElement.originalNode.autoplay) { var initEvent = mejs.Utils.createEvent('play', vimeo); mediaElement.dispatchEvent(initEvent); var playingEvent = mejs.Utils.createEvent('playing', vimeo); mediaElement.dispatchEvent(playingEvent); } } var event = mejs.Utils.createEvent('progress', vimeo); mediaElement.dispatchEvent(event); }).catch(function (error) { return errorHandler(error); }); }); vimeoPlayer.on('timeupdate', function () { vimeoPlayer.getCurrentTime().then(function (seconds) { currentTime = seconds; var event = mejs.Utils.createEvent('timeupdate', vimeo); mediaElement.dispatchEvent(event); }).catch(function (error) { return errorHandler(error); }); }); vimeoPlayer.on('play', function () { paused = false; ended = false; var event = mejs.Utils.createEvent('play', vimeo); mediaElement.dispatchEvent(event); var playingEvent = mejs.Utils.createEvent('playing', vimeo); mediaElement.dispatchEvent(playingEvent); }); vimeoPlayer.on('pause', function () { paused = true; ended = false; var event = mejs.Utils.createEvent('pause', vimeo); mediaElement.dispatchEvent(event); }); vimeoPlayer.on('ended', function () { paused = false; ended = true; var event = mejs.Utils.createEvent('ended', vimeo); mediaElement.dispatchEvent(event); }); events = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay']; for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) { var event = mejs.Utils.createEvent(events[_i4], vimeo); mediaElement.dispatchEvent(event); } }; var height = mediaElement.originalNode.height, width = mediaElement.originalNode.width, vimeoContainer = document.createElement('iframe'), standardUrl = 'https://player.vimeo.com/video/' + VimeoApi.getVimeoId(mediaFiles[0].src); var queryArgs = ~mediaFiles[0].src.indexOf('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : ''; var args = []; if (mediaElement.originalNode.autoplay && queryArgs.indexOf('autoplay') === -1) { args.push('autoplay=1'); } if (mediaElement.originalNode.loop && queryArgs.indexOf('loop') === -1) { args.push('loop=1'); } queryArgs = '' + queryArgs + (queryArgs ? '&' : '?') + args.join('&'); vimeoContainer.setAttribute('id', vimeo.id); vimeoContainer.setAttribute('width', width); vimeoContainer.setAttribute('height', height); vimeoContainer.setAttribute('frameBorder', '0'); vimeoContainer.setAttribute('src', '' + standardUrl + queryArgs); vimeoContainer.setAttribute('webkitallowfullscreen', 'true'); vimeoContainer.setAttribute('mozallowfullscreen', 'true'); vimeoContainer.setAttribute('allowfullscreen', 'true'); vimeoContainer.setAttribute('allow', 'autoplay'); mediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode); mediaElement.originalNode.style.display = 'none'; VimeoApi.load({ iframe: vimeoContainer, id: vimeo.id }); vimeo.hide = function () { vimeo.pause(); if (vimeoPlayer) { vimeoContainer.style.display = 'none'; } }; vimeo.setSize = function (width, height) { vimeoContainer.setAttribute('width', width); vimeoContainer.setAttribute('height', height); }; vimeo.show = function () { if (vimeoPlayer) { vimeoContainer.style.display = ''; } }; vimeo.destroy = function () {}; return vimeo; } }; mejs.Utils.typeChecks.push(function (url) { return (/(\/\/player\.vimeo|vimeo\.com)/i.test(url) ? 'video/x-vimeo' : null ); }); mejs.Renderers.add(vimeoIframeRenderer); },{}]},{},[1]); PK\ 5i5i+mediaelement/mediaelement-and-player.min.jsnu[/*! * MediaElement.js * http://www.mediaelementjs.com/ * * Wrapper that mimics native HTML5 MediaElement (audio and video) * using a variety of technologies (pure JavaScript, Flash, iframe) * * Copyright 2010-2017, John Dyer (http://j.hn/) * License: MIT * */ !function r(a,s,l){function d(n,e){if(!s[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return d(t||e)},i,i.exports,r,a,s,l)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e',o.addControlElement(t,"fullscreen"),t.addEventListener("click",function(){m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||n.isFullScreen?n.exitFullScreen():n.enterFullScreen()}),n.fullscreenBtn=t,o.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),o.exitFullscreenCallback=function(e){var t=e.which||e.keyCode||0;o.options.enableKeyboard&&27===t&&(m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||o.isFullScreen)&&n.exitFullScreen()},o.globalBind("keydown",o.exitFullscreenCallback),o.normalHeight=0,o.normalWidth=0,m.HAS_TRUE_NATIVE_FULLSCREEN){n.globalBind(m.FULLSCREEN_EVENT_NAME,function(){n.isFullScreen&&(m.isFullScreen()?(n.isNativeFullScreen=!0,n.setControlsSize()):(n.isNativeFullScreen=!1,n.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return m.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":m.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&m.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t},enterFullScreen:function(){var o=this,e=null!==o.media.rendererName&&/(html5|native)/i.test(o.media.rendererName),t=getComputedStyle(o.getElement(o.container));if(o.isVideo)if(!1===o.options.useFakeFullscreen&&(m.IS_IOS||m.IS_SAFARI)&&m.HAS_IOS_FULLSCREEN&&"function"==typeof o.media.originalNode.webkitEnterFullscreen&&o.media.originalNode.canPlayType((0,g.getTypeFromFile)(o.media.getSrc())))o.media.originalNode.webkitEnterFullscreen();else{if((0,v.addClass)(p.default.documentElement,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.getElement(o.container),o.options.classPrefix+"container-fullscreen"),o.normalHeight=parseFloat(t.height),o.normalWidth=parseFloat(t.width),"native-native"!==o.fullscreenMode&&"plugin-native"!==o.fullscreenMode||(m.requestFullScreen(o.getElement(o.container)),o.isInIframe&&setTimeout(function e(){if(o.isNativeFullScreen){var t=f.default.innerWidth||p.default.documentElement.clientWidth||p.default.body.clientWidth,n=screen.width;.002*n',l.addEventListener("click",function(){i.paused?i.play():i.pause()});var d=l.querySelector("button");function u(e){"play"===e?((0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"pause"),d.setAttribute("title",s),d.setAttribute("aria-label",s)):((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"play"),d.setAttribute("title",a),d.setAttribute("aria-label",a))}i.addControlElement(l,"playpause"),u("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&u("pse")}),o.addEventListener("play",function(){u("play")}),o.addEventListener("playing",function(){u("play")}),o.addEventListener("pause",function(){u("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.addClass)(l,i.options.classPrefix+"replay"),d.setAttribute("title",a),d.setAttribute("aria-label",a))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";var p=r(e(2)),o=e(16),i=r(o),m=r(e(5)),y=e(25),E=e(30),b=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(i.default.prototype,{buildprogress:function(h,s,e,d){var u=0,v=!1,c=!1,g=this,t=h.options.autoRewind,n=h.options.enableProgressTooltip?'00:00':"",o=p.default.createElement("div");o.className=g.options.classPrefix+"time-rail",o.innerHTML=''+n+"",g.addControlElement(o,"progress"),g.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&0o+n.left&&(d=o+n.left),a=(l=d-n.left)/o,g.newTime=a*g.getDuration(),v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),!y.IS_IOS&&!y.IS_ANDROID){if(l<0&&(l=0),g.options.useSmoothHover&&null!==r&&void 0!==window[r]){var u=new window[r](getComputedStyle(g.handle)[i]).m41,c=l/parseFloat(getComputedStyle(g.total).width)-u/parseFloat(getComputedStyle(g.total).width);g.hovered.style.left=u+"px",g.setTransformStyle(g.hovered,"scaleX("+c+")"),g.hovered.setAttribute("pos",l),0<=c?(0,b.removeClass)(g.hovered,"negative"):(0,b.addClass)(g.hovered,"negative")}if(g.timefloat){var f=g.timefloat.offsetWidth/2,p=mejs.Utils.offset(g.getElement(g.container)),m=getComputedStyle(g.timefloat);s=d-p.left=g.getElement(g.container).offsetWidth-f?g.total.offsetWidth-f:l,(0,b.hasClass)(g.getElement(g.container),g.options.classPrefix+"long-video")&&(s+=parseFloat(m.marginLeft)/2+g.timefloat.offsetWidth/2),g.timefloat.style.left=s+"px",g.timefloatcurrent.innerHTML=(0,E.secondsToTimeCode)(g.newTime,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),g.timefloat.style.display="block"}}}else y.IS_IOS||y.IS_ANDROID||!g.timefloat||(s=g.timefloat.offsetWidth+o>=g.getElement(g.container).offsetWidth?g.timefloat.offsetWidth/2:0,g.timefloat.style.left=s+"px",g.timefloat.style.left=s+"px",g.timefloat.style.display="block")},f=function(){1e3<=new Date-u&&g.play()};g.slider.addEventListener("focus",function(){h.options.autoRewind=!1}),g.slider.addEventListener("blur",function(){h.options.autoRewind=t}),g.slider.addEventListener("keydown",function(e){if(1e3<=new Date-u&&(c=g.paused),g.options.enableKeyboard&&g.options.keyActions.length){var t=e.which||e.keyCode||0,n=g.getDuration(),o=h.options.defaultSeekForwardInterval(d),i=h.options.defaultSeekBackwardInterval(d),r=g.getCurrentTime(),a=g.getElement(g.container).querySelector("."+g.options.classPrefix+"volume-slider");if(38===t||40===t){a&&(a.style.display="block"),g.isVideo&&(g.showControls(),g.startControlsTimer());var s=38===t?Math.min(g.volume+.1,1):Math.max(g.volume-.1,0),l=s<=0;return g.setVolume(s),void g.setMuted(l)}switch(a&&(a.style.display="none"),t){case 37:g.getDuration()!==1/0&&(r-=i);break;case 39:g.getDuration()!==1/0&&(r+=o);break;case 36:r=0;break;case 35:r=n;break;case 13:case 32:return void(y.IS_FIREFOX&&(g.paused?g.play():g.pause()));default:return}r=r<0||isNaN(r)?0:n<=r?n:Math.floor(r),u=new Date,c||h.pause(),setTimeout(function(){g.setCurrentTime(r)},0),r | "}),Object.assign(i.default.prototype,{buildcurrent:function(e,t,n,o){var i=this,r=a.default.createElement("div");r.className=i.options.classPrefix+"time",r.setAttribute("role","timer"),r.setAttribute("aria-live","off"),r.innerHTML=''+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"",i.addControlElement(r,"current"),e.updateCurrent(),i.updateTimeCallback=function(){i.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",i.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var i=this;if(t.lastChild.querySelector("."+i.options.classPrefix+"currenttime"))t.querySelector("."+i.options.classPrefix+"time").innerHTML+=i.options.timeAndDurationSeparator+''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"";else{t.querySelector("."+i.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+i.options.classPrefix+"currenttime").parentNode,i.options.classPrefix+"currenttime-container");var r=a.default.createElement("div");r.className=i.options.classPrefix+"time "+i.options.classPrefix+"duration-container",r.innerHTML=''+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"",i.addControlElement(r,"duration")}i.updateDurationCallback=function(){i.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",i.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5
',o.captions.style.display="none",t.insertBefore(o.captions,t.firstChild),o.captionsText=o.captions.querySelector("."+i.options.classPrefix+"captions-text"),o.captionsButton=L.default.createElement("div"),o.captionsButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"captions-button",o.captionsButton.innerHTML='
",i.addControlElement(o.captionsButton,"tracks"),o.captionsButton.querySelector("."+i.options.classPrefix+"captions-selector-input").disabled=!1,o.chaptersButton=L.default.createElement("div"),o.chaptersButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"chapters-button",o.chaptersButton.innerHTML='
    ';for(var u=0,c=0;c"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n";for(var o=r.chaptersButton.querySelectorAll('input[type="radio"]'),i=r.chaptersButton.querySelectorAll("."+r.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a>1].start,a=e[i].stop,r<=t&&t ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a$1"),n.push({identifier:r,start:0===(0,m.convertSMPTEtoSeconds)(o[1])?.2:(0,m.convertSMPTEtoSeconds)(o[1]),stop:(0,m.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=L.default.adoptNode((new DOMParser).parseFromString(e,"application/xml").documentElement).querySelector("div"),n=t.querySelectorAll("p"),o=L.default.getElementById(t.getAttribute("style")),i=[],r=void 0;if(o){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s$1"),i.push(f)}return i}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";var x=r(e(2)),o=e(16),i=r(o),w=r(e(5)),P=e(25),T=e(27),C=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(i.default.prototype,{buildvolume:function(e,t,n,o){if(!P.IS_ANDROID&&!P.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,s=a.isVideo?a.options.videoVolume:a.options.audioVolume,r=(0,T.isString)(a.options.muteText)?a.options.muteText:w.default.t("mejs.mute"),l=(0,T.isString)(a.options.unmuteText)?a.options.unmuteText:w.default.t("mejs.unmute"),i=(0,T.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:w.default.t("mejs.volume-help-text"),d=x.default.createElement("div");if(d.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",d.innerHTML="horizontal"===s?'':''+i+'
    ',a.addControlElement(d,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&t.matches(":focus")&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),0'+i+'
    ',d.parentNode.insertBefore(u,d.nextSibling)}var c=!1,f=!1,p=!1,m="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),h="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),v="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),g="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),y=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute");var t=d.firstElementChild;t.setAttribute("title",l),t.setAttribute("aria-label",l)}else{(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute");var n=d.firstElementChild;n.setAttribute("title",r),n.setAttribute("aria-label",r)}var o=100*e+"%",i=getComputedStyle(g);"vertical"===s?(v.style.bottom=0,v.style.height=o,g.style.bottom=o,g.style.marginBottom=-parseFloat(i.height)/2+"px"):(v.style.left=0,v.style.width=o,g.style.left=o,g.style.marginLeft=-parseFloat(i.width)/2+"px")}},E=function(e){var t=(0,C.offset)(h),n=getComputedStyle(h);p=!0;var o=null;if("vertical"===s){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),y(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},b=function(){a.muted?(y(0),(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute")):(y(o.volume),(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseenter",function(e){e.target===d&&(m.style.display="block",f=!0,e.preventDefault(),e.stopPropagation())}),d.addEventListener("focusin",function(){m.style.display="block",f=!0}),d.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseleave",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),d.addEventListener("focusout",function(){f=!1}),d.addEventListener("keydown",function(e){if(a.options.enableKeyboard&&a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}c=!1,y(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),d.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,T.createEvent)("volumechange",o);o.dispatchEvent(e)}),m.addEventListener("dragstart",function(){return!1}),m.addEventListener("mouseover",function(){f=!0}),m.addEventListener("focusin",function(){m.style.display="block",f=!0}),m.addEventListener("focusout",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),m.addEventListener("mousedown",function(e){E(e),a.globalBind("mousemove.vol",function(e){var t=e.target;c&&(t===m||t.closest("vertical"===s?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&E(e)}),a.globalBind("mouseup.vol",function(){c=!1,f||"vertical"!==s||(m.style.display="none")}),c=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){var t;c||b(),t=Math.floor(100*o.volume),m.setAttribute("aria-valuenow",t),m.setAttribute("aria-valuetext",t+"%")});var S=!1;o.addEventListener("rendererready",function(){p||setTimeout(function(){S=!0,(0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){p||S||((0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()),S=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),b()),a.getElement(a.container).addEventListener("controlsresize",function(){b()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function o(e,t){for(var n=0;n
    ',n.getElement(n.container).addEventListener("focus",function(e){if(!n.controlsAreVisible&&!n.hasFocus&&n.controlsEnabled){n.showControls(!0);var t=(0,m.isNodeAfter)(e.relatedTarget,n.getElement(n.container))?"."+n.options.classPrefix+"controls ."+n.options.classPrefix+"button:last-child > button":"."+n.options.classPrefix+"playpause-button > button";n.getElement(n.container).querySelector(t).focus()}}),n.node.parentNode.insertBefore(n.getElement(n.container),n.node),n.options.features.length||n.options.useDefaultControls||(n.getElement(n.container).style.background="transparent",n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls").style.display="none"),n.isVideo&&"fill"===n.options.stretching&&!P.hasClass(n.getElement(n.container).parentNode,n.options.classPrefix+"fill-container")){n.outerContainer=n.media.parentNode;var r=x.default.createElement("div");r.className=n.options.classPrefix+"fill-container",n.getElement(n.container).parentNode.insertBefore(r,n.getElement(n.container)),r.appendChild(n.getElement(n.container))}w.IS_ANDROID&&P.addClass(n.getElement(n.container),n.options.classPrefix+"android"),w.IS_IOS&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ios"),w.IS_IPAD&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ipad"),w.IS_IPHONE&&P.addClass(n.getElement(n.container),n.options.classPrefix+"iphone"),P.addClass(n.getElement(n.container),n.isVideo?n.options.classPrefix+"video":n.options.classPrefix+"audio"),n.getElement(n.container).querySelector("."+n.options.classPrefix+"mediaelement").appendChild(n.node),(n.media.player=n).controls=n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls"),n.layers=n.getElement(n.container).querySelector("."+n.options.classPrefix+"layers");var a=n.isVideo?"video":"audio",s=a.substring(0,1).toUpperCase()+a.substring(1);0=n.width?n.width/n.height:n.height/n.width,n.setPlayerSize(n.width,n.height),e.pluginWidth=n.width,e.pluginHeight=n.height}if(f.default.MepDefaults=e,new d.default(n.media,e,n.mediaFiles),void 0!==n.getElement(n.container)&&n.options.features.length&&n.controlsAreVisible&&!n.options.hideVideoControlsOnLoad){var l=(0,m.createEvent)("controlsshown",n.getElement(n.container));n.getElement(n.container).dispatchEvent(l)}}},{key:"showControls",value:function(e){var i=this;if(e=void 0===e||e,!i.controlsAreVisible&&i.isVideo){if(e)!function(){P.fadeIn(i.getElement(i.controls),200,function(){P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen");var e=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeIn(n[e],200,function(){P.removeClass(n[e],i.options.classPrefix+"offscreen")})},t=0,o=n.length;t'),e.message&&(a="

    "+e.message+"

    "),e.urls)for(var d=0,u=e.urls.length;d'+f.default.i18n.t("mejs.download-file")+": "+c.src+""}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var o=this,e=function(){for(var t=void 0,n=o.getElement(o.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),t=e?getComputedStyle(e,null):getComputedStyle(x.default.body,null),n=o.isVideo?o.node.videoWidth&&0=o.width?o.node.videoWidth/o.node.videoHeight:o.node.videoHeight/o.node.videoWidth:o.initialAspectRatio,(isNaN(e)||e<.01||100=o.width?parseFloat(l/r,10):parseFloat(l*r,10):i,isNaN(s)&&(s=a),0img");a&&(a.style.display="");for(var s=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),l=e.height,d=e.width,u=i,c=l*i/d,f=d*r/l,p=r,m=i',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='
    ',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='
    ',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||w.IS_FIREFOX&&32===t){var n=(0,m.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||t.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||w.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var l=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",l=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!w.IS_STOCK_ANDROID?"":"none",r.style.display="none",l=!1}),o.addEventListener("pause",function(){r.style.display="none",w.IS_STOCK_ANDROID||l||(s.style.display=""),l=!1}),o.addEventListener("waiting",function(){r.style.display="",l=!1}),o.addEventListener("loadeddata",function(){r.style.display="",w.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(x.default.createEvent){var e=x.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),l=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),l=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",l=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(e){i.onkeydown(t,o,e),l=!1})}}},{key:"buildkeyboard",value:function(o,e,t,i){var r=this;r.getElement(r.container).addEventListener("keydown",function(){r.keyboardAction=!0}),r.globalKeydownCallback=function(e){var t=x.default.activeElement.closest("."+r.options.classPrefix+"container"),n=r.media.closest("."+r.options.classPrefix+"container");return r.hasFocus=!(!t||!n||t.id!==n.id),r.onkeydown(o,i,e)},r.globalClickCallback=function(e){r.hasFocus=!!e.target.closest("."+r.options.classPrefix+"container")},r.globalBind("keydown",r.globalKeydownCallback),r.globalBind("click",r.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;oimg");(e&&l.node.setAttribute("poster",e.src),delete l.node.autoplay,l.node.setAttribute("src",""),""!==l.media.canPlayType((0,p.getTypeFromFile)(u))&&l.node.setAttribute("src",u),d&&-1t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){r.plugins[e]=r.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var i=[0,0,0],r=void 0,a=void 0;if(null!==F.NAV.plugins&&void 0!==F.NAV.plugins&&"object"===d(F.NAV.plugins[e])){if((r=F.NAV.plugins[e].description)&&(void 0===F.NAV.mimeTypes||!F.NAV.mimeTypes[t]||F.NAV.mimeTypes[t].enabledPlugin))for(var s=0,l=(i=r.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;s
    '+N.default.t("mejs.install-flash")+"
    "}else x=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(x.push('width="'+S+'"'),x.push('height="'+b+'"')):x.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){o=!1,E&&(r.flashNode.style.display="none")},r.show=function(){o=!0,E&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&0":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function s(o,i){var r=this,a=arguments,s=2x',t.firstChild.href}function d(e){var t=1