/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 29);
/************************************************************************/
/******/ (Array(29).concat([
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(30);
/***/ (function(module, exports, __webpack_require__) {
* @output wp-includes/js/media-views.js
media.isTouchDevice = ( 'ontouchend' in document );
// Link any localized strings.
l10n = media.view.l10n = window._wpMediaViewsL10n || {};
media.view.settings = l10n.settings || {};
// Copy the `post` setting over to the model settings.
media.model.settings.post = media.view.settings.post;
// Check if the browser supports CSS 3.0 transitions.
$.support.transition = (function(){
var style = document.documentElement.style,
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd otransitionend',
transition: 'transitionend'
transition = _.find( _.keys( transitions ), function( transition ) {
return ! _.isUndefined( style[ transition ] );
end: transitions[ transition ]
* A shared event bus used to provide events into
* the media workflows that 3rd-party devs can use to hook
media.events = _.extend( {}, Backbone.Events );
* Makes it easier to bind events using transitions.
* @param {string} selector
* @param {number} sensitivity
media.transition = function( selector, sensitivity ) {
var deferred = $.Deferred();
sensitivity = sensitivity || 2000;
if ( $.support.transition ) {
if ( ! (selector instanceof $) ) {
selector = $( selector );
// Resolve the deferred when the first element finishes animating.
selector.first().one( $.support.transition.end, deferred.resolve );
// Just in case the event doesn't trigger, fire a callback.
_.delay( deferred.resolve, sensitivity );
// Otherwise, execute on the spot.
return deferred.promise();
media.controller.Region = __webpack_require__( 31 );
media.controller.StateMachine = __webpack_require__( 32 );
media.controller.State = __webpack_require__( 33 );
media.selectionSync = __webpack_require__( 34 );
media.controller.Library = __webpack_require__( 35 );
media.controller.ImageDetails = __webpack_require__( 36 );
media.controller.GalleryEdit = __webpack_require__( 37 );
media.controller.GalleryAdd = __webpack_require__( 38 );
media.controller.CollectionEdit = __webpack_require__( 39 );
media.controller.CollectionAdd = __webpack_require__( 40 );
media.controller.FeaturedImage = __webpack_require__( 41 );
media.controller.ReplaceImage = __webpack_require__( 42 );
media.controller.EditImage = __webpack_require__( 43 );
media.controller.MediaLibrary = __webpack_require__( 44 );
media.controller.Embed = __webpack_require__( 45 );
media.controller.Cropper = __webpack_require__( 46 );
media.controller.CustomizeImageCropper = __webpack_require__( 47 );
media.controller.SiteIconCropper = __webpack_require__( 48 );
media.View = __webpack_require__( 49 );
media.view.Frame = __webpack_require__( 50 );
media.view.MediaFrame = __webpack_require__( 51 );
media.view.MediaFrame.Select = __webpack_require__( 52 );
media.view.MediaFrame.Post = __webpack_require__( 53 );
media.view.MediaFrame.ImageDetails = __webpack_require__( 54 );
media.view.Modal = __webpack_require__( 55 );
media.view.FocusManager = __webpack_require__( 56 );
media.view.UploaderWindow = __webpack_require__( 57 );
media.view.EditorUploader = __webpack_require__( 58 );
media.view.UploaderInline = __webpack_require__( 59 );
media.view.UploaderStatus = __webpack_require__( 60 );
media.view.UploaderStatusError = __webpack_require__( 61 );
media.view.Toolbar = __webpack_require__( 62 );
media.view.Toolbar.Select = __webpack_require__( 63 );
media.view.Toolbar.Embed = __webpack_require__( 64 );
media.view.Button = __webpack_require__( 65 );
media.view.ButtonGroup = __webpack_require__( 66 );
media.view.PriorityList = __webpack_require__( 67 );
media.view.MenuItem = __webpack_require__( 68 );
media.view.Menu = __webpack_require__( 69 );
media.view.RouterItem = __webpack_require__( 70 );
media.view.Router = __webpack_require__( 71 );
media.view.Sidebar = __webpack_require__( 72 );
media.view.Attachment = __webpack_require__( 73 );
media.view.Attachment.Library = __webpack_require__( 74 );
media.view.Attachment.EditLibrary = __webpack_require__( 75 );
media.view.Attachments = __webpack_require__( 76 );
media.view.Search = __webpack_require__( 77 );
media.view.AttachmentFilters = __webpack_require__( 78 );
media.view.DateFilter = __webpack_require__( 79 );
media.view.AttachmentFilters.Uploaded = __webpack_require__( 80 );
media.view.AttachmentFilters.All = __webpack_require__( 81 );
media.view.AttachmentsBrowser = __webpack_require__( 82 );
media.view.Selection = __webpack_require__( 83 );
media.view.Attachment.Selection = __webpack_require__( 84 );
media.view.Attachments.Selection = __webpack_require__( 85 );
media.view.Attachment.EditSelection = __webpack_require__( 86 );
media.view.Settings = __webpack_require__( 87 );
media.view.Settings.AttachmentDisplay = __webpack_require__( 88 );
media.view.Settings.Gallery = __webpack_require__( 89 );
media.view.Settings.Playlist = __webpack_require__( 90 );
media.view.Attachment.Details = __webpack_require__( 91 );
media.view.AttachmentCompat = __webpack_require__( 92 );
media.view.Iframe = __webpack_require__( 93 );
media.view.Embed = __webpack_require__( 94 );
media.view.Label = __webpack_require__( 95 );
media.view.EmbedUrl = __webpack_require__( 96 );
media.view.EmbedLink = __webpack_require__( 97 );
media.view.EmbedImage = __webpack_require__( 98 );
media.view.ImageDetails = __webpack_require__( 99 );
media.view.Cropper = __webpack_require__( 100 );
media.view.SiteIconCropper = __webpack_require__( 101 );
media.view.SiteIconPreview = __webpack_require__( 102 );
media.view.EditImage = __webpack_require__( 103 );
media.view.Spinner = __webpack_require__( 104 );
media.view.Heading = __webpack_require__( 105 );
/***/ (function(module, exports) {
* wp.media.controller.Region
* A region is a persistent application layout area.
* A region assumes one mode at any time, and can be switched to another.
* When mode changes, events are triggered on the region's parent view.
* The parent view will listen to specific events and fill the region with an
* appropriate view depending on mode. For example, a frame listens for the
* 'browse' mode t be activated on the 'content' view and then fills the region
* with an AttachmentsBrowser view.
* @memberOf wp.media.controller
* @param {Object} options Options hash for the region.
* @param {string} options.id Unique identifier for the region.
* @param {Backbone.View} options.view A parent view the region exists within.
* @param {string} options.selector jQuery selector for the region within the parent view.
var Region = function( options ) {
_.extend( this, _.pick( options || {}, 'id', 'view', 'selector' ) );
// Use Backbone's self-propagating `extend` inheritance method.
Region.extend = Backbone.Model.extend;
_.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
* @fires Region#deactivate
* @return {wp.media.controller.Region} Returns itself to allow chaining.
// Bail if we're trying to change to the current mode.
if ( mode === this._mode ) {
* Region mode deactivation event.
* @event wp.media.controller.Region#deactivate
this.trigger('deactivate');
* Region mode activation event.
* @event wp.media.controller.Region#activate
this.trigger('activate');
* @return {wp.media.controller.Region} Returns itself to allow chaining.
render: function( mode ) {
// If the mode isn't active, activate it.
if ( mode && mode !== this._mode ) {
return this.mode( mode );
var set = { view: null },
* Create region view event.
* Region view creation takes place in an event callback on the frame.
* @event wp.media.controller.Region#create
* @property {object} view
this.trigger( 'create', set );
* Render region view event.
* Region view creation takes place in an event callback on the frame.
* @event wp.media.controller.Region#render
this.trigger( 'render', view );
* @return {wp.media.View}
return this.view.views.first( this.selector );
* Set the region's view as a subview of the frame.
* @param {Array|Object} views
* @param {Object} [options={}]
* @return {wp.Backbone.Subviews} Subviews is returned to allow chaining.
set: function( views, options ) {
return this.view.views.set( this.selector, views, options );
* Trigger regional view events on the frame.
* @return {undefined|wp.media.controller.Region} Returns itself to allow chaining.
trigger: function( event ) {
args = _.toArray( arguments );
base = this.id + ':' + event;
// Trigger `{this.id}:{event}:{this._mode}` event on the frame.
args[0] = base + ':' + this._mode;
this.view.trigger.apply( this.view, args );
// Trigger `{this.id}:{event}` event on the frame.
this.view.trigger.apply( this.view, args );
/***/ (function(module, exports) {
* wp.media.controller.StateMachine
* A state machine keeps track of state. It is in one state at a time,
* and can change from one state to another.
* States are stored as models in a Backbone collection.
* @memberOf wp.media.controller
* @augments Backbone.Model
var StateMachine = function() {
// Use Backbone's self-propagating `extend` inheritance method.
extend: Backbone.Model.extend
_.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{
* If no `id` is provided, returns the active state.
* Implicitly creates states.
* Ensure that the `states` collection exists so the `StateMachine`
* can be used as a mixin.
* @return {wp.media.controller.State} Returns a State model from
* the StateMachine collection.
this.states = this.states || new Backbone.Collection();
// Default to the active state.
if ( id && ! this.states.get( id ) ) {
this.states.add({ id: id });
return this.states.get( id );
* Bail if we're trying to select the current state, if we haven't
* created the `states` collection, or are trying to select a state