/******/ (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] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = 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; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { var AppComponent, DialogApp, Filter, React; React = __webpack_require__(1); DialogApp = __webpack_require__(2); Filter = __webpack_require__(5); AppComponent = __webpack_require__(15); scrivito.content_browser = (function() { return { filters: {}, base_preset: {}, base_query: null, _center: function() { var domElement, domElements, i, len, results; domElements = $(".scrivito-content-browser"); results = []; for (i = 0, len = domElements.length; i < len; i++) { domElement = domElements[i]; domElement = $(domElement); results.push(domElement.css({ marginLeft: -domElement.innerWidth() / 2, marginTop: -domElement.innerHeight() / 2, left: '50%' })); } return results; }, _showConfirm: function(props) { props.mode = 'confirm'; return this._showAlert(props); }, _showAlert: function(props) { var alertContainer; alertContainer = document.createElement('DIV'); document.body.appendChild(alertContainer); props.promise = $.Deferred(); props.container = alertContainer; React.render(React.createElement(DialogApp, React.__spread({}, props)), alertContainer); return props.promise; }, _loadModal: function() { $('
').addClass('scrivito_overlay scrivito_show').appendTo($('#scrivito_editing')); $('
').addClass('scrivito-content-browser show').appendTo($('#scrivito_editing')); return this._center(); }, _buildFilter: function(options) { var filterConfig, filterContext; filterConfig = options.filters || this.filters; filterContext = options.filter_context; return new Filter(filterConfig, filterContext); }, _startReact: function(options, promise) { var baseQuery, filter; baseQuery = options.base_query || this.base_query; filter = this._buildFilter(options); return this._reactApp = React.render(React.createElement(AppComponent, { "initialFilter": filter, "baseQuery": baseQuery, "promise": promise, "options": options }), this._getLastContentBrowserElement()); }, _getLastElementByClassName: function(className) { var elements; elements = document.getElementsByClassName(className); return _.last(elements); }, _getLastOverlayElement: function() { return this._getLastElementByClassName('scrivito_overlay scrivito_show'); }, _getLastContentBrowserElement: function() { return this._getLastElementByClassName('scrivito-content-browser show'); }, _remove: function(element) { return element.parentNode.removeChild(element); }, close: function() { this._remove(this._getLastOverlayElement()); return this._remove(this._getLastContentBrowserElement()); }, open: function(options) { var promise; if (options == null) { options = {}; } if (!options.hasOwnProperty('base_preset')) { options.base_preset = this.base_preset; } promise = $.Deferred(); this._loadModal(); this._startReact(options, promise); $(window).resize((function(_this) { return function() { return _this._center(); }; })(this)); promise.always((function(_this) { return function() { return _this.close(); }; })(this)); return promise; } }; })(); scrivito.register_public_api("content_browser", scrivito.content_browser); scrivito.register_select_content(function() { return scrivito.content_browser.open({ selectionMode: 'single' }); }); scrivito.register_browse_content(function() { return scrivito.content_browser.open({ selectionMode: 'multi', standAlone: true }); }); /***/ }, /* 1 */ /***/ function(module, exports) { /** * React (with addons) v0.12.2 * * Copyright 2013-2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a-1}};t.exports=r},{"./invariant":137}],5:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};t.exports=a},{}],6:[function(e,t){"use strict";var n=e("./CSSProperty"),r=e("./ExecutionEnvironment"),o=(e("./camelizeStyleName"),e("./dangerousStyleValue")),i=e("./hyphenateStyleName"),a=e("./memoizeStringOnly"),s=(e("./warning"),a(function(e){return i(e)})),u="cssFloat";r.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(u="styleFloat");var c={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=s(n)+":",t+=o(n,r)+";")}return t||null},setValueForStyles:function(e,t){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=o(i,t[i]);if("float"===i&&(i=u),a)r[i]=a;else{var s=n.shorthandPropertyExpansions[i];if(s)for(var c in s)r[c]="";else r[i]=""}}}};t.exports=c},{"./CSSProperty":5,"./ExecutionEnvironment":23,"./camelizeStyleName":109,"./dangerousStyleValue":116,"./hyphenateStyleName":135,"./memoizeStringOnly":146,"./warning":155}],7:[function(e,t){"use strict";function n(){this._callbacks=null,this._contexts=null}var r=e("./PooledClass"),o=e("./Object.assign"),i=e("./invariant");o(n.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){i(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{"./Object.assign":29,"./PooledClass":30,"./invariant":137}],8:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=M.getPooled(P.change,w,e);E.accumulateTwoPhaseDispatches(t),R.batchedUpdates(o,t)}function o(e){g.enqueueEvents(e),g.processEventQueue()}function i(e,t){T=e,w=t,T.attachEvent("onchange",r)}function a(){T&&(T.detachEvent("onchange",r),T=null,w=null)}function s(e,t,n){return e===x.topChange?n:void 0}function u(e,t,n){e===x.topFocus?(a(),i(t,n)):e===x.topBlur&&a()}function c(e,t){T=e,w=t,_=e.value,S=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",k),T.attachEvent("onpropertychange",p)}function l(){T&&(delete T.value,T.detachEvent("onpropertychange",p),T=null,w=null,_=null,S=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==_&&(_=t,r(e))}}function d(e,t,n){return e===x.topInput?n:void 0}function f(e,t,n){e===x.topFocus?(l(),c(t,n)):e===x.topBlur&&l()}function h(e){return e!==x.topSelectionChange&&e!==x.topKeyUp&&e!==x.topKeyDown||!T||T.value===_?void 0:(_=T.value,w)}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===x.topClick?n:void 0}var y=e("./EventConstants"),g=e("./EventPluginHub"),E=e("./EventPropagators"),C=e("./ExecutionEnvironment"),R=e("./ReactUpdates"),M=e("./SyntheticEvent"),b=e("./isEventSupported"),O=e("./isTextInputElement"),D=e("./keyOf"),x=y.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:D({onChange:null}),captured:D({onChangeCapture:null})},dependencies:[x.topBlur,x.topChange,x.topClick,x.topFocus,x.topInput,x.topKeyDown,x.topKeyUp,x.topSelectionChange]}},T=null,w=null,_=null,S=null,N=!1;C.canUseDOM&&(N=b("change")&&(!("documentMode"in document)||document.documentMode>8));var I=!1;C.canUseDOM&&(I=b("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return S.get.call(this)},set:function(e){_=""+e,S.set.call(this,e)}},A={eventTypes:P,extractEvents:function(e,t,r,o){var i,a;if(n(t)?N?i=s:a=u:O(t)?I?i=d:(i=h,a=f):m(t)&&(i=v),i){var c=i(e,t,r);if(c){var l=M.getPooled(P.change,c,o);return E.accumulateTwoPhaseDispatches(l),l}}a&&a(e,t,r)}};t.exports=A},{"./EventConstants":17,"./EventPluginHub":19,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactUpdates":88,"./SyntheticEvent":96,"./isEventSupported":138,"./isTextInputElement":140,"./keyOf":144}],9:[function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};t.exports=r},{}],10:[function(e,t){"use strict";function n(e){switch(e){case y.topCompositionStart:return E.compositionStart;case y.topCompositionEnd:return E.compositionEnd;case y.topCompositionUpdate:return E.compositionUpdate}}function r(e,t){return e===y.topKeyDown&&t.keyCode===h}function o(e,t){switch(e){case y.topKeyUp:return-1!==f.indexOf(t.keyCode);case y.topKeyDown:return t.keyCode!==h;case y.topKeyPress:case y.topMouseDown:case y.topBlur:return!0;default:return!1}}function i(e){this.root=e,this.startSelection=c.getSelection(e),this.startValue=this.getText()}var a=e("./EventConstants"),s=e("./EventPropagators"),u=e("./ExecutionEnvironment"),c=e("./ReactInputSelection"),l=e("./SyntheticCompositionEvent"),p=e("./getTextContentAccessor"),d=e("./keyOf"),f=[9,13,27,32],h=229,m=u.canUseDOM&&"CompositionEvent"in window,v=!m||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11,y=a.topLevelTypes,g=null,E={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})},dependencies:[y.topBlur,y.topCompositionEnd,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})},dependencies:[y.topBlur,y.topCompositionStart,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})},dependencies:[y.topBlur,y.topCompositionUpdate,y.topKeyDown,y.topKeyPress,y.topKeyUp,y.topMouseDown]}};i.prototype.getText=function(){return this.root.value||this.root[p()]},i.prototype.getData=function(){var e=this.getText(),t=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return e.substr(t,e.length-n-t)};var C={eventTypes:E,extractEvents:function(e,t,a,u){var c,p;if(m?c=n(e):g?o(e,u)&&(c=E.compositionEnd):r(e,u)&&(c=E.compositionStart),v&&(g||c!==E.compositionStart?c===E.compositionEnd&&g&&(p=g.getData(),g=null):g=new i(t)),c){var d=l.getPooled(c,a,u);return p&&(d.data=p),s.accumulateTwoPhaseDispatches(d),d}}};t.exports=C},{"./EventConstants":17,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactInputSelection":63,"./SyntheticCompositionEvent":94,"./getTextContentAccessor":132,"./keyOf":144}],11:[function(e,t){"use strict";function n(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r,o=e("./Danger"),i=e("./ReactMultiChildUpdateTypes"),a=e("./getTextContentAccessor"),s=e("./invariant"),u=a();r="textContent"===u?function(e,t){e.textContent=t}:function(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);if(t){var n=e.ownerDocument||document;e.appendChild(n.createTextNode(t))}};var c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:r,processUpdates:function(e,t){for(var a,u=null,c=null,l=0;a=e[l];l++)if(a.type===i.MOVE_EXISTING||a.type===i.REMOVE_NODE){var p=a.fromIndex,d=a.parentNode.childNodes[p],f=a.parentID;s(d),u=u||{},u[f]=u[f]||[],u[f][p]=d,c=c||[],c.push(d)}var h=o.dangerouslyRenderMarkup(t);if(c)for(var m=0;mt||r.hasOverloadedBooleanValue[e]&&t===!1}var r=e("./DOMProperty"),o=e("./escapeTextForBrowser"),i=e("./memoizeStringOnly"),a=(e("./warning"),i(function(e){return o(e)+'="'})),s={createMarkupForID:function(e){return a(r.ID_ATTRIBUTE_NAME)+o(e)+'"'},createMarkupForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(n(e,t))return"";var i=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&t===!0?o(i):a(i)+o(t)+'"'}return r.isCustomAttribute(e)?null==t?"":a(e)+o(t)+'"':null},setValueForProperty:function(e,t,o){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var i=r.getMutationMethod[t];if(i)i(e,o);else if(n(t,o))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute[t])e.setAttribute(r.getAttributeName[t],""+o);else{var a=r.getPropertyName[t];r.hasSideEffects[t]&&""+e[a]==""+o||(e[a]=o)}}else r.isCustomAttribute(t)&&(null==o?e.removeAttribute(t):e.setAttribute(t,""+o))},deleteValueForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var n=r.getMutationMethod[t];if(n)n(e,void 0);else if(r.mustUseAttribute[t])e.removeAttribute(r.getAttributeName[t]);else{var o=r.getPropertyName[t],i=r.getDefaultValueForProperty(e.nodeName,o);r.hasSideEffects[t]&&""+e[o]===i||(e[o]=i)}}else r.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=s},{"./DOMProperty":12,"./escapeTextForBrowser":120,"./memoizeStringOnly":146,"./warning":155}],14:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var r=e("./ExecutionEnvironment"),o=e("./createNodesFromMarkup"),i=e("./emptyFunction"),a=e("./getMarkupWrap"),s=e("./invariant"),u=/^(<[^ \/>]+)/,c="data-danger-index",l={dangerouslyRenderMarkup:function(e){s(r.canUseDOM);for(var t,l={},p=0;pu;u++){var l=s[u];if(l){var p=l.extractEvents(e,t,r,i);p&&(a=o(a,p))}}return a},enqueueEvents:function(e){e&&(u=o(u,e))},processEventQueue:function(){var e=u;u=null,i(e,c),a(!u)},__purge:function(){s={}},__getListenerBank:function(){return s}};t.exports=p},{"./EventPluginRegistry":20,"./EventPluginUtils":21,"./accumulateInto":106,"./forEachAccumulated":123,"./invariant":137}],20:[function(e,t){"use strict";function n(){if(a)for(var e in s){var t=s[e],n=a.indexOf(e);if(i(n>-1),!u.plugins[n]){i(t.extractEvents),u.plugins[n]=t;var o=t.eventTypes;for(var c in o)i(r(o[c],t,c))}}}function r(e,t,n){i(!u.eventNameDispatchConfigs.hasOwnProperty(n)),u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var s=r[a];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){i(!u.registrationNameModules[e]),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e("./invariant"),a=null,s={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];s.hasOwnProperty(r)&&s[r]===o||(i(!s[r]),s[r]=o,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=u},{"./invariant":137}],21:[function(e,t){"use strict";function n(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function r(e){return e===m.topMouseMove||e===m.topTouchMove}function o(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;ol;l++){var d=s[l];a.hasOwnProperty(d)&&a[d]||(d===u.topWheel?c("wheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",o):c("mousewheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",o):m.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",o):d===u.topScroll?c("scroll",!0)?m.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",o):m.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):d===u.topFocus||d===u.topBlur?(c("focus",!0)?(m.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",o),m.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",o)):c("focusin")&&(m.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",o),m.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",o)),a[u.topBlur]=!0,a[u.topFocus]=!0):f.hasOwnProperty(d)&&m.ReactEventListener.trapBubbledEvent(d,f[d],o),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!p){var e=s.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=m},{"./EventConstants":17,"./EventPluginHub":19,"./EventPluginRegistry":20,"./Object.assign":29,"./ReactEventEmitterMixin":60,"./ViewportMetrics":105,"./isEventSupported":138}],34:[function(e,t){"use strict";var n=e("./React"),r=e("./Object.assign"),o=n.createFactory(e("./ReactTransitionGroup")),i=n.createFactory(e("./ReactCSSTransitionGroupChild")),a=n.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:n.PropTypes.string.isRequired,transitionEnter:n.PropTypes.bool,transitionLeave:n.PropTypes.bool},getDefaultProps:function(){return{transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return i({name:this.props.transitionName,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return o(r({},this.props,{childFactory:this._wrapChild}))}});t.exports=a},{"./Object.assign":29,"./React":31,"./ReactCSSTransitionGroupChild":35,"./ReactTransitionGroup":87}],35:[function(e,t){"use strict";var n=e("./React"),r=e("./CSSCore"),o=e("./ReactTransitionEvents"),i=e("./onlyChild"),a=17,s=n.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(e,t){var n=this.getDOMNode(),i=this.props.name+"-"+e,a=i+"-active",s=function(e){e&&e.target!==n||(r.removeClass(n,i),r.removeClass(n,a),o.removeEndEventListener(n,s),t&&t())};o.addEndEventListener(n,s),r.addClass(n,i),this.queueClass(a)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,a))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(r.addClass.bind(r,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return i(this.props.children)}});t.exports=s},{"./CSSCore":4,"./React":31,"./ReactTransitionEvents":86,"./onlyChild":148}],36:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function o(e,t,o){if(null==e)return e;var i=n.getPooled(t,o);p(e,r,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var s=o.mapFunction.call(o.mapContext,t,r);i[n]=s}}function s(e,t,n){if(null==e)return e;var r={},o=i.getPooled(r,t,n);return p(e,a,o),i.release(o),r}function u(){return null}function c(e){return p(e,u,null)}var l=e("./PooledClass"),p=e("./traverseAllChildren"),d=(e("./warning"),l.twoArgumentPooler),f=l.threeArgumentPooler;l.addPoolingTo(n,d),l.addPoolingTo(i,f);var h={forEach:o,map:s,count:c};t.exports=h},{"./PooledClass":30,"./traverseAllChildren":153,"./warning":155}],37:[function(e,t){"use strict";var n=e("./ReactElement"),r=e("./ReactOwner"),o=e("./ReactUpdates"),i=e("./Object.assign"),a=e("./invariant"),s=e("./keyMirror"),u=s({MOUNTED:null,UNMOUNTED:null}),c=!1,l=null,p=null,d={injection:{injectEnvironment:function(e){a(!c),p=e.mountImageIntoNode,l=e.unmountIDFromEnvironment,d.BackendIDOperations=e.BackendIDOperations,c=!0}},LifeCycle:u,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===u.MOUNTED},setProps:function(e,t){var n=this._pendingElement||this._currentElement;this.replaceProps(i({},n.props,e),t)},replaceProps:function(e,t){a(this.isMounted()),a(0===this._mountDepth),this._pendingElement=n.cloneAndReplaceProps(this._pendingElement||this._currentElement,e),o.enqueueUpdate(this,t)},_setPropsInternal:function(e,t){var r=this._pendingElement||this._currentElement;this._pendingElement=n.cloneAndReplaceProps(r,i({},r.props,e)),o.enqueueUpdate(this,t)},construct:function(e){this.props=e.props,this._owner=e._owner,this._lifeCycleState=u.UNMOUNTED,this._pendingCallbacks=null,this._currentElement=e,this._pendingElement=null},mountComponent:function(e,t,n){a(!this.isMounted());var o=this._currentElement.ref;if(null!=o){var i=this._currentElement._owner;r.addComponentAsRefTo(this,o,i)}this._rootNodeID=e,this._lifeCycleState=u.MOUNTED,this._mountDepth=n},unmountComponent:function(){a(this.isMounted());var e=this._currentElement.ref;null!=e&&r.removeComponentAsRefFrom(this,e,this._owner),l(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=u.UNMOUNTED},receiveComponent:function(e,t){a(this.isMounted()),this._pendingElement=e,this.performUpdateIfNecessary(t)},performUpdateIfNecessary:function(e){if(null!=this._pendingElement){var t=this._currentElement,n=this._pendingElement;this._currentElement=n,this.props=n.props,this._owner=n._owner,this._pendingElement=null,this.updateComponent(e,t)}},updateComponent:function(e,t){var n=this._currentElement;(n._owner!==t._owner||n.ref!==t.ref)&&(null!=t.ref&&r.removeComponentAsRefFrom(this,t.ref,t._owner),null!=n.ref&&r.addComponentAsRefTo(this,n.ref,n._owner))},mountComponentIntoNode:function(e,t,n){var r=o.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,e,t,r,n),o.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(e,t,n,r){var o=this.mountComponent(e,n,0);p(o,t,r)},isOwnedBy:function(e){return this._owner===e},getSiblingByRef:function(e){var t=this._owner;return t&&t.refs?t.refs[e]:null}}};t.exports=d},{"./Object.assign":29,"./ReactElement":56,"./ReactOwner":72,"./ReactUpdates":88,"./invariant":137,"./keyMirror":143}],38:[function(e,t){"use strict";var n=e("./ReactDOMIDOperations"),r=e("./ReactMarkupChecksum"),o=e("./ReactMount"),i=e("./ReactPerf"),a=e("./ReactReconcileTransaction"),s=e("./getReactRootElementInContainer"),u=e("./invariant"),c=e("./setInnerHTML"),l=1,p=9,d={ReactReconcileTransaction:a,BackendIDOperations:n,unmountIDFromEnvironment:function(e){o.purgeID(e)},mountImageIntoNode:i.measure("ReactComponentBrowserEnvironment","mountImageIntoNode",function(e,t,n){if(u(t&&(t.nodeType===l||t.nodeType===p)),n){if(r.canReuseMarkup(e,s(t)))return;u(t.nodeType!==p)}u(t.nodeType!==p),c(t,e)})};t.exports=d},{"./ReactDOMIDOperations":47,"./ReactMarkupChecksum":67,"./ReactMount":68,"./ReactPerf":73,"./ReactReconcileTransaction":79,"./getReactRootElementInContainer":131,"./invariant":137,"./setInnerHTML":149}],39:[function(e,t){"use strict";var n=e("./shallowEqual"),r={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};t.exports=r},{"./shallowEqual":150}],40:[function(e,t){"use strict";function n(e){var t=e._owner||null;return t&&t.constructor&&t.constructor.displayName?" Check the render method of `"+t.constructor.displayName+"`.":""}function r(e,t){for(var n in t)t.hasOwnProperty(n)&&D("function"==typeof t[n])}function o(e,t){var n=I.hasOwnProperty(t)?I[t]:null;L.hasOwnProperty(t)&&D(n===S.OVERRIDE_BASE),e.hasOwnProperty(t)&&D(n===S.DEFINE_MANY||n===S.DEFINE_MANY_MERGED)}function i(e){var t=e._compositeLifeCycleState;D(e.isMounted()||t===A.MOUNTING),D(null==f.current),D(t!==A.UNMOUNTING)}function a(e,t){if(t){D(!y.isValidFactory(t)),D(!h.isValidElement(t));var n=e.prototype;t.hasOwnProperty(_)&&k.mixins(e,t.mixins);for(var r in t)if(t.hasOwnProperty(r)&&r!==_){var i=t[r];if(o(n,r),k.hasOwnProperty(r))k[r](e,i);else{var a=I.hasOwnProperty(r),s=n.hasOwnProperty(r),u=i&&i.__reactDontBind,p="function"==typeof i,d=p&&!a&&!s&&!u;if(d)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[r]=i,n[r]=i;else if(s){var f=I[r];D(a&&(f===S.DEFINE_MANY_MERGED||f===S.DEFINE_MANY)),f===S.DEFINE_MANY_MERGED?n[r]=c(n[r],i):f===S.DEFINE_MANY&&(n[r]=l(n[r],i))}else n[r]=i}}}}function s(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in k;D(!o);var i=n in e;D(!i),e[n]=r}}}function u(e,t){return D(e&&t&&"object"==typeof e&&"object"==typeof t),T(t,function(t,n){D(void 0===e[n]),e[n]=t}),e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);return null==n?r:null==r?n:u(n,r)}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}var p=e("./ReactComponent"),d=e("./ReactContext"),f=e("./ReactCurrentOwner"),h=e("./ReactElement"),m=(e("./ReactElementValidator"),e("./ReactEmptyComponent")),v=e("./ReactErrorUtils"),y=e("./ReactLegacyElement"),g=e("./ReactOwner"),E=e("./ReactPerf"),C=e("./ReactPropTransferer"),R=e("./ReactPropTypeLocations"),M=(e("./ReactPropTypeLocationNames"),e("./ReactUpdates")),b=e("./Object.assign"),O=e("./instantiateReactComponent"),D=e("./invariant"),x=e("./keyMirror"),P=e("./keyOf"),T=(e("./monitorCodeUse"),e("./mapObject")),w=e("./shouldUpdateReactComponent"),_=(e("./warning"),P({mixins:null})),S=x({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),N=[],I={mixins:S.DEFINE_MANY,statics:S.DEFINE_MANY,propTypes:S.DEFINE_MANY,contextTypes:S.DEFINE_MANY,childContextTypes:S.DEFINE_MANY,getDefaultProps:S.DEFINE_MANY_MERGED,getInitialState:S.DEFINE_MANY_MERGED,getChildContext:S.DEFINE_MANY_MERGED,render:S.DEFINE_ONCE,componentWillMount:S.DEFINE_MANY,componentDidMount:S.DEFINE_MANY,componentWillReceiveProps:S.DEFINE_MANY,shouldComponentUpdate:S.DEFINE_ONCE,componentWillUpdate:S.DEFINE_MANY,componentDidUpdate:S.DEFINE_MANY,componentWillUnmount:S.DEFINE_MANY,updateComponent:S.OVERRIDE_BASE},k={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t)+o}),_createOpenTagMarkupAndPutListeners:function(e){var t=this.props,n="<"+this._tag;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(null!=i)if(R.hasOwnProperty(o))r(this._rootNodeID,o,i,e);else{o===b&&(i&&(i=t.style=m({},t.style)),i=a.createMarkupForStyles(i));var s=u.createMarkupForProperty(o,i);s&&(n+=" "+s)}}if(e.renderToStaticMarkup)return n+">";var c=u.createMarkupForID(this._rootNodeID);return n+" "+c+">"},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=M[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return v(n);if(null!=r){var o=this.mountChildren(r,e);return o.join("")}}return""},receiveComponent:function(e,t){(e!==this._currentElement||null==e._owner)&&l.Mixin.receiveComponent.call(this,e,t)},updateComponent:h.measure("ReactDOMComponent","updateComponent",function(e,t){n(this._currentElement.props),l.Mixin.updateComponent.call(this,e,t),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e)}),_updateDOMProperties:function(e,t){var n,o,i,a=this.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===b){var u=e[n];for(o in u)u.hasOwnProperty(o)&&(i=i||{},i[o]="")}else R.hasOwnProperty(n)?E(this._rootNodeID,n):(s.isStandardName[n]||s.isCustomAttribute(n))&&l.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in a){var c=a[n],p=e[n];if(a.hasOwnProperty(n)&&c!==p)if(n===b)if(c&&(c=a.style=m({},c)),p){for(o in p)!p.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in c)c.hasOwnProperty(o)&&p[o]!==c[o]&&(i=i||{},i[o]=c[o])}else i=c;else R.hasOwnProperty(n)?r(this._rootNodeID,n,c,t):(s.isStandardName[n]||s.isCustomAttribute(n))&&l.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,c)}i&&l.BackendIDOperations.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t){var n=this.props,r=M[typeof e.children]?e.children:null,o=M[typeof n.children]?n.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=r?null:e.children,u=null!=o?null:n.children,c=null!=r||null!=i,p=null!=o||null!=a;null!=s&&null==u?this.updateChildren(null,t):c&&!p&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?i!==a&&l.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=u&&this.updateChildren(u,t)},unmountComponent:function(){this.unmountChildren(),p.deleteAllListeners(this._rootNodeID),l.Mixin.unmountComponent.call(this)}},m(i.prototype,l.Mixin,i.Mixin,f.Mixin,c),t.exports=i},{"./CSSPropertyOperations":6,"./DOMProperty":12,"./DOMPropertyOperations":13,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactBrowserEventEmitter":33,"./ReactComponent":37,"./ReactMount":68,"./ReactMultiChild":69,"./ReactPerf":73,"./escapeTextForBrowser":120,"./invariant":137,"./isEventSupported":138,"./keyOf":144,"./monitorCodeUse":147}],46:[function(e,t){"use strict";var n=e("./EventConstants"),r=e("./LocalEventTrapMixin"),o=e("./ReactBrowserComponentMixin"),i=e("./ReactCompositeComponent"),a=e("./ReactElement"),s=e("./ReactDOM"),u=a.createFactory(s.form.type),c=i.createClass({displayName:"ReactDOMForm",mixins:[o,r],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(n.topLevelTypes.topSubmit,"submit")}});t.exports=c},{"./EventConstants":17,"./LocalEventTrapMixin":27,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":56}],47:[function(e,t){"use strict";var n=e("./CSSPropertyOperations"),r=e("./DOMChildrenOperations"),o=e("./DOMPropertyOperations"),i=e("./ReactMount"),a=e("./ReactPerf"),s=e("./invariant"),u=e("./setInnerHTML"),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:a.measure("ReactDOMIDOperations","updatePropertyByID",function(e,t,n){var r=i.getNode(e);s(!c.hasOwnProperty(t)),null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)}),deletePropertyByID:a.measure("ReactDOMIDOperations","deletePropertyByID",function(e,t,n){var r=i.getNode(e);s(!c.hasOwnProperty(t)),o.deleteValueForProperty(r,t,n)}),updateStylesByID:a.measure("ReactDOMIDOperations","updateStylesByID",function(e,t){var r=i.getNode(e);n.setValueForStyles(r,t)}),updateInnerHTMLByID:a.measure("ReactDOMIDOperations","updateInnerHTMLByID",function(e,t){var n=i.getNode(e);u(n,t)}),updateTextContentByID:a.measure("ReactDOMIDOperations","updateTextContentByID",function(e,t){var n=i.getNode(e);r.updateTextContent(n,t)}),dangerouslyReplaceNodeWithMarkupByID:a.measure("ReactDOMIDOperations","dangerouslyReplaceNodeWithMarkupByID",function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)}),dangerouslyProcessChildrenUpdates:a.measure("ReactDOMIDOperations","dangerouslyProcessChildrenUpdates",function(e,t){for(var n=0;nc;c++){var h=u[c];if(h!==a&&h.form===a.form){var v=l.getID(h);f(v);var y=m[v];f(y),p.asap(n,y)}}}return t}});t.exports=v},{"./AutoFocusMixin":2,"./DOMPropertyOperations":13,"./LinkedValueUtils":26,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":56,"./ReactMount":68,"./ReactUpdates":88,"./invariant":137}],50:[function(e,t){"use strict";var n=e("./ReactBrowserComponentMixin"),r=e("./ReactCompositeComponent"),o=e("./ReactElement"),i=e("./ReactDOM"),a=(e("./warning"),o.createFactory(i.option.type)),s=r.createClass({displayName:"ReactDOMOption",mixins:[n],componentWillMount:function(){},render:function(){return a(this.props,this.props.children)}});t.exports=s},{"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":56,"./warning":155}],51:[function(e,t){"use strict";function n(){this.isMounted()&&(this.setState({value:this._pendingValue}),this._pendingValue=0)}function r(e,t){if(null!=e[t])if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to must be a scalar value if `multiple` is false.")}function o(e,t){var n,r,o,i=e.props.multiple,a=null!=t?t:e.state.value,s=e.getDOMNode().options;if(i)for(n={},r=0,o=a.length;o>r;++r)n[""+a[r]]=!0;else n=""+a;for(r=0,o=s.length;o>r;r++){var u=i?n.hasOwnProperty(s[r].value):s[r].value===n;u!==s[r].selected&&(s[r].selected=u)}}var i=e("./AutoFocusMixin"),a=e("./LinkedValueUtils"),s=e("./ReactBrowserComponentMixin"),u=e("./ReactCompositeComponent"),c=e("./ReactElement"),l=e("./ReactDOM"),p=e("./ReactUpdates"),d=e("./Object.assign"),f=c.createFactory(l.select.type),h=u.createClass({displayName:"ReactDOMSelect",mixins:[i,a.Mixin,s],propTypes:{defaultValue:r,value:r},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillMount:function(){this._pendingValue=null},componentWillReceiveProps:function(e){!this.props.multiple&&e.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!e.multiple&&this.setState({value:this.state.value[0]})},render:function(){var e=d({},this.props);return e.onChange=this._handleChange,e.value=null,f(e,this.props.children)},componentDidMount:function(){o(this,a.getValue(this))},componentDidUpdate:function(e){var t=a.getValue(this),n=!!e.multiple,r=!!this.props.multiple;(null!=t||n!==r)&&o(this,t)},_handleChange:function(e){var t,r=a.getOnChange(this);r&&(t=r.call(this,e));var o;if(this.props.multiple){o=[];for(var i=e.target.options,s=0,u=i.length;u>s;s++)i[s].selected&&o.push(i[s].value)}else o=e.target.value;return this._pendingValue=o,p.asap(n,this),t}});t.exports=h},{"./AutoFocusMixin":2,"./LinkedValueUtils":26,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":56,"./ReactUpdates":88}],52:[function(e,t){"use strict";function n(e,t,n,r){return e===n&&t===r}function r(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0),u=n(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=u?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(e),l.setEnd(s.startContainer,s.startOffset);var p=n(l.startContainer,l.startOffset,l.endContainer,l.endOffset),d=p?0:l.toString().length,f=d+c,h=document.createRange();h.setStart(r,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?f:d,end:m?d:f}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function a(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=u(e,o),l=u(e,i);if(s&&l){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(l.node,l.offset)):(p.setEnd(l.node,l.offset),n.addRange(p))}}}var s=e("./ExecutionEnvironment"),u=e("./getNodeForCharacterOffset"),c=e("./getTextContentAccessor"),l=s.canUseDOM&&document.selection,p={getOffsets:l?r:o,setOffsets:l?i:a};t.exports=p},{"./ExecutionEnvironment":23,"./getNodeForCharacterOffset":130,"./getTextContentAccessor":132}],53:[function(e,t){"use strict";function n(){this.isMounted()&&this.forceUpdate()}var r=e("./AutoFocusMixin"),o=e("./DOMPropertyOperations"),i=e("./LinkedValueUtils"),a=e("./ReactBrowserComponentMixin"),s=e("./ReactCompositeComponent"),u=e("./ReactElement"),c=e("./ReactDOM"),l=e("./ReactUpdates"),p=e("./Object.assign"),d=e("./invariant"),f=(e("./warning"),u.createFactory(c.textarea.type)),h=s.createClass({displayName:"ReactDOMTextarea",mixins:[r,i.Mixin,a],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(d(null==e),Array.isArray(t)&&(d(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=i.getValue(this);return{initialValue:""+(null!=n?n:e)}},render:function(){var e=p({},this.props);return d(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,f(e,this.state.initialValue)},componentDidUpdate:function(){var e=i.getValue(this);if(null!=e){var t=this.getDOMNode();o.setValueForProperty(t,"value",""+e)}},_handleChange:function(e){var t,r=i.getOnChange(this);return r&&(t=r.call(this,e)),l.asap(n,this),t}});t.exports=h},{"./AutoFocusMixin":2,"./DOMPropertyOperations":13,"./LinkedValueUtils":26,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":56,"./ReactUpdates":88,"./invariant":137,"./warning":155}],54:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var r=e("./ReactUpdates"),o=e("./Transaction"),i=e("./Object.assign"),a=e("./emptyFunction"),s={initialize:a,close:function(){p.isBatchingUpdates=!1}},u={initialize:a,close:r.flushBatchedUpdates.bind(r)},c=[u,s];i(n.prototype,o.Mixin,{getTransactionWrappers:function(){return c}});var l=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n){var r=p.isBatchingUpdates;p.isBatchingUpdates=!0,r?e(t,n):l.perform(e,null,t,n)}};t.exports=p},{"./Object.assign":29,"./ReactUpdates":88,"./Transaction":104,"./emptyFunction":118}],55:[function(e,t){"use strict";function n(){O.EventEmitter.injectReactEventListener(b),O.EventPluginHub.injectEventPluginOrder(s),O.EventPluginHub.injectInstanceHandle(D),O.EventPluginHub.injectMount(x),O.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:u,ChangeEventPlugin:o,CompositionEventPlugin:a,MobileSafariClickEventPlugin:p,SelectEventPlugin:P,BeforeInputEventPlugin:r}),O.NativeComponent.injectGenericComponentClass(m),O.NativeComponent.injectComponentClasses({button:v,form:y,img:g,input:E,option:C,select:R,textarea:M,html:S("html"),head:S("head"),body:S("body")}),O.CompositeComponent.injectMixin(d),O.DOMProperty.injectDOMPropertyConfig(l),O.DOMProperty.injectDOMPropertyConfig(_),O.EmptyComponent.injectEmptyComponent("noscript"),O.Updates.injectReconcileTransaction(f.ReactReconcileTransaction),O.Updates.injectBatchingStrategy(h),O.RootIndex.injectCreateReactRootIndex(c.canUseDOM?i.createReactRootIndex:T.createReactRootIndex),O.Component.injectEnvironment(f)}var r=e("./BeforeInputEventPlugin"),o=e("./ChangeEventPlugin"),i=e("./ClientReactRootIndex"),a=e("./CompositionEventPlugin"),s=e("./DefaultEventPluginOrder"),u=e("./EnterLeaveEventPlugin"),c=e("./ExecutionEnvironment"),l=e("./HTMLDOMPropertyConfig"),p=e("./MobileSafariClickEventPlugin"),d=e("./ReactBrowserComponentMixin"),f=e("./ReactComponentBrowserEnvironment"),h=e("./ReactDefaultBatchingStrategy"),m=e("./ReactDOMComponent"),v=e("./ReactDOMButton"),y=e("./ReactDOMForm"),g=e("./ReactDOMImg"),E=e("./ReactDOMInput"),C=e("./ReactDOMOption"),R=e("./ReactDOMSelect"),M=e("./ReactDOMTextarea"),b=e("./ReactEventListener"),O=e("./ReactInjection"),D=e("./ReactInstanceHandles"),x=e("./ReactMount"),P=e("./SelectEventPlugin"),T=e("./ServerReactRootIndex"),w=e("./SimpleEventPlugin"),_=e("./SVGDOMPropertyConfig"),S=e("./createFullPageComponent");t.exports={inject:n}},{"./BeforeInputEventPlugin":3,"./ChangeEventPlugin":8,"./ClientReactRootIndex":9,"./CompositionEventPlugin":10,"./DefaultEventPluginOrder":15,"./EnterLeaveEventPlugin":16,"./ExecutionEnvironment":23,"./HTMLDOMPropertyConfig":24,"./MobileSafariClickEventPlugin":28,"./ReactBrowserComponentMixin":32,"./ReactComponentBrowserEnvironment":38,"./ReactDOMButton":44,"./ReactDOMComponent":45,"./ReactDOMForm":46,"./ReactDOMImg":48,"./ReactDOMInput":49,"./ReactDOMOption":50,"./ReactDOMSelect":51,"./ReactDOMTextarea":53,"./ReactDefaultBatchingStrategy":54,"./ReactEventListener":61,"./ReactInjection":62,"./ReactInstanceHandles":64,"./ReactMount":68,"./SVGDOMPropertyConfig":89,"./SelectEventPlugin":90,"./ServerReactRootIndex":91,"./SimpleEventPlugin":92,"./createFullPageComponent":113}],56:[function(e,t){"use strict";var n=e("./ReactContext"),r=e("./ReactCurrentOwner"),o=(e("./warning"),{key:!0,ref:!0}),i=function(e,t,n,r,o,i){this.type=e,this.key=t,this.ref=n,this._owner=r,this._context=o,this.props=i};i.prototype={_isReactElement:!0},i.createElement=function(e,t,a){var s,u={},c=null,l=null;if(null!=t){l=void 0===t.ref?null:t.ref,c=null==t.key?null:""+t.key;for(s in t)t.hasOwnProperty(s)&&!o.hasOwnProperty(s)&&(u[s]=t[s])}var p=arguments.length-2;if(1===p)u.children=a;else if(p>1){for(var d=Array(p),f=0;p>f;f++)d[f]=arguments[f+2];u.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(s in h)"undefined"==typeof u[s]&&(u[s]=h[s])}return new i(e,c,l,r.current,n.current,u)},i.createFactory=function(e){var t=i.createElement.bind(null,e);return t.type=e,t},i.cloneAndReplaceProps=function(e,t){var n=new i(e.type,e.key,e.ref,e._owner,e._context,t);return n},i.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=i},{"./ReactContext":41,"./ReactCurrentOwner":42,"./warning":155}],57:[function(e,t){"use strict";function n(){var e=p.current;return e&&e.constructor.displayName||void 0}function r(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,i("react_key_warning",'Each child in an array should have a unique "key" prop.',e,t))}function o(e,t,n){v.test(e)&&i("react_numeric_key_warning","Child objects should have non-numeric keys so ordering is preserved.",t,n)}function i(e,t,r,o){var i=n(),a=o.displayName,s=i||a,u=f[e];if(!u.hasOwnProperty(s)){u[s]=!0,t+=i?" Check the render method of "+i+".":" Check the renderComponent call using <"+a+">.";var c=null;r._owner&&r._owner!==p.current&&(c=r._owner.constructor.displayName,t+=" It was passed a child from "+c+"."),t+=" See http://fb.me/react-warning-keys for more information.",d(e,{component:s,componentOwner:c}),console.warn(t)}}function a(){var e=n()||"";h.hasOwnProperty(e)||(h[e]=!0,d("react_object_map_children"))}function s(e,t){if(Array.isArray(e))for(var n=0;no;o++){t=e.ancestors[o];var a=l.getID(t)||"";m._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function i(e){var t=h(window);e(t)}var a=e("./EventListener"),s=e("./ExecutionEnvironment"),u=e("./PooledClass"),c=e("./ReactInstanceHandles"),l=e("./ReactMount"),p=e("./ReactUpdates"),d=e("./Object.assign"),f=e("./getEventTarget"),h=e("./getUnboundedScrollPosition");d(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),u.addPoolingTo(r,u.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:s.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?a.listen(r,t,m.dispatchEvent.bind(null,e)):void 0},trapCapturedEvent:function(e,t,n){var r=n;return r?a.capture(r,t,m.dispatchEvent.bind(null,e)):void 0},monitorScrollValue:function(e){var t=i.bind(null,e);a.listen(window,"scroll",t),a.listen(window,"resize",t)},dispatchEvent:function(e,t){if(m._enabled){var n=r.getPooled(e,t);try{p.batchedUpdates(o,n)}finally{r.release(n)}}}};t.exports=m},{"./EventListener":18,"./ExecutionEnvironment":23,"./Object.assign":29,"./PooledClass":30,"./ReactInstanceHandles":64,"./ReactMount":68,"./ReactUpdates":88,"./getEventTarget":128,"./getUnboundedScrollPosition":133}],62:[function(e,t){"use strict";var n=e("./DOMProperty"),r=e("./EventPluginHub"),o=e("./ReactComponent"),i=e("./ReactCompositeComponent"),a=e("./ReactEmptyComponent"),s=e("./ReactBrowserEventEmitter"),u=e("./ReactNativeComponent"),c=e("./ReactPerf"),l=e("./ReactRootIndex"),p=e("./ReactUpdates"),d={Component:o.injection,CompositeComponent:i.injection,DOMProperty:n.injection,EmptyComponent:a.injection,EventPluginHub:r.injection,EventEmitter:s.injection,NativeComponent:u.injection,Perf:c.injection,RootIndex:l.injection,Updates:p.injection};t.exports=d},{"./DOMProperty":12,"./EventPluginHub":19,"./ReactBrowserEventEmitter":33,"./ReactComponent":37,"./ReactCompositeComponent":40,"./ReactEmptyComponent":58,"./ReactNativeComponent":71,"./ReactPerf":73,"./ReactRootIndex":80,"./ReactUpdates":88}],63:[function(e,t){"use strict";function n(e){return o(document.documentElement,e)}var r=e("./ReactDOMSelection"),o=e("./containsNode"),i=e("./focusNode"),a=e("./getActiveElement"),s={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=a();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=a(),r=e.focusedElem,o=e.selectionRange;t!==r&&n(r)&&(s.hasSelectionCapabilities(r)&&s.setSelection(r,o),i(r))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if("undefined"==typeof o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};t.exports=s},{"./ReactDOMSelection":52,"./containsNode":111,"./focusNode":122,"./getActiveElement":124}],64:[function(e,t){"use strict";function n(e){return d+e.toString(36)}function r(e,t){return e.charAt(t)===d||t===e.length}function o(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function i(e,t){return 0===t.indexOf(e)&&r(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(d)):""}function s(e,t){if(p(o(e)&&o(t)),p(i(e,t)),e===t)return e;for(var n=e.length+f,a=n;a=a;a++)if(r(e,a)&&r(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,i);return p(o(s)),s}function c(e,t,n,r,o,u){e=e||"",t=t||"",p(e!==t);var c=i(t,e);p(c||i(e,t));for(var l=0,d=c?a:s,f=e;;f=d(f,t)){var m;if(o&&f===e||u&&f===t||(m=n(f,c,r)),m===!1||f===t)break;p(l++1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=u(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:u,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:d};t.exports=m},{"./ReactRootIndex":80,"./invariant":137}],65:[function(e,t){"use strict";function n(e,t){if("function"==typeof t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if("function"==typeof r){var o=r.bind(t);for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);e[n]=o}else e[n]=r}}var r=(e("./ReactCurrentOwner"),e("./invariant")),o=(e("./monitorCodeUse"),e("./warning"),{}),i={},a={};a.wrapCreateFactory=function(e){var t=function(t){return"function"!=typeof t?e(t):t.isReactNonLegacyFactory?e(t.type):t.isReactLegacyFactory?e(t.type):t};return t},a.wrapCreateElement=function(e){var t=function(t){if("function"!=typeof t)return e.apply(this,arguments);var n;return t.isReactNonLegacyFactory?(n=Array.prototype.slice.call(arguments,0),n[0]=t.type,e.apply(this,n)):t.isReactLegacyFactory?(t._isMockFunction&&(t.type._mockedReactClassConstructor=t),n=Array.prototype.slice.call(arguments,0),n[0]=t.type,e.apply(this,n)):t.apply(null,Array.prototype.slice.call(arguments,1))};return t},a.wrapFactory=function(e){r("function"==typeof e);var t=function(){return e.apply(this,arguments)};return n(t,e.type),t.isReactLegacyFactory=o,t.type=e.type,t},a.markNonLegacyFactory=function(e){return e.isReactNonLegacyFactory=i,e},a.isValidFactory=function(e){return"function"==typeof e&&e.isReactLegacyFactory===o},a.isValidClass=function(e){return a.isValidFactory(e)},a._isLegacyCallWarningEnabled=!0,t.exports=a},{"./ReactCurrentOwner":42,"./invariant":137,"./monitorCodeUse":147,"./warning":155}],66:[function(e,t){"use strict";function n(e,t){this.value=e,this.requestChange=t}function r(e){var t={value:"undefined"==typeof e?o.PropTypes.any.isRequired:e.isRequired,requestChange:o.PropTypes.func.isRequired};return o.PropTypes.shape(t)}var o=e("./React");n.PropTypes={link:r},t.exports=n},{"./React":31}],67:[function(e,t){"use strict";var n=e("./adler32"),r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=n(e);return e.replace(">"," "+r.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var o=t.getAttribute(r.CHECKSUM_ATTR_NAME);o=o&&parseInt(o,10);var i=n(e);return i===o}};t.exports=r},{"./adler32":107}],68:[function(e,t){"use strict";function n(e){var t=E(e);return t&&I.getID(t)}function r(e){var t=o(e);if(t)if(x.hasOwnProperty(t)){var n=x[t];n!==e&&(R(!s(n,t)),x[t]=e)}else x[t]=e;return t}function o(e){return e&&e.getAttribute&&e.getAttribute(D)||""}function i(e,t){var n=o(e);n!==t&&delete x[n],e.setAttribute(D,t),x[t]=e}function a(e){return x.hasOwnProperty(e)&&s(x[e],e)||(x[e]=I.findReactNodeByID(e)),x[e]}function s(e,t){if(e){R(o(e)===t);var n=I.findReactContainerForID(t);if(n&&y(n,e))return!0}return!1}function u(e){delete x[e]}function c(e){var t=x[e];return t&&s(t,e)?void(N=t):!1}function l(e){N=null,m.traverseAncestors(e,c);var t=N;return N=null,t}var p=e("./DOMProperty"),d=e("./ReactBrowserEventEmitter"),f=(e("./ReactCurrentOwner"),e("./ReactElement")),h=e("./ReactLegacyElement"),m=e("./ReactInstanceHandles"),v=e("./ReactPerf"),y=e("./containsNode"),g=e("./deprecated"),E=e("./getReactRootElementInContainer"),C=e("./instantiateReactComponent"),R=e("./invariant"),M=e("./shouldUpdateReactComponent"),b=(e("./warning"),h.wrapCreateElement(f.createElement)),O=m.SEPARATOR,D=p.ID_ATTRIBUTE_NAME,x={},P=1,T=9,w={},_={},S=[],N=null,I={_instancesByReactRootID:w,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){var o=t.props;return I.scrollMonitor(n,function(){e.replaceProps(o,r)}),e},_registerComponent:function(e,t){R(t&&(t.nodeType===P||t.nodeType===T)),d.ensureScrollValueMonitoring();var n=I.registerContainer(t);return w[n]=e,n},_renderNewRootComponent:v.measure("ReactMount","_renderNewRootComponent",function(e,t,n){var r=C(e,null),o=I._registerComponent(r,t);return r.mountComponentIntoNode(o,t,n),r}),render:function(e,t,r){R(f.isValidElement(e));var o=w[n(t)];if(o){var i=o._currentElement;if(M(i,e))return I._updateRootComponent(o,e,t,r);I.unmountComponentAtNode(t)}var a=E(t),s=a&&I.isRenderedByReact(a),u=s&&!o,c=I._renderNewRootComponent(e,t,u);return r&&r.call(c),c},constructAndRenderComponent:function(e,t,n){var r=b(e,t);return I.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return R(r),I.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=n(e);return t&&(t=m.getReactRootIDFromNodeID(t)),t||(t=m.createReactRootID()),_[t]=e,t},unmountComponentAtNode:function(e){var t=n(e),r=w[t];return r?(I.unmountComponentFromNode(r,e),delete w[t],delete _[t],!0):!1},unmountComponentFromNode:function(e,t){for(e.unmountComponent(),t.nodeType===T&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=m.getReactRootIDFromNodeID(e),n=_[t];return n},findReactNodeByID:function(e){var t=I.findReactContainerForID(e);return I.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=I.getID(e);return t?t.charAt(0)===O:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(I.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=S,r=0,o=l(t)||e;for(n[0]=o.firstChild,n.length=1;r>",R=a(),M=p(),b={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:o(),arrayOf:i,element:R,instanceOf:s,node:M,objectOf:c,oneOf:u,oneOfType:l,shape:d,component:g("React.PropTypes","component","element",this,R),renderable:g("React.PropTypes","renderable","node",this,M)};t.exports=b},{"./ReactElement":56,"./ReactPropTypeLocationNames":75,"./deprecated":117,"./emptyFunction":118}],78:[function(e,t){"use strict";function n(){this.listenersToPut=[]}var r=e("./PooledClass"),o=e("./ReactBrowserEventEmitter"),i=e("./Object.assign");i(n.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e"+i+""},receiveComponent:function(e){var t=e.props;t!==this.props&&(this.props=t,r.BackendIDOperations.updateTextContentByID(this._rootNodeID,t))}});var u=function(e){return new o(s,null,null,null,null,e)};u.type=s,t.exports=u},{"./DOMPropertyOperations":13,"./Object.assign":29,"./ReactComponent":37,"./ReactElement":56,"./escapeTextForBrowser":120}],85:[function(e,t){"use strict";var n=e("./ReactChildren"),r={getChildMapping:function(e){return n.map(e,function(e){return e})},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;an;n++){var r=m[n];if(r.isMounted()){var o=r._pendingCallbacks;if(r._pendingCallbacks=null,r.performUpdateIfNecessary(e.reconcileTransaction),o)for(var a=0;a":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=r},{}],121:[function(e,t){"use strict";function n(e,t,n){var r=e,i=!r.hasOwnProperty(n);if(i&&null!=t){var a,s=typeof t;a="string"===s?o(t):"number"===s?o(""+t):t,r[n]=a}}function r(e){if(null==e)return e;var t={};return i(e,n,t),t}{var o=e("./ReactTextComponent"),i=e("./traverseAllChildren");e("./warning")}t.exports=r},{"./ReactTextComponent":84,"./traverseAllChildren":153,"./warning":155}],122:[function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}t.exports=n},{}],123:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],124:[function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=n},{}],125:[function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=n},{}],126:[function(e,t){"use strict";function n(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var r=e("./getEventCharCode"),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},{"./getEventCharCode":125}],127:[function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=r},{}],128:[function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=n},{}],129:[function(e,t){function n(e){return o(!!i),p.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"":"<"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var r=e("./ExecutionEnvironment"),o=e("./invariant"),i=r.canUseDOM?document.createElement("div"):null,a={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},s=[1,'"],u=[1,"","
"],c=[3,"","
"],l=[1,"",""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c,circle:l,defs:l,ellipse:l,g:l,line:l,linearGradient:l,path:l,polygon:l,polyline:l,radialGradient:l,rect:l,stop:l,text:l};t.exports=n},{"./ExecutionEnvironment":23,"./invariant":137}],130:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3==o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}t.exports=o},{}],131:[function(e,t){"use strict";function n(e){return e?e.nodeType===r?e.documentElement:e.firstChild:null}var r=9;t.exports=n},{}],132:[function(e,t){"use strict";function n(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var r=e("./ExecutionEnvironment"),o=null;t.exports=n},{"./ExecutionEnvironment":23}],133:[function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],134:[function(e,t){function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;t.exports=n},{}],135:[function(e,t){"use strict";function n(e){return r(e).replace(o,"-ms-")}var r=e("./hyphenate"),o=/^ms-/;t.exports=n},{"./hyphenate":134}],136:[function(e,t){"use strict";function n(e,t){var n;return n="string"==typeof e.type?r.createInstanceForTag(e.type,e.props,t):new e.type(e.props),n.construct(e),n}{var r=(e("./warning"),e("./ReactElement"),e("./ReactLegacyElement"),e("./ReactNativeComponent"));e("./ReactEmptyComponent")}t.exports=n},{"./ReactElement":56,"./ReactEmptyComponent":58,"./ReactLegacyElement":65,"./ReactNativeComponent":71,"./warning":155}],137:[function(e,t){"use strict";var n=function(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],l=0;u=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw u.framesToPop=1,u}};t.exports=n},{}],138:[function(e,t){"use strict";function n(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=e("./ExecutionEnvironment");o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{"./ExecutionEnvironment":23}],139:[function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],140:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],141:[function(e,t){function n(e){return r(e)&&3==e.nodeType}var r=e("./isNode");t.exports=n},{"./isNode":139}],142:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var r=1;n>r;r++)t=arguments[r],t&&(e=(e?e+" ":"")+t);return e}t.exports=n},{}],143:[function(e,t){"use strict";var n=e("./invariant"),r=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{"./invariant":137}],144:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],145:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o={};for(var i in e)r.call(e,i)&&(o[i]=t.call(n,e[i],i,e));return o}var r=Object.prototype.hasOwnProperty;t.exports=n},{}],146:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}t.exports=n},{}],147:[function(e,t){"use strict";function n(e){r(e&&!/[^a-z0-9_]/.test(e))}var r=e("./invariant");t.exports=n},{"./invariant":137}],148:[function(e,t){"use strict";function n(e){return o(r.isValidElement(e)),e}var r=e("./ReactElement"),o=e("./invariant");t.exports=n},{"./ReactElement":56,"./invariant":137}],149:[function(e,t){"use strict";var n=e("./ExecutionEnvironment"),r=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if(n.canUseDOM){var a=document.createElement("div");a.innerHTML=" ",""===a.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),r.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{"./ExecutionEnvironment":23}],150:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],151:[function(e,t){"use strict";function n(e,t){return e&&t&&e.type===t.type&&e.key===t.key&&e._owner===t._owner?!0:!1}t.exports=n},{}],152:[function(e,t){function n(e){var t=e.length;if(r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),r("number"==typeof t),r(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var r=e("./invariant");t.exports=n},{"./invariant":137}],153:[function(e,t){"use strict";function n(e){return d[e]}function r(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function o(e){return(""+e).replace(f,n)}function i(e){return"$"+o(e)}function a(e,t,n){return null==e?0:h(e,"",0,t,n)}var s=e("./ReactElement"),u=e("./ReactInstanceHandles"),c=e("./invariant"),l=u.SEPARATOR,p=":",d={"=":"=0",".":"=1",":":"=2"},f=/[=.:]/g,h=function(e,t,n,o,a){var u,d,f=0;if(Array.isArray(e))for(var m=0;m 0; }; Filter.prototype.hasAdditionalFilters = function() { return this.additionalFilters.length > 0; }; Filter.prototype._initFilters = function(filterDefinition) { var definition, name, results, subFilters; this.treeFilters = []; this.additionalFilters = []; this.sortCriteria = new SortCriteria(); results = []; for (name in filterDefinition) { if (!hasProp.call(filterDefinition, name)) continue; definition = filterDefinition[name]; if (!(definition)) { continue; } if ((definition.type == null) || definition.type === 'tree') { subFilters = []; _.each(definition.options, (function(_this) { return function(definition, name) { return subFilters.push(new TreeFilter(_this, name, definition)); }; })(this)); this.treeFilters.push({ config: definition, subFilters: subFilters }); } if (definition.type === 'radio_button') { this.additionalFilters.push(new RadioFilter(this, name, definition)); } if (definition.type === 'check_box') { results.push(this.additionalFilters.push(new CheckboxFilter(this, name, definition))); } else { results.push(void 0); } } return results; }; Filter.prototype._resolveFunction = function(objectOrFunction, context) { if (typeof objectOrFunction === 'function') { return objectOrFunction(context != null ? context : {}); } else { return objectOrFunction; } }; return Filter; })(Listenable); module.exports = Filter; /***/ }, /* 6 */ /***/ function(module, exports) { var Listenable; Listenable = (function() { function Listenable() { this._callbacks = {}; } Listenable.prototype.on = function(eventName, callback) { var base; (base = this._callbacks)[eventName] || (base[eventName] = []); return this._callbacks[eventName].push(callback); }; Listenable.prototype.trigger = function() { var callbacks, eventName, params; eventName = arguments[0]; params = _.toArray(arguments).slice(1); callbacks = this._callbacks[eventName]; if (callbacks) { return _.each(callbacks, function(callback) { return callback.apply(this, params); }); } }; Listenable.prototype.onChange = function(callback) { return this.on('change', callback); }; Listenable.prototype.changed = function() { return this.trigger('change', this); }; return Listenable; })(); module.exports = Listenable; /***/ }, /* 7 */ /***/ function(module, exports) { var SortCriteria; SortCriteria = (function() { function SortCriteria(type, reverse, activeElement, activeSortItemGroupTitle) { if (reverse == null) { reverse = true; } if (type == null) { type = "_last_changed"; } if (activeElement == null) { activeElement = "Last change: latest first"; } if (activeSortItemGroupTitle == null) { activeSortItemGroupTitle = "Sort by date"; } this._activeSortItemGroupTitle = activeSortItemGroupTitle; this._activeElement = activeElement; this._isReverse = reverse; this._type = type; } SortCriteria.prototype.isReverse = function() { return this._isReverse; }; SortCriteria.prototype.type = function() { return this._type; }; SortCriteria.prototype.activeElement = function() { return this._activeElement; }; SortCriteria.prototype.activeSortItemGroupTitle = function() { return this._activeSortItemGroupTitle; }; SortCriteria.prototype.equals = function(sortCriteria) { return sortCriteria.type() === this._type && sortCriteria.isReverse() === this._isReverse; }; return SortCriteria; })(); module.exports = SortCriteria; /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { var FilterCollectionNode, RadioFilter, RadioOption, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; FilterCollectionNode = __webpack_require__(9); RadioOption = __webpack_require__(11); RadioFilter = (function(superClass) { extend(RadioFilter, superClass); function RadioFilter(filter, name, filterDefinition) { RadioFilter.__super__.constructor.call(this, filter, name, filterDefinition); this.type = 'radio'; this.children = _.map(filterDefinition.options, (function(_this) { return function(definition, name) { return new RadioOption(_this, name, definition); }; })(this)); } RadioFilter.prototype.activate = function(radioOption) { _.each(this.children, function(child) { return child.active = child === radioOption; }); return this.filter.changed(); }; RadioFilter.prototype.deactivateAll = function() { this.deselect(); return this.filter.changed(); }; return RadioFilter; })(FilterCollectionNode); module.exports = RadioFilter; /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { var FilterCollectionNode, FilterNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; FilterNode = __webpack_require__(10); FilterCollectionNode = (function(superClass) { extend(FilterCollectionNode, superClass); function FilterCollectionNode(filter, name, filterDefinition) { FilterCollectionNode.__super__.constructor.call(this, filter, name, filterDefinition); this.field = filterDefinition.field, this.operator = filterDefinition.operator; this.expanded = filterDefinition.expanded !== false; this.children = []; } FilterCollectionNode.prototype.deselect = function() { return _.each(this.children, function(child) { return child.active = false; }); }; FilterCollectionNode.prototype.isExpanded = function() { return !!this.expanded; }; FilterCollectionNode.prototype.hasActiveChildren = function() { return _.some(this.children, function(child) { return child.isActive(); }); }; return FilterCollectionNode; })(FilterNode); module.exports = FilterCollectionNode; /***/ }, /* 10 */ /***/ function(module, exports) { var FilterNode; FilterNode = (function() { function FilterNode(filter, name, filterDefinition) { this.filter = filter; this.name = name; this.title = filterDefinition.title; this.title || (this.title = this._fallbackTitle()); } FilterNode.prototype._fallbackTitle = function() { return this._capitalize(this.name.replace(/_/g, ' ').trim()); }; FilterNode.prototype._capitalize = function(string) { return string.charAt(0).toUpperCase() + string.slice(1); }; return FilterNode; })(); module.exports = FilterNode; /***/ }, /* 11 */ /***/ function(module, exports, __webpack_require__) { var FilterNode, RadioOption, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; FilterNode = __webpack_require__(10); RadioOption = (function(superClass) { extend(RadioOption, superClass); function RadioOption(group, name, filterDefinition) { this.group = group; RadioOption.__super__.constructor.call(this, this.group.filter, name, filterDefinition); this.value = filterDefinition.value, this.query = filterDefinition.query, this.preset = filterDefinition.preset, this.enable_create = filterDefinition.enable_create; this.active = filterDefinition.selected; } RadioOption.prototype.setActive = function() { return this.group.activate(this); }; RadioOption.prototype.isActive = function() { return !!this.active; }; return RadioOption; })(FilterNode); module.exports = RadioOption; /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { var FilterNode, TreeFilter, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; FilterNode = __webpack_require__(10); TreeFilter = (function(superClass) { extend(TreeFilter, superClass); function TreeFilter(filter, name, filterDefinition) { var childrenDefinition; TreeFilter.__super__.constructor.call(this, filter, name, filterDefinition); this.type = 'tree'; this.icon = filterDefinition.icon, this.query = filterDefinition.query, this.expanded = filterDefinition.expanded, this.value = filterDefinition.value, this.field = filterDefinition.field, this.operator = filterDefinition.operator, this.preset = filterDefinition.preset, this.enable_create = filterDefinition.enable_create; this.active = filterDefinition.selected; childrenDefinition = filterDefinition.options || []; this.children = _.map(childrenDefinition, function(definition, name) { return new TreeFilter(filter, name, definition); }); } TreeFilter.prototype.isLeaf = function() { return this.children.length === 0; }; TreeFilter.prototype.isExpanded = function() { return !!this.expanded; }; TreeFilter.prototype.isActive = function() { return !!this.active; }; TreeFilter.prototype.toggleActive = function() { if (this.isActive()) { this.active = false; } else { this.filter.deselectHierarchicalFilters(); this.active = true; } return this.filter.changed(); }; TreeFilter.prototype.hasActiveChildren = function() { return this.isActive() || _.some(this.children, function(child) { return child.isActive(); }); }; TreeFilter.prototype.deselect = function() { this.active = false; return _.each(this.children, function(filter) { return filter.deselect(); }); }; return TreeFilter; })(FilterNode); module.exports = TreeFilter; /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { var CheckboxFilter, CheckboxOption, FilterCollectionNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; CheckboxOption = __webpack_require__(14); FilterCollectionNode = __webpack_require__(9); CheckboxFilter = (function(superClass) { extend(CheckboxFilter, superClass); function CheckboxFilter(filter, name, filterDefinition) { CheckboxFilter.__super__.constructor.call(this, filter, name, filterDefinition); this.type = 'checkbox'; this.children = _.map(filterDefinition.options, (function(_this) { return function(definition, name) { return new CheckboxOption(_this.filter, name, definition); }; })(this)); } return CheckboxFilter; })(FilterCollectionNode); module.exports = CheckboxFilter; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { var CheckboxOption, FilterNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; FilterNode = __webpack_require__(10); CheckboxOption = (function(superClass) { extend(CheckboxOption, superClass); function CheckboxOption(filter, name, filterDefinition) { CheckboxOption.__super__.constructor.call(this, filter, name, filterDefinition); this.value = filterDefinition.value, this.preset = filterDefinition.preset, this.enable_create = filterDefinition.enable_create; this.active = filterDefinition.selected; } CheckboxOption.prototype.toggleActive = function() { this.active = !this.active; return this.filter.changed(); }; CheckboxOption.prototype.isActive = function() { return !!this.active; }; return CheckboxOption; })(FilterNode); module.exports = CheckboxOption; /***/ }, /* 15 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var AddedObjsCollection, App, Filter, Footer, InspectorComponent, Items, MoreItemsSpinner, ObjCollection, TopBar, ViewMode; ViewMode = __webpack_require__(16); AddedObjsCollection = __webpack_require__(17); ObjCollection = __webpack_require__(23); TopBar = __webpack_require__(24); Filter = __webpack_require__(29); Items = __webpack_require__(41); MoreItemsSpinner = __webpack_require__(64); InspectorComponent = __webpack_require__(65); Footer = __webpack_require__(68); App = React.createClass({ displayName: 'App', updateFilter: function(filter) { return this.setState({ filter: filter }); }, updateViewMode: function(viewMode) { return this.setState({ viewMode: viewMode }); }, updateObjCollection: function(objCollection) { return this.setState({ objCollection: objCollection }); }, updateAddedObjsCollection: function(addedObjsCollection) { this.setState({ addedObjsCollection: addedObjsCollection }); if (!addedObjsCollection.hasActiveCreations()) { if (this.state.showLastAdded) { return this._setObjsCollection(); } else { this._selectLatestAddedObj(addedObjsCollection); return this.state.objCollection.reload(); } } }, updateLastAdded: function(showLastAdded) { this.setState({ showLastAdded: showLastAdded }); if (showLastAdded && !this.state.addedObjsCollection.hasActiveCreations()) { return this._setObjsCollection(); } }, destroyAddedObj: function(objId) { this.state.addedObjsCollection.destroyCreatedObjById(objId); if (this.state.showLastAdded) { return this._setObjsCollection(); } }, activateInitialFilter: function() { if (this.refs.filterView.activateInitialFilter) { return this.refs.filterView.activateInitialFilter(); } }, _setObjsCollection: function() { var objs; objs = this.state.addedObjsCollection.createdObjs(); return this.state.objCollection.setObjs(objs); }, _selectLatestAddedObj: function(addedObjsCollection) { var lastCreatedObj; if (this.refs.filterView.state.selectedFilter === false) { lastCreatedObj = _.first(addedObjsCollection.objs()).createdObj(); return this.state.objCollection.toggleSelected(lastCreatedObj.id()); } }, componentDidMount: function() { this.state.filter.onChange(this.updateFilter); this.state.viewMode.onChange(this.updateViewMode); this.state.addedObjsCollection.onChange(this.updateAddedObjsCollection); this.state.objCollection.onChange(this.updateObjCollection); this.state.objCollection.on('destroy-obj', this.destroyAddedObj); return this.activateInitialFilter(); }, getInitialState: function() { var basePreset, initialSelection, selectionMode; initialSelection = this.props.options.selection || []; selectionMode = this.props.options.selection_mode; basePreset = this.props.options.base_preset; return { filter: this.props.initialFilter, showLastAdded: false, objs: [], viewMode: new ViewMode(void 0, this.props.options.standAlone), sortCriteria: this.props.initialFilter.sortCriteria, addedObjsCollection: new AddedObjsCollection(basePreset), objCollection: new ObjCollection(initialSelection, selectionMode) }; }, _getBodyClassName: function() { if (this.state.viewMode.isInspectorMaximized()) { return "scrivito-content-browser-body scrivito-content-browser-inspector-max"; } else { return "scrivito-content-browser-body"; } }, render: function() { return React.createElement("div", { "className": "scrivito-app-root" }, React.createElement("div", { "className": this._getBodyClassName() }, React.createElement("div", { "className": "scrivito-content-browser-wrapper" }, React.createElement(TopBar, { "filter": this.state.filter, "sortCriteria": this.state.sortCriteria, "viewMode": this.state.viewMode }), React.createElement(Filter, { "ref": "filterView", "filter": this.state.filter, "baseQuery": this.props.baseQuery, "objCollection": this.state.objCollection, "updateLastAdded": this.updateLastAdded, "viewMode": this.state.viewMode, "addedObjsCollection": this.state.addedObjsCollection, "showLastAdded": this.state.showLastAdded }), React.createElement(Items, { "ref": "itemView", "objCollection": this.state.objCollection, "viewMode": this.state.viewMode, "addedObjsCollection": this.state.addedObjsCollection, "filter": this.state.filter, "showLastAdded": this.state.showLastAdded }), (this.state.objCollection.isLoadingAdditionalObjs() ? React.createElement(MoreItemsSpinner, { "objCollection": this.state.objCollection }) : void 0)), React.createElement(InspectorComponent, { "viewMode": this.state.viewMode, "objCollection": this.state.objCollection })), React.createElement(Footer, { "promise": this.props.promise, "viewMode": this.state.viewMode, "objCollection": this.state.objCollection })); } }); module.exports = App; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { var Listenable, ViewMode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Listenable = __webpack_require__(6); ViewMode = (function(superClass) { extend(ViewMode, superClass); function ViewMode(mode, standAlone) { ViewMode.__super__.constructor.call(this); if (mode == null) { mode = "thumbnails"; } this._mode = mode; this._standAlone = standAlone; this._isInspectorMaximized = false; } ViewMode.prototype.setMode = function(newMode) { this._mode = newMode; return this.changed(); }; ViewMode.prototype.toggleInspectorMaximized = function() { this._isInspectorMaximized = !this._isInspectorMaximized; return this.changed(); }; ViewMode.prototype.getMode = function() { return this._mode; }; ViewMode.prototype.isInspectorMaximized = function() { return this._isInspectorMaximized; }; ViewMode.prototype.isList = function() { return this._mode === "list"; }; ViewMode.prototype.isStandAlone = function() { return this._standAlone === true; }; return ViewMode; })(Listenable); module.exports = ViewMode; /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { var AddedObj, AddedObjsCollection, Listenable, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; AddedObj = __webpack_require__(18); Listenable = __webpack_require__(6); AddedObjsCollection = (function(superClass) { extend(AddedObjsCollection, superClass); function AddedObjsCollection(basePreset) { if (basePreset == null) { basePreset = {}; } AddedObjsCollection.__super__.constructor.call(this); this._basePreset = basePreset; this._objs = []; } AddedObjsCollection.prototype.objs = function() { return this._objs; }; AddedObjsCollection.prototype.createdObjs = function() { return _.map(this._objs, function(addedObj) { return addedObj.createdObj(); }); }; AddedObjsCollection.prototype.count = function() { return this.objs().length; }; AddedObjsCollection.prototype.isEmpty = function() { return this.count() === 0; }; AddedObjsCollection.prototype.addFiles = function(files, presets) { if (presets == null) { presets = {}; } presets = this._buildPresets(presets); _.each(files, (function(_this) { return function(file) { return _this._objs.unshift(new AddedObj(_this, file, presets)); }; })(this)); return this.changed(); }; AddedObjsCollection.prototype.destroyCreatedObjById = function(objId) { var addedObj; addedObj = _.find(this._objs, function(addedObj) { return addedObj.createdObj().id() === objId; }); if (addedObj != null) { return this._objs = _.without(this._objs, addedObj); } }; AddedObjsCollection.prototype.createObj = function(presets) { var addedItem; presets = this._buildPresets(presets); addedItem = new AddedObj(this, null, presets); this._objs.unshift(addedItem); this.changed(); return addedItem; }; AddedObjsCollection.prototype.hasActiveCreations = function() { return _.some(this._objs, function(upload) { return upload.status() === 'active'; }); }; AddedObjsCollection.prototype.hasFailedCreations = function() { return this.getFailedObjs().length > 0; }; AddedObjsCollection.prototype.getFailedObjs = function() { return _.filter(this._objs, function(upload) { return upload.status() === 'failed'; }); }; AddedObjsCollection.prototype._buildPresets = function(presets) { return _.extend({}, this._basePreset, presets); }; return AddedObjsCollection; })(Listenable); module.exports = AddedObjsCollection; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { var AddedObj, Obj, QueryBuilder; Obj = __webpack_require__(19); QueryBuilder = __webpack_require__(20); AddedObj = (function() { AddedObj.prototype.MAX_RETRY = 2; function AddedObj(addedObjsCollection, file, presetAttributes1) { var objAttributes; this.addedObjsCollection = addedObjsCollection; this.presetAttributes = presetAttributes1 != null ? presetAttributes1 : {}; this._status = 'active'; this._updateProgressByStatus(this._status); this._fileName = file != null ? file.name : void 0; this._uniqueId = _.uniqueId("added_obj_"); objAttributes = this._buildObjAttributes(file, this.presetAttributes); scrivito.create_obj(objAttributes).done((function(_this) { return function(objData) { _this._progress = 50; _this.addedObjsCollection.changed(); return _this._fetchObj(objData.id); }; })(this)).fail((function(_this) { return function(failure) { _this._failureMessage = failure.message; return _this._setStatus('failed'); }; })(this)); } AddedObj.prototype.status = function() { return this._status; }; AddedObj.prototype.createdObj = function() { return this._obj; }; AddedObj.prototype.failureMessage = function() { return this._failureMessage; }; AddedObj.prototype.fileName = function() { return this._fileName; }; AddedObj.prototype.progress = function() { return this._progress; }; AddedObj.prototype.uniqueId = function() { return this._uniqueId; }; AddedObj.prototype._fetchObj = function(id, retryCount) { if (retryCount == null) { retryCount = 0; } return QueryBuilder.byId(id).load_batch().then(((function(_this) { return function(searchResult) { if (searchResult.hits.length > 0) { _this._obj = new Obj(searchResult.hits[0]); return _this._setStatus('completed'); } else { return _this._objNotYetIndexed(id, retryCount); } }; })(this)), (function(_this) { return function() { return _this._setStatus('failed'); }; })(this)); }; AddedObj.prototype._objNotYetIndexed = function(id, retryCount) { var fetchObjFunction; if (retryCount < this.MAX_RETRY) { fetchObjFunction = (function(_this) { return function() { return _this._fetchObj(id, retryCount + 1); }; })(this); return window.setTimeout(fetchObjFunction, 500); } else { this._setStatus('failed'); return $.Deferred().reject(); } }; AddedObj.prototype._setStatus = function(status) { this._status = status; this._updateProgressByStatus(status); return this.addedObjsCollection.changed(); }; AddedObj.prototype._updateProgressByStatus = function(status) { return this._progress = (function() { switch (this.status()) { case 'active': return 10; case 'completed': return 100; case 'failed': return 0; } }).call(this); }; AddedObj.prototype._buildObjAttributes = function(file, presetAttributes) { var objAttributes; objAttributes = {}; if (file) { _.extend(objAttributes, this._fileAttributes(file)); } return _.extend(objAttributes, presetAttributes); }; AddedObj.prototype._fileAttributes = function(file) { var objClass; objClass = scrivito.default_obj_class_for_content_type(file.type); return { blob: file, _obj_class: objClass }; }; return AddedObj; })(); module.exports = AddedObj; /***/ }, /* 19 */ /***/ function(module, exports) { var Obj; Obj = (function() { function Obj(attributes) { this._attr = attributes; } Obj.prototype.title = function() { var rawTitle; rawTitle = this._attr['title'] || '(No description)'; return rawTitle.trim(); }; Obj.prototype.subtitle = function() { return this._attr['subtitle']; }; Obj.prototype.id = function() { return this._attr['id']; }; Obj.prototype.equals = function(other) { return this.id() === (other != null ? other.id() : void 0); }; Obj.prototype.hasPreview = function() { return !!this._attr['preview']; }; Obj.prototype.previewUrl = function() { return this._attr['preview']; }; Obj.prototype.lastChanged = function() { return this._attr['last_changed']; }; Obj.prototype.mimeType = function() { return this._attr['mime_type']; }; Obj.prototype.fileSize = function() { return this._attr['file_size']; }; Obj.prototype.fileType = function() { return this._attr['file_type']; }; Obj.prototype.detailsViewUrl = function() { return scrivito.details_url_for_obj_id(this.id()); }; Obj.prototype.hasDetailsView = function() { return this._attr['has_details_view']; }; return Obj; })(); module.exports = Obj; /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { var ActiveNodeConfigCollector, QueryBuilder; ActiveNodeConfigCollector = __webpack_require__(21); QueryBuilder = (function() { function QueryBuilder(filter, baseQuery) { this.filter = filter; this._collector = new ActiveNodeConfigCollector(this.filter); if (baseQuery) { this._baseQuery = QueryBuilder.prepareQuery(baseQuery); } } QueryBuilder.prototype.searchRequest = function() { var query; query = this._baseQuery; query = this._addFilterQueries(query); query = this._addSearchTermQuery(query); return query = this._sortQuery(query); }; QueryBuilder.prototype._addFilterQueries = function(baseQuery) { var activeConfig, combinedQuery, i, len, ref, searchQuery; combinedQuery = baseQuery; ref = this._collector.findActiveFilterItems(); for (i = 0, len = ref.length; i < len; i++) { activeConfig = ref[i]; searchQuery = this._buildActiveChildrenSearchQuery(activeConfig); if (searchQuery) { combinedQuery = this._addOrCreateQuery(combinedQuery, searchQuery); } } return combinedQuery; }; QueryBuilder.prototype._sortQuery = function(query) { if (query != null) { query = query.order(this.filter.sortCriteria.type()); if (this.filter.sortCriteria.isReverse()) { if (!query.orderReversed) { query.reverse_order(); } } } return query; }; QueryBuilder.prototype._addSearchTermQuery = function(query) { var searchQuery; if (this.filter.searchTerm && this.filter.searchTerm.length > 0) { searchQuery = scrivito.obj_where('*', 'contains_prefix', this.filter.searchTerm); return this._addOrCreateQuery(query, searchQuery); } else { return query; } }; QueryBuilder.prototype._buildActiveChildrenSearchQuery = function(activeConfig) { if (activeConfig.hasQuery()) { activeConfig.query().query().order = void 0; activeConfig.query().query().reverse_order = void 0; return activeConfig.query(); } else { return this._buildFOVQuery(activeConfig); } }; QueryBuilder.prototype._buildFOVQuery = function(activeConfig) { if (activeConfig.hasField()) { return scrivito.obj_where(activeConfig.field(), activeConfig.operator(), activeConfig.values()); } }; QueryBuilder.prototype._addOrCreateQuery = function(oldQuery, newQuery) { if (oldQuery) { return oldQuery.and(newQuery); } else { return QueryBuilder.prepareQuery(newQuery); } }; return QueryBuilder; })(); QueryBuilder.prepareQuery = function(query) { return query.clone().format('content_browser').batch_size(24); }; QueryBuilder.byId = function(ids) { return QueryBuilder.prepareQuery(scrivito.obj_where('id', 'equals', ids)); }; module.exports = QueryBuilder; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { var ActiveNodeConfig, ActiveNodeConfigCollector; ActiveNodeConfig = __webpack_require__(22); ActiveNodeConfigCollector = (function() { function ActiveNodeConfigCollector(filter) { this._filter = filter; } ActiveNodeConfigCollector.prototype.findActiveFilterItems = function() { var filterItems, treeFilterItem; filterItems = this._findActiveAdditionalFilters(); treeFilterItem = this._findActiveTreeFilterItem(); if (treeFilterItem) { filterItems.unshift(treeFilterItem); } return filterItems; }; ActiveNodeConfigCollector.prototype._findActiveTreeFilterItem = function() { var activeConfig, i, j, len, len1, ref, ref1, subFilter, treeFilter; ref = this._filter.getTreeFilters(); for (i = 0, len = ref.length; i < len; i++) { treeFilter = ref[i]; ref1 = treeFilter.subFilters; for (j = 0, len1 = ref1.length; j < len1; j++) { subFilter = ref1[j]; activeConfig = this._findActiveSubFilterItem(subFilter); if (activeConfig) { activeConfig.parents.push(treeFilter.config); return new ActiveNodeConfig(activeConfig.parents, [activeConfig.node]); } } } }; ActiveNodeConfigCollector.prototype._findActiveAdditionalFilters = function() { var activeChildren, activeFilters, additionalFilter, i, len, ref; activeFilters = []; ref = this._filter.additionalFilters; for (i = 0, len = ref.length; i < len; i++) { additionalFilter = ref[i]; activeChildren = _.filter(additionalFilter.children, function(child) { return child.isActive(); }); if (activeChildren.length > 0) { activeFilters.push(new ActiveNodeConfig([additionalFilter], activeChildren)); } } return activeFilters; }; ActiveNodeConfigCollector.prototype._findActiveSubFilterItem = function(filterNode) { var activeConfig, childNode, i, len, ref; if (filterNode.isActive()) { return { node: filterNode, parents: [] }; } else { ref = filterNode.children; for (i = 0, len = ref.length; i < len; i++) { childNode = ref[i]; activeConfig = this._findActiveSubFilterItem(childNode); if (activeConfig) { activeConfig.parents.push(filterNode); return activeConfig; } } } }; return ActiveNodeConfigCollector; })(); module.exports = ActiveNodeConfigCollector; /***/ }, /* 22 */ /***/ function(module, exports) { var ActiveNodeConfig; ActiveNodeConfig = (function() { function ActiveNodeConfig(parents, nodes) { this._parents = parents; this._activeNodes = nodes; } ActiveNodeConfig.prototype.activeNodes = function() { return this._activeNodes; }; ActiveNodeConfig.prototype.values = function() { return _.flatten(_.map(this._activeNodes, this._valueForNode)); }; ActiveNodeConfig.prototype.query = function() { return this._filter().type !== 'checkbox' && this._activeNodes[0].query; }; ActiveNodeConfig.prototype.hasQuery = function() { return !!this.query(); }; ActiveNodeConfig.prototype.field = function() { return this._findConfig('field'); }; ActiveNodeConfig.prototype.hasField = function() { return !!this.field(); }; ActiveNodeConfig.prototype.preventsCreation = function() { return this.nodesPreventingCreation().length > 0; }; ActiveNodeConfig.prototype.nodesPreventingCreation = function() { return _.select(this.activeNodes(), function(node) { return node.enable_create === false; }); }; ActiveNodeConfig.prototype.enablesCreation = function() { return _.some(this.activeNodes(), function(node) { return node.enable_create === true; }); }; ActiveNodeConfig.prototype.operator = function() { return this._findConfig('operator') || 'equals'; }; ActiveNodeConfig.prototype._valueForNode = function(node) { return node.value || node.name; }; ActiveNodeConfig.prototype._findConfig = function(attrName) { var activeNode, parentWithAttribute; activeNode = this._activeNodes[0]; if (this._filter().type !== 'checkbox' && activeNode[attrName]) { return activeNode[attrName]; } else { parentWithAttribute = _.find(this._parents, function(node) { return node[attrName]; }); return parentWithAttribute && parentWithAttribute[attrName]; } }; ActiveNodeConfig.prototype._filter = function() { return _.last(this._parents); }; return ActiveNodeConfig; })(); module.exports = ActiveNodeConfig; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { var Listenable, Obj, ObjCollection, SortCriteria, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; Listenable = __webpack_require__(6); Obj = __webpack_require__(19); SortCriteria = __webpack_require__(7); ObjCollection = (function(superClass) { extend(ObjCollection, superClass); function ObjCollection(selectedObjsIds, _selectionMode, objs, sortCriteria) { this._selectionMode = _selectionMode; ObjCollection.__super__.constructor.call(this); this._selectionMode || (this._selectionMode = 'multi'); sortCriteria || (sortCriteria = new SortCriteria()); this._sortCriteria = sortCriteria; this._selectedObjsIds = selectedObjsIds || []; this._objs = objs || []; this._isAlreadyReversed = false; this._curQueryNumber = 0; } ObjCollection.prototype.objs = function() { return this._objs; }; ObjCollection.prototype.hasMoreItems = function() { return this._nextQuery != null; }; ObjCollection.prototype.selectedObjsIds = function() { return this._selectedObjsIds; }; ObjCollection.prototype.isSingleElementSelected = function() { return this.getSelectedObjs().length === 1; }; ObjCollection.prototype.getSelectedObjs = function() { var selectedObjs; selectedObjs = []; _.each(this._selectedObjsIds, (function(_this) { return function(selected) { var selectedObj; selectedObj = _.find(_this._objs, function(obj) { if (obj != null) { return obj.id() === selected; } }); if (selectedObj != null) { return selectedObjs.push(selectedObj); } }; })(this)); return selectedObjs; }; ObjCollection.prototype.deselectObjs = function() { return this._selectedObjsIds = []; }; ObjCollection.prototype.isLoading = function() { return !!this._isLoading; }; ObjCollection.prototype.isLoadingAdditionalObjs = function() { return !!this._isLoadingAdditionalObjs; }; ObjCollection.prototype.reload = function() { if (this._query) { return this.loadFromBackend(this._query); } }; ObjCollection.prototype.setObjs = function(objs) { this._objs = objs; return this._resetObjsCollectionParams(); }; ObjCollection.prototype.reset = function() { this._objs = []; return this._resetObjsCollectionParams(); }; ObjCollection.prototype.isSingleSelectionMode = function() { return this._selectionMode === 'single'; }; ObjCollection.prototype.loadFromBackend = function(query) { this._query = query; this._curQueryNumber += 1; this._resetLoadingState(); if (query) { this._activateLoading(); return this._initialLoadObjs(query, this._curQueryNumber); } else { this._objs = []; return this.changed(); } }; ObjCollection.prototype.toggleSelected = function(objId) { if (this.isSelected(objId)) { this._selectedObjsIds = _.without(this._selectedObjsIds, objId); } else { if (this.isSingleSelectionMode()) { this._selectedObjsIds = [objId]; } else { this._selectedObjsIds.push(objId); } } return this.changed(); }; ObjCollection.prototype.isSelected = function(objId) { return _.contains(this._selectedObjsIds, objId); }; ObjCollection.prototype.loadNextPage = function() { var queryNumber; if (this.hasMoreItems() && !this.isLoadingAdditionalObjs()) { this._activateIsLoadingAdditionalObjs(); queryNumber = this._curQueryNumber; return this._nextQuery.load_batch().done((function(_this) { return function(results, next) { return _this._setAndLoadObjs(results, next, queryNumber); }; })(this)).fail((function(_this) { return function() { _this._isLoadingAdditionalObjs = false; return _this.changed(); }; })(this)); } }; ObjCollection.prototype.destroySelectedObjs = function() { var deferreds; if (this._selectedObjsIds.length > 0) { deferreds = _.map(this._selectedObjsIds, (function(_this) { return function(objId) { return _this._destroyById(objId); }; })(this)); $.when.apply($, deferreds).always((function(_this) { return function() { return _this.reload(); }; })(this)); return this._activateLoading(); } }; ObjCollection.prototype._destroyById = function(objId) { return scrivito.delete_obj(objId).done((function(_this) { return function() { _this._objs = _this._objs.filter(function(obj) { return obj.id() !== objId; }); _this._selectedObjsIds = _this._selectedObjsIds.filter(function(selectedObjId) { return selectedObjId !== objId; }); return _this.trigger('destroy-obj', objId); }; })(this)); }; ObjCollection.prototype._resetLoadingState = function() { this._nextQuery = null; this._isLoadingAdditionalObjs = false; return this._isLoading = false; }; ObjCollection.prototype._initialLoadObjs = function(query, queryNumber) { return query.load_batch().then((function(_this) { return function(results, next) { _this._isLoading = false; if (queryNumber === _this._curQueryNumber) { _this._objs = []; return _this._setAndLoadObjs(results, next, queryNumber); } }; })(this)); }; ObjCollection.prototype._setAndLoadObjs = function(results, next, queryNumber) { var curObjs; if (queryNumber === this._curQueryNumber) { this._isLoadingAdditionalObjs = false; curObjs = _.map(results.hits, function(attr) { return new Obj(attr); }); this._objs = this._objs.concat(curObjs); this._nextQuery = next; return this.changed(); } }; ObjCollection.prototype._activateLoading = function() { if (!this.isLoading()) { this._isLoading = true; return this.changed(); } }; ObjCollection.prototype._resetObjsCollectionParams = function() { this._query = null; this.deselectObjs(); this._resetLoadingState(); return this.changed(); }; ObjCollection.prototype._activateIsLoadingAdditionalObjs = function() { if (!this.isLoadingAdditionalObjs()) { this._isLoadingAdditionalObjs = true; return this.changed(); } }; return ObjCollection; })(Listenable); module.exports = ObjCollection; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ActiveNodeConfigCollector, SortMenu, TopBar, ViewModeBar; ViewModeBar = __webpack_require__(25); SortMenu = __webpack_require__(27); ActiveNodeConfigCollector = __webpack_require__(21); TopBar = React.createClass({ displayName: 'TopBar', setSearchTerm: function() { return this.props.filter.setSearchTerm(this.state.searchTerm); }, getInitialState: function() { return { searchTerm: this.props.filter.searchTerm }; }, triggerSearchWithEnter: function(event) { if (event.keyCode === 13) { return this.setSearchTerm(); } }, _getSearchPlaceholder: function() { var activeCriteriaTitle, activeFilters, actvieFilterNodeConfigs, collector, searchPlaceHolder; collector = new ActiveNodeConfigCollector(this.props.filter); searchPlaceHolder = "Search everywhere"; actvieFilterNodeConfigs = collector.findActiveFilterItems(); activeFilters = _.flatten(_.map(actvieFilterNodeConfigs, function(config) { return config.activeNodes(); })); if (activeFilters.length > 1) { searchPlaceHolder = "Search filtered content"; } else if (activeFilters.length === 1) { activeCriteriaTitle = activeFilters[0].title; searchPlaceHolder = "Search \"" + activeCriteriaTitle + "\" "; } return searchPlaceHolder; }, updateSearchTerm: function(event) { return this.setState({ searchTerm: event.target.value }); }, render: function() { return React.createElement("div", { "className": "scrivito-content-browser-topbar" }, React.createElement("div", { "className": "scrivito-content-browser-search" }, React.createElement("input", { "type": "text", "placeholder": this._getSearchPlaceholder(), "className": "search-field", "value": this.state.searchTerm, "onChange": this.updateSearchTerm, "onKeyUp": this.triggerSearchWithEnter }), React.createElement("button", { "className": "search-field-button", "onClick": this.setSearchTerm }, "Search")), React.createElement(ViewModeBar, { "viewMode": this.props.viewMode }), React.createElement(SortMenu, { "filter": this.props.filter })); } }); module.exports = TopBar; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ViewModeBar, ViewModeBarItem; ViewModeBarItem = __webpack_require__(26); ViewModeBar = React.createClass({ displayName: 'ViewModeBar', viewModeButtonsData: ["list", "thumbnails"], render: function() { var mode; return React.createElement("div", null, (function() { var i, len, ref, results; ref = this.viewModeButtonsData; results = []; for (i = 0, len = ref.length; i < len; i++) { mode = ref[i]; results.push(React.createElement(ViewModeBarItem, { "viewMode": this.props.viewMode, "mode": mode })); } return results; }).call(this)); } }); module.exports = ViewModeBar; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ViewModeBarItem; ViewModeBarItem = React.createClass({ displayName: 'ViewModeBarItem', viewModeButtonsData: { "thumbnails": { iconTitle: "Thumbnails", iconClassName: "scrivito_icon_th_small" }, "list": { iconTitle: "List", iconClassName: "scrivito_icon_list_medium" } }, getIconClassName: function(mode) { return "scrivito_icon " + this.viewModeButtonsData[mode].iconClassName; }, getIconTitle: function(mode) { return this.viewModeButtonsData[mode].iconTitle; }, getLabelClasses: function() { return React.addons.classSet({ 'active': this.props.viewMode.getMode() === this.props.mode, "editing-button-view": true }); }, changeViewMode: function() { return this.props.viewMode.setMode(this.props.mode); }, render: function() { return React.createElement("span", { "data-size": this.props.mode, "className": this.getLabelClasses(), "onClick": this.changeViewMode }, React.createElement("i", { "title": this.getIconTitle(this.props.mode), "className": this.getIconClassName(this.props.mode) })); } }); module.exports = ViewModeBarItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var SortMenu, SortMenuItem; SortMenuItem = __webpack_require__(28); SortMenu = React.createClass({ displayName: 'SortMenu', sortItemsData: { "date": { itemTitle: "Sort by date", descCriteriaTitle: "Last change: latest first", ascCriteriaTitle: "Last change: oldest first", sortItemType: "_last_changed" } }, toggleSortMenu: function() { return $('.scrivito-content-browser-sort-menu .scrivito_menu_box').fadeToggle(); }, getSortIconClassName: function() { var sortIcon; sortIcon = "scrivito_icon "; if (this.props.filter.sortCriteria.isReverse()) { sortIcon += "scrivito_icon_sort_up"; } else { sortIcon += "scrivito_icon_sort_down"; } return sortIcon; }, render: function() { var sortItem; return React.createElement("span", { "className": "scrivito-content-browser-sort-menu scrivito_button scrivito_lightgrey scrivito_right", "onClick": this.toggleSortMenu }, React.createElement("i", { "className": this.getSortIconClassName() }), this.props.filter.sortCriteria.activeElement(), React.createElement("i", { "className": "scrivito_icon scrivito-content-browser-menu-icon scrivito_icon_chevron_down" }), React.createElement("ul", { "className": "scrivito_menu_box scrivito_right" }, (function() { var i, len, ref, results; ref = Object.keys(this.sortItemsData); results = []; for (i = 0, len = ref.length; i < len; i++) { sortItem = ref[i]; results.push(React.createElement(SortMenuItem, { "filter": this.props.filter, "sortItem": this.sortItemsData[sortItem] })); } return results; }).call(this), React.createElement("li", { "className": "scrivito_menu_box_overlay" }))); } }); module.exports = SortMenu; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var SortCriteria, SortMenuItem; SortCriteria = __webpack_require__(7); SortMenuItem = React.createClass({ displayName: 'SortMenuItem', basicIcon: "scrivito_icon ", _ascIconSortClass: function() { return this.basicIcon + "scrivito_icon_sort_down"; }, _descIconSortClass: function() { return this.basicIcon + "scrivito_icon_sort_up"; }, getSortLiClassName: function(activeElement) { var itemIcon; itemIcon = "scrivito_menu_item"; if (this.props.filter.sortCriteria.activeElement() === activeElement) { itemIcon += " active"; } return itemIcon; }, _getAscSortLiClassName: function() { return this.getSortLiClassName(this.currentSortItem().ascCriteriaTitle); }, _getDescSortLiClassName: function() { return this.getSortLiClassName(this.currentSortItem().descCriteriaTitle); }, currentSortItem: function() { return this.props.sortItem; }, _changeSortCriteria: function(reverse, activeItemElement) { var sortCriteria; sortCriteria = new SortCriteria(this.currentSortItem().sortItemType, reverse, activeItemElement, this.currentSortItem().itemTitle); return this.props.filter.setSortCriteria(sortCriteria); }, _sortInAscOrder: function() { return this._changeSortCriteria(false, this.currentSortItem().ascCriteriaTitle); }, _sortInDescOrder: function() { return this._changeSortCriteria(true, this.currentSortItem().descCriteriaTitle); }, render: function() { return React.createElement("div", null, React.createElement("li", { "className": "scrivito_menu_separator" }, React.createElement("span", null, (this.currentSortItem().itemTitle))), React.createElement("li", { "className": this._getDescSortLiClassName(), "onClick": this._sortInDescOrder }, React.createElement("span", null, React.createElement("i", { "className": this._descIconSortClass() }, " "), (this.currentSortItem().descCriteriaTitle))), React.createElement("li", { "className": this._getAscSortLiClassName(), "onClick": this._sortInAscOrder }, React.createElement("span", null, React.createElement("i", { "className": this._ascIconSortClass() }, " "), (this.currentSortItem().ascCriteriaTitle)))); } }); module.exports = SortMenuItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var AdditionalOptionFilter, Filter, FilterMixin, LastAddedFilter, QueryBuilder, SelectedFilter, TreeFilter; FilterMixin = __webpack_require__(30); AdditionalOptionFilter = __webpack_require__(31); TreeFilter = __webpack_require__(38); SelectedFilter = __webpack_require__(39); QueryBuilder = __webpack_require__(20); LastAddedFilter = __webpack_require__(40); Filter = React.createClass({ displayName: 'Filter', mixins: [FilterMixin], renderAdditionalFilters: function() { var subFilters; subFilters = _.map(this.props.filter.additionalFilters, function(additionalFilter) { return React.createElement(AdditionalOptionFilter, { "filter": additionalFilter }); }); return this.renderSubFiltersList(subFilters, "compact"); }, loadObjsByFilterQuery: function(filter) { var query, queryBder; this.setState({ selectedFilter: false }); this.props.updateLastAdded(false); queryBder = new QueryBuilder(filter, this.props.baseQuery); query = queryBder.searchRequest(); this.props.objCollection.deselectObjs(); return this.props.objCollection.loadFromBackend(query); }, addedObjsCollectionCount: function() { return this.props.addedObjsCollection.count(); }, getFilterClassName: function() { var filterBrowserClass; filterBrowserClass = "scrivito-content-browser-filter"; if (this.addedObjsCollectionCount() > 0 && this.props.viewMode.isStandAlone()) { return filterBrowserClass; } if (this.addedObjsCollectionCount() > 0) { filterBrowserClass += " last_added"; } if (this.props.viewMode.isStandAlone()) { filterBrowserClass += " stand-alone"; } return filterBrowserClass; }, componentDidMount: function() { return this.props.filter.onChange(this.loadObjsByFilterQuery); }, activateInitialFilter: function() { if (this.props.objCollection.selectedObjsIds().length > 0) { return this.activateSelectedFilter(); } else if (this.props.filter.hasActiveChildren()) { return this.loadObjsByFilterQuery(this.props.filter); } }, activateLastAddedFilter: function() { this.setState({ selectedFilter: false }); this.props.updateLastAdded(true); return this.props.filter.deselectHierarchicalFilters(); }, activateSelectedFilter: function() { var query; this.props.filter.deselectHierarchicalFilters(); this.setState({ selectedFilter: true }); this.props.updateLastAdded(false); query = QueryBuilder.byId(this.props.objCollection.selectedObjsIds()); return this.props.objCollection.loadFromBackend(query); }, getInitialState: function() { return { selectedFilter: false }; }, renderFilterSeparator: function() { if (this.props.filter.hasAdditionalFilters() && this.props.filter.hasHierarchicalFilters()) { return React.createElement("div", { "className": "scrivito_separator" }, "more filters"); } }, render: function() { var selectedObjsCount, treeSubFilters; treeSubFilters = _.map(this.props.filter.getHierarchicalFilters(), function(treeFilter) { return React.createElement(TreeFilter, { "filter": treeFilter }); }); selectedObjsCount = this.props.objCollection.getSelectedObjs().length; return React.createElement("div", { "className": this.getFilterClassName() }, React.createElement("div", { "className": "scrivito-content-browser-filter-fixed" }, (!this.props.viewMode.isStandAlone() ? React.createElement(SelectedFilter, { "selectedCount": selectedObjsCount, "active": this.state.selectedFilter, "activateSelectedFilter": this.activateSelectedFilter }) : void 0), (this.addedObjsCollectionCount() > 0 ? React.createElement(LastAddedFilter, { "addedCount": this.addedObjsCollectionCount(), "active": this.props.showLastAdded, "activateLastAddedFilter": this.activateLastAddedFilter }) : void 0)), React.createElement("div", { "className": "scrivito-content-browser-filter-scroll" }, this.renderSubFiltersList(treeSubFilters), this.renderFilterSeparator(), this.renderAdditionalFilters())); } }); module.exports = Filter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var FilterMixin; FilterMixin = { renderSubFiltersList: function(subFilters, additionalClasses) { var ulClassName; ulClassName = "scrivito-content-browser-hierarchy-filter"; if (additionalClasses && additionalClasses.length > 0) { ulClassName = ulClassName + " " + additionalClasses; } return React.createElement("ul", { "className": ulClassName }, subFilters); } }; module.exports = FilterMixin; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var AdditionalOptionFilter, CheckBoxOptionFilter, DeselectAllRadioOptionFilter, ExpandableFilterNodeMixin, RadioOptionFilter; ExpandableFilterNodeMixin = __webpack_require__(32); DeselectAllRadioOptionFilter = __webpack_require__(33); RadioOptionFilter = __webpack_require__(35); CheckBoxOptionFilter = __webpack_require__(37); AdditionalOptionFilter = React.createClass({ displayName: 'AdditionalOptionFilter', mixins: [ExpandableFilterNodeMixin], getInitialState: function() { return this.defaultExpansionState(); }, getAdditionalLableClasses: function() { return React.addons.classSet(this.openClassSetOptions()); }, createDeselctAllRadioOption: function() { return React.createElement(DeselectAllRadioOptionFilter, { "filter": this.props.filter }); }, renderSubRadioOptionFilters: function() { var childKey, element, i, j, len, ref, results; ref = this.props.filter.children; results = []; for (i = j = 0, len = ref.length; j < len; i = ++j) { element = ref[i]; childKey = element.title + "-" + i; if (this.props.filter.type === "radio") { results.push(React.createElement(RadioOptionFilter, { "key": childKey, "filter": element })); } else if (this.props.filter.type === "checkbox") { results.push(React.createElement(CheckBoxOptionFilter, { "key": childKey, "filter": element })); } else { results.push(void 0); } } return results; }, render: function() { var labelClasses; labelClasses = this.getAdditionalLableClasses(); return React.createElement("li", { "className": labelClasses }, this.renderArrowTag(), React.createElement("div", { "className": "scrivito-content-browser-hierarchy-label", "onClick": this.arrowHandleClick }, React.createElement("span", null, this.props.filter.title)), React.createElement("ul", null, (this.props.filter.type === "radio" ? this.createDeselctAllRadioOption() : void 0), this.renderSubRadioOptionFilters())); } }); module.exports = AdditionalOptionFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 32 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ExpandableFilterNodeMixin; ExpandableFilterNodeMixin = { defaultExpansionState: function() { return { open: this.props.filter.isExpanded() }; }, arrowHandleClick: function() { return this.setState({ open: !this.state.open }); }, renderArrowTag: function() { return React.createElement("div", { "className": "scrivito-content-browser-hierarchy-arrow", "onClick": this.arrowHandleClick }); }, openClassSetOptions: function() { return { 'open': this.state.open, 'closed': !this.state.open }; } }; module.exports = ExpandableFilterNodeMixin; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 33 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var DeselectAllRadioOptionFilter, OptionFilterLabelRenderMixin; OptionFilterLabelRenderMixin = __webpack_require__(34); DeselectAllRadioOptionFilter = React.createClass({ displayName: 'DeselectAllRadioOptionFilter', mixins: [OptionFilterLabelRenderMixin], getActiveClass: function() { if (this.props.filter.hasActiveChildren()) { return ''; } else { return "active"; } }, deselectAllRadioOption: function() { return this.props.filter.deactivateAll(); }, render: function() { return React.createElement("li", { "className": this.getActiveClass(), "onClick": this.deselectAllRadioOption }, React.createElement("div", { "className": "scrivito-content-browser-hierarchy-radio" }), this.renderHierarchyLabelTitle('All')); } }); module.exports = DeselectAllRadioOptionFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var OptionFilterLabelRenderMixin; OptionFilterLabelRenderMixin = { renderHierarchyLabelTitle: function(title) { return React.createElement("div", { "className": "scrivito-content-browser-hierarchy-label" }, React.createElement("span", null, title)); } }; module.exports = OptionFilterLabelRenderMixin; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var OptionFilterMixin, RadioOptionFilter; OptionFilterMixin = __webpack_require__(36); RadioOptionFilter = React.createClass({ displayName: 'RadioOptionFilter', mixins: [OptionFilterMixin], labelToggleClick: function() { if (!this.props.filter.isActive()) { return this.props.filter.setActive(); } }, render: function() { return React.createElement("li", { "className": this.activeClassName(), "onClick": this.labelToggleClick }, React.createElement("div", { "className": "scrivito-content-browser-hierarchy-radio" }), this.renderOptionFilterTitle()); } }); module.exports = RadioOptionFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 36 */ /***/ function(module, exports, __webpack_require__) { var OptionFilterLabelRenderMixin, OptionFilterMixin; OptionFilterLabelRenderMixin = __webpack_require__(34); OptionFilterMixin = { mixins: [OptionFilterLabelRenderMixin], optionLabelToggleClick: function() { return this.props.filter.toggleActive(); }, activeClassName: function() { if (this.props.filter.isActive()) { return "active"; } else { return ""; } }, renderOptionFilterTitle: function() { return this.renderHierarchyLabelTitle(this.props.filter.title); } }; module.exports = OptionFilterMixin; /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var CheckBoxOptionFilter, OptionFilterMixin; OptionFilterMixin = __webpack_require__(36); CheckBoxOptionFilter = React.createClass({ displayName: 'CheckBoxOptionFilter', mixins: [OptionFilterMixin], render: function() { return React.createElement("li", { "className": this.activeClassName(), "onClick": this.optionLabelToggleClick }, React.createElement("div", { "className": "scrivito-content-browser-hierarchy-checkbox" }), this.renderOptionFilterTitle()); } }); module.exports = CheckBoxOptionFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ExpandableFilterNodeMixin, TreeFilter; ExpandableFilterNodeMixin = __webpack_require__(32); TreeFilter = React.createClass({ displayName: 'TreeFilter', mixins: [ExpandableFilterNodeMixin], getInitialState: function() { return this.defaultExpansionState(); }, renderIconTag: function() { var baseIconClass, iconClass; if (this.props.filter.icon != null) { baseIconClass = "scrivito_icon"; iconClass = baseIconClass + ("_" + this.props.filter.icon); return React.createElement("i", { "className": baseIconClass + " " + iconClass }); } }, getLabelClasses: function() { var activeClass, classes; activeClass = { 'active': this.props.filter.isActive() }; classes = _.extend(this.openClassSetOptions(), activeClass); return React.addons.classSet(classes); }, renderSubTrees: function() { var childKey, element, i, j, len, ref, results; ref = this.props.filter.children; results = []; for (i = j = 0, len = ref.length; j < len; i = ++j) { element = ref[i]; childKey = element.title + "-" + i; results.push(React.createElement(TreeFilter, { "key": childKey, "filter": element })); } return results; }, labelToggleClick: function() { return this.props.filter.toggleActive(); }, render: function() { var labelClasses; labelClasses = this.getLabelClasses(); return React.createElement("li", { "className": labelClasses }, (!this.props.filter.isLeaf() ? this.renderArrowTag() : void 0), React.createElement("div", { "className": "scrivito-content-browser-hierarchy-label", "onClick": this.labelToggleClick }, this.renderIconTag(), React.createElement("span", null, this.props.filter.title)), (!this.props.filter.isLeaf() ? React.createElement("ul", null, this.renderSubTrees()) : void 0)); } }); module.exports = TreeFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 39 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var SelectedFilter; SelectedFilter = React.createClass({ displayName: 'SelectedFilter', filterClass: function() { return React.addons.classSet({ 'scrivito-content-browser-filter-item': true, 'selected-filter': true, 'active': this.props.active }); }, render: function() { return React.createElement("div", { "className": this.filterClass(), "onClick": this.props.activateSelectedFilter }, React.createElement("i", { "className": "scrivito-content-browser-icon scrivito-content-browser-icon-ok-box" }), React.createElement("span", { "className": "scrivito-content-browser-filter-label" }, "Selected", React.createElement("span", { "className": "scrivito-content-browser-counter selected-total" }, this.props.selectedCount))); } }); module.exports = SelectedFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedFilter; LastAddedFilter = React.createClass({ displayName: 'LastAddedFilter', filterClass: function() { var filterClass; filterClass = 'scrivito-content-browser-filter-item'; if (this.props.active) { filterClass += ' active'; } return filterClass; }, render: function() { return React.createElement("div", { "className": this.filterClass(), "onClick": this.props.activateLastAddedFilter }, React.createElement("i", { "className": "scrivito-content-browser-icon scrivito-content-browser-icon-ok-box" }), React.createElement("span", { "className": "scrivito-content-browser-filter-label" }, "Last added", React.createElement("span", { "className": "scrivito-content-browser-counter selected-total" }, this.props.addedCount))); } }); module.exports = LastAddedFilter; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var Items, LastAddedItems, PresetBuilder, TableView, TableViewContent, ThumbnailItems; TableView = __webpack_require__(42); ThumbnailItems = __webpack_require__(43); PresetBuilder = __webpack_require__(51); LastAddedItems = __webpack_require__(52); TableViewContent = __webpack_require__(62); Items = React.createClass({ displayName: 'Items', getInitialState: function() { return { dragInProgress: false }; }, dropZoneClass: function() { var className; className = "scrivito-content-browser-items"; if (this.state.dragInProgress) { if (this.props.showLastAdded) { className += " uploader-drag-over-forbiden"; } else { className += " uploader-drag-over"; } } return className; }, _buildErrorList: function(values) { return React.createElement("ul", null, _.map(values, function(value) { return React.createElement("li", null, value); })); }, _showConflictingPresetsAlert: function(errors) { var fieldsWithError, firstField, message; fieldsWithError = _.keys(errors); firstField = _.first(fieldsWithError); message = React.createElement("div", null, React.createElement("p", null, "The selected properties could not be assigned to the uploaded files."), React.createElement("p", null, "Choose only one of these ", this._errorMessageForField(firstField), ":"), this._buildErrorList(errors[firstField]), _.map(_.rest(fieldsWithError), (function(_this) { return function(field) { return React.createElement("div", null, React.createElement("p", null, "Also, choose just one of these ", _this._errorMessageForField(field), ":"), _this._buildErrorList(errors[field])); }; })(this)), "Please try again."); return scrivito.content_browser._showAlert({ title: 'Upload cancelled', body: React.createElement("div", null, message) }); }, _errorMessageForField: function(field_name) { if (field_name === '_obj_class') { return "types"; } else { return "\"" + field_name + "\" options"; } }, uploadFiles: function(event) { var dataTransfer, files, preset; this.changeDragState(false)(event); if (this.props.showLastAdded) { return; } dataTransfer = event.dataTransfer; if (dataTransfer == null) { return; } files = dataTransfer.files; if (files.length > 0) { preset = this.buildPreset(); if (preset.isValid()) { return this.props.addedObjsCollection.addFiles(files, preset.values()); } else { return this._showConflictingPresetsAlert(preset.errors()); } } }, buildPreset: function() { var presetBuilder; presetBuilder = new PresetBuilder(this.props.filter); return presetBuilder.generatePreset(); }, changeDragState: function(isDragging) { return (function(_this) { return function(event) { event.preventDefault(); event.stopPropagation(); return _this.setState({ dragInProgress: isDragging }); }; })(this); }, render: function() { return React.createElement("div", { "className": this.dropZoneClass(), "onDragOver": this.changeDragState(true), "onDrop": this.uploadFiles, "onDragLeave": this.changeDragState(false) }, (this.props.objCollection.isLoading() ? React.createElement("div", { "className": "scrivito-content-browser-loading" }, React.createElement("i", { "className": "scrivito_icon scrivito_icon_refresh" })) : this.props.showLastAdded || this.props.addedObjsCollection.hasActiveCreations() ? React.createElement(LastAddedItems, React.__spread({}, this.props, { "viewMode": this.props.viewMode, "dragInProgress": this.state.dragInProgress, "addedObjsCollection": this.props.addedObjsCollection })) : this.props.viewMode.isList() ? React.createElement(TableView, { "objCollection": this.props.objCollection, "toggleSelected": this.props.toggleSelected, "filter": this.props.filter, "addedObjsCollection": this.props.addedObjsCollection }, React.createElement(TableViewContent, React.__spread({}, this.props))) : React.createElement(ThumbnailItems, { "objCollection": this.props.objCollection, "viewMode": this.props.viewMode.getMode(), "filter": this.props.filter, "addedObjsCollection": this.props.addedObjsCollection }))); } }); module.exports = Items; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var TableView; TableView = React.createClass({ render: function() { return React.createElement("div", { "className": "scrivito-content-browser-list" }, React.createElement("div", { "className": "scrivito-content-browser-list-head" }, React.createElement("table", null, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("th", null), React.createElement("th", null, "Title"), React.createElement("th", null, "Type"), React.createElement("th", null, "File type"), React.createElement("th", null, "File size"), React.createElement("th", null, "Last change"))))), this.props.children); } }); module.exports = TableView; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ActiveNodeConfigCollector, InfiniteScrollMixin, ObjCreation, ThumbnailAddItem, ThumbnailItem, ThumbnailItems; InfiniteScrollMixin = __webpack_require__(44); ThumbnailItem = __webpack_require__(45); ThumbnailAddItem = __webpack_require__(48); ObjCreation = __webpack_require__(50); ActiveNodeConfigCollector = __webpack_require__(21); ThumbnailItems = React.createClass({ displayName: 'ThumbnailItems', mixins: [InfiniteScrollMixin], getElementDOMNode: function() { return this.getDOMNode().parentElement; }, getSizeClassName: function() { return "items scrivito-content-browser-thumbnails small"; }, activeFilterNodes: function() { var collector; collector = new ActiveNodeConfigCollector(this.props.filter); return collector.findActiveFilterItems(); }, objCreation: function() { return new ObjCreation(this.props.filter); }, buildItems: function() { return _.map(this.props.objCollection.objs(), (function(_this) { return function(obj) { return React.createElement(ThumbnailItem, { "key": obj.id(), "obj": obj, "objCollection": _this.props.objCollection }); }; })(this)); }, render: function() { return React.createElement("ul", { "className": this.getSizeClassName() }, (this.objCreation().showCreationItem() ? React.createElement(ThumbnailAddItem, { "objCreation": this.objCreation(), "addedObjsCollection": this.props.addedObjsCollection }) : void 0), this.buildItems()); } }); module.exports = ThumbnailItems; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 44 */ /***/ function(module, exports) { var InfiniteScrollMixin; InfiniteScrollMixin = { loadingAdditionalItems: function() { return this.props.objCollection.loadNextPage(); }, hasMoreItems: function() { return this.props.objCollection.hasMoreItems(); }, isViewportNotFullFilled: function() { return this.props.objCollection.objs().length > 0; }, screenBottomTolerance: function() { return 20; }, componentDidMount: function() { return this.attachScrollListener(); }, componentDidUpdate: function() { this.attachScrollListener(); if (this.isViewportNotFullFilled()) { return this.fillViewPort(); } }, scrollListener: function() { var isViewportAtBottom, node; node = this.getElementDOMNode(); isViewportAtBottom = node.scrollTop + node.offsetHeight >= node.scrollHeight - this.screenBottomTolerance(); if (isViewportAtBottom) { this.detachScrollListener(); this.loadingAdditionalItems(); } }, attachScrollListener: function() { var node; if (!this.hasMoreItems()) { return; } node = this.getElementDOMNode(); node.addEventListener("scroll", this.scrollListener); return this.scrollListener(); }, fillViewPort: function() { if (!this._isFullViewPort()) { return this.loadingAdditionalItems(); } }, _isFullViewPort: function() { return this.getElementDOMNode().scrollHeight > this.getElementDOMNode().offsetHeight; }, detachScrollListener: function() { var node; node = this.getElementDOMNode(); return node.removeEventListener("scroll", this.scrollListener); }, componentWillUnmount: function() { return this.detachScrollListener(); } }; module.exports = InfiniteScrollMixin; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var InspectedItemMixin, MimeTypeIcon, ThumbnailItem; InspectedItemMixin = __webpack_require__(46); MimeTypeIcon = __webpack_require__(47); ThumbnailItem = React.createClass({ displayName: 'ThumbnailItem', mixins: [InspectedItemMixin], itemToolTip: function() { var itemToolTip; itemToolTip = this.props.obj.title(); if (this.props.obj.subtitle() != null) { itemToolTip += "\n" + (this.props.obj.subtitle()); } return itemToolTip; }, baseSelectClass: function() { return 'scrivito-content-browser-meta '; }, mimeTypeIconClassName: function() { var className; className = 'scrivito_icon '; className += MimeTypeIcon.getMimeTypeIconClassName(this.props.obj.mimeType()); return className; }, previewImage: function() { if (this.props.obj.hasPreview()) { return React.createElement("img", { "src": this.props.obj.previewUrl() }); } else { return React.createElement("span", { "className": this.mimeTypeIconClassName() }); } }, render: function() { return React.createElement("li", { "className": this.getItemClasses() }, React.createElement("div", { "className": "scrivito-content-browser-item-wrapper", "onClick": this.handleSelectClick }, React.createElement("div", { "className": "scrivito-content-browser-preview" }, this.previewImage()), React.createElement("div", { "className": this.selectClass(), "title": this.itemToolTip() }, React.createElement("span", { "className": "scrivito-content-browser-thumbnails-name" }, this.props.obj.title()), React.createElement("span", { "className": "scrivito-content-browser-thumbnails-size" }, this.props.obj.subtitle()), (!this.props.objCollection.isSingleSelectionMode() ? React.createElement("span", { "className": 'scrivito-content-browser-thumbnails-select select-item' }) : void 0)))); } }); module.exports = ThumbnailItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 46 */ /***/ function(module, exports) { var InspectedItemMixin; InspectedItemMixin = { getItemClasses: function() { var className; className = 'content-browser-item '; if (this.props.objCollection.isSelected(this.props.obj.id())) { className += 'active'; } return className; }, selectClass: function() { var className; className = this.baseSelectClass(); if (this.props.objCollection.isSelected(this.props.obj.id())) { className += ' active'; } return className; }, handleSelectClick: function() { return this.props.objCollection.toggleSelected(this.props.obj.id()); } }; module.exports = InspectedItemMixin; /***/ }, /* 47 */ /***/ function(module, exports) { var MimeTypeIcon; MimeTypeIcon = (function() { function MimeTypeIcon() {} MimeTypeIcon.getMimeTypeIconClassName = function(mimeType) { var icon, matchedType; if (mimeType != null) { matchedType = this._getMatchedIconType(mimeType); icon = this._mimeTypesHash[matchedType]; } if (icon == null) { icon = "scrivito_icon_generic"; } return icon; }; MimeTypeIcon._mimeTypesHash = { "video": "scrivito_icon_movie", "audio": "scrivito_icon_music", "msword": "scrivito_icon_doc", "zip": "scrivito_icon_zip", "pdf": "scrivito_icon_pdf", "ms-excel": "scrivito_icon_xls", "ms-powerpoint": "scrivito_icon_ppt", "openxmlformats-officedocument.spreadsheetml": "scrivito_icon_xls", "wordprocessingml": "scrivito_icon_doc", "presentationml": "scrivito_icon_ppt" }; MimeTypeIcon._getMatchedIconType = function(mimeType) { return _.find(Object.keys(this._mimeTypesHash), function(keyName) { return mimeType.match(RegExp("\\b" + keyName + "\\b")); }); }; return MimeTypeIcon; })(); module.exports = MimeTypeIcon; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var AddItemMixin, ThumbnailAddItem; AddItemMixin = __webpack_require__(49); ThumbnailAddItem = React.createClass({ displayName: 'ThumbnailAddItem', mixins: [AddItemMixin], render: function() { return React.createElement("li", { "className": "content-browser-item", "onClick": this.createClick }, React.createElement("div", { "className": this.itemClassName() }, React.createElement("div", { "className": "scrivito-content-browser-text" }, React.createElement("span", { "className": this.iconClassName(), "title": this.iconTitle() }), React.createElement("span", null, this.textMessage())))); } }); module.exports = ThumbnailAddItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var AddItemMixin; AddItemMixin = { itemClassName: function() { var className; className = "scrivito-content-browser-add"; if (!this.props.objCreation.isActive()) { className += " disabled"; } return className; }, iconClassName: function() { var iconClass; iconClass = this.props.objCreation.isActive() ? "scrivito_icon_plus" : "scrivito_icon_disabled"; return "scrivito_icon " + iconClass; }, creationNotPossibleBody: function(error) { return React.createElement("ul", null, _.map(error.nodeTitles, function(title) { return React.createElement("li", null, title); })); }, presetConflictBody: function(error) { return React.createElement("div", null, "The selected filter options cannot be applied to the file(s)\nyou wanted to upload. Please select only one of the following options,\nthen try again:\n", _.map(error.fields, function(values, field) { return React.createElement("div", null, React.createElement("h4", null, field), React.createElement("ul", null, _.map(values, function(value) { return React.createElement("li", null, value); }))); })); }, showErrorAlert: function(error) { var alertProps; alertProps = (function() { switch (error.type) { case 'creation_not_possible': return { subtitle: 'Creation of items matching the selected filters has been disabled.', body: this.creationNotPossibleBody(error) }; case 'obj_class_not_provided': return { subtitle: "Configuration error: No '_obj_class' provided." }; case 'preset_conflict': return { body: this.presetConflictBody(error) }; } }).call(this); alertProps.title = "Creation not possible"; return scrivito.content_browser._showAlert(alertProps); }, buildErrorMessage: function(error) { var message, nodesString; switch (error.type) { case 'creation_not_possible': nodesString = error.nodeTitles.join(', '); return "The selected filter options " + nodesString + " prevent the creation"; case 'obj_class_not_provided': return "Configuration error: No '_obj_class' provided"; case 'preset_conflict': message = 'The selected filter options cannot be applied to the file(s) you wanted to upload. Please select only one of the following options, then try again:\n'; _.each(error.fields, function(value, field) { return message += field + ": " + (value.join(', ')) + "\n"; }); return message; } }, iconTitle: function() { if (!this.props.objCreation.isActive()) { return this.buildErrorMessage(this.props.objCreation.error()); } }, textMessage: function() { if (this.props.objCreation.isActive()) { return "Create Item"; } else { return "Item creation not possible"; } }, createClick: function() { if (this.props.objCreation.isActive()) { return this.props.addedObjsCollection.createObj(this.props.objCreation.preset()); } else { return this.showErrorAlert(this.props.objCreation.error()); } } }; module.exports = AddItemMixin; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { var ActiveNodeConfigCollector, ObjCreation, PresetBuilder; ActiveNodeConfigCollector = __webpack_require__(21); PresetBuilder = __webpack_require__(51); ObjCreation = (function() { function ObjCreation(filter) { var collector, presetBuilder; collector = new ActiveNodeConfigCollector(filter); this.activeConfigs = collector.findActiveFilterItems(); presetBuilder = new PresetBuilder(filter); this._preset = presetBuilder.generatePreset(); } ObjCreation.prototype.preset = function() { return this._preset.values(); }; ObjCreation.prototype.showCreationItem = function() { return _.some(this.activeConfigs, function(nodeConfig) { return nodeConfig.enablesCreation(); }); }; ObjCreation.prototype.isActive = function() { return !!(!this._preventCreation() && this._presetIsValid()); }; ObjCreation.prototype.error = function() { if (this._preventCreation()) { return { type: 'creation_not_possible', nodeTitles: this._nodeTitlesPreventingCreation() }; } else if (this._preset.isValid()) { return { type: 'obj_class_not_provided' }; } else { return { type: 'preset_conflict', fields: this._buildPresetConflictError() }; } }; ObjCreation.prototype._preventCreation = function() { return _.some(this.activeConfigs, function(nodeConfig) { return nodeConfig.preventsCreation(); }); }; ObjCreation.prototype._presetIsValid = function() { return this._preset.isValid() && this.preset()['_obj_class']; }; ObjCreation.prototype._nodeTitlesPreventingCreation = function() { var nodes; nodes = _.flatten(_.map(this.activeConfigs, function(node) { return node.nodesPreventingCreation(); })); return _.map(nodes, function(node) { return node.title; }); }; ObjCreation.prototype._buildPresetConflictError = function() { var presetConflicts; presetConflicts = {}; _.each(this._preset.errors(), function(values, field) { return presetConflicts[field] = values; }); return presetConflicts; }; return ObjCreation; })(); module.exports = ObjCreation; /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { var ActiveNodeConfigCollector, PresetBuilder; ActiveNodeConfigCollector = __webpack_require__(21); PresetBuilder = (function() { var Preset; Preset = (function() { function Preset() { this._errors = {}; this._values = {}; this._titles = {}; } Preset.prototype.isValid = function() { return _.keys(this.errors()).length === 0; }; Preset.prototype.values = function() { if (this.isValid()) { return this._values; } else { throw new Error('#values can not be called on an invalid Preset'); } }; Preset.prototype.errors = function() { return this._errors; }; Preset.prototype._addValue = function(key, value, title) { if (this._values.hasOwnProperty(key)) { return this._addError(key, this._titles[key], title); } else { this._values[key] = value; return this._titles[key] = title; } }; Preset.prototype._addError = function(key, previouslySetValue, newValue) { if (this._errors[key]) { return this._errors[key].push(newValue); } else { return this._errors[key] = [previouslySetValue, newValue]; } }; return Preset; })(); function PresetBuilder(filter) { this._collector = new ActiveNodeConfigCollector(filter); } PresetBuilder.prototype.generatePreset = function() { var activeNodeConfigs, presetCollection; presetCollection = new Preset(); activeNodeConfigs = this._collector.findActiveFilterItems(); _.each(activeNodeConfigs, (function(_this) { return function(activeNodeConfig) { var nodesWithPreset; nodesWithPreset = _this._nodesWithPreset(activeNodeConfig); return _.each(nodesWithPreset, function(filterNode) { return _this._addPresetsForFilterNode(filterNode, presetCollection); }); }; })(this)); return presetCollection; }; PresetBuilder.prototype._nodesWithPreset = function(config) { return _.select(config.activeNodes(), function(node) { return node.preset; }); }; PresetBuilder.prototype._addPresetsForFilterNode = function(node, presetCollection) { return _.each(node.preset, function(value, key) { if (value !== void 0) { return presetCollection._addValue(key, value, node.title); } }); }; return PresetBuilder; })(); module.exports = PresetBuilder; /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedItems, LastAddedTableViewContent, LastAddedThumbnailItems, TableView; LastAddedTableViewContent = __webpack_require__(53); LastAddedThumbnailItems = __webpack_require__(59); TableView = __webpack_require__(42); LastAddedItems = React.createClass({ displayName: 'LastAddedItems', getForbiddenUploadText: function() { return "You cannot upload files here. Please select a suitable filter."; }, render: function() { return React.createElement("div", null, (this.props.dragInProgress ? React.createElement("div", { "className": "scrivito-content-browser-text" }, React.createElement("span", { "className": "scrivito_icon scrivito_icon_error" }), React.createElement("span", { "className": "scrivito_title" }, this.getForbiddenUploadText())) : this.props.viewMode.isList() ? React.createElement(TableView, React.__spread({}, this.props), React.createElement(LastAddedTableViewContent, React.__spread({}, this.props))) : React.createElement(LastAddedThumbnailItems, React.__spread({}, this.props)))); } }); module.exports = LastAddedItems; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedTableViewContent, LastAddedTableViewErrorItem, LastAddedTableViewItem, TableViewItem; LastAddedTableViewErrorItem = __webpack_require__(54); LastAddedTableViewItem = __webpack_require__(56); TableViewItem = __webpack_require__(58); LastAddedTableViewContent = React.createClass({ displayName: 'LastAddedTableViewContent', renderedLastAddedErrorThumbComponent: function() { if (this.props.addedObjsCollection.hasFailedCreations()) { return React.createElement(LastAddedTableViewErrorItem, { "addedObjsCollection": this.props.addedObjsCollection }); } }, getLastAddedTableViewItems: function() { var items; return items = _.map(this.props.addedObjsCollection.objs(), (function(_this) { return function(obj) { if (obj.status() === "active") { return React.createElement(LastAddedTableViewItem, { "key": obj.uniqueId(), "addedItem": obj }); } else if (obj.status() === "completed") { return React.createElement(TableViewItem, { "key": obj.createdObj().id(), "obj": obj.createdObj(), "objCollection": _this.props.objCollection }); } }; })(this)); }, render: function() { return React.createElement("div", { "className": "scrivito-content-browser-list-content" }, React.createElement("table", null, React.createElement("tbody", null, this.renderedLastAddedErrorThumbComponent(), this.getLastAddedTableViewItems()))); } }); module.exports = LastAddedTableViewContent; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedErrorItemMixin, LastAddedTableViewErrorItem; LastAddedErrorItemMixin = __webpack_require__(55); LastAddedTableViewErrorItem = React.createClass({ displayName: 'LastAddedTableViewError', mixins: [LastAddedErrorItemMixin], render: function() { return React.createElement("tr", null, React.createElement("td", { "colSpan": "6" }, React.createElement("div", { "className": "scrivito-content-browser-add error", "onClick": this.showAlert, "title": this._titleInfo() }, React.createElement("span", { "className": "scrivito_icon scrivito_icon_error" }), React.createElement("span", null, this.getErrorsCount(), React.createElement("span", null, " during upload"))))); } }); module.exports = LastAddedTableViewErrorItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedErrorItemMixin; LastAddedErrorItemMixin = { failureMessage: function() { var defaultError, failedObjs, message; defaultError = "Upload failed. Please check your network connection."; failedObjs = this.props.addedObjsCollection.getFailedObjs(); message = React.createElement("ul", null, _.map(failedObjs, function(obj) { return React.createElement("div", { "className": "content-browser-alert" }, React.createElement("h4", null, obj.fileName()), React.createElement("li", null, obj.failureMessage() || defaultError)); })); return message; }, showAlert: function() { return scrivito.content_browser._showAlert({ title: 'The selected filter options cannot be applied to the file(s) you wanted to upload', body: React.createElement("div", null, this.failureMessage()) }); }, getErrorsCount: function() { var failedObjs; failedObjs = this.props.addedObjsCollection.getFailedObjs(); return failedObjs.length + " Error(s)"; }, _titleInfo: function() { return "Display full upload error message"; } }; module.exports = LastAddedErrorItemMixin; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedItemMixin, LastAddedTableViewItem; LastAddedItemMixin = __webpack_require__(57); LastAddedTableViewItem = React.createClass({ displayName: 'LastAddedTableViewItem', mixins: [LastAddedItemMixin], getUploadTitle: function() { return "uploading file " + (this.props.addedItem.fileName()) + " ..."; }, render: function() { return React.createElement("tr", null, React.createElement("td", { "colSpan": "6" }, this.renderUploadStateProgress(), React.createElement("div", { "className": "scrivito-content-browser-add upload", "title": this.getUploadTitle() }, React.createElement("span", { "className": "scrivito_icon scrivito_icon_generic" }, this.getUploadTitle())))); } }); module.exports = LastAddedTableViewItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedItemMixin; LastAddedItemMixin = { uploadInProgress: function() { return this.props.addedItem.status() === "active"; }, renderUploadStateProgress: function() { if (this.uploadInProgress()) { return React.createElement("div", { "className": "upload_state", "style": { width: (this.props.addedItem.progress()) + "%" } }); } } }; module.exports = LastAddedItemMixin; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var InspectedItemMixin, TableViewItem; InspectedItemMixin = __webpack_require__(46); TableViewItem = React.createClass({ displayName: 'TableViewItem', mixins: [InspectedItemMixin], baseSelectClass: function() { return 'scrivito-content-browser-list-select'; }, getLastChangedFormatedDate: function() { var result; if (this.props.obj.lastChanged() !== void 0) { result = moment(this.props.obj.lastChanged()).utcOffset(this.props.obj.lastChanged()); return result.format("dddd, MMMM Do YYYY, h:mm A"); } }, _getFileTypeTitleTag: function() { var mimeType; mimeType = this.props.obj.mimeType(); if (mimeType != null) { return mimeType.match(/\w+$/)[0]; } }, render: function() { return React.createElement("tr", { "onClick": this.handleSelectClick, "className": this.getItemClasses() }, React.createElement("td", null, React.createElement("div", { "className": this.selectClass() })), React.createElement("td", { "title": this.props.obj.title() }, this.props.obj.title()), React.createElement("td", null, this.props.obj.fileType()), React.createElement("td", { "title": this.props.obj.mimeType() }, this._getFileTypeTitleTag()), React.createElement("td", null, this.props.obj.fileSize()), React.createElement("td", null, React.createElement("span", null, React.createElement("time", { "dateTime": this.props.obj.lastChanged(), "title": this.getLastChangedFormatedDate() }, moment.utc(this.props.obj.lastChanged()).fromNow())))); } }); module.exports = TableViewItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedThumbnailErrorItem, LastAddedThumbnailItem, LastAddedThumbnailItems, ThumbnailItem; LastAddedThumbnailErrorItem = __webpack_require__(60); LastAddedThumbnailItem = __webpack_require__(61); ThumbnailItem = __webpack_require__(45); LastAddedThumbnailItems = React.createClass({ displayName: "LastAddedThumbnailItems", renderedLastAddedErrorThumbComponent: function() { if (this.props.addedObjsCollection.hasFailedCreations()) { return React.createElement(LastAddedThumbnailErrorItem, { "addedObjsCollection": this.props.addedObjsCollection }); } }, getSizeClassName: function() { return "items scrivito-content-browser-thumbnails small"; }, buildItems: function() { return _.map(this.props.addedObjsCollection.objs(), (function(_this) { return function(obj) { if (obj.status() === "active") { return React.createElement(LastAddedThumbnailItem, { "key": obj.uniqueId(), "addedItem": obj }); } else if (obj.status() === "completed") { return React.createElement(ThumbnailItem, { "key": obj.createdObj().id(), "obj": obj.createdObj(), "objCollection": _this.props.objCollection }); } }; })(this)); }, render: function() { return React.createElement("div", null, React.createElement("ul", { "className": this.getSizeClassName() }, this.renderedLastAddedErrorThumbComponent(), this.buildItems())); } }); module.exports = LastAddedThumbnailItems; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 60 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedErrorItemMixin, LastAddedThumbnailErrorItem; LastAddedErrorItemMixin = __webpack_require__(55); LastAddedThumbnailErrorItem = React.createClass({ displayName: 'LastAddedThumbnailErrorItem', mixins: [LastAddedErrorItemMixin], render: function() { return React.createElement("li", { "className": "content-browser-item", "onClick": this.showAlert, "title": this._titleInfo() }, React.createElement("div", { "className": "scrivito-content-browser-add error" }, React.createElement("div", { "className": "scrivito-content-browser-text" }, React.createElement("span", { "className": "scrivito_icon scrivito_icon_error" }), React.createElement("span", null, this.getErrorsCount(), React.createElement("span", null, React.createElement("br", null), "during upload"))))); } }); module.exports = LastAddedThumbnailErrorItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 61 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var LastAddedItemMixin, LastAddedThumbnailItem; LastAddedItemMixin = __webpack_require__(57); LastAddedThumbnailItem = React.createClass({ displayName: 'LastAddedThumbnailItem', mixins: [LastAddedItemMixin], addedItemClassName: function() { var addedItemClassName; addedItemClassName = "content-browser-item"; if (this.uploadInProgress()) { addedItemClassName += " upload"; } return addedItemClassName; }, render: function() { return React.createElement("li", { "className": this.addedItemClassName() }, this.renderUploadStateProgress(), React.createElement("div", { "className": "scrivito-content-browser-item-wrapper" }, React.createElement("div", { "className": "scrivito-content-browser-preview" }), React.createElement("span", { "className": "scrivito-content-browser-thumbnails-name" }, this.props.addedItem.fileName()))); } }); module.exports = LastAddedThumbnailItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 62 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var InfiniteScrollMixin, ObjCreation, TableViewAddItem, TableViewContent, TableViewItem; TableViewItem = __webpack_require__(58); TableViewAddItem = __webpack_require__(63); ObjCreation = __webpack_require__(50); InfiniteScrollMixin = __webpack_require__(44); TableViewContent = React.createClass({ mixins: [InfiniteScrollMixin], getTableViewItems: function() { var items; return items = _.map(this.props.objCollection.objs(), (function(_this) { return function(obj) { return React.createElement(TableViewItem, { "key": obj.id(), "obj": obj, "objCollection": _this.props.objCollection }); }; })(this)); }, getElementDOMNode: function() { return this.getDOMNode(); }, objCreation: function() { return new ObjCreation(this.props.filter); }, render: function() { return React.createElement("div", { "className": "scrivito-content-browser-list-content" }, React.createElement("table", null, React.createElement("tbody", null, (this.objCreation().showCreationItem() ? React.createElement(TableViewAddItem, { "objCreation": this.objCreation(), "addedObjsCollection": this.props.addedObjsCollection }) : void 0), this.getTableViewItems()))); } }); module.exports = TableViewContent; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 63 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var AddItemMixin, TableViewAddItem; AddItemMixin = __webpack_require__(49); TableViewAddItem = React.createClass({ mixins: [AddItemMixin], render: function() { return React.createElement("tr", { "onClick": this.createClick }, React.createElement("td", { "colSpan": "6" }, React.createElement("div", { "className": this.itemClassName() }, React.createElement("div", { "className": "scrivito-content-browser-text" }, React.createElement("span", { "className": this.iconClassName(), "title": this.iconTitle() }), React.createElement("span", null, this.textMessage()))))); } }); module.exports = TableViewAddItem; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 64 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var MoreItemsSpinner; MoreItemsSpinner = React.createClass({ displayName: 'MoreItemsSpinner', render: function() { return React.createElement("div", { "className": "scrivito-content-browser-endless-loader" }, React.createElement("i", { "className": "scrivito_icon scrivito_icon_refresh" })); } }); module.exports = MoreItemsSpinner; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var Inspector, MaximizeInspectorToggle, ModalDialogsModule; ModalDialogsModule = __webpack_require__(66); MaximizeInspectorToggle = __webpack_require__(67); Inspector = React.createClass({ displayName: 'Inspector', getDetailsClassName: function() { return "scrivito_icon scrivito_icon_eye"; }, getEmptyPlaceholder: function() { return React.createElement("div", { "className": "details-view" }, React.createElement("p", { "className": "no-editing-available" }, React.createElement("span", { "className": "scrivito_icon scrivito_icon_generic" }), "No edit view available.")); }, _getMultiSelectedTitle: function() { return "Selected: " + (this.props.objCollection.getSelectedObjs().length) + " items"; }, _getInspectedObj: function() { return this.props.objCollection.getSelectedObjs()[0]; }, _fileDetail: function() { var ref; return (ref = this._getInspectedObj()) != null ? ref.title() : void 0; }, _showInspectorHeader: function(title) { return React.createElement("h3", { "title": title }, React.createElement(MaximizeInspectorToggle, { "viewMode": this.props.viewMode }), React.createElement("span", { "title": "Details", "className": this.getDetailsClassName() }), React.createElement("span", { "className": "title" }, title), React.createElement("span", { "className": "scrivito_icon scrivito_icon_trash scrivito_delete", "onClick": this._deleteInspectedObjs })); }, _deleteInspectedObjs: function() { return ModalDialogsModule.deleteObjs(this.props.objCollection.getSelectedObjs()).then((function(_this) { return function() { return _this.props.objCollection.destroySelectedObjs(); }; })(this)); }, render: function() { return React.createElement("div", { "className": "scrivito-content-browser-inspector" }, (this.props.objCollection.getSelectedObjs().length > 0 ? this.props.objCollection.isSingleElementSelected() ? React.createElement("div", null, this._showInspectorHeader(this._fileDetail()), React.createElement("div", { "className": "inspector-content" }, (this._getInspectedObj().hasDetailsView() ? React.createElement("iframe", { "src": this._getInspectedObj().detailsViewUrl(), "name": "scrivito_inspector" }) : this.getEmptyPlaceholder()))) : this._showInspectorHeader(this._getMultiSelectedTitle()) : void 0)); } }); module.exports = Inspector; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 66 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var ModalDialogsModule; ModalDialogsModule = { deleteObjs: function(selectedObjs) { var objectsToBeDeleted, title; if (selectedObjs.length === 1) { objectsToBeDeleted = selectedObjs[0].title(); title = React.createElement("span", null, "Really delete ", React.createElement("q", null, objectsToBeDeleted), "?"); } else { objectsToBeDeleted = selectedObjs.length + " CMS objects"; title = 'Really delete the selected items?'; } return scrivito.content_browser._showConfirm({ title: title, subtitle: "This will delete " + objectsToBeDeleted + ". Objects that were created in this working copy cannot be restored." }); } }; module.exports = ModalDialogsModule; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 67 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var MaximizeInspectorToggle; MaximizeInspectorToggle = React.createClass({ displayName: 'MaximizeInspectorToggle', _toggleMaximized: function() { return this.props.viewMode.toggleInspectorMaximized(); }, render: function() { return React.createElement("span", { "className": "scrivito_move_left", "title": "Maximize details view", "onClick": this._toggleMaximized }, React.createElement("span", { "className": "scrivito_icon scrivito_icon_chevron_left" })); } }); module.exports = MaximizeInspectorToggle; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ }, /* 68 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(React) {var Footer, ModalDialogsModule; ModalDialogsModule = __webpack_require__(66); Footer = React.createClass({ displayName: 'Footer', currentSelectedCount: function() { return this.props.objCollection.getSelectedObjs().length; }, deleteButtonClass: function() { var className; className = ' scrivito_button scrivito_lightgrey content-browser-delete scrivito_left'; if (this.currentSelectedCount() === 0) { className += ' scrivito_disabled'; } return className; }, closeClick: function() { if (this.props.viewMode.isStandAlone()) { return this.props.promise.resolve(); } else { return this.props.promise.reject(); } }, doneClick: function() { return this.props.promise.resolve(this.props.objCollection.selectedObjsIds()); }, deleteClick: function() { if (this.props.objCollection.getSelectedObjs().length > 0) { return ModalDialogsModule.deleteObjs(this.props.objCollection.getSelectedObjs()).then((function(_this) { return function() { return _this.props.objCollection.destroySelectedObjs(); }; })(this)); } }, _getClassNameCloseButton: function() { var className; className = "scrivito_button content-browser-close"; if (this.props.viewMode.isStandAlone()) { className += " scrivito_green"; } return className; }, render: function() { return React.createElement("div", { "className": "scrivito-content-browser-footer" }, React.createElement("a", { "className": this.deleteButtonClass(), "onClick": this.deleteClick }, "Delete", React.createElement("span", { "className": "scrivito-content-browser-counter selected-total" }, this.currentSelectedCount())), (!this.props.viewMode.isStandAlone() ? React.createElement("a", { "className": "scrivito_button scrivito_green content-browser-save", "onClick": this.doneClick }, "Select", React.createElement("span", { "className": "scrivito-content-browser-counter selected-total" }, this.currentSelectedCount())) : void 0), React.createElement("a", { "className": this._getClassNameCloseButton(), "onClick": this.closeClick }, "Close")); } }); module.exports = Footer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) /***/ } /******/ ]);